extension 3.5.0-next.2 → 3.5.0-next.20
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/README.md +5 -3
- package/dist/cli.cjs +37 -31
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -137,11 +137,13 @@ npx extension@latest dev --chromium-binary "/Applications/Google Chrome.app/Cont
|
|
|
137
137
|
npx extension@latest dev --gecko-binary "/Applications/Firefox.app/Contents/MacOS/firefox"
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
## Sponsors
|
|
141
|
+
|
|
140
142
|
<div align="center">
|
|
141
143
|
<p>
|
|
142
|
-
<span style="font-size:21px
|
|
143
|
-
<a href="https://www.
|
|
144
|
-
<img src="https://
|
|
144
|
+
<span style="font-size:21px">Browser testing via</span><br>
|
|
145
|
+
<a href="https://www.testmu.ai/?utm_source=extensionjs&utm_medium=sponsor" target="_blank" rel="noopener noreferrer">
|
|
146
|
+
<img src="https://assets.testmu.ai/resources/images/testmu-ai/common/whiteTestmulogo.svg" width="250" height="45" alt="TestMu AI Logo" />
|
|
145
147
|
</a>
|
|
146
148
|
</p>
|
|
147
149
|
</div>
|
package/dist/cli.cjs
CHANGED
|
@@ -654,37 +654,6 @@ Cross-Browser Compatibility
|
|
|
654
654
|
});
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
|
-
function registerCreateCommand(program, telemetry) {
|
|
658
|
-
program.command('create').arguments('<project-name|project-path>').usage('create <project-name|project-path> [options]').description(commandDescriptions.create).option('-t, --template <template-name>', 'specify a template for the created project').action(async function(pathOrRemoteUrl, { template }) {
|
|
659
|
-
const startedAt = Date.now();
|
|
660
|
-
telemetry.track('cli_command_start', {
|
|
661
|
-
command: 'create',
|
|
662
|
-
template: template || 'default'
|
|
663
|
-
});
|
|
664
|
-
try {
|
|
665
|
-
const { extensionCreate } = await import("extension-create");
|
|
666
|
-
external_path_namespaceObject.isAbsolute(pathOrRemoteUrl) || external_path_namespaceObject.join(process.cwd(), pathOrRemoteUrl);
|
|
667
|
-
await extensionCreate(pathOrRemoteUrl, {
|
|
668
|
-
template,
|
|
669
|
-
cliVersion: getCliPackageJson().version
|
|
670
|
-
});
|
|
671
|
-
telemetry.track('cli_command_finish', {
|
|
672
|
-
command: 'create',
|
|
673
|
-
duration_ms: Date.now() - startedAt,
|
|
674
|
-
success: true,
|
|
675
|
-
exit_code: 0
|
|
676
|
-
});
|
|
677
|
-
} catch (err) {
|
|
678
|
-
telemetry.track('cli_command_finish', {
|
|
679
|
-
command: 'create',
|
|
680
|
-
duration_ms: Date.now() - startedAt,
|
|
681
|
-
success: false,
|
|
682
|
-
exit_code: 1
|
|
683
|
-
});
|
|
684
|
-
throw err;
|
|
685
|
-
}
|
|
686
|
-
});
|
|
687
|
-
}
|
|
688
657
|
const external_module_namespaceObject = require("module");
|
|
689
658
|
require("node:url");
|
|
690
659
|
function parseOptionalBoolean(value) {
|
|
@@ -720,6 +689,43 @@ Cross-Browser Compatibility
|
|
|
720
689
|
process.exit(1);
|
|
721
690
|
}
|
|
722
691
|
}
|
|
692
|
+
const create_require = (0, external_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
|
|
693
|
+
function registerCreateCommand(program, telemetry) {
|
|
694
|
+
program.command('create').arguments('<project-name|project-path>').usage('create <project-name|project-path> [options]').description(commandDescriptions.create).option('-t, --template <template-name>', 'specify a template for the created project').option('--install [boolean]', 'whether or not to install the dependencies after creating the project (enabled by default)', parseOptionalBoolean, true).action(async function(pathOrRemoteUrl, { template, install }) {
|
|
695
|
+
const startedAt = Date.now();
|
|
696
|
+
telemetry.track('cli_command_start', {
|
|
697
|
+
command: 'create',
|
|
698
|
+
template: template || 'default',
|
|
699
|
+
install: Boolean(install)
|
|
700
|
+
});
|
|
701
|
+
try {
|
|
702
|
+
if (!process.env.EXTENSION_CREATE_DEVELOP_ROOT) try {
|
|
703
|
+
const developPkg = create_require.resolve('extension-develop/package.json');
|
|
704
|
+
process.env.EXTENSION_CREATE_DEVELOP_ROOT = external_path_namespaceObject.dirname(developPkg);
|
|
705
|
+
} catch {}
|
|
706
|
+
const { extensionCreate } = await import("extension-create");
|
|
707
|
+
await extensionCreate(pathOrRemoteUrl, {
|
|
708
|
+
template,
|
|
709
|
+
install,
|
|
710
|
+
cliVersion: getCliPackageJson().version
|
|
711
|
+
});
|
|
712
|
+
telemetry.track('cli_command_finish', {
|
|
713
|
+
command: 'create',
|
|
714
|
+
duration_ms: Date.now() - startedAt,
|
|
715
|
+
success: true,
|
|
716
|
+
exit_code: 0
|
|
717
|
+
});
|
|
718
|
+
} catch (err) {
|
|
719
|
+
telemetry.track('cli_command_finish', {
|
|
720
|
+
command: 'create',
|
|
721
|
+
duration_ms: Date.now() - startedAt,
|
|
722
|
+
success: false,
|
|
723
|
+
exit_code: 1
|
|
724
|
+
});
|
|
725
|
+
throw err;
|
|
726
|
+
}
|
|
727
|
+
});
|
|
728
|
+
}
|
|
723
729
|
function normalizeSourceOption(source, startingUrl) {
|
|
724
730
|
if (!source) return;
|
|
725
731
|
const hasExplicitSourceString = 'string' == typeof source && 'true' !== String(source).trim().toLowerCase();
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"extension": "./bin/extension.cjs"
|
|
34
34
|
},
|
|
35
35
|
"name": "extension",
|
|
36
|
-
"version": "3.5.0-next.
|
|
36
|
+
"version": "3.5.0-next.20",
|
|
37
37
|
"description": "Create cross-browser extensions with no build configuration.",
|
|
38
38
|
"homepage": "https://extension.js.org/",
|
|
39
39
|
"bugs": {
|
|
@@ -88,17 +88,17 @@
|
|
|
88
88
|
],
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@types/chrome": "^0.1.33",
|
|
91
|
-
"@types/node": "^25.0
|
|
91
|
+
"@types/node": "^25.2.0",
|
|
92
92
|
"@types/webextension-polyfill": "0.12.4",
|
|
93
|
-
"extension-create": "^3.5.0-next.
|
|
94
|
-
"extension-develop": "^3.5.0-next.
|
|
95
|
-
"commander": "^14.0.
|
|
93
|
+
"extension-create": "^3.5.0-next.20",
|
|
94
|
+
"extension-develop": "^3.5.0-next.20",
|
|
95
|
+
"commander": "^14.0.3",
|
|
96
96
|
"pintor": "0.3.0",
|
|
97
97
|
"semver": "^7.7.3",
|
|
98
98
|
"update-check": "^1.5.4"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@rslib/core": "^0.19.
|
|
101
|
+
"@rslib/core": "^0.19.4",
|
|
102
102
|
"@types/react": "^19.2.8",
|
|
103
103
|
"@types/react-dom": "^19.2.3",
|
|
104
104
|
"@types/mock-fs": "^4.13.4",
|