{"id":19960905,"url":"https://github.com/enncy/pioneerjs","last_synced_at":"2026-03-11T01:31:10.361Z","repository":{"id":57136913,"uuid":"383441979","full_name":"enncy/pioneerjs","owner":"enncy","description":"pioneerjs - a puppeteer framework","archived":false,"fork":false,"pushed_at":"2021-10-24T13:15:16.000Z","size":877,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T10:56:03.467Z","etag":null,"topics":["automated","framework","headless-chrome","nodejs","pioneerjs","puppeteer","puppeteer-core","typescript","web"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enncy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-06T11:18:11.000Z","updated_at":"2023-09-08T18:24:03.000Z","dependencies_parsed_at":"2022-09-01T03:00:56.023Z","dependency_job_id":null,"html_url":"https://github.com/enncy/pioneerjs","commit_stats":null,"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"purl":"pkg:github/enncy/pioneerjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enncy%2Fpioneerjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enncy%2Fpioneerjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enncy%2Fpioneerjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enncy%2Fpioneerjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enncy","download_url":"https://codeload.github.com/enncy/pioneerjs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enncy%2Fpioneerjs/sbom","scorecard":{"id":377629,"data":{"date":"2025-08-11","repo":{"name":"github.com/enncy/pioneerjs","commit":"8b425860782f42c2b3f54200907c457b010e608b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"48 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4","Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653","Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj","Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67","Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w","Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2","Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-cph5-m8f7-6c5x","Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T14:38:42.177Z","repository_id":57136913,"created_at":"2025-08-18T14:38:42.177Z","updated_at":"2025-08-18T14:38:42.177Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30366051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated","framework","headless-chrome","nodejs","pioneerjs","puppeteer","puppeteer-core","typescript","web"],"created_at":"2024-11-13T02:05:42.824Z","updated_at":"2026-03-11T01:31:10.327Z","avatar_url":"https://github.com/enncy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pioneerjs\npioneerjs - a puppeteer framework\n\n\u003ca\u003e![NPM](https://img.shields.io/npm/l/pioneerjs) ![npm](https://img.shields.io/npm/v/pioneerjs)  ![npm bundle size](https://img.shields.io/bundlephobia/min/pioneerjs) ![npm](https://img.shields.io/npm/dw/@pioneerjs/core)\u003c/a\u003e\n\n\n\n\n \u003ePioneerjs is a puppeteer framework that uses the principle of Dependency Injection to inject all the resources(page,browser,...) you need.\n\n- Pioneerjs helps you to manage the `Browser` and `Page` objects of Puppeteer\n- It instantiates and automatically injects Page, Browser, ScriptContext objects for each runnable script\n- You can use RunnableScript to run the puppeteer code and start it with     @Runnable('https://xxx.com') decorator\n- You can use InjectableScripts in any RunnableScript and inject them automatically using the @Inject decorator, no instantiation is needed, the Page, Browser, ScriptContext objects of an InjectableScript are the same as in the RunnableScript it is in, and InjectableScripts generally play the role of tool scripts\n\n\n\n## Getting Started\n\n```bash\n# init your package.json\nnpm init\n```\n\n```bash\n# install dependencies\nnpm install  puppeteer-core  @pioneerjs/core @pioneerjs/common\n# or you can just install pioneerjs\nnpm install  puppeteer-core  pioneerjs\n```\n\n\n```bash\n# init typescript config\ntsc --init\n```\n`tscondig.json`\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"es5\", \n    \"module\": \"commonjs\",\n    \"outDir\": \"./dist\", \n    \"strict\": true,\n    \"esModuleInterop\": true, \n    \"experimentalDecorators\": true,\n    \"emitDecoratorMetadata\": true,\n    \"skipLibCheck\": true,\n    \"forceConsistentCasingInFileNames\": true \n  }\n}\n```\n\n\n\ncreate  `app.ts`\n\n```typescript\n\n\nimport { PioneerFactory } from \"@pioneerjs/core\";\nimport { TestScript } from \"./src/test\";\n\n\nPioneerFactory.launch({\n    // your chrome path\n    executablePath: \"C:\\\\Program Files\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe\",\n    defaultViewport: null,\n    headless: false,\n}).then(async pioneer =\u003e {\n\n    pioneer.startup({\n        scripts: [TestScript],\n        events: ['request']\n    })\n\n    // or you can find script by name\n\n    const { runnanleScripts } =   await pioneer.startup({\n        scripts: [TestScript],\n        events: ['request']\n    })\n\n    runnanleScripts?.find(s=\u003es.name=\"TestScript\").run()\n\n})\n\n\n```\n\n\ncreate `src/test.ts`\n```typescript\nimport { Injectable, Runnable, Inject } from \"@pioneerjs/common\";\nimport { InjectableScript, RunnableScript, WaitForScript } from \"@pioneerjs/core\";\nimport { Protocol } from \"puppeteer-core\";\n\n// create your new script\n@Injectable()\nexport class Spider extends InjectableScript {\n    async getCookie(url: string): Promise\u003cProtocol.Network.Cookie[]\u003e {\n        await this.page.goto(url)\n        return await this.page.cookies()\n    }\n}\n\n /**\n * create a new runnable script  \n * @Runnable({url:\"https://baidu.com\"})  // goto \"https://baidu.com\"\n * or\n * @Runnable()  // do nothing\n */ \n@Runnable()\nexport class TestScript extends RunnableScript {\n\n    @Inject()\n    private mySpider!: Spider ;\n\n    @Inject()\n    private waitFor!: WaitForScript ;\n\n    async run(): Promise\u003cvoid\u003e {\n \n \n        console.log(await this.mySpider.getCookie(\"https://baidu.com\")); // \u003chtml\u003e...\u003c/html\u003e\n        console.log(\"waidForSleep\");\n        // auto inject you don't need to instance\n        this.waitFor.sleep(3000)\n        console.log(this.waitFor.page.url());\n\n        // InjectableScript use same page,and context with RunnableScript\n        console.log(this.waitFor.page === this.page);\n\n        // eventPool: catch all the event\n        console.log(this.context.eventPool.getEvents('request')?.length)\n\n        // Script communication\n        this.context.store.set('say', 'hello word')\n        console.log(this.waitFor.context.store.get('say'))\n    }\n    // called when document change\n    async update(): Promise\u003cvoid\u003e {\n        console.log(\"update\", this.page.url());\n    }\n}\n\n```\n\n\n```bash\n# build your project\ntsc\n# run\nnode dist/index.js\n```\n\nout put like this :\n```\n[pioneerjs]:script injected - TestScript.Spider\n[pioneerjs]:script injected - TestScript.WaitForScript\n[pioneerjs]:script running - TestScript\n[\n  xxx\n]\nwaidForSleep\nhttps://www.baidu.com/\ntrue\n43\nhello word\nupdate https://www.baidu.com/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenncy%2Fpioneerjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenncy%2Fpioneerjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenncy%2Fpioneerjs/lists"}