File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 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" : [
1111 "author" :
" Pipedream <[email protected] > (https://pipedream.com/)" ,
1212 "publishConfig" : {
1313 "access" : " public"
14+ },
15+ "dependencies" : {
16+ "@pipedream/platform" : " ^3.1.0"
1417 }
1518}
Original file line number Diff line number Diff 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} ;
You can’t perform that action at this time.
0 commit comments