{"id":13432661,"url":"https://github.com/fregante/chrome-webstore-upload","last_synced_at":"2025-04-12T20:41:29.445Z","repository":{"id":38441425,"uuid":"59432740","full_name":"fregante/chrome-webstore-upload","owner":"fregante","description":"Upload Chrome Extensions to the Chrome Web Store","archived":false,"fork":false,"pushed_at":"2024-10-01T09:06:30.000Z","size":76,"stargazers_count":379,"open_issues_count":2,"forks_count":53,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-05T19:07:58.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fregante.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-22T20:26:12.000Z","updated_at":"2025-03-26T09:08:41.000Z","dependencies_parsed_at":"2023-12-10T09:23:58.037Z","dependency_job_id":"9868406e-c6c6-4739-859b-5c000543c60a","html_url":"https://github.com/fregante/chrome-webstore-upload","commit_stats":{"total_commits":100,"total_committers":17,"mean_commits":5.882352941176471,"dds":"0.33999999999999997","last_synced_commit":"c475eff1a50a2104e062ae59a60d48da54af506b"},"previous_names":["drewml/chrome-webstore-upload"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregante%2Fchrome-webstore-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregante%2Fchrome-webstore-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregante%2Fchrome-webstore-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fregante%2Fchrome-webstore-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fregante","download_url":"https://codeload.github.com/fregante/chrome-webstore-upload/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322597,"owners_count":21084336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T02:01:14.874Z","updated_at":"2025-04-12T20:41:29.414Z","avatar_url":"https://github.com/fregante.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# chrome-webstore-upload\n\n\u003e A small node.js module to upload/publish extensions to the [Chrome Web Store](https://chrome.google.com/webstore/category/extensions).\n\nIf you're looking to upload/publish from the CLI, then use [chrome-webstore-upload-cli](https://github.com/fregante/chrome-webstore-upload-cli).\n\n## Install\n\n```\nnpm install --save-dev chrome-webstore-upload\n```\n\n## Setup\n\nYou will need a Google API `clientId`, `clientSecret` and `refreshToken`. Use [the guide]( https://github.com/fregante/chrome-webstore-upload-keys).\n\n## Usage\n\nAll methods return a  promise.\n\n### Create a new client\n\n```javascript\nimport chromeWebstoreUpload from 'chrome-webstore-upload';\n\nconst store = chromeWebstoreUpload({\n  extensionId: 'ecnglinljpjkbgmdpeiglonddahpbkeb',\n  clientId: 'xxxxxxxxxx',\n  clientSecret: 'xxxxxxxxxx',\n  refreshToken: 'xxxxxxxxxx',\n});\n```\n\n### Upload to existing extension\n\n```javascript\nimport fs from 'fs';\n\nconst myZipFile = fs.createReadStream('./mypackage.zip');\nconst token = 'xxxx'; // optional. One will be fetched if not provided\nconst response = await store.uploadExisting(myZipFile, token);\n// response is a Resource Representation\n// https://developer.chrome.com/webstore/webstore_api/items#resource\n```\n\n### Publish extension\n\n```javascript\nconst target = 'default'; // optional. Can also be 'trustedTesters'\nconst token = 'xxxx'; // optional. One will be fetched if not provided\nconst deployPercentage = 25; // optional. Will default to 100%.\nconst response = await store.publish(target, token, deployPercentage);\n// response is documented here:\n// https://developer.chrome.com/webstore/webstore_api/items#publish\n```\n\n### Get a Chrome Web Store item\n\n```javascript\nconst projection = \"DRAFT\"; // optional. Can also be 'PUBLISHED' but only \"DRAFT\" is supported at this time.\nconst token = \"xxxx\"; // optional. One will be fetched if not provided\nconst response = await store.get(projection, token);\n// response is documented here:\n// https://developer.chrome.com/docs/webstore/webstore_api/items#get\n```\n\n### Fetch token\n\n```javascript\nconst token = store.fetchToken();\n// token is  astring\n```\n\n## Tips\n\n- If you plan to upload _and_ publish at the same time, use the `fetchToken` method, and pass it to both `uploadExisting` and `publish` as the optional second parameter. This will avoid those methods making duplicate calls for new tokens.\n\n## Related\n\n- [webext-storage-cache](https://github.com/fregante/webext-storage-cache) - Map-like promised cache storage with expiration. Chrome and Firefox\n- [webext-dynamic-content-scripts](https://github.com/fregante/webext-dynamic-content-scripts) - Automatically registers your content_scripts on domains added via permission.request\n- [Awesome-WebExtensions](https://github.com/fregante/Awesome-WebExtensions) - A curated list of awesome resources for WebExtensions development.\n- [More…](https://github.com/fregante/webext-fun)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffregante%2Fchrome-webstore-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffregante%2Fchrome-webstore-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffregante%2Fchrome-webstore-upload/lists"}