extension 4.0.14 → 4.0.15
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/browsers.cjs
CHANGED
|
@@ -1095,17 +1095,28 @@ var __webpack_modules__ = {
|
|
|
1095
1095
|
});
|
|
1096
1096
|
},
|
|
1097
1097
|
"./browsers/browsers-lib/ready-stamp.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1098
|
-
__webpack_require__
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1098
|
+
var node_fs__rspack_import_0 = __webpack_require__("node:fs");
|
|
1099
|
+
var node_path__rspack_import_1 = __webpack_require__("node:path");
|
|
1100
|
+
function readyPathFor(extensionOutputPath) {
|
|
1101
|
+
return node_path__rspack_import_1.join(node_path__rspack_import_1.dirname(extensionOutputPath), 'extension-js', node_path__rspack_import_1.basename(extensionOutputPath), 'ready.json');
|
|
1102
|
+
}
|
|
1103
|
+
function stampReadyRdpPort(extensionOutputPath, rdpPort) {
|
|
1104
|
+
try {
|
|
1105
|
+
if (!extensionOutputPath || !Number.isFinite(rdpPort)) return;
|
|
1106
|
+
const readyPath = readyPathFor(extensionOutputPath);
|
|
1107
|
+
if (!node_fs__rspack_import_0.existsSync(readyPath)) return;
|
|
1108
|
+
const ready = JSON.parse(node_fs__rspack_import_0.readFileSync(readyPath, 'utf-8'));
|
|
1109
|
+
if (ready.rdpPort === rdpPort) return;
|
|
1110
|
+
ready.rdpPort = rdpPort;
|
|
1111
|
+
node_fs__rspack_import_0.writeFileSync(readyPath, JSON.stringify(ready, null, 2));
|
|
1112
|
+
} catch {}
|
|
1113
|
+
}
|
|
1103
1114
|
function stampReadyBrowserExited(extensionOutputPath, code) {
|
|
1104
1115
|
try {
|
|
1105
1116
|
if (!extensionOutputPath) return;
|
|
1106
|
-
const readyPath =
|
|
1107
|
-
if (!
|
|
1108
|
-
const ready = JSON.parse(
|
|
1117
|
+
const readyPath = readyPathFor(extensionOutputPath);
|
|
1118
|
+
if (!node_fs__rspack_import_0.existsSync(readyPath)) return;
|
|
1119
|
+
const ready = JSON.parse(node_fs__rspack_import_0.readFileSync(readyPath, 'utf-8'));
|
|
1109
1120
|
ready.browserExitedAt = new Date().toISOString();
|
|
1110
1121
|
ready.browserExitCode = code;
|
|
1111
1122
|
if ('preview' === ready.command || 'start' === ready.command) {
|
|
@@ -1113,9 +1124,13 @@ var __webpack_modules__ = {
|
|
|
1113
1124
|
ready.code = 'browser_exited';
|
|
1114
1125
|
ready.message = `the ${ready.browser || 'browser'} process exited (code ${code ?? 'unknown'}); nothing is running`;
|
|
1115
1126
|
}
|
|
1116
|
-
|
|
1127
|
+
node_fs__rspack_import_0.writeFileSync(readyPath, JSON.stringify(ready, null, 2));
|
|
1117
1128
|
} catch {}
|
|
1118
1129
|
}
|
|
1130
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
1131
|
+
W: ()=>stampReadyBrowserExited,
|
|
1132
|
+
_: ()=>stampReadyRdpPort
|
|
1133
|
+
});
|
|
1119
1134
|
},
|
|
1120
1135
|
"./browsers/browsers-lib/resolve-profile.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1121
1136
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -4525,6 +4540,7 @@ var __webpack_modules__ = {
|
|
|
4525
4540
|
const ctrl = await setupRdpAfterLaunch(this.host, compilation, debugPort);
|
|
4526
4541
|
this.host.rdpController = ctrl;
|
|
4527
4542
|
this.ctx.setController(ctrl);
|
|
4543
|
+
(0, ready_stamp._)(this.extensionOutputPath, debugPort);
|
|
4528
4544
|
this.scheduleWatchTimeout();
|
|
4529
4545
|
try {
|
|
4530
4546
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
|
|
@@ -4550,6 +4566,7 @@ var __webpack_modules__ = {
|
|
|
4550
4566
|
];
|
|
4551
4567
|
this.child = await this.spawnFirefoxChild(binaryPath, args, wslFallbackBinary);
|
|
4552
4568
|
this.wireChildLifecycle();
|
|
4569
|
+
if (debugPort > 0) (0, ready_stamp._)(this.extensionOutputPath, debugPort);
|
|
4553
4570
|
this.scheduleWatchTimeout();
|
|
4554
4571
|
}
|
|
4555
4572
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -1208,17 +1208,28 @@ var __webpack_modules__ = {
|
|
|
1208
1208
|
});
|
|
1209
1209
|
},
|
|
1210
1210
|
"./browsers/browsers-lib/ready-stamp.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1211
|
-
__webpack_require__
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1211
|
+
var node_fs__rspack_import_0 = __webpack_require__("node:fs");
|
|
1212
|
+
var node_path__rspack_import_1 = __webpack_require__("node:path");
|
|
1213
|
+
function readyPathFor(extensionOutputPath) {
|
|
1214
|
+
return node_path__rspack_import_1.join(node_path__rspack_import_1.dirname(extensionOutputPath), 'extension-js', node_path__rspack_import_1.basename(extensionOutputPath), 'ready.json');
|
|
1215
|
+
}
|
|
1216
|
+
function stampReadyRdpPort(extensionOutputPath, rdpPort) {
|
|
1217
|
+
try {
|
|
1218
|
+
if (!extensionOutputPath || !Number.isFinite(rdpPort)) return;
|
|
1219
|
+
const readyPath = readyPathFor(extensionOutputPath);
|
|
1220
|
+
if (!node_fs__rspack_import_0.existsSync(readyPath)) return;
|
|
1221
|
+
const ready = JSON.parse(node_fs__rspack_import_0.readFileSync(readyPath, 'utf-8'));
|
|
1222
|
+
if (ready.rdpPort === rdpPort) return;
|
|
1223
|
+
ready.rdpPort = rdpPort;
|
|
1224
|
+
node_fs__rspack_import_0.writeFileSync(readyPath, JSON.stringify(ready, null, 2));
|
|
1225
|
+
} catch {}
|
|
1226
|
+
}
|
|
1216
1227
|
function stampReadyBrowserExited(extensionOutputPath, code) {
|
|
1217
1228
|
try {
|
|
1218
1229
|
if (!extensionOutputPath) return;
|
|
1219
|
-
const readyPath =
|
|
1220
|
-
if (!
|
|
1221
|
-
const ready = JSON.parse(
|
|
1230
|
+
const readyPath = readyPathFor(extensionOutputPath);
|
|
1231
|
+
if (!node_fs__rspack_import_0.existsSync(readyPath)) return;
|
|
1232
|
+
const ready = JSON.parse(node_fs__rspack_import_0.readFileSync(readyPath, 'utf-8'));
|
|
1222
1233
|
ready.browserExitedAt = new Date().toISOString();
|
|
1223
1234
|
ready.browserExitCode = code;
|
|
1224
1235
|
if ('preview' === ready.command || 'start' === ready.command) {
|
|
@@ -1226,9 +1237,13 @@ var __webpack_modules__ = {
|
|
|
1226
1237
|
ready.code = 'browser_exited';
|
|
1227
1238
|
ready.message = `the ${ready.browser || 'browser'} process exited (code ${code ?? 'unknown'}); nothing is running`;
|
|
1228
1239
|
}
|
|
1229
|
-
|
|
1240
|
+
node_fs__rspack_import_0.writeFileSync(readyPath, JSON.stringify(ready, null, 2));
|
|
1230
1241
|
} catch {}
|
|
1231
1242
|
}
|
|
1243
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
1244
|
+
W: ()=>stampReadyBrowserExited,
|
|
1245
|
+
_: ()=>stampReadyRdpPort
|
|
1246
|
+
});
|
|
1232
1247
|
},
|
|
1233
1248
|
"./browsers/browsers-lib/resolve-profile.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
1234
1249
|
__webpack_require__.d(__webpack_exports__, {
|
|
@@ -4636,6 +4651,7 @@ var __webpack_modules__ = {
|
|
|
4636
4651
|
const ctrl = await setupRdpAfterLaunch(this.host, compilation, debugPort);
|
|
4637
4652
|
this.host.rdpController = ctrl;
|
|
4638
4653
|
this.ctx.setController(ctrl);
|
|
4654
|
+
(0, ready_stamp._)(this.extensionOutputPath, debugPort);
|
|
4639
4655
|
this.scheduleWatchTimeout();
|
|
4640
4656
|
try {
|
|
4641
4657
|
if ('true' === process.env.EXTENSION_AUTHOR_MODE) {
|
|
@@ -4661,6 +4677,7 @@ var __webpack_modules__ = {
|
|
|
4661
4677
|
];
|
|
4662
4678
|
this.child = await this.spawnFirefoxChild(binaryPath, args, wslFallbackBinary);
|
|
4663
4679
|
this.wireChildLifecycle();
|
|
4680
|
+
if (debugPort > 0) (0, ready_stamp._)(this.extensionOutputPath, debugPort);
|
|
4664
4681
|
this.scheduleWatchTimeout();
|
|
4665
4682
|
}
|
|
4666
4683
|
}
|
|
@@ -4906,6 +4923,16 @@ var __webpack_modules__ = {
|
|
|
4906
4923
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_);
|
|
4907
4924
|
var external_node_path_ = __webpack_require__("node:path");
|
|
4908
4925
|
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_);
|
|
4926
|
+
async function exitAfterDrain(code) {
|
|
4927
|
+
await Promise.all([
|
|
4928
|
+
process.stdout,
|
|
4929
|
+
process.stderr
|
|
4930
|
+
].map((stream)=>new Promise((resolve)=>{
|
|
4931
|
+
if (0 === stream.writableLength) return resolve();
|
|
4932
|
+
stream.write('', ()=>resolve());
|
|
4933
|
+
})));
|
|
4934
|
+
process.exit(code);
|
|
4935
|
+
}
|
|
4909
4936
|
var external_node_module_ = __webpack_require__("node:module");
|
|
4910
4937
|
const external_node_url_namespaceObject = require("node:url");
|
|
4911
4938
|
const extension_develop_runtime_require = (0, external_node_module_.createRequire)(__rslib_import_meta_url__);
|
|
@@ -5116,7 +5143,7 @@ var __webpack_modules__ = {
|
|
|
5116
5143
|
Object.assign(result, input.augment(projectPath, browser, result));
|
|
5117
5144
|
} catch {}
|
|
5118
5145
|
printResult(result, input.opts.output);
|
|
5119
|
-
|
|
5146
|
+
await exitAfterDrain(result.ok ? 0 : 1);
|
|
5120
5147
|
}
|
|
5121
5148
|
function targetFrom(opts, fallback = 'background') {
|
|
5122
5149
|
const context = opts.context || fallback;
|
|
@@ -6941,7 +6968,7 @@ Cross-Browser Compatibility
|
|
|
6941
6968
|
}
|
|
6942
6969
|
if ('json' === opts.output) console.log(JSON.stringify(results));
|
|
6943
6970
|
else printPretty(results, opts.browser || 'chromium');
|
|
6944
|
-
|
|
6971
|
+
await exitAfterDrain(results.some((r)=>'fail' === r.status) ? 1 : 0);
|
|
6945
6972
|
});
|
|
6946
6973
|
}
|
|
6947
6974
|
function registerInstallCommand(program) {
|
|
@@ -7197,7 +7224,7 @@ Cross-Browser Compatibility
|
|
|
7197
7224
|
}
|
|
7198
7225
|
if ('json' === opts.output) console.log(JSON.stringify(data));
|
|
7199
7226
|
else console.log(data.shareUrl || JSON.stringify(data));
|
|
7200
|
-
|
|
7227
|
+
await exitAfterDrain(0);
|
|
7201
7228
|
});
|
|
7202
7229
|
}
|
|
7203
7230
|
function registerStartCommand(program) {
|
|
@@ -7781,31 +7808,36 @@ Cross-Browser Compatibility
|
|
|
7781
7808
|
registerInstallCommand(extensionJs);
|
|
7782
7809
|
registerTelemetryCommand(extensionJs);
|
|
7783
7810
|
registerDoctorCommand(extensionJs);
|
|
7784
|
-
|
|
7811
|
+
function runAIHelp() {
|
|
7785
7812
|
const format = resolveAIHelpFormatFromArgv(process.argv).trim().toLowerCase();
|
|
7786
7813
|
if ('json' === format) {
|
|
7787
7814
|
console.log(JSON.stringify(programAIHelpJSON(String(cliPackageJson.version)), null, 2));
|
|
7788
|
-
|
|
7815
|
+
exitAfterDrain(0);
|
|
7816
|
+
return;
|
|
7789
7817
|
}
|
|
7790
7818
|
if ('pretty' !== format) {
|
|
7791
7819
|
console.error(invalidAIHelpFormat(format));
|
|
7792
|
-
|
|
7820
|
+
exitAfterDrain(1);
|
|
7821
|
+
return;
|
|
7793
7822
|
}
|
|
7794
7823
|
console.log(programAIHelp());
|
|
7795
|
-
|
|
7796
|
-
}
|
|
7824
|
+
exitAfterDrain(0);
|
|
7825
|
+
}
|
|
7797
7826
|
if (process.argv.length <= 2) {
|
|
7798
7827
|
extensionJs.outputHelp();
|
|
7799
7828
|
process.exit(0);
|
|
7800
7829
|
}
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7830
|
+
if (process.argv.includes('--ai-help')) runAIHelp();
|
|
7831
|
+
else {
|
|
7832
|
+
const argv = applyNoBrowserArgvShim(process.argv);
|
|
7833
|
+
extensionJs.parseAsync(argv).then(()=>{
|
|
7834
|
+
markCommandSuccess();
|
|
7835
|
+
}).catch((err)=>{
|
|
7836
|
+
markCommandFailure();
|
|
7837
|
+
console.error(unhandledError(err));
|
|
7838
|
+
process.exit(1);
|
|
7839
|
+
});
|
|
7840
|
+
}
|
|
7809
7841
|
},
|
|
7810
7842
|
"chrome-location2" (module) {
|
|
7811
7843
|
module.exports = require("chrome-location2");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function exitAfterDrain(code: number): Promise<void>;
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"extension": "./bin/extension.cjs"
|
|
39
39
|
},
|
|
40
40
|
"name": "extension",
|
|
41
|
-
"version": "4.0.
|
|
41
|
+
"version": "4.0.15",
|
|
42
42
|
"description": "The cross-browser extension framework. Build Chrome, Edge, Firefox, and Safari extensions with no build configuration.",
|
|
43
43
|
"homepage": "https://extension.js.org/",
|
|
44
44
|
"bugs": {
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
"vivaldi-location2": "2.1.0",
|
|
110
110
|
"waterfox-location": "2.1.0",
|
|
111
111
|
"yandex-location": "2.1.0",
|
|
112
|
-
"extension-create": "4.0.
|
|
113
|
-
"extension-develop": "4.0.
|
|
114
|
-
"extension-install": "4.0.
|
|
112
|
+
"extension-create": "4.0.15",
|
|
113
|
+
"extension-develop": "4.0.15",
|
|
114
|
+
"extension-install": "4.0.15",
|
|
115
115
|
"commander": "^15.0.0",
|
|
116
116
|
"pintor": "0.3.0",
|
|
117
117
|
"semver": "^7.7.3",
|