extension 4.1.32 → 4.1.33
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 +78 -12
- package/dist/cli.cjs +89 -15
- package/dist/extension/browsers/__spec__/safari-fake-tools.d.ts +1 -0
- package/dist/extension/browsers/run-safari/safari-launch/container-app.d.ts +3 -0
- package/dist/extension/browsers/run-safari/safari-launch/index.d.ts +2 -1
- package/dist/extension/browsers/run-safari/safari-launch/tools.d.ts +3 -0
- package/dist/extension/helpers/telemetry-cli.d.ts +1 -0
- package/dist/extension/helpers/template-catalog.d.ts +1 -1
- package/dist/extension/helpers/template-corpus.generated.d.ts +1 -1
- package/package.json +4 -4
package/dist/browsers.cjs
CHANGED
|
@@ -938,7 +938,7 @@ var __webpack_modules__ = {
|
|
|
938
938
|
return `${getLoggingPrefix('info')} WebDriver session ${pintor__rspack_import_8_default().gray(sessionId)} on port ${pintor__rspack_import_8_default().yellow(String(port))}.\nready.json carries it as ${pintor__rspack_import_8_default().gray('webdriverPort')} and ${pintor__rspack_import_8_default().gray('webdriverSessionId')}, attach to it instead of opening another.`;
|
|
939
939
|
}
|
|
940
940
|
function safariWebDriverUnavailable(reason) {
|
|
941
|
-
return `${getLoggingPrefix('info')} No WebDriver session for this run: ${reason}\nRun ${pintor__rspack_import_8_default().gray('safaridriver --enable')} once and turn on Safari ▸ Develop ▸ Allow Remote Automation so tools can read Safari pages.`;
|
|
941
|
+
return `${getLoggingPrefix('info')} No WebDriver session for this run: ${reason}\nRun ${pintor__rspack_import_8_default().gray('safaridriver --enable')} once and turn on Safari ▸ Settings ▸ Developer ▸ Allow remote automation (Safari ▸ Develop ▸ Allow Remote Automation on older Safari) so tools can read Safari pages.`;
|
|
942
942
|
}
|
|
943
943
|
function safariRebuilt(appName) {
|
|
944
944
|
return `${getLoggingPrefix('success')} Rebuilt ${pintor__rspack_import_8_default().yellow(appName)}.`;
|
|
@@ -7372,6 +7372,62 @@ var __webpack_modules__ = {
|
|
|
7372
7372
|
(0, messaging._w)(messages.Aj(xcodebuildCmd));
|
|
7373
7373
|
}
|
|
7374
7374
|
var safari_config = __webpack_require__("./browsers/run-safari/safari-launch/safari-config.ts");
|
|
7375
|
+
const RAISE_WAIT_MS = 5000;
|
|
7376
|
+
const QUIT_MS = 3000;
|
|
7377
|
+
const POLL_MS = 250;
|
|
7378
|
+
const raisedApps = new Set();
|
|
7379
|
+
let handlersInstalled = false;
|
|
7380
|
+
function sleep(ms) {
|
|
7381
|
+
return new Promise((resolve)=>setTimeout(resolve, ms));
|
|
7382
|
+
}
|
|
7383
|
+
function processAlive(pid) {
|
|
7384
|
+
try {
|
|
7385
|
+
process.kill(pid, 0);
|
|
7386
|
+
return true;
|
|
7387
|
+
} catch {
|
|
7388
|
+
return false;
|
|
7389
|
+
}
|
|
7390
|
+
}
|
|
7391
|
+
function terminate(pid) {
|
|
7392
|
+
try {
|
|
7393
|
+
process.kill(pid, 'SIGTERM');
|
|
7394
|
+
} catch {}
|
|
7395
|
+
}
|
|
7396
|
+
function quitAllOnExit() {
|
|
7397
|
+
for (const pid of raisedApps)terminate(pid);
|
|
7398
|
+
}
|
|
7399
|
+
function quitAllOnSignal() {
|
|
7400
|
+
closeSafariContainerApps();
|
|
7401
|
+
}
|
|
7402
|
+
function installHandlersOnce() {
|
|
7403
|
+
if (handlersInstalled) return;
|
|
7404
|
+
handlersInstalled = true;
|
|
7405
|
+
process.on('SIGINT', quitAllOnSignal);
|
|
7406
|
+
process.on('SIGTERM', quitAllOnSignal);
|
|
7407
|
+
process.on('SIGHUP', quitAllOnSignal);
|
|
7408
|
+
process.on('exit', quitAllOnExit);
|
|
7409
|
+
}
|
|
7410
|
+
async function rememberRaisedContainerApp(tools, appPath, before) {
|
|
7411
|
+
const deadline = Date.now() + RAISE_WAIT_MS;
|
|
7412
|
+
let raised = [];
|
|
7413
|
+
while(Date.now() < deadline){
|
|
7414
|
+
raised = (await tools.listAppPids(appPath)).filter((pid)=>!before.has(pid));
|
|
7415
|
+
if (raised.length > 0) break;
|
|
7416
|
+
await sleep(POLL_MS);
|
|
7417
|
+
}
|
|
7418
|
+
for (const pid of raised)raisedApps.add(pid);
|
|
7419
|
+
if (raised.length > 0) installHandlersOnce();
|
|
7420
|
+
return raised;
|
|
7421
|
+
}
|
|
7422
|
+
async function closeSafariContainerApps() {
|
|
7423
|
+
const pids = [
|
|
7424
|
+
...raisedApps
|
|
7425
|
+
];
|
|
7426
|
+
raisedApps.clear();
|
|
7427
|
+
for (const pid of pids)terminate(pid);
|
|
7428
|
+
const deadline = Date.now() + QUIT_MS;
|
|
7429
|
+
while(Date.now() < deadline && pids.some(processAlive))await sleep(POLL_MS);
|
|
7430
|
+
}
|
|
7375
7431
|
var external_node_child_process_ = __webpack_require__("node:child_process");
|
|
7376
7432
|
function isMacOS() {
|
|
7377
7433
|
return 'darwin' === process.platform;
|
|
@@ -7443,6 +7499,15 @@ var __webpack_modules__ = {
|
|
|
7443
7499
|
const name = exe.slice(exe.lastIndexOf('/') + 1);
|
|
7444
7500
|
return 'Safari' === name && tokens.includes('--automation');
|
|
7445
7501
|
}
|
|
7502
|
+
function isContainerAppArgs(appPath, args) {
|
|
7503
|
+
return args.trim().startsWith(`${appPath}/Contents/MacOS/`);
|
|
7504
|
+
}
|
|
7505
|
+
function openAppArgs(target) {
|
|
7506
|
+
return [
|
|
7507
|
+
'-g',
|
|
7508
|
+
target
|
|
7509
|
+
];
|
|
7510
|
+
}
|
|
7446
7511
|
function listPidsWhere(matches) {
|
|
7447
7512
|
return new Promise((resolve)=>{
|
|
7448
7513
|
const child = (0, external_node_child_process_.spawn)('ps', [
|
|
@@ -7548,9 +7613,7 @@ var __webpack_modules__ = {
|
|
|
7548
7613
|
detectToolchain: ()=>detectSafariToolchain(),
|
|
7549
7614
|
runConverter: (args)=>runTool('xcrun', args),
|
|
7550
7615
|
runXcodebuild: (args)=>runTool('xcodebuild', args),
|
|
7551
|
-
openApp: (target)=>runTool('open',
|
|
7552
|
-
target
|
|
7553
|
-
]),
|
|
7616
|
+
openApp: (target)=>runTool('open', openAppArgs(target)),
|
|
7554
7617
|
openSafari: (binary)=>runTool('open', [
|
|
7555
7618
|
'-a',
|
|
7556
7619
|
binary
|
|
@@ -7568,7 +7631,8 @@ var __webpack_modules__ = {
|
|
|
7568
7631
|
'-p',
|
|
7569
7632
|
String(port)
|
|
7570
7633
|
]),
|
|
7571
|
-
listAutomationPids: ()=>listPidsWhere(isAutomationSafariArgs)
|
|
7634
|
+
listAutomationPids: ()=>listPidsWhere(isAutomationSafariArgs),
|
|
7635
|
+
listAppPids: (appPath)=>listPidsWhere((args)=>isContainerAppArgs(appPath, args))
|
|
7572
7636
|
};
|
|
7573
7637
|
}
|
|
7574
7638
|
var external_node_http_ = __webpack_require__("node:http");
|
|
@@ -7580,7 +7644,7 @@ var __webpack_modules__ = {
|
|
|
7580
7644
|
const AUTOMATION_QUIT_MS = 3000;
|
|
7581
7645
|
const activeSessions = new Set();
|
|
7582
7646
|
const activeDrivers = new Set();
|
|
7583
|
-
let
|
|
7647
|
+
let webdriver_handlersInstalled = false;
|
|
7584
7648
|
function freePort() {
|
|
7585
7649
|
return new Promise((resolve, reject)=>{
|
|
7586
7650
|
const server = external_node_net_.createServer();
|
|
@@ -7660,9 +7724,9 @@ var __webpack_modules__ = {
|
|
|
7660
7724
|
function closeAllOnSignal() {
|
|
7661
7725
|
closeSafariWebDriverSessions();
|
|
7662
7726
|
}
|
|
7663
|
-
function
|
|
7664
|
-
if (
|
|
7665
|
-
|
|
7727
|
+
function webdriver_installHandlersOnce() {
|
|
7728
|
+
if (webdriver_handlersInstalled) return;
|
|
7729
|
+
webdriver_handlersInstalled = true;
|
|
7666
7730
|
process.on('SIGINT', closeAllOnSignal);
|
|
7667
7731
|
process.on('SIGTERM', closeAllOnSignal);
|
|
7668
7732
|
process.on('SIGHUP', closeAllOnSignal);
|
|
@@ -7673,7 +7737,7 @@ var __webpack_modules__ = {
|
|
|
7673
7737
|
...activeSessions
|
|
7674
7738
|
].map((session)=>session.close()));
|
|
7675
7739
|
}
|
|
7676
|
-
function
|
|
7740
|
+
function webdriver_processAlive(pid) {
|
|
7677
7741
|
try {
|
|
7678
7742
|
process.kill(pid, 0);
|
|
7679
7743
|
return true;
|
|
@@ -7687,7 +7751,7 @@ var __webpack_modules__ = {
|
|
|
7687
7751
|
process.kill(pid, 'SIGTERM');
|
|
7688
7752
|
} catch {}
|
|
7689
7753
|
const deadline = Date.now() + AUTOMATION_QUIT_MS;
|
|
7690
|
-
while(Date.now() < deadline && raised.some(
|
|
7754
|
+
while(Date.now() < deadline && raised.some(webdriver_processAlive))await new Promise((resolve)=>setTimeout(resolve, DRIVER_POLL_MS));
|
|
7691
7755
|
}
|
|
7692
7756
|
async function openSafariWebDriverSession(tools) {
|
|
7693
7757
|
let port;
|
|
@@ -7704,7 +7768,7 @@ var __webpack_modules__ = {
|
|
|
7704
7768
|
reason: `safaridriver could not start: ${driver.output}`
|
|
7705
7769
|
};
|
|
7706
7770
|
activeDrivers.add(driver);
|
|
7707
|
-
|
|
7771
|
+
webdriver_installHandlersOnce();
|
|
7708
7772
|
const stopDriver = async ()=>{
|
|
7709
7773
|
driver.stop();
|
|
7710
7774
|
activeDrivers.delete(driver);
|
|
@@ -7939,7 +8003,9 @@ var __webpack_modules__ = {
|
|
|
7939
8003
|
}
|
|
7940
8004
|
const target = external_node_fs_.existsSync(appPath) ? appPath : (0, safari_config.Gi)(config);
|
|
7941
8005
|
logger.info?.(messages.fw(target));
|
|
8006
|
+
const appsBefore = new Set(await tools.listAppPids(appPath));
|
|
7942
8007
|
await tools.openApp(target);
|
|
8008
|
+
if (host.announceDevReady) await rememberRaisedContainerApp(tools, appPath, appsBefore);
|
|
7943
8009
|
if (config.safariBinary) await tools.openSafari(config.safariBinary);
|
|
7944
8010
|
const raisedBundleId = config.safariBinary ? 'com.apple.Safari' : config.bundleIdentifier;
|
|
7945
8011
|
const browserPid = await tools.resolvePid(raisedBundleId);
|
package/dist/cli.cjs
CHANGED
|
@@ -939,7 +939,7 @@ var __webpack_modules__ = {
|
|
|
939
939
|
return `${getLoggingPrefix('info')} WebDriver session ${pintor__rspack_import_8_default().gray(sessionId)} on port ${pintor__rspack_import_8_default().yellow(String(port))}.\nready.json carries it as ${pintor__rspack_import_8_default().gray('webdriverPort')} and ${pintor__rspack_import_8_default().gray('webdriverSessionId')}, attach to it instead of opening another.`;
|
|
940
940
|
}
|
|
941
941
|
function safariWebDriverUnavailable(reason) {
|
|
942
|
-
return `${getLoggingPrefix('info')} No WebDriver session for this run: ${reason}\nRun ${pintor__rspack_import_8_default().gray('safaridriver --enable')} once and turn on Safari ▸ Develop ▸ Allow Remote Automation so tools can read Safari pages.`;
|
|
942
|
+
return `${getLoggingPrefix('info')} No WebDriver session for this run: ${reason}\nRun ${pintor__rspack_import_8_default().gray('safaridriver --enable')} once and turn on Safari ▸ Settings ▸ Developer ▸ Allow remote automation (Safari ▸ Develop ▸ Allow Remote Automation on older Safari) so tools can read Safari pages.`;
|
|
943
943
|
}
|
|
944
944
|
function safariRebuilt(appName) {
|
|
945
945
|
return `${getLoggingPrefix('success')} Rebuilt ${pintor__rspack_import_8_default().yellow(appName)}.`;
|
|
@@ -7380,6 +7380,62 @@ var __webpack_modules__ = {
|
|
|
7380
7380
|
(0, messaging._w)(messages.Aj(xcodebuildCmd));
|
|
7381
7381
|
}
|
|
7382
7382
|
var safari_config = __webpack_require__("./browsers/run-safari/safari-launch/safari-config.ts");
|
|
7383
|
+
const RAISE_WAIT_MS = 5000;
|
|
7384
|
+
const QUIT_MS = 3000;
|
|
7385
|
+
const POLL_MS = 250;
|
|
7386
|
+
const raisedApps = new Set();
|
|
7387
|
+
let handlersInstalled = false;
|
|
7388
|
+
function sleep(ms) {
|
|
7389
|
+
return new Promise((resolve)=>setTimeout(resolve, ms));
|
|
7390
|
+
}
|
|
7391
|
+
function processAlive(pid) {
|
|
7392
|
+
try {
|
|
7393
|
+
process.kill(pid, 0);
|
|
7394
|
+
return true;
|
|
7395
|
+
} catch {
|
|
7396
|
+
return false;
|
|
7397
|
+
}
|
|
7398
|
+
}
|
|
7399
|
+
function terminate(pid) {
|
|
7400
|
+
try {
|
|
7401
|
+
process.kill(pid, 'SIGTERM');
|
|
7402
|
+
} catch {}
|
|
7403
|
+
}
|
|
7404
|
+
function quitAllOnExit() {
|
|
7405
|
+
for (const pid of raisedApps)terminate(pid);
|
|
7406
|
+
}
|
|
7407
|
+
function quitAllOnSignal() {
|
|
7408
|
+
closeSafariContainerApps();
|
|
7409
|
+
}
|
|
7410
|
+
function installHandlersOnce() {
|
|
7411
|
+
if (handlersInstalled) return;
|
|
7412
|
+
handlersInstalled = true;
|
|
7413
|
+
process.on('SIGINT', quitAllOnSignal);
|
|
7414
|
+
process.on('SIGTERM', quitAllOnSignal);
|
|
7415
|
+
process.on('SIGHUP', quitAllOnSignal);
|
|
7416
|
+
process.on('exit', quitAllOnExit);
|
|
7417
|
+
}
|
|
7418
|
+
async function rememberRaisedContainerApp(tools, appPath, before) {
|
|
7419
|
+
const deadline = Date.now() + RAISE_WAIT_MS;
|
|
7420
|
+
let raised = [];
|
|
7421
|
+
while(Date.now() < deadline){
|
|
7422
|
+
raised = (await tools.listAppPids(appPath)).filter((pid)=>!before.has(pid));
|
|
7423
|
+
if (raised.length > 0) break;
|
|
7424
|
+
await sleep(POLL_MS);
|
|
7425
|
+
}
|
|
7426
|
+
for (const pid of raised)raisedApps.add(pid);
|
|
7427
|
+
if (raised.length > 0) installHandlersOnce();
|
|
7428
|
+
return raised;
|
|
7429
|
+
}
|
|
7430
|
+
async function closeSafariContainerApps() {
|
|
7431
|
+
const pids = [
|
|
7432
|
+
...raisedApps
|
|
7433
|
+
];
|
|
7434
|
+
raisedApps.clear();
|
|
7435
|
+
for (const pid of pids)terminate(pid);
|
|
7436
|
+
const deadline = Date.now() + QUIT_MS;
|
|
7437
|
+
while(Date.now() < deadline && pids.some(processAlive))await sleep(POLL_MS);
|
|
7438
|
+
}
|
|
7383
7439
|
var external_node_child_process_ = __webpack_require__("node:child_process");
|
|
7384
7440
|
function isMacOS() {
|
|
7385
7441
|
return 'darwin' === process.platform;
|
|
@@ -7451,6 +7507,15 @@ var __webpack_modules__ = {
|
|
|
7451
7507
|
const name = exe.slice(exe.lastIndexOf('/') + 1);
|
|
7452
7508
|
return 'Safari' === name && tokens.includes('--automation');
|
|
7453
7509
|
}
|
|
7510
|
+
function isContainerAppArgs(appPath, args) {
|
|
7511
|
+
return args.trim().startsWith(`${appPath}/Contents/MacOS/`);
|
|
7512
|
+
}
|
|
7513
|
+
function openAppArgs(target) {
|
|
7514
|
+
return [
|
|
7515
|
+
'-g',
|
|
7516
|
+
target
|
|
7517
|
+
];
|
|
7518
|
+
}
|
|
7454
7519
|
function listPidsWhere(matches) {
|
|
7455
7520
|
return new Promise((resolve)=>{
|
|
7456
7521
|
const child = (0, external_node_child_process_.spawn)('ps', [
|
|
@@ -7556,9 +7621,7 @@ var __webpack_modules__ = {
|
|
|
7556
7621
|
detectToolchain: ()=>detectSafariToolchain(),
|
|
7557
7622
|
runConverter: (args)=>runTool('xcrun', args),
|
|
7558
7623
|
runXcodebuild: (args)=>runTool('xcodebuild', args),
|
|
7559
|
-
openApp: (target)=>runTool('open',
|
|
7560
|
-
target
|
|
7561
|
-
]),
|
|
7624
|
+
openApp: (target)=>runTool('open', openAppArgs(target)),
|
|
7562
7625
|
openSafari: (binary)=>runTool('open', [
|
|
7563
7626
|
'-a',
|
|
7564
7627
|
binary
|
|
@@ -7576,7 +7639,8 @@ var __webpack_modules__ = {
|
|
|
7576
7639
|
'-p',
|
|
7577
7640
|
String(port)
|
|
7578
7641
|
]),
|
|
7579
|
-
listAutomationPids: ()=>listPidsWhere(isAutomationSafariArgs)
|
|
7642
|
+
listAutomationPids: ()=>listPidsWhere(isAutomationSafariArgs),
|
|
7643
|
+
listAppPids: (appPath)=>listPidsWhere((args)=>isContainerAppArgs(appPath, args))
|
|
7580
7644
|
};
|
|
7581
7645
|
}
|
|
7582
7646
|
var external_node_http_ = __webpack_require__("node:http");
|
|
@@ -7588,7 +7652,7 @@ var __webpack_modules__ = {
|
|
|
7588
7652
|
const AUTOMATION_QUIT_MS = 3000;
|
|
7589
7653
|
const activeSessions = new Set();
|
|
7590
7654
|
const activeDrivers = new Set();
|
|
7591
|
-
let
|
|
7655
|
+
let webdriver_handlersInstalled = false;
|
|
7592
7656
|
function freePort() {
|
|
7593
7657
|
return new Promise((resolve, reject)=>{
|
|
7594
7658
|
const server = external_node_net_.createServer();
|
|
@@ -7668,9 +7732,9 @@ var __webpack_modules__ = {
|
|
|
7668
7732
|
function closeAllOnSignal() {
|
|
7669
7733
|
closeSafariWebDriverSessions();
|
|
7670
7734
|
}
|
|
7671
|
-
function
|
|
7672
|
-
if (
|
|
7673
|
-
|
|
7735
|
+
function webdriver_installHandlersOnce() {
|
|
7736
|
+
if (webdriver_handlersInstalled) return;
|
|
7737
|
+
webdriver_handlersInstalled = true;
|
|
7674
7738
|
process.on('SIGINT', closeAllOnSignal);
|
|
7675
7739
|
process.on('SIGTERM', closeAllOnSignal);
|
|
7676
7740
|
process.on('SIGHUP', closeAllOnSignal);
|
|
@@ -7681,7 +7745,7 @@ var __webpack_modules__ = {
|
|
|
7681
7745
|
...activeSessions
|
|
7682
7746
|
].map((session)=>session.close()));
|
|
7683
7747
|
}
|
|
7684
|
-
function
|
|
7748
|
+
function webdriver_processAlive(pid) {
|
|
7685
7749
|
try {
|
|
7686
7750
|
process.kill(pid, 0);
|
|
7687
7751
|
return true;
|
|
@@ -7695,7 +7759,7 @@ var __webpack_modules__ = {
|
|
|
7695
7759
|
process.kill(pid, 'SIGTERM');
|
|
7696
7760
|
} catch {}
|
|
7697
7761
|
const deadline = Date.now() + AUTOMATION_QUIT_MS;
|
|
7698
|
-
while(Date.now() < deadline && raised.some(
|
|
7762
|
+
while(Date.now() < deadline && raised.some(webdriver_processAlive))await new Promise((resolve)=>setTimeout(resolve, DRIVER_POLL_MS));
|
|
7699
7763
|
}
|
|
7700
7764
|
async function openSafariWebDriverSession(tools) {
|
|
7701
7765
|
let port;
|
|
@@ -7712,7 +7776,7 @@ var __webpack_modules__ = {
|
|
|
7712
7776
|
reason: `safaridriver could not start: ${driver.output}`
|
|
7713
7777
|
};
|
|
7714
7778
|
activeDrivers.add(driver);
|
|
7715
|
-
|
|
7779
|
+
webdriver_installHandlersOnce();
|
|
7716
7780
|
const stopDriver = async ()=>{
|
|
7717
7781
|
driver.stop();
|
|
7718
7782
|
activeDrivers.delete(driver);
|
|
@@ -7947,7 +8011,9 @@ var __webpack_modules__ = {
|
|
|
7947
8011
|
}
|
|
7948
8012
|
const target = external_node_fs_.existsSync(appPath) ? appPath : (0, safari_config.Gi)(config);
|
|
7949
8013
|
logger.info?.(messages.fw(target));
|
|
8014
|
+
const appsBefore = new Set(await tools.listAppPids(appPath));
|
|
7950
8015
|
await tools.openApp(target);
|
|
8016
|
+
if (host.announceDevReady) await rememberRaisedContainerApp(tools, appPath, appsBefore);
|
|
7951
8017
|
if (config.safariBinary) await tools.openSafari(config.safariBinary);
|
|
7952
8018
|
const raisedBundleId = config.safariBinary ? 'com.apple.Safari' : config.bundleIdentifier;
|
|
7953
8019
|
const browserPid = await tools.resolvePid(raisedBundleId);
|
|
@@ -9632,7 +9698,7 @@ var __webpack_modules__ = {
|
|
|
9632
9698
|
return Math.min(Math.max(n, min), max);
|
|
9633
9699
|
}
|
|
9634
9700
|
const TEMPLATE_CORPUS_REPO = 'extension-js/examples';
|
|
9635
|
-
const TEMPLATE_CORPUS_REF = '
|
|
9701
|
+
const TEMPLATE_CORPUS_REF = 'd69e46b311c27d11a98d241494023101b337281f';
|
|
9636
9702
|
const TEMPLATE_CORPUS_SLUGS = [
|
|
9637
9703
|
'action',
|
|
9638
9704
|
'action-locales',
|
|
@@ -9966,6 +10032,14 @@ var __webpack_modules__ = {
|
|
|
9966
10032
|
if (listTemplates().includes(name)) return name;
|
|
9967
10033
|
if (templateAliasFor(name)) return name;
|
|
9968
10034
|
}
|
|
10035
|
+
const CREATE_SOURCES = new Set([
|
|
10036
|
+
'cli',
|
|
10037
|
+
'templates'
|
|
10038
|
+
]);
|
|
10039
|
+
function createSourceTag(value) {
|
|
10040
|
+
const tag = String(value ?? '').trim().toLowerCase();
|
|
10041
|
+
return CREATE_SOURCES.has(tag) ? tag : 'cli';
|
|
10042
|
+
}
|
|
9969
10043
|
function telemetryCommandContext(command, argv = process.argv) {
|
|
9970
10044
|
const install = (0, browser_install_outcome.w6)();
|
|
9971
10045
|
const installContext = install ? {
|
|
@@ -9982,9 +10056,9 @@ var __webpack_modules__ = {
|
|
|
9982
10056
|
'--template',
|
|
9983
10057
|
'-t'
|
|
9984
10058
|
])),
|
|
9985
|
-
source: readArgValue(argv, [
|
|
10059
|
+
source: createSourceTag(readArgValue(argv, [
|
|
9986
10060
|
'--source'
|
|
9987
|
-
])
|
|
10061
|
+
]))
|
|
9988
10062
|
};
|
|
9989
10063
|
}
|
|
9990
10064
|
const consent = resolveTelemetryConsent(process.argv);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BrowserLogger } from '../../browsers-types.js';
|
|
2
2
|
import type { SafariPluginLike } from '../safari-types.js';
|
|
3
|
-
export {
|
|
3
|
+
export { closeSafariContainerApps } from './container-app.js';
|
|
4
|
+
export { isAutomationSafariArgs, isContainerAppArgs, listPidsWhere, openAppArgs, type SafariPipelineTools, type SafariToolResult, type SafariWebDriverProcess, spawnWebDriverProcess, toolOutputTail } from './tools.js';
|
|
4
5
|
export { closeSafariWebDriverSessions } from './webdriver.js';
|
|
5
6
|
export declare function converterWarnings(output: string): string[];
|
|
6
7
|
export type SafariPipelineMode = 'full' | 'resync';
|
|
@@ -21,8 +21,11 @@ export interface SafariPipelineTools {
|
|
|
21
21
|
pluginkitList(): Promise<string>;
|
|
22
22
|
startWebDriver(port: number): Promise<SafariWebDriverProcess>;
|
|
23
23
|
listAutomationPids(): Promise<number[]>;
|
|
24
|
+
listAppPids(appPath: string): Promise<number[]>;
|
|
24
25
|
}
|
|
25
26
|
export declare function isAutomationSafariArgs(args: string): boolean;
|
|
27
|
+
export declare function isContainerAppArgs(appPath: string, args: string): boolean;
|
|
28
|
+
export declare function openAppArgs(target: string): string[];
|
|
26
29
|
export declare function listPidsWhere(matches: (args: string) => boolean): Promise<number[]>;
|
|
27
30
|
export declare function spawnWebDriverProcess(bin: string, args: string[]): Promise<SafariWebDriverProcess>;
|
|
28
31
|
export declare function createSafariTools(): SafariPipelineTools;
|
|
@@ -3,6 +3,7 @@ type KnownCommand = 'build' | 'capabilities' | 'create' | 'dev' | 'doctor' | 'ev
|
|
|
3
3
|
export declare const KNOWN_COMMANDS: ReadonlySet<KnownCommand>;
|
|
4
4
|
export declare function detectInvokedCommand(argv: string[]): KnownCommand;
|
|
5
5
|
export declare function advertisedTemplateName(value: string | undefined): string | undefined;
|
|
6
|
+
export declare function createSourceTag(value: string | undefined): string;
|
|
6
7
|
export declare function telemetryCommandContext(command: string, argv?: string[]): {
|
|
7
8
|
template?: string;
|
|
8
9
|
source?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DEFAULT_TEMPLATE = "typescript";
|
|
2
2
|
export declare const BUNDLED_TEMPLATES: readonly string[];
|
|
3
|
-
export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/
|
|
3
|
+
export declare const TEMPLATE_CATALOG_URL = "https://github.com/extension-js/examples/tree/d69e46b311c27d11a98d241494023101b337281f/examples";
|
|
4
4
|
export interface TemplateGroup {
|
|
5
5
|
title: string;
|
|
6
6
|
summary: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const TEMPLATE_CORPUS_REPO = "extension-js/examples";
|
|
2
|
-
export declare const TEMPLATE_CORPUS_REF = "
|
|
2
|
+
export declare const TEMPLATE_CORPUS_REF = "d69e46b311c27d11a98d241494023101b337281f";
|
|
3
3
|
export declare const TEMPLATE_CORPUS_SLUGS: readonly string[];
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"extension": "./bin/extension.cjs"
|
|
39
39
|
},
|
|
40
40
|
"name": "extension",
|
|
41
|
-
"version": "4.1.
|
|
41
|
+
"version": "4.1.33",
|
|
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
|
"funding": "https://github.com/sponsors/cezaraugusto",
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"chromium-location": "2.1.2",
|
|
105
105
|
"commander": "^15.0.0",
|
|
106
106
|
"edge-location": "2.3.1",
|
|
107
|
-
"extension-create": "4.1.
|
|
108
|
-
"extension-develop": "4.1.
|
|
109
|
-
"extension-install": "4.1.
|
|
107
|
+
"extension-create": "4.1.33",
|
|
108
|
+
"extension-develop": "4.1.33",
|
|
109
|
+
"extension-install": "4.1.33",
|
|
110
110
|
"firefox-location2": "3.2.0",
|
|
111
111
|
"floorp-location": "1.0.0",
|
|
112
112
|
"librewolf-location": "1.2.1",
|