@vibeframe/mcp-server 0.111.3 → 0.112.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.js +644 -501
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -970,7 +970,7 @@ function errorMessage(error) {
|
|
|
970
970
|
return error instanceof Error ? error.message : "Unknown error";
|
|
971
971
|
}
|
|
972
972
|
function sleep(ms) {
|
|
973
|
-
return new Promise((
|
|
973
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
974
974
|
}
|
|
975
975
|
var ProviderHttpError;
|
|
976
976
|
var init_http = __esm({
|
|
@@ -4738,15 +4738,15 @@ async function loadKokoroFactory() {
|
|
|
4738
4738
|
}
|
|
4739
4739
|
async function loadKokoroFromWorkspace(baseDir = process.cwd()) {
|
|
4740
4740
|
try {
|
|
4741
|
-
const { readFile:
|
|
4742
|
-
const { join:
|
|
4741
|
+
const { readFile: readFile46 } = await import("node:fs/promises");
|
|
4742
|
+
const { join: join45, resolve: resolve80 } = await import("node:path");
|
|
4743
4743
|
const { pathToFileURL } = await import("node:url");
|
|
4744
|
-
const pkgDir =
|
|
4745
|
-
const pkg = JSON.parse(await
|
|
4744
|
+
const pkgDir = resolve80(baseDir, "node_modules", "kokoro-js");
|
|
4745
|
+
const pkg = JSON.parse(await readFile46(join45(pkgDir, "package.json"), "utf-8"));
|
|
4746
4746
|
const entry = pkg.exports?.node?.import ?? pkg.exports?.default ?? pkg.module ?? pkg.main;
|
|
4747
4747
|
if (!entry)
|
|
4748
4748
|
return null;
|
|
4749
|
-
const mod = await import(pathToFileURL(
|
|
4749
|
+
const mod = await import(pathToFileURL(join45(pkgDir, entry)).href);
|
|
4750
4750
|
return mod.KokoroTTS ?? null;
|
|
4751
4751
|
} catch {
|
|
4752
4752
|
return null;
|
|
@@ -5404,7 +5404,7 @@ var init_RunwayProvider = __esm({
|
|
|
5404
5404
|
* Sleep helper
|
|
5405
5405
|
*/
|
|
5406
5406
|
sleep(ms) {
|
|
5407
|
-
return new Promise((
|
|
5407
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
5408
5408
|
}
|
|
5409
5409
|
};
|
|
5410
5410
|
RunwayProvider.API_VERSION = "2024-11-06";
|
|
@@ -5845,7 +5845,7 @@ var init_KlingProvider = __esm({
|
|
|
5845
5845
|
* Sleep helper
|
|
5846
5846
|
*/
|
|
5847
5847
|
sleep(ms) {
|
|
5848
|
-
return new Promise((
|
|
5848
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
5849
5849
|
}
|
|
5850
5850
|
};
|
|
5851
5851
|
klingProvider = new KlingProvider();
|
|
@@ -6163,7 +6163,7 @@ var init_GrokProvider = __esm({
|
|
|
6163
6163
|
}
|
|
6164
6164
|
}
|
|
6165
6165
|
sleep(ms) {
|
|
6166
|
-
return new Promise((
|
|
6166
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
6167
6167
|
}
|
|
6168
6168
|
};
|
|
6169
6169
|
grokProvider = new GrokProvider();
|
|
@@ -6198,11 +6198,11 @@ var require_middleware = __commonJS({
|
|
|
6198
6198
|
"use strict";
|
|
6199
6199
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
6200
6200
|
function adopt(value) {
|
|
6201
|
-
return value instanceof P2 ? value : new P2(function(
|
|
6202
|
-
|
|
6201
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
6202
|
+
resolve80(value);
|
|
6203
6203
|
});
|
|
6204
6204
|
}
|
|
6205
|
-
return new (P2 || (P2 = Promise))(function(
|
|
6205
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
6206
6206
|
function fulfilled(value) {
|
|
6207
6207
|
try {
|
|
6208
6208
|
step(generator.next(value));
|
|
@@ -6218,7 +6218,7 @@ var require_middleware = __commonJS({
|
|
|
6218
6218
|
}
|
|
6219
6219
|
}
|
|
6220
6220
|
function step(result) {
|
|
6221
|
-
result.done ?
|
|
6221
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6222
6222
|
}
|
|
6223
6223
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6224
6224
|
});
|
|
@@ -6303,11 +6303,11 @@ var require_response = __commonJS({
|
|
|
6303
6303
|
"use strict";
|
|
6304
6304
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
6305
6305
|
function adopt(value) {
|
|
6306
|
-
return value instanceof P2 ? value : new P2(function(
|
|
6307
|
-
|
|
6306
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
6307
|
+
resolve80(value);
|
|
6308
6308
|
});
|
|
6309
6309
|
}
|
|
6310
|
-
return new (P2 || (P2 = Promise))(function(
|
|
6310
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
6311
6311
|
function fulfilled(value) {
|
|
6312
6312
|
try {
|
|
6313
6313
|
step(generator.next(value));
|
|
@@ -6323,7 +6323,7 @@ var require_response = __commonJS({
|
|
|
6323
6323
|
}
|
|
6324
6324
|
}
|
|
6325
6325
|
function step(result) {
|
|
6326
|
-
result.done ?
|
|
6326
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6327
6327
|
}
|
|
6328
6328
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6329
6329
|
});
|
|
@@ -6430,11 +6430,11 @@ var require_utils = __commonJS({
|
|
|
6430
6430
|
"use strict";
|
|
6431
6431
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
6432
6432
|
function adopt(value) {
|
|
6433
|
-
return value instanceof P2 ? value : new P2(function(
|
|
6434
|
-
|
|
6433
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
6434
|
+
resolve80(value);
|
|
6435
6435
|
});
|
|
6436
6436
|
}
|
|
6437
|
-
return new (P2 || (P2 = Promise))(function(
|
|
6437
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
6438
6438
|
function fulfilled(value) {
|
|
6439
6439
|
try {
|
|
6440
6440
|
step(generator.next(value));
|
|
@@ -6450,7 +6450,7 @@ var require_utils = __commonJS({
|
|
|
6450
6450
|
}
|
|
6451
6451
|
}
|
|
6452
6452
|
function step(result) {
|
|
6453
|
-
result.done ?
|
|
6453
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6454
6454
|
}
|
|
6455
6455
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6456
6456
|
});
|
|
@@ -6543,7 +6543,7 @@ var require_utils = __commonJS({
|
|
|
6543
6543
|
}
|
|
6544
6544
|
function sleep6(ms) {
|
|
6545
6545
|
return __awaiter4(this, void 0, void 0, function* () {
|
|
6546
|
-
return new Promise((
|
|
6546
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
6547
6547
|
});
|
|
6548
6548
|
}
|
|
6549
6549
|
}
|
|
@@ -6555,11 +6555,11 @@ var require_retry = __commonJS({
|
|
|
6555
6555
|
"use strict";
|
|
6556
6556
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
6557
6557
|
function adopt(value) {
|
|
6558
|
-
return value instanceof P2 ? value : new P2(function(
|
|
6559
|
-
|
|
6558
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
6559
|
+
resolve80(value);
|
|
6560
6560
|
});
|
|
6561
6561
|
}
|
|
6562
|
-
return new (P2 || (P2 = Promise))(function(
|
|
6562
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
6563
6563
|
function fulfilled(value) {
|
|
6564
6564
|
try {
|
|
6565
6565
|
step(generator.next(value));
|
|
@@ -6575,7 +6575,7 @@ var require_retry = __commonJS({
|
|
|
6575
6575
|
}
|
|
6576
6576
|
}
|
|
6577
6577
|
function step(result) {
|
|
6578
|
-
result.done ?
|
|
6578
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6579
6579
|
}
|
|
6580
6580
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6581
6581
|
});
|
|
@@ -6782,11 +6782,11 @@ var require_request = __commonJS({
|
|
|
6782
6782
|
"use strict";
|
|
6783
6783
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
6784
6784
|
function adopt(value) {
|
|
6785
|
-
return value instanceof P2 ? value : new P2(function(
|
|
6786
|
-
|
|
6785
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
6786
|
+
resolve80(value);
|
|
6787
6787
|
});
|
|
6788
6788
|
}
|
|
6789
|
-
return new (P2 || (P2 = Promise))(function(
|
|
6789
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
6790
6790
|
function fulfilled(value) {
|
|
6791
6791
|
try {
|
|
6792
6792
|
step(generator.next(value));
|
|
@@ -6802,7 +6802,7 @@ var require_request = __commonJS({
|
|
|
6802
6802
|
}
|
|
6803
6803
|
}
|
|
6804
6804
|
function step(result) {
|
|
6805
|
-
result.done ?
|
|
6805
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6806
6806
|
}
|
|
6807
6807
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6808
6808
|
});
|
|
@@ -6889,11 +6889,11 @@ var require_storage = __commonJS({
|
|
|
6889
6889
|
"use strict";
|
|
6890
6890
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
6891
6891
|
function adopt(value) {
|
|
6892
|
-
return value instanceof P2 ? value : new P2(function(
|
|
6893
|
-
|
|
6892
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
6893
|
+
resolve80(value);
|
|
6894
6894
|
});
|
|
6895
6895
|
}
|
|
6896
|
-
return new (P2 || (P2 = Promise))(function(
|
|
6896
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
6897
6897
|
function fulfilled(value) {
|
|
6898
6898
|
try {
|
|
6899
6899
|
step(generator.next(value));
|
|
@@ -6909,7 +6909,7 @@ var require_storage = __commonJS({
|
|
|
6909
6909
|
}
|
|
6910
6910
|
}
|
|
6911
6911
|
function step(result) {
|
|
6912
|
-
result.done ?
|
|
6912
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
6913
6913
|
}
|
|
6914
6914
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
6915
6915
|
});
|
|
@@ -7237,11 +7237,11 @@ var require_auth = __commonJS({
|
|
|
7237
7237
|
"use strict";
|
|
7238
7238
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
7239
7239
|
function adopt(value) {
|
|
7240
|
-
return value instanceof P2 ? value : new P2(function(
|
|
7241
|
-
|
|
7240
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
7241
|
+
resolve80(value);
|
|
7242
7242
|
});
|
|
7243
7243
|
}
|
|
7244
|
-
return new (P2 || (P2 = Promise))(function(
|
|
7244
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
7245
7245
|
function fulfilled(value) {
|
|
7246
7246
|
try {
|
|
7247
7247
|
step(generator.next(value));
|
|
@@ -7257,7 +7257,7 @@ var require_auth = __commonJS({
|
|
|
7257
7257
|
}
|
|
7258
7258
|
}
|
|
7259
7259
|
function step(result) {
|
|
7260
|
-
result.done ?
|
|
7260
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
7261
7261
|
}
|
|
7262
7262
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7263
7263
|
});
|
|
@@ -7296,11 +7296,11 @@ var require_streaming = __commonJS({
|
|
|
7296
7296
|
"use strict";
|
|
7297
7297
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
7298
7298
|
function adopt(value) {
|
|
7299
|
-
return value instanceof P2 ? value : new P2(function(
|
|
7300
|
-
|
|
7299
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
7300
|
+
resolve80(value);
|
|
7301
7301
|
});
|
|
7302
7302
|
}
|
|
7303
|
-
return new (P2 || (P2 = Promise))(function(
|
|
7303
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
7304
7304
|
function fulfilled(value) {
|
|
7305
7305
|
try {
|
|
7306
7306
|
step(generator.next(value));
|
|
@@ -7316,7 +7316,7 @@ var require_streaming = __commonJS({
|
|
|
7316
7316
|
}
|
|
7317
7317
|
}
|
|
7318
7318
|
function step(result) {
|
|
7319
|
-
result.done ?
|
|
7319
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
7320
7320
|
}
|
|
7321
7321
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7322
7322
|
});
|
|
@@ -7549,7 +7549,7 @@ var require_streaming = __commonJS({
|
|
|
7549
7549
|
query: options.queryParams
|
|
7550
7550
|
});
|
|
7551
7551
|
this.options = options;
|
|
7552
|
-
this.donePromise = new Promise((
|
|
7552
|
+
this.donePromise = new Promise((resolve80, reject) => {
|
|
7553
7553
|
if (this.streamClosed) {
|
|
7554
7554
|
reject(new response_1.ApiError({
|
|
7555
7555
|
message: "Streaming connection is already closed.",
|
|
@@ -7560,11 +7560,11 @@ var require_streaming = __commonJS({
|
|
|
7560
7560
|
}
|
|
7561
7561
|
this.signal.addEventListener("abort", () => {
|
|
7562
7562
|
var _a10;
|
|
7563
|
-
|
|
7563
|
+
resolve80((_a10 = this.currentData) !== null && _a10 !== void 0 ? _a10 : {});
|
|
7564
7564
|
});
|
|
7565
7565
|
this.on("done", (data) => {
|
|
7566
7566
|
this.streamClosed = true;
|
|
7567
|
-
|
|
7567
|
+
resolve80(data);
|
|
7568
7568
|
});
|
|
7569
7569
|
this.on("error", (error) => {
|
|
7570
7570
|
this.streamClosed = true;
|
|
@@ -7589,7 +7589,7 @@ var require_streaming = __commonJS({
|
|
|
7589
7589
|
if (data) {
|
|
7590
7590
|
yield yield __await5(data);
|
|
7591
7591
|
}
|
|
7592
|
-
yield __await5(new Promise((
|
|
7592
|
+
yield __await5(new Promise((resolve80) => setTimeout(resolve80, 16)));
|
|
7593
7593
|
}
|
|
7594
7594
|
});
|
|
7595
7595
|
}
|
|
@@ -7634,11 +7634,11 @@ var require_queue = __commonJS({
|
|
|
7634
7634
|
"use strict";
|
|
7635
7635
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
7636
7636
|
function adopt(value) {
|
|
7637
|
-
return value instanceof P2 ? value : new P2(function(
|
|
7638
|
-
|
|
7637
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
7638
|
+
resolve80(value);
|
|
7639
7639
|
});
|
|
7640
7640
|
}
|
|
7641
|
-
return new (P2 || (P2 = Promise))(function(
|
|
7641
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
7642
7642
|
function fulfilled(value) {
|
|
7643
7643
|
try {
|
|
7644
7644
|
step(generator.next(value));
|
|
@@ -7654,7 +7654,7 @@ var require_queue = __commonJS({
|
|
|
7654
7654
|
}
|
|
7655
7655
|
}
|
|
7656
7656
|
function step(result) {
|
|
7657
|
-
result.done ?
|
|
7657
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
7658
7658
|
}
|
|
7659
7659
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7660
7660
|
});
|
|
@@ -7789,7 +7789,7 @@ var require_queue = __commonJS({
|
|
|
7789
7789
|
}
|
|
7790
7790
|
return doneStatus;
|
|
7791
7791
|
}
|
|
7792
|
-
return new Promise((
|
|
7792
|
+
return new Promise((resolve80, reject) => {
|
|
7793
7793
|
var _a9;
|
|
7794
7794
|
let pollingTimeoutId;
|
|
7795
7795
|
const pollInterval = "pollInterval" in options && typeof options.pollInterval === "number" ? (_a9 = options.pollInterval) !== null && _a9 !== void 0 ? _a9 : DEFAULT_POLL_INTERVAL : DEFAULT_POLL_INTERVAL;
|
|
@@ -7821,7 +7821,7 @@ var require_queue = __commonJS({
|
|
|
7821
7821
|
}
|
|
7822
7822
|
if (requestStatus.status === "COMPLETED") {
|
|
7823
7823
|
clearScheduledTasks();
|
|
7824
|
-
|
|
7824
|
+
resolve80(requestStatus);
|
|
7825
7825
|
return;
|
|
7826
7826
|
}
|
|
7827
7827
|
pollingTimeoutId = setTimeout(poll, pollInterval);
|
|
@@ -9782,11 +9782,11 @@ var require_realtime = __commonJS({
|
|
|
9782
9782
|
"use strict";
|
|
9783
9783
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
9784
9784
|
function adopt(value) {
|
|
9785
|
-
return value instanceof P2 ? value : new P2(function(
|
|
9786
|
-
|
|
9785
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
9786
|
+
resolve80(value);
|
|
9787
9787
|
});
|
|
9788
9788
|
}
|
|
9789
|
-
return new (P2 || (P2 = Promise))(function(
|
|
9789
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
9790
9790
|
function fulfilled(value) {
|
|
9791
9791
|
try {
|
|
9792
9792
|
step(generator.next(value));
|
|
@@ -9802,7 +9802,7 @@ var require_realtime = __commonJS({
|
|
|
9802
9802
|
}
|
|
9803
9803
|
}
|
|
9804
9804
|
function step(result) {
|
|
9805
|
-
result.done ?
|
|
9805
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
9806
9806
|
}
|
|
9807
9807
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9808
9808
|
});
|
|
@@ -10127,11 +10127,11 @@ var require_client = __commonJS({
|
|
|
10127
10127
|
"use strict";
|
|
10128
10128
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
10129
10129
|
function adopt(value) {
|
|
10130
|
-
return value instanceof P2 ? value : new P2(function(
|
|
10131
|
-
|
|
10130
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
10131
|
+
resolve80(value);
|
|
10132
10132
|
});
|
|
10133
10133
|
}
|
|
10134
|
-
return new (P2 || (P2 = Promise))(function(
|
|
10134
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
10135
10135
|
function fulfilled(value) {
|
|
10136
10136
|
try {
|
|
10137
10137
|
step(generator.next(value));
|
|
@@ -10147,7 +10147,7 @@ var require_client = __commonJS({
|
|
|
10147
10147
|
}
|
|
10148
10148
|
}
|
|
10149
10149
|
function step(result) {
|
|
10150
|
-
result.done ?
|
|
10150
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
10151
10151
|
}
|
|
10152
10152
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10153
10153
|
});
|
|
@@ -10832,7 +10832,7 @@ var init_ReplicateProvider = __esm({
|
|
|
10832
10832
|
* Sleep helper
|
|
10833
10833
|
*/
|
|
10834
10834
|
sleep(ms) {
|
|
10835
|
-
return new Promise((
|
|
10835
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
10836
10836
|
}
|
|
10837
10837
|
/**
|
|
10838
10838
|
* Generate music from text prompt using MusicGen
|
|
@@ -19592,7 +19592,7 @@ var init_ai_helpers = __esm({
|
|
|
19592
19592
|
import { writeFile as writeFile2, unlink, rename } from "node:fs/promises";
|
|
19593
19593
|
import { resolve as resolve2, basename } from "node:path";
|
|
19594
19594
|
function sleep2(ms) {
|
|
19595
|
-
return new Promise((
|
|
19595
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
19596
19596
|
}
|
|
19597
19597
|
async function uploadToImgbb(imageBuffer, apiKey) {
|
|
19598
19598
|
try {
|
|
@@ -20337,7 +20337,7 @@ async function prompt(question, hidden = false) {
|
|
|
20337
20337
|
input: process.stdin,
|
|
20338
20338
|
output: process.stdout
|
|
20339
20339
|
});
|
|
20340
|
-
return new Promise((
|
|
20340
|
+
return new Promise((resolve80) => {
|
|
20341
20341
|
if (hidden && process.stdin.isTTY) {
|
|
20342
20342
|
process.stdout.write(question);
|
|
20343
20343
|
let input3 = "";
|
|
@@ -20351,7 +20351,7 @@ async function prompt(question, hidden = false) {
|
|
|
20351
20351
|
process.stdin.removeListener("data", onData);
|
|
20352
20352
|
process.stdout.write("\n");
|
|
20353
20353
|
rl.close();
|
|
20354
|
-
|
|
20354
|
+
resolve80(input3);
|
|
20355
20355
|
} else if (char === "") {
|
|
20356
20356
|
process.exit(1);
|
|
20357
20357
|
} else if (char === "\x7F" || char === "\b") {
|
|
@@ -20366,7 +20366,7 @@ async function prompt(question, hidden = false) {
|
|
|
20366
20366
|
} else {
|
|
20367
20367
|
rl.question(question, (answer) => {
|
|
20368
20368
|
rl.close();
|
|
20369
|
-
|
|
20369
|
+
resolve80(answer);
|
|
20370
20370
|
});
|
|
20371
20371
|
}
|
|
20372
20372
|
});
|
|
@@ -24994,7 +24994,7 @@ function unique(items) {
|
|
|
24994
24994
|
];
|
|
24995
24995
|
}
|
|
24996
24996
|
function sleep3(ms) {
|
|
24997
|
-
return new Promise((
|
|
24997
|
+
return new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
24998
24998
|
}
|
|
24999
24999
|
var LOCAL_JOB_ORPHAN_AFTER_MS;
|
|
25000
25000
|
var init_status_jobs = __esm({
|
|
@@ -29746,7 +29746,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29746
29746
|
let latestResultPromise;
|
|
29747
29747
|
let provideLatestResult;
|
|
29748
29748
|
if (isContext)
|
|
29749
|
-
requestCallbacks["on-end"] = (id, request22) => new Promise((
|
|
29749
|
+
requestCallbacks["on-end"] = (id, request22) => new Promise((resolve80) => {
|
|
29750
29750
|
buildResponseToResult(request22, (err, result, onEndErrors, onEndWarnings) => {
|
|
29751
29751
|
const response = {
|
|
29752
29752
|
errors: onEndErrors,
|
|
@@ -29756,7 +29756,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29756
29756
|
latestResultPromise = void 0;
|
|
29757
29757
|
provideLatestResult = void 0;
|
|
29758
29758
|
sendResponse(id, response);
|
|
29759
|
-
|
|
29759
|
+
resolve80();
|
|
29760
29760
|
});
|
|
29761
29761
|
});
|
|
29762
29762
|
sendRequest(refs3, request5, (error, response) => {
|
|
@@ -29773,10 +29773,10 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29773
29773
|
let didDispose = false;
|
|
29774
29774
|
const result = {
|
|
29775
29775
|
rebuild: () => {
|
|
29776
|
-
if (!latestResultPromise) latestResultPromise = new Promise((
|
|
29776
|
+
if (!latestResultPromise) latestResultPromise = new Promise((resolve80, reject) => {
|
|
29777
29777
|
let settlePromise;
|
|
29778
29778
|
provideLatestResult = (err, result2) => {
|
|
29779
|
-
if (!settlePromise) settlePromise = () => err ? reject(err) :
|
|
29779
|
+
if (!settlePromise) settlePromise = () => err ? reject(err) : resolve80(result2);
|
|
29780
29780
|
};
|
|
29781
29781
|
const triggerAnotherBuild = () => {
|
|
29782
29782
|
const request22 = {
|
|
@@ -29797,7 +29797,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29797
29797
|
});
|
|
29798
29798
|
return latestResultPromise;
|
|
29799
29799
|
},
|
|
29800
|
-
watch: (options2 = {}) => new Promise((
|
|
29800
|
+
watch: (options2 = {}) => new Promise((resolve80, reject) => {
|
|
29801
29801
|
if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
|
|
29802
29802
|
const keys2 = {};
|
|
29803
29803
|
checkForInvalidFlags(options2, keys2, `in watch() call`);
|
|
@@ -29807,10 +29807,10 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29807
29807
|
};
|
|
29808
29808
|
sendRequest(refs3, request22, (error2) => {
|
|
29809
29809
|
if (error2) reject(new Error(error2));
|
|
29810
|
-
else
|
|
29810
|
+
else resolve80(void 0);
|
|
29811
29811
|
});
|
|
29812
29812
|
}),
|
|
29813
|
-
serve: (options2 = {}) => new Promise((
|
|
29813
|
+
serve: (options2 = {}) => new Promise((resolve80, reject) => {
|
|
29814
29814
|
if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
|
|
29815
29815
|
const keys2 = {};
|
|
29816
29816
|
const port = getFlag3(options2, keys2, "port", mustBeInteger);
|
|
@@ -29840,28 +29840,28 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29840
29840
|
sendResponse(id, {});
|
|
29841
29841
|
};
|
|
29842
29842
|
}
|
|
29843
|
-
|
|
29843
|
+
resolve80(response2);
|
|
29844
29844
|
});
|
|
29845
29845
|
}),
|
|
29846
|
-
cancel: () => new Promise((
|
|
29847
|
-
if (didDispose) return
|
|
29846
|
+
cancel: () => new Promise((resolve80) => {
|
|
29847
|
+
if (didDispose) return resolve80();
|
|
29848
29848
|
const request22 = {
|
|
29849
29849
|
command: "cancel",
|
|
29850
29850
|
key: buildKey
|
|
29851
29851
|
};
|
|
29852
29852
|
sendRequest(refs3, request22, () => {
|
|
29853
|
-
|
|
29853
|
+
resolve80();
|
|
29854
29854
|
});
|
|
29855
29855
|
}),
|
|
29856
|
-
dispose: () => new Promise((
|
|
29857
|
-
if (didDispose) return
|
|
29856
|
+
dispose: () => new Promise((resolve80) => {
|
|
29857
|
+
if (didDispose) return resolve80();
|
|
29858
29858
|
didDispose = true;
|
|
29859
29859
|
const request22 = {
|
|
29860
29860
|
command: "dispose",
|
|
29861
29861
|
key: buildKey
|
|
29862
29862
|
};
|
|
29863
29863
|
sendRequest(refs3, request22, () => {
|
|
29864
|
-
|
|
29864
|
+
resolve80();
|
|
29865
29865
|
scheduleOnDisposeCallbacks();
|
|
29866
29866
|
refs3.unref();
|
|
29867
29867
|
});
|
|
@@ -29900,7 +29900,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29900
29900
|
onLoad: []
|
|
29901
29901
|
};
|
|
29902
29902
|
i2++;
|
|
29903
|
-
let
|
|
29903
|
+
let resolve80 = (path33, options = {}) => {
|
|
29904
29904
|
if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed');
|
|
29905
29905
|
if (typeof path33 !== "string") throw new Error(`The path to resolve must be a string`);
|
|
29906
29906
|
let keys22 = /* @__PURE__ */ Object.create(null);
|
|
@@ -29944,7 +29944,7 @@ is not a problem with esbuild. You need to fix your environment instead.
|
|
|
29944
29944
|
};
|
|
29945
29945
|
let promise = setup({
|
|
29946
29946
|
initialOptions,
|
|
29947
|
-
resolve:
|
|
29947
|
+
resolve: resolve80,
|
|
29948
29948
|
onStart(callback) {
|
|
29949
29949
|
let registeredText = `This error came from the "onStart" callback registered here:`;
|
|
29950
29950
|
let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
|
|
@@ -30816,46 +30816,46 @@ More information: The file containing the code for esbuild's JavaScript API (${_
|
|
|
30816
30816
|
}
|
|
30817
30817
|
};
|
|
30818
30818
|
longLivedService = {
|
|
30819
|
-
build: (options) => new Promise((
|
|
30819
|
+
build: (options) => new Promise((resolve80, reject) => {
|
|
30820
30820
|
service.buildOrContext({
|
|
30821
30821
|
callName: "build",
|
|
30822
30822
|
refs: refs3,
|
|
30823
30823
|
options,
|
|
30824
30824
|
isTTY: isTTY(),
|
|
30825
30825
|
defaultWD,
|
|
30826
|
-
callback: (err, res) => err ? reject(err) :
|
|
30826
|
+
callback: (err, res) => err ? reject(err) : resolve80(res)
|
|
30827
30827
|
});
|
|
30828
30828
|
}),
|
|
30829
|
-
context: (options) => new Promise((
|
|
30829
|
+
context: (options) => new Promise((resolve80, reject) => service.buildOrContext({
|
|
30830
30830
|
callName: "context",
|
|
30831
30831
|
refs: refs3,
|
|
30832
30832
|
options,
|
|
30833
30833
|
isTTY: isTTY(),
|
|
30834
30834
|
defaultWD,
|
|
30835
|
-
callback: (err, res) => err ? reject(err) :
|
|
30835
|
+
callback: (err, res) => err ? reject(err) : resolve80(res)
|
|
30836
30836
|
})),
|
|
30837
|
-
transform: (input3, options) => new Promise((
|
|
30837
|
+
transform: (input3, options) => new Promise((resolve80, reject) => service.transform({
|
|
30838
30838
|
callName: "transform",
|
|
30839
30839
|
refs: refs3,
|
|
30840
30840
|
input: input3,
|
|
30841
30841
|
options: options || {},
|
|
30842
30842
|
isTTY: isTTY(),
|
|
30843
30843
|
fs: fsAsync,
|
|
30844
|
-
callback: (err, res) => err ? reject(err) :
|
|
30844
|
+
callback: (err, res) => err ? reject(err) : resolve80(res)
|
|
30845
30845
|
})),
|
|
30846
|
-
formatMessages: (messages, options) => new Promise((
|
|
30846
|
+
formatMessages: (messages, options) => new Promise((resolve80, reject) => service.formatMessages({
|
|
30847
30847
|
callName: "formatMessages",
|
|
30848
30848
|
refs: refs3,
|
|
30849
30849
|
messages,
|
|
30850
30850
|
options,
|
|
30851
|
-
callback: (err, res) => err ? reject(err) :
|
|
30851
|
+
callback: (err, res) => err ? reject(err) : resolve80(res)
|
|
30852
30852
|
})),
|
|
30853
|
-
analyzeMetafile: (metafile, options) => new Promise((
|
|
30853
|
+
analyzeMetafile: (metafile, options) => new Promise((resolve80, reject) => service.analyzeMetafile({
|
|
30854
30854
|
callName: "analyzeMetafile",
|
|
30855
30855
|
refs: refs3,
|
|
30856
30856
|
metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
|
|
30857
30857
|
options,
|
|
30858
|
-
callback: (err, res) => err ? reject(err) :
|
|
30858
|
+
callback: (err, res) => err ? reject(err) : resolve80(res)
|
|
30859
30859
|
}))
|
|
30860
30860
|
};
|
|
30861
30861
|
return longLivedService;
|
|
@@ -30933,13 +30933,13 @@ error: ${text}`);
|
|
|
30933
30933
|
worker.postMessage(msg);
|
|
30934
30934
|
let status = Atomics.wait(sharedBufferView, 0, 0);
|
|
30935
30935
|
if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status);
|
|
30936
|
-
let { message: { id: id2, resolve:
|
|
30936
|
+
let { message: { id: id2, resolve: resolve80, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
|
|
30937
30937
|
if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
|
|
30938
30938
|
if (reject) {
|
|
30939
30939
|
applyProperties(reject, properties);
|
|
30940
30940
|
throw reject;
|
|
30941
30941
|
}
|
|
30942
|
-
return
|
|
30942
|
+
return resolve80;
|
|
30943
30943
|
};
|
|
30944
30944
|
worker.unref();
|
|
30945
30945
|
return {
|
|
@@ -32900,7 +32900,7 @@ var require_util = __commonJS({
|
|
|
32900
32900
|
return path14;
|
|
32901
32901
|
});
|
|
32902
32902
|
exports.normalize = normalize3;
|
|
32903
|
-
function
|
|
32903
|
+
function join45(aRoot, aPath) {
|
|
32904
32904
|
if (aRoot === "") {
|
|
32905
32905
|
aRoot = ".";
|
|
32906
32906
|
}
|
|
@@ -32932,7 +32932,7 @@ var require_util = __commonJS({
|
|
|
32932
32932
|
}
|
|
32933
32933
|
return joined;
|
|
32934
32934
|
}
|
|
32935
|
-
exports.join =
|
|
32935
|
+
exports.join = join45;
|
|
32936
32936
|
exports.isAbsolute = function(aPath) {
|
|
32937
32937
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
32938
32938
|
};
|
|
@@ -33146,7 +33146,7 @@ var require_util = __commonJS({
|
|
|
33146
33146
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
33147
33147
|
}
|
|
33148
33148
|
}
|
|
33149
|
-
sourceURL =
|
|
33149
|
+
sourceURL = join45(urlGenerate(parsed), sourceURL);
|
|
33150
33150
|
}
|
|
33151
33151
|
return normalize3(sourceURL);
|
|
33152
33152
|
}
|
|
@@ -34586,8 +34586,8 @@ var require_source_map = __commonJS({
|
|
|
34586
34586
|
var require_previous_map = __commonJS({
|
|
34587
34587
|
"../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/previous-map.js"(exports, module) {
|
|
34588
34588
|
"use strict";
|
|
34589
|
-
var { existsSync:
|
|
34590
|
-
var { dirname: dirname33, join:
|
|
34589
|
+
var { existsSync: existsSync67, readFileSync: readFileSync12 } = __require("fs");
|
|
34590
|
+
var { dirname: dirname33, join: join45 } = __require("path");
|
|
34591
34591
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
34592
34592
|
function fromBase64(str2) {
|
|
34593
34593
|
if (Buffer) {
|
|
@@ -34649,7 +34649,7 @@ var require_previous_map = __commonJS({
|
|
|
34649
34649
|
}
|
|
34650
34650
|
loadFile(path14) {
|
|
34651
34651
|
this.root = dirname33(path14);
|
|
34652
|
-
if (
|
|
34652
|
+
if (existsSync67(path14)) {
|
|
34653
34653
|
this.mapFile = path14;
|
|
34654
34654
|
return readFileSync12(path14, "utf-8").toString().trim();
|
|
34655
34655
|
}
|
|
@@ -34685,7 +34685,7 @@ var require_previous_map = __commonJS({
|
|
|
34685
34685
|
return this.decodeInline(this.annotation);
|
|
34686
34686
|
} else if (this.annotation) {
|
|
34687
34687
|
let map3 = this.annotation;
|
|
34688
|
-
if (file) map3 =
|
|
34688
|
+
if (file) map3 = join45(dirname33(file), map3);
|
|
34689
34689
|
return this.loadFile(map3);
|
|
34690
34690
|
}
|
|
34691
34691
|
}
|
|
@@ -34707,7 +34707,7 @@ var require_input = __commonJS({
|
|
|
34707
34707
|
"../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/input.js"(exports, module) {
|
|
34708
34708
|
"use strict";
|
|
34709
34709
|
var { nanoid } = require_non_secure();
|
|
34710
|
-
var { isAbsolute: isAbsolute10, resolve:
|
|
34710
|
+
var { isAbsolute: isAbsolute10, resolve: resolve80 } = __require("path");
|
|
34711
34711
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
34712
34712
|
var { fileURLToPath: fileURLToPath5, pathToFileURL } = __require("url");
|
|
34713
34713
|
var CssSyntaxError2 = require_css_syntax_error();
|
|
@@ -34715,7 +34715,7 @@ var require_input = __commonJS({
|
|
|
34715
34715
|
var terminalHighlight = require_terminal_highlight();
|
|
34716
34716
|
var lineToIndexCache = /* @__PURE__ */ Symbol("lineToIndexCache");
|
|
34717
34717
|
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
34718
|
-
var pathAvailable = Boolean(
|
|
34718
|
+
var pathAvailable = Boolean(resolve80 && isAbsolute10);
|
|
34719
34719
|
function getLineToIndex(input3) {
|
|
34720
34720
|
if (input3[lineToIndexCache]) return input3[lineToIndexCache];
|
|
34721
34721
|
let lines = input3.css.split("\n");
|
|
@@ -34749,7 +34749,7 @@ var require_input = __commonJS({
|
|
|
34749
34749
|
if (!pathAvailable || /^\w+:\/\//.test(opts.from) || isAbsolute10(opts.from)) {
|
|
34750
34750
|
this.file = opts.from;
|
|
34751
34751
|
} else {
|
|
34752
|
-
this.file =
|
|
34752
|
+
this.file = resolve80(opts.from);
|
|
34753
34753
|
}
|
|
34754
34754
|
}
|
|
34755
34755
|
if (pathAvailable && sourceMapAvailable) {
|
|
@@ -34862,7 +34862,7 @@ var require_input = __commonJS({
|
|
|
34862
34862
|
if (/^\w+:\/\//.test(file)) {
|
|
34863
34863
|
return file;
|
|
34864
34864
|
}
|
|
34865
|
-
return
|
|
34865
|
+
return resolve80(this.map.consumer().sourceRoot || this.map.root || ".", file);
|
|
34866
34866
|
}
|
|
34867
34867
|
origin(line, column, endLine, endColumn) {
|
|
34868
34868
|
if (!this.map) return false;
|
|
@@ -35121,12 +35121,12 @@ var require_fromJSON = __commonJS({
|
|
|
35121
35121
|
var require_map_generator = __commonJS({
|
|
35122
35122
|
"../../node_modules/.pnpm/postcss@8.5.6/node_modules/postcss/lib/map-generator.js"(exports, module) {
|
|
35123
35123
|
"use strict";
|
|
35124
|
-
var { dirname: dirname33, relative: relative15, resolve:
|
|
35124
|
+
var { dirname: dirname33, relative: relative15, resolve: resolve80, sep: sep2 } = __require("path");
|
|
35125
35125
|
var { SourceMapConsumer, SourceMapGenerator } = require_source_map();
|
|
35126
35126
|
var { pathToFileURL } = __require("url");
|
|
35127
35127
|
var Input2 = require_input();
|
|
35128
35128
|
var sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);
|
|
35129
|
-
var pathAvailable = Boolean(dirname33 &&
|
|
35129
|
+
var pathAvailable = Boolean(dirname33 && resolve80 && relative15 && sep2);
|
|
35130
35130
|
var MapGenerator = class {
|
|
35131
35131
|
constructor(stringify6, root2, opts, cssString) {
|
|
35132
35132
|
this.stringify = stringify6;
|
|
@@ -35347,7 +35347,7 @@ var require_map_generator = __commonJS({
|
|
|
35347
35347
|
if (cached2) return cached2;
|
|
35348
35348
|
let from3 = this.opts.to ? dirname33(this.opts.to) : ".";
|
|
35349
35349
|
if (typeof this.mapOpts.annotation === "string") {
|
|
35350
|
-
from3 = dirname33(
|
|
35350
|
+
from3 = dirname33(resolve80(from3, this.mapOpts.annotation));
|
|
35351
35351
|
}
|
|
35352
35352
|
let path14 = relative15(from3, file);
|
|
35353
35353
|
this.memoizedPaths.set(file, path14);
|
|
@@ -36873,11 +36873,11 @@ function __extends(d2, b2) {
|
|
|
36873
36873
|
}
|
|
36874
36874
|
function __awaiter(thisArg, _arguments, P2, generator) {
|
|
36875
36875
|
function adopt(value) {
|
|
36876
|
-
return value instanceof P2 ? value : new P2(function(
|
|
36877
|
-
|
|
36876
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
36877
|
+
resolve80(value);
|
|
36878
36878
|
});
|
|
36879
36879
|
}
|
|
36880
|
-
return new (P2 || (P2 = Promise))(function(
|
|
36880
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
36881
36881
|
function fulfilled(value) {
|
|
36882
36882
|
try {
|
|
36883
36883
|
step(generator.next(value));
|
|
@@ -36893,7 +36893,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
|
|
|
36893
36893
|
}
|
|
36894
36894
|
}
|
|
36895
36895
|
function step(result) {
|
|
36896
|
-
result.done ?
|
|
36896
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
36897
36897
|
}
|
|
36898
36898
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
36899
36899
|
});
|
|
@@ -37056,14 +37056,14 @@ function __asyncValues(o2) {
|
|
|
37056
37056
|
}, i2);
|
|
37057
37057
|
function verb(n2) {
|
|
37058
37058
|
i2[n2] = o2[n2] && function(v2) {
|
|
37059
|
-
return new Promise(function(
|
|
37060
|
-
v2 = o2[n2](v2), settle(
|
|
37059
|
+
return new Promise(function(resolve80, reject) {
|
|
37060
|
+
v2 = o2[n2](v2), settle(resolve80, reject, v2.done, v2.value);
|
|
37061
37061
|
});
|
|
37062
37062
|
};
|
|
37063
37063
|
}
|
|
37064
|
-
function settle(
|
|
37064
|
+
function settle(resolve80, reject, d2, v2) {
|
|
37065
37065
|
Promise.resolve(v2).then(function(v22) {
|
|
37066
|
-
|
|
37066
|
+
resolve80({ value: v22, done: d2 });
|
|
37067
37067
|
}, reject);
|
|
37068
37068
|
}
|
|
37069
37069
|
}
|
|
@@ -37588,7 +37588,7 @@ function of() {
|
|
|
37588
37588
|
}
|
|
37589
37589
|
function lastValueFrom(source3, config22) {
|
|
37590
37590
|
var hasConfig = typeof config22 === "object";
|
|
37591
|
-
return new Promise(function(
|
|
37591
|
+
return new Promise(function(resolve80, reject) {
|
|
37592
37592
|
var _hasValue = false;
|
|
37593
37593
|
var _value;
|
|
37594
37594
|
source3.subscribe({
|
|
@@ -37599,9 +37599,9 @@ function lastValueFrom(source3, config22) {
|
|
|
37599
37599
|
error: reject,
|
|
37600
37600
|
complete: function() {
|
|
37601
37601
|
if (_hasValue) {
|
|
37602
|
-
|
|
37602
|
+
resolve80(_value);
|
|
37603
37603
|
} else if (hasConfig) {
|
|
37604
|
-
|
|
37604
|
+
resolve80(config22.defaultValue);
|
|
37605
37605
|
} else {
|
|
37606
37606
|
reject(new EmptyError());
|
|
37607
37607
|
}
|
|
@@ -37611,16 +37611,16 @@ function lastValueFrom(source3, config22) {
|
|
|
37611
37611
|
}
|
|
37612
37612
|
function firstValueFrom(source3, config22) {
|
|
37613
37613
|
var hasConfig = typeof config22 === "object";
|
|
37614
|
-
return new Promise(function(
|
|
37614
|
+
return new Promise(function(resolve80, reject) {
|
|
37615
37615
|
var subscriber = new SafeSubscriber({
|
|
37616
37616
|
next: function(value) {
|
|
37617
|
-
|
|
37617
|
+
resolve80(value);
|
|
37618
37618
|
subscriber.unsubscribe();
|
|
37619
37619
|
},
|
|
37620
37620
|
error: reject,
|
|
37621
37621
|
complete: function() {
|
|
37622
37622
|
if (hasConfig) {
|
|
37623
|
-
|
|
37623
|
+
resolve80(config22.defaultValue);
|
|
37624
37624
|
} else {
|
|
37625
37625
|
reject(new EmptyError());
|
|
37626
37626
|
}
|
|
@@ -38659,7 +38659,7 @@ var init_rxjs = __esm({
|
|
|
38659
38659
|
Observable22.prototype.forEach = function(next, promiseCtor) {
|
|
38660
38660
|
var _this = this;
|
|
38661
38661
|
promiseCtor = getPromiseCtor(promiseCtor);
|
|
38662
|
-
return new promiseCtor(function(
|
|
38662
|
+
return new promiseCtor(function(resolve80, reject) {
|
|
38663
38663
|
var subscriber = new SafeSubscriber({
|
|
38664
38664
|
next: function(value) {
|
|
38665
38665
|
try {
|
|
@@ -38670,7 +38670,7 @@ var init_rxjs = __esm({
|
|
|
38670
38670
|
}
|
|
38671
38671
|
},
|
|
38672
38672
|
error: reject,
|
|
38673
|
-
complete:
|
|
38673
|
+
complete: resolve80
|
|
38674
38674
|
});
|
|
38675
38675
|
_this.subscribe(subscriber);
|
|
38676
38676
|
});
|
|
@@ -38692,14 +38692,14 @@ var init_rxjs = __esm({
|
|
|
38692
38692
|
Observable22.prototype.toPromise = function(promiseCtor) {
|
|
38693
38693
|
var _this = this;
|
|
38694
38694
|
promiseCtor = getPromiseCtor(promiseCtor);
|
|
38695
|
-
return new promiseCtor(function(
|
|
38695
|
+
return new promiseCtor(function(resolve80, reject) {
|
|
38696
38696
|
var value;
|
|
38697
38697
|
_this.subscribe(function(x2) {
|
|
38698
38698
|
return value = x2;
|
|
38699
38699
|
}, function(err) {
|
|
38700
38700
|
return reject(err);
|
|
38701
38701
|
}, function() {
|
|
38702
|
-
return
|
|
38702
|
+
return resolve80(value);
|
|
38703
38703
|
});
|
|
38704
38704
|
});
|
|
38705
38705
|
};
|
|
@@ -41117,8 +41117,8 @@ var init_Deferred = __esm({
|
|
|
41117
41117
|
// SAFETY: This is ensured by #taskPromise.
|
|
41118
41118
|
#resolve;
|
|
41119
41119
|
// TODO: Switch to Promise.withResolvers with Node 22
|
|
41120
|
-
#taskPromise = new Promise((
|
|
41121
|
-
this.#resolve =
|
|
41120
|
+
#taskPromise = new Promise((resolve80) => {
|
|
41121
|
+
this.#resolve = resolve80;
|
|
41122
41122
|
});
|
|
41123
41123
|
#timeoutId;
|
|
41124
41124
|
#timeoutError;
|
|
@@ -41208,12 +41208,12 @@ var init_Mutex = __esm({
|
|
|
41208
41208
|
return new _Mutex.Guard(this, onRelease);
|
|
41209
41209
|
}
|
|
41210
41210
|
release() {
|
|
41211
|
-
const
|
|
41212
|
-
if (!
|
|
41211
|
+
const resolve80 = this.#acquirers.shift();
|
|
41212
|
+
if (!resolve80) {
|
|
41213
41213
|
this.#locked = false;
|
|
41214
41214
|
return;
|
|
41215
41215
|
}
|
|
41216
|
-
|
|
41216
|
+
resolve80();
|
|
41217
41217
|
}
|
|
41218
41218
|
};
|
|
41219
41219
|
}
|
|
@@ -43228,12 +43228,12 @@ var init_locators = __esm({
|
|
|
43228
43228
|
}
|
|
43229
43229
|
return defer(() => {
|
|
43230
43230
|
return from(handle.evaluate((element) => {
|
|
43231
|
-
return new Promise((
|
|
43231
|
+
return new Promise((resolve80) => {
|
|
43232
43232
|
window.requestAnimationFrame(() => {
|
|
43233
43233
|
const rect1 = element.getBoundingClientRect();
|
|
43234
43234
|
window.requestAnimationFrame(() => {
|
|
43235
43235
|
const rect2 = element.getBoundingClientRect();
|
|
43236
|
-
|
|
43236
|
+
resolve80([
|
|
43237
43237
|
{
|
|
43238
43238
|
x: rect1.x,
|
|
43239
43239
|
y: rect1.y,
|
|
@@ -44972,9 +44972,9 @@ var init_ElementHandle = __esm({
|
|
|
44972
44972
|
const handle = await this.#asSVGElementHandle();
|
|
44973
44973
|
const target = __addDisposableResource6(env_5, handle && await handle.#getOwnerSVGElement(), false);
|
|
44974
44974
|
return await (target ?? this).evaluate(async (element, threshold) => {
|
|
44975
|
-
const visibleRatio = await new Promise((
|
|
44975
|
+
const visibleRatio = await new Promise((resolve80) => {
|
|
44976
44976
|
const observer = new IntersectionObserver((entries2) => {
|
|
44977
|
-
|
|
44977
|
+
resolve80(entries2[0].intersectionRatio);
|
|
44978
44978
|
observer.disconnect();
|
|
44979
44979
|
});
|
|
44980
44980
|
observer.observe(element);
|
|
@@ -45667,7 +45667,7 @@ var init_Frame = __esm({
|
|
|
45667
45667
|
}
|
|
45668
45668
|
type = type ?? "text/javascript";
|
|
45669
45669
|
return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, id, type: type2, content: content2 }) => {
|
|
45670
|
-
return await new Promise((
|
|
45670
|
+
return await new Promise((resolve80, reject) => {
|
|
45671
45671
|
const script = document.createElement("script");
|
|
45672
45672
|
script.type = type2;
|
|
45673
45673
|
script.text = content2;
|
|
@@ -45680,12 +45680,12 @@ var init_Frame = __esm({
|
|
|
45680
45680
|
if (url) {
|
|
45681
45681
|
script.src = url;
|
|
45682
45682
|
script.addEventListener("load", () => {
|
|
45683
|
-
|
|
45683
|
+
resolve80(script);
|
|
45684
45684
|
}, { once: true });
|
|
45685
45685
|
document.head.appendChild(script);
|
|
45686
45686
|
} else {
|
|
45687
45687
|
document.head.appendChild(script);
|
|
45688
|
-
|
|
45688
|
+
resolve80(script);
|
|
45689
45689
|
}
|
|
45690
45690
|
});
|
|
45691
45691
|
}, { ...options, type, content }));
|
|
@@ -45705,7 +45705,7 @@ var init_Frame = __esm({
|
|
|
45705
45705
|
options.content = content;
|
|
45706
45706
|
}
|
|
45707
45707
|
return await this.mainRealm().transferHandle(await this.isolatedRealm().evaluateHandle(async ({ url, content: content2 }) => {
|
|
45708
|
-
return await new Promise((
|
|
45708
|
+
return await new Promise((resolve80, reject) => {
|
|
45709
45709
|
let element;
|
|
45710
45710
|
if (!url) {
|
|
45711
45711
|
element = document.createElement("style");
|
|
@@ -45717,7 +45717,7 @@ var init_Frame = __esm({
|
|
|
45717
45717
|
element = link;
|
|
45718
45718
|
}
|
|
45719
45719
|
element.addEventListener("load", () => {
|
|
45720
|
-
|
|
45720
|
+
resolve80(element);
|
|
45721
45721
|
}, { once: true });
|
|
45722
45722
|
element.addEventListener("error", (event) => {
|
|
45723
45723
|
reject(new Error(event.message ?? "Could not load style"));
|
|
@@ -47456,9 +47456,9 @@ var init_Page = __esm({
|
|
|
47456
47456
|
++this.#screencastSessionCount;
|
|
47457
47457
|
if (!this.#startScreencastPromise) {
|
|
47458
47458
|
this.#startScreencastPromise = this.mainFrame().client.send("Page.startScreencast", { format: "png" }).then(() => {
|
|
47459
|
-
return new Promise((
|
|
47459
|
+
return new Promise((resolve80) => {
|
|
47460
47460
|
return this.mainFrame().client.once("Page.screencastFrame", () => {
|
|
47461
|
-
return
|
|
47461
|
+
return resolve80();
|
|
47462
47462
|
});
|
|
47463
47463
|
});
|
|
47464
47464
|
});
|
|
@@ -50847,11 +50847,11 @@ function addPageBinding(type, name, prefix) {
|
|
|
50847
50847
|
return value instanceof Node;
|
|
50848
50848
|
})
|
|
50849
50849
|
}));
|
|
50850
|
-
return new Promise((
|
|
50850
|
+
return new Promise((resolve80, reject) => {
|
|
50851
50851
|
callPuppeteer.callbacks.set(seq, {
|
|
50852
50852
|
resolve(value) {
|
|
50853
50853
|
callPuppeteer.args.delete(seq);
|
|
50854
|
-
|
|
50854
|
+
resolve80(value);
|
|
50855
50855
|
},
|
|
50856
50856
|
reject(value) {
|
|
50857
50857
|
callPuppeteer.args.delete(seq);
|
|
@@ -54690,8 +54690,8 @@ var init_Input2 = __esm({
|
|
|
54690
54690
|
if (typeof delay === "number") {
|
|
54691
54691
|
await Promise.all(actions);
|
|
54692
54692
|
actions.length = 0;
|
|
54693
|
-
await new Promise((
|
|
54694
|
-
setTimeout(
|
|
54693
|
+
await new Promise((resolve80) => {
|
|
54694
|
+
setTimeout(resolve80, delay);
|
|
54695
54695
|
});
|
|
54696
54696
|
}
|
|
54697
54697
|
actions.push(this.up({ ...options, clickCount }));
|
|
@@ -54711,9 +54711,9 @@ var init_Input2 = __esm({
|
|
|
54711
54711
|
});
|
|
54712
54712
|
}
|
|
54713
54713
|
async drag(start, target) {
|
|
54714
|
-
const promise = new Promise((
|
|
54714
|
+
const promise = new Promise((resolve80) => {
|
|
54715
54715
|
this.#client.once("Input.dragIntercepted", (event) => {
|
|
54716
|
-
return
|
|
54716
|
+
return resolve80(event.data);
|
|
54717
54717
|
});
|
|
54718
54718
|
});
|
|
54719
54719
|
await this.move(start.x, start.y);
|
|
@@ -54754,8 +54754,8 @@ var init_Input2 = __esm({
|
|
|
54754
54754
|
await this.dragEnter(target, data);
|
|
54755
54755
|
await this.dragOver(target, data);
|
|
54756
54756
|
if (delay) {
|
|
54757
|
-
await new Promise((
|
|
54758
|
-
return setTimeout(
|
|
54757
|
+
await new Promise((resolve80) => {
|
|
54758
|
+
return setTimeout(resolve80, delay);
|
|
54759
54759
|
});
|
|
54760
54760
|
}
|
|
54761
54761
|
await this.drop(target, data);
|
|
@@ -55016,11 +55016,11 @@ var init_WebMCP = __esm({
|
|
|
55016
55016
|
*/
|
|
55017
55017
|
async execute(input3 = {}) {
|
|
55018
55018
|
const { invocationId } = await this.#webmcp.invokeTool(this, input3);
|
|
55019
|
-
return await new Promise((
|
|
55019
|
+
return await new Promise((resolve80) => {
|
|
55020
55020
|
const handler4 = (event) => {
|
|
55021
55021
|
if (event.id === invocationId) {
|
|
55022
55022
|
this.#webmcp.off("toolresponded", handler4);
|
|
55023
|
-
|
|
55023
|
+
resolve80(event);
|
|
55024
55024
|
}
|
|
55025
55025
|
};
|
|
55026
55026
|
this.#webmcp.on("toolresponded", handler4);
|
|
@@ -55828,9 +55828,9 @@ var init_Page2 = __esm({
|
|
|
55828
55828
|
async captureHeapSnapshot(options) {
|
|
55829
55829
|
const { createWriteStream: createWriteStream3 } = environment.value.fs;
|
|
55830
55830
|
const stream = createWriteStream3(options.path);
|
|
55831
|
-
const streamPromise = new Promise((
|
|
55831
|
+
const streamPromise = new Promise((resolve80, reject) => {
|
|
55832
55832
|
stream.on("error", reject);
|
|
55833
|
-
stream.on("finish",
|
|
55833
|
+
stream.on("finish", resolve80);
|
|
55834
55834
|
});
|
|
55835
55835
|
const client = this.#primaryTargetClient;
|
|
55836
55836
|
await client.send("HeapProfiler.enable");
|
|
@@ -57196,12 +57196,12 @@ var init_Browser2 = __esm({
|
|
|
57196
57196
|
for (const [targetId, targetInfo] of this._targetManager().getDiscoveredTargetInfos().entries()) {
|
|
57197
57197
|
if (targetInfo.url.includes(id) && targetInfo.type === "service_worker") {
|
|
57198
57198
|
this._targetManager().addToIgnoreTarget(targetId);
|
|
57199
|
-
targetDestroyedPromises.push(new Promise((
|
|
57199
|
+
targetDestroyedPromises.push(new Promise((resolve80) => {
|
|
57200
57200
|
return setTimeout(() => {
|
|
57201
57201
|
this.#connection.emit("Target.targetDestroyed", {
|
|
57202
57202
|
targetId
|
|
57203
57203
|
});
|
|
57204
|
-
|
|
57204
|
+
resolve80(null);
|
|
57205
57205
|
}, 0);
|
|
57206
57206
|
}));
|
|
57207
57207
|
}
|
|
@@ -57604,10 +57604,10 @@ var init_BrowserWebSocketTransport = __esm({
|
|
|
57604
57604
|
"../../node_modules/.pnpm/puppeteer-core@24.41.0/node_modules/puppeteer-core/lib/esm/puppeteer/common/BrowserWebSocketTransport.js"() {
|
|
57605
57605
|
BrowserWebSocketTransport = class _BrowserWebSocketTransport {
|
|
57606
57606
|
static create(url) {
|
|
57607
|
-
return new Promise((
|
|
57607
|
+
return new Promise((resolve80, reject) => {
|
|
57608
57608
|
const ws = new WebSocket(url);
|
|
57609
57609
|
ws.addEventListener("open", () => {
|
|
57610
|
-
return
|
|
57610
|
+
return resolve80(new _BrowserWebSocketTransport(ws));
|
|
57611
57611
|
});
|
|
57612
57612
|
ws.addEventListener("error", reject);
|
|
57613
57613
|
});
|
|
@@ -60529,11 +60529,11 @@ var require_BrowsingContextProcessor = __commonJS({
|
|
|
60529
60529
|
}
|
|
60530
60530
|
const parentCdpClient = context3.cdpTarget.parentCdpClient;
|
|
60531
60531
|
try {
|
|
60532
|
-
const detachedFromTargetPromise = new Promise((
|
|
60532
|
+
const detachedFromTargetPromise = new Promise((resolve80) => {
|
|
60533
60533
|
const onContextDestroyed = (event) => {
|
|
60534
60534
|
if (event.targetId === params.context) {
|
|
60535
60535
|
parentCdpClient.off("Target.detachedFromTarget", onContextDestroyed);
|
|
60536
|
-
|
|
60536
|
+
resolve80();
|
|
60537
60537
|
}
|
|
60538
60538
|
};
|
|
60539
60539
|
parentCdpClient.on("Target.detachedFromTarget", onContextDestroyed);
|
|
@@ -61896,7 +61896,7 @@ var require_ActionDispatcher = __commonJS({
|
|
|
61896
61896
|
}
|
|
61897
61897
|
}
|
|
61898
61898
|
const promises = [
|
|
61899
|
-
new Promise((
|
|
61899
|
+
new Promise((resolve80) => setTimeout(resolve80, this.#tickDuration))
|
|
61900
61900
|
];
|
|
61901
61901
|
for (const option of options) {
|
|
61902
61902
|
promises.push(this.#dispatchAction(option));
|
|
@@ -62497,8 +62497,8 @@ var require_Mutex = __commonJS({
|
|
|
62497
62497
|
acquire() {
|
|
62498
62498
|
const state = { resolved: false };
|
|
62499
62499
|
if (this.#locked) {
|
|
62500
|
-
return new Promise((
|
|
62501
|
-
this.#acquirers.push(() =>
|
|
62500
|
+
return new Promise((resolve80) => {
|
|
62501
|
+
this.#acquirers.push(() => resolve80(this.#release.bind(this, state)));
|
|
62502
62502
|
});
|
|
62503
62503
|
}
|
|
62504
62504
|
this.#locked = true;
|
|
@@ -62509,12 +62509,12 @@ var require_Mutex = __commonJS({
|
|
|
62509
62509
|
throw new Error("Cannot release more than once.");
|
|
62510
62510
|
}
|
|
62511
62511
|
state.resolved = true;
|
|
62512
|
-
const
|
|
62513
|
-
if (!
|
|
62512
|
+
const resolve80 = this.#acquirers.shift();
|
|
62513
|
+
if (!resolve80) {
|
|
62514
62514
|
this.#locked = false;
|
|
62515
62515
|
return;
|
|
62516
62516
|
}
|
|
62517
|
-
|
|
62517
|
+
resolve80();
|
|
62518
62518
|
}
|
|
62519
62519
|
async run(action) {
|
|
62520
62520
|
const release = await this.acquire();
|
|
@@ -63696,8 +63696,8 @@ var require_ChannelProxy = __commonJS({
|
|
|
63696
63696
|
* in the queue.
|
|
63697
63697
|
*/
|
|
63698
63698
|
async getMessage() {
|
|
63699
|
-
const onMessage = queue.length > 0 ? Promise.resolve() : new Promise((
|
|
63700
|
-
queueNonEmptyResolver =
|
|
63699
|
+
const onMessage = queue.length > 0 ? Promise.resolve() : new Promise((resolve80) => {
|
|
63700
|
+
queueNonEmptyResolver = resolve80;
|
|
63701
63701
|
});
|
|
63702
63702
|
await onMessage;
|
|
63703
63703
|
return queue.shift();
|
|
@@ -63802,7 +63802,7 @@ var require_ChannelProxy = __commonJS({
|
|
|
63802
63802
|
functionDeclaration: String((id) => {
|
|
63803
63803
|
const w2 = window;
|
|
63804
63804
|
if (w2[id] === void 0) {
|
|
63805
|
-
return new Promise((
|
|
63805
|
+
return new Promise((resolve80) => w2[id] = resolve80);
|
|
63806
63806
|
}
|
|
63807
63807
|
const channelProxy = w2[id];
|
|
63808
63808
|
delete w2[id];
|
|
@@ -65303,8 +65303,8 @@ var require_Deferred = __commonJS({
|
|
|
65303
65303
|
return this.#result;
|
|
65304
65304
|
}
|
|
65305
65305
|
constructor() {
|
|
65306
|
-
this.#promise = new Promise((
|
|
65307
|
-
this.#resolve =
|
|
65306
|
+
this.#promise = new Promise((resolve80, reject) => {
|
|
65307
|
+
this.#resolve = resolve80;
|
|
65308
65308
|
this.#reject = reject;
|
|
65309
65309
|
});
|
|
65310
65310
|
this.#promise.catch((_error) => {
|
|
@@ -70148,11 +70148,11 @@ var require_BrowsingContextStorage = __commonJS({
|
|
|
70148
70148
|
if (this.#contexts.has(browsingContextId)) {
|
|
70149
70149
|
return Promise.resolve(this.getContext(browsingContextId));
|
|
70150
70150
|
}
|
|
70151
|
-
return new Promise((
|
|
70151
|
+
return new Promise((resolve80) => {
|
|
70152
70152
|
const listener = (event) => {
|
|
70153
70153
|
if (event.browsingContext.id === browsingContextId) {
|
|
70154
70154
|
this.#eventEmitter.off("added", listener);
|
|
70155
|
-
|
|
70155
|
+
resolve80(event.browsingContext);
|
|
70156
70156
|
}
|
|
70157
70157
|
};
|
|
70158
70158
|
this.#eventEmitter.on("added", listener);
|
|
@@ -73752,8 +73752,8 @@ var init_ExposedFunction = __esm({
|
|
|
73752
73752
|
const functionDeclaration = stringifyFunction(interpolateFunction((callback) => {
|
|
73753
73753
|
Object.assign(globalThis, {
|
|
73754
73754
|
[PLACEHOLDER("name")]: function(...args) {
|
|
73755
|
-
return new Promise((
|
|
73756
|
-
callback([
|
|
73755
|
+
return new Promise((resolve80, reject) => {
|
|
73756
|
+
callback([resolve80, reject, args]);
|
|
73757
73757
|
});
|
|
73758
73758
|
}
|
|
73759
73759
|
});
|
|
@@ -73841,8 +73841,8 @@ var init_ExposedFunction = __esm({
|
|
|
73841
73841
|
return;
|
|
73842
73842
|
}
|
|
73843
73843
|
try {
|
|
73844
|
-
await dataHandle.evaluate(([
|
|
73845
|
-
|
|
73844
|
+
await dataHandle.evaluate(([resolve80], result2) => {
|
|
73845
|
+
resolve80(result2);
|
|
73846
73846
|
}, result);
|
|
73847
73847
|
} catch (error) {
|
|
73848
73848
|
debugError(error);
|
|
@@ -81984,7 +81984,7 @@ var init_NodeWebSocketTransport = __esm({
|
|
|
81984
81984
|
init_version();
|
|
81985
81985
|
NodeWebSocketTransport = class _NodeWebSocketTransport {
|
|
81986
81986
|
static create(url, headers) {
|
|
81987
|
-
return new Promise((
|
|
81987
|
+
return new Promise((resolve80, reject) => {
|
|
81988
81988
|
const ws = new wrapper_default(url, [], {
|
|
81989
81989
|
followRedirects: true,
|
|
81990
81990
|
perMessageDeflate: false,
|
|
@@ -81997,7 +81997,7 @@ var init_NodeWebSocketTransport = __esm({
|
|
|
81997
81997
|
}
|
|
81998
81998
|
});
|
|
81999
81999
|
ws.addEventListener("open", () => {
|
|
82000
|
-
return
|
|
82000
|
+
return resolve80(new _NodeWebSocketTransport(ws));
|
|
82001
82001
|
});
|
|
82002
82002
|
ws.addEventListener("error", reject);
|
|
82003
82003
|
});
|
|
@@ -85058,8 +85058,8 @@ var require_helpers = __commonJS({
|
|
|
85058
85058
|
function req(url, opts = {}) {
|
|
85059
85059
|
const href = typeof url === "string" ? url : url.href;
|
|
85060
85060
|
const req2 = (href.startsWith("https:") ? https3 : http3).request(url, opts);
|
|
85061
|
-
const promise = new Promise((
|
|
85062
|
-
req2.once("response",
|
|
85061
|
+
const promise = new Promise((resolve80, reject) => {
|
|
85062
|
+
req2.once("response", resolve80).once("error", reject).end();
|
|
85063
85063
|
});
|
|
85064
85064
|
req2.then = promise.then.bind(promise);
|
|
85065
85065
|
return req2;
|
|
@@ -85436,7 +85436,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
85436
85436
|
var debug_1 = __importDefault3(require_src2());
|
|
85437
85437
|
var debug9 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
|
|
85438
85438
|
function parseProxyResponse(socket) {
|
|
85439
|
-
return new Promise((
|
|
85439
|
+
return new Promise((resolve80, reject) => {
|
|
85440
85440
|
let buffersLength = 0;
|
|
85441
85441
|
const buffers = [];
|
|
85442
85442
|
function read() {
|
|
@@ -85502,7 +85502,7 @@ var require_parse_proxy_response = __commonJS({
|
|
|
85502
85502
|
}
|
|
85503
85503
|
debug9("got proxy server response: %o %o", firstLine, headers);
|
|
85504
85504
|
cleanup();
|
|
85505
|
-
|
|
85505
|
+
resolve80({
|
|
85506
85506
|
connect: {
|
|
85507
85507
|
statusCode,
|
|
85508
85508
|
statusText,
|
|
@@ -88760,11 +88760,11 @@ var require_socksclient = __commonJS({
|
|
|
88760
88760
|
"use strict";
|
|
88761
88761
|
var __awaiter4 = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
88762
88762
|
function adopt(value) {
|
|
88763
|
-
return value instanceof P2 ? value : new P2(function(
|
|
88764
|
-
|
|
88763
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
88764
|
+
resolve80(value);
|
|
88765
88765
|
});
|
|
88766
88766
|
}
|
|
88767
|
-
return new (P2 || (P2 = Promise))(function(
|
|
88767
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
88768
88768
|
function fulfilled(value) {
|
|
88769
88769
|
try {
|
|
88770
88770
|
step(generator.next(value));
|
|
@@ -88780,7 +88780,7 @@ var require_socksclient = __commonJS({
|
|
|
88780
88780
|
}
|
|
88781
88781
|
}
|
|
88782
88782
|
function step(result) {
|
|
88783
|
-
result.done ?
|
|
88783
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
88784
88784
|
}
|
|
88785
88785
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
88786
88786
|
});
|
|
@@ -88814,13 +88814,13 @@ var require_socksclient = __commonJS({
|
|
|
88814
88814
|
* @returns { Promise }
|
|
88815
88815
|
*/
|
|
88816
88816
|
static createConnection(options, callback) {
|
|
88817
|
-
return new Promise((
|
|
88817
|
+
return new Promise((resolve80, reject) => {
|
|
88818
88818
|
try {
|
|
88819
88819
|
(0, helpers_1.validateSocksClientOptions)(options, ["connect"]);
|
|
88820
88820
|
} catch (err) {
|
|
88821
88821
|
if (typeof callback === "function") {
|
|
88822
88822
|
callback(err);
|
|
88823
|
-
return
|
|
88823
|
+
return resolve80(err);
|
|
88824
88824
|
} else {
|
|
88825
88825
|
return reject(err);
|
|
88826
88826
|
}
|
|
@@ -88831,16 +88831,16 @@ var require_socksclient = __commonJS({
|
|
|
88831
88831
|
client.removeAllListeners();
|
|
88832
88832
|
if (typeof callback === "function") {
|
|
88833
88833
|
callback(null, info);
|
|
88834
|
-
|
|
88834
|
+
resolve80(info);
|
|
88835
88835
|
} else {
|
|
88836
|
-
|
|
88836
|
+
resolve80(info);
|
|
88837
88837
|
}
|
|
88838
88838
|
});
|
|
88839
88839
|
client.once("error", (err) => {
|
|
88840
88840
|
client.removeAllListeners();
|
|
88841
88841
|
if (typeof callback === "function") {
|
|
88842
88842
|
callback(err);
|
|
88843
|
-
|
|
88843
|
+
resolve80(err);
|
|
88844
88844
|
} else {
|
|
88845
88845
|
reject(err);
|
|
88846
88846
|
}
|
|
@@ -88857,13 +88857,13 @@ var require_socksclient = __commonJS({
|
|
|
88857
88857
|
* @returns { Promise }
|
|
88858
88858
|
*/
|
|
88859
88859
|
static createConnectionChain(options, callback) {
|
|
88860
|
-
return new Promise((
|
|
88860
|
+
return new Promise((resolve80, reject) => __awaiter4(this, void 0, void 0, function* () {
|
|
88861
88861
|
try {
|
|
88862
88862
|
(0, helpers_1.validateSocksClientChainOptions)(options);
|
|
88863
88863
|
} catch (err) {
|
|
88864
88864
|
if (typeof callback === "function") {
|
|
88865
88865
|
callback(err);
|
|
88866
|
-
return
|
|
88866
|
+
return resolve80(err);
|
|
88867
88867
|
} else {
|
|
88868
88868
|
return reject(err);
|
|
88869
88869
|
}
|
|
@@ -88889,14 +88889,14 @@ var require_socksclient = __commonJS({
|
|
|
88889
88889
|
}
|
|
88890
88890
|
if (typeof callback === "function") {
|
|
88891
88891
|
callback(null, { socket: sock });
|
|
88892
|
-
|
|
88892
|
+
resolve80({ socket: sock });
|
|
88893
88893
|
} else {
|
|
88894
|
-
|
|
88894
|
+
resolve80({ socket: sock });
|
|
88895
88895
|
}
|
|
88896
88896
|
} catch (err) {
|
|
88897
88897
|
if (typeof callback === "function") {
|
|
88898
88898
|
callback(err);
|
|
88899
|
-
|
|
88899
|
+
resolve80(err);
|
|
88900
88900
|
} else {
|
|
88901
88901
|
reject(err);
|
|
88902
88902
|
}
|
|
@@ -89580,12 +89580,12 @@ var require_dist7 = __commonJS({
|
|
|
89580
89580
|
let { host } = opts;
|
|
89581
89581
|
const { port, lookup: lookupFn = dns.lookup } = opts;
|
|
89582
89582
|
if (shouldLookup) {
|
|
89583
|
-
host = await new Promise((
|
|
89583
|
+
host = await new Promise((resolve80, reject) => {
|
|
89584
89584
|
lookupFn(host, {}, (err, res) => {
|
|
89585
89585
|
if (err) {
|
|
89586
89586
|
reject(err);
|
|
89587
89587
|
} else {
|
|
89588
|
-
|
|
89588
|
+
resolve80(res);
|
|
89589
89589
|
}
|
|
89590
89590
|
});
|
|
89591
89591
|
});
|
|
@@ -89823,8 +89823,8 @@ var require_file = __commonJS({
|
|
|
89823
89823
|
debug9("Normalized pathname: %o", filepath);
|
|
89824
89824
|
const fdHandle = await fs_1.promises.open(filepath, flags, mode);
|
|
89825
89825
|
const fd = fdHandle.fd;
|
|
89826
|
-
const
|
|
89827
|
-
if (cache && cache.stat &&
|
|
89826
|
+
const stat9 = await fdHandle.stat();
|
|
89827
|
+
if (cache && cache.stat && stat9 && isNotModified(cache.stat, stat9)) {
|
|
89828
89828
|
await fdHandle.close();
|
|
89829
89829
|
throw new notmodified_1.default();
|
|
89830
89830
|
}
|
|
@@ -89833,7 +89833,7 @@ var require_file = __commonJS({
|
|
|
89833
89833
|
...opts,
|
|
89834
89834
|
fd
|
|
89835
89835
|
});
|
|
89836
|
-
rs.stat =
|
|
89836
|
+
rs.stat = stat9;
|
|
89837
89837
|
return rs;
|
|
89838
89838
|
} catch (err) {
|
|
89839
89839
|
if (err.code === "ENOENT") {
|
|
@@ -90245,7 +90245,7 @@ var require_netUtils = __commonJS({
|
|
|
90245
90245
|
return `${socket.remoteAddress}:${socket.remotePort}`;
|
|
90246
90246
|
}
|
|
90247
90247
|
function upgradeSocket(socket, options) {
|
|
90248
|
-
return new Promise((
|
|
90248
|
+
return new Promise((resolve80, reject) => {
|
|
90249
90249
|
const tlsOptions = Object.assign({}, options, {
|
|
90250
90250
|
socket
|
|
90251
90251
|
});
|
|
@@ -90255,7 +90255,7 @@ var require_netUtils = __commonJS({
|
|
|
90255
90255
|
reject(tlsSocket.authorizationError);
|
|
90256
90256
|
} else {
|
|
90257
90257
|
tlsSocket.removeAllListeners("error");
|
|
90258
|
-
|
|
90258
|
+
resolve80(tlsSocket);
|
|
90259
90259
|
}
|
|
90260
90260
|
}).once("error", (error) => {
|
|
90261
90261
|
reject(error);
|
|
@@ -90885,7 +90885,7 @@ var require_transfer = __commonJS({
|
|
|
90885
90885
|
};
|
|
90886
90886
|
}
|
|
90887
90887
|
function connectForPassiveTransfer(host, port, ftp) {
|
|
90888
|
-
return new Promise((
|
|
90888
|
+
return new Promise((resolve80, reject) => {
|
|
90889
90889
|
let socket = ftp._newSocket();
|
|
90890
90890
|
const handleConnErr = function(err) {
|
|
90891
90891
|
err.message = "Can't open data connection in passive mode: " + err.message;
|
|
@@ -90913,7 +90913,7 @@ var require_transfer = __commonJS({
|
|
|
90913
90913
|
socket.removeListener("error", handleConnErr);
|
|
90914
90914
|
socket.removeListener("timeout", handleTimeout);
|
|
90915
90915
|
ftp.dataSocket = socket;
|
|
90916
|
-
|
|
90916
|
+
resolve80();
|
|
90917
90917
|
});
|
|
90918
90918
|
});
|
|
90919
90919
|
}
|
|
@@ -93314,7 +93314,7 @@ var require_util3 = __commonJS({
|
|
|
93314
93314
|
return path14;
|
|
93315
93315
|
}
|
|
93316
93316
|
exports.normalize = normalize3;
|
|
93317
|
-
function
|
|
93317
|
+
function join45(aRoot, aPath) {
|
|
93318
93318
|
if (aRoot === "") {
|
|
93319
93319
|
aRoot = ".";
|
|
93320
93320
|
}
|
|
@@ -93346,7 +93346,7 @@ var require_util3 = __commonJS({
|
|
|
93346
93346
|
}
|
|
93347
93347
|
return joined;
|
|
93348
93348
|
}
|
|
93349
|
-
exports.join =
|
|
93349
|
+
exports.join = join45;
|
|
93350
93350
|
exports.isAbsolute = function(aPath) {
|
|
93351
93351
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
93352
93352
|
};
|
|
@@ -93519,7 +93519,7 @@ var require_util3 = __commonJS({
|
|
|
93519
93519
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
93520
93520
|
}
|
|
93521
93521
|
}
|
|
93522
|
-
sourceURL =
|
|
93522
|
+
sourceURL = join45(urlGenerate(parsed), sourceURL);
|
|
93523
93523
|
}
|
|
93524
93524
|
return normalize3(sourceURL);
|
|
93525
93525
|
}
|
|
@@ -95321,7 +95321,7 @@ var require_escodegen = __commonJS({
|
|
|
95321
95321
|
function noEmptySpace() {
|
|
95322
95322
|
return space ? space : " ";
|
|
95323
95323
|
}
|
|
95324
|
-
function
|
|
95324
|
+
function join45(left3, right3) {
|
|
95325
95325
|
var leftSource, rightSource, leftCharCode, rightCharCode;
|
|
95326
95326
|
leftSource = toSourceNodeWhenNeeded(left3).toString();
|
|
95327
95327
|
if (leftSource.length === 0) {
|
|
@@ -95652,8 +95652,8 @@ var require_escodegen = __commonJS({
|
|
|
95652
95652
|
} else {
|
|
95653
95653
|
result.push(that.generateExpression(stmt.left, Precedence.Call, E_TTT));
|
|
95654
95654
|
}
|
|
95655
|
-
result =
|
|
95656
|
-
result = [
|
|
95655
|
+
result = join45(result, operator);
|
|
95656
|
+
result = [join45(
|
|
95657
95657
|
result,
|
|
95658
95658
|
that.generateExpression(stmt.right, Precedence.Assignment, E_TTT)
|
|
95659
95659
|
), ")"];
|
|
@@ -95796,11 +95796,11 @@ var require_escodegen = __commonJS({
|
|
|
95796
95796
|
var result, fragment;
|
|
95797
95797
|
result = ["class"];
|
|
95798
95798
|
if (stmt.id) {
|
|
95799
|
-
result =
|
|
95799
|
+
result = join45(result, this.generateExpression(stmt.id, Precedence.Sequence, E_TTT));
|
|
95800
95800
|
}
|
|
95801
95801
|
if (stmt.superClass) {
|
|
95802
|
-
fragment =
|
|
95803
|
-
result =
|
|
95802
|
+
fragment = join45("extends", this.generateExpression(stmt.superClass, Precedence.Unary, E_TTT));
|
|
95803
|
+
result = join45(result, fragment);
|
|
95804
95804
|
}
|
|
95805
95805
|
result.push(space);
|
|
95806
95806
|
result.push(this.generateStatement(stmt.body, S_TFFT));
|
|
@@ -95813,9 +95813,9 @@ var require_escodegen = __commonJS({
|
|
|
95813
95813
|
return escapeDirective(stmt.directive) + this.semicolon(flags);
|
|
95814
95814
|
},
|
|
95815
95815
|
DoWhileStatement: function(stmt, flags) {
|
|
95816
|
-
var result =
|
|
95816
|
+
var result = join45("do", this.maybeBlock(stmt.body, S_TFFF));
|
|
95817
95817
|
result = this.maybeBlockSuffix(stmt.body, result);
|
|
95818
|
-
return
|
|
95818
|
+
return join45(result, [
|
|
95819
95819
|
"while" + space + "(",
|
|
95820
95820
|
this.generateExpression(stmt.test, Precedence.Sequence, E_TTT),
|
|
95821
95821
|
")" + this.semicolon(flags)
|
|
@@ -95851,11 +95851,11 @@ var require_escodegen = __commonJS({
|
|
|
95851
95851
|
ExportDefaultDeclaration: function(stmt, flags) {
|
|
95852
95852
|
var result = ["export"], bodyFlags;
|
|
95853
95853
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
95854
|
-
result =
|
|
95854
|
+
result = join45(result, "default");
|
|
95855
95855
|
if (isStatement(stmt.declaration)) {
|
|
95856
|
-
result =
|
|
95856
|
+
result = join45(result, this.generateStatement(stmt.declaration, bodyFlags));
|
|
95857
95857
|
} else {
|
|
95858
|
-
result =
|
|
95858
|
+
result = join45(result, this.generateExpression(stmt.declaration, Precedence.Assignment, E_TTT) + this.semicolon(flags));
|
|
95859
95859
|
}
|
|
95860
95860
|
return result;
|
|
95861
95861
|
},
|
|
@@ -95863,15 +95863,15 @@ var require_escodegen = __commonJS({
|
|
|
95863
95863
|
var result = ["export"], bodyFlags, that = this;
|
|
95864
95864
|
bodyFlags = flags & F_SEMICOLON_OPT ? S_TFFT : S_TFFF;
|
|
95865
95865
|
if (stmt.declaration) {
|
|
95866
|
-
return
|
|
95866
|
+
return join45(result, this.generateStatement(stmt.declaration, bodyFlags));
|
|
95867
95867
|
}
|
|
95868
95868
|
if (stmt.specifiers) {
|
|
95869
95869
|
if (stmt.specifiers.length === 0) {
|
|
95870
|
-
result =
|
|
95870
|
+
result = join45(result, "{" + space + "}");
|
|
95871
95871
|
} else if (stmt.specifiers[0].type === Syntax.ExportBatchSpecifier) {
|
|
95872
|
-
result =
|
|
95872
|
+
result = join45(result, this.generateExpression(stmt.specifiers[0], Precedence.Sequence, E_TTT));
|
|
95873
95873
|
} else {
|
|
95874
|
-
result =
|
|
95874
|
+
result = join45(result, "{");
|
|
95875
95875
|
withIndent(function(indent2) {
|
|
95876
95876
|
var i2, iz;
|
|
95877
95877
|
result.push(newline);
|
|
@@ -95889,7 +95889,7 @@ var require_escodegen = __commonJS({
|
|
|
95889
95889
|
result.push(base + "}");
|
|
95890
95890
|
}
|
|
95891
95891
|
if (stmt.source) {
|
|
95892
|
-
result =
|
|
95892
|
+
result = join45(result, [
|
|
95893
95893
|
"from" + space,
|
|
95894
95894
|
// ModuleSpecifier
|
|
95895
95895
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -95977,7 +95977,7 @@ var require_escodegen = __commonJS({
|
|
|
95977
95977
|
];
|
|
95978
95978
|
cursor = 0;
|
|
95979
95979
|
if (stmt.specifiers[cursor].type === Syntax.ImportDefaultSpecifier) {
|
|
95980
|
-
result =
|
|
95980
|
+
result = join45(result, [
|
|
95981
95981
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
95982
95982
|
]);
|
|
95983
95983
|
++cursor;
|
|
@@ -95987,7 +95987,7 @@ var require_escodegen = __commonJS({
|
|
|
95987
95987
|
result.push(",");
|
|
95988
95988
|
}
|
|
95989
95989
|
if (stmt.specifiers[cursor].type === Syntax.ImportNamespaceSpecifier) {
|
|
95990
|
-
result =
|
|
95990
|
+
result = join45(result, [
|
|
95991
95991
|
space,
|
|
95992
95992
|
this.generateExpression(stmt.specifiers[cursor], Precedence.Sequence, E_TTT)
|
|
95993
95993
|
]);
|
|
@@ -96016,7 +96016,7 @@ var require_escodegen = __commonJS({
|
|
|
96016
96016
|
}
|
|
96017
96017
|
}
|
|
96018
96018
|
}
|
|
96019
|
-
result =
|
|
96019
|
+
result = join45(result, [
|
|
96020
96020
|
"from" + space,
|
|
96021
96021
|
// ModuleSpecifier
|
|
96022
96022
|
this.generateExpression(stmt.source, Precedence.Sequence, E_TTT),
|
|
@@ -96070,7 +96070,7 @@ var require_escodegen = __commonJS({
|
|
|
96070
96070
|
return result;
|
|
96071
96071
|
},
|
|
96072
96072
|
ThrowStatement: function(stmt, flags) {
|
|
96073
|
-
return [
|
|
96073
|
+
return [join45(
|
|
96074
96074
|
"throw",
|
|
96075
96075
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
96076
96076
|
), this.semicolon(flags)];
|
|
@@ -96081,7 +96081,7 @@ var require_escodegen = __commonJS({
|
|
|
96081
96081
|
result = this.maybeBlockSuffix(stmt.block, result);
|
|
96082
96082
|
if (stmt.handlers) {
|
|
96083
96083
|
for (i2 = 0, iz = stmt.handlers.length; i2 < iz; ++i2) {
|
|
96084
|
-
result =
|
|
96084
|
+
result = join45(result, this.generateStatement(stmt.handlers[i2], S_TFFF));
|
|
96085
96085
|
if (stmt.finalizer || i2 + 1 !== iz) {
|
|
96086
96086
|
result = this.maybeBlockSuffix(stmt.handlers[i2].body, result);
|
|
96087
96087
|
}
|
|
@@ -96089,7 +96089,7 @@ var require_escodegen = __commonJS({
|
|
|
96089
96089
|
} else {
|
|
96090
96090
|
guardedHandlers = stmt.guardedHandlers || [];
|
|
96091
96091
|
for (i2 = 0, iz = guardedHandlers.length; i2 < iz; ++i2) {
|
|
96092
|
-
result =
|
|
96092
|
+
result = join45(result, this.generateStatement(guardedHandlers[i2], S_TFFF));
|
|
96093
96093
|
if (stmt.finalizer || i2 + 1 !== iz) {
|
|
96094
96094
|
result = this.maybeBlockSuffix(guardedHandlers[i2].body, result);
|
|
96095
96095
|
}
|
|
@@ -96097,13 +96097,13 @@ var require_escodegen = __commonJS({
|
|
|
96097
96097
|
if (stmt.handler) {
|
|
96098
96098
|
if (Array.isArray(stmt.handler)) {
|
|
96099
96099
|
for (i2 = 0, iz = stmt.handler.length; i2 < iz; ++i2) {
|
|
96100
|
-
result =
|
|
96100
|
+
result = join45(result, this.generateStatement(stmt.handler[i2], S_TFFF));
|
|
96101
96101
|
if (stmt.finalizer || i2 + 1 !== iz) {
|
|
96102
96102
|
result = this.maybeBlockSuffix(stmt.handler[i2].body, result);
|
|
96103
96103
|
}
|
|
96104
96104
|
}
|
|
96105
96105
|
} else {
|
|
96106
|
-
result =
|
|
96106
|
+
result = join45(result, this.generateStatement(stmt.handler, S_TFFF));
|
|
96107
96107
|
if (stmt.finalizer) {
|
|
96108
96108
|
result = this.maybeBlockSuffix(stmt.handler.body, result);
|
|
96109
96109
|
}
|
|
@@ -96111,7 +96111,7 @@ var require_escodegen = __commonJS({
|
|
|
96111
96111
|
}
|
|
96112
96112
|
}
|
|
96113
96113
|
if (stmt.finalizer) {
|
|
96114
|
-
result =
|
|
96114
|
+
result = join45(result, ["finally", this.maybeBlock(stmt.finalizer, S_TFFF)]);
|
|
96115
96115
|
}
|
|
96116
96116
|
return result;
|
|
96117
96117
|
},
|
|
@@ -96145,7 +96145,7 @@ var require_escodegen = __commonJS({
|
|
|
96145
96145
|
withIndent(function() {
|
|
96146
96146
|
if (stmt.test) {
|
|
96147
96147
|
result = [
|
|
96148
|
-
|
|
96148
|
+
join45("case", that.generateExpression(stmt.test, Precedence.Sequence, E_TTT)),
|
|
96149
96149
|
":"
|
|
96150
96150
|
];
|
|
96151
96151
|
} else {
|
|
@@ -96193,9 +96193,9 @@ var require_escodegen = __commonJS({
|
|
|
96193
96193
|
result.push(this.maybeBlock(stmt.consequent, S_TFFF));
|
|
96194
96194
|
result = this.maybeBlockSuffix(stmt.consequent, result);
|
|
96195
96195
|
if (stmt.alternate.type === Syntax.IfStatement) {
|
|
96196
|
-
result =
|
|
96196
|
+
result = join45(result, ["else ", this.generateStatement(stmt.alternate, bodyFlags)]);
|
|
96197
96197
|
} else {
|
|
96198
|
-
result =
|
|
96198
|
+
result = join45(result, join45("else", this.maybeBlock(stmt.alternate, bodyFlags)));
|
|
96199
96199
|
}
|
|
96200
96200
|
} else {
|
|
96201
96201
|
result.push(this.maybeBlock(stmt.consequent, bodyFlags));
|
|
@@ -96296,7 +96296,7 @@ var require_escodegen = __commonJS({
|
|
|
96296
96296
|
},
|
|
96297
96297
|
ReturnStatement: function(stmt, flags) {
|
|
96298
96298
|
if (stmt.argument) {
|
|
96299
|
-
return [
|
|
96299
|
+
return [join45(
|
|
96300
96300
|
"return",
|
|
96301
96301
|
this.generateExpression(stmt.argument, Precedence.Sequence, E_TTT)
|
|
96302
96302
|
), this.semicolon(flags)];
|
|
@@ -96385,14 +96385,14 @@ var require_escodegen = __commonJS({
|
|
|
96385
96385
|
if (leftSource.charCodeAt(leftSource.length - 1) === 47 && esutils.code.isIdentifierPartES5(expr.operator.charCodeAt(0))) {
|
|
96386
96386
|
result = [fragment, noEmptySpace(), expr.operator];
|
|
96387
96387
|
} else {
|
|
96388
|
-
result =
|
|
96388
|
+
result = join45(fragment, expr.operator);
|
|
96389
96389
|
}
|
|
96390
96390
|
fragment = this.generateExpression(expr.right, rightPrecedence, flags);
|
|
96391
96391
|
if (expr.operator === "/" && fragment.toString().charAt(0) === "/" || expr.operator.slice(-1) === "<" && fragment.toString().slice(0, 3) === "!--") {
|
|
96392
96392
|
result.push(noEmptySpace());
|
|
96393
96393
|
result.push(fragment);
|
|
96394
96394
|
} else {
|
|
96395
|
-
result =
|
|
96395
|
+
result = join45(result, fragment);
|
|
96396
96396
|
}
|
|
96397
96397
|
if (expr.operator === "in" && !(flags & F_ALLOW_IN)) {
|
|
96398
96398
|
return ["(", result, ")"];
|
|
@@ -96432,7 +96432,7 @@ var require_escodegen = __commonJS({
|
|
|
96432
96432
|
var result, length, i2, iz, itemFlags;
|
|
96433
96433
|
length = expr["arguments"].length;
|
|
96434
96434
|
itemFlags = flags & F_ALLOW_UNPARATH_NEW && !parentheses && length === 0 ? E_TFT : E_TFF;
|
|
96435
|
-
result =
|
|
96435
|
+
result = join45(
|
|
96436
96436
|
"new",
|
|
96437
96437
|
this.generateExpression(expr.callee, Precedence.New, itemFlags)
|
|
96438
96438
|
);
|
|
@@ -96482,11 +96482,11 @@ var require_escodegen = __commonJS({
|
|
|
96482
96482
|
var result, fragment, rightCharCode, leftSource, leftCharCode;
|
|
96483
96483
|
fragment = this.generateExpression(expr.argument, Precedence.Unary, E_TTT);
|
|
96484
96484
|
if (space === "") {
|
|
96485
|
-
result =
|
|
96485
|
+
result = join45(expr.operator, fragment);
|
|
96486
96486
|
} else {
|
|
96487
96487
|
result = [expr.operator];
|
|
96488
96488
|
if (expr.operator.length > 2) {
|
|
96489
|
-
result =
|
|
96489
|
+
result = join45(result, fragment);
|
|
96490
96490
|
} else {
|
|
96491
96491
|
leftSource = toSourceNodeWhenNeeded(result).toString();
|
|
96492
96492
|
leftCharCode = leftSource.charCodeAt(leftSource.length - 1);
|
|
@@ -96509,7 +96509,7 @@ var require_escodegen = __commonJS({
|
|
|
96509
96509
|
result = "yield";
|
|
96510
96510
|
}
|
|
96511
96511
|
if (expr.argument) {
|
|
96512
|
-
result =
|
|
96512
|
+
result = join45(
|
|
96513
96513
|
result,
|
|
96514
96514
|
this.generateExpression(expr.argument, Precedence.Yield, E_TTT)
|
|
96515
96515
|
);
|
|
@@ -96517,7 +96517,7 @@ var require_escodegen = __commonJS({
|
|
|
96517
96517
|
return parenthesize(result, Precedence.Yield, precedence);
|
|
96518
96518
|
},
|
|
96519
96519
|
AwaitExpression: function(expr, precedence, flags) {
|
|
96520
|
-
var result =
|
|
96520
|
+
var result = join45(
|
|
96521
96521
|
expr.all ? "await*" : "await",
|
|
96522
96522
|
this.generateExpression(expr.argument, Precedence.Await, E_TTT)
|
|
96523
96523
|
);
|
|
@@ -96600,11 +96600,11 @@ var require_escodegen = __commonJS({
|
|
|
96600
96600
|
var result, fragment;
|
|
96601
96601
|
result = ["class"];
|
|
96602
96602
|
if (expr.id) {
|
|
96603
|
-
result =
|
|
96603
|
+
result = join45(result, this.generateExpression(expr.id, Precedence.Sequence, E_TTT));
|
|
96604
96604
|
}
|
|
96605
96605
|
if (expr.superClass) {
|
|
96606
|
-
fragment =
|
|
96607
|
-
result =
|
|
96606
|
+
fragment = join45("extends", this.generateExpression(expr.superClass, Precedence.Unary, E_TTT));
|
|
96607
|
+
result = join45(result, fragment);
|
|
96608
96608
|
}
|
|
96609
96609
|
result.push(space);
|
|
96610
96610
|
result.push(this.generateStatement(expr.body, S_TFFT));
|
|
@@ -96619,7 +96619,7 @@ var require_escodegen = __commonJS({
|
|
|
96619
96619
|
}
|
|
96620
96620
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
96621
96621
|
fragment = [
|
|
96622
|
-
|
|
96622
|
+
join45(expr.kind, this.generatePropertyKey(expr.key, expr.computed)),
|
|
96623
96623
|
this.generateFunctionBody(expr.value)
|
|
96624
96624
|
];
|
|
96625
96625
|
} else {
|
|
@@ -96629,7 +96629,7 @@ var require_escodegen = __commonJS({
|
|
|
96629
96629
|
this.generateFunctionBody(expr.value)
|
|
96630
96630
|
];
|
|
96631
96631
|
}
|
|
96632
|
-
return
|
|
96632
|
+
return join45(result, fragment);
|
|
96633
96633
|
},
|
|
96634
96634
|
Property: function(expr, precedence, flags) {
|
|
96635
96635
|
if (expr.kind === "get" || expr.kind === "set") {
|
|
@@ -96824,7 +96824,7 @@ var require_escodegen = __commonJS({
|
|
|
96824
96824
|
for (i2 = 0, iz = expr.blocks.length; i2 < iz; ++i2) {
|
|
96825
96825
|
fragment = that.generateExpression(expr.blocks[i2], Precedence.Sequence, E_TTT);
|
|
96826
96826
|
if (i2 > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
96827
|
-
result =
|
|
96827
|
+
result = join45(result, fragment);
|
|
96828
96828
|
} else {
|
|
96829
96829
|
result.push(fragment);
|
|
96830
96830
|
}
|
|
@@ -96832,13 +96832,13 @@ var require_escodegen = __commonJS({
|
|
|
96832
96832
|
});
|
|
96833
96833
|
}
|
|
96834
96834
|
if (expr.filter) {
|
|
96835
|
-
result =
|
|
96835
|
+
result = join45(result, "if" + space);
|
|
96836
96836
|
fragment = this.generateExpression(expr.filter, Precedence.Sequence, E_TTT);
|
|
96837
|
-
result =
|
|
96837
|
+
result = join45(result, ["(", fragment, ")"]);
|
|
96838
96838
|
}
|
|
96839
96839
|
if (!extra.moz.comprehensionExpressionStartsWithAssignment) {
|
|
96840
96840
|
fragment = this.generateExpression(expr.body, Precedence.Assignment, E_TTT);
|
|
96841
|
-
result =
|
|
96841
|
+
result = join45(result, fragment);
|
|
96842
96842
|
}
|
|
96843
96843
|
result.push(expr.type === Syntax.GeneratorExpression ? ")" : "]");
|
|
96844
96844
|
return result;
|
|
@@ -96854,8 +96854,8 @@ var require_escodegen = __commonJS({
|
|
|
96854
96854
|
} else {
|
|
96855
96855
|
fragment = this.generateExpression(expr.left, Precedence.Call, E_TTT);
|
|
96856
96856
|
}
|
|
96857
|
-
fragment =
|
|
96858
|
-
fragment =
|
|
96857
|
+
fragment = join45(fragment, expr.of ? "of" : "in");
|
|
96858
|
+
fragment = join45(fragment, this.generateExpression(expr.right, Precedence.Sequence, E_TTT));
|
|
96859
96859
|
return ["for" + space + "(", fragment, ")"];
|
|
96860
96860
|
},
|
|
96861
96861
|
SpreadElement: function(expr, precedence, flags) {
|
|
@@ -103385,11 +103385,11 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
103385
103385
|
}
|
|
103386
103386
|
function __awaiter2(thisArg, _arguments, P2, generator) {
|
|
103387
103387
|
function adopt(value) {
|
|
103388
|
-
return value instanceof P2 ? value : new P2(function(
|
|
103389
|
-
|
|
103388
|
+
return value instanceof P2 ? value : new P2(function(resolve80) {
|
|
103389
|
+
resolve80(value);
|
|
103390
103390
|
});
|
|
103391
103391
|
}
|
|
103392
|
-
return new (P2 || (P2 = Promise))(function(
|
|
103392
|
+
return new (P2 || (P2 = Promise))(function(resolve80, reject) {
|
|
103393
103393
|
function fulfilled(value) {
|
|
103394
103394
|
try {
|
|
103395
103395
|
step(generator.next(value));
|
|
@@ -103405,7 +103405,7 @@ function __awaiter2(thisArg, _arguments, P2, generator) {
|
|
|
103405
103405
|
}
|
|
103406
103406
|
}
|
|
103407
103407
|
function step(result) {
|
|
103408
|
-
result.done ?
|
|
103408
|
+
result.done ? resolve80(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
103409
103409
|
}
|
|
103410
103410
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
103411
103411
|
});
|
|
@@ -103596,14 +103596,14 @@ function __asyncValues2(o2) {
|
|
|
103596
103596
|
}, i2);
|
|
103597
103597
|
function verb(n2) {
|
|
103598
103598
|
i2[n2] = o2[n2] && function(v2) {
|
|
103599
|
-
return new Promise(function(
|
|
103600
|
-
v2 = o2[n2](v2), settle(
|
|
103599
|
+
return new Promise(function(resolve80, reject) {
|
|
103600
|
+
v2 = o2[n2](v2), settle(resolve80, reject, v2.done, v2.value);
|
|
103601
103601
|
});
|
|
103602
103602
|
};
|
|
103603
103603
|
}
|
|
103604
|
-
function settle(
|
|
103604
|
+
function settle(resolve80, reject, d2, v2) {
|
|
103605
103605
|
Promise.resolve(v2).then(function(v3) {
|
|
103606
|
-
|
|
103606
|
+
resolve80({ value: v3, done: d2 });
|
|
103607
103607
|
}, reject);
|
|
103608
103608
|
}
|
|
103609
103609
|
}
|
|
@@ -107156,12 +107156,12 @@ var require_util4 = __commonJS({
|
|
|
107156
107156
|
exports.isGMT = exports.dnsLookup = void 0;
|
|
107157
107157
|
var dns_1 = __require("dns");
|
|
107158
107158
|
function dnsLookup(host, opts) {
|
|
107159
|
-
return new Promise((
|
|
107159
|
+
return new Promise((resolve80, reject) => {
|
|
107160
107160
|
(0, dns_1.lookup)(host, opts, (err, res) => {
|
|
107161
107161
|
if (err) {
|
|
107162
107162
|
reject(err);
|
|
107163
107163
|
} else {
|
|
107164
|
-
|
|
107164
|
+
resolve80(res);
|
|
107165
107165
|
}
|
|
107166
107166
|
});
|
|
107167
107167
|
});
|
|
@@ -107766,10 +107766,10 @@ var require_myIpAddress = __commonJS({
|
|
|
107766
107766
|
var ip_1 = require_ip();
|
|
107767
107767
|
var net_1 = __importDefault3(__require("net"));
|
|
107768
107768
|
async function myIpAddress() {
|
|
107769
|
-
return new Promise((
|
|
107769
|
+
return new Promise((resolve80, reject) => {
|
|
107770
107770
|
const socket = net_1.default.connect({ host: "8.8.8.8", port: 53 });
|
|
107771
107771
|
const onError = () => {
|
|
107772
|
-
|
|
107772
|
+
resolve80(ip_1.ip.address());
|
|
107773
107773
|
};
|
|
107774
107774
|
socket.once("error", onError);
|
|
107775
107775
|
socket.once("connect", () => {
|
|
@@ -107777,9 +107777,9 @@ var require_myIpAddress = __commonJS({
|
|
|
107777
107777
|
const addr = socket.address();
|
|
107778
107778
|
socket.destroy();
|
|
107779
107779
|
if (typeof addr === "string") {
|
|
107780
|
-
|
|
107780
|
+
resolve80(addr);
|
|
107781
107781
|
} else if (addr.address) {
|
|
107782
|
-
|
|
107782
|
+
resolve80(addr.address);
|
|
107783
107783
|
} else {
|
|
107784
107784
|
reject(new Error("Expected a `string`"));
|
|
107785
107785
|
}
|
|
@@ -108357,8 +108357,8 @@ var require_deferred_promise = __commonJS({
|
|
|
108357
108357
|
this.context = args.context;
|
|
108358
108358
|
this.owner = args.context.runtime;
|
|
108359
108359
|
this.handle = args.promiseHandle;
|
|
108360
|
-
this.settled = new Promise((
|
|
108361
|
-
this.onSettled =
|
|
108360
|
+
this.settled = new Promise((resolve80) => {
|
|
108361
|
+
this.onSettled = resolve80;
|
|
108362
108362
|
});
|
|
108363
108363
|
this.resolveHandle = args.resolveHandle;
|
|
108364
108364
|
this.rejectHandle = args.rejectHandle;
|
|
@@ -108879,13 +108879,13 @@ var require_context = __commonJS({
|
|
|
108879
108879
|
if (vmResolveResult.error) {
|
|
108880
108880
|
return Promise.resolve(vmResolveResult);
|
|
108881
108881
|
}
|
|
108882
|
-
return new Promise((
|
|
108882
|
+
return new Promise((resolve80) => {
|
|
108883
108883
|
lifetime_1.Scope.withScope((scope) => {
|
|
108884
108884
|
const resolveHandle = scope.manage(this.newFunction("resolve", (value) => {
|
|
108885
|
-
|
|
108885
|
+
resolve80({ value: value && value.dup() });
|
|
108886
108886
|
}));
|
|
108887
108887
|
const rejectHandle = scope.manage(this.newFunction("reject", (error) => {
|
|
108888
|
-
|
|
108888
|
+
resolve80({ error: error && error.dup() });
|
|
108889
108889
|
}));
|
|
108890
108890
|
const promiseHandle = scope.manage(vmResolveResult.value);
|
|
108891
108891
|
const promiseThenHandle = scope.manage(this.getProp(promiseHandle, "then"));
|
|
@@ -111260,13 +111260,13 @@ import * as http from "node:http";
|
|
|
111260
111260
|
import * as https from "node:https";
|
|
111261
111261
|
import { URL as URL2, urlToHttpOptions } from "node:url";
|
|
111262
111262
|
function headHttpRequest(url) {
|
|
111263
|
-
return new Promise((
|
|
111263
|
+
return new Promise((resolve80) => {
|
|
111264
111264
|
const request5 = httpRequest(url, "HEAD", (response) => {
|
|
111265
111265
|
response.resume();
|
|
111266
|
-
|
|
111266
|
+
resolve80(response.statusCode === 200);
|
|
111267
111267
|
}, false);
|
|
111268
111268
|
request5.on("error", () => {
|
|
111269
|
-
|
|
111269
|
+
resolve80(false);
|
|
111270
111270
|
});
|
|
111271
111271
|
});
|
|
111272
111272
|
}
|
|
@@ -111294,7 +111294,7 @@ function httpRequest(url, method, response, keepAlive = true) {
|
|
|
111294
111294
|
return request5;
|
|
111295
111295
|
}
|
|
111296
111296
|
function downloadFile(url, destinationPath, progressCallback) {
|
|
111297
|
-
return new Promise((
|
|
111297
|
+
return new Promise((resolve80, reject) => {
|
|
111298
111298
|
let downloadedBytes = 0;
|
|
111299
111299
|
let totalBytes = 0;
|
|
111300
111300
|
function onData(chunk) {
|
|
@@ -111310,7 +111310,7 @@ function downloadFile(url, destinationPath, progressCallback) {
|
|
|
111310
111310
|
}
|
|
111311
111311
|
const file = createWriteStream(destinationPath);
|
|
111312
111312
|
file.on("close", () => {
|
|
111313
|
-
return
|
|
111313
|
+
return resolve80();
|
|
111314
111314
|
});
|
|
111315
111315
|
file.on("error", (error) => {
|
|
111316
111316
|
return reject(error);
|
|
@@ -111335,7 +111335,7 @@ async function getJSON(url) {
|
|
|
111335
111335
|
}
|
|
111336
111336
|
}
|
|
111337
111337
|
function getText(url) {
|
|
111338
|
-
return new Promise((
|
|
111338
|
+
return new Promise((resolve80, reject) => {
|
|
111339
111339
|
const request5 = httpRequest(url, "GET", (response) => {
|
|
111340
111340
|
let data = "";
|
|
111341
111341
|
if (response.statusCode && response.statusCode >= 400) {
|
|
@@ -111346,7 +111346,7 @@ function getText(url) {
|
|
|
111346
111346
|
});
|
|
111347
111347
|
response.on("end", () => {
|
|
111348
111348
|
try {
|
|
111349
|
-
return
|
|
111349
|
+
return resolve80(String(data));
|
|
111350
111350
|
} catch {
|
|
111351
111351
|
return reject(new Error(`Failed to read text response from ${url}`));
|
|
111352
111352
|
}
|
|
@@ -112738,7 +112738,7 @@ var init_launch = __esm({
|
|
|
112738
112738
|
if (opts.onExit) {
|
|
112739
112739
|
this.#onExitHook = opts.onExit;
|
|
112740
112740
|
}
|
|
112741
|
-
this.#browserProcessExiting = new Promise((
|
|
112741
|
+
this.#browserProcessExiting = new Promise((resolve80, reject) => {
|
|
112742
112742
|
this.#browserProcess.once("exit", async () => {
|
|
112743
112743
|
debugLaunch(`Browser process ${this.#browserProcess.pid} onExit`);
|
|
112744
112744
|
this.#clearListeners();
|
|
@@ -112749,7 +112749,7 @@ var init_launch = __esm({
|
|
|
112749
112749
|
reject(err);
|
|
112750
112750
|
return;
|
|
112751
112751
|
}
|
|
112752
|
-
|
|
112752
|
+
resolve80();
|
|
112753
112753
|
});
|
|
112754
112754
|
});
|
|
112755
112755
|
}
|
|
@@ -112865,7 +112865,7 @@ Error cause: ${isErrorLike2(error) ? error.stack : error}`);
|
|
|
112865
112865
|
return [...this.#logs];
|
|
112866
112866
|
}
|
|
112867
112867
|
waitForLineOutput(regex2, timeout3 = 0) {
|
|
112868
|
-
return new Promise((
|
|
112868
|
+
return new Promise((resolve80, reject) => {
|
|
112869
112869
|
const onClose = (errorOrCode) => {
|
|
112870
112870
|
cleanup();
|
|
112871
112871
|
reject(new Error([
|
|
@@ -112901,7 +112901,7 @@ Error cause: ${isErrorLike2(error) ? error.stack : error}`);
|
|
|
112901
112901
|
return;
|
|
112902
112902
|
}
|
|
112903
112903
|
cleanup();
|
|
112904
|
-
|
|
112904
|
+
resolve80(match2[1]);
|
|
112905
112905
|
}
|
|
112906
112906
|
});
|
|
112907
112907
|
}
|
|
@@ -113370,7 +113370,7 @@ var require_get_stream = __commonJS({
|
|
|
113370
113370
|
};
|
|
113371
113371
|
const { maxBuffer } = options;
|
|
113372
113372
|
let stream;
|
|
113373
|
-
await new Promise((
|
|
113373
|
+
await new Promise((resolve80, reject) => {
|
|
113374
113374
|
const rejectPromise = (error) => {
|
|
113375
113375
|
if (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
|
|
113376
113376
|
error.bufferedData = stream.getBufferedValue();
|
|
@@ -113382,7 +113382,7 @@ var require_get_stream = __commonJS({
|
|
|
113382
113382
|
rejectPromise(error);
|
|
113383
113383
|
return;
|
|
113384
113384
|
}
|
|
113385
|
-
|
|
113385
|
+
resolve80();
|
|
113386
113386
|
});
|
|
113387
113387
|
stream.on("data", () => {
|
|
113388
113388
|
if (stream.getBufferedLength() > maxBuffer) {
|
|
@@ -114671,7 +114671,7 @@ var require_extract_zip = __commonJS({
|
|
|
114671
114671
|
debug9("opening", this.zipPath, "with opts", this.opts);
|
|
114672
114672
|
this.zipfile = await openZip(this.zipPath, { lazyEntries: true });
|
|
114673
114673
|
this.canceled = false;
|
|
114674
|
-
return new Promise((
|
|
114674
|
+
return new Promise((resolve80, reject) => {
|
|
114675
114675
|
this.zipfile.on("error", (err) => {
|
|
114676
114676
|
this.canceled = true;
|
|
114677
114677
|
reject(err);
|
|
@@ -114680,7 +114680,7 @@ var require_extract_zip = __commonJS({
|
|
|
114680
114680
|
this.zipfile.on("close", () => {
|
|
114681
114681
|
if (!this.canceled) {
|
|
114682
114682
|
debug9("zip extraction complete");
|
|
114683
|
-
|
|
114683
|
+
resolve80();
|
|
114684
114684
|
}
|
|
114685
114685
|
});
|
|
114686
114686
|
this.zipfile.on("entry", async (entry) => {
|
|
@@ -115937,8 +115937,8 @@ var require_streamx = __commonJS({
|
|
|
115937
115937
|
return this;
|
|
115938
115938
|
},
|
|
115939
115939
|
next() {
|
|
115940
|
-
return new Promise(function(
|
|
115941
|
-
promiseResolve =
|
|
115940
|
+
return new Promise(function(resolve80, reject) {
|
|
115941
|
+
promiseResolve = resolve80;
|
|
115942
115942
|
promiseReject = reject;
|
|
115943
115943
|
const data = stream.read();
|
|
115944
115944
|
if (data !== null) ondata(data);
|
|
@@ -115968,11 +115968,11 @@ var require_streamx = __commonJS({
|
|
|
115968
115968
|
}
|
|
115969
115969
|
function destroy(err) {
|
|
115970
115970
|
stream.destroy(err);
|
|
115971
|
-
return new Promise((
|
|
115972
|
-
if (stream._duplexState & DESTROYED) return
|
|
115971
|
+
return new Promise((resolve80, reject) => {
|
|
115972
|
+
if (stream._duplexState & DESTROYED) return resolve80({ value: void 0, done: true });
|
|
115973
115973
|
stream.once("close", function() {
|
|
115974
115974
|
if (err) reject(err);
|
|
115975
|
-
else
|
|
115975
|
+
else resolve80({ value: void 0, done: true });
|
|
115976
115976
|
});
|
|
115977
115977
|
});
|
|
115978
115978
|
}
|
|
@@ -116016,8 +116016,8 @@ var require_streamx = __commonJS({
|
|
|
116016
116016
|
const writes = pending + (ws._duplexState & WRITE_WRITING ? 1 : 0);
|
|
116017
116017
|
if (writes === 0) return Promise.resolve(true);
|
|
116018
116018
|
if (state.drains === null) state.drains = [];
|
|
116019
|
-
return new Promise((
|
|
116020
|
-
state.drains.push({ writes, resolve:
|
|
116019
|
+
return new Promise((resolve80) => {
|
|
116020
|
+
state.drains.push({ writes, resolve: resolve80 });
|
|
116021
116021
|
});
|
|
116022
116022
|
}
|
|
116023
116023
|
write(data) {
|
|
@@ -116122,10 +116122,10 @@ var require_streamx = __commonJS({
|
|
|
116122
116122
|
cb(null);
|
|
116123
116123
|
}
|
|
116124
116124
|
function pipelinePromise(...streams) {
|
|
116125
|
-
return new Promise((
|
|
116125
|
+
return new Promise((resolve80, reject) => {
|
|
116126
116126
|
return pipeline(...streams, (err) => {
|
|
116127
116127
|
if (err) return reject(err);
|
|
116128
|
-
|
|
116128
|
+
resolve80();
|
|
116129
116129
|
});
|
|
116130
116130
|
});
|
|
116131
116131
|
}
|
|
@@ -116780,16 +116780,16 @@ var require_extract = __commonJS({
|
|
|
116780
116780
|
entryCallback = null;
|
|
116781
116781
|
cb(err);
|
|
116782
116782
|
}
|
|
116783
|
-
function onnext(
|
|
116783
|
+
function onnext(resolve80, reject) {
|
|
116784
116784
|
if (error) {
|
|
116785
116785
|
return reject(error);
|
|
116786
116786
|
}
|
|
116787
116787
|
if (entryStream) {
|
|
116788
|
-
|
|
116788
|
+
resolve80({ value: entryStream, done: false });
|
|
116789
116789
|
entryStream = null;
|
|
116790
116790
|
return;
|
|
116791
116791
|
}
|
|
116792
|
-
promiseResolve =
|
|
116792
|
+
promiseResolve = resolve80;
|
|
116793
116793
|
promiseReject = reject;
|
|
116794
116794
|
consumeCallback(null);
|
|
116795
116795
|
if (extract._finished && promiseResolve) {
|
|
@@ -116817,11 +116817,11 @@ var require_extract = __commonJS({
|
|
|
116817
116817
|
function destroy(err) {
|
|
116818
116818
|
extract.destroy(err);
|
|
116819
116819
|
consumeCallback(err);
|
|
116820
|
-
return new Promise((
|
|
116821
|
-
if (extract.destroyed) return
|
|
116820
|
+
return new Promise((resolve80, reject) => {
|
|
116821
|
+
if (extract.destroyed) return resolve80({ value: void 0, done: true });
|
|
116822
116822
|
extract.once("close", function() {
|
|
116823
116823
|
if (err) reject(err);
|
|
116824
|
-
else
|
|
116824
|
+
else resolve80({ value: void 0, done: true });
|
|
116825
116825
|
});
|
|
116826
116826
|
});
|
|
116827
116827
|
}
|
|
@@ -117140,37 +117140,37 @@ var require_tar_fs = __commonJS({
|
|
|
117140
117140
|
pack2.entry(header, onnextentry);
|
|
117141
117141
|
});
|
|
117142
117142
|
}
|
|
117143
|
-
function onstat(err, filename,
|
|
117143
|
+
function onstat(err, filename, stat9) {
|
|
117144
117144
|
if (pack2.destroyed) return;
|
|
117145
117145
|
if (err) return pack2.destroy(err);
|
|
117146
117146
|
if (!filename) {
|
|
117147
117147
|
if (opts.finalize !== false) pack2.finalize();
|
|
117148
117148
|
return finish(pack2);
|
|
117149
117149
|
}
|
|
117150
|
-
if (
|
|
117150
|
+
if (stat9.isSocket()) return onnextentry();
|
|
117151
117151
|
let header = {
|
|
117152
117152
|
name: normalize3(filename),
|
|
117153
|
-
mode: (
|
|
117154
|
-
mtime:
|
|
117155
|
-
size:
|
|
117153
|
+
mode: (stat9.mode | (stat9.isDirectory() ? dmode : fmode)) & umask,
|
|
117154
|
+
mtime: stat9.mtime,
|
|
117155
|
+
size: stat9.size,
|
|
117156
117156
|
type: "file",
|
|
117157
|
-
uid:
|
|
117158
|
-
gid:
|
|
117157
|
+
uid: stat9.uid,
|
|
117158
|
+
gid: stat9.gid
|
|
117159
117159
|
};
|
|
117160
|
-
if (
|
|
117160
|
+
if (stat9.isDirectory()) {
|
|
117161
117161
|
header.size = 0;
|
|
117162
117162
|
header.type = "directory";
|
|
117163
117163
|
header = map3(header) || header;
|
|
117164
117164
|
return pack2.entry(header, onnextentry);
|
|
117165
117165
|
}
|
|
117166
|
-
if (
|
|
117166
|
+
if (stat9.isSymbolicLink()) {
|
|
117167
117167
|
header.size = 0;
|
|
117168
117168
|
header.type = "symlink";
|
|
117169
117169
|
header = map3(header) || header;
|
|
117170
117170
|
return onsymlink(filename, header);
|
|
117171
117171
|
}
|
|
117172
117172
|
header = map3(header) || header;
|
|
117173
|
-
if (!
|
|
117173
|
+
if (!stat9.isFile()) {
|
|
117174
117174
|
if (strict) return pack2.destroy(new Error("unsupported type for " + filename));
|
|
117175
117175
|
return onnextentry();
|
|
117176
117176
|
}
|
|
@@ -117245,7 +117245,7 @@ var require_tar_fs = __commonJS({
|
|
|
117245
117245
|
uid: header.uid,
|
|
117246
117246
|
gid: header.gid,
|
|
117247
117247
|
mode: header.mode
|
|
117248
|
-
},
|
|
117248
|
+
}, stat9);
|
|
117249
117249
|
}
|
|
117250
117250
|
mkdirfix(dir, {
|
|
117251
117251
|
fs: xfs,
|
|
@@ -117271,7 +117271,7 @@ var require_tar_fs = __commonJS({
|
|
|
117271
117271
|
next();
|
|
117272
117272
|
});
|
|
117273
117273
|
});
|
|
117274
|
-
function
|
|
117274
|
+
function stat9(err) {
|
|
117275
117275
|
if (err) return next(err);
|
|
117276
117276
|
utimes(name, header, function(err2) {
|
|
117277
117277
|
if (err2) return next(err2);
|
|
@@ -117287,7 +117287,7 @@ var require_tar_fs = __commonJS({
|
|
|
117287
117287
|
validateNotSymlink(xfs, dst, path14.join(cwd, "."), function(err, valid) {
|
|
117288
117288
|
if (err) return next(err);
|
|
117289
117289
|
if (!valid && validateSymLinks) return next(new Error(name + " is not a valid symlink"));
|
|
117290
|
-
xfs.symlink(header.linkname, name,
|
|
117290
|
+
xfs.symlink(header.linkname, name, stat9);
|
|
117291
117291
|
});
|
|
117292
117292
|
});
|
|
117293
117293
|
}
|
|
@@ -117302,7 +117302,7 @@ var require_tar_fs = __commonJS({
|
|
|
117302
117302
|
stream = xfs.createReadStream(dst);
|
|
117303
117303
|
return onfile();
|
|
117304
117304
|
}
|
|
117305
|
-
|
|
117305
|
+
stat9(err2);
|
|
117306
117306
|
});
|
|
117307
117307
|
});
|
|
117308
117308
|
});
|
|
@@ -117318,7 +117318,7 @@ var require_tar_fs = __commonJS({
|
|
|
117318
117318
|
});
|
|
117319
117319
|
pump(rs, ws, function(err) {
|
|
117320
117320
|
if (err) return next(err);
|
|
117321
|
-
ws.on("close",
|
|
117321
|
+
ws.on("close", stat9);
|
|
117322
117322
|
});
|
|
117323
117323
|
}
|
|
117324
117324
|
}
|
|
@@ -117387,23 +117387,23 @@ var require_tar_fs = __commonJS({
|
|
|
117387
117387
|
function normalize3(name) {
|
|
117388
117388
|
return win32 ? name.replace(/\\/g, "/").replace(/[:?<>|]/g, "_") : name;
|
|
117389
117389
|
}
|
|
117390
|
-
function statAll(fs10,
|
|
117390
|
+
function statAll(fs10, stat9, cwd, ignore, entries2, sort) {
|
|
117391
117391
|
if (!entries2) entries2 = ["."];
|
|
117392
117392
|
const queue = entries2.slice(0);
|
|
117393
117393
|
return function loop(callback) {
|
|
117394
117394
|
if (!queue.length) return callback(null);
|
|
117395
117395
|
const next = queue.shift();
|
|
117396
117396
|
const nextAbs = path14.join(cwd, next);
|
|
117397
|
-
|
|
117397
|
+
stat9.call(fs10, nextAbs, function(err, stat10) {
|
|
117398
117398
|
if (err) return callback(entries2.indexOf(next) === -1 && err.code === "ENOENT" ? null : err);
|
|
117399
|
-
if (!
|
|
117399
|
+
if (!stat10.isDirectory()) return callback(null, next, stat10);
|
|
117400
117400
|
fs10.readdir(nextAbs, function(err2, files) {
|
|
117401
117401
|
if (err2) return callback(err2);
|
|
117402
117402
|
if (sort) files.sort();
|
|
117403
117403
|
for (let i2 = 0; i2 < files.length; i2++) {
|
|
117404
117404
|
if (!ignore(path14.join(cwd, next, files[i2]))) queue.push(path14.join(next, files[i2]));
|
|
117405
117405
|
}
|
|
117406
|
-
callback(null, next,
|
|
117406
|
+
callback(null, next, stat10);
|
|
117407
117407
|
});
|
|
117408
117408
|
});
|
|
117409
117409
|
};
|
|
@@ -121797,12 +121797,12 @@ var init_yargs_factory = __esm({
|
|
|
121797
121797
|
async getCompletion(args, done) {
|
|
121798
121798
|
argsert("<array> [function]", [args, done], arguments.length);
|
|
121799
121799
|
if (!done) {
|
|
121800
|
-
return new Promise((
|
|
121800
|
+
return new Promise((resolve80, reject) => {
|
|
121801
121801
|
__classPrivateFieldGet2(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
|
|
121802
121802
|
if (err)
|
|
121803
121803
|
reject(err);
|
|
121804
121804
|
else
|
|
121805
|
-
|
|
121805
|
+
resolve80(completions);
|
|
121806
121806
|
});
|
|
121807
121807
|
});
|
|
121808
121808
|
} else {
|
|
@@ -123257,9 +123257,9 @@ async function getConnectionTransport(options) {
|
|
|
123257
123257
|
throw new Error("Could not detect required browser platform");
|
|
123258
123258
|
}
|
|
123259
123259
|
const { convertPuppeteerChannelToBrowsersChannel: convertPuppeteerChannelToBrowsersChannel3 } = await Promise.resolve().then(() => (init_LaunchOptions(), LaunchOptions_exports));
|
|
123260
|
-
const { join:
|
|
123260
|
+
const { join: join45 } = await import("node:path");
|
|
123261
123261
|
const userDataDir = resolveDefaultUserDataDir4(Browser5.CHROME, platform, convertPuppeteerChannelToBrowsersChannel3(options.channel));
|
|
123262
|
-
const portPath =
|
|
123262
|
+
const portPath = join45(userDataDir, "DevToolsActivePort");
|
|
123263
123263
|
try {
|
|
123264
123264
|
const fileContent = await environment.value.fs.promises.readFile(portPath, "ascii");
|
|
123265
123265
|
const [rawPort, rawPath] = fileContent.split("\n").map((line) => {
|
|
@@ -124604,8 +124604,8 @@ var init_ScreenRecorder = __esm({
|
|
|
124604
124604
|
static {
|
|
124605
124605
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
124606
124606
|
__esDecorate23(this, _private_writeFrame_descriptor = { value: __setFunctionName6(async function(buffer) {
|
|
124607
|
-
const error = await new Promise((
|
|
124608
|
-
this.#process.stdin.write(buffer,
|
|
124607
|
+
const error = await new Promise((resolve80) => {
|
|
124608
|
+
this.#process.stdin.write(buffer, resolve80);
|
|
124609
124609
|
});
|
|
124610
124610
|
if (error) {
|
|
124611
124611
|
console.log(`ffmpeg failed to write: ${error.message}.`);
|
|
@@ -124795,8 +124795,8 @@ var init_ScreenRecorder = __esm({
|
|
|
124795
124795
|
const [buffer, timestamp] = await this.#lastFrame;
|
|
124796
124796
|
await Promise.all(Array(Math.max(1, Math.round(this.#fps * (performance.now() - timestamp) / 1e3))).fill(buffer).map(this.#writeFrame.bind(this)));
|
|
124797
124797
|
this.#process.stdin.end();
|
|
124798
|
-
await new Promise((
|
|
124799
|
-
this.#process.once("close",
|
|
124798
|
+
await new Promise((resolve80) => {
|
|
124799
|
+
this.#process.once("close", resolve80);
|
|
124800
124800
|
});
|
|
124801
124801
|
}
|
|
124802
124802
|
/**
|
|
@@ -137136,7 +137136,7 @@ ${lanes.join("\n")}
|
|
|
137136
137136
|
writeOutputIsTTY() {
|
|
137137
137137
|
return process.stdout.isTTY;
|
|
137138
137138
|
},
|
|
137139
|
-
readFile:
|
|
137139
|
+
readFile: readFile46,
|
|
137140
137140
|
writeFile: writeFile210,
|
|
137141
137141
|
watchFile: watchFile2,
|
|
137142
137142
|
watchDirectory,
|
|
@@ -137177,9 +137177,9 @@ ${lanes.join("\n")}
|
|
|
137177
137177
|
return process.memoryUsage().heapUsed;
|
|
137178
137178
|
},
|
|
137179
137179
|
getFileSize(path14) {
|
|
137180
|
-
const
|
|
137181
|
-
if (
|
|
137182
|
-
return
|
|
137180
|
+
const stat9 = statSync10(path14);
|
|
137181
|
+
if (stat9 == null ? void 0 : stat9.isFile()) {
|
|
137182
|
+
return stat9.size;
|
|
137183
137183
|
}
|
|
137184
137184
|
return 0;
|
|
137185
137185
|
},
|
|
@@ -137342,7 +137342,7 @@ ${lanes.join("\n")}
|
|
|
137342
137342
|
callback
|
|
137343
137343
|
);
|
|
137344
137344
|
}
|
|
137345
|
-
function
|
|
137345
|
+
function readFile46(fileName, _encoding) {
|
|
137346
137346
|
let buffer;
|
|
137347
137347
|
try {
|
|
137348
137348
|
buffer = _fs.readFileSync(fileName);
|
|
@@ -137397,19 +137397,19 @@ ${lanes.join("\n")}
|
|
|
137397
137397
|
if (entry === "." || entry === "..") {
|
|
137398
137398
|
continue;
|
|
137399
137399
|
}
|
|
137400
|
-
let
|
|
137400
|
+
let stat9;
|
|
137401
137401
|
if (typeof dirent === "string" || dirent.isSymbolicLink()) {
|
|
137402
137402
|
const name = combinePaths(path14, entry);
|
|
137403
|
-
|
|
137404
|
-
if (!
|
|
137403
|
+
stat9 = statSync10(name);
|
|
137404
|
+
if (!stat9) {
|
|
137405
137405
|
continue;
|
|
137406
137406
|
}
|
|
137407
137407
|
} else {
|
|
137408
|
-
|
|
137408
|
+
stat9 = dirent;
|
|
137409
137409
|
}
|
|
137410
|
-
if (
|
|
137410
|
+
if (stat9.isFile()) {
|
|
137411
137411
|
files.push(entry);
|
|
137412
|
-
} else if (
|
|
137412
|
+
} else if (stat9.isDirectory()) {
|
|
137413
137413
|
directories.push(entry);
|
|
137414
137414
|
}
|
|
137415
137415
|
}
|
|
@@ -137424,15 +137424,15 @@ ${lanes.join("\n")}
|
|
|
137424
137424
|
return matchFiles(path14, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
|
|
137425
137425
|
}
|
|
137426
137426
|
function fileSystemEntryExists(path14, entryKind) {
|
|
137427
|
-
const
|
|
137428
|
-
if (!
|
|
137427
|
+
const stat9 = statSync10(path14);
|
|
137428
|
+
if (!stat9) {
|
|
137429
137429
|
return false;
|
|
137430
137430
|
}
|
|
137431
137431
|
switch (entryKind) {
|
|
137432
137432
|
case 0:
|
|
137433
|
-
return
|
|
137433
|
+
return stat9.isFile();
|
|
137434
137434
|
case 1:
|
|
137435
|
-
return
|
|
137435
|
+
return stat9.isDirectory();
|
|
137436
137436
|
default:
|
|
137437
137437
|
return false;
|
|
137438
137438
|
}
|
|
@@ -173898,7 +173898,7 @@ ${lanes.join("\n")}
|
|
|
173898
173898
|
const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);
|
|
173899
173899
|
return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);
|
|
173900
173900
|
}
|
|
173901
|
-
function parseCommandLineWorker(diagnostics, commandLine,
|
|
173901
|
+
function parseCommandLineWorker(diagnostics, commandLine, readFile46) {
|
|
173902
173902
|
const options = {};
|
|
173903
173903
|
let watchOptions;
|
|
173904
173904
|
const fileNames = [];
|
|
@@ -173946,7 +173946,7 @@ ${lanes.join("\n")}
|
|
|
173946
173946
|
}
|
|
173947
173947
|
}
|
|
173948
173948
|
function parseResponseFile(fileName) {
|
|
173949
|
-
const text = tryReadFile(fileName,
|
|
173949
|
+
const text = tryReadFile(fileName, readFile46 || ((fileName2) => sys.readFile(fileName2)));
|
|
173950
173950
|
if (!isString3(text)) {
|
|
173951
173951
|
errors.push(text);
|
|
173952
173952
|
return;
|
|
@@ -174049,8 +174049,8 @@ ${lanes.join("\n")}
|
|
|
174049
174049
|
unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,
|
|
174050
174050
|
optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument
|
|
174051
174051
|
};
|
|
174052
|
-
function parseCommandLine(commandLine,
|
|
174053
|
-
return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine,
|
|
174052
|
+
function parseCommandLine(commandLine, readFile46) {
|
|
174053
|
+
return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile46);
|
|
174054
174054
|
}
|
|
174055
174055
|
function getOptionFromName(optionName, allowShort) {
|
|
174056
174056
|
return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort);
|
|
@@ -174132,8 +174132,8 @@ ${lanes.join("\n")}
|
|
|
174132
174132
|
watchOptionsToExtend
|
|
174133
174133
|
);
|
|
174134
174134
|
}
|
|
174135
|
-
function readConfigFile2(fileName,
|
|
174136
|
-
const textOrDiagnostic = tryReadFile(fileName,
|
|
174135
|
+
function readConfigFile2(fileName, readFile46) {
|
|
174136
|
+
const textOrDiagnostic = tryReadFile(fileName, readFile46);
|
|
174137
174137
|
return isString3(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };
|
|
174138
174138
|
}
|
|
174139
174139
|
function parseConfigFileTextToJson(fileName, jsonText) {
|
|
@@ -174148,14 +174148,14 @@ ${lanes.join("\n")}
|
|
|
174148
174148
|
error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : void 0
|
|
174149
174149
|
};
|
|
174150
174150
|
}
|
|
174151
|
-
function readJsonConfigFile(fileName,
|
|
174152
|
-
const textOrDiagnostic = tryReadFile(fileName,
|
|
174151
|
+
function readJsonConfigFile(fileName, readFile46) {
|
|
174152
|
+
const textOrDiagnostic = tryReadFile(fileName, readFile46);
|
|
174153
174153
|
return isString3(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] };
|
|
174154
174154
|
}
|
|
174155
|
-
function tryReadFile(fileName,
|
|
174155
|
+
function tryReadFile(fileName, readFile46) {
|
|
174156
174156
|
let text;
|
|
174157
174157
|
try {
|
|
174158
|
-
text =
|
|
174158
|
+
text = readFile46(fileName);
|
|
174159
174159
|
} catch (e2) {
|
|
174160
174160
|
return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e2.message);
|
|
174161
174161
|
}
|
|
@@ -252252,7 +252252,7 @@ ${lanes.join("\n")}
|
|
|
252252
252252
|
}
|
|
252253
252253
|
}
|
|
252254
252254
|
function createImportCallExpressionAMD(arg, containsLexicalThis) {
|
|
252255
|
-
const
|
|
252255
|
+
const resolve80 = factory2.createUniqueName("resolve");
|
|
252256
252256
|
const reject = factory2.createUniqueName("reject");
|
|
252257
252257
|
const parameters = [
|
|
252258
252258
|
factory2.createParameterDeclaration(
|
|
@@ -252261,7 +252261,7 @@ ${lanes.join("\n")}
|
|
|
252261
252261
|
/*dotDotDotToken*/
|
|
252262
252262
|
void 0,
|
|
252263
252263
|
/*name*/
|
|
252264
|
-
|
|
252264
|
+
resolve80
|
|
252265
252265
|
),
|
|
252266
252266
|
factory2.createParameterDeclaration(
|
|
252267
252267
|
/*modifiers*/
|
|
@@ -252278,7 +252278,7 @@ ${lanes.join("\n")}
|
|
|
252278
252278
|
factory2.createIdentifier("require"),
|
|
252279
252279
|
/*typeArguments*/
|
|
252280
252280
|
void 0,
|
|
252281
|
-
[factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]),
|
|
252281
|
+
[factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve80, reject]
|
|
252282
252282
|
)
|
|
252283
252283
|
)
|
|
252284
252284
|
]);
|
|
@@ -263813,12 +263813,12 @@ ${lanes.join("\n")}
|
|
|
263813
263813
|
function createCompilerHost(options, setParentNodes) {
|
|
263814
263814
|
return createCompilerHostWorker(options, setParentNodes);
|
|
263815
263815
|
}
|
|
263816
|
-
function createGetSourceFile(
|
|
263816
|
+
function createGetSourceFile(readFile46, setParentNodes) {
|
|
263817
263817
|
return (fileName, languageVersionOrOptions, onError) => {
|
|
263818
263818
|
let text;
|
|
263819
263819
|
try {
|
|
263820
263820
|
mark("beforeIORead");
|
|
263821
|
-
text =
|
|
263821
|
+
text = readFile46(fileName);
|
|
263822
263822
|
mark("afterIORead");
|
|
263823
263823
|
measure("I/O Read", "beforeIORead", "afterIORead");
|
|
263824
263824
|
} catch (e2) {
|
|
@@ -264722,7 +264722,7 @@ ${lanes.join("\n")}
|
|
|
264722
264722
|
getRedirectFromOutput,
|
|
264723
264723
|
forEachResolvedProjectReference: forEachResolvedProjectReference2
|
|
264724
264724
|
});
|
|
264725
|
-
const
|
|
264725
|
+
const readFile46 = host.readFile.bind(host);
|
|
264726
264726
|
(_e2 = tracing) == null ? void 0 : _e2.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
|
|
264727
264727
|
const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
|
|
264728
264728
|
(_f = tracing) == null ? void 0 : _f.pop();
|
|
@@ -264948,7 +264948,7 @@ ${lanes.join("\n")}
|
|
|
264948
264948
|
shouldTransformImportCall,
|
|
264949
264949
|
emitBuildInfo,
|
|
264950
264950
|
fileExists: fileExists2,
|
|
264951
|
-
readFile:
|
|
264951
|
+
readFile: readFile46,
|
|
264952
264952
|
directoryExists,
|
|
264953
264953
|
getSymlinkCache,
|
|
264954
264954
|
realpath: (_o = host.realpath) == null ? void 0 : _o.bind(host),
|
|
@@ -338996,8 +338996,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
338996
338996
|
installPackage(options) {
|
|
338997
338997
|
this.packageInstallId++;
|
|
338998
338998
|
const request5 = { kind: "installPackage", ...options, id: this.packageInstallId };
|
|
338999
|
-
const promise = new Promise((
|
|
339000
|
-
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve:
|
|
338999
|
+
const promise = new Promise((resolve80, reject) => {
|
|
339000
|
+
(this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve80, reject });
|
|
339001
339001
|
});
|
|
339002
339002
|
this.installer.send(request5);
|
|
339003
339003
|
return promise;
|
|
@@ -339655,8 +339655,8 @@ var require_util5 = __commonJS({
|
|
|
339655
339655
|
exports.removeUndefinedValuesFromObject = removeUndefinedValuesFromObject;
|
|
339656
339656
|
async function isDirectory2(path14) {
|
|
339657
339657
|
try {
|
|
339658
|
-
const
|
|
339659
|
-
return
|
|
339658
|
+
const stat9 = await fs_1.promises.stat(path14);
|
|
339659
|
+
return stat9.isDirectory();
|
|
339660
339660
|
} catch (e2) {
|
|
339661
339661
|
if (e2.code === "ENOENT") {
|
|
339662
339662
|
return false;
|
|
@@ -339667,8 +339667,8 @@ var require_util5 = __commonJS({
|
|
|
339667
339667
|
exports.isDirectory = isDirectory2;
|
|
339668
339668
|
function isDirectorySync(path14) {
|
|
339669
339669
|
try {
|
|
339670
|
-
const
|
|
339671
|
-
return
|
|
339670
|
+
const stat9 = fs_1.default.statSync(path14);
|
|
339671
|
+
return stat9.isDirectory();
|
|
339672
339672
|
} catch (e2) {
|
|
339673
339673
|
if (e2.code === "ENOENT") {
|
|
339674
339674
|
return false;
|
|
@@ -406435,8 +406435,8 @@ ${sourceUrlComment}
|
|
|
406435
406435
|
debug62("Normalized pathname: %o", filepath);
|
|
406436
406436
|
const fdHandle = await fs_1.promises.open(filepath, flags, mode);
|
|
406437
406437
|
const fd = fdHandle.fd;
|
|
406438
|
-
const
|
|
406439
|
-
if (cache && cache.stat &&
|
|
406438
|
+
const stat9 = await fdHandle.stat();
|
|
406439
|
+
if (cache && cache.stat && stat9 && isNotModified(cache.stat, stat9)) {
|
|
406440
406440
|
await fdHandle.close();
|
|
406441
406441
|
throw new notmodified_1.default();
|
|
406442
406442
|
}
|
|
@@ -406445,7 +406445,7 @@ ${sourceUrlComment}
|
|
|
406445
406445
|
...opts,
|
|
406446
406446
|
fd
|
|
406447
406447
|
});
|
|
406448
|
-
rs.stat =
|
|
406448
|
+
rs.stat = stat9;
|
|
406449
406449
|
return rs;
|
|
406450
406450
|
} catch (err) {
|
|
406451
406451
|
if (err.code === "ENOENT") {
|
|
@@ -431719,37 +431719,37 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431719
431719
|
pack2.entry(header, onnextentry);
|
|
431720
431720
|
});
|
|
431721
431721
|
}
|
|
431722
|
-
function onstat(err, filename,
|
|
431722
|
+
function onstat(err, filename, stat9) {
|
|
431723
431723
|
if (pack2.destroyed) return;
|
|
431724
431724
|
if (err) return pack2.destroy(err);
|
|
431725
431725
|
if (!filename) {
|
|
431726
431726
|
if (opts.finalize !== false) pack2.finalize();
|
|
431727
431727
|
return finish(pack2);
|
|
431728
431728
|
}
|
|
431729
|
-
if (
|
|
431729
|
+
if (stat9.isSocket()) return onnextentry();
|
|
431730
431730
|
let header = {
|
|
431731
431731
|
name: normalize22(filename),
|
|
431732
|
-
mode: (
|
|
431733
|
-
mtime:
|
|
431734
|
-
size:
|
|
431732
|
+
mode: (stat9.mode | (stat9.isDirectory() ? dmode : fmode)) & umask,
|
|
431733
|
+
mtime: stat9.mtime,
|
|
431734
|
+
size: stat9.size,
|
|
431735
431735
|
type: "file",
|
|
431736
|
-
uid:
|
|
431737
|
-
gid:
|
|
431736
|
+
uid: stat9.uid,
|
|
431737
|
+
gid: stat9.gid
|
|
431738
431738
|
};
|
|
431739
|
-
if (
|
|
431739
|
+
if (stat9.isDirectory()) {
|
|
431740
431740
|
header.size = 0;
|
|
431741
431741
|
header.type = "directory";
|
|
431742
431742
|
header = map22(header) || header;
|
|
431743
431743
|
return pack2.entry(header, onnextentry);
|
|
431744
431744
|
}
|
|
431745
|
-
if (
|
|
431745
|
+
if (stat9.isSymbolicLink()) {
|
|
431746
431746
|
header.size = 0;
|
|
431747
431747
|
header.type = "symlink";
|
|
431748
431748
|
header = map22(header) || header;
|
|
431749
431749
|
return onsymlink(filename, header);
|
|
431750
431750
|
}
|
|
431751
431751
|
header = map22(header) || header;
|
|
431752
|
-
if (!
|
|
431752
|
+
if (!stat9.isFile()) {
|
|
431753
431753
|
if (strict) return pack2.destroy(new Error("unsupported type for " + filename));
|
|
431754
431754
|
return onnextentry();
|
|
431755
431755
|
}
|
|
@@ -431824,7 +431824,7 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431824
431824
|
uid: header.uid,
|
|
431825
431825
|
gid: header.gid,
|
|
431826
431826
|
mode: header.mode
|
|
431827
|
-
},
|
|
431827
|
+
}, stat9);
|
|
431828
431828
|
}
|
|
431829
431829
|
mkdirfix(dir, {
|
|
431830
431830
|
fs: xfs,
|
|
@@ -431850,7 +431850,7 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431850
431850
|
next();
|
|
431851
431851
|
});
|
|
431852
431852
|
});
|
|
431853
|
-
function
|
|
431853
|
+
function stat9(err) {
|
|
431854
431854
|
if (err) return next(err);
|
|
431855
431855
|
utimes(name, header, function(err2) {
|
|
431856
431856
|
if (err2) return next(err2);
|
|
@@ -431866,7 +431866,7 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431866
431866
|
validateNotSymlink(xfs, dst, path122.join(cwd, "."), function(err, valid) {
|
|
431867
431867
|
if (err) return next(err);
|
|
431868
431868
|
if (!valid && validateSymLinks) return next(new Error(name + " is not a valid symlink"));
|
|
431869
|
-
xfs.symlink(header.linkname, name,
|
|
431869
|
+
xfs.symlink(header.linkname, name, stat9);
|
|
431870
431870
|
});
|
|
431871
431871
|
});
|
|
431872
431872
|
}
|
|
@@ -431881,7 +431881,7 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431881
431881
|
stream2 = xfs.createReadStream(dst);
|
|
431882
431882
|
return onfile();
|
|
431883
431883
|
}
|
|
431884
|
-
|
|
431884
|
+
stat9(err2);
|
|
431885
431885
|
});
|
|
431886
431886
|
});
|
|
431887
431887
|
});
|
|
@@ -431897,7 +431897,7 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431897
431897
|
});
|
|
431898
431898
|
pump(rs, ws, function(err) {
|
|
431899
431899
|
if (err) return next(err);
|
|
431900
|
-
ws.on("close",
|
|
431900
|
+
ws.on("close", stat9);
|
|
431901
431901
|
});
|
|
431902
431902
|
}
|
|
431903
431903
|
}
|
|
@@ -431966,14 +431966,14 @@ If you think this is a bug, please report it on the Puppeteer issue tracker.`;
|
|
|
431966
431966
|
function normalize22(name) {
|
|
431967
431967
|
return win32 ? name.replace(/\\/g, "/").replace(/[:?<>|]/g, "_") : name;
|
|
431968
431968
|
}
|
|
431969
|
-
function statAll(fs9,
|
|
431969
|
+
function statAll(fs9, stat9, cwd, ignore, entries2, sort) {
|
|
431970
431970
|
if (!entries2) entries2 = ["."];
|
|
431971
431971
|
const queue = entries2.slice(0);
|
|
431972
431972
|
return function loop(callback) {
|
|
431973
431973
|
if (!queue.length) return callback(null);
|
|
431974
431974
|
const next = queue.shift();
|
|
431975
431975
|
const nextAbs = path122.join(cwd, next);
|
|
431976
|
-
|
|
431976
|
+
stat9.call(fs9, nextAbs, function(err, stat22) {
|
|
431977
431977
|
if (err) return callback(entries2.indexOf(next) === -1 && err.code === "ENOENT" ? null : err);
|
|
431978
431978
|
if (!stat22.isDirectory()) return callback(null, next, stat22);
|
|
431979
431979
|
fs9.readdir(nextAbs, function(err2, files) {
|
|
@@ -453346,7 +453346,7 @@ var require_lib5 = __commonJS({
|
|
|
453346
453346
|
let accum = [];
|
|
453347
453347
|
let accumBytes = 0;
|
|
453348
453348
|
let abort = false;
|
|
453349
|
-
return new Body.Promise(function(
|
|
453349
|
+
return new Body.Promise(function(resolve80, reject) {
|
|
453350
453350
|
let resTimeout;
|
|
453351
453351
|
if (_this4.timeout) {
|
|
453352
453352
|
resTimeout = setTimeout(function() {
|
|
@@ -453380,7 +453380,7 @@ var require_lib5 = __commonJS({
|
|
|
453380
453380
|
}
|
|
453381
453381
|
clearTimeout(resTimeout);
|
|
453382
453382
|
try {
|
|
453383
|
-
|
|
453383
|
+
resolve80(Buffer.concat(accum, accumBytes));
|
|
453384
453384
|
} catch (err) {
|
|
453385
453385
|
reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
|
|
453386
453386
|
}
|
|
@@ -454055,7 +454055,7 @@ var require_lib5 = __commonJS({
|
|
|
454055
454055
|
throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
|
|
454056
454056
|
}
|
|
454057
454057
|
Body.Promise = fetch5.Promise;
|
|
454058
|
-
return new fetch5.Promise(function(
|
|
454058
|
+
return new fetch5.Promise(function(resolve80, reject) {
|
|
454059
454059
|
const request5 = new Request8(url, opts);
|
|
454060
454060
|
const options = getNodeRequestOptions(request5);
|
|
454061
454061
|
const send = (options.protocol === "https:" ? https3 : http3).request;
|
|
@@ -454188,7 +454188,7 @@ var require_lib5 = __commonJS({
|
|
|
454188
454188
|
requestOpts.body = void 0;
|
|
454189
454189
|
requestOpts.headers.delete("content-length");
|
|
454190
454190
|
}
|
|
454191
|
-
|
|
454191
|
+
resolve80(fetch5(new Request8(locationURL, requestOpts)));
|
|
454192
454192
|
finalize();
|
|
454193
454193
|
return;
|
|
454194
454194
|
}
|
|
@@ -454209,7 +454209,7 @@ var require_lib5 = __commonJS({
|
|
|
454209
454209
|
const codings = headers.get("Content-Encoding");
|
|
454210
454210
|
if (!request5.compress || request5.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
454211
454211
|
response = new Response7(body, response_options);
|
|
454212
|
-
|
|
454212
|
+
resolve80(response);
|
|
454213
454213
|
return;
|
|
454214
454214
|
}
|
|
454215
454215
|
const zlibOptions = {
|
|
@@ -454219,7 +454219,7 @@ var require_lib5 = __commonJS({
|
|
|
454219
454219
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
454220
454220
|
body = body.pipe(zlib.createGunzip(zlibOptions));
|
|
454221
454221
|
response = new Response7(body, response_options);
|
|
454222
|
-
|
|
454222
|
+
resolve80(response);
|
|
454223
454223
|
return;
|
|
454224
454224
|
}
|
|
454225
454225
|
if (codings == "deflate" || codings == "x-deflate") {
|
|
@@ -454231,12 +454231,12 @@ var require_lib5 = __commonJS({
|
|
|
454231
454231
|
body = body.pipe(zlib.createInflateRaw());
|
|
454232
454232
|
}
|
|
454233
454233
|
response = new Response7(body, response_options);
|
|
454234
|
-
|
|
454234
|
+
resolve80(response);
|
|
454235
454235
|
});
|
|
454236
454236
|
raw2.on("end", function() {
|
|
454237
454237
|
if (!response) {
|
|
454238
454238
|
response = new Response7(body, response_options);
|
|
454239
|
-
|
|
454239
|
+
resolve80(response);
|
|
454240
454240
|
}
|
|
454241
454241
|
});
|
|
454242
454242
|
return;
|
|
@@ -454244,11 +454244,11 @@ var require_lib5 = __commonJS({
|
|
|
454244
454244
|
if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
|
|
454245
454245
|
body = body.pipe(zlib.createBrotliDecompress());
|
|
454246
454246
|
response = new Response7(body, response_options);
|
|
454247
|
-
|
|
454247
|
+
resolve80(response);
|
|
454248
454248
|
return;
|
|
454249
454249
|
}
|
|
454250
454250
|
response = new Response7(body, response_options);
|
|
454251
|
-
|
|
454251
|
+
resolve80(response);
|
|
454252
454252
|
});
|
|
454253
454253
|
writeToStream(req, request5);
|
|
454254
454254
|
});
|
|
@@ -458727,8 +458727,8 @@ var init_core = __esm({
|
|
|
458727
458727
|
};
|
|
458728
458728
|
APIPromise = class _APIPromise extends Promise {
|
|
458729
458729
|
constructor(responsePromise, parseResponse2 = defaultParseResponse) {
|
|
458730
|
-
super((
|
|
458731
|
-
|
|
458730
|
+
super((resolve80) => {
|
|
458731
|
+
resolve80(null);
|
|
458732
458732
|
});
|
|
458733
458733
|
this.responsePromise = responsePromise;
|
|
458734
458734
|
this.parseResponse = parseResponse2;
|
|
@@ -459296,7 +459296,7 @@ var init_core = __esm({
|
|
|
459296
459296
|
isAbsoluteURL = (url) => {
|
|
459297
459297
|
return startsWithSchemeRegexp.test(url);
|
|
459298
459298
|
};
|
|
459299
|
-
sleep4 = (ms) => new Promise((
|
|
459299
|
+
sleep4 = (ms) => new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
459300
459300
|
validatePositiveInteger = (name, n2) => {
|
|
459301
459301
|
if (typeof n2 !== "number" || !Number.isInteger(n2)) {
|
|
459302
459302
|
throw new AnthropicError(`${name} must be an integer`);
|
|
@@ -459915,12 +459915,12 @@ var init_BetaMessageStream = __esm({
|
|
|
459915
459915
|
}
|
|
459916
459916
|
return this._emit("error", new AnthropicError(String(error)));
|
|
459917
459917
|
});
|
|
459918
|
-
__classPrivateFieldSet10(this, _BetaMessageStream_connectedPromise, new Promise((
|
|
459919
|
-
__classPrivateFieldSet10(this, _BetaMessageStream_resolveConnectedPromise,
|
|
459918
|
+
__classPrivateFieldSet10(this, _BetaMessageStream_connectedPromise, new Promise((resolve80, reject) => {
|
|
459919
|
+
__classPrivateFieldSet10(this, _BetaMessageStream_resolveConnectedPromise, resolve80, "f");
|
|
459920
459920
|
__classPrivateFieldSet10(this, _BetaMessageStream_rejectConnectedPromise, reject, "f");
|
|
459921
459921
|
}), "f");
|
|
459922
|
-
__classPrivateFieldSet10(this, _BetaMessageStream_endPromise, new Promise((
|
|
459923
|
-
__classPrivateFieldSet10(this, _BetaMessageStream_resolveEndPromise,
|
|
459922
|
+
__classPrivateFieldSet10(this, _BetaMessageStream_endPromise, new Promise((resolve80, reject) => {
|
|
459923
|
+
__classPrivateFieldSet10(this, _BetaMessageStream_resolveEndPromise, resolve80, "f");
|
|
459924
459924
|
__classPrivateFieldSet10(this, _BetaMessageStream_rejectEndPromise, reject, "f");
|
|
459925
459925
|
}), "f");
|
|
459926
459926
|
__classPrivateFieldGet11(this, _BetaMessageStream_connectedPromise, "f").catch(() => {
|
|
@@ -460078,11 +460078,11 @@ var init_BetaMessageStream = __esm({
|
|
|
460078
460078
|
* const message = await stream.emitted('message') // rejects if the stream errors
|
|
460079
460079
|
*/
|
|
460080
460080
|
emitted(event) {
|
|
460081
|
-
return new Promise((
|
|
460081
|
+
return new Promise((resolve80, reject) => {
|
|
460082
460082
|
__classPrivateFieldSet10(this, _BetaMessageStream_catchingPromiseCreated, true, "f");
|
|
460083
460083
|
if (event !== "error")
|
|
460084
460084
|
this.once("error", reject);
|
|
460085
|
-
this.once(event,
|
|
460085
|
+
this.once(event, resolve80);
|
|
460086
460086
|
});
|
|
460087
460087
|
}
|
|
460088
460088
|
async done() {
|
|
@@ -460366,7 +460366,7 @@ var init_BetaMessageStream = __esm({
|
|
|
460366
460366
|
if (done) {
|
|
460367
460367
|
return { value: void 0, done: true };
|
|
460368
460368
|
}
|
|
460369
|
-
return new Promise((
|
|
460369
|
+
return new Promise((resolve80, reject) => readQueue.push({ resolve: resolve80, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
|
|
460370
460370
|
}
|
|
460371
460371
|
const chunk = pushQueue.shift();
|
|
460372
460372
|
return { value: chunk, done: false };
|
|
@@ -460661,12 +460661,12 @@ var init_MessageStream = __esm({
|
|
|
460661
460661
|
}
|
|
460662
460662
|
return this._emit("error", new AnthropicError(String(error)));
|
|
460663
460663
|
});
|
|
460664
|
-
__classPrivateFieldSet11(this, _MessageStream_connectedPromise, new Promise((
|
|
460665
|
-
__classPrivateFieldSet11(this, _MessageStream_resolveConnectedPromise,
|
|
460664
|
+
__classPrivateFieldSet11(this, _MessageStream_connectedPromise, new Promise((resolve80, reject) => {
|
|
460665
|
+
__classPrivateFieldSet11(this, _MessageStream_resolveConnectedPromise, resolve80, "f");
|
|
460666
460666
|
__classPrivateFieldSet11(this, _MessageStream_rejectConnectedPromise, reject, "f");
|
|
460667
460667
|
}), "f");
|
|
460668
|
-
__classPrivateFieldSet11(this, _MessageStream_endPromise, new Promise((
|
|
460669
|
-
__classPrivateFieldSet11(this, _MessageStream_resolveEndPromise,
|
|
460668
|
+
__classPrivateFieldSet11(this, _MessageStream_endPromise, new Promise((resolve80, reject) => {
|
|
460669
|
+
__classPrivateFieldSet11(this, _MessageStream_resolveEndPromise, resolve80, "f");
|
|
460670
460670
|
__classPrivateFieldSet11(this, _MessageStream_rejectEndPromise, reject, "f");
|
|
460671
460671
|
}), "f");
|
|
460672
460672
|
__classPrivateFieldGet12(this, _MessageStream_connectedPromise, "f").catch(() => {
|
|
@@ -460824,11 +460824,11 @@ var init_MessageStream = __esm({
|
|
|
460824
460824
|
* const message = await stream.emitted('message') // rejects if the stream errors
|
|
460825
460825
|
*/
|
|
460826
460826
|
emitted(event) {
|
|
460827
|
-
return new Promise((
|
|
460827
|
+
return new Promise((resolve80, reject) => {
|
|
460828
460828
|
__classPrivateFieldSet11(this, _MessageStream_catchingPromiseCreated, true, "f");
|
|
460829
460829
|
if (event !== "error")
|
|
460830
460830
|
this.once("error", reject);
|
|
460831
|
-
this.once(event,
|
|
460831
|
+
this.once(event, resolve80);
|
|
460832
460832
|
});
|
|
460833
460833
|
}
|
|
460834
460834
|
async done() {
|
|
@@ -461112,7 +461112,7 @@ var init_MessageStream = __esm({
|
|
|
461112
461112
|
if (done) {
|
|
461113
461113
|
return { value: void 0, done: true };
|
|
461114
461114
|
}
|
|
461115
|
-
return new Promise((
|
|
461115
|
+
return new Promise((resolve80, reject) => readQueue.push({ resolve: resolve80, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
|
|
461116
461116
|
}
|
|
461117
461117
|
const chunk = pushQueue.shift();
|
|
461118
461118
|
return { value: chunk, done: false };
|
|
@@ -462659,8 +462659,8 @@ var init_core2 = __esm({
|
|
|
462659
462659
|
init();
|
|
462660
462660
|
APIPromise2 = class _APIPromise extends Promise {
|
|
462661
462661
|
constructor(responsePromise, parseResponse2 = defaultParseResponse2) {
|
|
462662
|
-
super((
|
|
462663
|
-
|
|
462662
|
+
super((resolve80) => {
|
|
462663
|
+
resolve80(null);
|
|
462664
462664
|
});
|
|
462665
462665
|
this.responsePromise = responsePromise;
|
|
462666
462666
|
this.parseResponse = parseResponse2;
|
|
@@ -463211,7 +463211,7 @@ var init_core2 = __esm({
|
|
|
463211
463211
|
isAbsoluteURL2 = (url) => {
|
|
463212
463212
|
return startsWithSchemeRegexp2.test(url);
|
|
463213
463213
|
};
|
|
463214
|
-
sleep5 = (ms) => new Promise((
|
|
463214
|
+
sleep5 = (ms) => new Promise((resolve80) => setTimeout(resolve80, ms));
|
|
463215
463215
|
validatePositiveInteger2 = (name, n2) => {
|
|
463216
463216
|
if (typeof n2 !== "number" || !Number.isInteger(n2)) {
|
|
463217
463217
|
throw new OpenAIError(`${name} must be an integer`);
|
|
@@ -463672,12 +463672,12 @@ var init_EventStream = __esm({
|
|
|
463672
463672
|
_EventStream_errored.set(this, false);
|
|
463673
463673
|
_EventStream_aborted.set(this, false);
|
|
463674
463674
|
_EventStream_catchingPromiseCreated.set(this, false);
|
|
463675
|
-
__classPrivateFieldSet14(this, _EventStream_connectedPromise, new Promise((
|
|
463676
|
-
__classPrivateFieldSet14(this, _EventStream_resolveConnectedPromise,
|
|
463675
|
+
__classPrivateFieldSet14(this, _EventStream_connectedPromise, new Promise((resolve80, reject) => {
|
|
463676
|
+
__classPrivateFieldSet14(this, _EventStream_resolveConnectedPromise, resolve80, "f");
|
|
463677
463677
|
__classPrivateFieldSet14(this, _EventStream_rejectConnectedPromise, reject, "f");
|
|
463678
463678
|
}), "f");
|
|
463679
|
-
__classPrivateFieldSet14(this, _EventStream_endPromise, new Promise((
|
|
463680
|
-
__classPrivateFieldSet14(this, _EventStream_resolveEndPromise,
|
|
463679
|
+
__classPrivateFieldSet14(this, _EventStream_endPromise, new Promise((resolve80, reject) => {
|
|
463680
|
+
__classPrivateFieldSet14(this, _EventStream_resolveEndPromise, resolve80, "f");
|
|
463681
463681
|
__classPrivateFieldSet14(this, _EventStream_rejectEndPromise, reject, "f");
|
|
463682
463682
|
}), "f");
|
|
463683
463683
|
__classPrivateFieldGet15(this, _EventStream_connectedPromise, "f").catch(() => {
|
|
@@ -463761,11 +463761,11 @@ var init_EventStream = __esm({
|
|
|
463761
463761
|
* const message = await stream.emitted('message') // rejects if the stream errors
|
|
463762
463762
|
*/
|
|
463763
463763
|
emitted(event) {
|
|
463764
|
-
return new Promise((
|
|
463764
|
+
return new Promise((resolve80, reject) => {
|
|
463765
463765
|
__classPrivateFieldSet14(this, _EventStream_catchingPromiseCreated, true, "f");
|
|
463766
463766
|
if (event !== "error")
|
|
463767
463767
|
this.once("error", reject);
|
|
463768
|
-
this.once(event,
|
|
463768
|
+
this.once(event, resolve80);
|
|
463769
463769
|
});
|
|
463770
463770
|
}
|
|
463771
463771
|
async done() {
|
|
@@ -463907,7 +463907,7 @@ var init_AssistantStream = __esm({
|
|
|
463907
463907
|
if (done) {
|
|
463908
463908
|
return { value: void 0, done: true };
|
|
463909
463909
|
}
|
|
463910
|
-
return new Promise((
|
|
463910
|
+
return new Promise((resolve80, reject) => readQueue.push({ resolve: resolve80, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
|
|
463911
463911
|
}
|
|
463912
463912
|
const chunk = pushQueue.shift();
|
|
463913
463913
|
return { value: chunk, done: false };
|
|
@@ -465650,7 +465650,7 @@ var init_ChatCompletionStream = __esm({
|
|
|
465650
465650
|
if (done) {
|
|
465651
465651
|
return { value: void 0, done: true };
|
|
465652
465652
|
}
|
|
465653
|
-
return new Promise((
|
|
465653
|
+
return new Promise((resolve80, reject) => readQueue.push({ resolve: resolve80, reject })).then((chunk2) => chunk2 ? { value: chunk2, done: false } : { value: void 0, done: true });
|
|
465654
465654
|
}
|
|
465655
465655
|
const chunk = pushQueue.shift();
|
|
465656
465656
|
return { value: chunk, done: false };
|
|
@@ -467503,7 +467503,7 @@ var init_ResponseStream = __esm({
|
|
|
467503
467503
|
if (done) {
|
|
467504
467504
|
return { value: void 0, done: true };
|
|
467505
467505
|
}
|
|
467506
|
-
return new Promise((
|
|
467506
|
+
return new Promise((resolve80, reject) => readQueue.push({ resolve: resolve80, reject })).then((event2) => event2 ? { value: event2, done: false } : { value: void 0, done: true });
|
|
467507
467507
|
}
|
|
467508
467508
|
const event = pushQueue.shift();
|
|
467509
467509
|
return { value: event, done: false };
|
|
@@ -471912,6 +471912,9 @@ var init_storyboard_edit = __esm({
|
|
|
471912
471912
|
import { existsSync as existsSync33 } from "node:fs";
|
|
471913
471913
|
import { readFile as readFile17 } from "node:fs/promises";
|
|
471914
471914
|
import { dirname as dirname17, join as join31, resolve as resolve29 } from "node:path";
|
|
471915
|
+
function backdropCostUsd(quality) {
|
|
471916
|
+
return quality === "hd" ? 0.2 : 0.05;
|
|
471917
|
+
}
|
|
471915
471918
|
async function createBuildPlan(opts) {
|
|
471916
471919
|
const projectDir = resolve29(opts.projectDir);
|
|
471917
471920
|
loadPlanEnv(projectDir);
|
|
@@ -472067,7 +472070,7 @@ async function createBuildPlan(opts) {
|
|
|
472067
472070
|
reference: backdropReference,
|
|
472068
472071
|
projectDir,
|
|
472069
472072
|
force: opts.force,
|
|
472070
|
-
cost:
|
|
472073
|
+
cost: backdropCostUsd(imageQuality),
|
|
472071
472074
|
active: includeAssets
|
|
472072
472075
|
}) : null;
|
|
472073
472076
|
const video = videoCue && !opts.skipVideo ? assetPlan({
|
|
@@ -472543,7 +472546,7 @@ function loadPlanEnv(projectDir) {
|
|
|
472543
472546
|
dir = dirname17(dir);
|
|
472544
472547
|
}
|
|
472545
472548
|
}
|
|
472546
|
-
var import_dotenv2,
|
|
472549
|
+
var import_dotenv2, VIDEO_COST_USD, MUSIC_COST_USD, ELEVENLABS_NARRATION_COST_USD, COMPOSE_COST_USD, SUPPORTED_BUILD_IMAGE_PROVIDERS;
|
|
472547
472550
|
var init_build_plan = __esm({
|
|
472548
472551
|
"../cli/src/commands/_shared/build-plan.ts"() {
|
|
472549
472552
|
"use strict";
|
|
@@ -472558,7 +472561,6 @@ var init_build_plan = __esm({
|
|
|
472558
472561
|
init_storyboard_parse();
|
|
472559
472562
|
init_project_config();
|
|
472560
472563
|
init_storyboard_edit();
|
|
472561
|
-
BACKDROP_COST_USD = 3;
|
|
472562
472564
|
VIDEO_COST_USD = 5;
|
|
472563
472565
|
MUSIC_COST_USD = 0.5;
|
|
472564
472566
|
ELEVENLABS_NARRATION_COST_USD = 0.05;
|
|
@@ -473079,7 +473081,10 @@ async function executeSceneBuild(opts) {
|
|
|
473079
473081
|
(beat) => beat.narrationStatus === "failed" || beat.backdropStatus === "failed" || beat.videoStatus === "failed" || beat.musicStatus === "failed"
|
|
473080
473082
|
);
|
|
473081
473083
|
stageReports.assets.status = assetFailed ? "failed" : pendingJobs.length > 0 ? "pending-jobs" : "done";
|
|
473082
|
-
stageReports.assets.costUsd = estimateActualAssetCost(
|
|
473084
|
+
stageReports.assets.costUsd = estimateActualAssetCost(
|
|
473085
|
+
beatOutcomes,
|
|
473086
|
+
opts.imageQuality ?? "hd"
|
|
473087
|
+
);
|
|
473083
473088
|
stageReports.assets.retryWith = pendingJobs.map(
|
|
473084
473089
|
(job) => `vibe status job ${job.id} --project ${projectDir} --json`
|
|
473085
473090
|
);
|
|
@@ -474262,11 +474267,11 @@ function shouldRunStage(selected, stage) {
|
|
|
474262
474267
|
if (selected === "all") return true;
|
|
474263
474268
|
return selected === stage;
|
|
474264
474269
|
}
|
|
474265
|
-
function estimateActualAssetCost(outcomes) {
|
|
474270
|
+
function estimateActualAssetCost(outcomes, imageQuality) {
|
|
474266
474271
|
let cost = 0;
|
|
474267
474272
|
for (const outcome of outcomes) {
|
|
474268
474273
|
if (outcome.narrationStatus === "generated") cost += 0.05;
|
|
474269
|
-
if (outcome.backdropStatus === "generated") cost +=
|
|
474274
|
+
if (outcome.backdropStatus === "generated") cost += backdropCostUsd(imageQuality);
|
|
474270
474275
|
if (outcome.videoStatus === "generated" || outcome.videoStatus === "pending") cost += 5;
|
|
474271
474276
|
if (outcome.musicStatus === "generated" || outcome.musicStatus === "pending") cost += 0.5;
|
|
474272
474277
|
}
|
|
@@ -481797,10 +481802,10 @@ async function prompt2(question) {
|
|
|
481797
481802
|
input: input3,
|
|
481798
481803
|
output: process.stdout
|
|
481799
481804
|
});
|
|
481800
|
-
return new Promise((
|
|
481805
|
+
return new Promise((resolve80) => {
|
|
481801
481806
|
rl.question(question, (answer) => {
|
|
481802
481807
|
rl.close();
|
|
481803
|
-
|
|
481808
|
+
resolve80(answer);
|
|
481804
481809
|
});
|
|
481805
481810
|
});
|
|
481806
481811
|
}
|
|
@@ -494959,9 +494964,146 @@ var timelineTools = [
|
|
|
494959
494964
|
|
|
494960
494965
|
// ../cli/src/tools/manifest/project.ts
|
|
494961
494966
|
import { z as z11 } from "zod";
|
|
494962
|
-
import { resolve as
|
|
494967
|
+
import { resolve as resolve73 } from "node:path";
|
|
494963
494968
|
import { writeFile as writeFile51 } from "node:fs/promises";
|
|
494964
494969
|
init_engine();
|
|
494970
|
+
|
|
494971
|
+
// ../cli/src/commands/_shared/project-list.ts
|
|
494972
|
+
init_storyboard_parse();
|
|
494973
|
+
import { readdir as readdir8, readFile as readFile42, stat as stat7 } from "node:fs/promises";
|
|
494974
|
+
import { existsSync as existsSync65 } from "node:fs";
|
|
494975
|
+
import { join as join43, resolve as resolve71 } from "node:path";
|
|
494976
|
+
async function executeProjectList(opts = {}) {
|
|
494977
|
+
const workspaceDir = resolve71(opts.workspaceDir ?? ".");
|
|
494978
|
+
if (!existsSync65(workspaceDir)) {
|
|
494979
|
+
return {
|
|
494980
|
+
success: false,
|
|
494981
|
+
workspaceDir,
|
|
494982
|
+
projects: [],
|
|
494983
|
+
archivedCount: 0,
|
|
494984
|
+
error: `Workspace directory not found: ${workspaceDir}`
|
|
494985
|
+
};
|
|
494986
|
+
}
|
|
494987
|
+
const entries2 = await readdir8(workspaceDir, { withFileTypes: true });
|
|
494988
|
+
const projects = [];
|
|
494989
|
+
let archivedCount = 0;
|
|
494990
|
+
for (const entry of entries2) {
|
|
494991
|
+
if (!entry.isDirectory()) continue;
|
|
494992
|
+
if (entry.name === "node_modules") continue;
|
|
494993
|
+
if (entry.name.startsWith(".")) continue;
|
|
494994
|
+
if (entry.name.startsWith("_")) {
|
|
494995
|
+
archivedCount += await countProjects(join43(workspaceDir, entry.name));
|
|
494996
|
+
continue;
|
|
494997
|
+
}
|
|
494998
|
+
const projectDir = join43(workspaceDir, entry.name);
|
|
494999
|
+
if (!existsSync65(join43(projectDir, "STORYBOARD.md"))) continue;
|
|
495000
|
+
projects.push(await describeProject(entry.name, projectDir));
|
|
495001
|
+
}
|
|
495002
|
+
projects.sort((a2, b2) => b2.updatedAt.localeCompare(a2.updatedAt));
|
|
495003
|
+
return { success: true, workspaceDir, projects, archivedCount };
|
|
495004
|
+
}
|
|
495005
|
+
async function countProjects(dir) {
|
|
495006
|
+
try {
|
|
495007
|
+
const entries2 = await readdir8(dir, { withFileTypes: true });
|
|
495008
|
+
return entries2.filter(
|
|
495009
|
+
(e2) => e2.isDirectory() && existsSync65(join43(dir, e2.name, "STORYBOARD.md"))
|
|
495010
|
+
).length;
|
|
495011
|
+
} catch {
|
|
495012
|
+
return 0;
|
|
495013
|
+
}
|
|
495014
|
+
}
|
|
495015
|
+
async function describeProject(name, projectDir) {
|
|
495016
|
+
let beats = 0;
|
|
495017
|
+
let storyboardDurationSec = 0;
|
|
495018
|
+
const timestamps = [];
|
|
495019
|
+
try {
|
|
495020
|
+
const storyboardPath = join43(projectDir, "STORYBOARD.md");
|
|
495021
|
+
const parsed = parseStoryboard(await readFile42(storyboardPath, "utf-8"));
|
|
495022
|
+
beats = parsed.beats.length;
|
|
495023
|
+
storyboardDurationSec = Number(
|
|
495024
|
+
parsed.beats.reduce((sum, beat) => sum + (beat.duration ?? 0), 0).toFixed(2)
|
|
495025
|
+
);
|
|
495026
|
+
timestamps.push((await stat7(storyboardPath)).mtimeMs);
|
|
495027
|
+
} catch {
|
|
495028
|
+
}
|
|
495029
|
+
let buildStatus;
|
|
495030
|
+
let buildUpdatedAt;
|
|
495031
|
+
try {
|
|
495032
|
+
const reportPath = join43(projectDir, "build-report.json");
|
|
495033
|
+
const report = JSON.parse(await readFile42(reportPath, "utf-8"));
|
|
495034
|
+
buildStatus = report.status ?? report.phase;
|
|
495035
|
+
buildUpdatedAt = report.updatedAt;
|
|
495036
|
+
timestamps.push((await stat7(reportPath)).mtimeMs);
|
|
495037
|
+
} catch {
|
|
495038
|
+
}
|
|
495039
|
+
let latestRender;
|
|
495040
|
+
try {
|
|
495041
|
+
const rendersDir = join43(projectDir, "renders");
|
|
495042
|
+
const files = await readdir8(rendersDir);
|
|
495043
|
+
let newest;
|
|
495044
|
+
for (const file of files) {
|
|
495045
|
+
if (!/\.(mp4|webm|mov)$/i.test(file)) continue;
|
|
495046
|
+
const { mtimeMs } = await stat7(join43(rendersDir, file));
|
|
495047
|
+
if (!newest || mtimeMs > newest.mtimeMs) newest = { file, mtimeMs };
|
|
495048
|
+
}
|
|
495049
|
+
if (newest) {
|
|
495050
|
+
latestRender = { file: newest.file, modifiedAt: new Date(newest.mtimeMs).toISOString() };
|
|
495051
|
+
timestamps.push(newest.mtimeMs);
|
|
495052
|
+
}
|
|
495053
|
+
} catch {
|
|
495054
|
+
}
|
|
495055
|
+
const updatedAt = new Date(
|
|
495056
|
+
timestamps.length > 0 ? Math.max(...timestamps) : (await stat7(projectDir)).mtimeMs
|
|
495057
|
+
).toISOString();
|
|
495058
|
+
return {
|
|
495059
|
+
name,
|
|
495060
|
+
path: projectDir,
|
|
495061
|
+
beats,
|
|
495062
|
+
storyboardDurationSec,
|
|
495063
|
+
...buildStatus ? { buildStatus } : {},
|
|
495064
|
+
...buildUpdatedAt ? { buildUpdatedAt } : {},
|
|
495065
|
+
...latestRender ? { latestRender } : {},
|
|
495066
|
+
updatedAt
|
|
495067
|
+
};
|
|
495068
|
+
}
|
|
495069
|
+
|
|
495070
|
+
// ../cli/src/tools/manifest/project.ts
|
|
495071
|
+
var projectListTool = defineTool({
|
|
495072
|
+
name: "project_list",
|
|
495073
|
+
category: "project",
|
|
495074
|
+
cost: "free",
|
|
495075
|
+
title: "List Video Projects",
|
|
495076
|
+
annotations: { readOnly: true, openWorld: false },
|
|
495077
|
+
description: `List every VibeFrame video project in the workspace (directories with a STORYBOARD.md), newest activity first: beat count, storyboard duration, last build status, and the latest render. Directories starting with '_' (e.g. _archive) are skipped and reported as an archived count \u2014 move a project into _archive/ to retire it. Use this to answer "what projects do I have?" before init/build/render.`,
|
|
495078
|
+
schema: z11.object({
|
|
495079
|
+
dir: z11.string().optional().describe(
|
|
495080
|
+
"Workspace directory to scan. Defaults to the surface's cwd; in MCP hosts this is the configured server workspace."
|
|
495081
|
+
)
|
|
495082
|
+
}),
|
|
495083
|
+
async execute(args, ctx) {
|
|
495084
|
+
const result = await executeProjectList({
|
|
495085
|
+
workspaceDir: args.dir ? resolve73(ctx.workingDirectory, args.dir) : ctx.workingDirectory
|
|
495086
|
+
});
|
|
495087
|
+
if (!result.success) {
|
|
495088
|
+
return { success: false, error: result.error ?? "project list failed" };
|
|
495089
|
+
}
|
|
495090
|
+
return {
|
|
495091
|
+
success: true,
|
|
495092
|
+
data: {
|
|
495093
|
+
workspaceDir: result.workspaceDir,
|
|
495094
|
+
count: result.projects.length,
|
|
495095
|
+
archivedCount: result.archivedCount,
|
|
495096
|
+
projects: result.projects
|
|
495097
|
+
},
|
|
495098
|
+
humanLines: [
|
|
495099
|
+
`\u{1F4C1} ${result.projects.length} project(s) in ${result.workspaceDir}` + (result.archivedCount > 0 ? ` (+${result.archivedCount} archived)` : ""),
|
|
495100
|
+
...result.projects.map(
|
|
495101
|
+
(p2) => ` \u2022 ${p2.name} \u2014 ${p2.beats} beat(s), ~${p2.storyboardDurationSec}s` + (p2.buildStatus ? `, build: ${p2.buildStatus}` : "") + (p2.latestRender ? `, latest render: ${p2.latestRender.file}` : "") + ` (updated ${p2.updatedAt})`
|
|
495102
|
+
)
|
|
495103
|
+
]
|
|
495104
|
+
};
|
|
495105
|
+
}
|
|
495106
|
+
});
|
|
494965
495107
|
var projectCreateTool = defineTool({
|
|
494966
495108
|
name: "project_create",
|
|
494967
495109
|
category: "project",
|
|
@@ -494977,7 +495119,7 @@ var projectCreateTool = defineTool({
|
|
|
494977
495119
|
fps: z11.number().optional().describe("Frames per second (default: 30)")
|
|
494978
495120
|
}),
|
|
494979
495121
|
async execute(args, ctx) {
|
|
494980
|
-
const outputPath =
|
|
495122
|
+
const outputPath = resolve73(ctx.workingDirectory, args.outputPath ?? `${args.name}.vibe.json`);
|
|
494981
495123
|
const project = new Project(args.name);
|
|
494982
495124
|
if (args.fps) project.setFrameRate(args.fps);
|
|
494983
495125
|
await writeFile51(outputPath, JSON.stringify(project.toJSON(), null, 2), "utf-8");
|
|
@@ -495018,13 +495160,14 @@ var projectInfoTool = defineTool({
|
|
|
495018
495160
|
}
|
|
495019
495161
|
});
|
|
495020
495162
|
var projectTools = [
|
|
495163
|
+
projectListTool,
|
|
495021
495164
|
projectCreateTool,
|
|
495022
495165
|
projectInfoTool
|
|
495023
495166
|
];
|
|
495024
495167
|
|
|
495025
495168
|
// ../cli/src/tools/manifest/export.ts
|
|
495026
495169
|
import { z as z12 } from "zod";
|
|
495027
|
-
import { resolve as
|
|
495170
|
+
import { resolve as resolve75 } from "node:path";
|
|
495028
495171
|
|
|
495029
495172
|
// ../cli/src/commands/export.ts
|
|
495030
495173
|
init_esm();
|
|
@@ -495035,8 +495178,8 @@ init_exec_safe();
|
|
|
495035
495178
|
init_output();
|
|
495036
495179
|
init_validate();
|
|
495037
495180
|
init_project_resolver();
|
|
495038
|
-
import { readFile as
|
|
495039
|
-
import { resolve as
|
|
495181
|
+
import { readFile as readFile43, access as access6 } from "node:fs/promises";
|
|
495182
|
+
import { resolve as resolve74, basename as basename20 } from "node:path";
|
|
495040
495183
|
import { spawn as spawn9 } from "node:child_process";
|
|
495041
495184
|
function timelineBaseName(path14) {
|
|
495042
495185
|
const name = basename20(path14);
|
|
@@ -495112,7 +495255,7 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
495112
495255
|
};
|
|
495113
495256
|
}
|
|
495114
495257
|
const filePath = await resolveTimelineFile(projectPath);
|
|
495115
|
-
const content = await
|
|
495258
|
+
const content = await readFile43(filePath, "utf-8");
|
|
495116
495259
|
const data = JSON.parse(content);
|
|
495117
495260
|
const project = Project.fromJSON(data);
|
|
495118
495261
|
const summary = project.getSummary();
|
|
@@ -495122,7 +495265,7 @@ async function runExport(projectPath, outputPath, options = {}) {
|
|
|
495122
495265
|
message: "Project has no clips to export"
|
|
495123
495266
|
};
|
|
495124
495267
|
}
|
|
495125
|
-
const finalOutputPath =
|
|
495268
|
+
const finalOutputPath = resolve74(process.cwd(), outputPath);
|
|
495126
495269
|
const basePresetSettings = getPresetSettings(preset, summary.aspectRatio);
|
|
495127
495270
|
const presetSettings = applyCustomOverrides(basePresetSettings, { bitrate, fps, resolution, codec });
|
|
495128
495271
|
const clips = project.getClips().sort((a2, b2) => a2.startTime - b2.startTime);
|
|
@@ -495236,7 +495379,7 @@ Run 'vibe schema export' for structured parameter info.`).action(async (projectP
|
|
|
495236
495379
|
}
|
|
495237
495380
|
spinner2.text = "Loading project...";
|
|
495238
495381
|
const filePath = await resolveTimelineFile(projectPath);
|
|
495239
|
-
const content = await
|
|
495382
|
+
const content = await readFile43(filePath, "utf-8");
|
|
495240
495383
|
const data = JSON.parse(content);
|
|
495241
495384
|
const project = Project.fromJSON(data);
|
|
495242
495385
|
const summary = project.getSummary();
|
|
@@ -495244,7 +495387,7 @@ Run 'vibe schema export' for structured parameter info.`).action(async (projectP
|
|
|
495244
495387
|
spinner2.fail("Project has no clips to export");
|
|
495245
495388
|
exitWithError(usageError("Project has no clips to export"));
|
|
495246
495389
|
}
|
|
495247
|
-
const outputPath = options.output ?
|
|
495390
|
+
const outputPath = options.output ? resolve74(process.cwd(), options.output) : resolve74(
|
|
495248
495391
|
process.cwd(),
|
|
495249
495392
|
`${timelineBaseName(projectPath)}.${options.format}`
|
|
495250
495393
|
);
|
|
@@ -495674,7 +495817,7 @@ function buildFFmpegArgs(clips, sources, presetSettings, outputPath, options, so
|
|
|
495674
495817
|
return args;
|
|
495675
495818
|
}
|
|
495676
495819
|
function runFFmpegProcess(ffmpegPath, args, onProgress) {
|
|
495677
|
-
return new Promise((
|
|
495820
|
+
return new Promise((resolve80, reject) => {
|
|
495678
495821
|
const ffmpeg = spawn9(ffmpegPath, args, {
|
|
495679
495822
|
stdio: ["pipe", "pipe", "pipe"]
|
|
495680
495823
|
});
|
|
@@ -495698,7 +495841,7 @@ function runFFmpegProcess(ffmpegPath, args, onProgress) {
|
|
|
495698
495841
|
});
|
|
495699
495842
|
ffmpeg.on("close", (code) => {
|
|
495700
495843
|
if (code === 0) {
|
|
495701
|
-
|
|
495844
|
+
resolve80();
|
|
495702
495845
|
} else {
|
|
495703
495846
|
const errorMatch = stderr.match(/Error.*$/m);
|
|
495704
495847
|
const errorMsg = errorMatch ? errorMatch[0] : `FFmpeg exited with code ${code}`;
|
|
@@ -495834,17 +495977,17 @@ function getPresetSettings(preset, aspectRatio2) {
|
|
|
495834
495977
|
}
|
|
495835
495978
|
async function runHyperframesExport(projectPath, options, spinner2, startedAt) {
|
|
495836
495979
|
spinner2.text = "Loading project...";
|
|
495837
|
-
const { readFile:
|
|
495838
|
-
const { resolve:
|
|
495980
|
+
const { readFile: readFile46 } = await import("node:fs/promises");
|
|
495981
|
+
const { resolve: resolve80 } = await import("node:path");
|
|
495839
495982
|
const { Project: Project2 } = await Promise.resolve().then(() => (init_engine(), engine_exports));
|
|
495840
495983
|
const { createHyperframesBackend: createHyperframesBackend2 } = await Promise.resolve().then(() => (init_hyperframes(), hyperframes_exports));
|
|
495841
495984
|
const { exitWithError: exitWithError2, generalError: generalError2, outputSuccess: outputSuccess2 } = await Promise.resolve().then(() => (init_output(), output_exports));
|
|
495842
495985
|
const chalk2 = (await Promise.resolve().then(() => (init_source(), source_exports))).default;
|
|
495843
495986
|
const filePath = await resolveTimelineFile(projectPath);
|
|
495844
|
-
const content = await
|
|
495987
|
+
const content = await readFile46(filePath, "utf-8");
|
|
495845
495988
|
const project = Project2.fromJSON(JSON.parse(content));
|
|
495846
495989
|
const state = project.getState();
|
|
495847
|
-
const outputPath = options.output ?
|
|
495990
|
+
const outputPath = options.output ? resolve80(process.cwd(), options.output) : resolve80(process.cwd(), `${timelineBaseName(projectPath)}.${options.format ?? "mp4"}`);
|
|
495848
495991
|
const quality = ["draft", "standard", "high"].includes(options.preset ?? "") ? options.preset : "standard";
|
|
495849
495992
|
const backend = createHyperframesBackend2();
|
|
495850
495993
|
spinner2.text = "Rendering with Hyperframes...";
|
|
@@ -495892,8 +496035,8 @@ var exportVideoTool = defineTool({
|
|
|
495892
496035
|
overwrite: z12.boolean().optional().describe("Overwrite existing output file (default: false)")
|
|
495893
496036
|
}),
|
|
495894
496037
|
async execute(args, ctx) {
|
|
495895
|
-
const projectPath =
|
|
495896
|
-
const outputPath =
|
|
496038
|
+
const projectPath = resolve75(ctx.workingDirectory, args.projectPath);
|
|
496039
|
+
const outputPath = resolve75(ctx.workingDirectory, args.outputPath);
|
|
495897
496040
|
const result = await runExport(projectPath, outputPath, {
|
|
495898
496041
|
preset: args.preset,
|
|
495899
496042
|
format: args.format,
|
|
@@ -495910,8 +496053,8 @@ var exportVideoTool = defineTool({
|
|
|
495910
496053
|
var exportTools = [exportVideoTool];
|
|
495911
496054
|
|
|
495912
496055
|
// ../cli/src/tools/manifest/agent-only.ts
|
|
495913
|
-
import { readFile as
|
|
495914
|
-
import { resolve as
|
|
496056
|
+
import { readFile as readFile44, writeFile as writeFile52, readdir as readdir9, stat as stat8, access as access7, unlink as unlink7 } from "node:fs/promises";
|
|
496057
|
+
import { resolve as resolve76, join as join44, basename as basename21, extname as extname14 } from "node:path";
|
|
495915
496058
|
import { z as z13 } from "zod";
|
|
495916
496059
|
init_engine();
|
|
495917
496060
|
init_exec_safe();
|
|
@@ -495985,13 +496128,13 @@ var fsListTool = defineTool({
|
|
|
495985
496128
|
async execute(args, ctx) {
|
|
495986
496129
|
const dirPath = args.path ?? ".";
|
|
495987
496130
|
try {
|
|
495988
|
-
const absPath =
|
|
495989
|
-
const entries2 = await
|
|
496131
|
+
const absPath = resolve76(ctx.workingDirectory, dirPath);
|
|
496132
|
+
const entries2 = await readdir9(absPath, { withFileTypes: true });
|
|
495990
496133
|
const results = [];
|
|
495991
496134
|
for (const entry of entries2) {
|
|
495992
496135
|
if (args.pattern && !matchPattern(entry.name, args.pattern)) continue;
|
|
495993
|
-
const fullPath =
|
|
495994
|
-
const stats = await
|
|
496136
|
+
const fullPath = join44(absPath, entry.name);
|
|
496137
|
+
const stats = await stat8(fullPath);
|
|
495995
496138
|
if (entry.isDirectory()) {
|
|
495996
496139
|
results.push(`[DIR] ${entry.name}/`);
|
|
495997
496140
|
} else {
|
|
@@ -496018,8 +496161,8 @@ var fsReadTool = defineTool({
|
|
|
496018
496161
|
}),
|
|
496019
496162
|
async execute(args, ctx) {
|
|
496020
496163
|
try {
|
|
496021
|
-
const absPath =
|
|
496022
|
-
const content = await
|
|
496164
|
+
const absPath = resolve76(ctx.workingDirectory, args.path);
|
|
496165
|
+
const content = await readFile44(absPath, "utf-8");
|
|
496023
496166
|
const maxLength = 4e3;
|
|
496024
496167
|
const truncated = content.length > maxLength;
|
|
496025
496168
|
const output3 = truncated ? content.substring(0, maxLength) + "\n... (truncated)" : content;
|
|
@@ -496043,7 +496186,7 @@ var fsWriteTool = defineTool({
|
|
|
496043
496186
|
}),
|
|
496044
496187
|
async execute(args, ctx) {
|
|
496045
496188
|
try {
|
|
496046
|
-
const absPath =
|
|
496189
|
+
const absPath = resolve76(ctx.workingDirectory, args.path);
|
|
496047
496190
|
await writeFile52(absPath, args.content, "utf-8");
|
|
496048
496191
|
return { success: true, data: { bytes: args.content.length }, humanLines: [`File written: ${args.path} (${formatSize(args.content.length)})`] };
|
|
496049
496192
|
} catch (error) {
|
|
@@ -496063,10 +496206,10 @@ var fsExistsTool = defineTool({
|
|
|
496063
496206
|
path: z13.string().describe("Path to check")
|
|
496064
496207
|
}),
|
|
496065
496208
|
async execute(args, ctx) {
|
|
496066
|
-
const absPath =
|
|
496209
|
+
const absPath = resolve76(ctx.workingDirectory, args.path);
|
|
496067
496210
|
try {
|
|
496068
496211
|
await access7(absPath);
|
|
496069
|
-
const stats = await
|
|
496212
|
+
const stats = await stat8(absPath);
|
|
496070
496213
|
const type = stats.isDirectory() ? "directory" : "file";
|
|
496071
496214
|
return { success: true, data: { exists: true, type }, humanLines: [`${type} exists: ${args.path}`] };
|
|
496072
496215
|
} catch {
|
|
@@ -496091,19 +496234,19 @@ var batchImportTool = defineTool({
|
|
|
496091
496234
|
}),
|
|
496092
496235
|
async execute(args, ctx) {
|
|
496093
496236
|
try {
|
|
496094
|
-
const filePath =
|
|
496095
|
-
const content = await
|
|
496237
|
+
const filePath = resolve76(ctx.workingDirectory, args.project);
|
|
496238
|
+
const content = await readFile44(filePath, "utf-8");
|
|
496096
496239
|
const data = JSON.parse(content);
|
|
496097
496240
|
const project = Project.fromJSON(data);
|
|
496098
|
-
const dirPath =
|
|
496241
|
+
const dirPath = resolve76(ctx.workingDirectory, args.directory);
|
|
496099
496242
|
const filterExts = args.filter ? args.filter.split(",").map((e2) => e2.trim().toLowerCase()) : null;
|
|
496100
496243
|
const imageDuration = args.imageDuration ?? 5;
|
|
496101
496244
|
const recursive = args.recursive ?? false;
|
|
496102
496245
|
const mediaFiles = [];
|
|
496103
496246
|
const scanDir = async (dir) => {
|
|
496104
|
-
const entries2 = await
|
|
496247
|
+
const entries2 = await readdir9(dir, { withFileTypes: true });
|
|
496105
496248
|
for (const entry of entries2) {
|
|
496106
|
-
const entryPath =
|
|
496249
|
+
const entryPath = join44(dir, entry.name);
|
|
496107
496250
|
if (entry.isDirectory() && recursive) {
|
|
496108
496251
|
await scanDir(entryPath);
|
|
496109
496252
|
} else if (entry.isFile()) {
|
|
@@ -496163,8 +496306,8 @@ var batchConcatTool = defineTool({
|
|
|
496163
496306
|
}),
|
|
496164
496307
|
async execute(args, ctx) {
|
|
496165
496308
|
try {
|
|
496166
|
-
const filePath =
|
|
496167
|
-
const content = await
|
|
496309
|
+
const filePath = resolve76(ctx.workingDirectory, args.project);
|
|
496310
|
+
const content = await readFile44(filePath, "utf-8");
|
|
496168
496311
|
const data = JSON.parse(content);
|
|
496169
496312
|
const project = Project.fromJSON(data);
|
|
496170
496313
|
const sourceIds = args.sourceIds ?? [];
|
|
@@ -496234,8 +496377,8 @@ var batchApplyEffectTool = defineTool({
|
|
|
496234
496377
|
}),
|
|
496235
496378
|
async execute(args, ctx) {
|
|
496236
496379
|
try {
|
|
496237
|
-
const filePath =
|
|
496238
|
-
const content = await
|
|
496380
|
+
const filePath = resolve76(ctx.workingDirectory, args.project);
|
|
496381
|
+
const content = await readFile44(filePath, "utf-8");
|
|
496239
496382
|
const data = JSON.parse(content);
|
|
496240
496383
|
const project = Project.fromJSON(data);
|
|
496241
496384
|
const clipIds = args.clipIds ?? [];
|
|
@@ -496290,7 +496433,7 @@ var timelineClearTool = defineTool({
|
|
|
496290
496433
|
async execute(args, ctx) {
|
|
496291
496434
|
try {
|
|
496292
496435
|
const filePath = await resolveTimelineFile(args.project, ctx.workingDirectory);
|
|
496293
|
-
const content = await
|
|
496436
|
+
const content = await readFile44(filePath, "utf-8");
|
|
496294
496437
|
const data = JSON.parse(content);
|
|
496295
496438
|
const project = Project.fromJSON(data);
|
|
496296
496439
|
const what = args.what ?? "clips";
|
|
@@ -496367,7 +496510,7 @@ var projectSetTool = defineTool({
|
|
|
496367
496510
|
async execute(args, ctx) {
|
|
496368
496511
|
try {
|
|
496369
496512
|
const filePath = await resolveTimelineFile(args.projectPath, ctx.workingDirectory);
|
|
496370
|
-
const content = await
|
|
496513
|
+
const content = await readFile44(filePath, "utf-8");
|
|
496371
496514
|
const data = JSON.parse(content);
|
|
496372
496515
|
const project = Project.fromJSON(data);
|
|
496373
496516
|
const updates = [];
|
|
@@ -496526,7 +496669,7 @@ var mediaInfoTool = defineTool({
|
|
|
496526
496669
|
}),
|
|
496527
496670
|
async execute(args, ctx) {
|
|
496528
496671
|
try {
|
|
496529
|
-
const absPath =
|
|
496672
|
+
const absPath = resolve76(ctx.workingDirectory, args.path);
|
|
496530
496673
|
const { stdout } = await execSafe(
|
|
496531
496674
|
"ffprobe",
|
|
496532
496675
|
["-v", "quiet", "-print_format", "json", "-show_format", "-show_streams", absPath],
|
|
@@ -496615,10 +496758,10 @@ var mediaCompressTool = defineTool({
|
|
|
496615
496758
|
}),
|
|
496616
496759
|
async execute(args, ctx) {
|
|
496617
496760
|
try {
|
|
496618
|
-
const absInput =
|
|
496761
|
+
const absInput = resolve76(ctx.workingDirectory, args.input);
|
|
496619
496762
|
const ext = args.input.split(".").pop() || "mp4";
|
|
496620
496763
|
const baseName = args.input.replace(/\.[^/.]+$/, "");
|
|
496621
|
-
const outputPath = args.output ?
|
|
496764
|
+
const outputPath = args.output ? resolve76(ctx.workingDirectory, args.output) : resolve76(ctx.workingDirectory, `${baseName}-compressed.${ext}`);
|
|
496622
496765
|
const crfValues = { low: 28, medium: 23, high: 18 };
|
|
496623
496766
|
const crf = crfValues[args.quality ?? "medium"];
|
|
496624
496767
|
await execSafe(
|
|
@@ -496641,8 +496784,8 @@ var mediaCompressTool = defineTool({
|
|
|
496641
496784
|
],
|
|
496642
496785
|
{ maxBuffer: 50 * 1024 * 1024 }
|
|
496643
496786
|
);
|
|
496644
|
-
const inputBuf = await
|
|
496645
|
-
const outputBuf = await
|
|
496787
|
+
const inputBuf = await readFile44(absInput);
|
|
496788
|
+
const outputBuf = await readFile44(outputPath);
|
|
496646
496789
|
const inputSize = inputBuf.length;
|
|
496647
496790
|
const outputSize = outputBuf.length;
|
|
496648
496791
|
const reduction = (inputSize - outputSize) / inputSize * 100;
|
|
@@ -496678,8 +496821,8 @@ var mediaConvertTool = defineTool({
|
|
|
496678
496821
|
}),
|
|
496679
496822
|
async execute(args, ctx) {
|
|
496680
496823
|
try {
|
|
496681
|
-
const absInput =
|
|
496682
|
-
const absOutput =
|
|
496824
|
+
const absInput = resolve76(ctx.workingDirectory, args.input);
|
|
496825
|
+
const absOutput = resolve76(ctx.workingDirectory, args.output);
|
|
496683
496826
|
const codecMap = {
|
|
496684
496827
|
h264: "libx264",
|
|
496685
496828
|
h265: "libx265",
|
|
@@ -496732,11 +496875,11 @@ var mediaConcatTool = defineTool({
|
|
|
496732
496875
|
};
|
|
496733
496876
|
}
|
|
496734
496877
|
try {
|
|
496735
|
-
const absOutput =
|
|
496878
|
+
const absOutput = resolve76(ctx.workingDirectory, args.output);
|
|
496736
496879
|
if (args.reencode) {
|
|
496737
496880
|
const ffmpegArgs = [];
|
|
496738
496881
|
for (const i2 of args.inputs) {
|
|
496739
|
-
ffmpegArgs.push("-i",
|
|
496882
|
+
ffmpegArgs.push("-i", resolve76(ctx.workingDirectory, i2));
|
|
496740
496883
|
}
|
|
496741
496884
|
const filterComplex = args.inputs.map((_2, i2) => `[${i2}:v][${i2}:a]`).join("");
|
|
496742
496885
|
ffmpegArgs.push(
|
|
@@ -496751,8 +496894,8 @@ var mediaConcatTool = defineTool({
|
|
|
496751
496894
|
);
|
|
496752
496895
|
await execSafe("ffmpeg", ffmpegArgs, { maxBuffer: 100 * 1024 * 1024 });
|
|
496753
496896
|
} else {
|
|
496754
|
-
const tempList =
|
|
496755
|
-
const listContent = args.inputs.map((i2) => `file '${
|
|
496897
|
+
const tempList = resolve76(ctx.workingDirectory, `concat-list-${Date.now()}.txt`);
|
|
496898
|
+
const listContent = args.inputs.map((i2) => `file '${resolve76(ctx.workingDirectory, i2)}'`).join("\n");
|
|
496756
496899
|
await writeFile52(tempList, listContent, "utf-8");
|
|
496757
496900
|
try {
|
|
496758
496901
|
await execSafe(
|
|
@@ -497287,7 +497430,7 @@ var guideTools = [guideTool];
|
|
|
497287
497430
|
|
|
497288
497431
|
// ../cli/src/tools/manifest/status.ts
|
|
497289
497432
|
import { z as z15 } from "zod";
|
|
497290
|
-
import { resolve as
|
|
497433
|
+
import { resolve as resolve77 } from "node:path";
|
|
497291
497434
|
init_status_jobs();
|
|
497292
497435
|
var PROJECT_DIR_DESCRIPTION4 = "Project directory. Defaults to the surface's cwd; in MCP hosts, relative paths resolve under the configured server workspace.";
|
|
497293
497436
|
var statusJobTool = defineTool({
|
|
@@ -497305,7 +497448,7 @@ var statusJobTool = defineTool({
|
|
|
497305
497448
|
output: z15.string().optional().describe("Download result media to this path when complete.")
|
|
497306
497449
|
}),
|
|
497307
497450
|
async execute(args, ctx) {
|
|
497308
|
-
const projectDir = args.projectDir ?
|
|
497451
|
+
const projectDir = args.projectDir ? resolve77(ctx.workingDirectory, args.projectDir) : findProjectRoot(ctx.workingDirectory);
|
|
497309
497452
|
const record = await readJobRecord(args.jobId, projectDir);
|
|
497310
497453
|
if (!record) return { success: false, error: `Job not found: ${args.jobId}` };
|
|
497311
497454
|
const result = args.refresh === false ? makeJobStatusResult(record, {
|
|
@@ -497314,7 +497457,7 @@ var statusJobTool = defineTool({
|
|
|
497314
497457
|
warnings: []
|
|
497315
497458
|
}) : await refreshJobRecord(record, {
|
|
497316
497459
|
wait: args.wait,
|
|
497317
|
-
output: args.output ?
|
|
497460
|
+
output: args.output ? resolve77(ctx.workingDirectory, args.output) : void 0,
|
|
497318
497461
|
workingDirectory: ctx.workingDirectory
|
|
497319
497462
|
});
|
|
497320
497463
|
return {
|
|
@@ -497339,7 +497482,7 @@ var statusProjectTool = defineTool({
|
|
|
497339
497482
|
refresh: z15.boolean().optional().describe("Refresh active supported jobs before summarizing. Default false.")
|
|
497340
497483
|
}),
|
|
497341
497484
|
async execute(args, ctx) {
|
|
497342
|
-
const projectDir = args.projectDir ?
|
|
497485
|
+
const projectDir = args.projectDir ? resolve77(ctx.workingDirectory, args.projectDir) : ctx.workingDirectory;
|
|
497343
497486
|
const result = await inspectProjectStatus(projectDir, { refresh: args.refresh === true });
|
|
497344
497487
|
return {
|
|
497345
497488
|
success: true,
|
|
@@ -497664,8 +497807,8 @@ async function handleToolCall(name, args, extra) {
|
|
|
497664
497807
|
|
|
497665
497808
|
// src/resources/index.ts
|
|
497666
497809
|
init_engine();
|
|
497667
|
-
import { readFile as
|
|
497668
|
-
import { resolve as
|
|
497810
|
+
import { readFile as readFile45 } from "node:fs/promises";
|
|
497811
|
+
import { resolve as resolve78 } from "node:path";
|
|
497669
497812
|
var resources = [
|
|
497670
497813
|
{
|
|
497671
497814
|
uri: "vibe://project/current",
|
|
@@ -497700,8 +497843,8 @@ var resources = [
|
|
|
497700
497843
|
];
|
|
497701
497844
|
var currentProjectPath = process.env.VIBE_PROJECT_PATH || null;
|
|
497702
497845
|
async function loadProject2(projectPath) {
|
|
497703
|
-
const absPath =
|
|
497704
|
-
const content = await
|
|
497846
|
+
const absPath = resolve78(process.cwd(), projectPath);
|
|
497847
|
+
const content = await readFile45(absPath, "utf-8");
|
|
497705
497848
|
const data = JSON.parse(content);
|
|
497706
497849
|
return Project.fromJSON(data);
|
|
497707
497850
|
}
|
|
@@ -498093,14 +498236,14 @@ This creates a music video-style edit where cuts happen in rhythm with the music
|
|
|
498093
498236
|
}
|
|
498094
498237
|
|
|
498095
498238
|
// src/instructions.ts
|
|
498096
|
-
import { existsSync as
|
|
498097
|
-
import { delimiter, isAbsolute as isAbsolute9, resolve as
|
|
498239
|
+
import { existsSync as existsSync66, mkdirSync as mkdirSync13 } from "node:fs";
|
|
498240
|
+
import { delimiter, isAbsolute as isAbsolute9, resolve as resolve79 } from "node:path";
|
|
498098
498241
|
var DEFAULT_EXTRA_PATH_DIRS = process.platform === "darwin" ? ["/opt/homebrew/bin", "/usr/local/bin", "/opt/local/bin"] : ["/usr/local/bin"];
|
|
498099
498242
|
function ensureSystemPath(env4 = process.env, extraDirs = DEFAULT_EXTRA_PATH_DIRS) {
|
|
498100
498243
|
const current = (env4.PATH ?? "").split(delimiter).filter(Boolean);
|
|
498101
498244
|
const added = [];
|
|
498102
498245
|
for (const dir of extraDirs) {
|
|
498103
|
-
if (!current.includes(dir) &&
|
|
498246
|
+
if (!current.includes(dir) && existsSync66(dir)) {
|
|
498104
498247
|
current.push(dir);
|
|
498105
498248
|
added.push(dir);
|
|
498106
498249
|
}
|
|
@@ -498122,7 +498265,7 @@ function scrubUnresolvedUserConfigEnv(env4 = process.env) {
|
|
|
498122
498265
|
function applyWorkspaceEnv(env4 = process.env, chdir = (dir) => process.chdir(dir)) {
|
|
498123
498266
|
const raw2 = env4.VIBE_MCP_WORKSPACE?.trim();
|
|
498124
498267
|
if (!raw2) return null;
|
|
498125
|
-
const dir =
|
|
498268
|
+
const dir = resolve79(raw2);
|
|
498126
498269
|
try {
|
|
498127
498270
|
mkdirSync13(dir, { recursive: true });
|
|
498128
498271
|
chdir(dir);
|
|
@@ -498137,7 +498280,7 @@ function applyWorkspaceEnv(env4 = process.env, chdir = (dir) => process.chdir(di
|
|
|
498137
498280
|
function resolveServerWorkspaceRoot(env4 = process.env, cwd = process.cwd()) {
|
|
498138
498281
|
const initCwd = env4.INIT_CWD?.trim();
|
|
498139
498282
|
if (!initCwd) return cwd;
|
|
498140
|
-
return isAbsolute9(initCwd) ? initCwd :
|
|
498283
|
+
return isAbsolute9(initCwd) ? initCwd : resolve79(cwd, initCwd);
|
|
498141
498284
|
}
|
|
498142
498285
|
function buildServerInstructions(cwd = resolveServerWorkspaceRoot()) {
|
|
498143
498286
|
return [
|
|
@@ -498173,7 +498316,7 @@ var server2 = new Server(
|
|
|
498173
498316
|
{
|
|
498174
498317
|
name: "vibeframe",
|
|
498175
498318
|
// Stamped with the package version by build.js at bundle time.
|
|
498176
|
-
version: "0.
|
|
498319
|
+
version: "0.112.1"
|
|
498177
498320
|
},
|
|
498178
498321
|
{
|
|
498179
498322
|
capabilities: {
|