Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chrome-webstore-upload-cli

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chrome-webstore-upload-cli - npm Package Compare versions

Comparing version 2.2.2 to 3.0.0

find-source.js

5

cli.js

@@ -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',

27

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc