@usepowerplant/cli 0.4.42 → 0.4.43
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/main.js +780 -648
- package/dist/menubar/Powerplant.app.zip +0 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a6503a7f-2fbf-5844-b1c2-f8d1df4d1607")}catch(e){}}();
|
|
3
3
|
import { createRequire as __cliCreateRequire } from 'node:module';
|
|
4
4
|
const require = __cliCreateRequire(import.meta.url);
|
|
5
5
|
var __create = Object.create;
|
|
@@ -7495,19 +7495,19 @@ var require_module_details_from_path = __commonJS({
|
|
|
7495
7495
|
basedir += segments[i] + sep2;
|
|
7496
7496
|
}
|
|
7497
7497
|
}
|
|
7498
|
-
var
|
|
7498
|
+
var path70 = "";
|
|
7499
7499
|
var lastSegmentIndex = segments.length - 1;
|
|
7500
7500
|
for (var i2 = index + offset; i2 <= lastSegmentIndex; i2++) {
|
|
7501
7501
|
if (i2 === lastSegmentIndex) {
|
|
7502
|
-
|
|
7502
|
+
path70 += segments[i2];
|
|
7503
7503
|
} else {
|
|
7504
|
-
|
|
7504
|
+
path70 += segments[i2] + sep2;
|
|
7505
7505
|
}
|
|
7506
7506
|
}
|
|
7507
7507
|
return {
|
|
7508
7508
|
name,
|
|
7509
7509
|
basedir,
|
|
7510
|
-
path:
|
|
7510
|
+
path: path70
|
|
7511
7511
|
};
|
|
7512
7512
|
};
|
|
7513
7513
|
}
|
|
@@ -7517,7 +7517,7 @@ var require_module_details_from_path = __commonJS({
|
|
|
7517
7517
|
var require_require_in_the_middle = __commonJS({
|
|
7518
7518
|
"../../node_modules/.pnpm/require-in-the-middle@8.0.1/node_modules/require-in-the-middle/index.js"(exports, module2) {
|
|
7519
7519
|
"use strict";
|
|
7520
|
-
var
|
|
7520
|
+
var path70 = __require("path");
|
|
7521
7521
|
var Module = __require("module");
|
|
7522
7522
|
var debug2 = require_src3()("require-in-the-middle");
|
|
7523
7523
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
@@ -7662,7 +7662,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7662
7662
|
}
|
|
7663
7663
|
moduleName = filename;
|
|
7664
7664
|
} else if (hasWhitelist === true && modules.includes(filename)) {
|
|
7665
|
-
const parsedPath =
|
|
7665
|
+
const parsedPath = path70.parse(filename);
|
|
7666
7666
|
moduleName = parsedPath.name;
|
|
7667
7667
|
basedir = parsedPath.dir;
|
|
7668
7668
|
} else {
|
|
@@ -7700,7 +7700,7 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7700
7700
|
}
|
|
7701
7701
|
if (res !== filename) {
|
|
7702
7702
|
if (internals === true) {
|
|
7703
|
-
moduleName = moduleName +
|
|
7703
|
+
moduleName = moduleName + path70.sep + path70.relative(basedir, filename);
|
|
7704
7704
|
debug2("preparing to process require of internal file: %s", moduleName);
|
|
7705
7705
|
} else {
|
|
7706
7706
|
debug2("ignoring require of non-main module file: %s", res);
|
|
@@ -7736,8 +7736,8 @@ var require_require_in_the_middle = __commonJS({
|
|
|
7736
7736
|
}
|
|
7737
7737
|
};
|
|
7738
7738
|
function resolveModuleName(stat) {
|
|
7739
|
-
const normalizedPath =
|
|
7740
|
-
return
|
|
7739
|
+
const normalizedPath = path70.sep !== "/" ? stat.path.split(path70.sep).join("/") : stat.path;
|
|
7740
|
+
return path70.posix.join(stat.name, normalizedPath).replace(normalize3, "");
|
|
7741
7741
|
}
|
|
7742
7742
|
}
|
|
7743
7743
|
});
|
|
@@ -7822,7 +7822,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
|
|
|
7822
7822
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7823
7823
|
exports.RequireInTheMiddleSingleton = void 0;
|
|
7824
7824
|
var require_in_the_middle_1 = require_require_in_the_middle();
|
|
7825
|
-
var
|
|
7825
|
+
var path70 = __require("path");
|
|
7826
7826
|
var ModuleNameTrie_1 = require_ModuleNameTrie();
|
|
7827
7827
|
var isMocha = [
|
|
7828
7828
|
"afterEach",
|
|
@@ -7886,7 +7886,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
|
|
|
7886
7886
|
};
|
|
7887
7887
|
exports.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
|
|
7888
7888
|
function normalizePathSeparators(moduleNameOrPath) {
|
|
7889
|
-
return
|
|
7889
|
+
return path70.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path70.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
|
|
7890
7890
|
}
|
|
7891
7891
|
}
|
|
7892
7892
|
});
|
|
@@ -8096,7 +8096,7 @@ var require_register = __commonJS({
|
|
|
8096
8096
|
// ../../node_modules/.pnpm/import-in-the-middle@3.5.3/node_modules/import-in-the-middle/index.js
|
|
8097
8097
|
var require_import_in_the_middle = __commonJS({
|
|
8098
8098
|
"../../node_modules/.pnpm/import-in-the-middle@3.5.3/node_modules/import-in-the-middle/index.js"(exports, module2) {
|
|
8099
|
-
var
|
|
8099
|
+
var path70 = __require("path");
|
|
8100
8100
|
var moduleDetailsFromPath = require_module_details_from_path();
|
|
8101
8101
|
var { fileURLToPath: fileURLToPath2 } = __require("url");
|
|
8102
8102
|
var { MessageChannel } = __require("worker_threads");
|
|
@@ -8110,7 +8110,7 @@ var require_import_in_the_middle = __commonJS({
|
|
|
8110
8110
|
toHook
|
|
8111
8111
|
} = require_register();
|
|
8112
8112
|
function isPackageSpecifier(specifier, baseDir) {
|
|
8113
|
-
if (process.platform === "win32" && specifier.includes("/")) baseDir = baseDir.replaceAll(
|
|
8113
|
+
if (process.platform === "win32" && specifier.includes("/")) baseDir = baseDir.replaceAll(path70.sep, "/");
|
|
8114
8114
|
if (baseDir.endsWith(specifier)) return true;
|
|
8115
8115
|
const usingTurbopack = process.env.TURBOPACK ?? process.argv.includes("--turbo");
|
|
8116
8116
|
if (!usingTurbopack) return false;
|
|
@@ -8217,7 +8217,7 @@ var require_import_in_the_middle = __commonJS({
|
|
|
8217
8217
|
} else if (isPackageSpecifier(specifiers.get(loadUrl), baseDir)) {
|
|
8218
8218
|
callHookFn(hookFn, namespace, name, baseDir);
|
|
8219
8219
|
} else if (internals) {
|
|
8220
|
-
const internalPath = name +
|
|
8220
|
+
const internalPath = name + path70.sep + path70.relative(baseDir, filePath);
|
|
8221
8221
|
callHookFn(hookFn, namespace, internalPath, baseDir);
|
|
8222
8222
|
}
|
|
8223
8223
|
} else if (matchArg === specifier) {
|
|
@@ -8292,7 +8292,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
8292
8292
|
"use strict";
|
|
8293
8293
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8294
8294
|
exports.InstrumentationBase = void 0;
|
|
8295
|
-
var
|
|
8295
|
+
var path70 = __require("path");
|
|
8296
8296
|
var util_1 = __require("util");
|
|
8297
8297
|
var semver_1 = require_semver();
|
|
8298
8298
|
var shimmer_1 = require_shimmer();
|
|
@@ -8393,7 +8393,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
8393
8393
|
}
|
|
8394
8394
|
_extractPackageVersion(baseDir) {
|
|
8395
8395
|
try {
|
|
8396
|
-
const json2 = (0, fs_1.readFileSync)(
|
|
8396
|
+
const json2 = (0, fs_1.readFileSync)(path70.join(baseDir, "package.json"), {
|
|
8397
8397
|
encoding: "utf8"
|
|
8398
8398
|
});
|
|
8399
8399
|
const version2 = JSON.parse(json2).version;
|
|
@@ -8435,7 +8435,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
8435
8435
|
return exports2;
|
|
8436
8436
|
}
|
|
8437
8437
|
const files = module3.files ?? [];
|
|
8438
|
-
const normalizedName =
|
|
8438
|
+
const normalizedName = path70.normalize(name);
|
|
8439
8439
|
const supportedFileInstrumentations = files.filter((f) => f.name === normalizedName && isSupported(f.supportedVersions, version2, module3.includePrerelease));
|
|
8440
8440
|
return supportedFileInstrumentations.reduce((patchedExports, file2) => {
|
|
8441
8441
|
file2.moduleExports = patchedExports;
|
|
@@ -8481,8 +8481,8 @@ var require_instrumentation2 = __commonJS({
|
|
|
8481
8481
|
this._warnOnPreloadedModules();
|
|
8482
8482
|
for (const module3 of this._modules) {
|
|
8483
8483
|
const hookFn = (exports2, name, baseDir) => {
|
|
8484
|
-
if (!baseDir &&
|
|
8485
|
-
const parsedPath =
|
|
8484
|
+
if (!baseDir && path70.isAbsolute(name)) {
|
|
8485
|
+
const parsedPath = path70.parse(name);
|
|
8486
8486
|
name = parsedPath.name;
|
|
8487
8487
|
baseDir = parsedPath.dir;
|
|
8488
8488
|
}
|
|
@@ -8491,7 +8491,7 @@ var require_instrumentation2 = __commonJS({
|
|
|
8491
8491
|
const onRequire = (exports2, name, baseDir) => {
|
|
8492
8492
|
return this._onRequire(module3, exports2, name, baseDir);
|
|
8493
8493
|
};
|
|
8494
|
-
const hook =
|
|
8494
|
+
const hook = path70.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
|
|
8495
8495
|
this._hooks.push(hook);
|
|
8496
8496
|
const esmHook = new import_in_the_middle_1.Hook([module3.name], { internals: true }, hookFn);
|
|
8497
8497
|
this._hooks.push(esmHook);
|
|
@@ -9196,9 +9196,9 @@ var require_getMachineId_linux = __commonJS({
|
|
|
9196
9196
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
9197
9197
|
async function getMachineId() {
|
|
9198
9198
|
const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
|
|
9199
|
-
for (const
|
|
9199
|
+
for (const path70 of paths) {
|
|
9200
9200
|
try {
|
|
9201
|
-
const result = await fs_1.promises.readFile(
|
|
9201
|
+
const result = await fs_1.promises.readFile(path70, { encoding: "utf8" });
|
|
9202
9202
|
return result.trim();
|
|
9203
9203
|
} catch (e) {
|
|
9204
9204
|
api_1.diag.debug(`error reading machine id: ${e}`);
|
|
@@ -12563,14 +12563,14 @@ var require_util = __commonJS({
|
|
|
12563
12563
|
}
|
|
12564
12564
|
const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80;
|
|
12565
12565
|
let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`;
|
|
12566
|
-
let
|
|
12566
|
+
let path70 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`;
|
|
12567
12567
|
if (origin[origin.length - 1] === "/") {
|
|
12568
12568
|
origin = origin.slice(0, origin.length - 1);
|
|
12569
12569
|
}
|
|
12570
|
-
if (
|
|
12571
|
-
|
|
12570
|
+
if (path70 && path70[0] !== "/") {
|
|
12571
|
+
path70 = `/${path70}`;
|
|
12572
12572
|
}
|
|
12573
|
-
return new URL(`${origin}${
|
|
12573
|
+
return new URL(`${origin}${path70}`);
|
|
12574
12574
|
}
|
|
12575
12575
|
if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) {
|
|
12576
12576
|
throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`.");
|
|
@@ -13391,9 +13391,9 @@ var require_diagnostics = __commonJS({
|
|
|
13391
13391
|
"undici:client:sendHeaders",
|
|
13392
13392
|
(evt) => {
|
|
13393
13393
|
const {
|
|
13394
|
-
request: { method, path:
|
|
13394
|
+
request: { method, path: path70, origin }
|
|
13395
13395
|
} = evt;
|
|
13396
|
-
debugLog3("sending request to %s %s%s", method, origin,
|
|
13396
|
+
debugLog3("sending request to %s %s%s", method, origin, path70);
|
|
13397
13397
|
}
|
|
13398
13398
|
);
|
|
13399
13399
|
}
|
|
@@ -13411,14 +13411,14 @@ var require_diagnostics = __commonJS({
|
|
|
13411
13411
|
"undici:request:headers",
|
|
13412
13412
|
(evt) => {
|
|
13413
13413
|
const {
|
|
13414
|
-
request: { method, path:
|
|
13414
|
+
request: { method, path: path70, origin },
|
|
13415
13415
|
response: { statusCode }
|
|
13416
13416
|
} = evt;
|
|
13417
13417
|
debugLog3(
|
|
13418
13418
|
"received response to %s %s%s - HTTP %d",
|
|
13419
13419
|
method,
|
|
13420
13420
|
origin,
|
|
13421
|
-
|
|
13421
|
+
path70,
|
|
13422
13422
|
statusCode
|
|
13423
13423
|
);
|
|
13424
13424
|
}
|
|
@@ -13427,23 +13427,23 @@ var require_diagnostics = __commonJS({
|
|
|
13427
13427
|
"undici:request:trailers",
|
|
13428
13428
|
(evt) => {
|
|
13429
13429
|
const {
|
|
13430
|
-
request: { method, path:
|
|
13430
|
+
request: { method, path: path70, origin }
|
|
13431
13431
|
} = evt;
|
|
13432
|
-
debugLog3("trailers received from %s %s%s", method, origin,
|
|
13432
|
+
debugLog3("trailers received from %s %s%s", method, origin, path70);
|
|
13433
13433
|
}
|
|
13434
13434
|
);
|
|
13435
13435
|
diagnosticsChannel9.subscribe(
|
|
13436
13436
|
"undici:request:error",
|
|
13437
13437
|
(evt) => {
|
|
13438
13438
|
const {
|
|
13439
|
-
request: { method, path:
|
|
13439
|
+
request: { method, path: path70, origin },
|
|
13440
13440
|
error: error63
|
|
13441
13441
|
} = evt;
|
|
13442
13442
|
debugLog3(
|
|
13443
13443
|
"request to %s %s%s errored - %s",
|
|
13444
13444
|
method,
|
|
13445
13445
|
origin,
|
|
13446
|
-
|
|
13446
|
+
path70,
|
|
13447
13447
|
error63.message
|
|
13448
13448
|
);
|
|
13449
13449
|
}
|
|
@@ -13558,7 +13558,7 @@ var require_request = __commonJS({
|
|
|
13558
13558
|
var kHandler = /* @__PURE__ */ Symbol("handler");
|
|
13559
13559
|
var Request2 = class {
|
|
13560
13560
|
constructor(origin, {
|
|
13561
|
-
path:
|
|
13561
|
+
path: path70,
|
|
13562
13562
|
method,
|
|
13563
13563
|
body,
|
|
13564
13564
|
headers,
|
|
@@ -13575,11 +13575,11 @@ var require_request = __commonJS({
|
|
|
13575
13575
|
maxRedirections,
|
|
13576
13576
|
typeOfService
|
|
13577
13577
|
}, handler) {
|
|
13578
|
-
if (typeof
|
|
13578
|
+
if (typeof path70 !== "string") {
|
|
13579
13579
|
throw new InvalidArgumentError("path must be a string");
|
|
13580
|
-
} else if (
|
|
13580
|
+
} else if (path70[0] !== "/" && !(path70.startsWith("http://") || path70.startsWith("https://")) && method !== "CONNECT") {
|
|
13581
13581
|
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
|
|
13582
|
-
} else if (invalidPathRegex.test(
|
|
13582
|
+
} else if (invalidPathRegex.test(path70)) {
|
|
13583
13583
|
throw new InvalidArgumentError("invalid request path");
|
|
13584
13584
|
}
|
|
13585
13585
|
if (typeof method !== "string") {
|
|
@@ -13654,7 +13654,7 @@ var require_request = __commonJS({
|
|
|
13654
13654
|
this.completed = false;
|
|
13655
13655
|
this.aborted = false;
|
|
13656
13656
|
this.upgrade = upgrade || null;
|
|
13657
|
-
this.path = query ? serializePathWithQuery(
|
|
13657
|
+
this.path = query ? serializePathWithQuery(path70, query) : path70;
|
|
13658
13658
|
this.origin = origin;
|
|
13659
13659
|
this.protocol = getProtocolFromUrlString(origin);
|
|
13660
13660
|
this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent;
|
|
@@ -18879,7 +18879,7 @@ var require_client_h1 = __commonJS({
|
|
|
18879
18879
|
return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT";
|
|
18880
18880
|
}
|
|
18881
18881
|
function writeH1(client, request2) {
|
|
18882
|
-
const { method, path:
|
|
18882
|
+
const { method, path: path70, host, upgrade, blocking, reset } = request2;
|
|
18883
18883
|
let { body, headers, contentLength } = request2;
|
|
18884
18884
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH";
|
|
18885
18885
|
if (util2.isFormDataLike(body)) {
|
|
@@ -18957,7 +18957,7 @@ var require_client_h1 = __commonJS({
|
|
|
18957
18957
|
if (socket.setTypeOfService) {
|
|
18958
18958
|
socket.setTypeOfService(request2.typeOfService);
|
|
18959
18959
|
}
|
|
18960
|
-
let header = `${method} ${
|
|
18960
|
+
let header = `${method} ${path70} HTTP/1.1\r
|
|
18961
18961
|
`;
|
|
18962
18962
|
if (typeof host === "string") {
|
|
18963
18963
|
header += `host: ${host}\r
|
|
@@ -19634,7 +19634,7 @@ var require_client_h2 = __commonJS({
|
|
|
19634
19634
|
const headersTimeout = request2.headersTimeout ?? client[kHeadersTimeout];
|
|
19635
19635
|
const bodyTimeout = request2.bodyTimeout ?? client[kBodyTimeout];
|
|
19636
19636
|
const session = client[kHTTP2Session];
|
|
19637
|
-
const { method, path:
|
|
19637
|
+
const { method, path: path70, host, upgrade, expectContinue, signal: signal2, protocol, headers: reqHeaders } = request2;
|
|
19638
19638
|
let { body } = request2;
|
|
19639
19639
|
if (upgrade != null && upgrade !== "websocket") {
|
|
19640
19640
|
util2.errorRequest(client, request2, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`));
|
|
@@ -19703,7 +19703,7 @@ var require_client_h2 = __commonJS({
|
|
|
19703
19703
|
}
|
|
19704
19704
|
headers[HTTP2_HEADER_METHOD] = "CONNECT";
|
|
19705
19705
|
headers[HTTP2_HEADER_PROTOCOL] = "websocket";
|
|
19706
|
-
headers[HTTP2_HEADER_PATH] =
|
|
19706
|
+
headers[HTTP2_HEADER_PATH] = path70;
|
|
19707
19707
|
if (protocol === "ws:" || protocol === "wss:") {
|
|
19708
19708
|
headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https";
|
|
19709
19709
|
} else {
|
|
@@ -19755,7 +19755,7 @@ var require_client_h2 = __commonJS({
|
|
|
19755
19755
|
stream.setTimeout(headersTimeout);
|
|
19756
19756
|
return true;
|
|
19757
19757
|
}
|
|
19758
|
-
headers[HTTP2_HEADER_PATH] =
|
|
19758
|
+
headers[HTTP2_HEADER_PATH] = path70;
|
|
19759
19759
|
headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https";
|
|
19760
19760
|
const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH";
|
|
19761
19761
|
if (body && typeof body.read === "function") {
|
|
@@ -22111,10 +22111,10 @@ var require_proxy_agent = __commonJS({
|
|
|
22111
22111
|
};
|
|
22112
22112
|
const {
|
|
22113
22113
|
origin,
|
|
22114
|
-
path:
|
|
22114
|
+
path: path70 = "/",
|
|
22115
22115
|
headers = {}
|
|
22116
22116
|
} = opts;
|
|
22117
|
-
opts.path = origin +
|
|
22117
|
+
opts.path = origin + path70;
|
|
22118
22118
|
if (!("host" in headers) && !("Host" in headers)) {
|
|
22119
22119
|
const { host } = new URL(origin);
|
|
22120
22120
|
headers.host = host;
|
|
@@ -24274,20 +24274,20 @@ var require_mock_utils = __commonJS({
|
|
|
24274
24274
|
}
|
|
24275
24275
|
return normalizedQp;
|
|
24276
24276
|
}
|
|
24277
|
-
function safeUrl(
|
|
24278
|
-
if (typeof
|
|
24279
|
-
return
|
|
24277
|
+
function safeUrl(path70) {
|
|
24278
|
+
if (typeof path70 !== "string") {
|
|
24279
|
+
return path70;
|
|
24280
24280
|
}
|
|
24281
|
-
const pathSegments =
|
|
24281
|
+
const pathSegments = path70.split("?", 3);
|
|
24282
24282
|
if (pathSegments.length !== 2) {
|
|
24283
|
-
return
|
|
24283
|
+
return path70;
|
|
24284
24284
|
}
|
|
24285
24285
|
const qp = new URLSearchParams(pathSegments.pop());
|
|
24286
24286
|
qp.sort();
|
|
24287
24287
|
return [...pathSegments, qp.toString()].join("?");
|
|
24288
24288
|
}
|
|
24289
|
-
function matchKey(mockDispatch2, { path:
|
|
24290
|
-
const pathMatch = matchValue(mockDispatch2.path,
|
|
24289
|
+
function matchKey(mockDispatch2, { path: path70, method, body, headers }) {
|
|
24290
|
+
const pathMatch = matchValue(mockDispatch2.path, path70);
|
|
24291
24291
|
const methodMatch = matchValue(mockDispatch2.method, method);
|
|
24292
24292
|
const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true;
|
|
24293
24293
|
const headersMatch = matchHeaders(mockDispatch2, headers);
|
|
@@ -24312,8 +24312,8 @@ var require_mock_utils = __commonJS({
|
|
|
24312
24312
|
const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path;
|
|
24313
24313
|
const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath;
|
|
24314
24314
|
const resolvedPathWithoutTrailingSlash = removeTrailingSlash2(resolvedPath);
|
|
24315
|
-
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path:
|
|
24316
|
-
return ignoreTrailingSlash ? matchValue(removeTrailingSlash2(safeUrl(
|
|
24315
|
+
let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path70, ignoreTrailingSlash }) => {
|
|
24316
|
+
return ignoreTrailingSlash ? matchValue(removeTrailingSlash2(safeUrl(path70)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path70), resolvedPath);
|
|
24317
24317
|
});
|
|
24318
24318
|
if (matchedMockDispatches.length === 0) {
|
|
24319
24319
|
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`);
|
|
@@ -24352,19 +24352,19 @@ var require_mock_utils = __commonJS({
|
|
|
24352
24352
|
mockDispatches.splice(index, 1);
|
|
24353
24353
|
}
|
|
24354
24354
|
}
|
|
24355
|
-
function removeTrailingSlash2(
|
|
24356
|
-
while (
|
|
24357
|
-
|
|
24355
|
+
function removeTrailingSlash2(path70) {
|
|
24356
|
+
while (path70.endsWith("/")) {
|
|
24357
|
+
path70 = path70.slice(0, -1);
|
|
24358
24358
|
}
|
|
24359
|
-
if (
|
|
24360
|
-
|
|
24359
|
+
if (path70.length === 0) {
|
|
24360
|
+
path70 = "/";
|
|
24361
24361
|
}
|
|
24362
|
-
return
|
|
24362
|
+
return path70;
|
|
24363
24363
|
}
|
|
24364
24364
|
function buildKey(opts) {
|
|
24365
|
-
const { path:
|
|
24365
|
+
const { path: path70, method, body, headers, query } = opts;
|
|
24366
24366
|
return {
|
|
24367
|
-
path:
|
|
24367
|
+
path: path70,
|
|
24368
24368
|
method,
|
|
24369
24369
|
body,
|
|
24370
24370
|
headers,
|
|
@@ -25054,10 +25054,10 @@ var require_pending_interceptors_formatter = __commonJS({
|
|
|
25054
25054
|
}
|
|
25055
25055
|
format(pendingInterceptors) {
|
|
25056
25056
|
const withPrettyHeaders = pendingInterceptors.map(
|
|
25057
|
-
({ method, path:
|
|
25057
|
+
({ method, path: path70, data: { statusCode }, persist, times, timesInvoked, origin }) => ({
|
|
25058
25058
|
Method: method,
|
|
25059
25059
|
Origin: origin,
|
|
25060
|
-
Path:
|
|
25060
|
+
Path: path70,
|
|
25061
25061
|
"Status code": statusCode,
|
|
25062
25062
|
Persistent: persist ? PERSISTENT : NOT_PERSISTENT,
|
|
25063
25063
|
Invocations: timesInvoked,
|
|
@@ -25139,9 +25139,9 @@ var require_mock_agent = __commonJS({
|
|
|
25139
25139
|
const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters];
|
|
25140
25140
|
const dispatchOpts = { ...opts };
|
|
25141
25141
|
if (acceptNonStandardSearchParameters && dispatchOpts.path) {
|
|
25142
|
-
const [
|
|
25142
|
+
const [path70, searchParams] = dispatchOpts.path.split("?");
|
|
25143
25143
|
const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters);
|
|
25144
|
-
dispatchOpts.path = `${
|
|
25144
|
+
dispatchOpts.path = `${path70}?${normalizedSearchParams}`;
|
|
25145
25145
|
}
|
|
25146
25146
|
return this[kAgent].dispatch(dispatchOpts, handler);
|
|
25147
25147
|
}
|
|
@@ -25542,12 +25542,12 @@ var require_snapshot_recorder = __commonJS({
|
|
|
25542
25542
|
* @return {Promise<void>} - Resolves when snapshots are loaded
|
|
25543
25543
|
*/
|
|
25544
25544
|
async loadSnapshots(filePath) {
|
|
25545
|
-
const
|
|
25546
|
-
if (!
|
|
25545
|
+
const path70 = filePath || this.#snapshotPath;
|
|
25546
|
+
if (!path70) {
|
|
25547
25547
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
25548
25548
|
}
|
|
25549
25549
|
try {
|
|
25550
|
-
const data = await readFile3(resolve2(
|
|
25550
|
+
const data = await readFile3(resolve2(path70), "utf8");
|
|
25551
25551
|
const parsed = JSON.parse(data);
|
|
25552
25552
|
if (Array.isArray(parsed)) {
|
|
25553
25553
|
this.#snapshots.clear();
|
|
@@ -25561,7 +25561,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
25561
25561
|
if (error63.code === "ENOENT") {
|
|
25562
25562
|
this.#snapshots.clear();
|
|
25563
25563
|
} else {
|
|
25564
|
-
throw new UndiciError(`Failed to load snapshots from ${
|
|
25564
|
+
throw new UndiciError(`Failed to load snapshots from ${path70}`, { cause: error63 });
|
|
25565
25565
|
}
|
|
25566
25566
|
}
|
|
25567
25567
|
}
|
|
@@ -25572,11 +25572,11 @@ var require_snapshot_recorder = __commonJS({
|
|
|
25572
25572
|
* @returns {Promise<void>} - Resolves when snapshots are saved
|
|
25573
25573
|
*/
|
|
25574
25574
|
async saveSnapshots(filePath) {
|
|
25575
|
-
const
|
|
25576
|
-
if (!
|
|
25575
|
+
const path70 = filePath || this.#snapshotPath;
|
|
25576
|
+
if (!path70) {
|
|
25577
25577
|
throw new InvalidArgumentError("Snapshot path is required");
|
|
25578
25578
|
}
|
|
25579
|
-
const resolvedPath = resolve2(
|
|
25579
|
+
const resolvedPath = resolve2(path70);
|
|
25580
25580
|
await mkdir(dirname2(resolvedPath), { recursive: true });
|
|
25581
25581
|
const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot]) => ({
|
|
25582
25582
|
hash: hash2,
|
|
@@ -26213,15 +26213,15 @@ var require_redirect_handler = __commonJS({
|
|
|
26213
26213
|
}
|
|
26214
26214
|
this.history[kRedirectCacheControl].push(headers["cache-control"]);
|
|
26215
26215
|
const { origin, pathname, search } = util2.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin)));
|
|
26216
|
-
const
|
|
26217
|
-
const redirectUrlString = `${origin}${
|
|
26216
|
+
const path70 = search ? `${pathname}${search}` : pathname;
|
|
26217
|
+
const redirectUrlString = `${origin}${path70}`;
|
|
26218
26218
|
for (const historyUrl of this.history) {
|
|
26219
26219
|
if (historyUrl.toString() === redirectUrlString) {
|
|
26220
26220
|
throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);
|
|
26221
26221
|
}
|
|
26222
26222
|
}
|
|
26223
26223
|
this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin);
|
|
26224
|
-
this.opts.path =
|
|
26224
|
+
this.opts.path = path70;
|
|
26225
26225
|
this.opts.origin = origin;
|
|
26226
26226
|
this.opts.query = null;
|
|
26227
26227
|
}
|
|
@@ -27989,10 +27989,10 @@ var require_cache_handler = __commonJS({
|
|
|
27989
27989
|
}
|
|
27990
27990
|
return locationUrl.pathname + locationUrl.search;
|
|
27991
27991
|
}
|
|
27992
|
-
function deleteCachedUri(store, cacheKey,
|
|
27992
|
+
function deleteCachedUri(store, cacheKey, path70) {
|
|
27993
27993
|
deleteCachedValue(store, {
|
|
27994
27994
|
...cacheKey,
|
|
27995
|
-
path:
|
|
27995
|
+
path: path70
|
|
27996
27996
|
});
|
|
27997
27997
|
for (let i = 0; i < util2.safeHTTPMethods.length; i++) {
|
|
27998
27998
|
const method = util2.safeHTTPMethods[i];
|
|
@@ -28000,7 +28000,7 @@ var require_cache_handler = __commonJS({
|
|
|
28000
28000
|
deleteCachedValue(store, {
|
|
28001
28001
|
...cacheKey,
|
|
28002
28002
|
method,
|
|
28003
|
-
path:
|
|
28003
|
+
path: path70
|
|
28004
28004
|
});
|
|
28005
28005
|
}
|
|
28006
28006
|
}
|
|
@@ -28011,9 +28011,9 @@ var require_cache_handler = __commonJS({
|
|
|
28011
28011
|
}
|
|
28012
28012
|
const values = Array.isArray(headerValue) ? headerValue : [headerValue];
|
|
28013
28013
|
for (let i = 0; i < values.length; i++) {
|
|
28014
|
-
const
|
|
28015
|
-
if (
|
|
28016
|
-
deleteCachedUri(store, cacheKey,
|
|
28014
|
+
const path70 = getSameOriginPath(cacheKey, values[i]);
|
|
28015
|
+
if (path70 !== void 0) {
|
|
28016
|
+
deleteCachedUri(store, cacheKey, path70);
|
|
28017
28017
|
}
|
|
28018
28018
|
}
|
|
28019
28019
|
}
|
|
@@ -33224,11 +33224,11 @@ var require_fetch = __commonJS({
|
|
|
33224
33224
|
function dispatch({ body }) {
|
|
33225
33225
|
const url2 = requestCurrentURL(request2);
|
|
33226
33226
|
const agent = fetchParams.controller.dispatcher;
|
|
33227
|
-
const
|
|
33227
|
+
const path70 = url2.pathname + url2.search;
|
|
33228
33228
|
const hasTrailingQuestionMark = url2.search.length === 0 && url2.href[url2.href.length - url2.hash.length - 1] === "?";
|
|
33229
33229
|
return new Promise((resolve2, reject) => agent.dispatch(
|
|
33230
33230
|
{
|
|
33231
|
-
path: hasTrailingQuestionMark ? `${
|
|
33231
|
+
path: hasTrailingQuestionMark ? `${path70}?` : path70,
|
|
33232
33232
|
origin: url2.origin,
|
|
33233
33233
|
method: request2.method,
|
|
33234
33234
|
body: agent.isMockActive ? request2.body && (request2.body.source || request2.body.stream) : body,
|
|
@@ -34175,9 +34175,9 @@ var require_util4 = __commonJS({
|
|
|
34175
34175
|
}
|
|
34176
34176
|
}
|
|
34177
34177
|
}
|
|
34178
|
-
function validateCookiePath(
|
|
34179
|
-
for (let i = 0; i <
|
|
34180
|
-
const code =
|
|
34178
|
+
function validateCookiePath(path70) {
|
|
34179
|
+
for (let i = 0; i < path70.length; ++i) {
|
|
34180
|
+
const code = path70.charCodeAt(i);
|
|
34181
34181
|
if (code < 32 || // exclude CTLs (0-31)
|
|
34182
34182
|
code > 126 || // exclude DEL and non-ascii
|
|
34183
34183
|
code === 59) {
|
|
@@ -37613,11 +37613,11 @@ var require_undici = __commonJS({
|
|
|
37613
37613
|
if (typeof opts.path !== "string") {
|
|
37614
37614
|
throw new InvalidArgumentError("invalid opts.path");
|
|
37615
37615
|
}
|
|
37616
|
-
let
|
|
37616
|
+
let path70 = opts.path;
|
|
37617
37617
|
if (!opts.path.startsWith("/")) {
|
|
37618
|
-
|
|
37618
|
+
path70 = `/${path70}`;
|
|
37619
37619
|
}
|
|
37620
|
-
url2 = new URL(util2.parseOrigin(url2).origin +
|
|
37620
|
+
url2 = new URL(util2.parseOrigin(url2).origin + path70);
|
|
37621
37621
|
} else {
|
|
37622
37622
|
if (!opts) {
|
|
37623
37623
|
opts = typeof url2 === "object" ? url2 : {};
|
|
@@ -38585,10 +38585,10 @@ function mergeDefs(...defs) {
|
|
|
38585
38585
|
function cloneDef(schema) {
|
|
38586
38586
|
return mergeDefs(schema._zod.def);
|
|
38587
38587
|
}
|
|
38588
|
-
function getElementAtPath(obj,
|
|
38589
|
-
if (!
|
|
38588
|
+
function getElementAtPath(obj, path70) {
|
|
38589
|
+
if (!path70)
|
|
38590
38590
|
return obj;
|
|
38591
|
-
return
|
|
38591
|
+
return path70.reduce((acc, key) => acc?.[key], obj);
|
|
38592
38592
|
}
|
|
38593
38593
|
function promiseAllObject(promisesObj) {
|
|
38594
38594
|
const keys = Object.keys(promisesObj);
|
|
@@ -38928,11 +38928,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
38928
38928
|
}
|
|
38929
38929
|
return false;
|
|
38930
38930
|
}
|
|
38931
|
-
function prefixIssues(
|
|
38931
|
+
function prefixIssues(path70, issues) {
|
|
38932
38932
|
return issues.map((iss) => {
|
|
38933
38933
|
var _a4;
|
|
38934
38934
|
(_a4 = iss).path ?? (_a4.path = []);
|
|
38935
|
-
iss.path.unshift(
|
|
38935
|
+
iss.path.unshift(path70);
|
|
38936
38936
|
return iss;
|
|
38937
38937
|
});
|
|
38938
38938
|
}
|
|
@@ -39394,16 +39394,16 @@ function flattenError(error63, mapper = (issue2) => issue2.message) {
|
|
|
39394
39394
|
}
|
|
39395
39395
|
function formatError(error63, mapper = (issue2) => issue2.message) {
|
|
39396
39396
|
const fieldErrors = { _errors: [] };
|
|
39397
|
-
const processError = (error64,
|
|
39397
|
+
const processError = (error64, path70 = []) => {
|
|
39398
39398
|
for (const issue2 of error64.issues) {
|
|
39399
39399
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
39400
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
39400
|
+
issue2.errors.map((issues) => processError({ issues }, [...path70, ...issue2.path]));
|
|
39401
39401
|
} else if (issue2.code === "invalid_key") {
|
|
39402
|
-
processError({ issues: issue2.issues }, [...
|
|
39402
|
+
processError({ issues: issue2.issues }, [...path70, ...issue2.path]);
|
|
39403
39403
|
} else if (issue2.code === "invalid_element") {
|
|
39404
|
-
processError({ issues: issue2.issues }, [...
|
|
39404
|
+
processError({ issues: issue2.issues }, [...path70, ...issue2.path]);
|
|
39405
39405
|
} else {
|
|
39406
|
-
const fullpath = [...
|
|
39406
|
+
const fullpath = [...path70, ...issue2.path];
|
|
39407
39407
|
if (fullpath.length === 0) {
|
|
39408
39408
|
fieldErrors._errors.push(mapper(issue2));
|
|
39409
39409
|
} else {
|
|
@@ -39442,17 +39442,17 @@ function formatError(error63, mapper = (issue2) => issue2.message) {
|
|
|
39442
39442
|
}
|
|
39443
39443
|
function treeifyError(error63, mapper = (issue2) => issue2.message) {
|
|
39444
39444
|
const result = { errors: [] };
|
|
39445
|
-
const processError = (error64,
|
|
39445
|
+
const processError = (error64, path70 = []) => {
|
|
39446
39446
|
var _a4;
|
|
39447
39447
|
for (const issue2 of error64.issues) {
|
|
39448
39448
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
39449
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
39449
|
+
issue2.errors.map((issues) => processError({ issues }, [...path70, ...issue2.path]));
|
|
39450
39450
|
} else if (issue2.code === "invalid_key") {
|
|
39451
|
-
processError({ issues: issue2.issues }, [...
|
|
39451
|
+
processError({ issues: issue2.issues }, [...path70, ...issue2.path]);
|
|
39452
39452
|
} else if (issue2.code === "invalid_element") {
|
|
39453
|
-
processError({ issues: issue2.issues }, [...
|
|
39453
|
+
processError({ issues: issue2.issues }, [...path70, ...issue2.path]);
|
|
39454
39454
|
} else {
|
|
39455
|
-
const fullpath = [...
|
|
39455
|
+
const fullpath = [...path70, ...issue2.path];
|
|
39456
39456
|
if (fullpath.length === 0) {
|
|
39457
39457
|
result.errors.push(mapper(issue2));
|
|
39458
39458
|
continue;
|
|
@@ -39491,8 +39491,8 @@ function treeifyError(error63, mapper = (issue2) => issue2.message) {
|
|
|
39491
39491
|
}
|
|
39492
39492
|
function toDotPath(_path) {
|
|
39493
39493
|
const segs = [];
|
|
39494
|
-
const
|
|
39495
|
-
for (const seg of
|
|
39494
|
+
const path70 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
39495
|
+
for (const seg of path70) {
|
|
39496
39496
|
if (typeof seg === "number")
|
|
39497
39497
|
segs.push(`[${seg}]`);
|
|
39498
39498
|
else if (typeof seg === "symbol")
|
|
@@ -56630,13 +56630,13 @@ function resolveRef(ref, ctx) {
|
|
|
56630
56630
|
if (!ref.startsWith("#")) {
|
|
56631
56631
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
56632
56632
|
}
|
|
56633
|
-
const
|
|
56634
|
-
if (
|
|
56633
|
+
const path70 = ref.slice(1).split("/").filter(Boolean);
|
|
56634
|
+
if (path70.length === 0) {
|
|
56635
56635
|
return ctx.rootSchema;
|
|
56636
56636
|
}
|
|
56637
56637
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
56638
|
-
if (
|
|
56639
|
-
const key =
|
|
56638
|
+
if (path70[0] === defsKey) {
|
|
56639
|
+
const key = path70[1] === void 0 ? void 0 : decodeJSONPointerSegment(path70[1]);
|
|
56640
56640
|
if (!key || !ctx.defs[key]) {
|
|
56641
56641
|
throw new Error(`Reference not found: ${ref}`);
|
|
56642
56642
|
}
|
|
@@ -57503,20 +57503,20 @@ function githubRepositoryOfRemote(url2) {
|
|
|
57503
57503
|
const afterUser = url2.replace(REMOTE_SCHEME, "").replace(REMOTE_USER, "");
|
|
57504
57504
|
const host = afterUser.startsWith("ssh.") ? afterUser.slice("ssh.".length) : afterUser;
|
|
57505
57505
|
if (!host.startsWith("github.com")) return null;
|
|
57506
|
-
let
|
|
57507
|
-
const port = hasScheme ? REMOTE_PORT.exec(
|
|
57508
|
-
if (port !== null)
|
|
57509
|
-
else if (
|
|
57506
|
+
let path70 = host.slice("github.com".length);
|
|
57507
|
+
const port = hasScheme ? REMOTE_PORT.exec(path70) : null;
|
|
57508
|
+
if (port !== null) path70 = path70.slice(port[0].length);
|
|
57509
|
+
else if (path70.startsWith("/") || path70.startsWith(":")) path70 = path70.slice(1);
|
|
57510
57510
|
else return null;
|
|
57511
|
-
return githubRepositoryOfRemotePath(
|
|
57511
|
+
return githubRepositoryOfRemotePath(path70);
|
|
57512
57512
|
}
|
|
57513
57513
|
function githubRepositoryOfRemotePath(remotePath) {
|
|
57514
|
-
let
|
|
57515
|
-
if (
|
|
57516
|
-
if (
|
|
57517
|
-
const segments =
|
|
57514
|
+
let path70 = remotePath.startsWith("/") ? remotePath.slice(1) : remotePath;
|
|
57515
|
+
if (path70.endsWith("/")) path70 = path70.slice(0, -1);
|
|
57516
|
+
if (path70.endsWith(".git")) path70 = path70.slice(0, -".git".length);
|
|
57517
|
+
const segments = path70.split("/");
|
|
57518
57518
|
if (segments.length !== 2 || !segments.every((segment) => REMOTE_PATH_SEGMENT.test(segment))) return null;
|
|
57519
|
-
return
|
|
57519
|
+
return path70;
|
|
57520
57520
|
}
|
|
57521
57521
|
|
|
57522
57522
|
// ../core/src/repositories.ts
|
|
@@ -58504,7 +58504,7 @@ var isInstructionLoadAttachment = (kind) => kind === INSTRUCTIONS_ATTACHMENT ||
|
|
|
58504
58504
|
var field = external_exports.unknown().optional();
|
|
58505
58505
|
var instructionFileSchema = external_exports.object({ path: field, type: field });
|
|
58506
58506
|
var attachmentSchema = external_exports.object({ files: field, content: field });
|
|
58507
|
-
var instructionFilesSchema = (
|
|
58507
|
+
var instructionFilesSchema = (path70, label2) => external_exports.array(external_exports.object({ path: path70, nativeScope: label2.nullable() })).max(INSTRUCTION_FILES_MAX).nullable();
|
|
58508
58508
|
function claudeCodeInstructionLoad(kind, record2, place, readers) {
|
|
58509
58509
|
const { location } = place;
|
|
58510
58510
|
const attachmentSource = { ...location, jsonPointer: "/attachment" };
|
|
@@ -58518,9 +58518,9 @@ function claudeCodeInstructionLoad(kind, record2, place, readers) {
|
|
|
58518
58518
|
entries.slice(0, INSTRUCTION_FILES_MAX).forEach((value, index) => {
|
|
58519
58519
|
const fileSource = { ...location, jsonPointer: kind === INSTRUCTIONS_ATTACHMENT ? `/attachment/files/${index}` : "/attachment/content" };
|
|
58520
58520
|
const file2 = readers.read(instructionFileSchema, value, "attachment.file", fileSource, true);
|
|
58521
|
-
const
|
|
58522
|
-
if (file2 === null ||
|
|
58523
|
-
files.push({ path:
|
|
58521
|
+
const path70 = file2 === null ? null : readers.readString(file2.path, "attachment.file.path", fileSource, true);
|
|
58522
|
+
if (file2 === null || path70 === null) return;
|
|
58523
|
+
files.push({ path: path70, nativeScope: readers.readString(file2.type, "attachment.file.type", fileSource) });
|
|
58524
58524
|
});
|
|
58525
58525
|
if (entries.length > 0 && files.length === 0) return null;
|
|
58526
58526
|
return {
|
|
@@ -59501,10 +59501,10 @@ function boundUnfamiliarPayload(record2) {
|
|
|
59501
59501
|
}
|
|
59502
59502
|
function excludeImageCarriers(record2) {
|
|
59503
59503
|
const excludedKeys = [];
|
|
59504
|
-
const withoutImages = (value,
|
|
59504
|
+
const withoutImages = (value, path70) => {
|
|
59505
59505
|
if (Array.isArray(value)) {
|
|
59506
59506
|
return value.map((item, index) => {
|
|
59507
|
-
const itemPath = `${
|
|
59507
|
+
const itemPath = `${path70}[${index}]`;
|
|
59508
59508
|
if (typeof item === "string" && isImageCarrier(item)) {
|
|
59509
59509
|
excludedKeys.push(itemPath);
|
|
59510
59510
|
return null;
|
|
@@ -59515,7 +59515,7 @@ function excludeImageCarriers(record2) {
|
|
|
59515
59515
|
if (!isRecord2(value)) return value;
|
|
59516
59516
|
const kept = [];
|
|
59517
59517
|
for (const [key, item] of Object.entries(value)) {
|
|
59518
|
-
const keyPath =
|
|
59518
|
+
const keyPath = path70 === "" ? key : `${path70}.${key}`;
|
|
59519
59519
|
if (isImageBase64Payload(value, key) || typeof item === "string" && isImageCarrier(item)) {
|
|
59520
59520
|
excludedKeys.push(keyPath);
|
|
59521
59521
|
continue;
|
|
@@ -60743,7 +60743,7 @@ function jsonString(literal2) {
|
|
|
60743
60743
|
// ../core/src/shellFileOperations.ts
|
|
60744
60744
|
var SHELL_PROGRAM = /(?:^|\/)(?:ba|z|da|k)?sh$/;
|
|
60745
60745
|
var SCRIPT_FLAG = /^-[a-mo-z]*c[a-mo-z]*$/;
|
|
60746
|
-
var operation = (operation2) => (
|
|
60746
|
+
var operation = (operation2) => (path70) => ({ operation: operation2, path: path70 });
|
|
60747
60747
|
var read = operation("read");
|
|
60748
60748
|
var edit = operation("edit");
|
|
60749
60749
|
var write = operation("write");
|
|
@@ -61145,15 +61145,15 @@ function scrubUserInfo(value) {
|
|
|
61145
61145
|
function scrubOutgoingUrl(url2) {
|
|
61146
61146
|
const parts = URL_PARTS.exec(url2);
|
|
61147
61147
|
if (!parts) return REDACTED3;
|
|
61148
|
-
const [, scheme = "", authority2 = "",
|
|
61148
|
+
const [, scheme = "", authority2 = "", path70 = ""] = parts;
|
|
61149
61149
|
const host = authority2.slice(authority2.lastIndexOf("@") + 1);
|
|
61150
61150
|
const origin = `${scheme}${host}`;
|
|
61151
|
-
if (PATH_KEPT_HOSTS.test(host.replace(/:\d*$/, ""))) return `${origin}${
|
|
61152
|
-
const route = OUTGOING_ROUTES.find((template) => fitsRoute(
|
|
61151
|
+
if (PATH_KEPT_HOSTS.test(host.replace(/:\d*$/, ""))) return `${origin}${path70}`;
|
|
61152
|
+
const route = OUTGOING_ROUTES.find((template) => fitsRoute(path70, template));
|
|
61153
61153
|
return `${origin}${route ?? ""}`;
|
|
61154
61154
|
}
|
|
61155
|
-
function fitsRoute(
|
|
61156
|
-
const segments =
|
|
61155
|
+
function fitsRoute(path70, template) {
|
|
61156
|
+
const segments = path70.replace(/(.)\/$/, "$1").split("/");
|
|
61157
61157
|
const route = template.split("/");
|
|
61158
61158
|
const hasRest = route.at(-1) === "{path}";
|
|
61159
61159
|
const fixed = hasRest ? route.slice(0, -1) : route;
|
|
@@ -61700,8 +61700,8 @@ function getFunctionName(fn) {
|
|
|
61700
61700
|
return defaultFunctionName;
|
|
61701
61701
|
}
|
|
61702
61702
|
}
|
|
61703
|
-
function normalizeStackTracePath(
|
|
61704
|
-
let filename =
|
|
61703
|
+
function normalizeStackTracePath(path70) {
|
|
61704
|
+
let filename = path70?.startsWith("file://") ? path70.slice(7) : path70;
|
|
61705
61705
|
if (filename?.match(/\/[A-Z]:/)) {
|
|
61706
61706
|
filename = filename.slice(1);
|
|
61707
61707
|
}
|
|
@@ -63510,8 +63510,8 @@ function isValidProtocol(protocol) {
|
|
|
63510
63510
|
return protocol === "http" || protocol === "https";
|
|
63511
63511
|
}
|
|
63512
63512
|
function dsnToString(dsn, withPassword = false) {
|
|
63513
|
-
const { host, path:
|
|
63514
|
-
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${
|
|
63513
|
+
const { host, path: path70, pass, port, projectId, protocol, publicKey } = dsn;
|
|
63514
|
+
return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path70 ? `${path70}/` : path70}${projectId}`;
|
|
63515
63515
|
}
|
|
63516
63516
|
function dsnFromString(str) {
|
|
63517
63517
|
const match = DSN_REGEX.exec(str);
|
|
@@ -63522,11 +63522,11 @@ function dsnFromString(str) {
|
|
|
63522
63522
|
return void 0;
|
|
63523
63523
|
}
|
|
63524
63524
|
const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match.slice(1);
|
|
63525
|
-
let
|
|
63525
|
+
let path70 = "";
|
|
63526
63526
|
let projectId = lastPath;
|
|
63527
63527
|
const split = projectId.split("/");
|
|
63528
63528
|
if (split.length > 1) {
|
|
63529
|
-
|
|
63529
|
+
path70 = split.slice(0, -1).join("/");
|
|
63530
63530
|
projectId = split.pop();
|
|
63531
63531
|
}
|
|
63532
63532
|
if (projectId) {
|
|
@@ -63535,7 +63535,7 @@ function dsnFromString(str) {
|
|
|
63535
63535
|
projectId = projectMatch[0];
|
|
63536
63536
|
}
|
|
63537
63537
|
}
|
|
63538
|
-
return dsnFromComponents({ host, pass, path:
|
|
63538
|
+
return dsnFromComponents({ host, pass, path: path70, projectId, port, protocol, publicKey });
|
|
63539
63539
|
}
|
|
63540
63540
|
function dsnFromComponents(components) {
|
|
63541
63541
|
return {
|
|
@@ -68138,9 +68138,9 @@ function stripUrlQueryAndFragment(urlPath) {
|
|
|
68138
68138
|
return urlPath.split(/[?#]/, 1)[0];
|
|
68139
68139
|
}
|
|
68140
68140
|
function getSanitizedUrlString(url2) {
|
|
68141
|
-
const { protocol, host, path:
|
|
68141
|
+
const { protocol, host, path: path70 } = url2;
|
|
68142
68142
|
const filteredHost = host?.replace(/^.*@/, "[filtered]:[filtered]@").replace(/(:80)$/, "").replace(/(:443)$/, "") || "";
|
|
68143
|
-
return `${protocol ? `${protocol}://` : ""}${filteredHost}${
|
|
68143
|
+
return `${protocol ? `${protocol}://` : ""}${filteredHost}${path70}`;
|
|
68144
68144
|
}
|
|
68145
68145
|
function stripDataUrlContent(url2, includeDataPrefix = true) {
|
|
68146
68146
|
if (url2.startsWith("data:")) {
|
|
@@ -69126,8 +69126,8 @@ function splitPath(filename) {
|
|
|
69126
69126
|
const parts = splitPathRe.exec(truncated);
|
|
69127
69127
|
return parts ? parts.slice(1) : [];
|
|
69128
69128
|
}
|
|
69129
|
-
function dirname(
|
|
69130
|
-
const result = splitPath(
|
|
69129
|
+
function dirname(path70) {
|
|
69130
|
+
const result = splitPath(path70);
|
|
69131
69131
|
const root = result[0] || "";
|
|
69132
69132
|
let dir = result[1];
|
|
69133
69133
|
if (!root && !dir) {
|
|
@@ -73028,15 +73028,15 @@ var getLayerMetadata = (route, layer, layerPath) => {
|
|
|
73028
73028
|
};
|
|
73029
73029
|
}
|
|
73030
73030
|
};
|
|
73031
|
-
var getRouterPath = (
|
|
73031
|
+
var getRouterPath = (path70, layer) => {
|
|
73032
73032
|
const stackLayer = Array.isArray(layer.handle?.stack) ? layer.handle?.stack?.[0] : void 0;
|
|
73033
73033
|
if (stackLayer?.route?.path) {
|
|
73034
|
-
return `${
|
|
73034
|
+
return `${path70}${stackLayer.route.path}`;
|
|
73035
73035
|
}
|
|
73036
73036
|
if (stackLayer && Array.isArray(stackLayer?.handle?.stack)) {
|
|
73037
|
-
return getRouterPath(
|
|
73037
|
+
return getRouterPath(path70, stackLayer);
|
|
73038
73038
|
}
|
|
73039
|
-
return
|
|
73039
|
+
return path70;
|
|
73040
73040
|
};
|
|
73041
73041
|
var isLayerIgnored = (name, type, config2) => {
|
|
73042
73042
|
if (Array.isArray(config2?.ignoreLayersType) && config2?.ignoreLayersType?.includes(type)) {
|
|
@@ -73056,7 +73056,7 @@ function getActualMatchedRoute(req, constructedRoute) {
|
|
|
73056
73056
|
if (layersStore.length === 0) {
|
|
73057
73057
|
return void 0;
|
|
73058
73058
|
}
|
|
73059
|
-
if (layersStore.every((
|
|
73059
|
+
if (layersStore.every((path70) => path70 === "/")) {
|
|
73060
73060
|
return req.originalUrl === "/" ? "/" : void 0;
|
|
73061
73061
|
}
|
|
73062
73062
|
if (constructedRoute === "*") {
|
|
@@ -73072,11 +73072,11 @@ function getActualMatchedRoute(req, constructedRoute) {
|
|
|
73072
73072
|
function getConstructedRoute(req) {
|
|
73073
73073
|
const layersStore = getStoredLayers(req);
|
|
73074
73074
|
let constructedRoute = "";
|
|
73075
|
-
for (const
|
|
73076
|
-
if (
|
|
73075
|
+
for (const path70 of layersStore) {
|
|
73076
|
+
if (path70 === "/" || path70 === "/*") {
|
|
73077
73077
|
continue;
|
|
73078
73078
|
}
|
|
73079
|
-
constructedRoute += !constructedRoute || constructedRoute.endsWith("/") ?
|
|
73079
|
+
constructedRoute += !constructedRoute || constructedRoute.endsWith("/") ? path70 : `/${path70}`;
|
|
73080
73080
|
}
|
|
73081
73081
|
return constructedRoute.replace(/\/{2,}/g, "/");
|
|
73082
73082
|
}
|
|
@@ -73595,9 +73595,9 @@ function getRequestUrlObject(requestOptions) {
|
|
|
73595
73595
|
const hostHeader = requestOptions.headers?.host && String(requestOptions.headers?.host);
|
|
73596
73596
|
const hostname4 = hostHeader || requestOptions.hostname || requestOptions.host || "";
|
|
73597
73597
|
const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname4) ? "" : `:${requestOptions.port}`;
|
|
73598
|
-
const
|
|
73598
|
+
const path70 = requestOptions.path ? requestOptions.path : "/";
|
|
73599
73599
|
const base = `${protocol}//${hostname4}${port}`;
|
|
73600
|
-
return new URL(
|
|
73600
|
+
return new URL(path70.startsWith("//") ? `${base}${path70}` : path70, base);
|
|
73601
73601
|
}
|
|
73602
73602
|
function getRequestUrlFromClientRequest(request2) {
|
|
73603
73603
|
return String(getRequestUrl(getRequestOptions(request2)));
|
|
@@ -74285,11 +74285,11 @@ function shouldIgnoreSpansForIncomingRequest(request2, {
|
|
|
74285
74285
|
return false;
|
|
74286
74286
|
}
|
|
74287
74287
|
function isStaticAssetRequest(urlPath) {
|
|
74288
|
-
const
|
|
74289
|
-
if (
|
|
74288
|
+
const path70 = stripUrlQueryAndFragment(urlPath);
|
|
74289
|
+
if (path70.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
|
|
74290
74290
|
return true;
|
|
74291
74291
|
}
|
|
74292
|
-
if (
|
|
74292
|
+
if (path70.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
74293
74293
|
return true;
|
|
74294
74294
|
}
|
|
74295
74295
|
return false;
|
|
@@ -74533,11 +74533,11 @@ function isKnownPrefetchRequest2(req) {
|
|
|
74533
74533
|
return req.headers["next-router-prefetch"] === "1";
|
|
74534
74534
|
}
|
|
74535
74535
|
function isStaticAssetRequest2(urlPath) {
|
|
74536
|
-
const
|
|
74537
|
-
if (
|
|
74536
|
+
const path70 = stripUrlQueryAndFragment(urlPath);
|
|
74537
|
+
if (path70.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
|
|
74538
74538
|
return true;
|
|
74539
74539
|
}
|
|
74540
|
-
if (
|
|
74540
|
+
if (path70.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
74541
74541
|
return true;
|
|
74542
74542
|
}
|
|
74543
74543
|
return false;
|
|
@@ -74897,19 +74897,19 @@ function getBreadcrumbData(request2) {
|
|
|
74897
74897
|
return {};
|
|
74898
74898
|
}
|
|
74899
74899
|
}
|
|
74900
|
-
function getAbsoluteUrl2(origin,
|
|
74900
|
+
function getAbsoluteUrl2(origin, path70 = "/") {
|
|
74901
74901
|
try {
|
|
74902
|
-
const url2 = new URL(
|
|
74902
|
+
const url2 = new URL(path70, origin);
|
|
74903
74903
|
return url2.toString();
|
|
74904
74904
|
} catch {
|
|
74905
74905
|
const url2 = `${origin}`;
|
|
74906
|
-
if (url2.endsWith("/") &&
|
|
74907
|
-
return `${url2}${
|
|
74906
|
+
if (url2.endsWith("/") && path70.startsWith("/")) {
|
|
74907
|
+
return `${url2}${path70.slice(1)}`;
|
|
74908
74908
|
}
|
|
74909
|
-
if (!url2.endsWith("/") && !
|
|
74910
|
-
return `${url2}/${
|
|
74909
|
+
if (!url2.endsWith("/") && !path70.startsWith("/")) {
|
|
74910
|
+
return `${url2}/${path70}`;
|
|
74911
74911
|
}
|
|
74912
|
-
return `${url2}${
|
|
74912
|
+
return `${url2}${path70}`;
|
|
74913
74913
|
}
|
|
74914
74914
|
}
|
|
74915
74915
|
|
|
@@ -75162,15 +75162,15 @@ function getRequestMethod(original) {
|
|
|
75162
75162
|
}
|
|
75163
75163
|
return "_OTHER";
|
|
75164
75164
|
}
|
|
75165
|
-
function getAbsoluteUrl3(origin,
|
|
75165
|
+
function getAbsoluteUrl3(origin, path70 = "/") {
|
|
75166
75166
|
const url2 = `${origin}`;
|
|
75167
|
-
if (url2.endsWith("/") &&
|
|
75168
|
-
return `${url2}${
|
|
75167
|
+
if (url2.endsWith("/") && path70.startsWith("/")) {
|
|
75168
|
+
return `${url2}${path70.slice(1)}`;
|
|
75169
75169
|
}
|
|
75170
|
-
if (!url2.endsWith("/") && !
|
|
75171
|
-
return `${url2}/${
|
|
75170
|
+
if (!url2.endsWith("/") && !path70.startsWith("/")) {
|
|
75171
|
+
return `${url2}/${path70}`;
|
|
75172
75172
|
}
|
|
75173
|
-
return `${url2}${
|
|
75173
|
+
return `${url2}${path70}`;
|
|
75174
75174
|
}
|
|
75175
75175
|
|
|
75176
75176
|
// ../../node_modules/.pnpm/@sentry+node-core@10.78.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.12.0_@opentele_b98c14eec9a06921cfbe2c973505d695/node_modules/@sentry/node-core/build/esm/integrations/node-fetch/index.js
|
|
@@ -77666,10 +77666,10 @@ function emplace(map2, key, contents) {
|
|
|
77666
77666
|
}
|
|
77667
77667
|
return value;
|
|
77668
77668
|
}
|
|
77669
|
-
function shouldSkipContextLinesForFile(
|
|
77670
|
-
if (
|
|
77671
|
-
if (
|
|
77672
|
-
const pathname = stripUrlQueryAndFragment(
|
|
77669
|
+
function shouldSkipContextLinesForFile(path70) {
|
|
77670
|
+
if (path70.startsWith("node:")) return true;
|
|
77671
|
+
if (path70.startsWith("data:")) return true;
|
|
77672
|
+
const pathname = stripUrlQueryAndFragment(path70).toLowerCase();
|
|
77673
77673
|
if (pathname.endsWith(".min.js")) return true;
|
|
77674
77674
|
if (pathname.endsWith(".min.cjs")) return true;
|
|
77675
77675
|
if (pathname.endsWith(".min.mjs")) return true;
|
|
@@ -77720,9 +77720,9 @@ function makeLineReaderRanges(lines, linecontext) {
|
|
|
77720
77720
|
}
|
|
77721
77721
|
return out;
|
|
77722
77722
|
}
|
|
77723
|
-
function getContextLinesFromFile(
|
|
77723
|
+
function getContextLinesFromFile(path70, ranges, output2) {
|
|
77724
77724
|
return new Promise((resolve2, _reject) => {
|
|
77725
|
-
const stream = createReadStream(
|
|
77725
|
+
const stream = createReadStream(path70);
|
|
77726
77726
|
const lineReaded = createInterface({
|
|
77727
77727
|
input: stream
|
|
77728
77728
|
});
|
|
@@ -77740,8 +77740,8 @@ function getContextLinesFromFile(path69, ranges, output2) {
|
|
|
77740
77740
|
let rangeStart = range[0];
|
|
77741
77741
|
let rangeEnd = range[1];
|
|
77742
77742
|
function onStreamError(e) {
|
|
77743
|
-
LRU_FILE_CONTENTS_FS_READ_FAILED.set(
|
|
77744
|
-
DEBUG_BUILD2 && debug.error(`Failed to read file: ${
|
|
77743
|
+
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path70, 1);
|
|
77744
|
+
DEBUG_BUILD2 && debug.error(`Failed to read file: ${path70}. Error: ${e}`);
|
|
77745
77745
|
lineReaded.close();
|
|
77746
77746
|
lineReaded.removeAllListeners();
|
|
77747
77747
|
destroyStreamAndResolve();
|
|
@@ -79186,8 +79186,8 @@ function getSpotlightConfig(optionsSpotlight) {
|
|
|
79186
79186
|
|
|
79187
79187
|
// ../../node_modules/.pnpm/@sentry+node-core@10.78.0_@opentelemetry+api@1.9.1_@opentelemetry+core@2.12.0_@opentele_b98c14eec9a06921cfbe2c973505d695/node_modules/@sentry/node-core/build/esm/utils/module.js
|
|
79188
79188
|
import { posix, sep } from "node:path";
|
|
79189
|
-
function normalizeWindowsPath(
|
|
79190
|
-
return
|
|
79189
|
+
function normalizeWindowsPath(path70) {
|
|
79190
|
+
return path70.replace(/^[A-Z]:/, "").replace(/\\/g, "/");
|
|
79191
79191
|
}
|
|
79192
79192
|
function createGetModuleFromFilename(basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(), isWindows = sep === "\\") {
|
|
79193
79193
|
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
@@ -82080,22 +82080,22 @@ function addSpanSource(span, loc, start, end) {
|
|
|
82080
82080
|
span.setAttribute(AttributeNames2.SOURCE, source);
|
|
82081
82081
|
}
|
|
82082
82082
|
}
|
|
82083
|
-
function createFieldIfNotExists(contextValue, info,
|
|
82084
|
-
let field7 = getField(contextValue,
|
|
82083
|
+
function createFieldIfNotExists(contextValue, info, path70) {
|
|
82084
|
+
let field7 = getField(contextValue, path70);
|
|
82085
82085
|
if (field7) {
|
|
82086
82086
|
return { field: field7, spanAdded: false };
|
|
82087
82087
|
}
|
|
82088
|
-
const parentSpan = getParentFieldSpan(contextValue,
|
|
82088
|
+
const parentSpan = getParentFieldSpan(contextValue, path70);
|
|
82089
82089
|
field7 = {
|
|
82090
|
-
span: createResolverSpan(contextValue, info,
|
|
82090
|
+
span: createResolverSpan(contextValue, info, path70, parentSpan)
|
|
82091
82091
|
};
|
|
82092
|
-
addField(contextValue,
|
|
82092
|
+
addField(contextValue, path70, field7);
|
|
82093
82093
|
return { field: field7, spanAdded: true };
|
|
82094
82094
|
}
|
|
82095
|
-
function createResolverSpan(contextValue, info,
|
|
82095
|
+
function createResolverSpan(contextValue, info, path70, parentSpan) {
|
|
82096
82096
|
const attributes = {
|
|
82097
82097
|
[AttributeNames2.FIELD_NAME]: info.fieldName,
|
|
82098
|
-
[AttributeNames2.FIELD_PATH]:
|
|
82098
|
+
[AttributeNames2.FIELD_PATH]: path70.join("."),
|
|
82099
82099
|
[AttributeNames2.FIELD_TYPE]: info.returnType.toString(),
|
|
82100
82100
|
[AttributeNames2.PARENT_NAME]: info.parentType.name
|
|
82101
82101
|
};
|
|
@@ -82127,15 +82127,15 @@ function getOperation(document2, operationName) {
|
|
|
82127
82127
|
return document2.definitions.find((definition) => OPERATION_VALUES.indexOf(definition?.operation) !== -1);
|
|
82128
82128
|
}
|
|
82129
82129
|
}
|
|
82130
|
-
function addField(contextValue,
|
|
82131
|
-
return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
82130
|
+
function addField(contextValue, path70, field7) {
|
|
82131
|
+
return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[path70.join(".")] = field7;
|
|
82132
82132
|
}
|
|
82133
|
-
function getField(contextValue,
|
|
82134
|
-
return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[
|
|
82133
|
+
function getField(contextValue, path70) {
|
|
82134
|
+
return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].fields[path70.join(".")];
|
|
82135
82135
|
}
|
|
82136
|
-
function getParentFieldSpan(contextValue,
|
|
82137
|
-
for (let i =
|
|
82138
|
-
const field7 = getField(contextValue,
|
|
82136
|
+
function getParentFieldSpan(contextValue, path70) {
|
|
82137
|
+
for (let i = path70.length - 1; i > 0; i--) {
|
|
82138
|
+
const field7 = getField(contextValue, path70.slice(0, i));
|
|
82139
82139
|
if (field7) {
|
|
82140
82140
|
return field7.span;
|
|
82141
82141
|
}
|
|
@@ -82145,9 +82145,9 @@ function getParentFieldSpan(contextValue, path69) {
|
|
|
82145
82145
|
function getRootSpan2(contextValue) {
|
|
82146
82146
|
return contextValue[OTEL_GRAPHQL_DATA_SYMBOL].span;
|
|
82147
82147
|
}
|
|
82148
|
-
function pathToArray(
|
|
82148
|
+
function pathToArray(path70) {
|
|
82149
82149
|
const flattened = [];
|
|
82150
|
-
let curr =
|
|
82150
|
+
let curr = path70;
|
|
82151
82151
|
while (curr) {
|
|
82152
82152
|
flattened.push(String(curr.key));
|
|
82153
82153
|
curr = curr.prev;
|
|
@@ -82288,8 +82288,8 @@ function wrapFieldResolver(getConfig3, fieldResolver, isDefaultResolver = false)
|
|
|
82288
82288
|
if (!contextValue[OTEL_GRAPHQL_DATA_SYMBOL]) {
|
|
82289
82289
|
return fieldResolver.call(this, source, args, contextValue, info);
|
|
82290
82290
|
}
|
|
82291
|
-
const
|
|
82292
|
-
const { field: field7, spanAdded } = createFieldIfNotExists(contextValue, info,
|
|
82291
|
+
const path70 = pathToArray(info?.path);
|
|
82292
|
+
const { field: field7, spanAdded } = createFieldIfNotExists(contextValue, info, path70);
|
|
82293
82293
|
const span = field7.span;
|
|
82294
82294
|
const shouldEndSpan = spanAdded;
|
|
82295
82295
|
return withActiveSpan(span, () => {
|
|
@@ -85272,10 +85272,10 @@ var PostgresJsInstrumentation = class extends import_instrumentation24.Instrumen
|
|
|
85272
85272
|
},
|
|
85273
85273
|
(exports) => exports
|
|
85274
85274
|
);
|
|
85275
|
-
["src", "cf/src", "cjs/src"].forEach((
|
|
85275
|
+
["src", "cf/src", "cjs/src"].forEach((path70) => {
|
|
85276
85276
|
module2.files.push(
|
|
85277
85277
|
new InstrumentationNodeModuleFile(
|
|
85278
|
-
`postgres/${
|
|
85278
|
+
`postgres/${path70}/query.js`,
|
|
85279
85279
|
SUPPORTED_VERSIONS4,
|
|
85280
85280
|
this._patchQueryPrototype.bind(this),
|
|
85281
85281
|
this._unpatchQueryPrototype.bind(this)
|
|
@@ -85906,13 +85906,13 @@ var HonoInstrumentation = class extends import_instrumentation27.Instrumentation
|
|
|
85906
85906
|
return function(original) {
|
|
85907
85907
|
return function wrappedHandler(...args) {
|
|
85908
85908
|
if (typeof args[0] === "string") {
|
|
85909
|
-
const
|
|
85909
|
+
const path70 = args[0];
|
|
85910
85910
|
if (args.length === 1) {
|
|
85911
|
-
return original.apply(this, [
|
|
85911
|
+
return original.apply(this, [path70]);
|
|
85912
85912
|
}
|
|
85913
85913
|
const handlers2 = args.slice(1);
|
|
85914
85914
|
return original.apply(this, [
|
|
85915
|
-
|
|
85915
|
+
path70,
|
|
85916
85916
|
...handlers2.map((handler) => instrumentation._wrapHandler(handler))
|
|
85917
85917
|
]);
|
|
85918
85918
|
}
|
|
@@ -85946,13 +85946,13 @@ var HonoInstrumentation = class extends import_instrumentation27.Instrumentation
|
|
|
85946
85946
|
return function(original) {
|
|
85947
85947
|
return function wrappedHandler(...args) {
|
|
85948
85948
|
if (typeof args[0] === "string") {
|
|
85949
|
-
const
|
|
85949
|
+
const path70 = args[0];
|
|
85950
85950
|
if (args.length === 1) {
|
|
85951
|
-
return original.apply(this, [
|
|
85951
|
+
return original.apply(this, [path70]);
|
|
85952
85952
|
}
|
|
85953
85953
|
const handlers2 = args.slice(1);
|
|
85954
85954
|
return original.apply(this, [
|
|
85955
|
-
|
|
85955
|
+
path70,
|
|
85956
85956
|
...handlers2.map((handler) => instrumentation._wrapHandler(handler))
|
|
85957
85957
|
]);
|
|
85958
85958
|
}
|
|
@@ -85972,8 +85972,8 @@ var HonoInstrumentation = class extends import_instrumentation27.Instrumentation
|
|
|
85972
85972
|
if (!instrumentation.isEnabled()) {
|
|
85973
85973
|
return handler.apply(this, [c, next]);
|
|
85974
85974
|
}
|
|
85975
|
-
const
|
|
85976
|
-
const span = instrumentation.tracer.startSpan(
|
|
85975
|
+
const path70 = c.req.path;
|
|
85976
|
+
const span = instrumentation.tracer.startSpan(path70);
|
|
85977
85977
|
return context2.with(trace.setSpan(context2.active(), span), () => {
|
|
85978
85978
|
return instrumentation._safeExecute(
|
|
85979
85979
|
() => {
|
|
@@ -85983,7 +85983,7 @@ var HonoInstrumentation = class extends import_instrumentation27.Instrumentation
|
|
|
85983
85983
|
const type = instrumentation._determineHandlerType(result2);
|
|
85984
85984
|
span.setAttributes({
|
|
85985
85985
|
[AttributeNames5.HONO_TYPE]: type,
|
|
85986
|
-
[AttributeNames5.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ?
|
|
85986
|
+
[AttributeNames5.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ? path70 : handler.name || "anonymous"
|
|
85987
85987
|
});
|
|
85988
85988
|
instrumentation.getConfig().responseHook?.(span);
|
|
85989
85989
|
return result2;
|
|
@@ -85992,7 +85992,7 @@ var HonoInstrumentation = class extends import_instrumentation27.Instrumentation
|
|
|
85992
85992
|
const type = instrumentation._determineHandlerType(result);
|
|
85993
85993
|
span.setAttributes({
|
|
85994
85994
|
[AttributeNames5.HONO_TYPE]: type,
|
|
85995
|
-
[AttributeNames5.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ?
|
|
85995
|
+
[AttributeNames5.HONO_NAME]: type === HonoTypes.REQUEST_HANDLER ? path70 : handler.name || "anonymous"
|
|
85996
85996
|
});
|
|
85997
85997
|
instrumentation.getConfig().responseHook?.(span);
|
|
85998
85998
|
return result;
|
|
@@ -86196,11 +86196,11 @@ var KoaInstrumentation = class extends import_instrumentation29.InstrumentationB
|
|
|
86196
86196
|
const router = dispatchLayer.router;
|
|
86197
86197
|
const routesStack = router?.stack ?? [];
|
|
86198
86198
|
for (const pathLayer of routesStack) {
|
|
86199
|
-
const
|
|
86199
|
+
const path70 = pathLayer.path;
|
|
86200
86200
|
const pathStack = pathLayer.stack;
|
|
86201
86201
|
for (let j = 0; j < pathStack.length; j++) {
|
|
86202
86202
|
const routedMiddleware = pathStack[j];
|
|
86203
|
-
pathStack[j] = this._patchLayer(routedMiddleware, true,
|
|
86203
|
+
pathStack[j] = this._patchLayer(routedMiddleware, true, path70);
|
|
86204
86204
|
}
|
|
86205
86205
|
}
|
|
86206
86206
|
return dispatchLayer;
|
|
@@ -88454,7 +88454,7 @@ function _init2(options = {}, getDefaultIntegrationsImpl) {
|
|
|
88454
88454
|
import tls2 from "node:tls";
|
|
88455
88455
|
var import_undici = __toESM(require_undici(), 1);
|
|
88456
88456
|
var CLI_VERSION_HEADER = "x-powerplant-cli-version";
|
|
88457
|
-
var cliVersion = true ? "0.4.
|
|
88457
|
+
var cliVersion = true ? "0.4.43" : "0.0.0-checkout";
|
|
88458
88458
|
function cliVersionHeaders() {
|
|
88459
88459
|
return { [CLI_VERSION_HEADER]: cliVersion, "user-agent": `powerplant-cli/${cliVersion}` };
|
|
88460
88460
|
}
|
|
@@ -89618,21 +89618,21 @@ function createOmissionRecorder() {
|
|
|
89618
89618
|
const count3 = (reason, by = 1) => {
|
|
89619
89619
|
if (by > 0) counts[reason] = (counts[reason] ?? 0) + by;
|
|
89620
89620
|
};
|
|
89621
|
-
const shape = (reason,
|
|
89621
|
+
const shape = (reason, path70, valueType, formatVersion, by = 1) => {
|
|
89622
89622
|
if (!REPORTED_REASONS.has(reason)) return;
|
|
89623
|
-
const key = `${
|
|
89623
|
+
const key = `${path70}\0${reason}\0${valueType}\0${formatVersion ?? ""}`;
|
|
89624
89624
|
const group = groups.get(key);
|
|
89625
89625
|
if (group) group.count += by;
|
|
89626
89626
|
else if (groups.size < MAX_STRUCTURE_DIAGNOSTICS) {
|
|
89627
|
-
groups.set(key, { path:
|
|
89627
|
+
groups.set(key, { path: path70, reason, valueType, count: by, ...formatVersion !== void 0 && { formatVersion } });
|
|
89628
89628
|
}
|
|
89629
89629
|
};
|
|
89630
89630
|
return {
|
|
89631
89631
|
count: count3,
|
|
89632
89632
|
shape,
|
|
89633
|
-
note(reason,
|
|
89633
|
+
note(reason, path70, valueType, formatVersion) {
|
|
89634
89634
|
count3(reason);
|
|
89635
|
-
shape(reason,
|
|
89635
|
+
shape(reason, path70, valueType, formatVersion);
|
|
89636
89636
|
},
|
|
89637
89637
|
absorb(other) {
|
|
89638
89638
|
for (const [reason, by] of Object.entries(other.omissions())) {
|
|
@@ -90790,14 +90790,14 @@ function rootFolderOf(folder, homeDir, platform2) {
|
|
|
90790
90790
|
const written = underHome ? `~${folder.slice(home.length)}` : folder;
|
|
90791
90791
|
return platform2 === "win32" ? written.replaceAll("\\", "/") : written;
|
|
90792
90792
|
}
|
|
90793
|
-
function checkoutOf(
|
|
90793
|
+
function checkoutOf(path70, probe, isWorkspaceRepo) {
|
|
90794
90794
|
switch (probe.kind) {
|
|
90795
90795
|
case "github":
|
|
90796
|
-
return isWorkspaceRepo(probe.repoFullName) ? { path:
|
|
90796
|
+
return isWorkspaceRepo(probe.repoFullName) ? { path: path70, remoteUrl: `https://github.com/${probe.repoFullName}` } : { path: path70, reason: "outside-workspace" };
|
|
90797
90797
|
case "other-code-host":
|
|
90798
|
-
return { path:
|
|
90798
|
+
return { path: path70, reason: "other-code-host" };
|
|
90799
90799
|
case "unreadable":
|
|
90800
|
-
return { path:
|
|
90800
|
+
return { path: path70, reason: probe.reason };
|
|
90801
90801
|
case "no-checkout":
|
|
90802
90802
|
return null;
|
|
90803
90803
|
}
|
|
@@ -90897,8 +90897,8 @@ function createStructureDiagnostics() {
|
|
|
90897
90897
|
observe: (source) => (observation) => {
|
|
90898
90898
|
try {
|
|
90899
90899
|
const formatVersion = admitted("formatVersion", observation.formatVersion ?? null);
|
|
90900
|
-
const
|
|
90901
|
-
const key = [source,
|
|
90900
|
+
const path70 = observation.path.replace(/[^A-Za-z0-9_.$:/=[\]-]/g, "_").slice(0, 160) || "other";
|
|
90901
|
+
const key = [source, path70, observation.reason, observation.valueType, formatVersion].join("\0");
|
|
90902
90902
|
const count3 = observation.count ?? 1;
|
|
90903
90903
|
const existing = groups.get(key);
|
|
90904
90904
|
if (existing) {
|
|
@@ -90908,7 +90908,7 @@ function createStructureDiagnostics() {
|
|
|
90908
90908
|
if (samples.length >= MAX_STRUCTURE_DIAGNOSTICS) return;
|
|
90909
90909
|
const sample = {
|
|
90910
90910
|
source,
|
|
90911
|
-
path:
|
|
90911
|
+
path: path70,
|
|
90912
90912
|
reason: observation.reason,
|
|
90913
90913
|
valueType: observation.valueType,
|
|
90914
90914
|
formatVersion,
|
|
@@ -91302,8 +91302,8 @@ var MODEL_INFO_FIELDS_INTERPRETED = /* @__PURE__ */ new Set(["modelName"]);
|
|
|
91302
91302
|
function collectUnfamiliar(record2, interpreted, excluded, prefix, into, recorder, formatVersion) {
|
|
91303
91303
|
for (const [key, value] of Object.entries(record2)) {
|
|
91304
91304
|
if (interpreted.has(key) || excluded.has(key)) continue;
|
|
91305
|
-
const
|
|
91306
|
-
into.set(
|
|
91305
|
+
const path70 = prefix === "" ? key : `${prefix}.${key}`;
|
|
91306
|
+
into.set(path70, value);
|
|
91307
91307
|
recorder.shape("unsupported", `bubble.${prefix === "" ? "" : `${prefix}.`}${nativeTypeLabel(key) ?? "other"}`, jsonValueType(value), formatVersion);
|
|
91308
91308
|
}
|
|
91309
91309
|
}
|
|
@@ -91389,8 +91389,8 @@ function bubbleLines(bubble, at, recorder) {
|
|
|
91389
91389
|
const formatVersion = typeof bubble._v === "number" || typeof bubble._v === "string" ? String(bubble._v) : void 0;
|
|
91390
91390
|
if (bubble.type !== 1 && bubble.type !== 2) {
|
|
91391
91391
|
const nativeType = nativeTypeLabel(String(bubble.type));
|
|
91392
|
-
const
|
|
91393
|
-
recorder.note("unsupported",
|
|
91392
|
+
const path70 = `bubble.type=${nativeType ?? "other"}`;
|
|
91393
|
+
recorder.note("unsupported", path70, jsonValueType(bubble.type), formatVersion);
|
|
91394
91394
|
const retained = Object.fromEntries(Object.entries(bubble).filter(([key]) => !BUBBLE_FIELDS_EXCLUDED.has(key)));
|
|
91395
91395
|
const bounded = boundUnfamiliarPayload(retained);
|
|
91396
91396
|
if (bounded.payload === void 0) recorder.count("truncated");
|
|
@@ -91917,12 +91917,12 @@ var CONTENT_LINE_TYPES2 = /* @__PURE__ */ new Set([
|
|
|
91917
91917
|
function parseCursorTranscriptFile(text) {
|
|
91918
91918
|
const lines = [];
|
|
91919
91919
|
const recorder = createOmissionRecorder();
|
|
91920
|
-
const retainUnsupported = (record2, at,
|
|
91920
|
+
const retainUnsupported = (record2, at, path70, discriminator) => {
|
|
91921
91921
|
const nativeType = nativeTypeLabel(discriminator);
|
|
91922
91922
|
const bounded = boundUnfamiliarPayload(record2);
|
|
91923
91923
|
lines.push({ type: "unsupported", ...nativeType !== void 0 && { nativeType }, ...at, ...bounded });
|
|
91924
|
-
recorder.note("unsupported", `${
|
|
91925
|
-
if (bounded.payload === void 0) recorder.note("truncated", `${
|
|
91924
|
+
recorder.note("unsupported", `${path70}=${nativeType ?? "other"}`, jsonValueType(discriminator));
|
|
91925
|
+
if (bounded.payload === void 0) recorder.note("truncated", `${path70}=${nativeType ?? "other"}`, "object");
|
|
91926
91926
|
};
|
|
91927
91927
|
text.split("\n").forEach((row, recordIndex) => {
|
|
91928
91928
|
if (!row.trim()) return;
|
|
@@ -91944,8 +91944,8 @@ function parseCursorTranscriptFile(text) {
|
|
|
91944
91944
|
}
|
|
91945
91945
|
const record2 = message.safeParse(value);
|
|
91946
91946
|
if (!record2.success) {
|
|
91947
|
-
const [
|
|
91948
|
-
retainUnsupported(value, { recordIndex },
|
|
91947
|
+
const [path70, discriminator] = typeof value.type === "string" ? ["record.type", value.type] : typeof value.role === "string" ? ["message.role", value.role] : ["record", void 0];
|
|
91948
|
+
retainUnsupported(value, { recordIndex }, path70, discriminator);
|
|
91949
91949
|
return;
|
|
91950
91950
|
}
|
|
91951
91951
|
const role2 = record2.data.role;
|
|
@@ -96744,6 +96744,9 @@ var KeychainKeyStore = class {
|
|
|
96744
96744
|
this.keychain.delete(KEY_SERVICE, "forget encryption key");
|
|
96745
96745
|
}
|
|
96746
96746
|
};
|
|
96747
|
+
function securityStdinCommand(args) {
|
|
96748
|
+
return args.map((arg) => `"${arg.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`).join(" ") + "\n";
|
|
96749
|
+
}
|
|
96747
96750
|
var Keychain = class {
|
|
96748
96751
|
constructor(appEnv, keychainPath) {
|
|
96749
96752
|
this.appEnv = appEnv;
|
|
@@ -96771,8 +96774,7 @@ var Keychain = class {
|
|
|
96771
96774
|
/** Create only: an existing item is kept. */
|
|
96772
96775
|
add(service, secret) {
|
|
96773
96776
|
const args = ["add-generic-password", "-s", service, "-a", this.appEnv, "-w", secret, ...this.keychain()];
|
|
96774
|
-
|
|
96775
|
-
this.security(["-i"], "create encryption key", command, [45]);
|
|
96777
|
+
this.security(["-i"], "create encryption key", securityStdinCommand(args), [45]);
|
|
96776
96778
|
}
|
|
96777
96779
|
delete(service, operation2) {
|
|
96778
96780
|
this.security(
|
|
@@ -107072,11 +107074,101 @@ function startMenuModel(sources, platform2) {
|
|
|
107072
107074
|
import { spawn as spawn8 } from "node:child_process";
|
|
107073
107075
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
107074
107076
|
import { mkdirSync as mkdirSync33, openSync as openSync13, realpathSync as realpathSync6 } from "node:fs";
|
|
107075
|
-
import
|
|
107077
|
+
import path69 from "node:path";
|
|
107076
107078
|
import { parseArgs } from "node:util";
|
|
107077
107079
|
|
|
107078
107080
|
// src/doctor.ts
|
|
107079
107081
|
import { closeSync as closeSync11, fstatSync as fstatSync4, openSync as openSync11, readSync as readSync7 } from "node:fs";
|
|
107082
|
+
|
|
107083
|
+
// src/menubarLoginItem.ts
|
|
107084
|
+
import { spawnSync as spawnSync8 } from "node:child_process";
|
|
107085
|
+
import path66 from "node:path";
|
|
107086
|
+
var LOGIN_ITEM_STATUS_FLAG = "--login-item-status";
|
|
107087
|
+
var REPAIR_LOGIN_ITEM_FLAG = "--repair-login-item";
|
|
107088
|
+
var reportSchema = external_exports.object({
|
|
107089
|
+
version: external_exports.literal(1),
|
|
107090
|
+
status: external_exports.enum(["enabled", "not-registered", "requires-approval", "not-found", "unknown"]),
|
|
107091
|
+
preference: external_exports.enum(["enabled", "disabled", "unknown"]),
|
|
107092
|
+
failure: external_exports.object({
|
|
107093
|
+
domain: external_exports.enum([
|
|
107094
|
+
"NSCocoaErrorDomain",
|
|
107095
|
+
"NSPOSIXErrorDomain",
|
|
107096
|
+
"NSOSStatusErrorDomain",
|
|
107097
|
+
"SMAppServiceErrorDomain",
|
|
107098
|
+
"kSMErrorDomainFramework",
|
|
107099
|
+
"CFErrorDomainLaunchd",
|
|
107100
|
+
"other"
|
|
107101
|
+
]),
|
|
107102
|
+
code: external_exports.number().int()
|
|
107103
|
+
}).optional()
|
|
107104
|
+
});
|
|
107105
|
+
var runProcess = (file2, args) => spawnSync8(file2, args, {
|
|
107106
|
+
encoding: "utf8",
|
|
107107
|
+
timeout: 5e3,
|
|
107108
|
+
maxBuffer: 16384,
|
|
107109
|
+
windowsHide: true
|
|
107110
|
+
});
|
|
107111
|
+
function inspectMenubarLoginItem(appPath, repair, run2 = runProcess) {
|
|
107112
|
+
if (appPath === null) return { kind: "not-installed" };
|
|
107113
|
+
const capability = run2("/usr/bin/plutil", [
|
|
107114
|
+
"-extract",
|
|
107115
|
+
"PowerplantLoginItemCommands",
|
|
107116
|
+
"raw",
|
|
107117
|
+
"-o",
|
|
107118
|
+
"-",
|
|
107119
|
+
path66.join(appPath, "Contents", "Info.plist")
|
|
107120
|
+
]);
|
|
107121
|
+
if (capability.status === null) return { kind: "unavailable", reason: "query-failed" };
|
|
107122
|
+
if (capability.status !== 0 || capability.stdout.trim() !== "1")
|
|
107123
|
+
return { kind: "unavailable", reason: "update-required" };
|
|
107124
|
+
const result = run2(path66.join(appPath, "Contents", "MacOS", "PowerplantMenubar"), [
|
|
107125
|
+
repair ? REPAIR_LOGIN_ITEM_FLAG : LOGIN_ITEM_STATUS_FLAG
|
|
107126
|
+
]);
|
|
107127
|
+
if (result.status === null) return { kind: "unavailable", reason: "query-failed" };
|
|
107128
|
+
let decoded;
|
|
107129
|
+
try {
|
|
107130
|
+
decoded = JSON.parse(result.stdout);
|
|
107131
|
+
} catch {
|
|
107132
|
+
return { kind: "unavailable", reason: "invalid-response" };
|
|
107133
|
+
}
|
|
107134
|
+
const parsed = reportSchema.safeParse(decoded);
|
|
107135
|
+
if (!parsed.success) return { kind: "unavailable", reason: "invalid-response" };
|
|
107136
|
+
if (result.status !== 0 && (!repair || parsed.data.status === "enabled" && parsed.data.failure === void 0)) {
|
|
107137
|
+
return { kind: "unavailable", reason: "query-failed" };
|
|
107138
|
+
}
|
|
107139
|
+
return { kind: "reported", report: parsed.data };
|
|
107140
|
+
}
|
|
107141
|
+
function menuStartupRepairSucceeded(result) {
|
|
107142
|
+
return result.kind === "reported" && result.report.status === "enabled" && result.report.failure === void 0;
|
|
107143
|
+
}
|
|
107144
|
+
function menubarLoginItemLines(result) {
|
|
107145
|
+
if (result.kind === "not-installed")
|
|
107146
|
+
return ["Menu startup: app not installed. Run powerplant init to install it."];
|
|
107147
|
+
if (result.kind === "unavailable") {
|
|
107148
|
+
return [
|
|
107149
|
+
result.reason === "update-required" ? "Menu startup: unavailable in this app version. Run powerplant update, then powerplant doctor." : `Menu startup: could not inspect (${result.reason}). Retry powerplant doctor.`
|
|
107150
|
+
];
|
|
107151
|
+
}
|
|
107152
|
+
const { status, preference, failure: failure2 } = result.report;
|
|
107153
|
+
const states = {
|
|
107154
|
+
enabled: "enabled",
|
|
107155
|
+
"not-registered": "not registered",
|
|
107156
|
+
"requires-approval": "requires approval in System Settings > General > Login Items",
|
|
107157
|
+
"not-found": "macOS could not find the login item",
|
|
107158
|
+
unknown: "macOS returned an unknown state"
|
|
107159
|
+
};
|
|
107160
|
+
const lines = [
|
|
107161
|
+
`Menu startup: ${states[status]}. Saved choice: ${preference === "unknown" ? "not recorded" : preference}.`
|
|
107162
|
+
];
|
|
107163
|
+
if (failure2 !== void 0)
|
|
107164
|
+
lines.push(`Menu startup operation failed: ${failure2.domain} (${failure2.code}).`);
|
|
107165
|
+
if (status === "not-registered" || status === "not-found" || failure2 !== void 0) {
|
|
107166
|
+
lines.push("To enable menu startup: powerplant doctor --repair-menu-startup");
|
|
107167
|
+
}
|
|
107168
|
+
return lines;
|
|
107169
|
+
}
|
|
107170
|
+
|
|
107171
|
+
// src/doctor.ts
|
|
107080
107172
|
var DOCTOR_LOG_TAIL_LINES = 50;
|
|
107081
107173
|
var LOG_TAIL_READ_BYTES = 256 * 1024;
|
|
107082
107174
|
function installLine(install) {
|
|
@@ -107091,13 +107183,13 @@ function redactedLogTail(raw) {
|
|
|
107091
107183
|
while (lines.length > 0 && lines[lines.length - 1]?.trim() === "") lines.pop();
|
|
107092
107184
|
return lines.slice(-DOCTOR_LOG_TAIL_LINES);
|
|
107093
107185
|
}
|
|
107094
|
-
function readDoctorLogTail(
|
|
107186
|
+
function readDoctorLogTail(path70) {
|
|
107095
107187
|
let fd;
|
|
107096
107188
|
try {
|
|
107097
|
-
fd = openSync11(
|
|
107189
|
+
fd = openSync11(path70, "r");
|
|
107098
107190
|
} catch (error63) {
|
|
107099
|
-
if (error63.code === "ENOENT") return { path:
|
|
107100
|
-
return { path:
|
|
107191
|
+
if (error63.code === "ENOENT") return { path: path70, lines: null };
|
|
107192
|
+
return { path: path70, lines: null, readError: error63 instanceof Error ? error63.message : String(error63) };
|
|
107101
107193
|
}
|
|
107102
107194
|
try {
|
|
107103
107195
|
const size = fstatSync4(fd).size;
|
|
@@ -107106,9 +107198,9 @@ function readDoctorLogTail(path69) {
|
|
|
107106
107198
|
readSync7(fd, buffer, 0, buffer.length, offset);
|
|
107107
107199
|
let text = buffer.toString("utf8");
|
|
107108
107200
|
if (offset > 0) text = text.slice(text.indexOf("\n") + 1);
|
|
107109
|
-
return { path:
|
|
107201
|
+
return { path: path70, lines: redactedLogTail(text) };
|
|
107110
107202
|
} catch (error63) {
|
|
107111
|
-
return { path:
|
|
107203
|
+
return { path: path70, lines: null, readError: error63 instanceof Error ? error63.message : String(error63) };
|
|
107112
107204
|
} finally {
|
|
107113
107205
|
closeSync11(fd);
|
|
107114
107206
|
}
|
|
@@ -107119,7 +107211,7 @@ function renderDoctorReport(i) {
|
|
|
107119
107211
|
"Powerplant diagnostics, paste everything below into your email to support@usepowerplant.com."
|
|
107120
107212
|
);
|
|
107121
107213
|
lines.push(
|
|
107122
|
-
`Collected ${new Date(i.now).toISOString()}. This command only prints; nothing was uploaded
|
|
107214
|
+
`Collected ${new Date(i.now).toISOString()}. ${i.menuStartupRepairRequested ? "Menu startup repair was requested; nothing was uploaded." : "This command only prints; nothing was uploaded."}`
|
|
107123
107215
|
);
|
|
107124
107216
|
lines.push("");
|
|
107125
107217
|
lines.push(
|
|
@@ -107140,6 +107232,7 @@ function renderDoctorReport(i) {
|
|
|
107140
107232
|
lines.push(`Syncing: ${i.control.paused ? "paused" : "active"}`);
|
|
107141
107233
|
lines.push(`Automatic updates: ${automaticUpdatesChoice(i.control).replace("not-chosen", "not chosen")}`);
|
|
107142
107234
|
lines.push(...serviceLines(i));
|
|
107235
|
+
if (i.menuStartup !== void 0) lines.push(...menubarLoginItemLines(i.menuStartup));
|
|
107143
107236
|
lines.push("");
|
|
107144
107237
|
lines.push(...logLines(i.logTail));
|
|
107145
107238
|
return lines;
|
|
@@ -107263,6 +107356,388 @@ function logLines(tail) {
|
|
|
107263
107356
|
];
|
|
107264
107357
|
}
|
|
107265
107358
|
|
|
107359
|
+
// src/pause.ts
|
|
107360
|
+
function pausedControl(existing, now) {
|
|
107361
|
+
return { ...existing, paused: true, pausedAt: new Date(now).toISOString() };
|
|
107362
|
+
}
|
|
107363
|
+
function resumedControl(existing, now) {
|
|
107364
|
+
return { ...existing, paused: false, resumedAt: new Date(now).toISOString() };
|
|
107365
|
+
}
|
|
107366
|
+
function pauseSyncing(appEnv) {
|
|
107367
|
+
updateCollectorControl(appEnv, (control) => pausedControl(control, Date.now()));
|
|
107368
|
+
}
|
|
107369
|
+
function resumeSyncing(appEnv) {
|
|
107370
|
+
updateCollectorControl(appEnv, (control) => resumedControl(control, Date.now()));
|
|
107371
|
+
}
|
|
107372
|
+
function realPauseDeps(appEnv, resumeCommand2, promptLine) {
|
|
107373
|
+
return {
|
|
107374
|
+
readControl: () => readCollectorControl(appEnv),
|
|
107375
|
+
resume: () => resumeSyncing(appEnv),
|
|
107376
|
+
promptLine,
|
|
107377
|
+
resumeCommand: resumeCommand2,
|
|
107378
|
+
now: Date.now
|
|
107379
|
+
};
|
|
107380
|
+
}
|
|
107381
|
+
function pausedFor(control, now) {
|
|
107382
|
+
if (!control.paused || control.pausedAt === void 0) return null;
|
|
107383
|
+
const ms = now - Date.parse(control.pausedAt);
|
|
107384
|
+
return Number.isFinite(ms) && ms >= 0 ? duration3(ms) : null;
|
|
107385
|
+
}
|
|
107386
|
+
function pausedSince(control, now) {
|
|
107387
|
+
const age = pausedFor(control, now);
|
|
107388
|
+
return age === null ? "Syncing is paused" : `Syncing has been paused for ${age}`;
|
|
107389
|
+
}
|
|
107390
|
+
function pausedNotice(control, resumeCommand2, now) {
|
|
107391
|
+
if (!control.paused) return null;
|
|
107392
|
+
return `! ${pausedSince(control, now)}. To resume sync, run \`${resumeCommand2}\`.`;
|
|
107393
|
+
}
|
|
107394
|
+
function pausedSyncNotice(control, resumeCommand2, now, dryRun) {
|
|
107395
|
+
if (!control.paused || dryRun) return pausedNotice(control, resumeCommand2, now);
|
|
107396
|
+
return `! ${pausedSince(control, now)}. This pass uploads because you asked for it. Background syncing stays paused until you run \`${resumeCommand2}\`.`;
|
|
107397
|
+
}
|
|
107398
|
+
async function offerResume(deps, options) {
|
|
107399
|
+
const { output: output2 } = options;
|
|
107400
|
+
const control = deps.readControl();
|
|
107401
|
+
if (!control.paused) return "not-paused";
|
|
107402
|
+
const now = deps.now();
|
|
107403
|
+
const age = pausedFor(control, now);
|
|
107404
|
+
output2.log(`! ${pausedSince(control, now)}, the background sync is running but uploads nothing`);
|
|
107405
|
+
if (options.promptAllowed && await confirmResume(deps, output2)) {
|
|
107406
|
+
deps.resume();
|
|
107407
|
+
output2.log(
|
|
107408
|
+
`\u2713 Syncing resumed, the background sync is catching up on ${age === null ? "the pause" : `the paused ${age}`}`
|
|
107409
|
+
);
|
|
107410
|
+
return "resumed";
|
|
107411
|
+
}
|
|
107412
|
+
output2.log(`To resume sync, run \`${deps.resumeCommand}\``);
|
|
107413
|
+
return "still-paused";
|
|
107414
|
+
}
|
|
107415
|
+
async function confirmResume(deps, output2) {
|
|
107416
|
+
for (; ; ) {
|
|
107417
|
+
const answer = await deps.promptLine(`${output2.indent}Resume syncing now? [Y/n] `);
|
|
107418
|
+
const normalized = answer?.trim().toLowerCase() ?? "";
|
|
107419
|
+
if (answer === null || normalized === "n" || normalized === "no") return false;
|
|
107420
|
+
if (normalized === "" || normalized === "y" || normalized === "yes") return true;
|
|
107421
|
+
output2.log('Please answer "y" or "n".');
|
|
107422
|
+
}
|
|
107423
|
+
}
|
|
107424
|
+
|
|
107425
|
+
// src/protectedFolders.ts
|
|
107426
|
+
var MACOS_BLOCKED_FOLDER_REMEDY = "To allow it, open System Settings > Privacy & Security > Files and Folders, enable the folder for node, then run `powerplant init`.";
|
|
107427
|
+
|
|
107428
|
+
// src/version.ts
|
|
107429
|
+
var CLI_VERSION = true ? "0.4.43" : "0.0.0-checkout";
|
|
107430
|
+
var CLI_RELEASE_BUILD = true ? true : false;
|
|
107431
|
+
var CLI_DEVELOPMENT_COPY = false;
|
|
107432
|
+
function updateRefusal(tarball, developmentCopy = CLI_DEVELOPMENT_COPY) {
|
|
107433
|
+
if (!developmentCopy || tarball) return null;
|
|
107434
|
+
return "This development copy installs no release. To update it, run `pnpm --filter @usepowerplant/cli exe:install-dev` in your checkout.";
|
|
107435
|
+
}
|
|
107436
|
+
|
|
107437
|
+
// src/statusReport.ts
|
|
107438
|
+
var block = (line, ...details) => ({ line, details });
|
|
107439
|
+
function run(i, args) {
|
|
107440
|
+
return `\`powerplant ${args}${i.config.appEnv === "production" ? "" : ` --env ${i.config.appEnv}`}\``;
|
|
107441
|
+
}
|
|
107442
|
+
function renderStatus(i, out) {
|
|
107443
|
+
const stopping = syncProblems(i);
|
|
107444
|
+
const sections = [
|
|
107445
|
+
...stopping.map((problem) => [problem]),
|
|
107446
|
+
machineBlock(i, stopping.length === 0),
|
|
107447
|
+
...warnings(i).map((warning2) => [warning2]),
|
|
107448
|
+
i.connections.map((connection) => mcpBlock(i, connection)),
|
|
107449
|
+
[cliBlock(i, stopping.length === 0)]
|
|
107450
|
+
];
|
|
107451
|
+
sections.filter((section) => section.length > 0).forEach((section, index) => {
|
|
107452
|
+
if (index > 0) out.log("");
|
|
107453
|
+
for (const { line, details } of section) {
|
|
107454
|
+
out.log(line);
|
|
107455
|
+
details.forEach(out.detail);
|
|
107456
|
+
}
|
|
107457
|
+
});
|
|
107458
|
+
}
|
|
107459
|
+
function daemonStatus(i) {
|
|
107460
|
+
return "status" in i.daemon ? i.daemon.status : null;
|
|
107461
|
+
}
|
|
107462
|
+
function syncProblems(i) {
|
|
107463
|
+
if (i.credentialsError !== void 0) {
|
|
107464
|
+
return [block(`\u2717 ${i.credentialsError}`, `Run ${run(i, "init")} to enroll again.`)];
|
|
107465
|
+
}
|
|
107466
|
+
if (i.credentials === null) return [block("! Not enrolled", `Run ${run(i, "init")}.`)];
|
|
107467
|
+
const problems = [];
|
|
107468
|
+
if (i.control.paused) {
|
|
107469
|
+
problems.push(block(`! ${pausedSince(i.control, i.now)}`, `To resume sync, run ${run(i, "resume")}.`));
|
|
107470
|
+
}
|
|
107471
|
+
if (workspacesAfterLeavingHome(i.credentials)?.length === 0) {
|
|
107472
|
+
problems.push(block("! Not a member of any workspace", "Syncing starts again when a workspace adds you."));
|
|
107473
|
+
}
|
|
107474
|
+
const service = serviceProblem(i);
|
|
107475
|
+
if (service !== null) problems.push(service);
|
|
107476
|
+
const status = i.daemon.state === "running" && !i.control.paused ? i.daemon.status : null;
|
|
107477
|
+
const problem = status && syncProblem(i.credentials, status, run(i, "doctor"));
|
|
107478
|
+
if (problem) problems.push(block(problem.line, problem.detail));
|
|
107479
|
+
return problems;
|
|
107480
|
+
}
|
|
107481
|
+
function unavailableProbe(i) {
|
|
107482
|
+
return block(
|
|
107483
|
+
`! Background sync status unavailable${i.serviceError ? `, ${i.serviceError}` : ""}`,
|
|
107484
|
+
`Run ${run(i, "doctor")} for diagnostics.`
|
|
107485
|
+
);
|
|
107486
|
+
}
|
|
107487
|
+
function serviceProblem(i) {
|
|
107488
|
+
switch (i.service) {
|
|
107489
|
+
case "unavailable":
|
|
107490
|
+
break;
|
|
107491
|
+
case "unsupported":
|
|
107492
|
+
return block(
|
|
107493
|
+
"! Background sync is not supported on this platform yet",
|
|
107494
|
+
`Run ${run(i, "sync")} on a schedule instead.`
|
|
107495
|
+
);
|
|
107496
|
+
case "not-installed":
|
|
107497
|
+
return block("! Background sync is not installed", `Run ${run(i, "init")}.`);
|
|
107498
|
+
case "not-loaded":
|
|
107499
|
+
return block("! Background sync is installed but not loaded", `Run ${run(i, "restart")}.`);
|
|
107500
|
+
case "loaded":
|
|
107501
|
+
break;
|
|
107502
|
+
}
|
|
107503
|
+
switch (i.daemon.state) {
|
|
107504
|
+
case "unreadable":
|
|
107505
|
+
return block(
|
|
107506
|
+
"! Background sync status file is unreadable",
|
|
107507
|
+
`A different version may have written it. Run ${run(i, "restart")}.`
|
|
107508
|
+
);
|
|
107509
|
+
case "not-running":
|
|
107510
|
+
if (i.service === "unavailable") return unavailableProbe(i);
|
|
107511
|
+
return block(
|
|
107512
|
+
"! Background sync has not reported its status",
|
|
107513
|
+
`It may still be starting. If this persists, run ${run(i, "restart")}.`,
|
|
107514
|
+
`The log is at ${serviceLogPath2(i.config.appEnv)}.`
|
|
107515
|
+
);
|
|
107516
|
+
case "stalled":
|
|
107517
|
+
return block(`\u2717 Background sync stalled, no heartbeat for ${duration3(i.daemon.staleMs)}`, `Run ${run(i, "restart")}.`);
|
|
107518
|
+
case "restarting":
|
|
107519
|
+
return block("! Background sync is restarting", "It starts again within a minute.");
|
|
107520
|
+
case "running":
|
|
107521
|
+
return null;
|
|
107522
|
+
}
|
|
107523
|
+
}
|
|
107524
|
+
function machineBlock(i, syncing) {
|
|
107525
|
+
const credentials = i.credentials;
|
|
107526
|
+
if (credentials === null) return [];
|
|
107527
|
+
const org = syncWorkspaceName(credentials);
|
|
107528
|
+
const status = daemonStatus(i);
|
|
107529
|
+
const coverage = syncCoverage(credentials, status, run(i, "doctor"));
|
|
107530
|
+
const line = syncing ? coverage.headline(`${credentials.machineName}${org ? ` to ${org}` : ""}`) : `${credentials.machineName}${org ? ` in ${org}` : ""}`;
|
|
107531
|
+
const details = [`${describeStoredCaptureSummary(credentials)}.`, ...coverage.details];
|
|
107532
|
+
if (status !== null) {
|
|
107533
|
+
const signals = describeSyncSignals(
|
|
107534
|
+
{
|
|
107535
|
+
lastSessionActivityAt: status.lastUploadAt ?? null,
|
|
107536
|
+
lastCheckedInAt: status.lastPass?.at ?? null,
|
|
107537
|
+
syncPaused: null,
|
|
107538
|
+
lastSyncErrorAt: syncFailure(credentials, status)?.at ?? null
|
|
107539
|
+
},
|
|
107540
|
+
new Date(i.now),
|
|
107541
|
+
"last upload unmeasured"
|
|
107542
|
+
);
|
|
107543
|
+
details.push(signals ?? "No sync has run since background sync started.");
|
|
107544
|
+
}
|
|
107545
|
+
return [block(line, ...details)];
|
|
107546
|
+
}
|
|
107547
|
+
function warnings(i) {
|
|
107548
|
+
const found = [];
|
|
107549
|
+
if (i.moveToInstalledCopy === true) found.push(block(`! Run ${run(i, "init")} to finish moving to the new install`));
|
|
107550
|
+
if (isUnsupportedVersion(i.cliVersion, i.oldestSupportedVersion)) {
|
|
107551
|
+
found.push(
|
|
107552
|
+
block(
|
|
107553
|
+
`! powerplant ${i.cliVersion} is no longer supported, the oldest supported is ${i.oldestSupportedVersion}`,
|
|
107554
|
+
`Run ${run(i, "update")} (or npm install -g @usepowerplant/cli). Unsupported versions can stop working without notice.`
|
|
107555
|
+
)
|
|
107556
|
+
);
|
|
107557
|
+
}
|
|
107558
|
+
for (const entry of i.protectedSessions ?? []) {
|
|
107559
|
+
const sessions = `${entry.sessionCount} recent agent session${entry.sessionCount === 1 ? "" : "s"}`;
|
|
107560
|
+
const staying = entry.sessionCount === 1 ? "is staying local" : "are staying local";
|
|
107561
|
+
found.push(
|
|
107562
|
+
i.credentials !== null && protectedRootReview(i.credentials, entry.root) === "blocked" ? block(
|
|
107563
|
+
`! macOS is blocking Powerplant from reading ${entry.displayRoot}`,
|
|
107564
|
+
`${sessions} ${staying}. ${MACOS_BLOCKED_FOLDER_REMEDY}`
|
|
107565
|
+
) : block(
|
|
107566
|
+
`! ${sessions} under ${entry.displayRoot} ${staying}`,
|
|
107567
|
+
`Run ${run(i, "init")} to review Git repository scanning.`
|
|
107568
|
+
)
|
|
107569
|
+
);
|
|
107570
|
+
}
|
|
107571
|
+
if (i.service === "unavailable" && i.daemon.state !== "not-running") found.push(unavailableProbe(i));
|
|
107572
|
+
if (i.mcpPreferencesError !== void 0) found.push(block("! MCP choices can't be read", i.mcpPreferencesError));
|
|
107573
|
+
for (const hook of daemonStatus(i)?.hooks ?? []) {
|
|
107574
|
+
const silence = hookWarning(hook, i.now);
|
|
107575
|
+
if (silence) found.push(block(`! ${silence.problem}`, silence.fix));
|
|
107576
|
+
}
|
|
107577
|
+
return found;
|
|
107578
|
+
}
|
|
107579
|
+
function mcpBlock(i, connection) {
|
|
107580
|
+
const name = `${AGENT_DISPLAY_NAMES[connection.client]}${connection.target ? ` (${connection.target})` : ""}`;
|
|
107581
|
+
const fix = `Run ${run(i, `connect --client ${connection.client}`)}.`;
|
|
107582
|
+
const current = connectionIsCurrent(connection, i.now);
|
|
107583
|
+
const checked2 = current ? "" : `, checked ${ago(i.now - Date.parse(connection.checkedAt))}`;
|
|
107584
|
+
switch (connection.state) {
|
|
107585
|
+
case "signed-in":
|
|
107586
|
+
return block(`${current ? "\u2713 " : ""}${name}: MCP connected${checked2}`);
|
|
107587
|
+
case "sign-in-needed":
|
|
107588
|
+
return block(`! ${name}: MCP sign-in needed${checked2}`, fix);
|
|
107589
|
+
case "different-url":
|
|
107590
|
+
return block(
|
|
107591
|
+
`! ${name}: MCP points at a different Powerplant${connection.registeredUrl ? `, ${connection.registeredUrl}` : ""}`,
|
|
107592
|
+
fix
|
|
107593
|
+
);
|
|
107594
|
+
case "not-connected":
|
|
107595
|
+
return i.mcpPreferences?.clients[connection.client]?.optedIn === true ? block(`! ${name}: MCP not connected`, fix) : block(`${name}: MCP not connected`);
|
|
107596
|
+
case "configured":
|
|
107597
|
+
return block(`${name}: MCP configured, sign-in unknown`);
|
|
107598
|
+
case "check-failed":
|
|
107599
|
+
return block(`${name}: MCP check failed${connection.detail ? `, ${connection.detail}` : ""}`);
|
|
107600
|
+
}
|
|
107601
|
+
}
|
|
107602
|
+
function cliBlock(i, syncing) {
|
|
107603
|
+
const details = [];
|
|
107604
|
+
if (i.daemon.state === "running" && i.daemon.status.version !== i.cliVersion) {
|
|
107605
|
+
details.push(
|
|
107606
|
+
`Background sync is on ${i.daemon.status.version}. It restarts onto the installed version within minutes, or now with ${run(i, "restart")}.`
|
|
107607
|
+
);
|
|
107608
|
+
}
|
|
107609
|
+
const automatic = automaticUpdatesChoice(i.control);
|
|
107610
|
+
const version2 = `powerplant ${i.cliVersion}`;
|
|
107611
|
+
if (isUpdateAvailable(i.cliVersion, i.latestVersion) && !isUnsupportedVersion(i.cliVersion, i.oldestSupportedVersion)) {
|
|
107612
|
+
return block(`${version2}, ${i.latestVersion} is available`, ...details, `Run ${run(i, "update")}.`);
|
|
107613
|
+
}
|
|
107614
|
+
if (automatic === "not-chosen" && syncing) {
|
|
107615
|
+
details.push(`Turn them on with ${run(i, "update --automatic on")}.`);
|
|
107616
|
+
}
|
|
107617
|
+
return block(`${version2}, automatic updates ${automatic === "on" ? "on" : "off"}`, ...details);
|
|
107618
|
+
}
|
|
107619
|
+
function statusJson(i) {
|
|
107620
|
+
return {
|
|
107621
|
+
appEnv: i.config.appEnv,
|
|
107622
|
+
apiUrl: i.config.apiUrl,
|
|
107623
|
+
cliVersion: i.cliVersion,
|
|
107624
|
+
latestVersion: i.latestVersion,
|
|
107625
|
+
oldestSupportedVersion: i.oldestSupportedVersion,
|
|
107626
|
+
// null = couldn't tell (no line drawn, or this isn't a release build).
|
|
107627
|
+
supported: supportedFlag(i.cliVersion, i.oldestSupportedVersion),
|
|
107628
|
+
enrolled: i.credentials !== null,
|
|
107629
|
+
...i.credentials && {
|
|
107630
|
+
machineId: i.credentials.machineId,
|
|
107631
|
+
machineName: i.credentials.machineName,
|
|
107632
|
+
orgId: i.credentials.orgId ?? null,
|
|
107633
|
+
orgName: i.credentials.orgName ?? null,
|
|
107634
|
+
capture: describeStoredCapture(i.credentials)
|
|
107635
|
+
},
|
|
107636
|
+
protectedRepoDiscoveryNeeded: (i.protectedSessions ?? []).map((entry) => ({
|
|
107637
|
+
displayRoot: entry.displayRoot,
|
|
107638
|
+
sessionCount: entry.sessionCount,
|
|
107639
|
+
// The member said yes and macOS refused: System Settings, not init,
|
|
107640
|
+
// is the fix, so a tool rendering this must not say "review".
|
|
107641
|
+
blockedByMacOS: i.credentials !== null && protectedRootReview(i.credentials, entry.root) === "blocked"
|
|
107642
|
+
})),
|
|
107643
|
+
...i.credentialsError !== void 0 && { credentialsError: i.credentialsError },
|
|
107644
|
+
service: i.service,
|
|
107645
|
+
...i.serviceError !== void 0 && { serviceError: i.serviceError },
|
|
107646
|
+
moveToInstalledCopy: i.moveToInstalledCopy === true,
|
|
107647
|
+
...i.credentialStore !== void 0 && { credentialStore: i.credentialStore },
|
|
107648
|
+
...i.credentialStoreError !== void 0 && { credentialStoreError: i.credentialStoreError },
|
|
107649
|
+
...i.credentialMigration !== void 0 && { credentialMigration: i.credentialMigration },
|
|
107650
|
+
// "unreadable" passes through as its own state — a tool must be able to
|
|
107651
|
+
// tell "the daemon's report can't be parsed" from "the daemon is dead",
|
|
107652
|
+
// exactly like the human rendering above.
|
|
107653
|
+
daemon: "status" in i.daemon ? { state: i.daemon.state, ...i.daemon.status } : { state: i.daemon.state },
|
|
107654
|
+
paused: i.control.paused,
|
|
107655
|
+
automaticUpdates: automaticUpdatesChoice(i.control),
|
|
107656
|
+
pausedAt: i.control.pausedAt ?? null,
|
|
107657
|
+
// The same saved checks the human rendering reads, each with when it ran.
|
|
107658
|
+
mcpConnections: i.connections
|
|
107659
|
+
};
|
|
107660
|
+
}
|
|
107661
|
+
function supportedFlag(cliVersion2, oldestSupportedVersion) {
|
|
107662
|
+
if (oldestSupportedVersion === null) return null;
|
|
107663
|
+
const order = compareReleaseVersions(cliVersion2, oldestSupportedVersion);
|
|
107664
|
+
return order === null ? null : order !== -1;
|
|
107665
|
+
}
|
|
107666
|
+
var npmLatestSchema = external_exports.object({ version: external_exports.string().min(1) });
|
|
107667
|
+
async function fetchDistTag(packageName, distTag, fetchImpl = fetch) {
|
|
107668
|
+
try {
|
|
107669
|
+
const response = await fetchImpl(
|
|
107670
|
+
`https://registry.npmjs.org/${encodeURIComponent(packageName)}/${distTag}`,
|
|
107671
|
+
{ signal: AbortSignal.timeout(3e3) }
|
|
107672
|
+
);
|
|
107673
|
+
if (response.status === 404) return { kind: "absent" };
|
|
107674
|
+
if (!response.ok) return { kind: "unreachable" };
|
|
107675
|
+
const parsed = npmLatestSchema.safeParse(await response.json());
|
|
107676
|
+
return parsed.success ? { kind: "found", version: parsed.data.version } : { kind: "unreachable" };
|
|
107677
|
+
} catch {
|
|
107678
|
+
return { kind: "unreachable" };
|
|
107679
|
+
}
|
|
107680
|
+
}
|
|
107681
|
+
async function fetchNewestRelease(packageName, fetchImpl = fetch) {
|
|
107682
|
+
const next = await fetchDistTag(packageName, "next", fetchImpl);
|
|
107683
|
+
if (next.kind === "found") return next.version;
|
|
107684
|
+
if (next.kind === "unreachable") return null;
|
|
107685
|
+
const latest2 = await fetchDistTag(packageName, "latest", fetchImpl);
|
|
107686
|
+
return latest2.kind === "found" ? latest2.version : null;
|
|
107687
|
+
}
|
|
107688
|
+
function releaseSource(appEnv) {
|
|
107689
|
+
return appEnv === "production" ? "promoted" : "npm";
|
|
107690
|
+
}
|
|
107691
|
+
function fetchVersionFacts(appEnv, credentials, packageName, fetchImpl = fetch, developmentCopy = CLI_DEVELOPMENT_COPY) {
|
|
107692
|
+
if (developmentCopy) return Promise.resolve([null, null]);
|
|
107693
|
+
const policy = credentials === null ? Promise.resolve(null) : fetchVersionPolicy(credentials.apiUrl, credentials.token, fetchImpl);
|
|
107694
|
+
const latest2 = releaseSource(appEnv) === "npm" ? fetchNewestRelease(packageName, fetchImpl) : policy.then((found) => found?.promotedVersion ?? null);
|
|
107695
|
+
return Promise.all([latest2, policy.then((found) => found?.oldestSupportedVersion ?? null)]);
|
|
107696
|
+
}
|
|
107697
|
+
|
|
107698
|
+
// src/doctorCommand.ts
|
|
107699
|
+
async function runDoctor(i) {
|
|
107700
|
+
if (i.repairMenuStartup && !i.menuStartupSupported) {
|
|
107701
|
+
throw new ExpectedCliError("Menu startup repair is available for the production Mac app only.");
|
|
107702
|
+
}
|
|
107703
|
+
const found = await i.activity("Collecting diagnostics\u2026", async () => {
|
|
107704
|
+
const service = i.readService();
|
|
107705
|
+
const stored = i.readCredentials();
|
|
107706
|
+
const [[latestVersion, oldestSupportedVersion], serviceRead] = await Promise.all([
|
|
107707
|
+
fetchVersionFacts(i.config.appEnv, stored.credentials, CLI_PACKAGE_NAME),
|
|
107708
|
+
service
|
|
107709
|
+
]);
|
|
107710
|
+
const installed = i.menuStartupSupported ? i.installedApp() : null;
|
|
107711
|
+
const menuStartup = installed === null ? void 0 : inspectMenubarLoginItem(
|
|
107712
|
+
installed.present ? installed.appPath : null,
|
|
107713
|
+
i.repairMenuStartup
|
|
107714
|
+
);
|
|
107715
|
+
return { stored, latestVersion, oldestSupportedVersion, serviceRead, menuStartup };
|
|
107716
|
+
});
|
|
107717
|
+
const failedRepair = i.repairMenuStartup && (found.menuStartup === void 0 || !menuStartupRepairSucceeded(found.menuStartup));
|
|
107718
|
+
return {
|
|
107719
|
+
exitCode: failedRepair ? 1 : 0,
|
|
107720
|
+
lines: renderDoctorReport({
|
|
107721
|
+
config: i.config,
|
|
107722
|
+
cliVersion: CLI_VERSION,
|
|
107723
|
+
latestVersion: found.latestVersion,
|
|
107724
|
+
oldestSupportedVersion: found.oldestSupportedVersion,
|
|
107725
|
+
nodeVersion: process.version,
|
|
107726
|
+
platform: `${process.platform} ${process.arch}`,
|
|
107727
|
+
install: i.inspectInstall(),
|
|
107728
|
+
...found.stored,
|
|
107729
|
+
...found.serviceRead,
|
|
107730
|
+
...i.readCredentialStore(),
|
|
107731
|
+
daemon: describeDaemonState(readCollectorStatus(i.config.appEnv)),
|
|
107732
|
+
control: readCollectorControl(i.config.appEnv),
|
|
107733
|
+
menuStartup: found.menuStartup,
|
|
107734
|
+
menuStartupRepairRequested: i.repairMenuStartup,
|
|
107735
|
+
logTail: readDoctorLogTail(serviceLogPath2(i.config.appEnv)),
|
|
107736
|
+
now: Date.now()
|
|
107737
|
+
})
|
|
107738
|
+
};
|
|
107739
|
+
}
|
|
107740
|
+
|
|
107266
107741
|
// src/env.ts
|
|
107267
107742
|
var SHARED_SENTRY_DSN = "https://e82214a5c58b312296cdacc3a2de1c8d@o4507827225886720.ingest.us.sentry.io/4511759864627200";
|
|
107268
107743
|
var CLI_ENVIRONMENTS = {
|
|
@@ -107284,8 +107759,8 @@ var CLI_ENVIRONMENTS = {
|
|
|
107284
107759
|
},
|
|
107285
107760
|
agent: {
|
|
107286
107761
|
appEnv: "agent",
|
|
107287
|
-
supabaseUrl: "
|
|
107288
|
-
supabasePublishableKey: "
|
|
107762
|
+
supabaseUrl: "http://127.0.0.1:55321",
|
|
107763
|
+
supabasePublishableKey: "sb_publishable_ACJWlzQHlZjBrEguHvfOxg_3BJgxAaH",
|
|
107289
107764
|
apiUrl: "http://localhost:3000",
|
|
107290
107765
|
webUrl: "http://localhost:5173"
|
|
107291
107766
|
},
|
|
@@ -107364,77 +107839,6 @@ function readinessError() {
|
|
|
107364
107839
|
|
|
107365
107840
|
// src/init.ts
|
|
107366
107841
|
import { createInterface as createInterface3 } from "node:readline/promises";
|
|
107367
|
-
|
|
107368
|
-
// src/pause.ts
|
|
107369
|
-
function pausedControl(existing, now) {
|
|
107370
|
-
return { ...existing, paused: true, pausedAt: new Date(now).toISOString() };
|
|
107371
|
-
}
|
|
107372
|
-
function resumedControl(existing, now) {
|
|
107373
|
-
return { ...existing, paused: false, resumedAt: new Date(now).toISOString() };
|
|
107374
|
-
}
|
|
107375
|
-
function pauseSyncing(appEnv) {
|
|
107376
|
-
updateCollectorControl(appEnv, (control) => pausedControl(control, Date.now()));
|
|
107377
|
-
}
|
|
107378
|
-
function resumeSyncing(appEnv) {
|
|
107379
|
-
updateCollectorControl(appEnv, (control) => resumedControl(control, Date.now()));
|
|
107380
|
-
}
|
|
107381
|
-
function realPauseDeps(appEnv, resumeCommand2, promptLine) {
|
|
107382
|
-
return {
|
|
107383
|
-
readControl: () => readCollectorControl(appEnv),
|
|
107384
|
-
resume: () => resumeSyncing(appEnv),
|
|
107385
|
-
promptLine,
|
|
107386
|
-
resumeCommand: resumeCommand2,
|
|
107387
|
-
now: Date.now
|
|
107388
|
-
};
|
|
107389
|
-
}
|
|
107390
|
-
function pausedFor(control, now) {
|
|
107391
|
-
if (!control.paused || control.pausedAt === void 0) return null;
|
|
107392
|
-
const ms = now - Date.parse(control.pausedAt);
|
|
107393
|
-
return Number.isFinite(ms) && ms >= 0 ? duration3(ms) : null;
|
|
107394
|
-
}
|
|
107395
|
-
function pausedSince(control, now) {
|
|
107396
|
-
const age = pausedFor(control, now);
|
|
107397
|
-
return age === null ? "Syncing is paused" : `Syncing has been paused for ${age}`;
|
|
107398
|
-
}
|
|
107399
|
-
function pausedNotice(control, resumeCommand2, now) {
|
|
107400
|
-
if (!control.paused) return null;
|
|
107401
|
-
return `! ${pausedSince(control, now)}. To resume sync, run \`${resumeCommand2}\`.`;
|
|
107402
|
-
}
|
|
107403
|
-
function pausedSyncNotice(control, resumeCommand2, now, dryRun) {
|
|
107404
|
-
if (!control.paused || dryRun) return pausedNotice(control, resumeCommand2, now);
|
|
107405
|
-
return `! ${pausedSince(control, now)}. This pass uploads because you asked for it. Background syncing stays paused until you run \`${resumeCommand2}\`.`;
|
|
107406
|
-
}
|
|
107407
|
-
async function offerResume(deps, options) {
|
|
107408
|
-
const { output: output2 } = options;
|
|
107409
|
-
const control = deps.readControl();
|
|
107410
|
-
if (!control.paused) return "not-paused";
|
|
107411
|
-
const now = deps.now();
|
|
107412
|
-
const age = pausedFor(control, now);
|
|
107413
|
-
output2.log(`! ${pausedSince(control, now)}, the background sync is running but uploads nothing`);
|
|
107414
|
-
if (options.promptAllowed && await confirmResume(deps, output2)) {
|
|
107415
|
-
deps.resume();
|
|
107416
|
-
output2.log(
|
|
107417
|
-
`\u2713 Syncing resumed, the background sync is catching up on ${age === null ? "the pause" : `the paused ${age}`}`
|
|
107418
|
-
);
|
|
107419
|
-
return "resumed";
|
|
107420
|
-
}
|
|
107421
|
-
output2.log(`To resume sync, run \`${deps.resumeCommand}\``);
|
|
107422
|
-
return "still-paused";
|
|
107423
|
-
}
|
|
107424
|
-
async function confirmResume(deps, output2) {
|
|
107425
|
-
for (; ; ) {
|
|
107426
|
-
const answer = await deps.promptLine(`${output2.indent}Resume syncing now? [Y/n] `);
|
|
107427
|
-
const normalized = answer?.trim().toLowerCase() ?? "";
|
|
107428
|
-
if (answer === null || normalized === "n" || normalized === "no") return false;
|
|
107429
|
-
if (normalized === "" || normalized === "y" || normalized === "yes") return true;
|
|
107430
|
-
output2.log('Please answer "y" or "n".');
|
|
107431
|
-
}
|
|
107432
|
-
}
|
|
107433
|
-
|
|
107434
|
-
// src/protectedFolders.ts
|
|
107435
|
-
var MACOS_BLOCKED_FOLDER_REMEDY = "To allow it, open System Settings > Privacy & Security > Files and Folders, enable the folder for node, then run `powerplant init`.";
|
|
107436
|
-
|
|
107437
|
-
// src/init.ts
|
|
107438
107842
|
var INIT_PREFLIGHT_LABELS = {
|
|
107439
107843
|
move: "Finishing background sync setup\u2026",
|
|
107440
107844
|
restart: "Restarting background sync\u2026"
|
|
@@ -107772,276 +108176,6 @@ function runResumeSession(source, sessionId, deps = {}) {
|
|
|
107772
108176
|
}
|
|
107773
108177
|
}
|
|
107774
108178
|
|
|
107775
|
-
// src/version.ts
|
|
107776
|
-
var CLI_VERSION = true ? "0.4.42" : "0.0.0-checkout";
|
|
107777
|
-
var CLI_RELEASE_BUILD = true ? true : false;
|
|
107778
|
-
var CLI_DEVELOPMENT_COPY = false;
|
|
107779
|
-
function updateRefusal(tarball, developmentCopy = CLI_DEVELOPMENT_COPY) {
|
|
107780
|
-
if (!developmentCopy || tarball) return null;
|
|
107781
|
-
return "This development copy installs no release. To update it, run `pnpm --filter @usepowerplant/cli exe:install-dev` in your checkout.";
|
|
107782
|
-
}
|
|
107783
|
-
|
|
107784
|
-
// src/statusReport.ts
|
|
107785
|
-
var block = (line, ...details) => ({ line, details });
|
|
107786
|
-
function run(i, args) {
|
|
107787
|
-
return `\`powerplant ${args}${i.config.appEnv === "production" ? "" : ` --env ${i.config.appEnv}`}\``;
|
|
107788
|
-
}
|
|
107789
|
-
function renderStatus(i, out) {
|
|
107790
|
-
const stopping = syncProblems(i);
|
|
107791
|
-
const sections = [
|
|
107792
|
-
...stopping.map((problem) => [problem]),
|
|
107793
|
-
machineBlock(i, stopping.length === 0),
|
|
107794
|
-
...warnings(i).map((warning2) => [warning2]),
|
|
107795
|
-
i.connections.map((connection) => mcpBlock(i, connection)),
|
|
107796
|
-
[cliBlock(i, stopping.length === 0)]
|
|
107797
|
-
];
|
|
107798
|
-
sections.filter((section) => section.length > 0).forEach((section, index) => {
|
|
107799
|
-
if (index > 0) out.log("");
|
|
107800
|
-
for (const { line, details } of section) {
|
|
107801
|
-
out.log(line);
|
|
107802
|
-
details.forEach(out.detail);
|
|
107803
|
-
}
|
|
107804
|
-
});
|
|
107805
|
-
}
|
|
107806
|
-
function daemonStatus(i) {
|
|
107807
|
-
return "status" in i.daemon ? i.daemon.status : null;
|
|
107808
|
-
}
|
|
107809
|
-
function syncProblems(i) {
|
|
107810
|
-
if (i.credentialsError !== void 0) {
|
|
107811
|
-
return [block(`\u2717 ${i.credentialsError}`, `Run ${run(i, "init")} to enroll again.`)];
|
|
107812
|
-
}
|
|
107813
|
-
if (i.credentials === null) return [block("! Not enrolled", `Run ${run(i, "init")}.`)];
|
|
107814
|
-
const problems = [];
|
|
107815
|
-
if (i.control.paused) {
|
|
107816
|
-
problems.push(block(`! ${pausedSince(i.control, i.now)}`, `To resume sync, run ${run(i, "resume")}.`));
|
|
107817
|
-
}
|
|
107818
|
-
if (workspacesAfterLeavingHome(i.credentials)?.length === 0) {
|
|
107819
|
-
problems.push(block("! Not a member of any workspace", "Syncing starts again when a workspace adds you."));
|
|
107820
|
-
}
|
|
107821
|
-
const service = serviceProblem(i);
|
|
107822
|
-
if (service !== null) problems.push(service);
|
|
107823
|
-
const status = i.daemon.state === "running" && !i.control.paused ? i.daemon.status : null;
|
|
107824
|
-
const problem = status && syncProblem(i.credentials, status, run(i, "doctor"));
|
|
107825
|
-
if (problem) problems.push(block(problem.line, problem.detail));
|
|
107826
|
-
return problems;
|
|
107827
|
-
}
|
|
107828
|
-
function unavailableProbe(i) {
|
|
107829
|
-
return block(
|
|
107830
|
-
`! Background sync status unavailable${i.serviceError ? `, ${i.serviceError}` : ""}`,
|
|
107831
|
-
`Run ${run(i, "doctor")} for diagnostics.`
|
|
107832
|
-
);
|
|
107833
|
-
}
|
|
107834
|
-
function serviceProblem(i) {
|
|
107835
|
-
switch (i.service) {
|
|
107836
|
-
case "unavailable":
|
|
107837
|
-
break;
|
|
107838
|
-
case "unsupported":
|
|
107839
|
-
return block(
|
|
107840
|
-
"! Background sync is not supported on this platform yet",
|
|
107841
|
-
`Run ${run(i, "sync")} on a schedule instead.`
|
|
107842
|
-
);
|
|
107843
|
-
case "not-installed":
|
|
107844
|
-
return block("! Background sync is not installed", `Run ${run(i, "init")}.`);
|
|
107845
|
-
case "not-loaded":
|
|
107846
|
-
return block("! Background sync is installed but not loaded", `Run ${run(i, "restart")}.`);
|
|
107847
|
-
case "loaded":
|
|
107848
|
-
break;
|
|
107849
|
-
}
|
|
107850
|
-
switch (i.daemon.state) {
|
|
107851
|
-
case "unreadable":
|
|
107852
|
-
return block(
|
|
107853
|
-
"! Background sync status file is unreadable",
|
|
107854
|
-
`A different version may have written it. Run ${run(i, "restart")}.`
|
|
107855
|
-
);
|
|
107856
|
-
case "not-running":
|
|
107857
|
-
if (i.service === "unavailable") return unavailableProbe(i);
|
|
107858
|
-
return block(
|
|
107859
|
-
"! Background sync has not reported its status",
|
|
107860
|
-
`It may still be starting. If this persists, run ${run(i, "restart")}.`,
|
|
107861
|
-
`The log is at ${serviceLogPath2(i.config.appEnv)}.`
|
|
107862
|
-
);
|
|
107863
|
-
case "stalled":
|
|
107864
|
-
return block(`\u2717 Background sync stalled, no heartbeat for ${duration3(i.daemon.staleMs)}`, `Run ${run(i, "restart")}.`);
|
|
107865
|
-
case "restarting":
|
|
107866
|
-
return block("! Background sync is restarting", "It starts again within a minute.");
|
|
107867
|
-
case "running":
|
|
107868
|
-
return null;
|
|
107869
|
-
}
|
|
107870
|
-
}
|
|
107871
|
-
function machineBlock(i, syncing) {
|
|
107872
|
-
const credentials = i.credentials;
|
|
107873
|
-
if (credentials === null) return [];
|
|
107874
|
-
const org = syncWorkspaceName(credentials);
|
|
107875
|
-
const status = daemonStatus(i);
|
|
107876
|
-
const coverage = syncCoverage(credentials, status, run(i, "doctor"));
|
|
107877
|
-
const line = syncing ? coverage.headline(`${credentials.machineName}${org ? ` to ${org}` : ""}`) : `${credentials.machineName}${org ? ` in ${org}` : ""}`;
|
|
107878
|
-
const details = [`${describeStoredCaptureSummary(credentials)}.`, ...coverage.details];
|
|
107879
|
-
if (status !== null) {
|
|
107880
|
-
const signals = describeSyncSignals(
|
|
107881
|
-
{
|
|
107882
|
-
lastSessionActivityAt: status.lastUploadAt ?? null,
|
|
107883
|
-
lastCheckedInAt: status.lastPass?.at ?? null,
|
|
107884
|
-
syncPaused: null,
|
|
107885
|
-
lastSyncErrorAt: syncFailure(credentials, status)?.at ?? null
|
|
107886
|
-
},
|
|
107887
|
-
new Date(i.now),
|
|
107888
|
-
"last upload unmeasured"
|
|
107889
|
-
);
|
|
107890
|
-
details.push(signals ?? "No sync has run since background sync started.");
|
|
107891
|
-
}
|
|
107892
|
-
return [block(line, ...details)];
|
|
107893
|
-
}
|
|
107894
|
-
function warnings(i) {
|
|
107895
|
-
const found = [];
|
|
107896
|
-
if (i.moveToInstalledCopy === true) found.push(block(`! Run ${run(i, "init")} to finish moving to the new install`));
|
|
107897
|
-
if (isUnsupportedVersion(i.cliVersion, i.oldestSupportedVersion)) {
|
|
107898
|
-
found.push(
|
|
107899
|
-
block(
|
|
107900
|
-
`! powerplant ${i.cliVersion} is no longer supported, the oldest supported is ${i.oldestSupportedVersion}`,
|
|
107901
|
-
`Run ${run(i, "update")} (or npm install -g @usepowerplant/cli). Unsupported versions can stop working without notice.`
|
|
107902
|
-
)
|
|
107903
|
-
);
|
|
107904
|
-
}
|
|
107905
|
-
for (const entry of i.protectedSessions ?? []) {
|
|
107906
|
-
const sessions = `${entry.sessionCount} recent agent session${entry.sessionCount === 1 ? "" : "s"}`;
|
|
107907
|
-
const staying = entry.sessionCount === 1 ? "is staying local" : "are staying local";
|
|
107908
|
-
found.push(
|
|
107909
|
-
i.credentials !== null && protectedRootReview(i.credentials, entry.root) === "blocked" ? block(
|
|
107910
|
-
`! macOS is blocking Powerplant from reading ${entry.displayRoot}`,
|
|
107911
|
-
`${sessions} ${staying}. ${MACOS_BLOCKED_FOLDER_REMEDY}`
|
|
107912
|
-
) : block(
|
|
107913
|
-
`! ${sessions} under ${entry.displayRoot} ${staying}`,
|
|
107914
|
-
`Run ${run(i, "init")} to review Git repository scanning.`
|
|
107915
|
-
)
|
|
107916
|
-
);
|
|
107917
|
-
}
|
|
107918
|
-
if (i.service === "unavailable" && i.daemon.state !== "not-running") found.push(unavailableProbe(i));
|
|
107919
|
-
if (i.mcpPreferencesError !== void 0) found.push(block("! MCP choices can't be read", i.mcpPreferencesError));
|
|
107920
|
-
for (const hook of daemonStatus(i)?.hooks ?? []) {
|
|
107921
|
-
const silence = hookWarning(hook, i.now);
|
|
107922
|
-
if (silence) found.push(block(`! ${silence.problem}`, silence.fix));
|
|
107923
|
-
}
|
|
107924
|
-
return found;
|
|
107925
|
-
}
|
|
107926
|
-
function mcpBlock(i, connection) {
|
|
107927
|
-
const name = `${AGENT_DISPLAY_NAMES[connection.client]}${connection.target ? ` (${connection.target})` : ""}`;
|
|
107928
|
-
const fix = `Run ${run(i, `connect --client ${connection.client}`)}.`;
|
|
107929
|
-
const current = connectionIsCurrent(connection, i.now);
|
|
107930
|
-
const checked2 = current ? "" : `, checked ${ago(i.now - Date.parse(connection.checkedAt))}`;
|
|
107931
|
-
switch (connection.state) {
|
|
107932
|
-
case "signed-in":
|
|
107933
|
-
return block(`${current ? "\u2713 " : ""}${name}: MCP connected${checked2}`);
|
|
107934
|
-
case "sign-in-needed":
|
|
107935
|
-
return block(`! ${name}: MCP sign-in needed${checked2}`, fix);
|
|
107936
|
-
case "different-url":
|
|
107937
|
-
return block(
|
|
107938
|
-
`! ${name}: MCP points at a different Powerplant${connection.registeredUrl ? `, ${connection.registeredUrl}` : ""}`,
|
|
107939
|
-
fix
|
|
107940
|
-
);
|
|
107941
|
-
case "not-connected":
|
|
107942
|
-
return i.mcpPreferences?.clients[connection.client]?.optedIn === true ? block(`! ${name}: MCP not connected`, fix) : block(`${name}: MCP not connected`);
|
|
107943
|
-
case "configured":
|
|
107944
|
-
return block(`${name}: MCP configured, sign-in unknown`);
|
|
107945
|
-
case "check-failed":
|
|
107946
|
-
return block(`${name}: MCP check failed${connection.detail ? `, ${connection.detail}` : ""}`);
|
|
107947
|
-
}
|
|
107948
|
-
}
|
|
107949
|
-
function cliBlock(i, syncing) {
|
|
107950
|
-
const details = [];
|
|
107951
|
-
if (i.daemon.state === "running" && i.daemon.status.version !== i.cliVersion) {
|
|
107952
|
-
details.push(
|
|
107953
|
-
`Background sync is on ${i.daemon.status.version}. It restarts onto the installed version within minutes, or now with ${run(i, "restart")}.`
|
|
107954
|
-
);
|
|
107955
|
-
}
|
|
107956
|
-
const automatic = automaticUpdatesChoice(i.control);
|
|
107957
|
-
const version2 = `powerplant ${i.cliVersion}`;
|
|
107958
|
-
if (isUpdateAvailable(i.cliVersion, i.latestVersion) && !isUnsupportedVersion(i.cliVersion, i.oldestSupportedVersion)) {
|
|
107959
|
-
return block(`${version2}, ${i.latestVersion} is available`, ...details, `Run ${run(i, "update")}.`);
|
|
107960
|
-
}
|
|
107961
|
-
if (automatic === "not-chosen" && syncing) {
|
|
107962
|
-
details.push(`Turn them on with ${run(i, "update --automatic on")}.`);
|
|
107963
|
-
}
|
|
107964
|
-
return block(`${version2}, automatic updates ${automatic === "on" ? "on" : "off"}`, ...details);
|
|
107965
|
-
}
|
|
107966
|
-
function statusJson(i) {
|
|
107967
|
-
return {
|
|
107968
|
-
appEnv: i.config.appEnv,
|
|
107969
|
-
apiUrl: i.config.apiUrl,
|
|
107970
|
-
cliVersion: i.cliVersion,
|
|
107971
|
-
latestVersion: i.latestVersion,
|
|
107972
|
-
oldestSupportedVersion: i.oldestSupportedVersion,
|
|
107973
|
-
// null = couldn't tell (no line drawn, or this isn't a release build).
|
|
107974
|
-
supported: supportedFlag(i.cliVersion, i.oldestSupportedVersion),
|
|
107975
|
-
enrolled: i.credentials !== null,
|
|
107976
|
-
...i.credentials && {
|
|
107977
|
-
machineId: i.credentials.machineId,
|
|
107978
|
-
machineName: i.credentials.machineName,
|
|
107979
|
-
orgId: i.credentials.orgId ?? null,
|
|
107980
|
-
orgName: i.credentials.orgName ?? null,
|
|
107981
|
-
capture: describeStoredCapture(i.credentials)
|
|
107982
|
-
},
|
|
107983
|
-
protectedRepoDiscoveryNeeded: (i.protectedSessions ?? []).map((entry) => ({
|
|
107984
|
-
displayRoot: entry.displayRoot,
|
|
107985
|
-
sessionCount: entry.sessionCount,
|
|
107986
|
-
// The member said yes and macOS refused: System Settings, not init,
|
|
107987
|
-
// is the fix, so a tool rendering this must not say "review".
|
|
107988
|
-
blockedByMacOS: i.credentials !== null && protectedRootReview(i.credentials, entry.root) === "blocked"
|
|
107989
|
-
})),
|
|
107990
|
-
...i.credentialsError !== void 0 && { credentialsError: i.credentialsError },
|
|
107991
|
-
service: i.service,
|
|
107992
|
-
...i.serviceError !== void 0 && { serviceError: i.serviceError },
|
|
107993
|
-
moveToInstalledCopy: i.moveToInstalledCopy === true,
|
|
107994
|
-
...i.credentialStore !== void 0 && { credentialStore: i.credentialStore },
|
|
107995
|
-
...i.credentialStoreError !== void 0 && { credentialStoreError: i.credentialStoreError },
|
|
107996
|
-
...i.credentialMigration !== void 0 && { credentialMigration: i.credentialMigration },
|
|
107997
|
-
// "unreadable" passes through as its own state — a tool must be able to
|
|
107998
|
-
// tell "the daemon's report can't be parsed" from "the daemon is dead",
|
|
107999
|
-
// exactly like the human rendering above.
|
|
108000
|
-
daemon: "status" in i.daemon ? { state: i.daemon.state, ...i.daemon.status } : { state: i.daemon.state },
|
|
108001
|
-
paused: i.control.paused,
|
|
108002
|
-
automaticUpdates: automaticUpdatesChoice(i.control),
|
|
108003
|
-
pausedAt: i.control.pausedAt ?? null,
|
|
108004
|
-
// The same saved checks the human rendering reads, each with when it ran.
|
|
108005
|
-
mcpConnections: i.connections
|
|
108006
|
-
};
|
|
108007
|
-
}
|
|
108008
|
-
function supportedFlag(cliVersion2, oldestSupportedVersion) {
|
|
108009
|
-
if (oldestSupportedVersion === null) return null;
|
|
108010
|
-
const order = compareReleaseVersions(cliVersion2, oldestSupportedVersion);
|
|
108011
|
-
return order === null ? null : order !== -1;
|
|
108012
|
-
}
|
|
108013
|
-
var npmLatestSchema = external_exports.object({ version: external_exports.string().min(1) });
|
|
108014
|
-
async function fetchDistTag(packageName, distTag, fetchImpl = fetch) {
|
|
108015
|
-
try {
|
|
108016
|
-
const response = await fetchImpl(
|
|
108017
|
-
`https://registry.npmjs.org/${encodeURIComponent(packageName)}/${distTag}`,
|
|
108018
|
-
{ signal: AbortSignal.timeout(3e3) }
|
|
108019
|
-
);
|
|
108020
|
-
if (response.status === 404) return { kind: "absent" };
|
|
108021
|
-
if (!response.ok) return { kind: "unreachable" };
|
|
108022
|
-
const parsed = npmLatestSchema.safeParse(await response.json());
|
|
108023
|
-
return parsed.success ? { kind: "found", version: parsed.data.version } : { kind: "unreachable" };
|
|
108024
|
-
} catch {
|
|
108025
|
-
return { kind: "unreachable" };
|
|
108026
|
-
}
|
|
108027
|
-
}
|
|
108028
|
-
async function fetchNewestRelease(packageName, fetchImpl = fetch) {
|
|
108029
|
-
const next = await fetchDistTag(packageName, "next", fetchImpl);
|
|
108030
|
-
if (next.kind === "found") return next.version;
|
|
108031
|
-
if (next.kind === "unreachable") return null;
|
|
108032
|
-
const latest2 = await fetchDistTag(packageName, "latest", fetchImpl);
|
|
108033
|
-
return latest2.kind === "found" ? latest2.version : null;
|
|
108034
|
-
}
|
|
108035
|
-
function releaseSource(appEnv) {
|
|
108036
|
-
return appEnv === "production" ? "promoted" : "npm";
|
|
108037
|
-
}
|
|
108038
|
-
function fetchVersionFacts(appEnv, credentials, packageName, fetchImpl = fetch, developmentCopy = CLI_DEVELOPMENT_COPY) {
|
|
108039
|
-
if (developmentCopy) return Promise.resolve([null, null]);
|
|
108040
|
-
const policy = credentials === null ? Promise.resolve(null) : fetchVersionPolicy(credentials.apiUrl, credentials.token, fetchImpl);
|
|
108041
|
-
const latest2 = releaseSource(appEnv) === "npm" ? fetchNewestRelease(packageName, fetchImpl) : policy.then((found) => found?.promotedVersion ?? null);
|
|
108042
|
-
return Promise.all([latest2, policy.then((found) => found?.oldestSupportedVersion ?? null)]);
|
|
108043
|
-
}
|
|
108044
|
-
|
|
108045
108179
|
// src/installProgress.ts
|
|
108046
108180
|
function installProgress(writer, update) {
|
|
108047
108181
|
const show = () => update ? () => {
|
|
@@ -108064,7 +108198,7 @@ function installProgress(writer, update) {
|
|
|
108064
108198
|
// src/credentialUpgrade.ts
|
|
108065
108199
|
import { spawn as spawn7 } from "node:child_process";
|
|
108066
108200
|
import { closeSync as closeSync12, mkdirSync as mkdirSync31, openSync as openSync12 } from "node:fs";
|
|
108067
|
-
import
|
|
108201
|
+
import path67 from "node:path";
|
|
108068
108202
|
async function prepareCredentialUpgrade(deps) {
|
|
108069
108203
|
if (!deps.needsMigration()) return "ready";
|
|
108070
108204
|
if (!deps.movesSync && !deps.serviceExists() || deps.block() === null) return "ready";
|
|
@@ -108104,7 +108238,7 @@ async function prepareCredentialUpgrade(deps) {
|
|
|
108104
108238
|
}
|
|
108105
108239
|
}
|
|
108106
108240
|
async function tryCredentialUpgradeLock(file2) {
|
|
108107
|
-
mkdirSync31(
|
|
108241
|
+
mkdirSync31(path67.dirname(file2), { recursive: true, mode: 448 });
|
|
108108
108242
|
closeSync12(openSync12(file2, "a", 384));
|
|
108109
108243
|
const child = spawn7("/usr/bin/lockf", ["-k", "-s", "-t", "0", file2, "/bin/sh", "-c", "printf 'ready\\n'; exec /bin/cat >/dev/null"], {
|
|
108110
108244
|
detached: true,
|
|
@@ -108224,21 +108358,28 @@ async function tryCredentialUpgradeLock(file2) {
|
|
|
108224
108358
|
// src/menubarApp.ts
|
|
108225
108359
|
import { existsSync as existsSync21, mkdirSync as mkdirSync32, renameSync as renameSync7, rmSync as rmSync17 } from "node:fs";
|
|
108226
108360
|
import os31 from "node:os";
|
|
108227
|
-
import
|
|
108228
|
-
import { spawnSync as
|
|
108361
|
+
import path68 from "node:path";
|
|
108362
|
+
import { spawnSync as spawnSync9 } from "node:child_process";
|
|
108229
108363
|
var MENUBAR_APP_ZIP = "dist/menubar/Powerplant.app.zip";
|
|
108230
108364
|
var MENUBAR_APP_NAME = "Powerplant.app";
|
|
108231
108365
|
var UNREGISTER_LOGIN_ITEM_FLAG = "--unregister-login-item";
|
|
108232
108366
|
var UNREGISTER_TIMEOUT_MS = 1e4;
|
|
108233
108367
|
var FIRST_LAUNCH_ATTEMPT_KEY = "registeredLaunchAtLoginOnFirstLaunch";
|
|
108234
108368
|
function forgetFirstLaunchAttempt(domain2) {
|
|
108235
|
-
const
|
|
108236
|
-
|
|
108237
|
-
|
|
108238
|
-
|
|
108369
|
+
for (const key of [FIRST_LAUNCH_ATTEMPT_KEY, "launchAtLoginEnabled"]) {
|
|
108370
|
+
const result = spawnSync9("/usr/bin/defaults", ["delete", domain2, key], {
|
|
108371
|
+
encoding: "utf8",
|
|
108372
|
+
timeout: 1e4
|
|
108373
|
+
});
|
|
108374
|
+
if (result.status === 0) continue;
|
|
108375
|
+
const detail = result.error?.message ?? result.stderr.trim();
|
|
108376
|
+
if (!/does not exist|Could not find key|not found/.test(detail))
|
|
108377
|
+
return detail || `exit ${result.status ?? result.signal}`;
|
|
108378
|
+
}
|
|
108379
|
+
return null;
|
|
108239
108380
|
}
|
|
108240
108381
|
function menubarAppPaths(homeDir) {
|
|
108241
|
-
return [
|
|
108382
|
+
return [path68.join(homeDir, "Applications", MENUBAR_APP_NAME), path68.join("/Applications", MENUBAR_APP_NAME)];
|
|
108242
108383
|
}
|
|
108243
108384
|
async function syncMenubarApp(ops, context3) {
|
|
108244
108385
|
const zip = ops.packagedZip();
|
|
@@ -108295,21 +108436,21 @@ function realMenubarAppOps(input2) {
|
|
|
108295
108436
|
throw new Error(`the running app at ${appPath} did not quit`);
|
|
108296
108437
|
},
|
|
108297
108438
|
replace: (zip, appPath) => {
|
|
108298
|
-
const parent =
|
|
108439
|
+
const parent = path68.dirname(appPath);
|
|
108299
108440
|
mkdirSync32(parent, { recursive: true });
|
|
108300
|
-
const staging =
|
|
108301
|
-
const retired =
|
|
108441
|
+
const staging = path68.join(parent, `.${MENUBAR_APP_NAME}.swap-${process.pid}`);
|
|
108442
|
+
const retired = path68.join(parent, `.${MENUBAR_APP_NAME}.old-${process.pid}`);
|
|
108302
108443
|
rmSync17(staging, { recursive: true, force: true });
|
|
108303
108444
|
rmSync17(retired, { recursive: true, force: true });
|
|
108304
108445
|
try {
|
|
108305
|
-
const extract =
|
|
108446
|
+
const extract = spawnSync9("ditto", ["-xk", zip, staging]);
|
|
108306
108447
|
if (extract.status !== 0) {
|
|
108307
108448
|
throw new Error(
|
|
108308
108449
|
`ditto could not extract ${zip} (${extract.stderr?.toString().trim() || `exit ${extract.status}`})`
|
|
108309
108450
|
);
|
|
108310
108451
|
}
|
|
108311
|
-
const extracted =
|
|
108312
|
-
if (!existsSync21(
|
|
108452
|
+
const extracted = path68.join(staging, MENUBAR_APP_NAME);
|
|
108453
|
+
if (!existsSync21(path68.join(extracted, "Contents", "Info.plist"))) {
|
|
108313
108454
|
throw new Error(`${zip} does not contain ${MENUBAR_APP_NAME}`);
|
|
108314
108455
|
}
|
|
108315
108456
|
const hadOld = existsSync21(appPath);
|
|
@@ -108326,7 +108467,7 @@ function realMenubarAppOps(input2) {
|
|
|
108326
108467
|
}
|
|
108327
108468
|
},
|
|
108328
108469
|
launch: (appPath) => {
|
|
108329
|
-
const result =
|
|
108470
|
+
const result = spawnSync9("open", ["-g", appPath]);
|
|
108330
108471
|
if (result.status !== 0) {
|
|
108331
108472
|
throw new Error(
|
|
108332
108473
|
`open could not launch ${appPath} (${result.stderr?.toString().trim() || `exit ${result.status}`})`
|
|
@@ -108347,7 +108488,7 @@ function removeMenubarApp(appPaths, options) {
|
|
|
108347
108488
|
if (Date.now() >= deadline) throw new Error(`the running app at ${appPath} did not quit`);
|
|
108348
108489
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 250);
|
|
108349
108490
|
}
|
|
108350
|
-
const result =
|
|
108491
|
+
const result = spawnSync9(path68.join(appPath, "Contents", "MacOS", "PowerplantMenubar"), [UNREGISTER_LOGIN_ITEM_FLAG], {
|
|
108351
108492
|
encoding: "utf8",
|
|
108352
108493
|
timeout: unregisterTimeoutMs
|
|
108353
108494
|
});
|
|
@@ -108360,8 +108501,8 @@ function unregisterFailure(result, timeoutMs) {
|
|
|
108360
108501
|
return result.error?.message ?? (result.stderr.trim().split("\n")[0] || `exit ${result.status ?? result.signal}`);
|
|
108361
108502
|
}
|
|
108362
108503
|
function appProcessIds(appPath) {
|
|
108363
|
-
const executable =
|
|
108364
|
-
const result =
|
|
108504
|
+
const executable = path68.join(appPath, "Contents", "MacOS", "PowerplantMenubar");
|
|
108505
|
+
const result = spawnSync9("ps", ["-axo", "pid=,comm="], { encoding: "utf8" });
|
|
108365
108506
|
if (result.status !== 0) {
|
|
108366
108507
|
throw new Error(`ps could not list processes (${result.error?.message ?? `exit ${result.status}`})`);
|
|
108367
108508
|
}
|
|
@@ -108498,10 +108639,10 @@ var workspaceSchema = external_exports.object({
|
|
|
108498
108639
|
active: external_exports.boolean()
|
|
108499
108640
|
});
|
|
108500
108641
|
var FETCH_TIMEOUT_MS2 = 1e4;
|
|
108501
|
-
async function callApi(credentials,
|
|
108642
|
+
async function callApi(credentials, path70, init3, fetchImpl) {
|
|
108502
108643
|
let response;
|
|
108503
108644
|
try {
|
|
108504
|
-
response = await fetchImpl(`${credentials.apiUrl}${
|
|
108645
|
+
response = await fetchImpl(`${credentials.apiUrl}${path70}`, {
|
|
108505
108646
|
...init3,
|
|
108506
108647
|
headers: {
|
|
108507
108648
|
authorization: `Bearer ${credentials.token}`,
|
|
@@ -108520,7 +108661,7 @@ async function callApi(credentials, path69, init3, fetchImpl) {
|
|
|
108520
108661
|
);
|
|
108521
108662
|
}
|
|
108522
108663
|
if (!response.ok) {
|
|
108523
|
-
throw new ExpectedCliError(`Powerplant answered ${response.status} for ${
|
|
108664
|
+
throw new ExpectedCliError(`Powerplant answered ${response.status} for ${path70}.`);
|
|
108524
108665
|
}
|
|
108525
108666
|
return response.json();
|
|
108526
108667
|
}
|
|
@@ -108600,7 +108741,8 @@ Commands:
|
|
|
108600
108741
|
enroll (Re-)enroll this machine into your org (browser approval).
|
|
108601
108742
|
status What the background sync is doing on this machine (--json for tools).
|
|
108602
108743
|
doctor A diagnostics summary for support: status plus the redacted
|
|
108603
|
-
tail of the background sync log.
|
|
108744
|
+
tail of the background sync log. Nothing is uploaded.
|
|
108745
|
+
--repair-menu-startup enables the Mac menu at login.
|
|
108604
108746
|
Paste the output into your email to support@usepowerplant.com.
|
|
108605
108747
|
update Update this CLI to the latest published version, using the
|
|
108606
108748
|
package manager that installed it, and restart background sync.
|
|
@@ -108665,6 +108807,7 @@ function parseCliArgs() {
|
|
|
108665
108807
|
"dry-run": { type: "boolean", default: false },
|
|
108666
108808
|
json: { type: "boolean", default: false },
|
|
108667
108809
|
forget: { type: "boolean", default: false },
|
|
108810
|
+
"repair-menu-startup": { type: "boolean", default: false },
|
|
108668
108811
|
// Internal: connect reports unfinished login as failure to the menu.
|
|
108669
108812
|
// For update, hands the update to a
|
|
108670
108813
|
// detached copy of this command so the app's verb deadline can't kill
|
|
@@ -108714,6 +108857,9 @@ ${USAGE}`);
|
|
|
108714
108857
|
}
|
|
108715
108858
|
const command = positionals[0];
|
|
108716
108859
|
cliCommand = command ?? "none";
|
|
108860
|
+
if (values["repair-menu-startup"] && command !== "doctor") {
|
|
108861
|
+
throw new ExpectedCliError("Use powerplant doctor --repair-menu-startup to enable menu startup.");
|
|
108862
|
+
}
|
|
108717
108863
|
if (values.help || command === void 0 || command === "help") {
|
|
108718
108864
|
console.log(USAGE);
|
|
108719
108865
|
return;
|
|
@@ -108792,7 +108938,7 @@ ${USAGE}`);
|
|
|
108792
108938
|
changed = true;
|
|
108793
108939
|
},
|
|
108794
108940
|
startingNextWorker: () => describeDaemonState(readCollectorStatus(config2.appEnv)).state === "restarting",
|
|
108795
|
-
tryLock: () => tryCredentialUpgradeLock(
|
|
108941
|
+
tryLock: () => tryCredentialUpgradeLock(path69.join(collectorStateDir(), `credential-upgrade-${config2.appEnv}.lock`)),
|
|
108796
108942
|
now: Date.now,
|
|
108797
108943
|
sleep: () => new Promise((resolve2) => setTimeout(resolve2, 250)),
|
|
108798
108944
|
savesCredentials: command !== "menu",
|
|
@@ -109080,33 +109226,19 @@ The access you granted these agents stays on your Powerplant account until you r
|
|
|
109080
109226
|
return;
|
|
109081
109227
|
}
|
|
109082
109228
|
case "doctor": {
|
|
109083
|
-
const
|
|
109084
|
-
|
|
109085
|
-
|
|
109086
|
-
|
|
109087
|
-
|
|
109088
|
-
|
|
109089
|
-
|
|
109090
|
-
|
|
109229
|
+
const result = await runDoctor({
|
|
109230
|
+
config: config2,
|
|
109231
|
+
repairMenuStartup: values["repair-menu-startup"],
|
|
109232
|
+
menuStartupSupported: managesMenubarApp(config2),
|
|
109233
|
+
activity: terminal.command.activity,
|
|
109234
|
+
readService: () => readServiceSafelyAsync(copy.service),
|
|
109235
|
+
readCredentials: () => loadCredentialsSafely(config2),
|
|
109236
|
+
readCredentialStore: () => readCredentialStoreSafely(config2),
|
|
109237
|
+
inspectInstall: () => inspectThisInstall(copy),
|
|
109238
|
+
installedApp: () => menubarAppOps(copy).installedApp()
|
|
109091
109239
|
});
|
|
109092
|
-
|
|
109093
|
-
|
|
109094
|
-
config: config2,
|
|
109095
|
-
cliVersion: CLI_VERSION,
|
|
109096
|
-
latestVersion: found.latestVersion,
|
|
109097
|
-
oldestSupportedVersion: found.oldestSupportedVersion,
|
|
109098
|
-
nodeVersion: process.version,
|
|
109099
|
-
platform: `${process.platform} ${process.arch}`,
|
|
109100
|
-
install: inspectThisInstall(copy),
|
|
109101
|
-
...found.stored,
|
|
109102
|
-
...found.serviceRead,
|
|
109103
|
-
...readCredentialStoreSafely(config2),
|
|
109104
|
-
daemon: describeDaemonState(readCollectorStatus(config2.appEnv)),
|
|
109105
|
-
control: readCollectorControl(config2.appEnv),
|
|
109106
|
-
logTail: readDoctorLogTail(serviceLogPath2(config2.appEnv)),
|
|
109107
|
-
now: Date.now()
|
|
109108
|
-
}).join("\n")
|
|
109109
|
-
);
|
|
109240
|
+
process.exitCode = result.exitCode;
|
|
109241
|
+
console.log(result.lines.join("\n"));
|
|
109110
109242
|
return;
|
|
109111
109243
|
}
|
|
109112
109244
|
// Deliberately absent from USAGE until the menu-bar app ships — the
|
|
@@ -109481,7 +109613,7 @@ function tarballOption(tarball, sha2562) {
|
|
|
109481
109613
|
if (sha2562 === void 0 || !/^[0-9a-f]{64}$/.test(sha2562)) {
|
|
109482
109614
|
throw new ExpectedCliError("--tarball needs --sha256 with the package's SHA-256 in lowercase hex.");
|
|
109483
109615
|
}
|
|
109484
|
-
return { file:
|
|
109616
|
+
return { file: path69.resolve(tarball), sha256: sha2562 };
|
|
109485
109617
|
}
|
|
109486
109618
|
function thisPowerplant() {
|
|
109487
109619
|
return thisPowerplantCommand(entryPath);
|
|
@@ -109519,7 +109651,7 @@ function backgroundUpdateDeps(config2, copy, target, tarball = null) {
|
|
|
109519
109651
|
readProgress: updateProgress.read,
|
|
109520
109652
|
writeProgress: updateProgress.write,
|
|
109521
109653
|
spawnChild: () => {
|
|
109522
|
-
mkdirSync33(
|
|
109654
|
+
mkdirSync33(path69.dirname(updateLogPath()), { recursive: true });
|
|
109523
109655
|
const log3 = openSync13(updateLogPath(), "a");
|
|
109524
109656
|
const child = spawn8(...spawnArguments(thisPowerplant(), ["update", ...envArgsFor(config2), ...tarballArgs]), {
|
|
109525
109657
|
detached: true,
|
|
@@ -109577,7 +109709,7 @@ function managesMenubarApp(config2) {
|
|
|
109577
109709
|
function menubarAppOps(copy) {
|
|
109578
109710
|
if (copy.kind === "installed") return realMenubarAppOps({ cliVersion: CLI_VERSION, zip: copy.menubarAppZip() });
|
|
109579
109711
|
const { packageDir } = inspectThisInstall(copy);
|
|
109580
|
-
return realMenubarAppOps({ cliVersion: CLI_VERSION, zip: packageDir === null ? null :
|
|
109712
|
+
return realMenubarAppOps({ cliVersion: CLI_VERSION, zip: packageDir === null ? null : path69.join(packageDir, MENUBAR_APP_ZIP) });
|
|
109581
109713
|
}
|
|
109582
109714
|
function moveSyncTo(service, config2, command) {
|
|
109583
109715
|
const state = serviceState2(service);
|
|
@@ -109591,7 +109723,7 @@ async function moveToInstalledCopy(config2, copy) {
|
|
|
109591
109723
|
const { installAvailable } = copy;
|
|
109592
109724
|
const available = await cachedLatestVersion({
|
|
109593
109725
|
now: Date.now(),
|
|
109594
|
-
cacheFile:
|
|
109726
|
+
cacheFile: path69.join(collectorStateDir(), `installed-copy-release-${config2.appEnv}.json`),
|
|
109595
109727
|
readTextFile: realReadTextFile,
|
|
109596
109728
|
writeTextFile: realWriteTextFile,
|
|
109597
109729
|
fetchLatest: () => installAvailable().then((yes) => yes ? "available" : null)
|
|
@@ -109682,4 +109814,4 @@ undici/lib/web/websocket/frame.js:
|
|
|
109682
109814
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
109683
109815
|
*/
|
|
109684
109816
|
|
|
109685
|
-
//# debugId=
|
|
109817
|
+
//# debugId=a6503a7f-2fbf-5844-b1c2-f8d1df4d1607
|