@safetech/inheriti-cli 0.0.23-dev.0 → 0.0.24-dev.0
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
CHANGED
|
@@ -220,9 +220,9 @@ var init_operator_auth = __esm({
|
|
|
220
220
|
RSA_PSS = { name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" };
|
|
221
221
|
OperatorTokenInvalid = class extends Error {
|
|
222
222
|
code;
|
|
223
|
-
constructor(
|
|
224
|
-
super(
|
|
225
|
-
this.code =
|
|
223
|
+
constructor(code3) {
|
|
224
|
+
super(code3);
|
|
225
|
+
this.code = code3;
|
|
226
226
|
this.name = "OperatorTokenInvalid";
|
|
227
227
|
}
|
|
228
228
|
};
|
|
@@ -263,7 +263,7 @@ function asPlanRequestFailed(error2) {
|
|
|
263
263
|
if (error2 instanceof PlanRequestFailed)
|
|
264
264
|
return error2;
|
|
265
265
|
const status = numberOf(error2, "status");
|
|
266
|
-
const
|
|
266
|
+
const code3 = stringOf(error2, "code");
|
|
267
267
|
const requestId = stringOf(error2, "requestId");
|
|
268
268
|
if (status === 401)
|
|
269
269
|
return new PlanRequestFailed("operator_reauthentication_required", status, requestId);
|
|
@@ -271,8 +271,8 @@ function asPlanRequestFailed(error2) {
|
|
|
271
271
|
return new PlanRequestFailed("plan_not_found", status, requestId);
|
|
272
272
|
if (status === 429)
|
|
273
273
|
return new PlanRequestFailed("plan_request_rate_limited", status, requestId);
|
|
274
|
-
if (
|
|
275
|
-
return new PlanRequestFailed(
|
|
274
|
+
if (code3)
|
|
275
|
+
return new PlanRequestFailed(code3, status, requestId);
|
|
276
276
|
if (status && status >= 500)
|
|
277
277
|
return new PlanRequestFailed("elements_api_unavailable", status, requestId);
|
|
278
278
|
return new PlanRequestFailed("plan_request_failed", status, requestId);
|
|
@@ -293,9 +293,9 @@ var init_plans = __esm({
|
|
|
293
293
|
code;
|
|
294
294
|
status;
|
|
295
295
|
requestId;
|
|
296
|
-
constructor(
|
|
297
|
-
super(
|
|
298
|
-
this.code =
|
|
296
|
+
constructor(code3, status, requestId) {
|
|
297
|
+
super(code3);
|
|
298
|
+
this.code = code3;
|
|
299
299
|
this.status = status;
|
|
300
300
|
this.requestId = requestId;
|
|
301
301
|
this.name = "PlanRequestFailed";
|
|
@@ -552,8 +552,8 @@ function assertEnvironmentAllowed(environment, liveConfirmation) {
|
|
|
552
552
|
throw new LiveEnvironmentConfirmationRequired();
|
|
553
553
|
}
|
|
554
554
|
function stableErrorCode(error2) {
|
|
555
|
-
const
|
|
556
|
-
return typeof
|
|
555
|
+
const code3 = error2?.code;
|
|
556
|
+
return typeof code3 === "string" && /^[a-z][a-z0-9_]{2,63}$/u.test(code3) ? code3 : "host_action_failed";
|
|
557
557
|
}
|
|
558
558
|
var LiveEnvironmentConfirmationRequired, ElementsIntegrationCore;
|
|
559
559
|
var init_dist = __esm({
|
|
@@ -15002,8 +15002,8 @@ var require_validation = __commonJS({
|
|
|
15002
15002
|
0
|
|
15003
15003
|
// 112 - 127
|
|
15004
15004
|
];
|
|
15005
|
-
function isValidStatusCode(
|
|
15006
|
-
return
|
|
15005
|
+
function isValidStatusCode(code3) {
|
|
15006
|
+
return code3 >= 1e3 && code3 <= 1014 && code3 !== 1004 && code3 !== 1005 && code3 !== 1006 || code3 >= 3e3 && code3 <= 4999;
|
|
15007
15007
|
}
|
|
15008
15008
|
function _isValidUTF8(buf2) {
|
|
15009
15009
|
const len = buf2.length;
|
|
@@ -15607,11 +15607,11 @@ var require_receiver = __commonJS({
|
|
|
15607
15607
|
this.emit("conclude", 1005, EMPTY_BUFFER);
|
|
15608
15608
|
this.end();
|
|
15609
15609
|
} else {
|
|
15610
|
-
const
|
|
15611
|
-
if (!isValidStatusCode(
|
|
15610
|
+
const code3 = data.readUInt16BE(0);
|
|
15611
|
+
if (!isValidStatusCode(code3)) {
|
|
15612
15612
|
const error2 = this.createError(
|
|
15613
15613
|
RangeError,
|
|
15614
|
-
`invalid status code ${
|
|
15614
|
+
`invalid status code ${code3}`,
|
|
15615
15615
|
true,
|
|
15616
15616
|
1002,
|
|
15617
15617
|
"WS_ERR_INVALID_CLOSE_CODE"
|
|
@@ -15636,7 +15636,7 @@ var require_receiver = __commonJS({
|
|
|
15636
15636
|
return;
|
|
15637
15637
|
}
|
|
15638
15638
|
this._loop = false;
|
|
15639
|
-
this.emit("conclude",
|
|
15639
|
+
this.emit("conclude", code3, buf2);
|
|
15640
15640
|
this.end();
|
|
15641
15641
|
}
|
|
15642
15642
|
this._state = GET_INFO;
|
|
@@ -15826,22 +15826,22 @@ var require_sender = __commonJS({
|
|
|
15826
15826
|
* @param {Function} [cb] Callback
|
|
15827
15827
|
* @public
|
|
15828
15828
|
*/
|
|
15829
|
-
close(
|
|
15829
|
+
close(code3, data, mask, cb) {
|
|
15830
15830
|
let buf2;
|
|
15831
|
-
if (
|
|
15831
|
+
if (code3 === void 0) {
|
|
15832
15832
|
buf2 = EMPTY_BUFFER;
|
|
15833
|
-
} else if (typeof
|
|
15833
|
+
} else if (typeof code3 !== "number" || !isValidStatusCode(code3)) {
|
|
15834
15834
|
throw new TypeError("First argument must be a valid error code number");
|
|
15835
15835
|
} else if (data === void 0 || !data.length) {
|
|
15836
15836
|
buf2 = Buffer.allocUnsafe(2);
|
|
15837
|
-
buf2.writeUInt16BE(
|
|
15837
|
+
buf2.writeUInt16BE(code3, 0);
|
|
15838
15838
|
} else {
|
|
15839
15839
|
const length = Buffer.byteLength(data);
|
|
15840
15840
|
if (length > 123) {
|
|
15841
15841
|
throw new RangeError("The message must not be greater than 123 bytes");
|
|
15842
15842
|
}
|
|
15843
15843
|
buf2 = Buffer.allocUnsafe(2 + length);
|
|
15844
|
-
buf2.writeUInt16BE(
|
|
15844
|
+
buf2.writeUInt16BE(code3, 0);
|
|
15845
15845
|
if (typeof data === "string") {
|
|
15846
15846
|
buf2.write(data, 2);
|
|
15847
15847
|
} else if (isUint8Array2(data)) {
|
|
@@ -16336,9 +16336,9 @@ var require_event_target = __commonJS({
|
|
|
16336
16336
|
callListener(handler2, this, event);
|
|
16337
16337
|
};
|
|
16338
16338
|
} else if (type === "close") {
|
|
16339
|
-
wrapper = function onClose(
|
|
16339
|
+
wrapper = function onClose(code3, message2) {
|
|
16340
16340
|
const event = new CloseEvent("close", {
|
|
16341
|
-
code:
|
|
16341
|
+
code: code3,
|
|
16342
16342
|
reason: message2.toString(),
|
|
16343
16343
|
wasClean: this._closeFrameReceived && this._closeFrameSent
|
|
16344
16344
|
});
|
|
@@ -16422,23 +16422,23 @@ var require_extension = __commonJS({
|
|
|
16422
16422
|
let extensionName;
|
|
16423
16423
|
let paramName;
|
|
16424
16424
|
let start = -1;
|
|
16425
|
-
let
|
|
16425
|
+
let code3 = -1;
|
|
16426
16426
|
let end2 = -1;
|
|
16427
16427
|
let i14 = 0;
|
|
16428
16428
|
for (; i14 < header.length; i14++) {
|
|
16429
|
-
|
|
16429
|
+
code3 = header.charCodeAt(i14);
|
|
16430
16430
|
if (extensionName === void 0) {
|
|
16431
|
-
if (end2 === -1 && tokenChars[
|
|
16431
|
+
if (end2 === -1 && tokenChars[code3] === 1) {
|
|
16432
16432
|
if (start === -1) start = i14;
|
|
16433
|
-
} else if (i14 !== 0 && (
|
|
16433
|
+
} else if (i14 !== 0 && (code3 === 32 || code3 === 9)) {
|
|
16434
16434
|
if (end2 === -1 && start !== -1) end2 = i14;
|
|
16435
|
-
} else if (
|
|
16435
|
+
} else if (code3 === 59 || code3 === 44) {
|
|
16436
16436
|
if (start === -1) {
|
|
16437
16437
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
16438
16438
|
}
|
|
16439
16439
|
if (end2 === -1) end2 = i14;
|
|
16440
16440
|
const name2 = header.slice(start, end2);
|
|
16441
|
-
if (
|
|
16441
|
+
if (code3 === 44) {
|
|
16442
16442
|
push(offers, name2, params);
|
|
16443
16443
|
params = /* @__PURE__ */ Object.create(null);
|
|
16444
16444
|
} else {
|
|
@@ -16449,23 +16449,23 @@ var require_extension = __commonJS({
|
|
|
16449
16449
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
16450
16450
|
}
|
|
16451
16451
|
} else if (paramName === void 0) {
|
|
16452
|
-
if (end2 === -1 && tokenChars[
|
|
16452
|
+
if (end2 === -1 && tokenChars[code3] === 1) {
|
|
16453
16453
|
if (start === -1) start = i14;
|
|
16454
|
-
} else if (
|
|
16454
|
+
} else if (code3 === 32 || code3 === 9) {
|
|
16455
16455
|
if (end2 === -1 && start !== -1) end2 = i14;
|
|
16456
|
-
} else if (
|
|
16456
|
+
} else if (code3 === 59 || code3 === 44) {
|
|
16457
16457
|
if (start === -1) {
|
|
16458
16458
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
16459
16459
|
}
|
|
16460
16460
|
if (end2 === -1) end2 = i14;
|
|
16461
16461
|
push(params, header.slice(start, end2), true);
|
|
16462
|
-
if (
|
|
16462
|
+
if (code3 === 44) {
|
|
16463
16463
|
push(offers, extensionName, params);
|
|
16464
16464
|
params = /* @__PURE__ */ Object.create(null);
|
|
16465
16465
|
extensionName = void 0;
|
|
16466
16466
|
}
|
|
16467
16467
|
start = end2 = -1;
|
|
16468
|
-
} else if (
|
|
16468
|
+
} else if (code3 === 61 && start !== -1 && end2 === -1) {
|
|
16469
16469
|
paramName = header.slice(start, i14);
|
|
16470
16470
|
start = end2 = -1;
|
|
16471
16471
|
} else {
|
|
@@ -16473,30 +16473,30 @@ var require_extension = __commonJS({
|
|
|
16473
16473
|
}
|
|
16474
16474
|
} else {
|
|
16475
16475
|
if (isEscaping) {
|
|
16476
|
-
if (tokenChars[
|
|
16476
|
+
if (tokenChars[code3] !== 1) {
|
|
16477
16477
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
16478
16478
|
}
|
|
16479
16479
|
if (start === -1) start = i14;
|
|
16480
16480
|
else if (!mustUnescape) mustUnescape = true;
|
|
16481
16481
|
isEscaping = false;
|
|
16482
16482
|
} else if (inQuotes) {
|
|
16483
|
-
if (tokenChars[
|
|
16483
|
+
if (tokenChars[code3] === 1) {
|
|
16484
16484
|
if (start === -1) start = i14;
|
|
16485
|
-
} else if (
|
|
16485
|
+
} else if (code3 === 34 && start !== -1) {
|
|
16486
16486
|
inQuotes = false;
|
|
16487
16487
|
end2 = i14;
|
|
16488
|
-
} else if (
|
|
16488
|
+
} else if (code3 === 92) {
|
|
16489
16489
|
isEscaping = true;
|
|
16490
16490
|
} else {
|
|
16491
16491
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
16492
16492
|
}
|
|
16493
|
-
} else if (
|
|
16493
|
+
} else if (code3 === 34 && header.charCodeAt(i14 - 1) === 61) {
|
|
16494
16494
|
inQuotes = true;
|
|
16495
|
-
} else if (end2 === -1 && tokenChars[
|
|
16495
|
+
} else if (end2 === -1 && tokenChars[code3] === 1) {
|
|
16496
16496
|
if (start === -1) start = i14;
|
|
16497
|
-
} else if (start !== -1 && (
|
|
16497
|
+
} else if (start !== -1 && (code3 === 32 || code3 === 9)) {
|
|
16498
16498
|
if (end2 === -1) end2 = i14;
|
|
16499
|
-
} else if (
|
|
16499
|
+
} else if (code3 === 59 || code3 === 44) {
|
|
16500
16500
|
if (start === -1) {
|
|
16501
16501
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
16502
16502
|
}
|
|
@@ -16507,7 +16507,7 @@ var require_extension = __commonJS({
|
|
|
16507
16507
|
mustUnescape = false;
|
|
16508
16508
|
}
|
|
16509
16509
|
push(params, paramName, value2);
|
|
16510
|
-
if (
|
|
16510
|
+
if (code3 === 44) {
|
|
16511
16511
|
push(offers, extensionName, params);
|
|
16512
16512
|
params = /* @__PURE__ */ Object.create(null);
|
|
16513
16513
|
extensionName = void 0;
|
|
@@ -16519,7 +16519,7 @@ var require_extension = __commonJS({
|
|
|
16519
16519
|
}
|
|
16520
16520
|
}
|
|
16521
16521
|
}
|
|
16522
|
-
if (start === -1 || inQuotes ||
|
|
16522
|
+
if (start === -1 || inQuotes || code3 === 32 || code3 === 9) {
|
|
16523
16523
|
throw new SyntaxError("Unexpected end of input");
|
|
16524
16524
|
}
|
|
16525
16525
|
if (end2 === -1) end2 = i14;
|
|
@@ -16810,7 +16810,7 @@ var require_websocket = __commonJS({
|
|
|
16810
16810
|
* closing
|
|
16811
16811
|
* @public
|
|
16812
16812
|
*/
|
|
16813
|
-
close(
|
|
16813
|
+
close(code3, data) {
|
|
16814
16814
|
if (this.readyState === _WebSocket.CLOSED) return;
|
|
16815
16815
|
if (this.readyState === _WebSocket.CONNECTING) {
|
|
16816
16816
|
const msg = "WebSocket was closed before the connection was established";
|
|
@@ -16824,7 +16824,7 @@ var require_websocket = __commonJS({
|
|
|
16824
16824
|
return;
|
|
16825
16825
|
}
|
|
16826
16826
|
this._readyState = _WebSocket.CLOSING;
|
|
16827
|
-
this._sender.close(
|
|
16827
|
+
this._sender.close(code3, data, !this._isServer, (err) => {
|
|
16828
16828
|
if (err) return;
|
|
16829
16829
|
this._closeFrameSent = true;
|
|
16830
16830
|
if (this._closeFrameReceived || this._receiver._writableState.errorEmitted) {
|
|
@@ -17347,16 +17347,16 @@ var require_websocket = __commonJS({
|
|
|
17347
17347
|
process.nextTick(cb, err);
|
|
17348
17348
|
}
|
|
17349
17349
|
}
|
|
17350
|
-
function receiverOnConclude(
|
|
17350
|
+
function receiverOnConclude(code3, reason) {
|
|
17351
17351
|
const websocket = this[kWebSocket];
|
|
17352
17352
|
websocket._closeFrameReceived = true;
|
|
17353
17353
|
websocket._closeMessage = reason;
|
|
17354
|
-
websocket._closeCode =
|
|
17354
|
+
websocket._closeCode = code3;
|
|
17355
17355
|
if (websocket._socket[kWebSocket] === void 0) return;
|
|
17356
17356
|
websocket._socket.removeListener("data", socketOnData);
|
|
17357
17357
|
process.nextTick(resume, websocket._socket);
|
|
17358
|
-
if (
|
|
17359
|
-
else websocket.close(
|
|
17358
|
+
if (code3 === 1005) websocket.close();
|
|
17359
|
+
else websocket.close(code3, reason);
|
|
17360
17360
|
}
|
|
17361
17361
|
function receiverOnDrain() {
|
|
17362
17362
|
const websocket = this[kWebSocket];
|
|
@@ -17562,12 +17562,12 @@ var require_subprotocol = __commonJS({
|
|
|
17562
17562
|
let end2 = -1;
|
|
17563
17563
|
let i14 = 0;
|
|
17564
17564
|
for (i14; i14 < header.length; i14++) {
|
|
17565
|
-
const
|
|
17566
|
-
if (end2 === -1 && tokenChars[
|
|
17565
|
+
const code3 = header.charCodeAt(i14);
|
|
17566
|
+
if (end2 === -1 && tokenChars[code3] === 1) {
|
|
17567
17567
|
if (start === -1) start = i14;
|
|
17568
|
-
} else if (i14 !== 0 && (
|
|
17568
|
+
} else if (i14 !== 0 && (code3 === 32 || code3 === 9)) {
|
|
17569
17569
|
if (end2 === -1 && start !== -1) end2 = i14;
|
|
17570
|
-
} else if (
|
|
17570
|
+
} else if (code3 === 44) {
|
|
17571
17571
|
if (start === -1) {
|
|
17572
17572
|
throw new SyntaxError(`Unexpected character at index ${i14}`);
|
|
17573
17573
|
}
|
|
@@ -17869,9 +17869,9 @@ var require_websocket_server = __commonJS({
|
|
|
17869
17869
|
req
|
|
17870
17870
|
};
|
|
17871
17871
|
if (this.options.verifyClient.length === 2) {
|
|
17872
|
-
this.options.verifyClient(info, (verified,
|
|
17872
|
+
this.options.verifyClient(info, (verified, code3, message2, headers) => {
|
|
17873
17873
|
if (!verified) {
|
|
17874
|
-
return abortHandshake(socket,
|
|
17874
|
+
return abortHandshake(socket, code3 || 401, message2, headers);
|
|
17875
17875
|
}
|
|
17876
17876
|
this.completeUpgrade(
|
|
17877
17877
|
extensions2,
|
|
@@ -17971,8 +17971,8 @@ var require_websocket_server = __commonJS({
|
|
|
17971
17971
|
function socketOnError() {
|
|
17972
17972
|
this.destroy();
|
|
17973
17973
|
}
|
|
17974
|
-
function abortHandshake(socket,
|
|
17975
|
-
message2 = message2 || http.STATUS_CODES[
|
|
17974
|
+
function abortHandshake(socket, code3, message2, headers) {
|
|
17975
|
+
message2 = message2 || http.STATUS_CODES[code3];
|
|
17976
17976
|
headers = {
|
|
17977
17977
|
Connection: "close",
|
|
17978
17978
|
"Content-Type": "text/html",
|
|
@@ -17981,17 +17981,17 @@ var require_websocket_server = __commonJS({
|
|
|
17981
17981
|
};
|
|
17982
17982
|
socket.once("finish", socket.destroy);
|
|
17983
17983
|
socket.end(
|
|
17984
|
-
`HTTP/1.1 ${
|
|
17984
|
+
`HTTP/1.1 ${code3} ${http.STATUS_CODES[code3]}\r
|
|
17985
17985
|
` + Object.keys(headers).map((h14) => `${h14}: ${headers[h14]}`).join("\r\n") + "\r\n\r\n" + message2
|
|
17986
17986
|
);
|
|
17987
17987
|
}
|
|
17988
|
-
function abortHandshakeOrEmitwsClientError(server, req, socket,
|
|
17988
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code3, message2, headers) {
|
|
17989
17989
|
if (server.listenerCount("wsClientError")) {
|
|
17990
17990
|
const err = new Error(message2);
|
|
17991
17991
|
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
17992
17992
|
server.emit("wsClientError", err, socket, req);
|
|
17993
17993
|
} else {
|
|
17994
|
-
abortHandshake(socket,
|
|
17994
|
+
abortHandshake(socket, code3, message2, headers);
|
|
17995
17995
|
}
|
|
17996
17996
|
}
|
|
17997
17997
|
}
|
|
@@ -19649,9 +19649,9 @@ var init_socket2 = __esm({
|
|
|
19649
19649
|
* @return a Promise that will be fulfilled when the server acknowledges the event
|
|
19650
19650
|
*/
|
|
19651
19651
|
emitWithAck(ev2, ...args) {
|
|
19652
|
-
return new Promise((
|
|
19652
|
+
return new Promise((resolve13, reject) => {
|
|
19653
19653
|
const fn3 = (arg1, arg2) => {
|
|
19654
|
-
return arg1 ? reject(arg1) :
|
|
19654
|
+
return arg1 ? reject(arg1) : resolve13(arg2);
|
|
19655
19655
|
};
|
|
19656
19656
|
fn3.withError = true;
|
|
19657
19657
|
args.push(fn3);
|
|
@@ -27159,14 +27159,14 @@ var require_filesystem = __commonJS({
|
|
|
27159
27159
|
});
|
|
27160
27160
|
return buffer.subarray(0, bytesRead);
|
|
27161
27161
|
};
|
|
27162
|
-
var
|
|
27162
|
+
var readFile11 = (path9) => new Promise((resolve13, reject) => {
|
|
27163
27163
|
fs13.open(path9, "r", (err, fd2) => {
|
|
27164
27164
|
if (err) {
|
|
27165
27165
|
reject(err);
|
|
27166
27166
|
} else {
|
|
27167
27167
|
const buffer = Buffer.alloc(MAX_LENGTH);
|
|
27168
27168
|
fs13.read(fd2, buffer, 0, MAX_LENGTH, 0, (_10, bytesRead) => {
|
|
27169
|
-
|
|
27169
|
+
resolve13(buffer.subarray(0, bytesRead));
|
|
27170
27170
|
fs13.close(fd2, () => {
|
|
27171
27171
|
});
|
|
27172
27172
|
});
|
|
@@ -27177,7 +27177,7 @@ var require_filesystem = __commonJS({
|
|
|
27177
27177
|
LDD_PATH,
|
|
27178
27178
|
SELF_PATH,
|
|
27179
27179
|
readFileSync: readFileSync9,
|
|
27180
|
-
readFile:
|
|
27180
|
+
readFile: readFile11
|
|
27181
27181
|
};
|
|
27182
27182
|
}
|
|
27183
27183
|
});
|
|
@@ -27225,7 +27225,7 @@ var require_detect_libc = __commonJS({
|
|
|
27225
27225
|
"use strict";
|
|
27226
27226
|
var childProcess3 = __require("child_process");
|
|
27227
27227
|
var { isLinux: isLinux2, getReport } = require_process();
|
|
27228
|
-
var { LDD_PATH, SELF_PATH, readFile:
|
|
27228
|
+
var { LDD_PATH, SELF_PATH, readFile: readFile11, readFileSync: readFileSync9 } = require_filesystem();
|
|
27229
27229
|
var { interpreterPath } = require_elf();
|
|
27230
27230
|
var cachedFamilyInterpreter;
|
|
27231
27231
|
var cachedFamilyFilesystem;
|
|
@@ -27234,10 +27234,10 @@ var require_detect_libc = __commonJS({
|
|
|
27234
27234
|
var commandOut = "";
|
|
27235
27235
|
var safeCommand = () => {
|
|
27236
27236
|
if (!commandOut) {
|
|
27237
|
-
return new Promise((
|
|
27237
|
+
return new Promise((resolve13) => {
|
|
27238
27238
|
childProcess3.exec(command7, (err, out) => {
|
|
27239
27239
|
commandOut = err ? " " : out;
|
|
27240
|
-
|
|
27240
|
+
resolve13(commandOut);
|
|
27241
27241
|
});
|
|
27242
27242
|
});
|
|
27243
27243
|
}
|
|
@@ -27305,7 +27305,7 @@ var require_detect_libc = __commonJS({
|
|
|
27305
27305
|
}
|
|
27306
27306
|
cachedFamilyFilesystem = null;
|
|
27307
27307
|
try {
|
|
27308
|
-
const lddContent = await
|
|
27308
|
+
const lddContent = await readFile11(LDD_PATH);
|
|
27309
27309
|
cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
|
|
27310
27310
|
} catch (e12) {
|
|
27311
27311
|
}
|
|
@@ -27329,7 +27329,7 @@ var require_detect_libc = __commonJS({
|
|
|
27329
27329
|
}
|
|
27330
27330
|
cachedFamilyInterpreter = null;
|
|
27331
27331
|
try {
|
|
27332
|
-
const selfContent = await
|
|
27332
|
+
const selfContent = await readFile11(SELF_PATH);
|
|
27333
27333
|
const path9 = interpreterPath(selfContent);
|
|
27334
27334
|
cachedFamilyInterpreter = familyFromInterpreterPath(path9);
|
|
27335
27335
|
} catch (e12) {
|
|
@@ -27391,7 +27391,7 @@ var require_detect_libc = __commonJS({
|
|
|
27391
27391
|
}
|
|
27392
27392
|
cachedVersionFilesystem = null;
|
|
27393
27393
|
try {
|
|
27394
|
-
const lddContent = await
|
|
27394
|
+
const lddContent = await readFile11(LDD_PATH);
|
|
27395
27395
|
const versionMatch = lddContent.match(RE_GLIBC_VERSION);
|
|
27396
27396
|
if (versionMatch) {
|
|
27397
27397
|
cachedVersionFilesystem = versionMatch[1];
|
|
@@ -27518,9 +27518,9 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
27518
27518
|
var debug12 = getFirst(path9.join(dir, "build/Debug"), matchBuild);
|
|
27519
27519
|
if (debug12) return debug12;
|
|
27520
27520
|
}
|
|
27521
|
-
var prebuild =
|
|
27521
|
+
var prebuild = resolve13(dir);
|
|
27522
27522
|
if (prebuild) return prebuild;
|
|
27523
|
-
var nearby =
|
|
27523
|
+
var nearby = resolve13(path9.dirname(process.execPath));
|
|
27524
27524
|
if (nearby) return nearby;
|
|
27525
27525
|
var platformPackage = (packageName[0] == "@" ? "" : "@" + packageName + "/") + packageName + "-" + platform6 + "-" + arch2;
|
|
27526
27526
|
try {
|
|
@@ -27542,7 +27542,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
27542
27542
|
// eslint-disable-line
|
|
27543
27543
|
].filter(Boolean).join(" ");
|
|
27544
27544
|
throw new Error("No native build was found for " + target2 + "\n attempted loading from: " + dir + " and package: " + platformPackage + "\n");
|
|
27545
|
-
function
|
|
27545
|
+
function resolve13(dir2) {
|
|
27546
27546
|
var tuples = readdirSync2(path9.join(dir2, "prebuilds")).map(parseTuple);
|
|
27547
27547
|
var tuple = tuples.filter(matchTuple(platform6, arch2)).sort(compareTuples)[0];
|
|
27548
27548
|
if (!tuple) return;
|
|
@@ -40927,11 +40927,11 @@ var require_index_umd = __commonJS({
|
|
|
40927
40927
|
};
|
|
40928
40928
|
function __awaiter(thisArg, _arguments, P7, generator) {
|
|
40929
40929
|
function adopt(value2) {
|
|
40930
|
-
return value2 instanceof P7 ? value2 : new P7(function(
|
|
40931
|
-
|
|
40930
|
+
return value2 instanceof P7 ? value2 : new P7(function(resolve13) {
|
|
40931
|
+
resolve13(value2);
|
|
40932
40932
|
});
|
|
40933
40933
|
}
|
|
40934
|
-
return new (P7 || (P7 = Promise))(function(
|
|
40934
|
+
return new (P7 || (P7 = Promise))(function(resolve13, reject) {
|
|
40935
40935
|
function fulfilled(value2) {
|
|
40936
40936
|
try {
|
|
40937
40937
|
step(generator.next(value2));
|
|
@@ -40947,7 +40947,7 @@ var require_index_umd = __commonJS({
|
|
|
40947
40947
|
}
|
|
40948
40948
|
}
|
|
40949
40949
|
function step(result) {
|
|
40950
|
-
result.done ?
|
|
40950
|
+
result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
40951
40951
|
}
|
|
40952
40952
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40953
40953
|
});
|
|
@@ -58034,9 +58034,9 @@ function responseSchema(request) {
|
|
|
58034
58034
|
async function freePort() {
|
|
58035
58035
|
const server = createServer();
|
|
58036
58036
|
try {
|
|
58037
|
-
await new Promise((
|
|
58037
|
+
await new Promise((resolve13, reject) => {
|
|
58038
58038
|
server.once("error", reject);
|
|
58039
|
-
server.listen(0, "127.0.0.1",
|
|
58039
|
+
server.listen(0, "127.0.0.1", resolve13);
|
|
58040
58040
|
});
|
|
58041
58041
|
const address = server.address();
|
|
58042
58042
|
if (!address || typeof address === "string")
|
|
@@ -58047,7 +58047,7 @@ async function freePort() {
|
|
|
58047
58047
|
}
|
|
58048
58048
|
}
|
|
58049
58049
|
async function socketRequest(socketPath, path9, signal, body, key) {
|
|
58050
|
-
return new Promise((
|
|
58050
|
+
return new Promise((resolve13, reject) => {
|
|
58051
58051
|
const req = httpRequest({
|
|
58052
58052
|
socketPath,
|
|
58053
58053
|
path: path9,
|
|
@@ -58065,7 +58065,7 @@ async function socketRequest(socketPath, path9, signal, body, key) {
|
|
|
58065
58065
|
} else
|
|
58066
58066
|
chunks.push(chunk);
|
|
58067
58067
|
});
|
|
58068
|
-
res.on("end", () =>
|
|
58068
|
+
res.on("end", () => resolve13(new Response(Buffer.concat(chunks), { status: res.statusCode ?? 500 })));
|
|
58069
58069
|
res.on("error", reject);
|
|
58070
58070
|
});
|
|
58071
58071
|
req.on("error", reject);
|
|
@@ -58674,8 +58674,8 @@ var init_local_plan_assistant = __esm({
|
|
|
58674
58674
|
if (entries.length && output && typeof output === "object" && "entryTypes" in output) {
|
|
58675
58675
|
if ("useEntries" in output && output.useEntries === false)
|
|
58676
58676
|
return { questions: [localPlanQuestions[3]], unassignedSources: sources.map(({ id: id2 }) => id2) };
|
|
58677
|
-
const
|
|
58678
|
-
if (!Array.isArray(
|
|
58677
|
+
const choices2 = output.entryTypes;
|
|
58678
|
+
if (!Array.isArray(choices2) || choices2.length !== entries.length)
|
|
58679
58679
|
return trailingProse ? { questions: [localPlanQuestions[3]], unassignedSources: sources.map(({ id: id2 }) => id2) } : this.includeUnassignedValues(null, entries, sources, inputSources, hints);
|
|
58680
58680
|
const entryValues = entries.map(({ valueReference }) => {
|
|
58681
58681
|
const source = sources.find(({ id: id2 }) => id2 === valueReference.sourceId);
|
|
@@ -58683,7 +58683,7 @@ var init_local_plan_assistant = __esm({
|
|
|
58683
58683
|
}).filter((value2) => !!value2 && value2.length >= 4);
|
|
58684
58684
|
const explicitAssetNames = inputSources.explicitAssetNames();
|
|
58685
58685
|
const assets = entries.map((entry, index) => {
|
|
58686
|
-
const choice =
|
|
58686
|
+
const choice = choices2[index];
|
|
58687
58687
|
const definition = quickPlanAssetCatalog.find(({ id: id2 }) => id2 === choice?.type);
|
|
58688
58688
|
const normalized = entry.label.replace(/[^a-z0-9]/giu, "").toLowerCase();
|
|
58689
58689
|
const field2 = definition?.fields.find((item) => item === choice?.field);
|
|
@@ -59818,7 +59818,7 @@ async function runLocalPlanBrowser(options) {
|
|
|
59818
59818
|
}
|
|
59819
59819
|
};
|
|
59820
59820
|
const sockets = /* @__PURE__ */ new Set();
|
|
59821
|
-
const result = new Promise((
|
|
59821
|
+
const result = new Promise((resolve13, reject) => {
|
|
59822
59822
|
state2.finish = (value2, error2) => {
|
|
59823
59823
|
if (state2.done)
|
|
59824
59824
|
return;
|
|
@@ -59830,7 +59830,7 @@ async function runLocalPlanBrowser(options) {
|
|
|
59830
59830
|
if (error2)
|
|
59831
59831
|
reject(error2);
|
|
59832
59832
|
else
|
|
59833
|
-
|
|
59833
|
+
resolve13(value2);
|
|
59834
59834
|
};
|
|
59835
59835
|
});
|
|
59836
59836
|
const server = createServer2((request, response) => {
|
|
@@ -60365,7 +60365,7 @@ function createNativeWindowSession(onClose) {
|
|
|
60365
60365
|
const binary = fileURLToPath(new URL(`./native/inheriti-window${process.platform === "win32" ? ".exe" : ""}`, import.meta.url));
|
|
60366
60366
|
child = spawn(binary, [], { stdio: ["pipe", "ignore", "ignore"], windowsHide: true, env: desktopEnvironment() });
|
|
60367
60367
|
child.once("error", () => ended("unavailable"));
|
|
60368
|
-
child.once("exit", (
|
|
60368
|
+
child.once("exit", (code3, signal) => ended(code3 === 0 && !signal ? "closed" : "unavailable"));
|
|
60369
60369
|
child.stdin.once("error", () => ended("unavailable"));
|
|
60370
60370
|
}
|
|
60371
60371
|
child.stdin.write(`${url2}
|
|
@@ -60437,7 +60437,7 @@ async function openInheritiFile(path9) {
|
|
|
60437
60437
|
accept();
|
|
60438
60438
|
});
|
|
60439
60439
|
else
|
|
60440
|
-
child.once("exit", (
|
|
60440
|
+
child.once("exit", (code3) => code3 === 0 ? accept() : reject(new Error("viewer_unavailable")));
|
|
60441
60441
|
});
|
|
60442
60442
|
if (platform6 === "darwin") {
|
|
60443
60443
|
await launch("open", ["-a", "Inheriti Workspace", "--", fullPath]).catch(() => launch("open", ["-a", "Inheriti Viewer", "--", fullPath]));
|
|
@@ -60630,7 +60630,7 @@ var init_llama_plan_model = __esm({
|
|
|
60630
60630
|
return;
|
|
60631
60631
|
} catch {
|
|
60632
60632
|
}
|
|
60633
|
-
await Promise.race([new Promise((
|
|
60633
|
+
await Promise.race([new Promise((resolve13) => setTimeout(resolve13, 200)), server.exited]);
|
|
60634
60634
|
}
|
|
60635
60635
|
}
|
|
60636
60636
|
async requestSuggestion(server, request, prompt, signal) {
|
|
@@ -60749,7 +60749,7 @@ async function command(args, signal) {
|
|
|
60749
60749
|
child.kill();
|
|
60750
60750
|
});
|
|
60751
60751
|
child.once("error", () => fail(new Error("Local assistant archive unavailable")));
|
|
60752
|
-
child.once("close", (
|
|
60752
|
+
child.once("close", (code3) => code3 === 0 && output.length <= 2e6 ? done(output) : fail(new Error("Local assistant archive invalid")));
|
|
60753
60753
|
});
|
|
60754
60754
|
}
|
|
60755
60755
|
async function findServer(directory, executable) {
|
|
@@ -60863,7 +60863,7 @@ function createPlanEditOperations(options) {
|
|
|
60863
60863
|
} catch (error2) {
|
|
60864
60864
|
if (!error2 || typeof error2 !== "object" || !("code" in error2) || error2.code !== "too_early_to_abort")
|
|
60865
60865
|
throw error2;
|
|
60866
|
-
await new Promise((
|
|
60866
|
+
await new Promise((resolve13) => setTimeout(resolve13, 3e3));
|
|
60867
60867
|
await editor(planId, editId).discard(input);
|
|
60868
60868
|
}
|
|
60869
60869
|
} finally {
|
|
@@ -68017,7 +68017,7 @@ var init_vanilla2 = __esm({
|
|
|
68017
68017
|
return r32;
|
|
68018
68018
|
});
|
|
68019
68019
|
});
|
|
68020
|
-
v52 = Qe6((y52,
|
|
68020
|
+
v52 = Qe6((y52, rm14) => {
|
|
68021
68021
|
(function() {
|
|
68022
68022
|
function e12(d13, l11) {
|
|
68023
68023
|
if (!d13) throw new Error(l11);
|
|
@@ -68069,7 +68069,7 @@ var init_vanilla2 = __esm({
|
|
|
68069
68069
|
return t12(l11, "function"), t12(u10, "function"), s43(u10, { configurable: false, enumerable: false, writable: false }, { prototype: Object.create(l11.prototype) }), s43(u10, { configurable: false, enumerable: false, writable: false }, o12), s43(u10.prototype, { configurable: false, enumerable: false, writable: false }, { constructor: u10, generator: u10 }), s43(u10.prototype, { configurable: false, enumerable: false, writable: false }, a13), u10;
|
|
68070
68070
|
} }), Object.freeze(c15), Object.freeze(c15.prototype), typeof define == "function" && define.amd ? define(function() {
|
|
68071
68071
|
return c15;
|
|
68072
|
-
}) : typeof
|
|
68072
|
+
}) : typeof rm14 == "object" && typeof y52 == "object" ? rm14.exports = c15 : window.Generator = c15;
|
|
68073
68073
|
})();
|
|
68074
68074
|
});
|
|
68075
68075
|
P5 = Qe6((uT, b52) => {
|
|
@@ -78589,8 +78589,8 @@ function createAutomationSetupOperations(options) {
|
|
|
78589
78589
|
"automation_connection_changed",
|
|
78590
78590
|
"automation_grant_changed"
|
|
78591
78591
|
] : ["automation_grant_already_exists", "automation_connection_changed"]).includes(detail.error) ? detail.error : void 0;
|
|
78592
|
-
const
|
|
78593
|
-
throw Object.assign(new Error(
|
|
78592
|
+
const code3 = grantError ? grantError : (response.status === 400 || response.status === 404) && url2.endsWith("/verified-github-release") ? "automation_verified_release_unavailable" : response.status === 401 ? "automation_setup_authentication_required" : response.status === 403 || response.status === 404 ? "automation_setup_permission_denied" : "automation_setup_request_failed";
|
|
78593
|
+
throw Object.assign(new Error(code3), { code: code3 });
|
|
78594
78594
|
}
|
|
78595
78595
|
const data = await response.json();
|
|
78596
78596
|
if (!data || typeof data !== "object" || !("ok" in data) || data.ok !== true || method === "GET" && !("result" in data))
|
|
@@ -78878,8 +78878,8 @@ function providerCliError(binary, error2, fallback2, showStderr = false) {
|
|
|
78878
78878
|
const aws = binary === "aws" && stderr.match(/An error occurred \(([A-Za-z][A-Za-z0-9]{0,63})\) when calling the ([A-Za-z][A-Za-z0-9]{0,63}) operation:/u);
|
|
78879
78879
|
const gcloud = binary === "gcloud" && stderr.match(/ERROR: \((gcloud[.a-z0-9_-]{1,100})\) ([A-Z][A-Z0-9_]{1,63}):/u);
|
|
78880
78880
|
const diagnostic = showStderr && stderr.trim() ? stderr.trim().replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f]/gu, "") : aws ? `${aws[1]} in ${aws[2]}` : gcloud ? `${gcloud[2]} in ${gcloud[1]}` : typeof failure?.code === "number" ? `Exit code ${failure.code}` : typeof failure?.code === "string" && /^[A-Z][A-Z0-9_]+$/u.test(failure.code) ? `Process error ${failure.code}` : void 0;
|
|
78881
|
-
const result = (
|
|
78882
|
-
const result2 = new Error(
|
|
78881
|
+
const result = (code3) => {
|
|
78882
|
+
const result2 = new Error(code3);
|
|
78883
78883
|
if (diagnostic)
|
|
78884
78884
|
Object.defineProperty(result2, "providerDiagnostic", {
|
|
78885
78885
|
value: `${binary === "aws" ? "AWS" : "gcloud"} CLI: ${diagnostic}`
|
|
@@ -79441,7 +79441,7 @@ var init_automation_ec2_pair = __esm({
|
|
|
79441
79441
|
throw new Error("automation_ec2_pair_response_invalid");
|
|
79442
79442
|
};
|
|
79443
79443
|
quote = (value2) => `'${value2.replaceAll("'", "'\\''")}'`;
|
|
79444
|
-
wait = (ms4) => new Promise((
|
|
79444
|
+
wait = (ms4) => new Promise((resolve13) => setTimeout(resolve13, ms4));
|
|
79445
79445
|
missingCliExitCode = 78;
|
|
79446
79446
|
}
|
|
79447
79447
|
});
|
|
@@ -79571,7 +79571,7 @@ var init_automation_ec2_install = __esm({
|
|
|
79571
79571
|
}
|
|
79572
79572
|
throw new Error("automation_ec2_install_response_invalid");
|
|
79573
79573
|
};
|
|
79574
|
-
wait2 = (ms4) => new Promise((
|
|
79574
|
+
wait2 = (ms4) => new Promise((resolve13) => setTimeout(resolve13, ms4));
|
|
79575
79575
|
}
|
|
79576
79576
|
});
|
|
79577
79577
|
|
|
@@ -79709,7 +79709,7 @@ var init_automation_ec2_cli_install = __esm({
|
|
|
79709
79709
|
}
|
|
79710
79710
|
throw new Error("automation_ec2_cli_install_response_invalid");
|
|
79711
79711
|
};
|
|
79712
|
-
wait3 = (ms4) => new Promise((
|
|
79712
|
+
wait3 = (ms4) => new Promise((resolve13) => setTimeout(resolve13, ms4));
|
|
79713
79713
|
pending = (error2, commandId) => Object.assign(error2 instanceof Error ? error2 : new Error("automation_ec2_cli_install_failed"), { artifactPending: true, ...commandId ? { commandId } : {} });
|
|
79714
79714
|
quote3 = (value2) => `'${value2.replaceAll("'", "'\\''")}'`;
|
|
79715
79715
|
ensureNodeAndNpm = (minimumNodeMajor) => [
|
|
@@ -80990,7 +80990,7 @@ var sleep;
|
|
|
80990
80990
|
var init_sleep = __esm({
|
|
80991
80991
|
"../../node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() {
|
|
80992
80992
|
sleep = (seconds) => {
|
|
80993
|
-
return new Promise((
|
|
80993
|
+
return new Promise((resolve13) => setTimeout(resolve13, seconds * 1e3));
|
|
80994
80994
|
};
|
|
80995
80995
|
}
|
|
80996
80996
|
});
|
|
@@ -81155,8 +81155,8 @@ var init_createWaiter = __esm({
|
|
|
81155
81155
|
init_waiter();
|
|
81156
81156
|
abortTimeout = (abortSignal) => {
|
|
81157
81157
|
let onAbort;
|
|
81158
|
-
const promise = new Promise((
|
|
81159
|
-
onAbort = () =>
|
|
81158
|
+
const promise = new Promise((resolve13) => {
|
|
81159
|
+
onAbort = () => resolve13({ state: WaiterState.ABORTED });
|
|
81160
81160
|
if (typeof abortSignal.addEventListener === "function") {
|
|
81161
81161
|
abortSignal.addEventListener("abort", onAbort);
|
|
81162
81162
|
} else {
|
|
@@ -84651,7 +84651,7 @@ var init_getInstanceMetadataRegion = __esm({
|
|
|
84651
84651
|
};
|
|
84652
84652
|
imdsRequest = async (options) => {
|
|
84653
84653
|
const { request } = await import("node:http");
|
|
84654
|
-
return new Promise((
|
|
84654
|
+
return new Promise((resolve13, reject) => {
|
|
84655
84655
|
const req = request({
|
|
84656
84656
|
hostname: options.hostname,
|
|
84657
84657
|
port: options.port,
|
|
@@ -84679,7 +84679,7 @@ var init_getInstanceMetadataRegion = __esm({
|
|
|
84679
84679
|
const chunks = [];
|
|
84680
84680
|
res.on("data", (chunk) => chunks.push(chunk));
|
|
84681
84681
|
res.on("end", () => {
|
|
84682
|
-
|
|
84682
|
+
resolve13(Buffer.concat(chunks));
|
|
84683
84683
|
req.destroy();
|
|
84684
84684
|
});
|
|
84685
84685
|
});
|
|
@@ -86912,7 +86912,7 @@ var init_headStream = __esm({
|
|
|
86912
86912
|
if (isReadableStream(stream)) {
|
|
86913
86913
|
return headStream(stream, bytes);
|
|
86914
86914
|
}
|
|
86915
|
-
return new Promise((
|
|
86915
|
+
return new Promise((resolve13, reject) => {
|
|
86916
86916
|
const collector = new Collector();
|
|
86917
86917
|
collector.limit = bytes;
|
|
86918
86918
|
stream.pipe(collector);
|
|
@@ -86923,7 +86923,7 @@ var init_headStream = __esm({
|
|
|
86923
86923
|
collector.on("error", reject);
|
|
86924
86924
|
collector.on("finish", function() {
|
|
86925
86925
|
const bytes2 = concatBytes(this.buffers);
|
|
86926
|
-
|
|
86926
|
+
resolve13(bytes2);
|
|
86927
86927
|
});
|
|
86928
86928
|
});
|
|
86929
86929
|
};
|
|
@@ -87075,7 +87075,7 @@ var init_stream_collector = __esm({
|
|
|
87075
87075
|
if (isReadableStream(stream)) {
|
|
87076
87076
|
return collectReadableStream(stream);
|
|
87077
87077
|
}
|
|
87078
|
-
return new Promise((
|
|
87078
|
+
return new Promise((resolve13, reject) => {
|
|
87079
87079
|
const collector = new Collector2();
|
|
87080
87080
|
const nodeStream = stream;
|
|
87081
87081
|
nodeStream.pipe(collector);
|
|
@@ -87086,7 +87086,7 @@ var init_stream_collector = __esm({
|
|
|
87086
87086
|
collector.on("error", reject);
|
|
87087
87087
|
collector.on("finish", function() {
|
|
87088
87088
|
const bytes = concatBytes(this.bufferedBytes);
|
|
87089
|
-
|
|
87089
|
+
resolve13(bytes);
|
|
87090
87090
|
});
|
|
87091
87091
|
});
|
|
87092
87092
|
};
|
|
@@ -87413,7 +87413,7 @@ var fileStreamHasher, isReadStream;
|
|
|
87413
87413
|
var init_fileStreamHasher = __esm({
|
|
87414
87414
|
"../../node_modules/.pnpm/@smithy+core@3.36.0/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js"() {
|
|
87415
87415
|
init_HashCalculator();
|
|
87416
|
-
fileStreamHasher = (hashCtor, fileStream) => new Promise((
|
|
87416
|
+
fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve13, reject) => {
|
|
87417
87417
|
if (!isReadStream(fileStream)) {
|
|
87418
87418
|
reject(new Error("Unable to calculate hash for non-file streams."));
|
|
87419
87419
|
return;
|
|
@@ -87431,7 +87431,7 @@ var init_fileStreamHasher = __esm({
|
|
|
87431
87431
|
});
|
|
87432
87432
|
hashCalculator.on("error", reject);
|
|
87433
87433
|
hashCalculator.on("finish", function() {
|
|
87434
|
-
hash2.digest().then(
|
|
87434
|
+
hash2.digest().then(resolve13).catch(reject);
|
|
87435
87435
|
});
|
|
87436
87436
|
});
|
|
87437
87437
|
isReadStream = (stream) => typeof stream.path === "string";
|
|
@@ -87450,14 +87450,14 @@ var init_readableStreamHasher = __esm({
|
|
|
87450
87450
|
const hash2 = new hashCtor();
|
|
87451
87451
|
const hashCalculator = new HashCalculator(hash2);
|
|
87452
87452
|
readableStream.pipe(hashCalculator);
|
|
87453
|
-
return new Promise((
|
|
87453
|
+
return new Promise((resolve13, reject) => {
|
|
87454
87454
|
readableStream.on("error", (err) => {
|
|
87455
87455
|
hashCalculator.end();
|
|
87456
87456
|
reject(err);
|
|
87457
87457
|
});
|
|
87458
87458
|
hashCalculator.on("error", reject);
|
|
87459
87459
|
hashCalculator.on("finish", () => {
|
|
87460
|
-
hash2.digest().then(
|
|
87460
|
+
hash2.digest().then(resolve13).catch(reject);
|
|
87461
87461
|
});
|
|
87462
87462
|
});
|
|
87463
87463
|
};
|
|
@@ -88617,15 +88617,15 @@ function getMessageUnmarshaller(deserializer, toUtf83) {
|
|
|
88617
88617
|
unmodeledError.name = message2.headers[":error-code"].value;
|
|
88618
88618
|
throw unmodeledError;
|
|
88619
88619
|
} else if (messageType === "exception") {
|
|
88620
|
-
const
|
|
88621
|
-
const exception = { [
|
|
88620
|
+
const code3 = message2.headers[":exception-type"].value;
|
|
88621
|
+
const exception = { [code3]: message2 };
|
|
88622
88622
|
const deserializedException = await deserializer(exception);
|
|
88623
88623
|
if (deserializedException.$unknown) {
|
|
88624
88624
|
const error2 = new Error(toUtf83(message2.body));
|
|
88625
|
-
error2.name =
|
|
88625
|
+
error2.name = code3;
|
|
88626
88626
|
throw error2;
|
|
88627
88627
|
}
|
|
88628
|
-
throw deserializedException[
|
|
88628
|
+
throw deserializedException[code3];
|
|
88629
88629
|
} else if (messageType === "event") {
|
|
88630
88630
|
const event = {
|
|
88631
88631
|
[message2.headers[":event-type"].value]: message2
|
|
@@ -88702,7 +88702,7 @@ async function* readableToIterable(readStream) {
|
|
|
88702
88702
|
streamEnded = true;
|
|
88703
88703
|
});
|
|
88704
88704
|
while (!generationEnded) {
|
|
88705
|
-
const value2 = await new Promise((
|
|
88705
|
+
const value2 = await new Promise((resolve13) => setTimeout(() => resolve13(records.shift()), 0));
|
|
88706
88706
|
if (value2) {
|
|
88707
88707
|
yield value2;
|
|
88708
88708
|
}
|
|
@@ -91077,11 +91077,11 @@ var init_JsonShapeSerializer2 = __esm({
|
|
|
91077
91077
|
}
|
|
91078
91078
|
this.json[this.i++] = QUOTE;
|
|
91079
91079
|
}
|
|
91080
|
-
writeUnicodeEscape(
|
|
91080
|
+
writeUnicodeEscape(code3) {
|
|
91081
91081
|
let { json, i: i14 } = this;
|
|
91082
91082
|
json[i14++] = BACKSLASH;
|
|
91083
91083
|
json[i14++] = 117;
|
|
91084
|
-
const hex =
|
|
91084
|
+
const hex = code3.toString(16).padStart(4, "0");
|
|
91085
91085
|
for (let j14 = 0; j14 < 4; ++j14) {
|
|
91086
91086
|
json[i14++] = hex.charCodeAt(j14);
|
|
91087
91087
|
}
|
|
@@ -92338,7 +92338,7 @@ var init_retryMiddleware = __esm({
|
|
|
92338
92338
|
init_constants7();
|
|
92339
92339
|
init_parseRetryAfterHeader();
|
|
92340
92340
|
init_util3();
|
|
92341
|
-
cooldown = (ms4) => new Promise((
|
|
92341
|
+
cooldown = (ms4) => new Promise((resolve13) => setTimeout(resolve13, ms4));
|
|
92342
92342
|
isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
|
|
92343
92343
|
getRetryErrorInfo = (error2, logger2) => {
|
|
92344
92344
|
const errorInfo = {
|
|
@@ -92436,7 +92436,7 @@ var init_DefaultRateLimiter = __esm({
|
|
|
92436
92436
|
this.refillTokenBucket();
|
|
92437
92437
|
while (amount > this.availableTokens) {
|
|
92438
92438
|
const delay2 = (amount - this.availableTokens) / this.fillRate * 1e3;
|
|
92439
|
-
await new Promise((
|
|
92439
|
+
await new Promise((resolve13) => _DefaultRateLimiter.setTimeoutFn(resolve13, delay2));
|
|
92440
92440
|
this.refillTokenBucket();
|
|
92441
92441
|
}
|
|
92442
92442
|
this.availableTokens = this.availableTokens - amount;
|
|
@@ -92874,7 +92874,7 @@ var init_StandardRetryStrategy2 = __esm({
|
|
|
92874
92874
|
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
92875
92875
|
const delay2 = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
92876
92876
|
totalDelay += delay2;
|
|
92877
|
-
await new Promise((
|
|
92877
|
+
await new Promise((resolve13) => setTimeout(resolve13, delay2));
|
|
92878
92878
|
continue;
|
|
92879
92879
|
}
|
|
92880
92880
|
if (!err.$metadata) {
|
|
@@ -96752,7 +96752,7 @@ var require_dist_cjs4 = __commonJS({
|
|
|
96752
96752
|
var DEFAULT_MAX_RETRIES = 0;
|
|
96753
96753
|
var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout });
|
|
96754
96754
|
function httpRequest2(options) {
|
|
96755
|
-
return new Promise((
|
|
96755
|
+
return new Promise((resolve13, reject) => {
|
|
96756
96756
|
const req = node_http.request({
|
|
96757
96757
|
method: "GET",
|
|
96758
96758
|
...options,
|
|
@@ -96777,7 +96777,7 @@ var require_dist_cjs4 = __commonJS({
|
|
|
96777
96777
|
chunks.push(chunk);
|
|
96778
96778
|
});
|
|
96779
96779
|
res.on("end", () => {
|
|
96780
|
-
|
|
96780
|
+
resolve13(Buffer.concat(chunks));
|
|
96781
96781
|
req.destroy();
|
|
96782
96782
|
});
|
|
96783
96783
|
});
|
|
@@ -97221,21 +97221,21 @@ var require_dist_cjs5 = __commonJS({
|
|
|
97221
97221
|
let sendBody = true;
|
|
97222
97222
|
if (!externalAgent && expect === "100-continue") {
|
|
97223
97223
|
sendBody = await Promise.race([
|
|
97224
|
-
new Promise((
|
|
97225
|
-
timeoutId = Number(timing.setTimeout(() =>
|
|
97224
|
+
new Promise((resolve13) => {
|
|
97225
|
+
timeoutId = Number(timing.setTimeout(() => resolve13(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
97226
97226
|
}),
|
|
97227
|
-
new Promise((
|
|
97227
|
+
new Promise((resolve13) => {
|
|
97228
97228
|
httpRequest2.on("continue", () => {
|
|
97229
97229
|
timing.clearTimeout(timeoutId);
|
|
97230
|
-
|
|
97230
|
+
resolve13(true);
|
|
97231
97231
|
});
|
|
97232
97232
|
httpRequest2.on("response", () => {
|
|
97233
97233
|
timing.clearTimeout(timeoutId);
|
|
97234
|
-
|
|
97234
|
+
resolve13(false);
|
|
97235
97235
|
});
|
|
97236
97236
|
httpRequest2.on("error", () => {
|
|
97237
97237
|
timing.clearTimeout(timeoutId);
|
|
97238
|
-
|
|
97238
|
+
resolve13(false);
|
|
97239
97239
|
});
|
|
97240
97240
|
})
|
|
97241
97241
|
]);
|
|
@@ -97311,13 +97311,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97311
97311
|
return socketWarningTimestamp;
|
|
97312
97312
|
}
|
|
97313
97313
|
constructor(options) {
|
|
97314
|
-
this.configProvider = new Promise((
|
|
97314
|
+
this.configProvider = new Promise((resolve13, reject) => {
|
|
97315
97315
|
if (typeof options === "function") {
|
|
97316
97316
|
options().then((_options) => {
|
|
97317
|
-
|
|
97317
|
+
resolve13(this.resolveDefaultConfig(_options));
|
|
97318
97318
|
}).catch(reject);
|
|
97319
97319
|
} else {
|
|
97320
|
-
|
|
97320
|
+
resolve13(this.resolveDefaultConfig(options));
|
|
97321
97321
|
}
|
|
97322
97322
|
});
|
|
97323
97323
|
}
|
|
@@ -97349,7 +97349,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97349
97349
|
timing.clearTimeout(socketTimeoutId);
|
|
97350
97350
|
timing.clearTimeout(keepAliveTimeoutId);
|
|
97351
97351
|
};
|
|
97352
|
-
const
|
|
97352
|
+
const resolve13 = async (arg) => {
|
|
97353
97353
|
await writeRequestBodyPromise;
|
|
97354
97354
|
clearTimeouts();
|
|
97355
97355
|
_resolve(arg);
|
|
@@ -97413,7 +97413,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97413
97413
|
headers: getTransformedHeaders(res.headers),
|
|
97414
97414
|
body: res
|
|
97415
97415
|
});
|
|
97416
|
-
|
|
97416
|
+
resolve13({ response: httpResponse });
|
|
97417
97417
|
});
|
|
97418
97418
|
req.on("error", (err) => {
|
|
97419
97419
|
if (NODEJS_TIMEOUT_ERROR_CODES2.includes(err.code)) {
|
|
@@ -97741,13 +97741,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97741
97741
|
return new _NodeHttp2Handler(instanceOrOptions);
|
|
97742
97742
|
}
|
|
97743
97743
|
constructor(options) {
|
|
97744
|
-
this.configProvider = new Promise((
|
|
97744
|
+
this.configProvider = new Promise((resolve13, reject) => {
|
|
97745
97745
|
if (typeof options === "function") {
|
|
97746
97746
|
options().then((opts) => {
|
|
97747
|
-
|
|
97747
|
+
resolve13(opts || {});
|
|
97748
97748
|
}).catch(reject);
|
|
97749
97749
|
} else {
|
|
97750
|
-
|
|
97750
|
+
resolve13(options || {});
|
|
97751
97751
|
}
|
|
97752
97752
|
});
|
|
97753
97753
|
}
|
|
@@ -97772,7 +97772,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97772
97772
|
return new Promise((_resolve, _reject) => {
|
|
97773
97773
|
let fulfilled = false;
|
|
97774
97774
|
let writeRequestBodyPromise = void 0;
|
|
97775
|
-
const
|
|
97775
|
+
const resolve13 = async (arg) => {
|
|
97776
97776
|
await writeRequestBodyPromise;
|
|
97777
97777
|
_resolve(arg);
|
|
97778
97778
|
};
|
|
@@ -97843,8 +97843,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97843
97843
|
abortSignal.onabort = onAbort;
|
|
97844
97844
|
}
|
|
97845
97845
|
}
|
|
97846
|
-
clientHttp2Stream.on("frameError", (type,
|
|
97847
|
-
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id2} has failed with code ${
|
|
97846
|
+
clientHttp2Stream.on("frameError", (type, code3, id2) => {
|
|
97847
|
+
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id2} has failed with code ${code3}.`));
|
|
97848
97848
|
});
|
|
97849
97849
|
clientHttp2Stream.on("error", rejectWithDestroy);
|
|
97850
97850
|
clientHttp2Stream.on("aborted", () => {
|
|
@@ -97857,7 +97857,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
97857
97857
|
body: clientHttp2Stream
|
|
97858
97858
|
});
|
|
97859
97859
|
fulfilled = true;
|
|
97860
|
-
|
|
97860
|
+
resolve13({ response: httpResponse });
|
|
97861
97861
|
if (useIsolatedSession) {
|
|
97862
97862
|
session.close();
|
|
97863
97863
|
clientHttp2Stream.on("end", () => {
|
|
@@ -97989,7 +97989,7 @@ var require_dist_cjs6 = __commonJS({
|
|
|
97989
97989
|
try {
|
|
97990
97990
|
return await toRetry();
|
|
97991
97991
|
} catch (e12) {
|
|
97992
|
-
await new Promise((
|
|
97992
|
+
await new Promise((resolve13) => setTimeout(resolve13, delayMs));
|
|
97993
97993
|
}
|
|
97994
97994
|
}
|
|
97995
97995
|
return await toRetry();
|
|
@@ -100708,11 +100708,11 @@ var init_JsonShapeSerializer22 = __esm({
|
|
|
100708
100708
|
}
|
|
100709
100709
|
this.json[this.i++] = QUOTE2;
|
|
100710
100710
|
}
|
|
100711
|
-
writeUnicodeEscape(
|
|
100711
|
+
writeUnicodeEscape(code3) {
|
|
100712
100712
|
let { json, i: i14 } = this;
|
|
100713
100713
|
json[i14++] = BACKSLASH2;
|
|
100714
100714
|
json[i14++] = 117;
|
|
100715
|
-
const hex =
|
|
100715
|
+
const hex = code3.toString(16).padStart(4, "0");
|
|
100716
100716
|
for (let j14 = 0; j14 < 4; ++j14) {
|
|
100717
100717
|
json[i14++] = hex.charCodeAt(j14);
|
|
100718
100718
|
}
|
|
@@ -102565,9 +102565,9 @@ var init_AwsQueryProtocol = __esm({
|
|
|
102565
102565
|
}, output), dataObject);
|
|
102566
102566
|
}
|
|
102567
102567
|
loadQueryErrorCode(output, data) {
|
|
102568
|
-
const
|
|
102569
|
-
if (
|
|
102570
|
-
return
|
|
102568
|
+
const code3 = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
|
|
102569
|
+
if (code3 !== void 0) {
|
|
102570
|
+
return code3;
|
|
102571
102571
|
}
|
|
102572
102572
|
if (output.statusCode == 404) {
|
|
102573
102573
|
return "NotFound";
|
|
@@ -104112,11 +104112,11 @@ var require_dist_cjs8 = __commonJS({
|
|
|
104112
104112
|
throw new TokenProviderError2(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
|
|
104113
104113
|
}
|
|
104114
104114
|
};
|
|
104115
|
-
var { writeFile:
|
|
104115
|
+
var { writeFile: writeFile15 } = promises;
|
|
104116
104116
|
var writeSSOTokenToFile = (id2, ssoToken) => {
|
|
104117
104117
|
const tokenFilepath = getSSOTokenFilepath2(id2);
|
|
104118
104118
|
const tokenString = JSON.stringify(ssoToken, null, 2);
|
|
104119
|
-
return
|
|
104119
|
+
return writeFile15(tokenFilepath, tokenString);
|
|
104120
104120
|
};
|
|
104121
104121
|
var lastRefreshAttemptTimes = /* @__PURE__ */ new Map();
|
|
104122
104122
|
var fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
@@ -107368,8 +107368,8 @@ var require_dist_cjs11 = __commonJS({
|
|
|
107368
107368
|
var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
107369
107369
|
var { createHash: createHash12, createPrivateKey: createPrivateKey2, createPublicKey, sign: sign3 } = __require("node:crypto");
|
|
107370
107370
|
var { promises } = __require("node:fs");
|
|
107371
|
-
var { homedir:
|
|
107372
|
-
var { dirname:
|
|
107371
|
+
var { homedir: homedir9 } = __require("node:os");
|
|
107372
|
+
var { dirname: dirname9, join: join18 } = __require("node:path");
|
|
107373
107373
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
107374
107374
|
profileData;
|
|
107375
107375
|
init;
|
|
@@ -107525,7 +107525,7 @@ var require_dist_cjs11 = __commonJS({
|
|
|
107525
107525
|
}
|
|
107526
107526
|
async saveToken(token) {
|
|
107527
107527
|
const tokenFilePath = this.getTokenFilePath();
|
|
107528
|
-
const directory =
|
|
107528
|
+
const directory = dirname9(tokenFilePath);
|
|
107529
107529
|
try {
|
|
107530
107530
|
await promises.mkdir(directory, { recursive: true });
|
|
107531
107531
|
} catch (error2) {
|
|
@@ -107533,10 +107533,10 @@ var require_dist_cjs11 = __commonJS({
|
|
|
107533
107533
|
await promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
107534
107534
|
}
|
|
107535
107535
|
getTokenFilePath() {
|
|
107536
|
-
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ??
|
|
107536
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join18(homedir9(), ".aws", "login", "cache");
|
|
107537
107537
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
107538
107538
|
const loginSessionSha256 = createHash12("sha256").update(loginSessionBytes).digest("hex");
|
|
107539
|
-
return
|
|
107539
|
+
return join18(directory, `${loginSessionSha256}.json`);
|
|
107540
107540
|
}
|
|
107541
107541
|
derToRawSignature(derSignature) {
|
|
107542
107542
|
let offset = 2;
|
|
@@ -126052,7 +126052,7 @@ async function runLocalAutomationSetupBrowser(options) {
|
|
|
126052
126052
|
let members = [];
|
|
126053
126053
|
let grants = [];
|
|
126054
126054
|
let finish;
|
|
126055
|
-
const result = new Promise((
|
|
126055
|
+
const result = new Promise((resolve13, reject) => {
|
|
126056
126056
|
finish = (value2, error2) => {
|
|
126057
126057
|
if (done)
|
|
126058
126058
|
return;
|
|
@@ -126060,7 +126060,7 @@ async function runLocalAutomationSetupBrowser(options) {
|
|
|
126060
126060
|
if (error2)
|
|
126061
126061
|
reject(error2);
|
|
126062
126062
|
else
|
|
126063
|
-
|
|
126063
|
+
resolve13(value2);
|
|
126064
126064
|
};
|
|
126065
126065
|
});
|
|
126066
126066
|
const load2 = async () => {
|
|
@@ -127151,14 +127151,14 @@ var require_react_development = __commonJS({
|
|
|
127151
127151
|
componentName = this.props.ref;
|
|
127152
127152
|
return void 0 !== componentName ? componentName : null;
|
|
127153
127153
|
}
|
|
127154
|
-
function ReactElement(type, key, props,
|
|
127154
|
+
function ReactElement(type, key, props, owner2, debugStack, debugTask) {
|
|
127155
127155
|
var refProp = props.ref;
|
|
127156
127156
|
type = {
|
|
127157
127157
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
127158
127158
|
type,
|
|
127159
127159
|
key,
|
|
127160
127160
|
props,
|
|
127161
|
-
_owner:
|
|
127161
|
+
_owner: owner2
|
|
127162
127162
|
};
|
|
127163
127163
|
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
127164
127164
|
enumerable: false,
|
|
@@ -127334,8 +127334,8 @@ var require_react_development = __commonJS({
|
|
|
127334
127334
|
function lazyInitializer(payload2) {
|
|
127335
127335
|
if (-1 === payload2._status) {
|
|
127336
127336
|
var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload2._ioInfo;
|
|
127337
|
-
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(
|
|
127338
|
-
resolveDebugValue =
|
|
127337
|
+
null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve13, reject) {
|
|
127338
|
+
resolveDebugValue = resolve13;
|
|
127339
127339
|
rejectDebugValue = reject;
|
|
127340
127340
|
}));
|
|
127341
127341
|
ioInfo = payload2._result;
|
|
@@ -127451,21 +127451,21 @@ var require_react_development = __commonJS({
|
|
|
127451
127451
|
);
|
|
127452
127452
|
actScopeDepth = prevActScopeDepth;
|
|
127453
127453
|
}
|
|
127454
|
-
function recursivelyFlushAsyncActWork(returnValue,
|
|
127454
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve13, reject) {
|
|
127455
127455
|
var queue = ReactSharedInternals.actQueue;
|
|
127456
127456
|
if (null !== queue)
|
|
127457
127457
|
if (0 !== queue.length)
|
|
127458
127458
|
try {
|
|
127459
127459
|
flushActQueue(queue);
|
|
127460
127460
|
enqueueTask(function() {
|
|
127461
|
-
return recursivelyFlushAsyncActWork(returnValue,
|
|
127461
|
+
return recursivelyFlushAsyncActWork(returnValue, resolve13, reject);
|
|
127462
127462
|
});
|
|
127463
127463
|
return;
|
|
127464
127464
|
} catch (error2) {
|
|
127465
127465
|
ReactSharedInternals.thrownErrors.push(error2);
|
|
127466
127466
|
}
|
|
127467
127467
|
else ReactSharedInternals.actQueue = null;
|
|
127468
|
-
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) :
|
|
127468
|
+
0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve13(returnValue);
|
|
127469
127469
|
}
|
|
127470
127470
|
function flushActQueue(queue) {
|
|
127471
127471
|
if (!isFlushing) {
|
|
@@ -127653,7 +127653,7 @@ var require_react_development = __commonJS({
|
|
|
127653
127653
|
));
|
|
127654
127654
|
});
|
|
127655
127655
|
return {
|
|
127656
|
-
then: function(
|
|
127656
|
+
then: function(resolve13, reject) {
|
|
127657
127657
|
didAwaitActCall = true;
|
|
127658
127658
|
thenable.then(
|
|
127659
127659
|
function(returnValue) {
|
|
@@ -127663,7 +127663,7 @@ var require_react_development = __commonJS({
|
|
|
127663
127663
|
flushActQueue(queue), enqueueTask(function() {
|
|
127664
127664
|
return recursivelyFlushAsyncActWork(
|
|
127665
127665
|
returnValue,
|
|
127666
|
-
|
|
127666
|
+
resolve13,
|
|
127667
127667
|
reject
|
|
127668
127668
|
);
|
|
127669
127669
|
});
|
|
@@ -127677,7 +127677,7 @@ var require_react_development = __commonJS({
|
|
|
127677
127677
|
ReactSharedInternals.thrownErrors.length = 0;
|
|
127678
127678
|
reject(_thrownError);
|
|
127679
127679
|
}
|
|
127680
|
-
} else
|
|
127680
|
+
} else resolve13(returnValue);
|
|
127681
127681
|
},
|
|
127682
127682
|
function(error2) {
|
|
127683
127683
|
popActScope(prevActQueue, prevActScopeDepth);
|
|
@@ -127699,15 +127699,15 @@ var require_react_development = __commonJS({
|
|
|
127699
127699
|
if (0 < ReactSharedInternals.thrownErrors.length)
|
|
127700
127700
|
throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
|
|
127701
127701
|
return {
|
|
127702
|
-
then: function(
|
|
127702
|
+
then: function(resolve13, reject) {
|
|
127703
127703
|
didAwaitActCall = true;
|
|
127704
127704
|
0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
|
|
127705
127705
|
return recursivelyFlushAsyncActWork(
|
|
127706
127706
|
returnValue$jscomp$0,
|
|
127707
|
-
|
|
127707
|
+
resolve13,
|
|
127708
127708
|
reject
|
|
127709
127709
|
);
|
|
127710
|
-
})) :
|
|
127710
|
+
})) : resolve13(returnValue$jscomp$0);
|
|
127711
127711
|
}
|
|
127712
127712
|
};
|
|
127713
127713
|
};
|
|
@@ -127729,7 +127729,7 @@ var require_react_development = __commonJS({
|
|
|
127729
127729
|
throw Error(
|
|
127730
127730
|
"The argument must be a React element, but you passed " + element + "."
|
|
127731
127731
|
);
|
|
127732
|
-
var props = assign({}, element.props), key = element.key,
|
|
127732
|
+
var props = assign({}, element.props), key = element.key, owner2 = element._owner;
|
|
127733
127733
|
if (null != config) {
|
|
127734
127734
|
var JSCompiler_inline_result;
|
|
127735
127735
|
a: {
|
|
@@ -127742,7 +127742,7 @@ var require_react_development = __commonJS({
|
|
|
127742
127742
|
}
|
|
127743
127743
|
JSCompiler_inline_result = void 0 !== config.ref;
|
|
127744
127744
|
}
|
|
127745
|
-
JSCompiler_inline_result && (
|
|
127745
|
+
JSCompiler_inline_result && (owner2 = getOwner());
|
|
127746
127746
|
hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key);
|
|
127747
127747
|
for (propName in config)
|
|
127748
127748
|
!hasOwnProperty2.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]);
|
|
@@ -127759,7 +127759,7 @@ var require_react_development = __commonJS({
|
|
|
127759
127759
|
element.type,
|
|
127760
127760
|
key,
|
|
127761
127761
|
props,
|
|
127762
|
-
|
|
127762
|
+
owner2,
|
|
127763
127763
|
element._debugStack,
|
|
127764
127764
|
element._debugTask
|
|
127765
127765
|
);
|
|
@@ -128492,12 +128492,12 @@ var require_signal_exit = __commonJS({
|
|
|
128492
128492
|
emitter.count -= 1;
|
|
128493
128493
|
};
|
|
128494
128494
|
module2.exports.unload = unload2;
|
|
128495
|
-
emit = function emit2(event,
|
|
128495
|
+
emit = function emit2(event, code3, signal) {
|
|
128496
128496
|
if (emitter.emitted[event]) {
|
|
128497
128497
|
return;
|
|
128498
128498
|
}
|
|
128499
128499
|
emitter.emitted[event] = true;
|
|
128500
|
-
emitter.emit(event,
|
|
128500
|
+
emitter.emit(event, code3, signal);
|
|
128501
128501
|
};
|
|
128502
128502
|
sigListeners = {};
|
|
128503
128503
|
signals2.forEach(function(sig) {
|
|
@@ -128540,11 +128540,11 @@ var require_signal_exit = __commonJS({
|
|
|
128540
128540
|
};
|
|
128541
128541
|
module2.exports.load = load2;
|
|
128542
128542
|
originalProcessReallyExit = process29.reallyExit;
|
|
128543
|
-
processReallyExit = function processReallyExit2(
|
|
128543
|
+
processReallyExit = function processReallyExit2(code3) {
|
|
128544
128544
|
if (!processOk2(global.process)) {
|
|
128545
128545
|
return;
|
|
128546
128546
|
}
|
|
128547
|
-
process29.exitCode =
|
|
128547
|
+
process29.exitCode = code3 || /* istanbul ignore next */
|
|
128548
128548
|
0;
|
|
128549
128549
|
emit("exit", process29.exitCode, null);
|
|
128550
128550
|
emit("afterexit", process29.exitCode, null);
|
|
@@ -130572,24 +130572,24 @@ function assembleStyles() {
|
|
|
130572
130572
|
enumerable: false
|
|
130573
130573
|
},
|
|
130574
130574
|
ansi256ToAnsi: {
|
|
130575
|
-
value(
|
|
130576
|
-
if (
|
|
130577
|
-
return 30 +
|
|
130575
|
+
value(code3) {
|
|
130576
|
+
if (code3 < 8) {
|
|
130577
|
+
return 30 + code3;
|
|
130578
130578
|
}
|
|
130579
|
-
if (
|
|
130580
|
-
return 90 + (
|
|
130579
|
+
if (code3 < 16) {
|
|
130580
|
+
return 90 + (code3 - 8);
|
|
130581
130581
|
}
|
|
130582
130582
|
let red2;
|
|
130583
130583
|
let green2;
|
|
130584
130584
|
let blue2;
|
|
130585
|
-
if (
|
|
130586
|
-
red2 = ((
|
|
130585
|
+
if (code3 >= 232) {
|
|
130586
|
+
red2 = ((code3 - 232) * 10 + 8) / 255;
|
|
130587
130587
|
green2 = red2;
|
|
130588
130588
|
blue2 = red2;
|
|
130589
130589
|
} else {
|
|
130590
|
-
|
|
130591
|
-
const remainder =
|
|
130592
|
-
red2 = Math.floor(
|
|
130590
|
+
code3 -= 16;
|
|
130591
|
+
const remainder = code3 % 36;
|
|
130592
|
+
red2 = Math.floor(code3 / 36) / 5;
|
|
130593
130593
|
green2 = Math.floor(remainder / 6) / 5;
|
|
130594
130594
|
blue2 = remainder % 6 / 5;
|
|
130595
130595
|
}
|
|
@@ -130620,8 +130620,8 @@ var ANSI_BACKGROUND_OFFSET, wrapAnsi16, wrapAnsi256, wrapAnsi16m, styles, modifi
|
|
|
130620
130620
|
var init_ansi_styles = __esm({
|
|
130621
130621
|
"../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js"() {
|
|
130622
130622
|
ANSI_BACKGROUND_OFFSET = 10;
|
|
130623
|
-
wrapAnsi16 = (offset = 0) => (
|
|
130624
|
-
wrapAnsi256 = (offset = 0) => (
|
|
130623
|
+
wrapAnsi16 = (offset = 0) => (code3) => `\x1B[${code3 + offset}m`;
|
|
130624
|
+
wrapAnsi256 = (offset = 0) => (code3) => `\x1B[${38 + offset};5;${code3}m`;
|
|
130625
130625
|
wrapAnsi16m = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
130626
130626
|
styles = {
|
|
130627
130627
|
modifier: {
|
|
@@ -130741,7 +130741,7 @@ var init_wrap_ansi = __esm({
|
|
|
130741
130741
|
ESCAPE_INTRODUCER_REGEX = new RegExp(`[${ESCAPE_CHARACTERS}]`, "g");
|
|
130742
130742
|
ROW_BOUNDARY_REGEX = new RegExp(`[\\n${ESCAPE_CHARACTERS}]`, "g");
|
|
130743
130743
|
ASCII_PRINTABLE_REGEX = /^[ -~]*$/;
|
|
130744
|
-
wrapAnsiCode = (
|
|
130744
|
+
wrapAnsiCode = (code3) => `${ANSI_ESCAPE}${ANSI_CSI}${code3}${ANSI_SGR_TERMINATOR}`;
|
|
130745
130745
|
wrapAnsiHyperlink = (url2, parameters = "") => `${ANSI_ESCAPE}${ANSI_ESCAPE_LINK}${parameters};${url2}${ANSI_ESCAPE_BELL}`;
|
|
130746
130746
|
matchAnsiEscape = (string3, index) => {
|
|
130747
130747
|
if (!ESCAPES.has(string3[index])) {
|
|
@@ -130821,13 +130821,13 @@ var init_wrap_ansi = __esm({
|
|
|
130821
130821
|
};
|
|
130822
130822
|
getColonColorToken = (parameter) => {
|
|
130823
130823
|
const parts2 = parameter.split(":");
|
|
130824
|
-
const
|
|
130824
|
+
const code3 = Number.parseInt(parts2[0], 10);
|
|
130825
130825
|
const mode = Number.parseInt(parts2[1], 10);
|
|
130826
|
-
if (![ANSI_SGR_FOREGROUND_EXTENDED, ANSI_SGR_BACKGROUND_EXTENDED, ANSI_SGR_UNDERLINE_COLOR_EXTENDED].includes(
|
|
130826
|
+
if (![ANSI_SGR_FOREGROUND_EXTENDED, ANSI_SGR_BACKGROUND_EXTENDED, ANSI_SGR_UNDERLINE_COLOR_EXTENDED].includes(code3)) {
|
|
130827
130827
|
return;
|
|
130828
130828
|
}
|
|
130829
130829
|
if (mode === ANSI_SGR_COLOR_MODE_256 && parts2.length === 3 && /^\d+$/.test(parts2[2])) {
|
|
130830
|
-
return { code:
|
|
130830
|
+
return { code: code3, open: parameter, hasArguments: true };
|
|
130831
130831
|
}
|
|
130832
130832
|
if (mode !== ANSI_SGR_COLOR_MODE_RGB) {
|
|
130833
130833
|
return;
|
|
@@ -130835,7 +130835,7 @@ var init_wrap_ansi = __esm({
|
|
|
130835
130835
|
const components = parts2.length === 6 ? parts2.slice(3) : parts2.slice(2);
|
|
130836
130836
|
const colorSpace = parts2.length === 6 ? parts2[2] : void 0;
|
|
130837
130837
|
if (components.length === 3 && components.every((component) => /^\d+$/.test(component)) && (colorSpace === void 0 || /^\d*$/.test(colorSpace))) {
|
|
130838
|
-
return { code:
|
|
130838
|
+
return { code: code3, open: parameter, hasArguments: true };
|
|
130839
130839
|
}
|
|
130840
130840
|
};
|
|
130841
130841
|
getSgrTokens = (sgrParameters) => {
|
|
@@ -130850,18 +130850,18 @@ var init_wrap_ansi = __esm({
|
|
|
130850
130850
|
}
|
|
130851
130851
|
continue;
|
|
130852
130852
|
}
|
|
130853
|
-
const
|
|
130854
|
-
if (!Number.isFinite(
|
|
130853
|
+
const code3 = parameter === "" ? ANSI_SGR_RESET : Number.parseInt(parameter, 10);
|
|
130854
|
+
if (!Number.isFinite(code3)) {
|
|
130855
130855
|
continue;
|
|
130856
130856
|
}
|
|
130857
|
-
if (
|
|
130857
|
+
if (code3 === ANSI_SGR_FOREGROUND_EXTENDED || code3 === ANSI_SGR_BACKGROUND_EXTENDED || code3 === ANSI_SGR_UNDERLINE_COLOR_EXTENDED) {
|
|
130858
130858
|
if (index + 1 >= parameters.length) {
|
|
130859
130859
|
break;
|
|
130860
130860
|
}
|
|
130861
130861
|
const mode = Number.parseInt(parameters[index + 1], 10);
|
|
130862
130862
|
const colorIndex = Number.parseInt(parameters[index + 2], 10);
|
|
130863
130863
|
if (mode === ANSI_SGR_COLOR_MODE_256 && Number.isFinite(colorIndex)) {
|
|
130864
|
-
sgrTokens.push({ code:
|
|
130864
|
+
sgrTokens.push({ code: code3, open: [code3, mode, colorIndex].join(";"), hasArguments: true });
|
|
130865
130865
|
index += 2;
|
|
130866
130866
|
continue;
|
|
130867
130867
|
}
|
|
@@ -130869,13 +130869,13 @@ var init_wrap_ansi = __esm({
|
|
|
130869
130869
|
const green2 = Number.parseInt(parameters[index + 3], 10);
|
|
130870
130870
|
const blue2 = Number.parseInt(parameters[index + 4], 10);
|
|
130871
130871
|
if (mode === ANSI_SGR_COLOR_MODE_RGB && Number.isFinite(red2) && Number.isFinite(green2) && Number.isFinite(blue2)) {
|
|
130872
|
-
sgrTokens.push({ code:
|
|
130872
|
+
sgrTokens.push({ code: code3, open: [code3, mode, red2, green2, blue2].join(";"), hasArguments: true });
|
|
130873
130873
|
index += 4;
|
|
130874
130874
|
continue;
|
|
130875
130875
|
}
|
|
130876
130876
|
break;
|
|
130877
130877
|
}
|
|
130878
|
-
sgrTokens.push({ code:
|
|
130878
|
+
sgrTokens.push({ code: code3, open: String(code3), hasArguments: false });
|
|
130879
130879
|
}
|
|
130880
130880
|
return sgrTokens;
|
|
130881
130881
|
};
|
|
@@ -130898,22 +130898,22 @@ var init_wrap_ansi = __esm({
|
|
|
130898
130898
|
}
|
|
130899
130899
|
};
|
|
130900
130900
|
getColorStyle = (sgrToken) => {
|
|
130901
|
-
const { code:
|
|
130902
|
-
if (
|
|
130901
|
+
const { code: code3, open: open6, hasArguments } = sgrToken;
|
|
130902
|
+
if (code3 >= 30 && code3 <= 37 || code3 >= 90 && code3 <= 97 || code3 === ANSI_SGR_FOREGROUND_EXTENDED && hasArguments) {
|
|
130903
130903
|
return {
|
|
130904
130904
|
family: "foreground",
|
|
130905
130905
|
open: open6,
|
|
130906
130906
|
close: ANSI_SGR_RESET_FOREGROUND
|
|
130907
130907
|
};
|
|
130908
130908
|
}
|
|
130909
|
-
if (
|
|
130909
|
+
if (code3 >= 40 && code3 <= 47 || code3 >= 100 && code3 <= 107 || code3 === ANSI_SGR_BACKGROUND_EXTENDED && hasArguments) {
|
|
130910
130910
|
return {
|
|
130911
130911
|
family: "background",
|
|
130912
130912
|
open: open6,
|
|
130913
130913
|
close: ANSI_SGR_RESET_BACKGROUND
|
|
130914
130914
|
};
|
|
130915
130915
|
}
|
|
130916
|
-
if (
|
|
130916
|
+
if (code3 === ANSI_SGR_UNDERLINE_COLOR_EXTENDED && hasArguments) {
|
|
130917
130917
|
return {
|
|
130918
130918
|
family: "underlineColor",
|
|
130919
130919
|
open: open6,
|
|
@@ -130921,32 +130921,32 @@ var init_wrap_ansi = __esm({
|
|
|
130921
130921
|
};
|
|
130922
130922
|
}
|
|
130923
130923
|
};
|
|
130924
|
-
applySgrResetCode = (
|
|
130925
|
-
if (
|
|
130924
|
+
applySgrResetCode = (code3, activeStyles) => {
|
|
130925
|
+
if (code3 === ANSI_SGR_RESET) {
|
|
130926
130926
|
activeStyles.length = 0;
|
|
130927
130927
|
return true;
|
|
130928
130928
|
}
|
|
130929
|
-
if (
|
|
130929
|
+
if (code3 === ANSI_SGR_RESET_FOREGROUND) {
|
|
130930
130930
|
removeActiveStyle(activeStyles, "foreground");
|
|
130931
130931
|
return true;
|
|
130932
130932
|
}
|
|
130933
|
-
if (
|
|
130933
|
+
if (code3 === ANSI_SGR_RESET_BACKGROUND) {
|
|
130934
130934
|
removeActiveStyle(activeStyles, "background");
|
|
130935
130935
|
return true;
|
|
130936
130936
|
}
|
|
130937
|
-
if (
|
|
130937
|
+
if (code3 === ANSI_SGR_RESET_UNDERLINE_COLOR) {
|
|
130938
130938
|
removeActiveStyle(activeStyles, "underlineColor");
|
|
130939
130939
|
return true;
|
|
130940
130940
|
}
|
|
130941
|
-
if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(
|
|
130942
|
-
removeModifierStylesByClose(activeStyles,
|
|
130941
|
+
if (ANSI_SGR_MODIFIER_CLOSE_CODES.has(code3)) {
|
|
130942
|
+
removeModifierStylesByClose(activeStyles, code3);
|
|
130943
130943
|
return true;
|
|
130944
130944
|
}
|
|
130945
130945
|
return false;
|
|
130946
130946
|
};
|
|
130947
130947
|
applySgrToken = (sgrToken, activeStyles) => {
|
|
130948
|
-
const { code:
|
|
130949
|
-
if (applySgrResetCode(
|
|
130948
|
+
const { code: code3 } = sgrToken;
|
|
130949
|
+
if (applySgrResetCode(code3, activeStyles)) {
|
|
130950
130950
|
return;
|
|
130951
130951
|
}
|
|
130952
130952
|
const colorStyle = getColorStyle(sgrToken);
|
|
@@ -130954,10 +130954,10 @@ var init_wrap_ansi = __esm({
|
|
|
130954
130954
|
upsertActiveStyle(activeStyles, colorStyle);
|
|
130955
130955
|
return;
|
|
130956
130956
|
}
|
|
130957
|
-
const close = ansi_styles_default.codes.get(
|
|
130957
|
+
const close = ansi_styles_default.codes.get(code3);
|
|
130958
130958
|
if (close !== void 0 && close !== ANSI_SGR_RESET) {
|
|
130959
130959
|
upsertActiveStyle(activeStyles, {
|
|
130960
|
-
family: `modifier-${
|
|
130960
|
+
family: `modifier-${code3}`,
|
|
130961
130961
|
open: sgrToken.open,
|
|
130962
130962
|
close
|
|
130963
130963
|
});
|
|
@@ -130969,8 +130969,8 @@ var init_wrap_ansi = __esm({
|
|
|
130969
130969
|
}
|
|
130970
130970
|
};
|
|
130971
130971
|
applySgrResets = (sgrParameters, activeStyles) => {
|
|
130972
|
-
for (const { code:
|
|
130973
|
-
applySgrResetCode(
|
|
130972
|
+
for (const { code: code3 } of getSgrTokens(sgrParameters)) {
|
|
130973
|
+
applySgrResetCode(code3, activeStyles);
|
|
130974
130974
|
}
|
|
130975
130975
|
};
|
|
130976
130976
|
applyLeadingSgrResets = (string3, startIndex, activeStyles) => {
|
|
@@ -131871,14 +131871,14 @@ var require_react_reconciler_production = __commonJS({
|
|
|
131871
131871
|
}
|
|
131872
131872
|
function noop4() {
|
|
131873
131873
|
}
|
|
131874
|
-
function formatProdErrorMessage(
|
|
131875
|
-
var url2 = "https://react.dev/errors/" +
|
|
131874
|
+
function formatProdErrorMessage(code3) {
|
|
131875
|
+
var url2 = "https://react.dev/errors/" + code3;
|
|
131876
131876
|
if (1 < arguments.length) {
|
|
131877
131877
|
url2 += "?args[]=" + encodeURIComponent(arguments[1]);
|
|
131878
131878
|
for (var i14 = 2; i14 < arguments.length; i14++)
|
|
131879
131879
|
url2 += "&args[]=" + encodeURIComponent(arguments[i14]);
|
|
131880
131880
|
}
|
|
131881
|
-
return "Minified React error #" +
|
|
131881
|
+
return "Minified React error #" + code3 + "; visit " + url2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
|
|
131882
131882
|
}
|
|
131883
131883
|
function getNearestMountedFiber(fiber) {
|
|
131884
131884
|
var node = fiber, nearestMounted = fiber;
|
|
@@ -132864,8 +132864,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
132864
132864
|
currentEntangledActionThenable = {
|
|
132865
132865
|
status: "pending",
|
|
132866
132866
|
value: void 0,
|
|
132867
|
-
then: function(
|
|
132868
|
-
entangledListeners.push(
|
|
132867
|
+
then: function(resolve13) {
|
|
132868
|
+
entangledListeners.push(resolve13);
|
|
132869
132869
|
}
|
|
132870
132870
|
};
|
|
132871
132871
|
}
|
|
@@ -132888,8 +132888,8 @@ var require_react_reconciler_production = __commonJS({
|
|
|
132888
132888
|
status: "pending",
|
|
132889
132889
|
value: null,
|
|
132890
132890
|
reason: null,
|
|
132891
|
-
then: function(
|
|
132892
|
-
listeners.push(
|
|
132891
|
+
then: function(resolve13) {
|
|
132892
|
+
listeners.push(resolve13);
|
|
132893
132893
|
}
|
|
132894
132894
|
};
|
|
132895
132895
|
thenable.then(
|
|
@@ -139067,9 +139067,9 @@ var require_react_reconciler_production = __commonJS({
|
|
|
139067
139067
|
});
|
|
139068
139068
|
return workInProgress2;
|
|
139069
139069
|
}
|
|
139070
|
-
function createFiberFromTypeAndProps(type, key, pendingProps,
|
|
139070
|
+
function createFiberFromTypeAndProps(type, key, pendingProps, owner2, mode, lanes) {
|
|
139071
139071
|
var fiberTag = 0;
|
|
139072
|
-
|
|
139072
|
+
owner2 = type;
|
|
139073
139073
|
if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
|
|
139074
139074
|
else if ("string" === typeof type)
|
|
139075
139075
|
fiberTag = supportsResources && supportsSingletons ? isHostHoistableType(type, pendingProps, contextStackCursor.current) ? 26 : isHostSingletonType(type) ? 27 : 5 : supportsResources ? isHostHoistableType(
|
|
@@ -139115,7 +139115,7 @@ var require_react_reconciler_production = __commonJS({
|
|
|
139115
139115
|
break a;
|
|
139116
139116
|
case REACT_LAZY_TYPE:
|
|
139117
139117
|
fiberTag = 16;
|
|
139118
|
-
|
|
139118
|
+
owner2 = null;
|
|
139119
139119
|
break a;
|
|
139120
139120
|
}
|
|
139121
139121
|
fiberTag = 29;
|
|
@@ -139126,11 +139126,11 @@ var require_react_reconciler_production = __commonJS({
|
|
|
139126
139126
|
""
|
|
139127
139127
|
)
|
|
139128
139128
|
);
|
|
139129
|
-
|
|
139129
|
+
owner2 = null;
|
|
139130
139130
|
}
|
|
139131
139131
|
key = createFiber(fiberTag, pendingProps, key, mode);
|
|
139132
139132
|
key.elementType = type;
|
|
139133
|
-
key.type =
|
|
139133
|
+
key.type = owner2;
|
|
139134
139134
|
key.lanes = lanes;
|
|
139135
139135
|
return key;
|
|
139136
139136
|
}
|
|
@@ -142488,8 +142488,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
142488
142488
|
currentEntangledActionThenable = {
|
|
142489
142489
|
status: "pending",
|
|
142490
142490
|
value: void 0,
|
|
142491
|
-
then: function(
|
|
142492
|
-
entangledListeners.push(
|
|
142491
|
+
then: function(resolve13) {
|
|
142492
|
+
entangledListeners.push(resolve13);
|
|
142493
142493
|
}
|
|
142494
142494
|
};
|
|
142495
142495
|
}
|
|
@@ -142512,8 +142512,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
142512
142512
|
status: "pending",
|
|
142513
142513
|
value: null,
|
|
142514
142514
|
reason: null,
|
|
142515
|
-
then: function(
|
|
142516
|
-
listeners.push(
|
|
142515
|
+
then: function(resolve13) {
|
|
142516
|
+
listeners.push(resolve13);
|
|
142517
142517
|
}
|
|
142518
142518
|
};
|
|
142519
142519
|
thenable.then(
|
|
@@ -151624,7 +151624,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
151624
151624
|
}, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
|
|
151625
151625
|
return workInProgress2;
|
|
151626
151626
|
}
|
|
151627
|
-
function createFiberFromTypeAndProps(type, key, pendingProps,
|
|
151627
|
+
function createFiberFromTypeAndProps(type, key, pendingProps, owner2, mode, lanes) {
|
|
151628
151628
|
var fiberTag = 0, resolvedType = type;
|
|
151629
151629
|
if ("function" === typeof type)
|
|
151630
151630
|
shouldConstruct(type) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
|
|
@@ -151646,10 +151646,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
151646
151646
|
mode |= 24;
|
|
151647
151647
|
break;
|
|
151648
151648
|
case REACT_PROFILER_TYPE:
|
|
151649
|
-
return type = pendingProps,
|
|
151649
|
+
return type = pendingProps, owner2 = mode, "string" !== typeof type.id && console.error(
|
|
151650
151650
|
'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
|
|
151651
151651
|
typeof type.id
|
|
151652
|
-
), key = createFiber(12, type, key,
|
|
151652
|
+
), key = createFiber(12, type, key, owner2 | 2), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
|
|
151653
151653
|
case REACT_SUSPENSE_TYPE:
|
|
151654
151654
|
return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
|
|
151655
151655
|
case REACT_SUSPENSE_LIST_TYPE:
|
|
@@ -151679,7 +151679,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
151679
151679
|
if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
|
|
151680
151680
|
resolvedType += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
|
151681
151681
|
null === type ? pendingProps = "null" : isArrayImpl(type) ? pendingProps = "array" : void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE ? (pendingProps = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />", resolvedType = " Did you accidentally export a JSX literal instead of a component?") : pendingProps = typeof type;
|
|
151682
|
-
fiberTag =
|
|
151682
|
+
fiberTag = owner2 ? "number" === typeof owner2.tag ? getComponentNameFromFiber(owner2) : "string" === typeof owner2.name ? owner2.name : null : null;
|
|
151683
151683
|
fiberTag && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
|
|
151684
151684
|
fiberTag = 29;
|
|
151685
151685
|
pendingProps = Error(
|
|
@@ -151691,7 +151691,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
151691
151691
|
key.elementType = type;
|
|
151692
151692
|
key.type = resolvedType;
|
|
151693
151693
|
key.lanes = lanes;
|
|
151694
|
-
key._debugOwner =
|
|
151694
|
+
key._debugOwner = owner2;
|
|
151695
151695
|
return key;
|
|
151696
151696
|
}
|
|
151697
151697
|
function createFiberFromElement(element, mode, lanes) {
|
|
@@ -153895,11 +153895,11 @@ function isCsiFinalCharacter(codePoint) {
|
|
|
153895
153895
|
function isRegionalIndicatorCodePoint(codePoint) {
|
|
153896
153896
|
return codePoint >= REGIONAL_INDICATOR_SYMBOL_LETTER_A && codePoint <= REGIONAL_INDICATOR_SYMBOL_LETTER_Z;
|
|
153897
153897
|
}
|
|
153898
|
-
function createControlParseResult(
|
|
153898
|
+
function createControlParseResult(code3, endIndex) {
|
|
153899
153899
|
return {
|
|
153900
153900
|
token: {
|
|
153901
153901
|
type: "control",
|
|
153902
|
-
code:
|
|
153902
|
+
code: code3
|
|
153903
153903
|
},
|
|
153904
153904
|
endIndex
|
|
153905
153905
|
};
|
|
@@ -153935,8 +153935,8 @@ function getGraphemeWidth(grapheme) {
|
|
|
153935
153935
|
}
|
|
153936
153936
|
return 1;
|
|
153937
153937
|
}
|
|
153938
|
-
function getSgrPrefix(
|
|
153939
|
-
if (
|
|
153938
|
+
function getSgrPrefix(code3) {
|
|
153939
|
+
if (code3.startsWith("\x9B")) {
|
|
153940
153940
|
return "\x9B";
|
|
153941
153941
|
}
|
|
153942
153942
|
return `${ESCAPE}${ANSI_CSI2}`;
|
|
@@ -153944,14 +153944,14 @@ function getSgrPrefix(code2) {
|
|
|
153944
153944
|
function createSgrCode(prefix, values) {
|
|
153945
153945
|
return `${prefix}${values.join(";")}${ANSI_SGR_TERMINATOR2}`;
|
|
153946
153946
|
}
|
|
153947
|
-
function getSgrFragments(
|
|
153947
|
+
function getSgrFragments(code3) {
|
|
153948
153948
|
const fragments = [];
|
|
153949
|
-
const sgrPrefix = getSgrPrefix(
|
|
153949
|
+
const sgrPrefix = getSgrPrefix(code3);
|
|
153950
153950
|
let parameterString;
|
|
153951
|
-
if (
|
|
153952
|
-
parameterString =
|
|
153953
|
-
} else if (
|
|
153954
|
-
parameterString =
|
|
153951
|
+
if (code3.startsWith(`${ESCAPE}${ANSI_CSI2}`)) {
|
|
153952
|
+
parameterString = code3.slice(2, -1);
|
|
153953
|
+
} else if (code3.startsWith("\x9B")) {
|
|
153954
|
+
parameterString = code3.slice(1, -1);
|
|
153955
153955
|
} else {
|
|
153956
153956
|
return fragments;
|
|
153957
153957
|
}
|
|
@@ -154048,15 +154048,15 @@ function parseCsiCode(string3, index) {
|
|
|
154048
154048
|
for (let sequenceIndex = sequenceStartIndex; sequenceIndex < string3.length; sequenceIndex++) {
|
|
154049
154049
|
const codePoint = string3.codePointAt(sequenceIndex);
|
|
154050
154050
|
if (isCsiFinalCharacter(codePoint)) {
|
|
154051
|
-
const
|
|
154051
|
+
const code3 = string3.slice(index, sequenceIndex + 1);
|
|
154052
154052
|
if (string3[sequenceIndex] !== ANSI_SGR_TERMINATOR2 || !hasCanonicalSgrParameters) {
|
|
154053
|
-
return createControlParseResult(
|
|
154053
|
+
return createControlParseResult(code3, sequenceIndex + 1);
|
|
154054
154054
|
}
|
|
154055
154055
|
return {
|
|
154056
154056
|
token: {
|
|
154057
154057
|
type: "sgr",
|
|
154058
|
-
code:
|
|
154059
|
-
fragments: getSgrFragments(
|
|
154058
|
+
code: code3,
|
|
154059
|
+
fragments: getSgrFragments(code3)
|
|
154060
154060
|
},
|
|
154061
154061
|
endIndex: sequenceIndex + 1
|
|
154062
154062
|
};
|
|
@@ -154096,12 +154096,12 @@ function parseHyperlinkCode(string3, index) {
|
|
|
154096
154096
|
for (let sequenceIndex = uriStart + 1; sequenceIndex < string3.length; sequenceIndex++) {
|
|
154097
154097
|
const character = string3[sequenceIndex];
|
|
154098
154098
|
if (character === ANSI_BELL) {
|
|
154099
|
-
const
|
|
154099
|
+
const code3 = string3.slice(index, sequenceIndex + 1);
|
|
154100
154100
|
const action = sequenceIndex === uriStart + 1 ? "close" : "open";
|
|
154101
154101
|
return {
|
|
154102
154102
|
token: {
|
|
154103
154103
|
type: "hyperlink",
|
|
154104
|
-
code:
|
|
154104
|
+
code: code3,
|
|
154105
154105
|
action,
|
|
154106
154106
|
closePrefix: hyperlinkClose,
|
|
154107
154107
|
terminator: ANSI_BELL
|
|
@@ -154110,12 +154110,12 @@ function parseHyperlinkCode(string3, index) {
|
|
|
154110
154110
|
};
|
|
154111
154111
|
}
|
|
154112
154112
|
if (character === ESCAPE && string3[sequenceIndex + 1] === ANSI_OSC_TERMINATOR) {
|
|
154113
|
-
const
|
|
154113
|
+
const code3 = string3.slice(index, sequenceIndex + 2);
|
|
154114
154114
|
const action = sequenceIndex === uriStart + 1 ? "close" : "open";
|
|
154115
154115
|
return {
|
|
154116
154116
|
token: {
|
|
154117
154117
|
type: "hyperlink",
|
|
154118
|
-
code:
|
|
154118
|
+
code: code3,
|
|
154119
154119
|
action,
|
|
154120
154120
|
closePrefix: hyperlinkClose,
|
|
154121
154121
|
terminator: ANSI_STRING_TERMINATOR
|
|
@@ -154124,12 +154124,12 @@ function parseHyperlinkCode(string3, index) {
|
|
|
154124
154124
|
};
|
|
154125
154125
|
}
|
|
154126
154126
|
if (character === C1_STRING_TERMINATOR) {
|
|
154127
|
-
const
|
|
154127
|
+
const code3 = string3.slice(index, sequenceIndex + 1);
|
|
154128
154128
|
const action = sequenceIndex === uriStart + 1 ? "close" : "open";
|
|
154129
154129
|
return {
|
|
154130
154130
|
token: {
|
|
154131
154131
|
type: "hyperlink",
|
|
154132
|
-
code:
|
|
154132
|
+
code: code3,
|
|
154133
154133
|
action,
|
|
154134
154134
|
closePrefix: hyperlinkClose,
|
|
154135
154135
|
terminator: C1_STRING_TERMINATOR
|
|
@@ -154252,9 +154252,9 @@ function collectVisibleCharacters(string3) {
|
|
|
154252
154252
|
while (index < string3.length) {
|
|
154253
154253
|
const codePoint = string3.codePointAt(index);
|
|
154254
154254
|
if (ESCAPES2.has(codePoint)) {
|
|
154255
|
-
const
|
|
154256
|
-
if (
|
|
154257
|
-
index =
|
|
154255
|
+
const code3 = parseAnsiCode(string3, index);
|
|
154256
|
+
if (code3) {
|
|
154257
|
+
index = code3.endIndex;
|
|
154258
154258
|
continue;
|
|
154259
154259
|
}
|
|
154260
154260
|
}
|
|
@@ -154305,10 +154305,10 @@ function tokenizeAnsiWithVisibleSegmentation(string3, { endCharacter = Number.PO
|
|
|
154305
154305
|
while (index < string3.length) {
|
|
154306
154306
|
const codePoint = string3.codePointAt(index);
|
|
154307
154307
|
if (ESCAPES2.has(codePoint)) {
|
|
154308
|
-
const
|
|
154309
|
-
if (
|
|
154310
|
-
tokens.push(
|
|
154311
|
-
index =
|
|
154308
|
+
const code3 = parseAnsiCode(string3, index);
|
|
154309
|
+
if (code3) {
|
|
154310
|
+
tokens.push(code3.token);
|
|
154311
|
+
index = code3.endIndex;
|
|
154312
154312
|
continue;
|
|
154313
154313
|
}
|
|
154314
154314
|
}
|
|
@@ -154360,10 +154360,10 @@ function hasAnsiSplitContinuationAhead(string3, startIndex, previousVisibleValue
|
|
|
154360
154360
|
while (index < string3.length) {
|
|
154361
154361
|
const codePoint = string3.codePointAt(index);
|
|
154362
154362
|
if (ESCAPES2.has(codePoint)) {
|
|
154363
|
-
const
|
|
154364
|
-
if (
|
|
154363
|
+
const code3 = parseAnsiCode(string3, index);
|
|
154364
|
+
if (code3) {
|
|
154365
154365
|
hasAnsiCode = true;
|
|
154366
|
-
index =
|
|
154366
|
+
index = code3.endIndex;
|
|
154367
154367
|
continue;
|
|
154368
154368
|
}
|
|
154369
154369
|
}
|
|
@@ -154388,10 +154388,10 @@ function tokenizeAnsi(string3, { endCharacter = Number.POSITIVE_INFINITY } = {})
|
|
|
154388
154388
|
while (index < string3.length) {
|
|
154389
154389
|
const codePoint = string3.codePointAt(index);
|
|
154390
154390
|
if (ESCAPES2.has(codePoint)) {
|
|
154391
|
-
const
|
|
154392
|
-
if (
|
|
154393
|
-
tokens.push(
|
|
154394
|
-
index =
|
|
154391
|
+
const code3 = parseAnsiCode(string3, index);
|
|
154392
|
+
if (code3) {
|
|
154393
|
+
tokens.push(code3.token);
|
|
154394
|
+
index = code3.endIndex;
|
|
154395
154395
|
hasAnsiSinceLastVisible = true;
|
|
154396
154396
|
continue;
|
|
154397
154397
|
}
|
|
@@ -154764,7 +154764,7 @@ function cliTruncate(text, columns, options = {}) {
|
|
|
154764
154764
|
LEFT_BRACKET: 91,
|
|
154765
154765
|
LETTER_M: 109
|
|
154766
154766
|
};
|
|
154767
|
-
const isSgrParameter = (
|
|
154767
|
+
const isSgrParameter = (code3) => code3 >= 48 && code3 <= 57 || code3 === 59;
|
|
154768
154768
|
function leadingSgrSpanEndIndex(string3) {
|
|
154769
154769
|
let index = 0;
|
|
154770
154770
|
while (index + 2 < string3.length && string3.codePointAt(index) === ANSI.ESC && string3.codePointAt(index + 1) === ANSI.LEFT_BRACKET) {
|
|
@@ -156222,24 +156222,24 @@ function assembleStyles2() {
|
|
|
156222
156222
|
enumerable: false
|
|
156223
156223
|
},
|
|
156224
156224
|
ansi256ToAnsi: {
|
|
156225
|
-
value(
|
|
156226
|
-
if (
|
|
156227
|
-
return 30 +
|
|
156225
|
+
value(code3) {
|
|
156226
|
+
if (code3 < 8) {
|
|
156227
|
+
return 30 + code3;
|
|
156228
156228
|
}
|
|
156229
|
-
if (
|
|
156230
|
-
return 90 + (
|
|
156229
|
+
if (code3 < 16) {
|
|
156230
|
+
return 90 + (code3 - 8);
|
|
156231
156231
|
}
|
|
156232
156232
|
let red2;
|
|
156233
156233
|
let green2;
|
|
156234
156234
|
let blue2;
|
|
156235
|
-
if (
|
|
156236
|
-
red2 = ((
|
|
156235
|
+
if (code3 >= 232) {
|
|
156236
|
+
red2 = ((code3 - 232) * 10 + 8) / 255;
|
|
156237
156237
|
green2 = red2;
|
|
156238
156238
|
blue2 = red2;
|
|
156239
156239
|
} else {
|
|
156240
|
-
|
|
156241
|
-
const remainder =
|
|
156242
|
-
red2 = Math.floor(
|
|
156240
|
+
code3 -= 16;
|
|
156241
|
+
const remainder = code3 % 36;
|
|
156242
|
+
red2 = Math.floor(code3 / 36) / 5;
|
|
156243
156243
|
green2 = Math.floor(remainder / 6) / 5;
|
|
156244
156244
|
blue2 = remainder % 6 / 5;
|
|
156245
156245
|
}
|
|
@@ -156270,8 +156270,8 @@ var ANSI_BACKGROUND_OFFSET2, wrapAnsi162, wrapAnsi2562, wrapAnsi16m2, styles3, m
|
|
|
156270
156270
|
var init_ansi_styles2 = __esm({
|
|
156271
156271
|
"../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js"() {
|
|
156272
156272
|
ANSI_BACKGROUND_OFFSET2 = 10;
|
|
156273
|
-
wrapAnsi162 = (offset = 0) => (
|
|
156274
|
-
wrapAnsi2562 = (offset = 0) => (
|
|
156273
|
+
wrapAnsi162 = (offset = 0) => (code3) => `\x1B[${code3 + offset}m`;
|
|
156274
|
+
wrapAnsi2562 = (offset = 0) => (code3) => `\x1B[${38 + offset};5;${code3}m`;
|
|
156275
156275
|
wrapAnsi16m2 = (offset = 0) => (red2, green2, blue2) => `\x1B[${38 + offset};2;${red2};${green2};${blue2}m`;
|
|
156276
156276
|
styles3 = {
|
|
156277
156277
|
modifier: {
|
|
@@ -156974,25 +156974,25 @@ var init_consts = __esm({
|
|
|
156974
156974
|
});
|
|
156975
156975
|
|
|
156976
156976
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.3.1/node_modules/@alcalzone/ansi-tokenize/build/ansiCodes.js
|
|
156977
|
-
function getEndCode(
|
|
156978
|
-
if (endCodesSet.has(
|
|
156979
|
-
return
|
|
156980
|
-
if (endCodesMap.has(
|
|
156981
|
-
return endCodesMap.get(
|
|
156982
|
-
if (
|
|
156983
|
-
if (
|
|
156977
|
+
function getEndCode(code3) {
|
|
156978
|
+
if (endCodesSet.has(code3))
|
|
156979
|
+
return code3;
|
|
156980
|
+
if (endCodesMap.has(code3))
|
|
156981
|
+
return endCodesMap.get(code3);
|
|
156982
|
+
if (code3.startsWith(linkCodePrefix)) {
|
|
156983
|
+
if (code3.endsWith("\x1B\\"))
|
|
156984
156984
|
return linkEndCodeST;
|
|
156985
|
-
if (
|
|
156985
|
+
if (code3.endsWith("\x9C"))
|
|
156986
156986
|
return linkEndCodeC1ST;
|
|
156987
156987
|
return linkEndCode;
|
|
156988
156988
|
}
|
|
156989
|
-
|
|
156990
|
-
if (
|
|
156989
|
+
code3 = code3.slice(2);
|
|
156990
|
+
if (code3.startsWith("38")) {
|
|
156991
156991
|
return ansi_styles_default.color.close;
|
|
156992
|
-
} else if (
|
|
156992
|
+
} else if (code3.startsWith("48")) {
|
|
156993
156993
|
return ansi_styles_default.bgColor.close;
|
|
156994
156994
|
}
|
|
156995
|
-
const ret = ansi_styles_default.codes.get(parseInt(
|
|
156995
|
+
const ret = ansi_styles_default.codes.get(parseInt(code3, 10));
|
|
156996
156996
|
if (ret) {
|
|
156997
156997
|
return ansi_styles_default.color.ansi(ret);
|
|
156998
156998
|
} else {
|
|
@@ -157000,11 +157000,11 @@ function getEndCode(code2) {
|
|
|
157000
157000
|
}
|
|
157001
157001
|
}
|
|
157002
157002
|
function ansiCodesToString(codes) {
|
|
157003
|
-
const deduplicated = new Set(codes.map((
|
|
157003
|
+
const deduplicated = new Set(codes.map((code3) => code3.code));
|
|
157004
157004
|
return [...deduplicated].join("");
|
|
157005
157005
|
}
|
|
157006
|
-
function isIntensityCode(
|
|
157007
|
-
return
|
|
157006
|
+
function isIntensityCode(code3) {
|
|
157007
|
+
return code3.code === ansi_styles_default.bold.open || code3.code === ansi_styles_default.dim.open;
|
|
157008
157008
|
}
|
|
157009
157009
|
var endCodesSet, endCodesMap;
|
|
157010
157010
|
var init_ansiCodes = __esm({
|
|
@@ -157029,19 +157029,19 @@ function reduceAnsiCodes(codes) {
|
|
|
157029
157029
|
}
|
|
157030
157030
|
function reduceAnsiCodesIncremental(codes, newCodes) {
|
|
157031
157031
|
let ret = [...codes];
|
|
157032
|
-
for (const
|
|
157033
|
-
if (
|
|
157032
|
+
for (const code3 of newCodes) {
|
|
157033
|
+
if (code3.code === ansi_styles_default.reset.open) {
|
|
157034
157034
|
ret = [];
|
|
157035
|
-
} else if (endCodesSet.has(
|
|
157036
|
-
ret = ret.filter((retCode) => retCode.endCode !==
|
|
157035
|
+
} else if (endCodesSet.has(code3.code)) {
|
|
157036
|
+
ret = ret.filter((retCode) => retCode.endCode !== code3.code);
|
|
157037
157037
|
} else {
|
|
157038
|
-
if (isIntensityCode(
|
|
157039
|
-
if (!ret.find((retCode) => retCode.code ===
|
|
157040
|
-
ret.push(
|
|
157038
|
+
if (isIntensityCode(code3)) {
|
|
157039
|
+
if (!ret.find((retCode) => retCode.code === code3.code && retCode.endCode === code3.endCode)) {
|
|
157040
|
+
ret.push(code3);
|
|
157041
157041
|
}
|
|
157042
157042
|
} else {
|
|
157043
|
-
ret = ret.filter((retCode) => retCode.endCode !==
|
|
157044
|
-
ret.push(
|
|
157043
|
+
ret = ret.filter((retCode) => retCode.endCode !== code3.endCode);
|
|
157044
|
+
ret.push(code3);
|
|
157045
157045
|
}
|
|
157046
157046
|
}
|
|
157047
157047
|
}
|
|
@@ -157056,9 +157056,9 @@ var init_reduce = __esm({
|
|
|
157056
157056
|
|
|
157057
157057
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.3.1/node_modules/@alcalzone/ansi-tokenize/build/undo.js
|
|
157058
157058
|
function undoAnsiCodes2(codes) {
|
|
157059
|
-
return reduceAnsiCodes(codes).reverse().map((
|
|
157060
|
-
...
|
|
157061
|
-
code:
|
|
157059
|
+
return reduceAnsiCodes(codes).reverse().map((code3) => ({
|
|
157060
|
+
...code3,
|
|
157061
|
+
code: code3.endCode
|
|
157062
157062
|
}));
|
|
157063
157063
|
}
|
|
157064
157064
|
var init_undo = __esm({
|
|
@@ -157069,20 +157069,20 @@ var init_undo = __esm({
|
|
|
157069
157069
|
|
|
157070
157070
|
// ../../node_modules/.pnpm/@alcalzone+ansi-tokenize@0.3.1/node_modules/@alcalzone/ansi-tokenize/build/diff.js
|
|
157071
157071
|
function diffAnsiCodes(from, to4) {
|
|
157072
|
-
const endCodesInTo = new Set(to4.map((
|
|
157073
|
-
const startCodesInTo = new Set(to4.map((
|
|
157074
|
-
const startCodesInFrom = new Set(from.map((
|
|
157072
|
+
const endCodesInTo = new Set(to4.map((code3) => code3.endCode));
|
|
157073
|
+
const startCodesInTo = new Set(to4.map((code3) => code3.code));
|
|
157074
|
+
const startCodesInFrom = new Set(from.map((code3) => code3.code));
|
|
157075
157075
|
return [
|
|
157076
157076
|
// Ignore all styles in `from` that are not overwritten or removed by `to`
|
|
157077
157077
|
// Disable all styles in `from` that are removed in `to`
|
|
157078
|
-
...undoAnsiCodes2(from.filter((
|
|
157079
|
-
if (isIntensityCode(
|
|
157080
|
-
return !startCodesInTo.has(
|
|
157078
|
+
...undoAnsiCodes2(from.filter((code3) => {
|
|
157079
|
+
if (isIntensityCode(code3)) {
|
|
157080
|
+
return !startCodesInTo.has(code3.code);
|
|
157081
157081
|
}
|
|
157082
|
-
return !endCodesInTo.has(
|
|
157082
|
+
return !endCodesInTo.has(code3.endCode);
|
|
157083
157083
|
})),
|
|
157084
157084
|
// Add all styles in `to` that don't exist in `from`
|
|
157085
|
-
...to4.filter((
|
|
157085
|
+
...to4.filter((code3) => !startCodesInFrom.has(code3.code))
|
|
157086
157086
|
];
|
|
157087
157087
|
}
|
|
157088
157088
|
var init_diff = __esm({
|
|
@@ -157197,11 +157197,11 @@ function parseSGRSequence(string3, offset) {
|
|
|
157197
157197
|
return;
|
|
157198
157198
|
return string3.slice(0, endIndex + 1);
|
|
157199
157199
|
}
|
|
157200
|
-
function splitCompoundSGRSequences(
|
|
157201
|
-
if (!
|
|
157202
|
-
return [
|
|
157200
|
+
function splitCompoundSGRSequences(code3) {
|
|
157201
|
+
if (!code3.includes(";")) {
|
|
157202
|
+
return [code3];
|
|
157203
157203
|
}
|
|
157204
|
-
const codeParts =
|
|
157204
|
+
const codeParts = code3.slice(2, -1).split(";");
|
|
157205
157205
|
const ret = [];
|
|
157206
157206
|
for (let i14 = 0; i14 < codeParts.length; i14++) {
|
|
157207
157207
|
const rawCode = codeParts[i14];
|
|
@@ -157229,29 +157229,29 @@ function tokenize(str, endChar = Number.POSITIVE_INFINITY) {
|
|
|
157229
157229
|
continue;
|
|
157230
157230
|
const codePoint = segment.codePointAt(0);
|
|
157231
157231
|
if (ESCAPES3.has(codePoint)) {
|
|
157232
|
-
let
|
|
157232
|
+
let code3;
|
|
157233
157233
|
const nextCodePoint = str.codePointAt(index + 1);
|
|
157234
157234
|
if (nextCodePoint === CC_OSC) {
|
|
157235
|
-
|
|
157236
|
-
if (
|
|
157235
|
+
code3 = parseLinkCode(str, index);
|
|
157236
|
+
if (code3) {
|
|
157237
157237
|
ret.push({
|
|
157238
157238
|
type: "ansi",
|
|
157239
|
-
code:
|
|
157240
|
-
endCode: getEndCode(
|
|
157239
|
+
code: code3,
|
|
157240
|
+
endCode: getEndCode(code3)
|
|
157241
157241
|
});
|
|
157242
157242
|
} else {
|
|
157243
|
-
|
|
157244
|
-
if (
|
|
157243
|
+
code3 = parseOSCSequence(str, index);
|
|
157244
|
+
if (code3) {
|
|
157245
157245
|
ret.push({
|
|
157246
157246
|
type: "control",
|
|
157247
|
-
code:
|
|
157247
|
+
code: code3
|
|
157248
157248
|
});
|
|
157249
157249
|
}
|
|
157250
157250
|
}
|
|
157251
157251
|
} else if (nextCodePoint === CC_CSI) {
|
|
157252
|
-
|
|
157253
|
-
if (
|
|
157254
|
-
const codes = splitCompoundSGRSequences(
|
|
157252
|
+
code3 = parseSGRSequence(str, index);
|
|
157253
|
+
if (code3) {
|
|
157254
|
+
const codes = splitCompoundSGRSequences(code3);
|
|
157255
157255
|
for (const individualCode of codes) {
|
|
157256
157256
|
ret.push({
|
|
157257
157257
|
type: "ansi",
|
|
@@ -157261,8 +157261,8 @@ function tokenize(str, endChar = Number.POSITIVE_INFINITY) {
|
|
|
157261
157261
|
}
|
|
157262
157262
|
}
|
|
157263
157263
|
}
|
|
157264
|
-
if (
|
|
157265
|
-
codeEndIndex = index +
|
|
157264
|
+
if (code3) {
|
|
157265
|
+
codeEndIndex = index + code3.length;
|
|
157266
157266
|
continue;
|
|
157267
157267
|
}
|
|
157268
157268
|
}
|
|
@@ -159464,8 +159464,8 @@ var init_ink = __esm({
|
|
|
159464
159464
|
noop = () => {
|
|
159465
159465
|
};
|
|
159466
159466
|
textEncoder3 = new TextEncoder();
|
|
159467
|
-
yieldImmediate = async () => new Promise((
|
|
159468
|
-
setImmediate(
|
|
159467
|
+
yieldImmediate = async () => new Promise((resolve13) => {
|
|
159468
|
+
setImmediate(resolve13);
|
|
159469
159469
|
});
|
|
159470
159470
|
kittyQueryEscapeByte = 27;
|
|
159471
159471
|
kittyQueryOpenBracketByte = 91;
|
|
@@ -159682,8 +159682,8 @@ var init_ink = __esm({
|
|
|
159682
159682
|
};
|
|
159683
159683
|
}
|
|
159684
159684
|
this.initKittyKeyboard();
|
|
159685
|
-
this.exitPromise = new Promise((
|
|
159686
|
-
this.resolveExitPromise =
|
|
159685
|
+
this.exitPromise = new Promise((resolve13, reject) => {
|
|
159686
|
+
this.resolveExitPromise = resolve13;
|
|
159687
159687
|
this.rejectExitPromise = reject;
|
|
159688
159688
|
});
|
|
159689
159689
|
void this.exitPromise.catch(noop);
|
|
@@ -159994,9 +159994,9 @@ var init_ink = __esm({
|
|
|
159994
159994
|
settleThrottle(this.throttledOnRender, canWriteToStdout);
|
|
159995
159995
|
settleThrottle(this.throttledLog, canWriteToStdout);
|
|
159996
159996
|
if (canWriteToStdout && hasWritableState) {
|
|
159997
|
-
await new Promise((
|
|
159997
|
+
await new Promise((resolve13) => {
|
|
159998
159998
|
this.options.stdout.write("", () => {
|
|
159999
|
-
|
|
159999
|
+
resolve13();
|
|
160000
160000
|
});
|
|
160001
160001
|
});
|
|
160002
160002
|
return;
|
|
@@ -160082,8 +160082,8 @@ var init_ink = __esm({
|
|
|
160082
160082
|
async awaitNextRender() {
|
|
160083
160083
|
if (!this.nextRenderCommit) {
|
|
160084
160084
|
let resolveRender;
|
|
160085
|
-
const promise = new Promise((
|
|
160086
|
-
resolveRender =
|
|
160085
|
+
const promise = new Promise((resolve13) => {
|
|
160086
|
+
resolveRender = resolve13;
|
|
160087
160087
|
});
|
|
160088
160088
|
this.nextRenderCommit = { promise, resolve: resolveRender };
|
|
160089
160089
|
}
|
|
@@ -160477,7 +160477,7 @@ var init_parse_keypress = __esm({
|
|
|
160477
160477
|
"[Z": "tab"
|
|
160478
160478
|
};
|
|
160479
160479
|
nonAlphanumericKeys = [...Object.values(keyName), "backspace"];
|
|
160480
|
-
isShiftKey = (
|
|
160480
|
+
isShiftKey = (code3) => {
|
|
160481
160481
|
return [
|
|
160482
160482
|
"[a",
|
|
160483
160483
|
"[b",
|
|
@@ -160491,9 +160491,9 @@ var init_parse_keypress = __esm({
|
|
|
160491
160491
|
"[7$",
|
|
160492
160492
|
"[8$",
|
|
160493
160493
|
"[Z"
|
|
160494
|
-
].includes(
|
|
160494
|
+
].includes(code3);
|
|
160495
160495
|
};
|
|
160496
|
-
isCtrlKey = (
|
|
160496
|
+
isCtrlKey = (code3) => {
|
|
160497
160497
|
return [
|
|
160498
160498
|
"Oa",
|
|
160499
160499
|
"Ob",
|
|
@@ -160506,7 +160506,7 @@ var init_parse_keypress = __esm({
|
|
|
160506
160506
|
"[6^",
|
|
160507
160507
|
"[7^",
|
|
160508
160508
|
"[8^"
|
|
160509
|
-
].includes(
|
|
160509
|
+
].includes(code3);
|
|
160510
160510
|
};
|
|
160511
160511
|
kittyKeyRe = /^\x1b\[(\d+)(?:;(\d+)(?::(\d+))?(?:;([\d:]+))?)?u$/;
|
|
160512
160512
|
kittySpecialKeyRe = /^\x1b\[(\d+);(\d+):(\d+)([A-Za-z~])$/;
|
|
@@ -160786,15 +160786,15 @@ var init_parse_keypress = __esm({
|
|
|
160786
160786
|
if (segs[0] === "\x1B" && segs[1] === "\x1B") {
|
|
160787
160787
|
key.meta = true;
|
|
160788
160788
|
}
|
|
160789
|
-
const
|
|
160789
|
+
const code3 = [parts2[1], parts2[2], parts2[4], parts2[6]].filter(Boolean).join("");
|
|
160790
160790
|
const modifier = (parts2[3] || parts2[5] || 1) - 1;
|
|
160791
160791
|
key.ctrl = !!(modifier & 4);
|
|
160792
160792
|
key.meta = key.meta || !!(modifier & 10);
|
|
160793
160793
|
key.shift = !!(modifier & 1);
|
|
160794
|
-
key.code =
|
|
160795
|
-
key.name = keyName[
|
|
160796
|
-
key.shift = isShiftKey(
|
|
160797
|
-
key.ctrl = isCtrlKey(
|
|
160794
|
+
key.code = code3;
|
|
160795
|
+
key.name = keyName[code3] ?? "";
|
|
160796
|
+
key.shift = isShiftKey(code3) || key.shift;
|
|
160797
|
+
key.ctrl = isCtrlKey(code3) || key.ctrl;
|
|
160798
160798
|
}
|
|
160799
160799
|
return key;
|
|
160800
160800
|
};
|
|
@@ -161213,14 +161213,14 @@ var require_react_jsx_runtime_development = __commonJS({
|
|
|
161213
161213
|
componentName = this.props.ref;
|
|
161214
161214
|
return void 0 !== componentName ? componentName : null;
|
|
161215
161215
|
}
|
|
161216
|
-
function ReactElement(type, key, props,
|
|
161216
|
+
function ReactElement(type, key, props, owner2, debugStack, debugTask) {
|
|
161217
161217
|
var refProp = props.ref;
|
|
161218
161218
|
type = {
|
|
161219
161219
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
161220
161220
|
type,
|
|
161221
161221
|
key,
|
|
161222
161222
|
props,
|
|
161223
|
-
_owner:
|
|
161223
|
+
_owner: owner2
|
|
161224
161224
|
};
|
|
161225
161225
|
null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", {
|
|
161226
161226
|
enumerable: false,
|
|
@@ -161468,7 +161468,7 @@ async function promptSelect(title2, candidates2, signal) {
|
|
|
161468
161468
|
}
|
|
161469
161469
|
return chosen;
|
|
161470
161470
|
}
|
|
161471
|
-
async function promptText(title2) {
|
|
161471
|
+
async function promptText(title2, hint = "Type a folder or .sh filename \xB7 Enter uses default \xB7 Esc cancels") {
|
|
161472
161472
|
let answer;
|
|
161473
161473
|
let stop = () => {
|
|
161474
161474
|
};
|
|
@@ -161487,7 +161487,7 @@ async function promptText(title2) {
|
|
|
161487
161487
|
});
|
|
161488
161488
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { borderStyle: "round", borderColor: "cyan", paddingX: 1, flexDirection: "column", width: 72, children: [
|
|
161489
161489
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, color: "cyan", children: title2 }),
|
|
161490
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children:
|
|
161490
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: hint }),
|
|
161491
161491
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "cyan", children: `\u203A ${value2}\u258C` })
|
|
161492
161492
|
] });
|
|
161493
161493
|
}
|
|
@@ -161505,16 +161505,16 @@ function MultiSelect({ title: title2, candidates: candidates2, onChoose, onCance
|
|
|
161505
161505
|
const [cursor2, setCursor] = (0, import_react34.useState)(0);
|
|
161506
161506
|
const [selected, setSelected] = (0, import_react34.useState)(/* @__PURE__ */ new Set());
|
|
161507
161507
|
const matches = candidates2.filter((candidate) => matching(candidate, query));
|
|
161508
|
-
const
|
|
161509
|
-
const active = Math.min(cursor2,
|
|
161508
|
+
const choices2 = [all, ...matches];
|
|
161509
|
+
const active = Math.min(cursor2, choices2.length - 1);
|
|
161510
161510
|
use_input_default((input, key) => {
|
|
161511
161511
|
if (key.ctrl && input === "c") return onInterrupt();
|
|
161512
161512
|
if (key.escape) return onCancel();
|
|
161513
161513
|
if (key.return) return selected.size ? onChoose(candidates2.filter((one) => selected.has(one.value)).map((one) => one.value)) : onCancel();
|
|
161514
161514
|
if (key.upArrow) return setCursor(Math.max(active - 1, 0));
|
|
161515
|
-
if (key.downArrow) return setCursor(Math.min(active + 1,
|
|
161515
|
+
if (key.downArrow) return setCursor(Math.min(active + 1, choices2.length - 1));
|
|
161516
161516
|
if (input === " ") {
|
|
161517
|
-
const value2 =
|
|
161517
|
+
const value2 = choices2[active]?.value;
|
|
161518
161518
|
if (!value2) return;
|
|
161519
161519
|
if (value2 === all.value) {
|
|
161520
161520
|
const every = candidates2.every((one) => selected.has(one.value));
|
|
@@ -161534,7 +161534,7 @@ function MultiSelect({ title: title2, candidates: candidates2, onChoose, onCance
|
|
|
161534
161534
|
}
|
|
161535
161535
|
});
|
|
161536
161536
|
const start = Math.max(0, active - VISIBLE + 1);
|
|
161537
|
-
const window2 =
|
|
161537
|
+
const window2 = choices2.slice(start, start + VISIBLE);
|
|
161538
161538
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { borderStyle: "round", borderColor: "cyan", paddingX: 1, flexDirection: "column", width: 72, children: [
|
|
161539
161539
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, color: "cyan", children: title2 }),
|
|
161540
161540
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: `filter: ${query || "(type to narrow)"} \xB7 \u2191\u2193 to move \xB7 space to toggle \xB7 enter to reveal \xB7 esc to cancel` }),
|
|
@@ -161695,12 +161695,12 @@ var require_isexe = __commonJS({
|
|
|
161695
161695
|
if (typeof Promise !== "function") {
|
|
161696
161696
|
throw new TypeError("callback not provided");
|
|
161697
161697
|
}
|
|
161698
|
-
return new Promise(function(
|
|
161698
|
+
return new Promise(function(resolve13, reject) {
|
|
161699
161699
|
isexe(path9, options || {}, function(er6, is3) {
|
|
161700
161700
|
if (er6) {
|
|
161701
161701
|
reject(er6);
|
|
161702
161702
|
} else {
|
|
161703
|
-
|
|
161703
|
+
resolve13(is3);
|
|
161704
161704
|
}
|
|
161705
161705
|
});
|
|
161706
161706
|
});
|
|
@@ -161766,27 +161766,27 @@ var require_which = __commonJS({
|
|
|
161766
161766
|
opt = {};
|
|
161767
161767
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
161768
161768
|
const found = [];
|
|
161769
|
-
const step = (i14) => new Promise((
|
|
161769
|
+
const step = (i14) => new Promise((resolve13, reject) => {
|
|
161770
161770
|
if (i14 === pathEnv.length)
|
|
161771
|
-
return opt.all && found.length ?
|
|
161771
|
+
return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
|
|
161772
161772
|
const ppRaw = pathEnv[i14];
|
|
161773
161773
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
161774
161774
|
const pCmd = path9.join(pathPart, cmd);
|
|
161775
161775
|
const p11 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
161776
|
-
|
|
161776
|
+
resolve13(subStep(p11, i14, 0));
|
|
161777
161777
|
});
|
|
161778
|
-
const subStep = (p11, i14, ii3) => new Promise((
|
|
161778
|
+
const subStep = (p11, i14, ii3) => new Promise((resolve13, reject) => {
|
|
161779
161779
|
if (ii3 === pathExt.length)
|
|
161780
|
-
return
|
|
161780
|
+
return resolve13(step(i14 + 1));
|
|
161781
161781
|
const ext = pathExt[ii3];
|
|
161782
161782
|
isexe(p11 + ext, { pathExt: pathExtExe }, (er6, is3) => {
|
|
161783
161783
|
if (!er6 && is3) {
|
|
161784
161784
|
if (opt.all)
|
|
161785
161785
|
found.push(p11 + ext);
|
|
161786
161786
|
else
|
|
161787
|
-
return
|
|
161787
|
+
return resolve13(p11 + ext);
|
|
161788
161788
|
}
|
|
161789
|
-
return
|
|
161789
|
+
return resolve13(subStep(p11, i14, ii3 + 1));
|
|
161790
161790
|
});
|
|
161791
161791
|
});
|
|
161792
161792
|
return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
|
|
@@ -162728,7 +162728,7 @@ var require_kill = __commonJS({
|
|
|
162728
162728
|
return spawnedPromise;
|
|
162729
162729
|
}
|
|
162730
162730
|
let timeoutId;
|
|
162731
|
-
const timeoutPromise = new Promise((
|
|
162731
|
+
const timeoutPromise = new Promise((resolve13, reject) => {
|
|
162732
162732
|
timeoutId = setTimeout(() => {
|
|
162733
162733
|
timeoutKill(spawned, killSignal, reject);
|
|
162734
162734
|
}, timeout);
|
|
@@ -162847,7 +162847,7 @@ var require_get_stream = __commonJS({
|
|
|
162847
162847
|
};
|
|
162848
162848
|
const { maxBuffer } = options;
|
|
162849
162849
|
const stream2 = bufferStream(options);
|
|
162850
|
-
await new Promise((
|
|
162850
|
+
await new Promise((resolve13, reject) => {
|
|
162851
162851
|
const rejectPromise = (error2) => {
|
|
162852
162852
|
if (error2 && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
162853
162853
|
error2.bufferedData = stream2.getBufferedValue();
|
|
@@ -162857,7 +162857,7 @@ var require_get_stream = __commonJS({
|
|
|
162857
162857
|
(async () => {
|
|
162858
162858
|
try {
|
|
162859
162859
|
await streamPipelinePromisified(inputStream, stream2);
|
|
162860
|
-
|
|
162860
|
+
resolve13();
|
|
162861
162861
|
} catch (error2) {
|
|
162862
162862
|
rejectPromise(error2);
|
|
162863
162863
|
}
|
|
@@ -163014,9 +163014,9 @@ var require_promise = __commonJS({
|
|
|
163014
163014
|
return spawned;
|
|
163015
163015
|
};
|
|
163016
163016
|
var getSpawnedPromise = (spawned) => {
|
|
163017
|
-
return new Promise((
|
|
163017
|
+
return new Promise((resolve13, reject) => {
|
|
163018
163018
|
spawned.on("exit", (exitCode, signal) => {
|
|
163019
|
-
|
|
163019
|
+
resolve13({ exitCode, signal });
|
|
163020
163020
|
});
|
|
163021
163021
|
spawned.on("error", (error2) => {
|
|
163022
163022
|
reject(error2);
|
|
@@ -165313,9 +165313,9 @@ import { existsSync, readFileSync as readFileSync2 } from "node:fs";
|
|
|
165313
165313
|
import { homedir as homedir3 } from "node:os";
|
|
165314
165314
|
import { resolve as resolve3 } from "node:path";
|
|
165315
165315
|
var CliConfigurationInvalid = class extends Error {
|
|
165316
|
-
constructor(
|
|
165316
|
+
constructor(code3, detail) {
|
|
165317
165317
|
super(detail);
|
|
165318
|
-
this.code =
|
|
165318
|
+
this.code = code3;
|
|
165319
165319
|
this.name = "CliConfigurationInvalid";
|
|
165320
165320
|
}
|
|
165321
165321
|
code;
|
|
@@ -165571,9 +165571,9 @@ var CliKeyVault = class {
|
|
|
165571
165571
|
|
|
165572
165572
|
// src/session-store.ts
|
|
165573
165573
|
var SessionStoreUnreadable = class extends Error {
|
|
165574
|
-
constructor(
|
|
165575
|
-
super(
|
|
165576
|
-
this.code =
|
|
165574
|
+
constructor(code3) {
|
|
165575
|
+
super(code3);
|
|
165576
|
+
this.code = code3;
|
|
165577
165577
|
this.name = "SessionStoreUnreadable";
|
|
165578
165578
|
}
|
|
165579
165579
|
code;
|
|
@@ -165612,7 +165612,7 @@ var FileOperatorSessionStore = class {
|
|
|
165612
165612
|
if (error2.code !== "EEXIST") throw error2;
|
|
165613
165613
|
await this.recoverAbandonedLock(lockPath);
|
|
165614
165614
|
if (Date.now() >= deadline) throw new SessionStoreUnreadable("session_lock_timed_out");
|
|
165615
|
-
await new Promise((
|
|
165615
|
+
await new Promise((resolve13) => setTimeout(resolve13, 100));
|
|
165616
165616
|
continue;
|
|
165617
165617
|
}
|
|
165618
165618
|
try {
|
|
@@ -165688,8 +165688,8 @@ var FileOperatorSessionStore = class {
|
|
|
165688
165688
|
}
|
|
165689
165689
|
async abandonedLock(lockPath) {
|
|
165690
165690
|
try {
|
|
165691
|
-
const [
|
|
165692
|
-
const pid = Number(
|
|
165691
|
+
const [owner2, file2] = await Promise.all([readFile6(`${lockPath}/owner`, "utf8"), stat2(lockPath)]);
|
|
165692
|
+
const pid = Number(owner2);
|
|
165693
165693
|
if (!Number.isSafeInteger(pid) || pid <= 0) return Date.now() - file2.mtimeMs > 1e4;
|
|
165694
165694
|
try {
|
|
165695
165695
|
process.kill(pid, 0);
|
|
@@ -165865,7 +165865,7 @@ async function readHiddenPin(signal, show) {
|
|
|
165865
165865
|
input.resume();
|
|
165866
165866
|
const bytes = [];
|
|
165867
165867
|
try {
|
|
165868
|
-
return await new Promise((
|
|
165868
|
+
return await new Promise((resolve13, reject) => {
|
|
165869
165869
|
const cleanup = () => {
|
|
165870
165870
|
input.off("data", onData);
|
|
165871
165871
|
signal?.removeEventListener("abort", onAbort);
|
|
@@ -165888,7 +165888,7 @@ async function readHiddenPin(signal, show) {
|
|
|
165888
165888
|
cleanup();
|
|
165889
165889
|
(show ?? deviceStatus)("PIN entered. Waiting for SafeKey PRO...");
|
|
165890
165890
|
if (!show && process.stderr.isTTY) process.stderr.write("\n");
|
|
165891
|
-
|
|
165891
|
+
resolve13(Uint8Array.from(bytes));
|
|
165892
165892
|
return;
|
|
165893
165893
|
}
|
|
165894
165894
|
if (byte === 127 || byte === 8) bytes.pop();
|
|
@@ -168650,7 +168650,7 @@ var handleSerializationError = ({ error: error2, methodName, isSubprocess, messa
|
|
|
168650
168650
|
throw new Error(`${getMethodName(methodName, isSubprocess)}'s argument type is invalid: the message cannot be serialized: ${String(message2)}.`, { cause: error2 });
|
|
168651
168651
|
}
|
|
168652
168652
|
};
|
|
168653
|
-
var isSerializationError = ({ code:
|
|
168653
|
+
var isSerializationError = ({ code: code3, message: message2 }) => SERIALIZATION_ERROR_CODES.has(code3) || SERIALIZATION_ERROR_MESSAGES.some((serializationErrorMessage) => message2.includes(serializationErrorMessage));
|
|
168654
168654
|
var SERIALIZATION_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
168655
168655
|
// Message is `undefined`
|
|
168656
168656
|
"ERR_MISSING_ARGS",
|
|
@@ -168677,8 +168677,8 @@ var disconnect = (anyProcess) => {
|
|
|
168677
168677
|
// ../../node_modules/.pnpm/execa@9.6.1/node_modules/execa/lib/utils/deferred.js
|
|
168678
168678
|
var createDeferred = () => {
|
|
168679
168679
|
const methods = {};
|
|
168680
|
-
const promise = new Promise((
|
|
168681
|
-
Object.assign(methods, { resolve:
|
|
168680
|
+
const promise = new Promise((resolve13, reject) => {
|
|
168681
|
+
Object.assign(methods, { resolve: resolve13, reject });
|
|
168682
168682
|
});
|
|
168683
168683
|
return Object.assign(promise, methods);
|
|
168684
168684
|
};
|
|
@@ -172386,17 +172386,17 @@ var Emitter7 = class {
|
|
|
172386
172386
|
list4.splice(i14, 1);
|
|
172387
172387
|
}
|
|
172388
172388
|
}
|
|
172389
|
-
emit(ev2,
|
|
172389
|
+
emit(ev2, code3, signal) {
|
|
172390
172390
|
if (this.emitted[ev2]) {
|
|
172391
172391
|
return false;
|
|
172392
172392
|
}
|
|
172393
172393
|
this.emitted[ev2] = true;
|
|
172394
172394
|
let ret = false;
|
|
172395
172395
|
for (const fn3 of this.listeners[ev2]) {
|
|
172396
|
-
ret = fn3(
|
|
172396
|
+
ret = fn3(code3, signal) === true || ret;
|
|
172397
172397
|
}
|
|
172398
172398
|
if (ev2 === "exit") {
|
|
172399
|
-
ret = this.emit("afterExit",
|
|
172399
|
+
ret = this.emit("afterExit", code3, signal) || ret;
|
|
172400
172400
|
}
|
|
172401
172401
|
return ret;
|
|
172402
172402
|
}
|
|
@@ -172496,8 +172496,8 @@ var SignalExit = class extends SignalExitBase {
|
|
|
172496
172496
|
this.#process.emit = (ev2, ...a13) => {
|
|
172497
172497
|
return this.#processEmit(ev2, ...a13);
|
|
172498
172498
|
};
|
|
172499
|
-
this.#process.reallyExit = (
|
|
172500
|
-
return this.#processReallyExit(
|
|
172499
|
+
this.#process.reallyExit = (code3) => {
|
|
172500
|
+
return this.#processReallyExit(code3);
|
|
172501
172501
|
};
|
|
172502
172502
|
}
|
|
172503
172503
|
unload() {
|
|
@@ -172519,11 +172519,11 @@ var SignalExit = class extends SignalExitBase {
|
|
|
172519
172519
|
this.#process.reallyExit = this.#originalProcessReallyExit;
|
|
172520
172520
|
this.#emitter.count -= 1;
|
|
172521
172521
|
}
|
|
172522
|
-
#processReallyExit(
|
|
172522
|
+
#processReallyExit(code3) {
|
|
172523
172523
|
if (!processOk(this.#process)) {
|
|
172524
172524
|
return 0;
|
|
172525
172525
|
}
|
|
172526
|
-
this.#process.exitCode =
|
|
172526
|
+
this.#process.exitCode = code3 || 0;
|
|
172527
172527
|
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
172528
172528
|
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
172529
172529
|
}
|
|
@@ -173321,11 +173321,11 @@ var addConcurrentStream = (concurrentStreams, stream, waitName) => {
|
|
|
173321
173321
|
const promises = weakMap.get(stream);
|
|
173322
173322
|
const promise = createDeferred();
|
|
173323
173323
|
promises.push(promise);
|
|
173324
|
-
const
|
|
173325
|
-
return { resolve:
|
|
173324
|
+
const resolve13 = promise.resolve.bind(promise);
|
|
173325
|
+
return { resolve: resolve13, promises };
|
|
173326
173326
|
};
|
|
173327
|
-
var waitForConcurrentStreams = async ({ resolve:
|
|
173328
|
-
|
|
173327
|
+
var waitForConcurrentStreams = async ({ resolve: resolve13, promises }, subprocess) => {
|
|
173328
|
+
resolve13();
|
|
173329
173329
|
const [isSubprocessExit] = await Promise.race([
|
|
173330
173330
|
Promise.allSettled([true, subprocess]),
|
|
173331
173331
|
Promise.all([false, ...promises])
|
|
@@ -174561,11 +174561,11 @@ ${selectors.map((one) => ` ${one.value}`).join("\n")}`);
|
|
|
174561
174561
|
return 0;
|
|
174562
174562
|
}
|
|
174563
174563
|
async function expireClipboard(content, ttlMs, terminal, signal) {
|
|
174564
|
-
await new Promise((
|
|
174564
|
+
await new Promise((resolve13) => {
|
|
174565
174565
|
const finish = () => {
|
|
174566
174566
|
clearTimeout(timer);
|
|
174567
174567
|
signal?.removeEventListener("abort", finish);
|
|
174568
|
-
|
|
174568
|
+
resolve13();
|
|
174569
174569
|
};
|
|
174570
174570
|
const timer = setTimeout(finish, ttlMs);
|
|
174571
174571
|
signal?.addEventListener("abort", finish, { once: true });
|
|
@@ -175053,11 +175053,11 @@ function parsePlanHints(args) {
|
|
|
175053
175053
|
init_node_base2();
|
|
175054
175054
|
import { dirname as dirname3, resolve as resolve6 } from "node:path";
|
|
175055
175055
|
await init_select();
|
|
175056
|
-
var coded = (
|
|
175056
|
+
var coded = (code3) => Object.assign(new Error(code3), { code: code3 });
|
|
175057
175057
|
var OrganizationChoiceRequired = class extends Error {
|
|
175058
|
-
constructor(
|
|
175059
|
-
super(`${
|
|
175060
|
-
this.code =
|
|
175058
|
+
constructor(code3, organizations) {
|
|
175059
|
+
super(`${code3}: ${organizations.map(({ name: name2, id: id2 }) => `${name2} (${id2})`).join(", ") || "none available"}`);
|
|
175060
|
+
this.code = code3;
|
|
175061
175061
|
this.organizations = organizations;
|
|
175062
175062
|
}
|
|
175063
175063
|
code;
|
|
@@ -175309,7 +175309,7 @@ async function executeWithSecrets(options, values, signal) {
|
|
|
175309
175309
|
await Promise.race([
|
|
175310
175310
|
completed,
|
|
175311
175311
|
exited.then(async () => {
|
|
175312
|
-
await new Promise((
|
|
175312
|
+
await new Promise((resolve13) => setImmediate(resolve13));
|
|
175313
175313
|
assertActive(signal);
|
|
175314
175314
|
if (!delivered) throw Object.assign(new Error("secret_delivery_incomplete"), { code: "secret_delivery_incomplete" });
|
|
175315
175315
|
})
|
|
@@ -175317,12 +175317,12 @@ async function executeWithSecrets(options, values, signal) {
|
|
|
175317
175317
|
assertActive(signal);
|
|
175318
175318
|
return {
|
|
175319
175319
|
wait: async () => {
|
|
175320
|
-
const
|
|
175320
|
+
const code3 = await exited.catch((error2) => {
|
|
175321
175321
|
assertActive(signal);
|
|
175322
175322
|
throw error2;
|
|
175323
175323
|
});
|
|
175324
175324
|
assertActive(signal);
|
|
175325
|
-
if (
|
|
175325
|
+
if (code3 !== 0) throw Object.assign(new Error("child_command_failed"), { code: "child_command_failed", exitCode: code3 });
|
|
175326
175326
|
},
|
|
175327
175327
|
close
|
|
175328
175328
|
};
|
|
@@ -175340,8 +175340,8 @@ async function openSecretSocket(endpoint, value2) {
|
|
|
175340
175340
|
const peers = /* @__PURE__ */ new Set();
|
|
175341
175341
|
let resolveDelivery = () => void 0;
|
|
175342
175342
|
let rejectDelivery = () => void 0;
|
|
175343
|
-
const delivered = new Promise((
|
|
175344
|
-
resolveDelivery =
|
|
175343
|
+
const delivered = new Promise((resolve13, reject) => {
|
|
175344
|
+
resolveDelivery = resolve13;
|
|
175345
175345
|
rejectDelivery = reject;
|
|
175346
175346
|
});
|
|
175347
175347
|
void delivered.catch(() => void 0);
|
|
@@ -175379,12 +175379,12 @@ async function openSecretSocket(endpoint, value2) {
|
|
|
175379
175379
|
flushed = true;
|
|
175380
175380
|
});
|
|
175381
175381
|
});
|
|
175382
|
-
const closed = new Promise((
|
|
175382
|
+
const closed = new Promise((resolve13) => server.once("close", resolve13));
|
|
175383
175383
|
server.on("error", (cause) => finish(failed(cause)));
|
|
175384
175384
|
try {
|
|
175385
|
-
await new Promise((
|
|
175385
|
+
await new Promise((resolve13, reject) => {
|
|
175386
175386
|
server.once("error", reject);
|
|
175387
|
-
server.listen(endpoint,
|
|
175387
|
+
server.listen(endpoint, resolve13);
|
|
175388
175388
|
});
|
|
175389
175389
|
} catch (error2) {
|
|
175390
175390
|
finish(failed(error2));
|
|
@@ -175407,7 +175407,7 @@ function requiredValue(values, selector) {
|
|
|
175407
175407
|
}
|
|
175408
175408
|
function writeSecret(stream, value2) {
|
|
175409
175409
|
const bytes = Buffer.from(value2, "utf8");
|
|
175410
|
-
return new Promise((
|
|
175410
|
+
return new Promise((resolve13, reject) => {
|
|
175411
175411
|
let settled = false;
|
|
175412
175412
|
const finish = (cause) => {
|
|
175413
175413
|
if (settled) return;
|
|
@@ -175417,7 +175417,7 @@ function writeSecret(stream, value2) {
|
|
|
175417
175417
|
reject(Object.assign(new Error("secret_delivery_failed", { cause }), { code: "secret_delivery_failed" }));
|
|
175418
175418
|
return;
|
|
175419
175419
|
}
|
|
175420
|
-
|
|
175420
|
+
resolve13();
|
|
175421
175421
|
};
|
|
175422
175422
|
stream.once("error", finish);
|
|
175423
175423
|
stream.once("close", () => {
|
|
@@ -175431,11 +175431,11 @@ function writeSecret(stream, value2) {
|
|
|
175431
175431
|
});
|
|
175432
175432
|
}
|
|
175433
175433
|
function childExit(child) {
|
|
175434
|
-
return new Promise((
|
|
175434
|
+
return new Promise((resolve13, reject) => {
|
|
175435
175435
|
child.once("error", (cause) => reject(Object.assign(new Error("child_process_start_failed", { cause }), { code: "child_process_start_failed" })));
|
|
175436
|
-
child.once("exit", (
|
|
175436
|
+
child.once("exit", (code3, signal) => {
|
|
175437
175437
|
if (signal) reject(Object.assign(new Error("child_command_signaled"), { code: "child_command_signaled", signal }));
|
|
175438
|
-
else
|
|
175438
|
+
else resolve13(code3 ?? 1);
|
|
175439
175439
|
});
|
|
175440
175440
|
});
|
|
175441
175441
|
}
|
|
@@ -175501,20 +175501,20 @@ function messageFor(error2, business = false, automationCommand) {
|
|
|
175501
175501
|
const system = error2.ref?.system;
|
|
175502
175502
|
return system === "INHERITI_BUSINESS" ? "The Organisation key is not available from SafeKey Mobile for this account." : "The Application key is not available from SafeKey Mobile for this account.";
|
|
175503
175503
|
}
|
|
175504
|
-
const
|
|
175505
|
-
if (
|
|
175504
|
+
const code3 = error2?.code;
|
|
175505
|
+
if (code3 === "plan_governance_reconfiguration_required" || error2?.details?.error === "plan_governance_reconfiguration_required") {
|
|
175506
175506
|
return MESSAGES.plan_governance_reconfiguration_required;
|
|
175507
175507
|
}
|
|
175508
|
-
if (business &&
|
|
175509
|
-
if (business &&
|
|
175508
|
+
if (business && code3 === "plan_not_found") return "No such plan in this Organisation.";
|
|
175509
|
+
if (business && code3 === "action_not_allowed") return "This Organisation is not allowed to open that. Check the integration capabilities and the asset type.";
|
|
175510
175510
|
const deviceError = error2?.message;
|
|
175511
175511
|
if (typeof deviceError === "string" && deviceError.startsWith("SAFEKEY_")) return MESSAGES[deviceError] ?? "SafeKey PRO could not complete the operation.";
|
|
175512
|
-
if (
|
|
175512
|
+
if (code3 === "governance_denied") return error2.message;
|
|
175513
175513
|
const reason = error2?.reason;
|
|
175514
|
-
if (
|
|
175514
|
+
if (code3 === "plan_share_reconstruction_failed" && typeof reason === "string") {
|
|
175515
175515
|
return RECONSTRUCTION_MESSAGES[reason] ?? MESSAGES.plan_share_reconstruction_failed;
|
|
175516
175516
|
}
|
|
175517
|
-
if (typeof
|
|
175517
|
+
if (typeof code3 === "string") return MESSAGES[code3] ?? (automationCommand ? `Automations ${automationCommand} failed (${/^automation_[a-z0-9_]+$/u.test(code3) ? code3 : "unrecognized error code"}). Check the command inputs and provider access.` : code3);
|
|
175518
175518
|
const message2 = error2?.message;
|
|
175519
175519
|
if (typeof message2 === "string" && Object.hasOwn(MESSAGES, message2)) return MESSAGES[message2];
|
|
175520
175520
|
if (automationCommand) {
|
|
@@ -175541,12 +175541,12 @@ function planCreationFailureMessage(stage, error2) {
|
|
|
175541
175541
|
const status = error2?.status;
|
|
175542
175542
|
if (status === 401) return MESSAGES.operator_reauthentication_required;
|
|
175543
175543
|
if (status === 402) return "The Organisation has reached its plan capacity.";
|
|
175544
|
-
const
|
|
175545
|
-
if (
|
|
175546
|
-
if (
|
|
175547
|
-
if (
|
|
175548
|
-
if (
|
|
175549
|
-
if (
|
|
175544
|
+
const code3 = error2?.code ?? error2?.message;
|
|
175545
|
+
if (code3 === "plan_creation_input_changed") return MESSAGES.plan_creation_input_changed;
|
|
175546
|
+
if (code3 === "master_key_not_claimed") return MESSAGES.master_key_not_claimed;
|
|
175547
|
+
if (code3 === "plan_storage_context_changed") return MESSAGES.plan_storage_context_changed;
|
|
175548
|
+
if (code3 === "plan_share_count_invalid") return MESSAGES.plan_share_count_invalid;
|
|
175549
|
+
if (code3 === "reconciliation_required") return MESSAGES.reconciliation_required;
|
|
175550
175550
|
if (stage === "key") return "Could not obtain the Organisation key. Check SafeKey Mobile and retry.";
|
|
175551
175551
|
if (stage === "context") return "Could not prepare the plan. Check your Organisation access and retry.";
|
|
175552
175552
|
return "Could not save the plan. Check your access and plan data before retrying.";
|
|
@@ -175891,6 +175891,7 @@ var ROOT = candidates(
|
|
|
175891
175891
|
["plans", "List and use plans"],
|
|
175892
175892
|
["secrets", "Machine-oriented secret delivery"],
|
|
175893
175893
|
["automations", "Manage local Inheriti\xAE Business automations"],
|
|
175894
|
+
["skill", "Install the agent skill"],
|
|
175894
175895
|
["setup", "Enable shell autocomplete"],
|
|
175895
175896
|
["completion", "Print shell completion"],
|
|
175896
175897
|
["help", "Show help"],
|
|
@@ -178479,6 +178480,7 @@ inheriti <command>
|
|
|
178479
178480
|
setup [--yes|--no-completion] [--shell bash|zsh|fish]
|
|
178480
178481
|
Enable shell autocomplete (Yes is the default)
|
|
178481
178482
|
completion <shell> Print the tab-completion script for bash, zsh or fish
|
|
178483
|
+
skill install Choose Codex, Claude Code, both, or another skills folder
|
|
178482
178484
|
update [--install] Check for a newer CLI build; install after confirmation
|
|
178483
178485
|
version Print the CLI version
|
|
178484
178486
|
help [command] Show detailed usage without signing in
|
|
@@ -178499,6 +178501,9 @@ function commandUsage(topic, environmentVariables) {
|
|
|
178499
178501
|
if (command7 === "secrets" && !Boolean(BUILD_DEPLOYMENT && CLI_FEATURE_FLAGS[BUILD_DEPLOYMENT].automation))
|
|
178500
178502
|
return "Usage: inheriti secrets <exec|resolve>\n\nRun reveal-authorized secret delivery.";
|
|
178501
178503
|
const details = {
|
|
178504
|
+
skill: `Usage: inheriti skill install [--target codex|claude|all | --directory ABSOLUTE_PATH]
|
|
178505
|
+
|
|
178506
|
+
Choose where to install the bundled agent skill. A terminal offers a selector; scripts must specify a target or directory.`,
|
|
178502
178507
|
login: `Usage: inheriti login
|
|
178503
178508
|
|
|
178504
178509
|
Sign in using the system browser. Requires an interactive terminal.`,
|
|
@@ -179080,11 +179085,18 @@ async function plans(context, terminal, argv, configuration) {
|
|
|
179080
179085
|
// src/main.ts
|
|
179081
179086
|
init_node_base2();
|
|
179082
179087
|
|
|
179088
|
+
// src/commands/skill.ts
|
|
179089
|
+
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
179090
|
+
import { lstat as lstat4, mkdir as mkdir6, readFile as readFile10, rename as rename5, rm as rm13, writeFile as writeFile14 } from "node:fs/promises";
|
|
179091
|
+
import { homedir as homedir8 } from "node:os";
|
|
179092
|
+
import { dirname as dirname8, isAbsolute as isAbsolute5, join as join17, resolve as resolve12 } from "node:path";
|
|
179093
|
+
await init_select();
|
|
179094
|
+
|
|
179083
179095
|
// src/skill-install.ts
|
|
179084
179096
|
import { createHash as createHash11, randomUUID as randomUUID9 } from "node:crypto";
|
|
179085
179097
|
import { chmod as chmod5, cp as cp3, lstat as lstat3, mkdir as mkdir5, readFile as readFile9, readdir as readdir3, rename as rename4, rm as rm12, writeFile as writeFile13 } from "node:fs/promises";
|
|
179086
179098
|
import { homedir as homedir7 } from "node:os";
|
|
179087
|
-
import { isAbsolute as isAbsolute4, join as join16, relative as relative2, sep as sep3 } from "node:path";
|
|
179099
|
+
import { dirname as dirname7, isAbsolute as isAbsolute4, join as join16, relative as relative2, sep as sep3 } from "node:path";
|
|
179088
179100
|
function code(error2) {
|
|
179089
179101
|
return error2?.code;
|
|
179090
179102
|
}
|
|
@@ -179122,7 +179134,7 @@ async function restrictTree(path9) {
|
|
|
179122
179134
|
await chmod5(path9, info.isDirectory() ? 448 : info.mode & 64 ? 448 : 384);
|
|
179123
179135
|
if (info.isDirectory()) for (const entry of await readdir3(path9)) await restrictTree(join16(path9, entry));
|
|
179124
179136
|
}
|
|
179125
|
-
async function reconcileCliSkill(packageRoot, env5 = process.env, userHome = homedir7(), effectiveUid = process.getuid?.()) {
|
|
179137
|
+
async function reconcileCliSkill(packageRoot, env5 = process.env, userHome = homedir7(), effectiveUid = process.getuid?.(), options = {}) {
|
|
179126
179138
|
const manifestPath = join16(packageRoot, "skill", "manifest.json");
|
|
179127
179139
|
const manifestInfo = await pathStat(manifestPath);
|
|
179128
179140
|
if (!manifestInfo) return { status: "skipped", reason: "No packaged skill" };
|
|
@@ -179134,38 +179146,66 @@ async function reconcileCliSkill(packageRoot, env5 = process.env, userHome = hom
|
|
|
179134
179146
|
if (manifest.cliVersion !== packageVersion.version) throw new Error("Bundled skill version differs from the CLI.");
|
|
179135
179147
|
const source = join16(packageRoot, "skill", "inheriti-cli");
|
|
179136
179148
|
if (await digestTree(source) !== manifest.sha256) throw new Error("Bundled skill checksum mismatch.");
|
|
179137
|
-
const
|
|
179138
|
-
|
|
179139
|
-
const
|
|
179140
|
-
if (
|
|
179141
|
-
|
|
179149
|
+
const agent = options.agent ?? "codex";
|
|
179150
|
+
const label3 = agent === "codex" ? "Codex" : agent === "claude" ? "Claude" : "Custom";
|
|
179151
|
+
const skills = agent === "custom" ? options.skillsDirectory : void 0;
|
|
179152
|
+
if (agent === "custom" && (!skills || !isAbsolute4(skills)))
|
|
179153
|
+
return { status: "skipped", reason: "Custom skill directory is not absolute" };
|
|
179154
|
+
const home = agent === "custom" ? dirname7(skills) : agent === "claude" ? env5.CLAUDE_CONFIG_DIR || join16(userHome, ".claude") : env5.CODEX_HOME || join16(userHome, ".codex");
|
|
179155
|
+
if (!isAbsolute4(home)) return { status: "skipped", reason: `${label3} home is not absolute` };
|
|
179142
179156
|
if (effectiveUid === 0 && env5.SUDO_USER) return { status: "skipped", reason: "Unsafe sudo user context" };
|
|
179157
|
+
let homeInfo = await pathStat(home);
|
|
179158
|
+
if (!homeInfo && options.createHome && agent !== "custom") {
|
|
179159
|
+
const parent = await pathStat(dirname7(home));
|
|
179160
|
+
if (!parent?.isDirectory() || parent.isSymbolicLink() || effectiveUid !== void 0 && parent.uid !== effectiveUid)
|
|
179161
|
+
return { status: "skipped", reason: `Unsafe ${label3} home parent` };
|
|
179162
|
+
try {
|
|
179163
|
+
await mkdir5(home, { mode: 448 });
|
|
179164
|
+
} catch (error2) {
|
|
179165
|
+
if (code(error2) !== "EEXIST") throw error2;
|
|
179166
|
+
}
|
|
179167
|
+
homeInfo = await pathStat(home);
|
|
179168
|
+
}
|
|
179169
|
+
if (!homeInfo) return { status: "skipped", reason: `${label3} is not installed` };
|
|
179170
|
+
if (!homeInfo.isDirectory() || homeInfo.isSymbolicLink()) return { status: "skipped", reason: `Unsafe ${label3} home` };
|
|
179143
179171
|
if (effectiveUid !== void 0 && homeInfo.uid !== effectiveUid)
|
|
179144
|
-
return { status: "skipped", reason:
|
|
179145
|
-
const
|
|
179146
|
-
const skillsInfo = await pathStat(
|
|
179172
|
+
return { status: "skipped", reason: `Unsafe ${label3} home ownership` };
|
|
179173
|
+
const skillsRoot = skills ?? join16(home, "skills");
|
|
179174
|
+
const skillsInfo = await pathStat(skillsRoot);
|
|
179175
|
+
if (agent === "custom" && skillsInfo && skillsInfo.dev !== homeInfo.dev)
|
|
179176
|
+
return { status: "skipped", reason: "Custom skill directory must share its parent filesystem" };
|
|
179147
179177
|
if (skillsInfo && (!skillsInfo.isDirectory() || skillsInfo.isSymbolicLink())) return { status: "skipped", reason: "Unsafe skill directory" };
|
|
179148
|
-
if (
|
|
179149
|
-
|
|
179178
|
+
if (skillsInfo && effectiveUid !== void 0 && skillsInfo.uid !== effectiveUid)
|
|
179179
|
+
return { status: "skipped", reason: "Unsafe skill directory ownership" };
|
|
179180
|
+
if (!skillsInfo) {
|
|
179181
|
+
try {
|
|
179182
|
+
await mkdir5(skillsRoot, { mode: 448 });
|
|
179183
|
+
} catch (error2) {
|
|
179184
|
+
if (code(error2) !== "EEXIST") throw error2;
|
|
179185
|
+
}
|
|
179186
|
+
}
|
|
179187
|
+
const readySkills = await lstat3(skillsRoot);
|
|
179150
179188
|
if (!readySkills.isDirectory() || readySkills.isSymbolicLink()) return { status: "skipped", reason: "Unsafe skill directory" };
|
|
179151
|
-
|
|
179189
|
+
if (effectiveUid !== void 0 && readySkills.uid !== effectiveUid)
|
|
179190
|
+
return { status: "skipped", reason: "Unsafe skill directory ownership" };
|
|
179191
|
+
const target2 = join16(skillsRoot, "inheriti-cli");
|
|
179152
179192
|
const lock2 = join16(home, ".inheriti-cli-skill.lock");
|
|
179153
179193
|
const recovery = join16(home, ".inheriti-cli-skill-recovery.lock");
|
|
179154
179194
|
const ownerFile = join16(lock2, "owner");
|
|
179155
179195
|
const recoveryOwnerFile = join16(recovery, "owner");
|
|
179156
|
-
const
|
|
179196
|
+
const owner2 = randomUUID9();
|
|
179157
179197
|
const recoveryOwner = randomUUID9();
|
|
179158
179198
|
let lockOwned = false;
|
|
179159
179199
|
let recoveryOwned = false;
|
|
179160
179200
|
const claim = async () => {
|
|
179161
179201
|
await mkdir5(lock2, { mode: 448 });
|
|
179162
|
-
await writeFile13(ownerFile,
|
|
179202
|
+
await writeFile13(ownerFile, owner2, { flag: "wx", mode: 384 });
|
|
179163
179203
|
lockOwned = true;
|
|
179164
179204
|
};
|
|
179165
179205
|
const release2 = async () => {
|
|
179166
179206
|
if (!lockOwned) return;
|
|
179167
179207
|
try {
|
|
179168
|
-
if (await readFile9(ownerFile, "utf8") ===
|
|
179208
|
+
if (await readFile9(ownerFile, "utf8") === owner2) await rm12(lock2, { recursive: true, force: true });
|
|
179169
179209
|
} catch (error2) {
|
|
179170
179210
|
if (code(error2) !== "ENOENT") throw error2;
|
|
179171
179211
|
}
|
|
@@ -179173,7 +179213,7 @@ async function reconcileCliSkill(packageRoot, env5 = process.env, userHome = hom
|
|
|
179173
179213
|
};
|
|
179174
179214
|
const ownsLock = async () => {
|
|
179175
179215
|
try {
|
|
179176
|
-
return lockOwned && await readFile9(ownerFile, "utf8") ===
|
|
179216
|
+
return lockOwned && await readFile9(ownerFile, "utf8") === owner2;
|
|
179177
179217
|
} catch (error2) {
|
|
179178
179218
|
if (code(error2) === "ENOENT") return false;
|
|
179179
179219
|
throw error2;
|
|
@@ -179251,7 +179291,7 @@ async function reconcileCliSkill(packageRoot, env5 = process.env, userHome = hom
|
|
|
179251
179291
|
} catch {
|
|
179252
179292
|
return { status: "skipped", reason: "Unsafe installed skill contents" };
|
|
179253
179293
|
}
|
|
179254
|
-
if (installedHash === manifest.sha256) return { status: "current" };
|
|
179294
|
+
if (installedHash === manifest.sha256) return { status: "current", target: target2 };
|
|
179255
179295
|
}
|
|
179256
179296
|
stage = join16(home, `.inheriti-cli-skill-stage-${randomUUID9()}`);
|
|
179257
179297
|
await cp3(source, stage, { recursive: true, errorOnExist: true, force: false });
|
|
@@ -179280,13 +179320,152 @@ async function reconcileCliSkill(packageRoot, env5 = process.env, userHome = hom
|
|
|
179280
179320
|
}
|
|
179281
179321
|
throw error2;
|
|
179282
179322
|
}
|
|
179283
|
-
return { status: existing ? "updated" : "installed", ...backup ? { backup } : {} };
|
|
179323
|
+
return { status: existing ? "updated" : "installed", target: target2, ...backup ? { backup } : {} };
|
|
179284
179324
|
} finally {
|
|
179285
179325
|
if (stage) await rm12(stage, { recursive: true, force: true });
|
|
179286
179326
|
await release2();
|
|
179287
179327
|
}
|
|
179288
179328
|
}
|
|
179289
179329
|
|
|
179330
|
+
// src/commands/skill.ts
|
|
179331
|
+
var choices = [
|
|
179332
|
+
{ value: "codex", label: "Codex", description: "Install in Codex skills" },
|
|
179333
|
+
{ value: "claude", label: "Claude Code", description: "Install in Claude Code skills" },
|
|
179334
|
+
{ value: "all", label: "Both", description: "Install in Codex and Claude Code" },
|
|
179335
|
+
{ value: "custom", label: "Other skills folder", description: "Choose an absolute directory" },
|
|
179336
|
+
{ value: "skip", label: "Skip", description: "Leave the skill uninstalled" }
|
|
179337
|
+
];
|
|
179338
|
+
var code2 = (error2) => error2?.code;
|
|
179339
|
+
var preferencePath = (env5) => join17(dirname8(defaultConfigurationPath(env5)), "skill-install.json");
|
|
179340
|
+
var owner = (env5) => !(process.getuid?.() === 0 && env5.SUDO_USER);
|
|
179341
|
+
function validChoice(value2) {
|
|
179342
|
+
if (!value2 || typeof value2 !== "object" || Array.isArray(value2)) return false;
|
|
179343
|
+
const entry = value2;
|
|
179344
|
+
const keys2 = Object.keys(entry);
|
|
179345
|
+
if (entry.agent === "custom") return keys2.length === 2 && typeof entry.directory === "string" && isAbsolute5(entry.directory);
|
|
179346
|
+
return keys2.length === 1 && (entry.agent === "codex" || entry.agent === "claude" || entry.agent === "all");
|
|
179347
|
+
}
|
|
179348
|
+
async function safeDirectory(path9, create3) {
|
|
179349
|
+
try {
|
|
179350
|
+
const info = await lstat4(path9);
|
|
179351
|
+
return info.isDirectory() && !info.isSymbolicLink();
|
|
179352
|
+
} catch (error2) {
|
|
179353
|
+
if (code2(error2) !== "ENOENT") throw error2;
|
|
179354
|
+
if (!create3) return false;
|
|
179355
|
+
await mkdir6(path9, { recursive: true, mode: 448 });
|
|
179356
|
+
return await safeDirectory(path9, false);
|
|
179357
|
+
}
|
|
179358
|
+
}
|
|
179359
|
+
async function readSkillChoice(env5) {
|
|
179360
|
+
if (!owner(env5)) return void 0;
|
|
179361
|
+
const path9 = preferencePath(env5);
|
|
179362
|
+
if (!await safeDirectory(dirname8(path9), false)) return void 0;
|
|
179363
|
+
const directoryInfo = await lstat4(dirname8(path9));
|
|
179364
|
+
if (process.getuid?.() !== void 0 && directoryInfo.uid !== process.getuid?.()) return void 0;
|
|
179365
|
+
let info;
|
|
179366
|
+
try {
|
|
179367
|
+
info = await lstat4(path9);
|
|
179368
|
+
} catch (error2) {
|
|
179369
|
+
if (code2(error2) === "ENOENT") return void 0;
|
|
179370
|
+
throw error2;
|
|
179371
|
+
}
|
|
179372
|
+
if (!info.isFile() || info.isSymbolicLink() || process.getuid?.() !== void 0 && info.uid !== process.getuid?.()) throw new Error("Unsafe skill preference file.");
|
|
179373
|
+
const parsed4 = JSON.parse(await readFile10(path9, "utf8"));
|
|
179374
|
+
if (!parsed4 || typeof parsed4 !== "object" || Array.isArray(parsed4) || Object.keys(parsed4).length !== 2 || parsed4.schema !== 1 || !validChoice(parsed4.choice)) throw new Error("Invalid skill preference file.");
|
|
179375
|
+
return parsed4.choice;
|
|
179376
|
+
}
|
|
179377
|
+
async function saveSkillChoice(env5, choice) {
|
|
179378
|
+
if (!owner(env5)) throw new Error("Unsafe sudo user context.");
|
|
179379
|
+
const path9 = preferencePath(env5);
|
|
179380
|
+
if (!await safeDirectory(dirname8(path9), true)) throw new Error("Unsafe skill preference directory.");
|
|
179381
|
+
const directoryInfo = await lstat4(dirname8(path9));
|
|
179382
|
+
if (process.getuid?.() !== void 0 && directoryInfo.uid !== process.getuid?.()) throw new Error("Unsafe skill preference directory ownership.");
|
|
179383
|
+
try {
|
|
179384
|
+
const info = await lstat4(path9);
|
|
179385
|
+
if (!info.isFile() || info.isSymbolicLink() || process.getuid?.() !== void 0 && info.uid !== process.getuid?.()) throw new Error("Unsafe skill preference file.");
|
|
179386
|
+
} catch (error2) {
|
|
179387
|
+
if (code2(error2) !== "ENOENT") throw error2;
|
|
179388
|
+
}
|
|
179389
|
+
const temporary = join17(dirname8(path9), `.skill-install-${randomUUID10()}.tmp`);
|
|
179390
|
+
try {
|
|
179391
|
+
await writeFile14(temporary, JSON.stringify({ schema: 1, choice }) + "\n", { flag: "wx", mode: 384 });
|
|
179392
|
+
await rename5(temporary, path9);
|
|
179393
|
+
} finally {
|
|
179394
|
+
await rm13(temporary, { force: true });
|
|
179395
|
+
}
|
|
179396
|
+
}
|
|
179397
|
+
function parseChoice(args, home) {
|
|
179398
|
+
if (args.length === 2 && args[0] === "--target" && ["codex", "claude", "all"].includes(args[1] ?? "")) return { agent: args[1] };
|
|
179399
|
+
if (args.length === 2 && args[0] === "--directory") {
|
|
179400
|
+
const raw = args[1];
|
|
179401
|
+
const directory = raw === "~" ? home : raw.startsWith("~/") || raw.startsWith("~\\") ? resolve12(home, raw.slice(2)) : raw;
|
|
179402
|
+
if (isAbsolute5(directory)) return { agent: "custom", directory };
|
|
179403
|
+
}
|
|
179404
|
+
return void 0;
|
|
179405
|
+
}
|
|
179406
|
+
async function installSkill(packageRoot, env5, terminal, args, automatic = false) {
|
|
179407
|
+
if (automatic && env5.CI) return 0;
|
|
179408
|
+
if (!owner(env5)) {
|
|
179409
|
+
if (!automatic) terminal.writeError("Unsafe sudo user context.");
|
|
179410
|
+
return automatic ? 0 : 1;
|
|
179411
|
+
}
|
|
179412
|
+
const home = env5.HOME || homedir8();
|
|
179413
|
+
let choice;
|
|
179414
|
+
try {
|
|
179415
|
+
choice = automatic ? await readSkillChoice(env5) : void 0;
|
|
179416
|
+
} catch (error2) {
|
|
179417
|
+
terminal.writeError(`Inheriti CLI skill: ${error2.message}`);
|
|
179418
|
+
return automatic ? 0 : 1;
|
|
179419
|
+
}
|
|
179420
|
+
if (!automatic) {
|
|
179421
|
+
if (!terminal.interactive && !args.length) choice = void 0;
|
|
179422
|
+
if (args.length) choice = parseChoice(args, home);
|
|
179423
|
+
else if (terminal.interactive && !env5.CI && owner(env5)) {
|
|
179424
|
+
const selected = await promptSelect("Install the Inheriti CLI skill for", choices);
|
|
179425
|
+
if (!selected || selected === "skip") return 0;
|
|
179426
|
+
if (selected === "custom") {
|
|
179427
|
+
const entered = await promptText("Absolute skills directory", "Enter an absolute folder path \xB7 Esc cancels");
|
|
179428
|
+
if (entered === void 0) return 0;
|
|
179429
|
+
choice = parseChoice(["--directory", entered], home);
|
|
179430
|
+
} else choice = { agent: selected };
|
|
179431
|
+
}
|
|
179432
|
+
if (!choice || args.length && !parseChoice(args, home)) {
|
|
179433
|
+
terminal.writeError("Usage: inheriti skill install [--target codex|claude|all | --directory ABSOLUTE_PATH]");
|
|
179434
|
+
return 1;
|
|
179435
|
+
}
|
|
179436
|
+
} else if (!choice) {
|
|
179437
|
+
if (terminal.interactive && !env5.CI && owner(env5)) return installSkill(packageRoot, env5, terminal, []);
|
|
179438
|
+
return 0;
|
|
179439
|
+
}
|
|
179440
|
+
if (!choice) return 0;
|
|
179441
|
+
const selectedChoice = choice;
|
|
179442
|
+
const targets = selectedChoice.agent === "all" ? ["codex", "claude"] : [selectedChoice.agent];
|
|
179443
|
+
const customOptions = selectedChoice.agent === "custom" ? { agent: "custom", skillsDirectory: selectedChoice.directory } : void 0;
|
|
179444
|
+
let failed = false;
|
|
179445
|
+
for (const target2 of targets) {
|
|
179446
|
+
try {
|
|
179447
|
+
const result = await reconcileCliSkill(packageRoot, env5, home, process.getuid?.(), target2 === "custom" ? customOptions : { agent: target2, createHome: true });
|
|
179448
|
+
if (result.status === "skipped" || result.status === "busy") {
|
|
179449
|
+
terminal.writeError(`Inheriti CLI skill ${target2}: ${result.reason ?? result.status}.`);
|
|
179450
|
+
failed = true;
|
|
179451
|
+
continue;
|
|
179452
|
+
}
|
|
179453
|
+
if (!automatic || result.status !== "current") terminal.writeError(`Inheriti CLI skill ${result.status} for ${target2}${result.target ? ` at ${result.target}` : ""}.${result.backup ? ` Previous copy saved at ${result.backup}.` : ""} Start a new agent session to load it.`);
|
|
179454
|
+
} catch (error2) {
|
|
179455
|
+
terminal.writeError(`Inheriti CLI skill ${target2}: ${error2.message}`);
|
|
179456
|
+
failed = true;
|
|
179457
|
+
}
|
|
179458
|
+
}
|
|
179459
|
+
if (failed) return 1;
|
|
179460
|
+
try {
|
|
179461
|
+
if (!automatic) await saveSkillChoice(env5, choice);
|
|
179462
|
+
} catch (error2) {
|
|
179463
|
+
terminal.writeError(`Inheriti CLI skill: ${error2.message}`);
|
|
179464
|
+
return 1;
|
|
179465
|
+
}
|
|
179466
|
+
return 0;
|
|
179467
|
+
}
|
|
179468
|
+
|
|
179290
179469
|
// src/main.ts
|
|
179291
179470
|
async function run3(argv, environmentVariables, terminal) {
|
|
179292
179471
|
const [command7, ...rest] = argv;
|
|
@@ -179315,6 +179494,7 @@ async function run3(argv, environmentVariables, terminal) {
|
|
|
179315
179494
|
}
|
|
179316
179495
|
if (command7 === "setup") return await setup(rest, environmentVariables, terminal);
|
|
179317
179496
|
if (command7 === "completion") return printCompletionScript(terminal, rest[0]);
|
|
179497
|
+
if (command7 === "skill") return rest[0] === "install" ? installSkill(fileURLToPath8(new URL("..", import.meta.url)), environmentVariables, terminal, rest.slice(1)) : (terminal.writeError(commandUsage(["skill"], environmentVariables)), 1);
|
|
179318
179498
|
if (command7 === "plans" && rest[0] === "open") {
|
|
179319
179499
|
if (!BUILD_DEPLOYMENT || !PROTECTED_FILE_FLAGS[BUILD_DEPLOYMENT]) {
|
|
179320
179500
|
terminal.writeError("Inheriti Workspace is unavailable.");
|
|
@@ -179577,17 +179757,22 @@ if (isEntrypoint) {
|
|
|
179577
179757
|
const terminal = processTerminal();
|
|
179578
179758
|
const argv = process.argv.slice(2);
|
|
179579
179759
|
const lifecycleInstall = argv[0] === "__skill-install" && process.env.npm_lifecycle_event === "postinstall";
|
|
179580
|
-
if (
|
|
179581
|
-
|
|
179582
|
-
const
|
|
179583
|
-
if (
|
|
179584
|
-
|
|
179585
|
-
|
|
179586
|
-
|
|
179587
|
-
|
|
179760
|
+
if (argv[0] === "__skill-install") {
|
|
179761
|
+
if (!process.env.CI && !(lifecycleInstall && process.getuid?.() === 0)) {
|
|
179762
|
+
const status = await installSkill(fileURLToPath8(new URL("..", import.meta.url)), process.env, terminal, [], true);
|
|
179763
|
+
if (status !== 0) terminal.writeError("Run inheriti skill install to retry.");
|
|
179764
|
+
else if (!process.stdout.isTTY) {
|
|
179765
|
+
try {
|
|
179766
|
+
if (!await readSkillChoice(process.env)) terminal.writeError("Run inheriti skill install to choose an agent for the Inheriti CLI skill.");
|
|
179767
|
+
} catch {
|
|
179768
|
+
terminal.writeError("Run inheriti skill install to choose an agent for the Inheriti CLI skill.");
|
|
179769
|
+
}
|
|
179770
|
+
}
|
|
179588
179771
|
}
|
|
179772
|
+
} else if (argv[0] && argv[0] !== "__skill-install" && argv[0] !== "skill" && !["--help", "help", "--version", "version", "completion", "__complete", "setup"].includes(argv[0])) {
|
|
179773
|
+
await installSkill(fileURLToPath8(new URL("..", import.meta.url)), process.env, terminal, [], true);
|
|
179589
179774
|
}
|
|
179590
|
-
|
|
179775
|
+
if (argv[0] !== "__skill-install") process.exitCode = await run3(argv, process.env, terminal);
|
|
179591
179776
|
}
|
|
179592
179777
|
export {
|
|
179593
179778
|
messageFor,
|