Skip to content

Commit b2c63a7

Browse files
committed
Adding source deploy + package bump
1 parent 4e533db commit b2c63a7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

components/yay_com/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/yay_com",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Yay.com Components",
55
"main": "yay_com.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.1.0"
1417
}
1518
}

components/yay_com/sources/common/polling.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
_setSavedIds(ids) {
2020
this.db.set("savedIds", ids);
2121
},
22-
async startEvent() {
22+
async startEvent(maxItems) {
2323
const savedIds = this._getSavedIds();
2424
const items = await this.getItems(savedIds);
2525

@@ -28,7 +28,9 @@ export default {
2828
const id = this.getItemId(item);
2929
if (!savedIds.includes(id)) {
3030
const meta = this.generateMeta(item);
31-
this.$emit(item, meta);
31+
if (maxItems === undefined || (typeof maxItems === "number" && --maxItems >= 0)) {
32+
this.$emit(item, meta);
33+
}
3234
newIds.push(id);
3335
}
3436
}
@@ -46,4 +48,9 @@ export default {
4648
async run() {
4749
await this.startEvent();
4850
},
51+
hooks: {
52+
async deploy() {
53+
await this.startEvent(5);
54+
},
55+
},
4956
};

0 commit comments

Comments
 (0)