File tree Expand file tree Collapse file tree 4 files changed +8
-6
lines changed
Expand file tree Collapse file tree 4 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export default {
3232 } ,
3333 } ) ;
3434
35- const filepath = normalizeFilepath ( this . filename ) ;
35+ const filepath = normalizeFilepath ( this . filename , "png" ) ;
3636 fs . writeFileSync ( filepath , Buffer . from ( fileContent ) ) ;
3737
3838 $ . export ( "$summary" , "Successfully converted HTML to PNG" ) ;
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export default {
2020 customjs ,
2121 "filename" ,
2222 ] ,
23+ description : "Download the PNG file to the `/tmp` directory with the specified filename." ,
2324 } ,
2425 } ,
2526 async run ( { $ } ) {
Original file line number Diff line number Diff line change @@ -5,21 +5,22 @@ import { normalizeFilepath } from "../common/utils.mjs";
55export default {
66 key : "customjs-run-puppeteer" ,
77 name : "Run Puppeteer" ,
8- description : "run-puppeteer . [See the documentation](https://www.customjs.space/api/docs#_5-run-puppeteer)" ,
8+ description : "Run Puppeteer . [See the documentation](https://www.customjs.space/api/docs#_5-run-puppeteer)" ,
99 version : "0.0.1" ,
1010 type : "action" ,
1111 props : {
1212 customjs,
1313 code : {
1414 type : "string" ,
1515 label : "Code" ,
16- description : "Enter code you want to run on puppeteer." ,
16+ description : "Enter the code you want to run on puppeteer." ,
1717 } ,
1818 filename : {
1919 propDefinition : [
2020 customjs ,
2121 "filename" ,
2222 ] ,
23+ description : "Download the PNG file to the `/tmp` directory with the specified filename." ,
2324 } ,
2425 } ,
2526 async run ( { $ } ) {
@@ -32,10 +33,10 @@ export default {
3233 } ,
3334 } ) ;
3435
35- const filepath = normalizeFilepath ( this . filename ) ;
36+ const filepath = normalizeFilepath ( this . filename , "png" ) ;
3637 fs . writeFileSync ( filepath , Buffer . from ( fileContent ) ) ;
3738
38- $ . export ( "$summary" , "Successfully run the puppeteer code." ) ;
39+ $ . export ( "$summary" , "Successfully ran the puppeteer code." ) ;
3940 return {
4041 filename : this . filename ,
4142 filepath,
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export default {
6060 ...opts ,
6161 } ) ;
6262 } ,
63- runPuppeteer ( opts = { } ) {
63+ runPuppeteer ( opts = { } ) { console . log ( opts . data ) ;
6464 return this . _makeRequest ( {
6565 headers : {
6666 "customjs-origin" : "pipedream/puppeteer" ,
You can’t perform that action at this time.
0 commit comments