extension 3.0.0-next.56 → 3.0.0-next.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +21 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ var __webpack_require__ = {};
|
|
|
23
23
|
})();
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
const external_commander_namespaceObject = require("commander");
|
|
26
|
-
var package_namespaceObject = JSON.parse('{"license":"MIT","repository":{"type":"git","url":"git+https://github.com/extension-js/extension.js.git","directory":"programs/cli"},"engines":{"node":">=18"},"exports":{".":{"types":"./dist/cli.d.ts","import":"./dist/cli.js","require":"./dist/cli.js"}},"main":"./dist/cli.js","types":"./dist/cli.d.ts","typesVersions":{"*":{"types":["./types/index.d.ts"],"types/*":["./types/*"]}},"files":["dist","types"],"bin":{"extension":"./dist/cli.js"},"name":"extension","version":"3.0.0-next.
|
|
26
|
+
var package_namespaceObject = JSON.parse('{"license":"MIT","repository":{"type":"git","url":"git+https://github.com/extension-js/extension.js.git","directory":"programs/cli"},"engines":{"node":">=18"},"exports":{".":{"types":"./dist/cli.d.ts","import":"./dist/cli.js","require":"./dist/cli.js"}},"main":"./dist/cli.js","types":"./dist/cli.d.ts","typesVersions":{"*":{"types":["./types/index.d.ts"],"types/*":["./types/*"]}},"files":["dist","types"],"bin":{"extension":"./dist/cli.js"},"name":"extension","version":"3.0.0-next.57","description":"Create cross-browser extensions with no build configuration.","homepage":"https://extension.js.org/","author":{"name":"Cezar Augusto","email":"boss@cezaraugusto.net","url":"https://cezaraugusto.com"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"scripts":{"prepublishOnly":"pnpm run compile","compile":"rslib build","watch":"rslib build --watch","test":"vitest run"},"keywords":["zero-config","build","develop","browser","extension","chrome extension","edge extension","firefox extension","safari extension","web","react","typescript","webextension","browser-extension","chrome-extension","firefox-addon","edge-extension","safari-web-extension","manifest-v3","mv3","cross-browser","content-script","background-script","devtools","create-extension","scaffold","starter-template","boilerplate","cli"],"dependencies":{"commander":"^12.1.0","extension-create":"^2.2.0","pintor":"0.3.0","semver":"^7.6.3","update-check":"^1.5.4"},"devDependencies":{"@rslib/core":"^0.6.9","@types/chrome":"^0.0.287","@types/node":"^22.10.1","@types/react":"^19.0.1","@types/react-dom":"^19.0.1","@types/webextension-polyfill":"0.12.3","@types/mock-fs":"^4.13.4","@types/semver":"^7.5.8","mock-fs":"^5.4.1","webextension-polyfill":"^0.12.0","tsconfig":"*","typescript":"5.7.2","vitest":"^3.2.4"}}');
|
|
27
27
|
const external_update_check_namespaceObject = require("update-check");
|
|
28
28
|
var external_update_check_default = /*#__PURE__*/ __webpack_require__.n(external_update_check_namespaceObject);
|
|
29
29
|
const external_pintor_namespaceObject = require("pintor");
|
|
@@ -664,7 +664,26 @@ async function requireOrDlx(moduleName, versionHint) {
|
|
|
664
664
|
}
|
|
665
665
|
if (0 !== status) throw new Error(`Failed to install ${spec}`);
|
|
666
666
|
let postInstallPkgJson;
|
|
667
|
-
if (!external_node_fs_default().existsSync(pkgJsonPath))
|
|
667
|
+
if (!external_node_fs_default().existsSync(pkgJsonPath)) try {
|
|
668
|
+
const args = [
|
|
669
|
+
'i',
|
|
670
|
+
spec,
|
|
671
|
+
'--no-fund',
|
|
672
|
+
'--no-audit',
|
|
673
|
+
'--prefer-online',
|
|
674
|
+
'--omit=dev',
|
|
675
|
+
'--omit=optional',
|
|
676
|
+
'--no-package-lock'
|
|
677
|
+
];
|
|
678
|
+
const npmStatus = (0, external_node_child_process_namespaceObject.spawnSync)(isWin ? 'npm.cmd' : 'npm', args, {
|
|
679
|
+
cwd: cacheDir,
|
|
680
|
+
stdio: 'ignore'
|
|
681
|
+
}).status || 0;
|
|
682
|
+
if (0 !== npmStatus || !external_node_fs_default().existsSync(pkgJsonPath)) throw new Error(`Failed to install ${spec}: package.json not found at ${pkgJsonPath}. If you use a custom registry or auth, ensure your npm/pnpm config is visible to the Extension.js CLI.`);
|
|
683
|
+
} catch (err) {
|
|
684
|
+
if (err instanceof Error) throw err;
|
|
685
|
+
throw new Error(`Failed to install ${spec}: package.json not found at ${pkgJsonPath}. If you use a custom registry or auth, ensure your npm/pnpm config is visible to the Extension.js CLI.`);
|
|
686
|
+
}
|
|
668
687
|
try {
|
|
669
688
|
postInstallPkgJson = JSON.parse(external_node_fs_default().readFileSync(pkgJsonPath, 'utf8'));
|
|
670
689
|
} catch {}
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"extension": "./dist/cli.js"
|
|
36
36
|
},
|
|
37
37
|
"name": "extension",
|
|
38
|
-
"version": "3.0.0-next.
|
|
38
|
+
"version": "3.0.0-next.57",
|
|
39
39
|
"description": "Create cross-browser extensions with no build configuration.",
|
|
40
40
|
"homepage": "https://extension.js.org/",
|
|
41
41
|
"author": {
|