chrome-webstore-upload-cli
Advanced tools
Comparing version 2.2.2 to 3.0.0
@@ -23,3 +23,3 @@ #!/usr/bin/env node | ||
Options | ||
--source Path to either a zip file, or a directory to be zipped | ||
--source Path to either a zip file, or a directory to be zipped. Defaults to the value of webExt.sourceDir in package.json or the current directory if not specified | ||
--extension-id The ID of the Chrome Extension (environment variable EXTENSION_ID) | ||
@@ -44,3 +44,2 @@ --client-id OAuth2 Client ID (environment variable CLIENT_ID) | ||
type: 'string', | ||
default: process.cwd(), | ||
}, | ||
@@ -63,3 +62,3 @@ }, | ||
trustedTesters, | ||
} = createConfig(cli.input[0], cli.flags); | ||
} = await createConfig(cli.input[0], cli.flags); | ||
@@ -66,0 +65,0 @@ const spinner = ora(); |
import process from 'node:process'; | ||
import findSource from './find-source.js'; | ||
export default function getConfig(command, flags) { | ||
export default async function getConfig(command, flags) { | ||
const apiConfig = { | ||
@@ -13,3 +14,3 @@ extensionId: flags.extensionId || process.env.EXTENSION_ID, | ||
apiConfig, | ||
zipPath: flags.source, | ||
zipPath: await findSource(flags.source), | ||
isUpload: command === 'upload', | ||
@@ -16,0 +17,0 @@ isPublish: command === 'publish', |
{ | ||
"name": "chrome-webstore-upload-cli", | ||
"version": "2.2.2", | ||
"version": "3.0.0", | ||
"description": "CLI tool to upload Chrome Extensions to the Chrome Web Store", | ||
@@ -31,2 +31,5 @@ "keywords": [ | ||
"xo": { | ||
"ignore": [ | ||
"test/fixtures" | ||
], | ||
"rules": { | ||
@@ -38,6 +41,3 @@ "object-curly-spacing": [ | ||
}, | ||
"space": 4, | ||
"ignore": [ | ||
"test/fixtures" | ||
] | ||
"space": 4 | ||
}, | ||
@@ -51,6 +51,6 @@ "ava": { | ||
"dependencies": { | ||
"chrome-webstore-upload": "^1.0.0", | ||
"junk": "^4.0.0", | ||
"meow": "^11.0.0", | ||
"ora": "^6.1.2", | ||
"chrome-webstore-upload": "^2.0.0", | ||
"junk": "^4.0.1", | ||
"meow": "^12.1.1", | ||
"ora": "^7.0.1", | ||
"recursive-readdir": "^2.2.3", | ||
@@ -60,10 +60,11 @@ "yazl": "^2.5.1" | ||
"devDependencies": { | ||
"ava": "^5.2.0", | ||
"execa": "^7.0.0", | ||
"ava": "^6.0.1", | ||
"execa": "^8.0.1", | ||
"is-stream": "^3.0.0", | ||
"xo": "^0.54.2" | ||
"mock-fs": "^5.2.0", | ||
"xo": "^0.56.0" | ||
}, | ||
"engines": { | ||
"node": "^14.13.1 || >=16.0.0" | ||
"node": ">=18" | ||
} | ||
} |
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import process from 'node:process'; | ||
import getClient from 'chrome-webstore-upload'; | ||
@@ -11,5 +10,4 @@ import zipdir from './zipdir.js'; | ||
const client = getClient(apiConfig); | ||
const fullPath = path.resolve(process.cwd(), zipPath); | ||
const zipStream = isZip(fullPath) | ||
? fs.createReadStream(fullPath) | ||
const zipStream = isZip(zipPath) | ||
? fs.createReadStream(zipPath) | ||
: await zipdir(zipPath); | ||
@@ -16,0 +14,0 @@ return client.uploadExisting(zipStream, token); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17227
11
298
5
+ Added@sec-ant/readable-stream@0.4.1(transitive)
+ Added@sindresorhus/is@7.0.1(transitive)
+ Added@szmarczak/http-timer@5.0.1(transitive)
+ Addedcacheable-lookup@7.0.0(transitive)
+ Addedcacheable-request@12.0.1(transitive)
+ Addedchrome-webstore-upload@2.0.0(transitive)
+ Addedeastasianwidth@0.2.0(transitive)
+ Addedemoji-regex@10.4.0(transitive)
+ Addedform-data-encoder@4.0.2(transitive)
+ Addedget-stream@9.0.1(transitive)
+ Addedgot@14.4.4(transitive)
+ Addedhttp2-wrapper@2.2.1(transitive)
+ Addedis-stream@4.0.1(transitive)
+ Addedlowercase-keys@3.0.0(transitive)
+ Addedmeow@12.1.1(transitive)
+ Addedmimic-response@4.0.0(transitive)
+ Addednormalize-url@8.0.1(transitive)
+ Addedora@7.0.1(transitive)
+ Addedp-cancelable@4.0.1(transitive)
+ Addedresponselike@3.0.0(transitive)
+ Addedstring-width@6.1.0(transitive)
+ Addedtype-fest@4.26.1(transitive)
- Removed@babel/code-frame@7.26.2(transitive)
- Removed@babel/helper-validator-identifier@7.25.9(transitive)
- Removed@sindresorhus/is@4.6.0(transitive)
- Removed@szmarczak/http-timer@4.0.6(transitive)
- Removed@types/cacheable-request@6.0.3(transitive)
- Removed@types/keyv@3.1.4(transitive)
- Removed@types/minimist@1.2.5(transitive)
- Removed@types/node@22.9.0(transitive)
- Removed@types/normalize-package-data@2.4.4(transitive)
- Removed@types/responselike@1.0.3(transitive)
- Removedarrify@1.0.1(transitive)
- Removedcacheable-lookup@5.0.4(transitive)
- Removedcacheable-request@7.0.4(transitive)
- Removedcamelcase@7.0.1(transitive)
- Removedcamelcase-keys@8.0.2(transitive)
- Removedchrome-webstore-upload@1.0.0(transitive)
- Removedclone@1.0.4(transitive)
- Removedclone-response@1.0.3(transitive)
- Removeddecamelize@1.2.06.0.0(transitive)
- Removeddecamelize-keys@1.1.1(transitive)
- Removeddefaults@1.0.4(transitive)
- Removedend-of-stream@1.4.4(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedfind-up@6.3.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-stream@5.2.0(transitive)
- Removedgot@11.8.6(transitive)
- Removedhard-rejection@2.1.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhosted-git-info@4.1.05.2.1(transitive)
- Removedhttp2-wrapper@1.0.3(transitive)
- Removedindent-string@5.0.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-plain-obj@1.1.0(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjson-parse-even-better-errors@2.3.1(transitive)
- Removedkind-of@6.0.3(transitive)
- Removedlines-and-columns@1.2.4(transitive)
- Removedlocate-path@7.2.0(transitive)
- Removedlowercase-keys@2.0.0(transitive)
- Removedlru-cache@6.0.07.18.3(transitive)
- Removedmap-obj@1.0.14.3.0(transitive)
- Removedmeow@11.0.0(transitive)
- Removedmimic-response@1.0.1(transitive)
- Removedmin-indent@1.0.1(transitive)
- Removedminimist-options@4.1.0(transitive)
- Removednormalize-package-data@3.0.34.0.1(transitive)
- Removednormalize-url@6.1.0(transitive)
- Removedonce@1.4.0(transitive)
- Removedora@6.3.1(transitive)
- Removedp-cancelable@2.1.1(transitive)
- Removedp-limit@4.0.0(transitive)
- Removedp-locate@6.0.0(transitive)
- Removedparse-json@5.2.0(transitive)
- Removedpath-exists@5.0.0(transitive)
- Removedpicocolors@1.1.1(transitive)
- Removedpump@3.0.2(transitive)
- Removedquick-lru@6.1.2(transitive)
- Removedread-pkg@7.1.0(transitive)
- Removedread-pkg-up@9.1.0(transitive)
- Removedredent@4.0.0(transitive)
- Removedresponselike@2.0.1(transitive)
- Removedsemver@7.6.3(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.20(transitive)
- Removedstrip-indent@4.0.0(transitive)
- Removedtrim-newlines@4.1.1(transitive)
- Removedtype-fest@2.19.03.13.1(transitive)
- Removedundici-types@6.19.8(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)
- Removedwcwidth@1.0.1(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedyallist@4.0.0(transitive)
- Removedyargs-parser@21.1.1(transitive)
- Removedyocto-queue@1.1.1(transitive)
Updatedjunk@^4.0.1
Updatedmeow@^12.1.1
Updatedora@^7.0.1