@botpress/adk-cli 1.12.2 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +565 -524
- package/dist/commands.json +2 -2
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -348619,7 +348619,7 @@ var init_internal = __esm(() => {
|
|
|
348619
348619
|
});
|
|
348620
348620
|
init_define_PACKAGE_VERSIONS = __esm2({
|
|
348621
348621
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
348622
|
-
define_PACKAGE_VERSIONS_default = { runtime: "1.12.
|
|
348622
|
+
define_PACKAGE_VERSIONS_default = { runtime: "1.12.3", adk: "1.12.3", sdk: "4.20.2", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
348623
348623
|
}
|
|
348624
348624
|
});
|
|
348625
348625
|
init_asset = __esm2({
|
|
@@ -655137,7 +655137,7 @@ var init_library2 = __esm(() => {
|
|
|
655137
655137
|
});
|
|
655138
655138
|
init_define_PACKAGE_VERSIONS2 = __esm4({
|
|
655139
655139
|
"<define:__PACKAGE_VERSIONS__>"() {
|
|
655140
|
-
define_PACKAGE_VERSIONS_default2 = { runtime: "1.12.
|
|
655140
|
+
define_PACKAGE_VERSIONS_default2 = { runtime: "1.12.3", adk: "1.12.3", sdk: "4.20.2", llmz: "0.0.33", zai: "2.5.0", cognitive: "0.2.0" };
|
|
655141
655141
|
}
|
|
655142
655142
|
});
|
|
655143
655143
|
init_assets2 = __esm4({
|
|
@@ -696806,8 +696806,8 @@ import { mkdir, writeFile as writeFile2 } from "fs/promises";
|
|
|
696806
696806
|
import { parse as parse6 } from "path";
|
|
696807
696807
|
import path102 from "path";
|
|
696808
696808
|
import { format as format4 } from "prettier";
|
|
696809
|
-
import path30 from "path";
|
|
696810
696809
|
import path31 from "path";
|
|
696810
|
+
import path322 from "path";
|
|
696811
696811
|
import fs32 from "fs/promises";
|
|
696812
696812
|
import path34 from "path";
|
|
696813
696813
|
import os22 from "os";
|
|
@@ -696850,9 +696850,9 @@ import * as path15 from "path";
|
|
|
696850
696850
|
import path16 from "path";
|
|
696851
696851
|
import crypto24 from "crypto";
|
|
696852
696852
|
import path17 from "path";
|
|
696853
|
-
import { existsSync as
|
|
696854
|
-
import
|
|
696855
|
-
import
|
|
696853
|
+
import { existsSync as existsSync7 } from "fs";
|
|
696854
|
+
import fs16 from "fs/promises";
|
|
696855
|
+
import path332 from "path";
|
|
696856
696856
|
import crypto32 from "crypto";
|
|
696857
696857
|
import path18 from "path";
|
|
696858
696858
|
import path19 from "path";
|
|
@@ -696863,30 +696863,33 @@ import path232 from "path";
|
|
|
696863
696863
|
import * as path242 from "path";
|
|
696864
696864
|
import path25 from "path";
|
|
696865
696865
|
import path26 from "path";
|
|
696866
|
-
import
|
|
696866
|
+
import { existsSync as existsSync32, realpathSync as realpathSync4 } from "fs";
|
|
696867
696867
|
import fs12 from "fs/promises";
|
|
696868
|
-
import
|
|
696868
|
+
import path27 from "path";
|
|
696869
696869
|
import path28 from "path";
|
|
696870
696870
|
import fs13 from "fs/promises";
|
|
696871
696871
|
import { existsSync as existsSync42 } from "fs";
|
|
696872
696872
|
import path29 from "path";
|
|
696873
696873
|
import fs14 from "fs/promises";
|
|
696874
696874
|
import { existsSync as existsSync52 } from "fs";
|
|
696875
|
+
import path30 from "path";
|
|
696876
|
+
import fs15 from "fs/promises";
|
|
696877
|
+
import { existsSync as existsSync6 } from "fs";
|
|
696875
696878
|
import crypto42 from "crypto";
|
|
696876
|
-
import
|
|
696877
|
-
import
|
|
696879
|
+
import path342 from "path";
|
|
696880
|
+
import fs17 from "fs/promises";
|
|
696878
696881
|
import { readFileSync as readFileSync6 } from "fs";
|
|
696879
696882
|
import { join as join72 } from "path";
|
|
696880
696883
|
import { watch as watch2, readdirSync as readdirSync22 } from "fs";
|
|
696881
696884
|
import { EventEmitter as EventEmitter32 } from "events";
|
|
696882
696885
|
import { join as join82, relative as relative3 } from "path";
|
|
696883
|
-
import { existsSync as existsSync7 } from "fs";
|
|
696884
|
-
import path342 from "path";
|
|
696885
|
-
import { readFileSync as readFileSync22 } from "fs";
|
|
696886
|
-
import { join as join9 } from "path";
|
|
696887
696886
|
import { existsSync as existsSync8 } from "fs";
|
|
696888
|
-
import fs17 from "fs/promises";
|
|
696889
696887
|
import path35 from "path";
|
|
696888
|
+
import { readFileSync as readFileSync22 } from "fs";
|
|
696889
|
+
import { join as join9 } from "path";
|
|
696890
|
+
import { existsSync as existsSync9 } from "fs";
|
|
696891
|
+
import fs18 from "fs/promises";
|
|
696892
|
+
import path36 from "path";
|
|
696890
696893
|
import { spawn as spawn2 } from "child_process";
|
|
696891
696894
|
|
|
696892
696895
|
class ValidationErrors {
|
|
@@ -696894,24 +696897,24 @@ class ValidationErrors {
|
|
|
696894
696897
|
static isValidationError(error) {
|
|
696895
696898
|
return error !== null && typeof error === "object" && "$type" in error && error.$type === "ValidationError";
|
|
696896
696899
|
}
|
|
696897
|
-
static directoryNotFound(
|
|
696900
|
+
static directoryNotFound(path37) {
|
|
696898
696901
|
return {
|
|
696899
696902
|
$type: ValidationErrors.$type,
|
|
696900
696903
|
code: "DIRECTORY_NOT_FOUND",
|
|
696901
696904
|
severity: "error",
|
|
696902
|
-
message: `Project directory not found: ${
|
|
696905
|
+
message: `Project directory not found: ${path37}`,
|
|
696903
696906
|
hint: "Ensure the directory exists and you have permission to access it",
|
|
696904
|
-
context: { path:
|
|
696907
|
+
context: { path: path37 }
|
|
696905
696908
|
};
|
|
696906
696909
|
}
|
|
696907
|
-
static directoryAccessError(
|
|
696910
|
+
static directoryAccessError(path37, error) {
|
|
696908
696911
|
return {
|
|
696909
696912
|
$type: ValidationErrors.$type,
|
|
696910
696913
|
code: "DIRECTORY_ACCESS_ERROR",
|
|
696911
696914
|
severity: "error",
|
|
696912
696915
|
message: `Cannot access project directory: ${error}`,
|
|
696913
696916
|
hint: "Check file system permissions",
|
|
696914
|
-
context: { path:
|
|
696917
|
+
context: { path: path37, error }
|
|
696915
696918
|
};
|
|
696916
696919
|
}
|
|
696917
696920
|
static requiredFileMissing(file) {
|
|
@@ -697406,7 +697409,7 @@ async function generateActionTypes(project) {
|
|
|
697406
697409
|
};`);
|
|
697407
697410
|
continue;
|
|
697408
697411
|
}
|
|
697409
|
-
const absolutePath =
|
|
697412
|
+
const absolutePath = path31.join(project.path, action.path);
|
|
697410
697413
|
const actionModule = await import(`${absolutePath}?t=${Date.now()}`);
|
|
697411
697414
|
const actionInstance = actionModule[action.export] || actionModule.default;
|
|
697412
697415
|
if (actionInstance && actionInstance.input && actionInstance.output) {
|
|
@@ -697451,7 +697454,7 @@ ${actionDefs.join(`
|
|
|
697451
697454
|
};
|
|
697452
697455
|
}
|
|
697453
697456
|
`;
|
|
697454
|
-
const actionTypesPath =
|
|
697457
|
+
const actionTypesPath = path31.join(project.path, ".adk", "action-types.d.ts");
|
|
697455
697458
|
await createFile(actionTypesPath, await formatCode(content));
|
|
697456
697459
|
}
|
|
697457
697460
|
async function generateIntegrationActionTypes(project) {
|
|
@@ -697487,7 +697490,7 @@ type IntegrationsMap<T> = {
|
|
|
697487
697490
|
export type IntegrationActions = IntegrationsMap<Integrations>;
|
|
697488
697491
|
}
|
|
697489
697492
|
`;
|
|
697490
|
-
const integrationActionTypesPath =
|
|
697493
|
+
const integrationActionTypesPath = path322.join(project.path, ".adk", "integration-action-types.d.ts");
|
|
697491
697494
|
await createFile(integrationActionTypesPath, await formatCode(content));
|
|
697492
697495
|
}
|
|
697493
697496
|
|
|
@@ -700055,7 +700058,7 @@ class AgentProjectGenerator {
|
|
|
700055
700058
|
deploy: "adk deploy"
|
|
700056
700059
|
},
|
|
700057
700060
|
dependencies: {
|
|
700058
|
-
"@botpress/runtime": "^1.12.
|
|
700061
|
+
"@botpress/runtime": "^1.12.3"
|
|
700059
700062
|
},
|
|
700060
700063
|
devDependencies: {
|
|
700061
700064
|
typescript: "^5.9.3"
|
|
@@ -701291,6 +701294,42 @@ ${integrationEvents.join(`
|
|
|
701291
701294
|
const eventTypesPath = path26.join(project.path, ".adk", "event-types.d.ts");
|
|
701292
701295
|
await createFile(eventTypesPath, await formatCode(content));
|
|
701293
701296
|
}
|
|
701297
|
+
function findPackage(name2, startDir) {
|
|
701298
|
+
let current;
|
|
701299
|
+
try {
|
|
701300
|
+
current = realpathSync4(startDir);
|
|
701301
|
+
} catch {
|
|
701302
|
+
current = startDir;
|
|
701303
|
+
}
|
|
701304
|
+
while (current !== path27.dirname(current)) {
|
|
701305
|
+
const pkgPath = path27.join(current, "node_modules", name2);
|
|
701306
|
+
if (existsSync32(pkgPath)) {
|
|
701307
|
+
return pkgPath;
|
|
701308
|
+
}
|
|
701309
|
+
current = path27.dirname(current);
|
|
701310
|
+
}
|
|
701311
|
+
return null;
|
|
701312
|
+
}
|
|
701313
|
+
async function linkSdk(agentDir, botDir) {
|
|
701314
|
+
const targetSdkPath = path27.join(botDir, "node_modules", "@botpress", "sdk");
|
|
701315
|
+
if (existsSync32(targetSdkPath)) {
|
|
701316
|
+
return;
|
|
701317
|
+
}
|
|
701318
|
+
const runtimePath = findPackage("@botpress/runtime", agentDir);
|
|
701319
|
+
if (!runtimePath) {
|
|
701320
|
+
console.warn("Warning: Could not find @botpress/runtime in agent directory");
|
|
701321
|
+
return;
|
|
701322
|
+
}
|
|
701323
|
+
let sdkPath = findPackage("@botpress/sdk", runtimePath);
|
|
701324
|
+
if (!sdkPath) {
|
|
701325
|
+
console.warn(`Warning: Could not find @botpress/sdk from @botpress/runtime location (${runtimePath})`);
|
|
701326
|
+
return;
|
|
701327
|
+
}
|
|
701328
|
+
const targetBotpressDir = path27.join(botDir, "node_modules", "@botpress");
|
|
701329
|
+
await fs12.mkdir(targetBotpressDir, { recursive: true });
|
|
701330
|
+
const symlinkType = process.platform === "win32" ? "junction" : undefined;
|
|
701331
|
+
await fs12.symlink(sdkPath, targetSdkPath, symlinkType);
|
|
701332
|
+
}
|
|
701294
701333
|
|
|
701295
701334
|
class DevIdManager {
|
|
701296
701335
|
projectPath;
|
|
@@ -701300,7 +701339,7 @@ class DevIdManager {
|
|
|
701300
701339
|
constructor(projectPath, botProjectPath) {
|
|
701301
701340
|
this.projectPath = projectPath;
|
|
701302
701341
|
this.botProjectPath = botProjectPath;
|
|
701303
|
-
this.projectCachePath =
|
|
701342
|
+
this.projectCachePath = path28.join(botProjectPath, ".botpress", "project.cache.json");
|
|
701304
701343
|
}
|
|
701305
701344
|
async getClient() {
|
|
701306
701345
|
if (!this.client) {
|
|
@@ -701326,8 +701365,8 @@ class DevIdManager {
|
|
|
701326
701365
|
}
|
|
701327
701366
|
async readProjectCache() {
|
|
701328
701367
|
try {
|
|
701329
|
-
if (
|
|
701330
|
-
const content = await
|
|
701368
|
+
if (existsSync42(this.projectCachePath)) {
|
|
701369
|
+
const content = await fs13.readFile(this.projectCachePath, "utf-8");
|
|
701331
701370
|
return JSON.parse(content);
|
|
701332
701371
|
}
|
|
701333
701372
|
} catch (error) {
|
|
@@ -701337,8 +701376,8 @@ class DevIdManager {
|
|
|
701337
701376
|
}
|
|
701338
701377
|
async saveProjectCache(cache22) {
|
|
701339
701378
|
try {
|
|
701340
|
-
await
|
|
701341
|
-
await
|
|
701379
|
+
await fs13.mkdir(path28.dirname(this.projectCachePath), { recursive: true });
|
|
701380
|
+
await fs13.writeFile(this.projectCachePath, JSON.stringify(cache22, null, 2));
|
|
701342
701381
|
} catch (error) {
|
|
701343
701382
|
console.error("Error saving project.cache.json:", error);
|
|
701344
701383
|
}
|
|
@@ -701392,7 +701431,7 @@ class IntegrationSync {
|
|
|
701392
701431
|
constructor(projectPath, botProjectPath) {
|
|
701393
701432
|
this.projectPath = projectPath;
|
|
701394
701433
|
this.botProjectPath = botProjectPath;
|
|
701395
|
-
this.bpModulesPath =
|
|
701434
|
+
this.bpModulesPath = path29.join(botProjectPath, "bp_modules");
|
|
701396
701435
|
}
|
|
701397
701436
|
async parseIntegrations() {
|
|
701398
701437
|
const project = await AgentProject.load(this.projectPath);
|
|
@@ -701423,16 +701462,16 @@ class IntegrationSync {
|
|
|
701423
701462
|
return integrations;
|
|
701424
701463
|
}
|
|
701425
701464
|
async isIntegrationSynced(integration) {
|
|
701426
|
-
const targetFolder =
|
|
701427
|
-
if (!
|
|
701465
|
+
const targetFolder = path29.join(this.bpModulesPath, `integration_${integration.alias}`);
|
|
701466
|
+
if (!existsSync52(targetFolder)) {
|
|
701428
701467
|
return false;
|
|
701429
701468
|
}
|
|
701430
701469
|
try {
|
|
701431
|
-
const indexPath =
|
|
701432
|
-
if (!
|
|
701470
|
+
const indexPath = path29.join(targetFolder, "index.ts");
|
|
701471
|
+
if (!existsSync52(indexPath)) {
|
|
701433
701472
|
return false;
|
|
701434
701473
|
}
|
|
701435
|
-
const indexContent = await
|
|
701474
|
+
const indexContent = await fs14.readFile(indexPath, "utf-8");
|
|
701436
701475
|
const versionMatch = indexContent.match(/version:\s*["']([^"']+)["']/);
|
|
701437
701476
|
if (!versionMatch) {
|
|
701438
701477
|
return false;
|
|
@@ -701460,20 +701499,20 @@ class IntegrationSync {
|
|
|
701460
701499
|
await command.output();
|
|
701461
701500
|
}
|
|
701462
701501
|
async renameIntegrationFolder(integration) {
|
|
701463
|
-
const sourceFolder =
|
|
701464
|
-
const targetFolder =
|
|
701465
|
-
if (!
|
|
701502
|
+
const sourceFolder = path29.join(this.bpModulesPath, integration.name.replace("/", "-"));
|
|
701503
|
+
const targetFolder = path29.join(this.bpModulesPath, `integration_${integration.alias}`);
|
|
701504
|
+
if (!existsSync52(sourceFolder)) {
|
|
701466
701505
|
throw new Error(`Integration folder not found: ${sourceFolder}`);
|
|
701467
701506
|
}
|
|
701468
|
-
if (
|
|
701469
|
-
await
|
|
701507
|
+
if (existsSync52(targetFolder)) {
|
|
701508
|
+
await fs14.rm(targetFolder, { recursive: true, force: true });
|
|
701470
701509
|
}
|
|
701471
|
-
await
|
|
701510
|
+
await fs14.rename(sourceFolder, targetFolder);
|
|
701472
701511
|
}
|
|
701473
701512
|
async removeIntegrationFolder(alias) {
|
|
701474
|
-
const targetFolder =
|
|
701475
|
-
if (
|
|
701476
|
-
await
|
|
701513
|
+
const targetFolder = path29.join(this.bpModulesPath, `integration_${alias}`);
|
|
701514
|
+
if (existsSync52(targetFolder)) {
|
|
701515
|
+
await fs14.rm(targetFolder, { recursive: true, force: true });
|
|
701477
701516
|
}
|
|
701478
701517
|
}
|
|
701479
701518
|
async syncIntegrations() {
|
|
@@ -701483,7 +701522,7 @@ class IntegrationSync {
|
|
|
701483
701522
|
if (integrations.length === 0) {
|
|
701484
701523
|
return { synced, errors };
|
|
701485
701524
|
}
|
|
701486
|
-
await
|
|
701525
|
+
await fs14.mkdir(this.bpModulesPath, { recursive: true });
|
|
701487
701526
|
for (const integration of integrations) {
|
|
701488
701527
|
try {
|
|
701489
701528
|
const isAlreadySynced = await this.isIntegrationSynced(integration);
|
|
@@ -701511,7 +701550,7 @@ class InterfaceSync {
|
|
|
701511
701550
|
constructor(projectPath, botProjectPath) {
|
|
701512
701551
|
this.projectPath = projectPath;
|
|
701513
701552
|
this.botProjectPath = botProjectPath;
|
|
701514
|
-
this.bpModulesPath =
|
|
701553
|
+
this.bpModulesPath = path30.join(botProjectPath, "bp_modules");
|
|
701515
701554
|
}
|
|
701516
701555
|
async parseInterfaces() {
|
|
701517
701556
|
const interfaces = [];
|
|
@@ -701529,16 +701568,16 @@ class InterfaceSync {
|
|
|
701529
701568
|
return interfaces;
|
|
701530
701569
|
}
|
|
701531
701570
|
async isInterfaceSynced(interfaceInfo) {
|
|
701532
|
-
const targetFolder =
|
|
701533
|
-
if (!
|
|
701571
|
+
const targetFolder = path30.join(this.bpModulesPath, `interface_${pascalCase(interfaceInfo.alias)}`);
|
|
701572
|
+
if (!existsSync6(targetFolder)) {
|
|
701534
701573
|
return false;
|
|
701535
701574
|
}
|
|
701536
701575
|
try {
|
|
701537
|
-
const indexPath =
|
|
701538
|
-
if (!
|
|
701576
|
+
const indexPath = path30.join(targetFolder, "index.ts");
|
|
701577
|
+
if (!existsSync6(indexPath)) {
|
|
701539
701578
|
return false;
|
|
701540
701579
|
}
|
|
701541
|
-
const indexContent = await
|
|
701580
|
+
const indexContent = await fs15.readFile(indexPath, "utf-8");
|
|
701542
701581
|
const versionMatch = indexContent.match(/version:\s*["']([^"']+)["']/);
|
|
701543
701582
|
if (!versionMatch) {
|
|
701544
701583
|
return false;
|
|
@@ -701580,20 +701619,20 @@ class InterfaceSync {
|
|
|
701580
701619
|
});
|
|
701581
701620
|
}
|
|
701582
701621
|
async renameInterfaceFolder(interfaceInfo) {
|
|
701583
|
-
const sourceFolder =
|
|
701584
|
-
const targetFolder =
|
|
701585
|
-
if (!
|
|
701622
|
+
const sourceFolder = path30.join(this.bpModulesPath, interfaceInfo.name);
|
|
701623
|
+
const targetFolder = path30.join(this.bpModulesPath, `interface_${pascalCase(interfaceInfo.alias)}`);
|
|
701624
|
+
if (!existsSync6(sourceFolder)) {
|
|
701586
701625
|
throw new Error(`Interface folder not found: ${sourceFolder}`);
|
|
701587
701626
|
}
|
|
701588
|
-
if (
|
|
701589
|
-
await
|
|
701627
|
+
if (existsSync6(targetFolder)) {
|
|
701628
|
+
await fs15.rm(targetFolder, { recursive: true, force: true });
|
|
701590
701629
|
}
|
|
701591
|
-
await
|
|
701630
|
+
await fs15.rename(sourceFolder, targetFolder);
|
|
701592
701631
|
}
|
|
701593
701632
|
async removeInterfaceFolder(alias) {
|
|
701594
|
-
const targetFolder =
|
|
701595
|
-
if (
|
|
701596
|
-
await
|
|
701633
|
+
const targetFolder = path30.join(this.bpModulesPath, `interface_${pascalCase(alias)}`);
|
|
701634
|
+
if (existsSync6(targetFolder)) {
|
|
701635
|
+
await fs15.rm(targetFolder, { recursive: true, force: true });
|
|
701597
701636
|
}
|
|
701598
701637
|
}
|
|
701599
701638
|
async syncInterfaces() {
|
|
@@ -701603,7 +701642,7 @@ class InterfaceSync {
|
|
|
701603
701642
|
if (interfaces.length === 0) {
|
|
701604
701643
|
return { synced, errors };
|
|
701605
701644
|
}
|
|
701606
|
-
await
|
|
701645
|
+
await fs15.mkdir(this.bpModulesPath, { recursive: true });
|
|
701607
701646
|
for (const interfaceInfo of interfaces) {
|
|
701608
701647
|
try {
|
|
701609
701648
|
const isAlreadySynced = await this.isInterfaceSynced(interfaceInfo);
|
|
@@ -701630,26 +701669,26 @@ function isBuiltinAction(name2) {
|
|
|
701630
701669
|
return !!Object.values(BuiltInActions).find((x) => x.name === name2);
|
|
701631
701670
|
}
|
|
701632
701671
|
function getImportPath(from, to3) {
|
|
701633
|
-
return
|
|
701672
|
+
return path332.relative(path332.dirname(from), to3).replace(/\.ts$/, "").replace(/\\/g, "/");
|
|
701634
701673
|
}
|
|
701635
701674
|
|
|
701636
701675
|
class BotGenerator {
|
|
701637
701676
|
projectPath;
|
|
701638
701677
|
outputPath;
|
|
701639
701678
|
constructor(options) {
|
|
701640
|
-
this.projectPath =
|
|
701641
|
-
this.outputPath =
|
|
701679
|
+
this.projectPath = path332.resolve(options.projectPath);
|
|
701680
|
+
this.outputPath = path332.resolve(options.outputPath || path332.join(this.projectPath, ".adk"));
|
|
701642
701681
|
}
|
|
701643
701682
|
async listFilesRecursive(rootDir) {
|
|
701644
701683
|
try {
|
|
701645
|
-
if (!
|
|
701684
|
+
if (!existsSync7(rootDir))
|
|
701646
701685
|
return [];
|
|
701647
701686
|
const result = [];
|
|
701648
701687
|
const walk = async (dir, relativeBase) => {
|
|
701649
|
-
const entries = await
|
|
701688
|
+
const entries = await fs16.readdir(dir, { withFileTypes: true });
|
|
701650
701689
|
for (const entry of entries) {
|
|
701651
|
-
const abs =
|
|
701652
|
-
const rel =
|
|
701690
|
+
const abs = path332.join(dir, entry.name);
|
|
701691
|
+
const rel = path332.join(relativeBase, entry.name);
|
|
701653
701692
|
if (entry.isDirectory()) {
|
|
701654
701693
|
await walk(abs, rel);
|
|
701655
701694
|
} else {
|
|
@@ -701664,20 +701703,20 @@ class BotGenerator {
|
|
|
701664
701703
|
}
|
|
701665
701704
|
}
|
|
701666
701705
|
async removeEmptyDirectories(rootDir) {
|
|
701667
|
-
if (!
|
|
701706
|
+
if (!existsSync7(rootDir))
|
|
701668
701707
|
return;
|
|
701669
701708
|
const removeIfEmpty = async (dir) => {
|
|
701670
|
-
const entries = await
|
|
701709
|
+
const entries = await fs16.readdir(dir, { withFileTypes: true });
|
|
701671
701710
|
for (const entry of entries) {
|
|
701672
701711
|
if (entry.isDirectory()) {
|
|
701673
|
-
const subdir =
|
|
701712
|
+
const subdir = path332.join(dir, entry.name);
|
|
701674
701713
|
await removeIfEmpty(subdir);
|
|
701675
701714
|
}
|
|
701676
701715
|
}
|
|
701677
|
-
const after = await
|
|
701716
|
+
const after = await fs16.readdir(dir);
|
|
701678
701717
|
if (after.length === 0 && dir !== rootDir) {
|
|
701679
701718
|
try {
|
|
701680
|
-
await
|
|
701719
|
+
await fs16.rmdir(dir, { recursive: false });
|
|
701681
701720
|
} catch {}
|
|
701682
701721
|
}
|
|
701683
701722
|
};
|
|
@@ -701685,7 +701724,7 @@ class BotGenerator {
|
|
|
701685
701724
|
}
|
|
701686
701725
|
async generate() {
|
|
701687
701726
|
const project = await AgentProject.load(this.projectPath);
|
|
701688
|
-
await
|
|
701727
|
+
await fs16.mkdir(this.outputPath, { recursive: true });
|
|
701689
701728
|
await this.generateBotDefinition();
|
|
701690
701729
|
await this.generateIntegrationsDefinition();
|
|
701691
701730
|
await this.generateInterfacesDefinition();
|
|
@@ -701714,19 +701753,19 @@ class BotGenerator {
|
|
|
701714
701753
|
workspaceId: project.agentInfo?.workspaceId
|
|
701715
701754
|
});
|
|
701716
701755
|
const integrations = await manager3.loadIntegrations(project.dependencies || {});
|
|
701717
|
-
const integrationsDir =
|
|
701756
|
+
const integrationsDir = path332.join(this.projectPath, ".adk", "integrations");
|
|
701718
701757
|
const existingIntegrationFiles = await this.listFilesRecursive(integrationsDir);
|
|
701719
701758
|
let aliases = new Set;
|
|
701720
701759
|
let files = new Set;
|
|
701721
701760
|
for (const integration of integrations.integrations) {
|
|
701722
701761
|
if (integration.definition) {
|
|
701723
701762
|
const types62 = await generateIntegrationTypes(integration);
|
|
701724
|
-
const importPath = `./${
|
|
701763
|
+
const importPath = `./${path332.join("integrations", types62.names.paths.index).replace(/\\/g, "/")}`;
|
|
701725
701764
|
aliases.add(`"${integration.alias}": import("${importPath}").${types62.names.typings.index}`);
|
|
701726
701765
|
for (const [filePath, content] of Object.entries(types62.files)) {
|
|
701727
|
-
const fullPath =
|
|
701728
|
-
const dir =
|
|
701729
|
-
await
|
|
701766
|
+
const fullPath = path332.join(this.projectPath, ".adk", "integrations", filePath);
|
|
701767
|
+
const dir = path332.dirname(fullPath);
|
|
701768
|
+
await fs16.mkdir(dir, { recursive: true });
|
|
701730
701769
|
await createFile(fullPath, content);
|
|
701731
701770
|
files.add(filePath);
|
|
701732
701771
|
}
|
|
@@ -701746,13 +701785,13 @@ class BotGenerator {
|
|
|
701746
701785
|
};
|
|
701747
701786
|
}
|
|
701748
701787
|
`;
|
|
701749
|
-
await createFile(
|
|
701788
|
+
await createFile(path332.join(this.projectPath, ".adk", "integrations-types.d.ts"), await formatCode(types52));
|
|
701750
701789
|
const staleIntegrationFiles = existingIntegrationFiles.filter((f) => !files.has(f));
|
|
701751
701790
|
if (staleIntegrationFiles.length > 0) {
|
|
701752
701791
|
for (const rel of staleIntegrationFiles) {
|
|
701753
|
-
const abs =
|
|
701792
|
+
const abs = path332.join(integrationsDir, rel);
|
|
701754
701793
|
try {
|
|
701755
|
-
await
|
|
701794
|
+
await fs16.rm(abs, { force: true });
|
|
701756
701795
|
} catch {}
|
|
701757
701796
|
}
|
|
701758
701797
|
}
|
|
@@ -701819,7 +701858,7 @@ class BotGenerator {
|
|
|
701819
701858
|
let botStateType = "{}";
|
|
701820
701859
|
let userStateType = "{}";
|
|
701821
701860
|
try {
|
|
701822
|
-
const configPath =
|
|
701861
|
+
const configPath = path332.join(project.path, "agent.config.ts");
|
|
701823
701862
|
const configModule = await import(`${configPath}?t=${Date.now()}`);
|
|
701824
701863
|
const config3 = configModule.default;
|
|
701825
701864
|
if (config3?.bot?.state) {
|
|
@@ -701855,7 +701894,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
701855
701894
|
export type UserState = ${userStateType};
|
|
701856
701895
|
}
|
|
701857
701896
|
`;
|
|
701858
|
-
await createFile(
|
|
701897
|
+
await createFile(path332.join(this.projectPath, ".adk", "runtime.d.ts"), await formatCode(types52));
|
|
701859
701898
|
}
|
|
701860
701899
|
async generateInterfacesTypes() {
|
|
701861
701900
|
const project = await AgentProject.load(this.projectPath);
|
|
@@ -701863,7 +701902,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
701863
701902
|
workspaceId: project.agentInfo?.workspaceId
|
|
701864
701903
|
});
|
|
701865
701904
|
const manager3 = new InterfaceManager;
|
|
701866
|
-
const interfacesDir =
|
|
701905
|
+
const interfacesDir = path332.join(this.projectPath, ".adk", "interfaces");
|
|
701867
701906
|
const existingInterfaceFiles = await this.listFilesRecursive(interfacesDir);
|
|
701868
701907
|
const interfaces = await manager3.loadInterfaces(project.dependencies || {}).then((result) => result.interfaces.filter((int2) => int2.definition).map((x) => x.definition));
|
|
701869
701908
|
const integrations = await integrationManager.loadIntegrations(project.dependencies || {}).then((result) => result.integrations.filter((int2) => int2.enabled && int2.definition).map((x) => x.definition));
|
|
@@ -701872,12 +701911,12 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
701872
701911
|
let files = new Set;
|
|
701873
701912
|
for (const int2 of interfaces) {
|
|
701874
701913
|
const types62 = await generateInterfaceTypes(int2, integrations);
|
|
701875
|
-
imports.add(`import { ${types62.names.typings.index} } from "./${
|
|
701914
|
+
imports.add(`import { ${types62.names.typings.index} } from "./${path332.join("interfaces", types62.names.paths.index).replace(/\\/g, "/")}";`);
|
|
701876
701915
|
aliases.add(`"${types62.names.name}": ${types62.names.typings.index}`);
|
|
701877
701916
|
for (const [filePath, content] of Object.entries(types62.files)) {
|
|
701878
|
-
const fullPath =
|
|
701879
|
-
const dir =
|
|
701880
|
-
await
|
|
701917
|
+
const fullPath = path332.join(this.projectPath, ".adk", "interfaces", filePath);
|
|
701918
|
+
const dir = path332.dirname(fullPath);
|
|
701919
|
+
await fs16.mkdir(dir, { recursive: true });
|
|
701881
701920
|
await createFile(fullPath, content);
|
|
701882
701921
|
files.add(filePath);
|
|
701883
701922
|
}
|
|
@@ -701913,14 +701952,14 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
701913
701952
|
`)}
|
|
701914
701953
|
};
|
|
701915
701954
|
`;
|
|
701916
|
-
await createFile(
|
|
701917
|
-
await createFile(
|
|
701955
|
+
await createFile(path332.join(this.projectPath, ".adk", "interfaces.d.ts"), await formatCode(types52));
|
|
701956
|
+
await createFile(path332.join(this.projectPath, ".adk", "interfaces.ts"), await formatCode(consts));
|
|
701918
701957
|
const staleInterfaceFiles = existingInterfaceFiles.filter((f) => !files.has(f));
|
|
701919
701958
|
if (staleInterfaceFiles.length > 0) {
|
|
701920
701959
|
for (const rel of staleInterfaceFiles) {
|
|
701921
|
-
const abs =
|
|
701960
|
+
const abs = path332.join(interfacesDir, rel);
|
|
701922
701961
|
try {
|
|
701923
|
-
await
|
|
701962
|
+
await fs16.rm(abs, { force: true });
|
|
701924
701963
|
} catch {}
|
|
701925
701964
|
}
|
|
701926
701965
|
}
|
|
@@ -701951,7 +701990,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
701951
701990
|
`) : ""}
|
|
701952
701991
|
} as Record<string, IntegrationPackage>;
|
|
701953
701992
|
`;
|
|
701954
|
-
await createFile(
|
|
701993
|
+
await createFile(path332.join(this.outputPath, "src", "integrations.ts"), content);
|
|
701955
701994
|
}
|
|
701956
701995
|
async generateInterfacesDefinition() {
|
|
701957
701996
|
const interfaces = BUILTIN_INTERFACES;
|
|
@@ -701974,7 +702013,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
701974
702013
|
`) : ""}
|
|
701975
702014
|
} as Record<string, InterfacePackage>;
|
|
701976
702015
|
`;
|
|
701977
|
-
await createFile(
|
|
702016
|
+
await createFile(path332.join(this.outputPath, "src", "interfaces.ts"), await formatCode(content));
|
|
701978
702017
|
}
|
|
701979
702018
|
async generateBotDefinition() {
|
|
701980
702019
|
const project = await AgentProject.load(this.projectPath);
|
|
@@ -702029,7 +702068,7 @@ declare module "@botpress/runtime/_types/state" {
|
|
|
702029
702068
|
if (isBuiltinWorkflow2(workflow.definition.name)) {
|
|
702030
702069
|
continue;
|
|
702031
702070
|
}
|
|
702032
|
-
const workflowPath =
|
|
702071
|
+
const workflowPath = path332.join(project.path, workflow.path);
|
|
702033
702072
|
const workflowModule = await import(`${workflowPath}?t=${Date.now()}`);
|
|
702034
702073
|
const workflowInstance = workflowModule.default || workflowModule[workflow.export];
|
|
702035
702074
|
if (workflowInstance) {
|
|
@@ -702267,7 +702306,7 @@ configuration: {
|
|
|
702267
702306
|
const fullContent = content + integrationsSection + `
|
|
702268
702307
|
|
|
702269
702308
|
export default bot;`;
|
|
702270
|
-
await createFile(
|
|
702309
|
+
await createFile(path332.join(this.outputPath, "bot.definition.ts"), await formatCode(fullContent));
|
|
702271
702310
|
}
|
|
702272
702311
|
async generateBotIndex() {
|
|
702273
702312
|
const content = dedent_default`
|
|
@@ -702301,7 +702340,7 @@ export default bot;`;
|
|
|
702301
702340
|
|
|
702302
702341
|
export default bot
|
|
702303
702342
|
`;
|
|
702304
|
-
await createFile(
|
|
702343
|
+
await createFile(path332.join(this.outputPath, "src", "index.ts"), await formatCode(content));
|
|
702305
702344
|
}
|
|
702306
702345
|
async generatePackageJson(project) {
|
|
702307
702346
|
const packageJson = {
|
|
@@ -702315,7 +702354,7 @@ export default bot;`;
|
|
|
702315
702354
|
typescript: "^5.9.3"
|
|
702316
702355
|
}
|
|
702317
702356
|
};
|
|
702318
|
-
await createFile(
|
|
702357
|
+
await createFile(path332.join(this.outputPath, "package.json"), JSON.stringify(packageJson, null, 2));
|
|
702319
702358
|
}
|
|
702320
702359
|
async generateTsConfig() {
|
|
702321
702360
|
const tsConfig = {
|
|
@@ -702346,7 +702385,7 @@ export default bot;`;
|
|
|
702346
702385
|
},
|
|
702347
702386
|
include: [".botpress/**/*", "src/**/*", "bp_modules/**/*", "./*.ts", "./*.json", "../*.d.ts"]
|
|
702348
702387
|
};
|
|
702349
|
-
await createFile(
|
|
702388
|
+
await createFile(path332.join(this.outputPath, "tsconfig.json"), JSON.stringify(tsConfig, null, 2));
|
|
702350
702389
|
}
|
|
702351
702390
|
async generateGlobalTypes() {
|
|
702352
702391
|
const content = dedent_default`
|
|
@@ -702369,42 +702408,42 @@ export default bot;`;
|
|
|
702369
702408
|
|
|
702370
702409
|
export {};
|
|
702371
702410
|
`;
|
|
702372
|
-
await createFile(
|
|
702411
|
+
await createFile(path332.join(this.outputPath, "global.d.ts"), await formatCode(content));
|
|
702373
702412
|
}
|
|
702374
702413
|
async copyAssets() {
|
|
702375
|
-
const assetsPath =
|
|
702376
|
-
const targetPath =
|
|
702377
|
-
if (
|
|
702378
|
-
await
|
|
702414
|
+
const assetsPath = path332.join(this.projectPath, "assets");
|
|
702415
|
+
const targetPath = path332.join(this.outputPath, "assets");
|
|
702416
|
+
if (existsSync7(assetsPath)) {
|
|
702417
|
+
await fs16.mkdir(targetPath, { recursive: true });
|
|
702379
702418
|
await this.copyDirectory(assetsPath, targetPath);
|
|
702380
702419
|
}
|
|
702381
702420
|
}
|
|
702382
702421
|
async copyDirectory(src, dest) {
|
|
702383
|
-
const entries = await
|
|
702422
|
+
const entries = await fs16.readdir(src, { withFileTypes: true });
|
|
702384
702423
|
for (const entry of entries) {
|
|
702385
|
-
const srcPath =
|
|
702386
|
-
const destPath =
|
|
702424
|
+
const srcPath = path332.join(src, entry.name);
|
|
702425
|
+
const destPath = path332.join(dest, entry.name);
|
|
702387
702426
|
if (entry.isDirectory()) {
|
|
702388
|
-
await
|
|
702427
|
+
await fs16.mkdir(destPath, { recursive: true });
|
|
702389
702428
|
await this.copyDirectory(srcPath, destPath);
|
|
702390
702429
|
} else {
|
|
702391
|
-
await
|
|
702430
|
+
await fs16.copyFile(srcPath, destPath);
|
|
702392
702431
|
}
|
|
702393
702432
|
}
|
|
702394
702433
|
}
|
|
702395
702434
|
async generateAdkRuntime() {
|
|
702396
702435
|
const project = new AgentProject(this.projectPath);
|
|
702397
702436
|
await project.reload();
|
|
702398
|
-
const srcDir =
|
|
702437
|
+
const srcDir = path332.join(this.outputPath, "src");
|
|
702399
702438
|
{
|
|
702400
|
-
const dest =
|
|
702439
|
+
const dest = path332.join(srcDir, "conversations.ts");
|
|
702401
702440
|
const imports = new Map;
|
|
702402
702441
|
const exports7 = new Set;
|
|
702403
702442
|
let index = 1;
|
|
702404
702443
|
for (const conversation3 of project.conversations) {
|
|
702405
702444
|
if (!imports.has(conversation3.path)) {
|
|
702406
702445
|
const name2 = `conversations_${index++}`;
|
|
702407
|
-
const importPath = getImportPath(dest,
|
|
702446
|
+
const importPath = getImportPath(dest, path332.join(project.path, conversation3.path));
|
|
702408
702447
|
imports.set(conversation3.path, {
|
|
702409
702448
|
name: name2,
|
|
702410
702449
|
statement: `import * as ${name2} from "${importPath}";`
|
|
@@ -702430,14 +702469,14 @@ export default bot;`;
|
|
|
702430
702469
|
await createFile(dest, await formatCode(content2));
|
|
702431
702470
|
}
|
|
702432
702471
|
{
|
|
702433
|
-
const dest =
|
|
702472
|
+
const dest = path332.join(srcDir, "knowledge.ts");
|
|
702434
702473
|
const imports = new Map;
|
|
702435
702474
|
const exports7 = new Set;
|
|
702436
702475
|
let index = 1;
|
|
702437
702476
|
for (const knowledge of project.knowledge) {
|
|
702438
702477
|
if (!imports.has(knowledge.path)) {
|
|
702439
702478
|
const name2 = `knowledge_${index++}`;
|
|
702440
|
-
const importPath = getImportPath(dest,
|
|
702479
|
+
const importPath = getImportPath(dest, path332.join(project.path, knowledge.path));
|
|
702441
702480
|
imports.set(knowledge.path, {
|
|
702442
702481
|
name: name2,
|
|
702443
702482
|
statement: `import * as ${name2} from "${importPath}";`
|
|
@@ -702463,7 +702502,7 @@ export default bot;`;
|
|
|
702463
702502
|
await createFile(dest, await formatCode(content2));
|
|
702464
702503
|
}
|
|
702465
702504
|
{
|
|
702466
|
-
const dest =
|
|
702505
|
+
const dest = path332.join(srcDir, "triggers.ts");
|
|
702467
702506
|
const { transforms: transforms4 } = await Promise.resolve().then(() => (init_dist6(), exports_dist2));
|
|
702468
702507
|
const imports = new Map;
|
|
702469
702508
|
const exports7 = new Set;
|
|
@@ -702472,7 +702511,7 @@ export default bot;`;
|
|
|
702472
702511
|
for (const trigger of project.triggers) {
|
|
702473
702512
|
if (!imports.has(trigger.path)) {
|
|
702474
702513
|
const name2 = `triggers_${index++}`;
|
|
702475
|
-
const importPath = getImportPath(dest,
|
|
702514
|
+
const importPath = getImportPath(dest, path332.join(project.path, trigger.path));
|
|
702476
702515
|
imports.set(trigger.path, {
|
|
702477
702516
|
name: name2,
|
|
702478
702517
|
statement: `import * as ${name2} from "${importPath}";`
|
|
@@ -702482,7 +702521,7 @@ export default bot;`;
|
|
|
702482
702521
|
}
|
|
702483
702522
|
for (const trigger of project.triggers) {
|
|
702484
702523
|
try {
|
|
702485
|
-
const absolutePath =
|
|
702524
|
+
const absolutePath = path332.join(project.path, trigger.path);
|
|
702486
702525
|
const triggerModule = await import(`${absolutePath}?t=${Date.now()}`);
|
|
702487
702526
|
const triggerInstance = triggerModule[trigger.export] || triggerModule.default;
|
|
702488
702527
|
if (triggerInstance && triggerInstance.payload) {
|
|
@@ -702525,7 +702564,7 @@ export default bot;`;
|
|
|
702525
702564
|
await createFile(dest, await formatCode(content2));
|
|
702526
702565
|
}
|
|
702527
702566
|
{
|
|
702528
|
-
const dest =
|
|
702567
|
+
const dest = path332.join(srcDir, "workflows.ts");
|
|
702529
702568
|
const imports = new Map;
|
|
702530
702569
|
const exports7 = new Set;
|
|
702531
702570
|
let index = 1;
|
|
@@ -702535,7 +702574,7 @@ export default bot;`;
|
|
|
702535
702574
|
}
|
|
702536
702575
|
if (!imports.has(workflow.path)) {
|
|
702537
702576
|
const name2 = `workflows_${index++}`;
|
|
702538
|
-
const importPath = getImportPath(dest,
|
|
702577
|
+
const importPath = getImportPath(dest, path332.join(project.path, workflow.path));
|
|
702539
702578
|
const statement = `import * as ${name2} from "${importPath}";`;
|
|
702540
702579
|
imports.set(workflow.path, {
|
|
702541
702580
|
name: name2,
|
|
@@ -702569,7 +702608,7 @@ export default bot;`;
|
|
|
702569
702608
|
await createFile(dest, await formatCode(content2));
|
|
702570
702609
|
}
|
|
702571
702610
|
{
|
|
702572
|
-
const dest =
|
|
702611
|
+
const dest = path332.join(srcDir, "actions.ts");
|
|
702573
702612
|
const imports = new Map;
|
|
702574
702613
|
const exports7 = new Set;
|
|
702575
702614
|
let index = 1;
|
|
@@ -702579,7 +702618,7 @@ export default bot;`;
|
|
|
702579
702618
|
}
|
|
702580
702619
|
if (!imports.has(action.path)) {
|
|
702581
702620
|
const name2 = `actions_${index++}`;
|
|
702582
|
-
const importPath = getImportPath(dest,
|
|
702621
|
+
const importPath = getImportPath(dest, path332.join(project.path, action.path));
|
|
702583
702622
|
imports.set(action.path, {
|
|
702584
702623
|
name: name2,
|
|
702585
702624
|
statement: `import * as ${name2} from "${importPath}";`
|
|
@@ -702605,14 +702644,14 @@ export default bot;`;
|
|
|
702605
702644
|
await createFile(dest, await formatCode(content2));
|
|
702606
702645
|
}
|
|
702607
702646
|
{
|
|
702608
|
-
const dest =
|
|
702647
|
+
const dest = path332.join(srcDir, "tables.ts");
|
|
702609
702648
|
const imports = new Map;
|
|
702610
702649
|
const exports7 = new Set;
|
|
702611
702650
|
let index = 1;
|
|
702612
702651
|
for (const table3 of project.tables) {
|
|
702613
702652
|
if (!imports.has(table3.path)) {
|
|
702614
702653
|
const name2 = `tables_${index++}`;
|
|
702615
|
-
const importPath = getImportPath(dest,
|
|
702654
|
+
const importPath = getImportPath(dest, path332.join(project.path, table3.path));
|
|
702616
702655
|
imports.set(table3.path, {
|
|
702617
702656
|
name: name2,
|
|
702618
702657
|
statement: `import * as ${name2} from "${importPath}";`
|
|
@@ -702638,8 +702677,8 @@ export default bot;`;
|
|
|
702638
702677
|
await createFile(dest, await formatCode(content2));
|
|
702639
702678
|
}
|
|
702640
702679
|
{
|
|
702641
|
-
const dest =
|
|
702642
|
-
const importPath = getImportPath(dest,
|
|
702680
|
+
const dest = path332.join(srcDir, "config.ts");
|
|
702681
|
+
const importPath = getImportPath(dest, path332.join(project.path, "agent.config.ts"));
|
|
702643
702682
|
const content2 = `
|
|
702644
702683
|
////////////////////////////////////////////////////////
|
|
702645
702684
|
// DO NOT EDIT THIS FILE DIRECTLY
|
|
@@ -702705,13 +702744,13 @@ export default bot;`;
|
|
|
702705
702744
|
handlers.actions.setup(bot);
|
|
702706
702745
|
}
|
|
702707
702746
|
`;
|
|
702708
|
-
await createFile(
|
|
702747
|
+
await createFile(path332.join(this.outputPath, "src", "adk-runtime.ts"), await formatCode(content));
|
|
702709
702748
|
}
|
|
702710
702749
|
async copyAssetsRuntime() {
|
|
702711
|
-
const assetsRuntimePath =
|
|
702712
|
-
if (
|
|
702713
|
-
const content = await
|
|
702714
|
-
await createFile(
|
|
702750
|
+
const assetsRuntimePath = path332.join(this.projectPath, ".adk", "assets-runtime.ts");
|
|
702751
|
+
if (existsSync7(assetsRuntimePath)) {
|
|
702752
|
+
const content = await fs16.readFile(assetsRuntimePath, "utf-8");
|
|
702753
|
+
await createFile(path332.join(this.outputPath, "src", "assets-runtime.ts"), await formatCode(content));
|
|
702715
702754
|
}
|
|
702716
702755
|
}
|
|
702717
702756
|
}
|
|
@@ -702720,9 +702759,11 @@ async function generateBotProject(options) {
|
|
|
702720
702759
|
await generator.generate();
|
|
702721
702760
|
await generator.generateAdkRuntime();
|
|
702722
702761
|
await generator.copyAssetsRuntime();
|
|
702723
|
-
const
|
|
702762
|
+
const botPath = options.outputPath || path332.join(options.projectPath, ".adk", "bot");
|
|
702763
|
+
await linkSdk(options.projectPath, botPath);
|
|
702764
|
+
const devIdManager = new DevIdManager(options.projectPath, options.outputPath || path332.join(options.projectPath, ".adk", "bot"));
|
|
702724
702765
|
await devIdManager.restoreDevId();
|
|
702725
|
-
const integrationSync = new IntegrationSync(options.projectPath, options.outputPath ||
|
|
702766
|
+
const integrationSync = new IntegrationSync(options.projectPath, options.outputPath || path332.join(options.projectPath, ".adk", "bot"));
|
|
702726
702767
|
const integrationSyncResult = await integrationSync.syncIntegrations();
|
|
702727
702768
|
if (integrationSyncResult.errors.length > 0) {
|
|
702728
702769
|
console.warn(`\u26A0\uFE0F Some integrations failed to sync:`);
|
|
@@ -702730,7 +702771,7 @@ async function generateBotProject(options) {
|
|
|
702730
702771
|
console.warn(` - ${alias}: ${error}`);
|
|
702731
702772
|
});
|
|
702732
702773
|
}
|
|
702733
|
-
const interfaceSync = new InterfaceSync(options.projectPath, options.outputPath ||
|
|
702774
|
+
const interfaceSync = new InterfaceSync(options.projectPath, options.outputPath || path332.join(options.projectPath, ".adk", "bot"));
|
|
702734
702775
|
const interfaceSyncResult = await interfaceSync.syncInterfaces();
|
|
702735
702776
|
if (interfaceSyncResult.errors.length > 0) {
|
|
702736
702777
|
console.warn(`\u26A0\uFE0F Some interfaces failed to sync:`);
|
|
@@ -703661,15 +703702,15 @@ class KnowledgeManager {
|
|
|
703661
703702
|
}
|
|
703662
703703
|
async scanLocalFileHashes(directoryPath, filterFn) {
|
|
703663
703704
|
const projectDir = this.project.path;
|
|
703664
|
-
const directory =
|
|
703705
|
+
const directory = path342.resolve(projectDir, directoryPath);
|
|
703665
703706
|
if (this.fileHashCache.has(directory)) {
|
|
703666
703707
|
return this.fileHashCache.get(directory);
|
|
703667
703708
|
}
|
|
703668
703709
|
const files = glob2.sync(directory + "/**/*.*", { absolute: true, nodir: true }).filter((file) => !filterFn || filterFn(file));
|
|
703669
703710
|
const hashes = {};
|
|
703670
703711
|
for (const file of files) {
|
|
703671
|
-
const relPath =
|
|
703672
|
-
const content = await
|
|
703712
|
+
const relPath = path342.relative(directory, file);
|
|
703713
|
+
const content = await fs17.readFile(file);
|
|
703673
703714
|
hashes[relPath] = crypto42.createHash("sha256").update(content).digest("hex");
|
|
703674
703715
|
}
|
|
703675
703716
|
this.fileHashCache.set(directory, hashes);
|
|
@@ -703776,7 +703817,7 @@ class KnowledgeManager {
|
|
|
703776
703817
|
}
|
|
703777
703818
|
async syncDirectorySource(client3, kbName, kbId, dsId, directoryPath, filterFn, force) {
|
|
703778
703819
|
const projectDir = this.project.path;
|
|
703779
|
-
const directory =
|
|
703820
|
+
const directory = path342.resolve(projectDir, directoryPath);
|
|
703780
703821
|
if (!directory.startsWith(projectDir)) {
|
|
703781
703822
|
throw new Error("Directory path must be within the agent's directory");
|
|
703782
703823
|
}
|
|
@@ -703798,8 +703839,8 @@ class KnowledgeManager {
|
|
|
703798
703839
|
return true;
|
|
703799
703840
|
}).map((f) => ({
|
|
703800
703841
|
abs: f,
|
|
703801
|
-
rel:
|
|
703802
|
-
name:
|
|
703842
|
+
rel: path342.relative(directory, f),
|
|
703843
|
+
name: path342.basename(f)
|
|
703803
703844
|
}));
|
|
703804
703845
|
console.log(` Found ${allFiles.length} files in ${directoryPath}`);
|
|
703805
703846
|
const cachedHashes = await this.scanLocalFileHashes(directoryPath, filterFn);
|
|
@@ -703873,7 +703914,7 @@ class KnowledgeManager {
|
|
|
703873
703914
|
}
|
|
703874
703915
|
async upsertFile(client3, local, dsId, tags, force, cachedHash) {
|
|
703875
703916
|
const key = `data_source://document/${dsId}/${local.rel}`;
|
|
703876
|
-
const content = await
|
|
703917
|
+
const content = await fs17.readFile(local.abs);
|
|
703877
703918
|
const hash = cachedHash ?? crypto42.createHash("sha256").update(content).digest("hex");
|
|
703878
703919
|
try {
|
|
703879
703920
|
const { file } = await client3.getFile({ id: key });
|
|
@@ -703881,7 +703922,7 @@ class KnowledgeManager {
|
|
|
703881
703922
|
return null;
|
|
703882
703923
|
}
|
|
703883
703924
|
} catch {}
|
|
703884
|
-
const title3 =
|
|
703925
|
+
const title3 = path342.basename(local.name, path342.extname(local.name));
|
|
703885
703926
|
const metadata = {
|
|
703886
703927
|
hash,
|
|
703887
703928
|
dsId,
|
|
@@ -704327,7 +704368,7 @@ class PreflightChecker {
|
|
|
704327
704368
|
options?.onProgress?.("Regenerating bot project...");
|
|
704328
704369
|
await generateBotProject({
|
|
704329
704370
|
projectPath: this.projectPath,
|
|
704330
|
-
outputPath:
|
|
704371
|
+
outputPath: path35.join(this.projectPath, ".adk", "bot")
|
|
704331
704372
|
});
|
|
704332
704373
|
options?.onSuccess?.("Bot project regenerated");
|
|
704333
704374
|
}
|
|
@@ -704339,7 +704380,7 @@ class ScriptRunner {
|
|
|
704339
704380
|
prod;
|
|
704340
704381
|
credentials;
|
|
704341
704382
|
constructor(options) {
|
|
704342
|
-
this.projectPath =
|
|
704383
|
+
this.projectPath = path36.resolve(options.projectPath);
|
|
704343
704384
|
this.forceRegenerate = options.forceRegenerate ?? false;
|
|
704344
704385
|
this.prod = options.prod ?? false;
|
|
704345
704386
|
this.credentials = options.credentials;
|
|
@@ -704348,10 +704389,10 @@ class ScriptRunner {
|
|
|
704348
704389
|
const project = await AgentProject.load(this.projectPath, {
|
|
704349
704390
|
adkCommand: "adk-build"
|
|
704350
704391
|
});
|
|
704351
|
-
const botPath =
|
|
704352
|
-
const runnerPath =
|
|
704353
|
-
const botpressTypesPath =
|
|
704354
|
-
const needsRegenerate = this.forceRegenerate || !
|
|
704392
|
+
const botPath = path36.join(this.projectPath, ".adk", "bot");
|
|
704393
|
+
const runnerPath = path36.join(botPath, "src", "script-runner.ts");
|
|
704394
|
+
const botpressTypesPath = path36.join(botPath, ".botpress", "implementation", "index.ts");
|
|
704395
|
+
const needsRegenerate = this.forceRegenerate || !existsSync9(runnerPath) || !existsSync9(botpressTypesPath);
|
|
704355
704396
|
if (needsRegenerate) {
|
|
704356
704397
|
try {
|
|
704357
704398
|
await generateAssetsTypes(project.path);
|
|
@@ -704435,12 +704476,12 @@ class ScriptRunner {
|
|
|
704435
704476
|
|
|
704436
704477
|
runScript()
|
|
704437
704478
|
`;
|
|
704438
|
-
await
|
|
704479
|
+
await fs18.writeFile(path36.join(botPath, "src", "script-runner.ts"), await formatCode(content), "utf-8");
|
|
704439
704480
|
}
|
|
704440
704481
|
async run(scriptPath, options = {}) {
|
|
704441
704482
|
const { botPath, runnerPath, project } = await this.prepare();
|
|
704442
|
-
const absoluteScriptPath =
|
|
704443
|
-
if (!
|
|
704483
|
+
const absoluteScriptPath = path36.isAbsolute(scriptPath) ? scriptPath : path36.resolve(this.projectPath, scriptPath);
|
|
704484
|
+
if (!existsSync9(absoluteScriptPath)) {
|
|
704444
704485
|
throw new Error(`Script not found: ${absoluteScriptPath}`);
|
|
704445
704486
|
}
|
|
704446
704487
|
const botId = this.prod ? project.agentInfo?.botId : project.agentInfo?.devId || project.agentInfo?.botId;
|
|
@@ -704520,7 +704561,7 @@ var import_ts_morph, __defProp11, __commonJS7 = (cb4, mod) => () => (mod || cb4(
|
|
|
704520
704561
|
`));
|
|
704521
704562
|
return code;
|
|
704522
704563
|
}
|
|
704523
|
-
}, ADK_VERSION = "1.12.
|
|
704564
|
+
}, ADK_VERSION = "1.12.3", relative22 = (from, to3) => {
|
|
704524
704565
|
const fromDir = path102.dirname(from);
|
|
704525
704566
|
const relative32 = path102.relative(fromDir, to3);
|
|
704526
704567
|
return relative32.startsWith(".") ? relative32 : `./${relative32}`;
|
|
@@ -705997,7 +706038,7 @@ var init_dist17 = __esm(() => {
|
|
|
705997
706038
|
require_package3 = __commonJS7((exports7, module) => {
|
|
705998
706039
|
module.exports = {
|
|
705999
706040
|
name: "@botpress/adk",
|
|
706000
|
-
version: "1.12.
|
|
706041
|
+
version: "1.12.3",
|
|
706001
706042
|
description: "Core ADK library for building AI agents on Botpress",
|
|
706002
706043
|
type: "module",
|
|
706003
706044
|
main: "dist/index.js",
|
|
@@ -706044,7 +706085,7 @@ var init_dist17 = __esm(() => {
|
|
|
706044
706085
|
"@botpress/cli": "^4.27.3",
|
|
706045
706086
|
"@botpress/client": "^1.28.0",
|
|
706046
706087
|
"@botpress/cognitive": "^0.2.0",
|
|
706047
|
-
"@botpress/runtime": "^1.12.
|
|
706088
|
+
"@botpress/runtime": "^1.12.3",
|
|
706048
706089
|
"@botpress/sdk": "^4.18.1",
|
|
706049
706090
|
"@bpinternal/jex": "^1.2.4",
|
|
706050
706091
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
@@ -707459,12 +707500,12 @@ ${this.stderrLines.join(`
|
|
|
707459
707500
|
const rootFiles = ["package.json", "agent.json", "agent.config.ts"];
|
|
707460
707501
|
for (const file of rootFiles) {
|
|
707461
707502
|
const filePath = join82(this.projectPath, file);
|
|
707462
|
-
if (
|
|
707503
|
+
if (existsSync8(filePath)) {
|
|
707463
707504
|
this.watchFile(filePath);
|
|
707464
707505
|
}
|
|
707465
707506
|
}
|
|
707466
707507
|
const srcPath = join82(this.projectPath, "src");
|
|
707467
|
-
if (
|
|
707508
|
+
if (existsSync8(srcPath)) {
|
|
707468
707509
|
this.initializeDirectoryState(srcPath);
|
|
707469
707510
|
this.watchDirectory(srcPath);
|
|
707470
707511
|
}
|
|
@@ -707513,7 +707554,7 @@ ${this.stderrLines.join(`
|
|
|
707513
707554
|
}
|
|
707514
707555
|
}
|
|
707515
707556
|
handleFileChange(filePath) {
|
|
707516
|
-
const fileExists =
|
|
707557
|
+
const fileExists = existsSync8(filePath);
|
|
707517
707558
|
const previousState = this.fileStates.get(filePath);
|
|
707518
707559
|
let changeType;
|
|
707519
707560
|
if (!fileExists && previousState !== undefined) {
|
|
@@ -707553,7 +707594,7 @@ ${this.stderrLines.join(`
|
|
|
707553
707594
|
this.emit("change", event3);
|
|
707554
707595
|
}
|
|
707555
707596
|
updateFileState(filePath) {
|
|
707556
|
-
if (
|
|
707597
|
+
if (existsSync8(filePath)) {
|
|
707557
707598
|
this.fileStates.set(filePath, Date.now());
|
|
707558
707599
|
}
|
|
707559
707600
|
}
|
|
@@ -707712,10 +707753,10 @@ var init_Select = __esm(async () => {
|
|
|
707712
707753
|
});
|
|
707713
707754
|
|
|
707714
707755
|
// ../../node_modules/is-docker/index.js
|
|
707715
|
-
import
|
|
707756
|
+
import fs19 from "fs";
|
|
707716
707757
|
function hasDockerEnv() {
|
|
707717
707758
|
try {
|
|
707718
|
-
|
|
707759
|
+
fs19.statSync("/.dockerenv");
|
|
707719
707760
|
return true;
|
|
707720
707761
|
} catch {
|
|
707721
707762
|
return false;
|
|
@@ -707723,7 +707764,7 @@ function hasDockerEnv() {
|
|
|
707723
707764
|
}
|
|
707724
707765
|
function hasDockerCGroup() {
|
|
707725
707766
|
try {
|
|
707726
|
-
return
|
|
707767
|
+
return fs19.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
707727
707768
|
} catch {
|
|
707728
707769
|
return false;
|
|
707729
707770
|
}
|
|
@@ -707738,7 +707779,7 @@ var isDockerCached;
|
|
|
707738
707779
|
var init_is_docker = () => {};
|
|
707739
707780
|
|
|
707740
707781
|
// ../../node_modules/is-inside-container/index.js
|
|
707741
|
-
import
|
|
707782
|
+
import fs21 from "fs";
|
|
707742
707783
|
function isInsideContainer() {
|
|
707743
707784
|
if (cachedResult === undefined) {
|
|
707744
707785
|
cachedResult = hasContainerEnv() || isDocker();
|
|
@@ -707747,7 +707788,7 @@ function isInsideContainer() {
|
|
|
707747
707788
|
}
|
|
707748
707789
|
var cachedResult, hasContainerEnv = () => {
|
|
707749
707790
|
try {
|
|
707750
|
-
|
|
707791
|
+
fs21.statSync("/run/.containerenv");
|
|
707751
707792
|
return true;
|
|
707752
707793
|
} catch {
|
|
707753
707794
|
return false;
|
|
@@ -707760,7 +707801,7 @@ var init_is_inside_container = __esm(() => {
|
|
|
707760
707801
|
// ../../node_modules/is-wsl/index.js
|
|
707761
707802
|
import process24 from "process";
|
|
707762
707803
|
import os8 from "os";
|
|
707763
|
-
import
|
|
707804
|
+
import fs25 from "fs";
|
|
707764
707805
|
var isWsl = () => {
|
|
707765
707806
|
if (process24.platform !== "linux") {
|
|
707766
707807
|
return false;
|
|
@@ -707772,7 +707813,7 @@ var isWsl = () => {
|
|
|
707772
707813
|
return true;
|
|
707773
707814
|
}
|
|
707774
707815
|
try {
|
|
707775
|
-
return
|
|
707816
|
+
return fs25.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
|
|
707776
707817
|
} catch {
|
|
707777
707818
|
return false;
|
|
707778
707819
|
}
|
|
@@ -707811,7 +707852,7 @@ function pathKey2(options = {}) {
|
|
|
707811
707852
|
|
|
707812
707853
|
// ../../node_modules/clipboardy/node_modules/execa/node_modules/npm-run-path/index.js
|
|
707813
707854
|
import process26 from "process";
|
|
707814
|
-
import
|
|
707855
|
+
import path37 from "path";
|
|
707815
707856
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
707816
707857
|
var npmRunPath2 = ({
|
|
707817
707858
|
cwd: cwd4 = process26.cwd(),
|
|
@@ -707821,7 +707862,7 @@ var npmRunPath2 = ({
|
|
|
707821
707862
|
addExecPath = true
|
|
707822
707863
|
} = {}) => {
|
|
707823
707864
|
const cwdString = cwd4 instanceof URL ? fileURLToPath7(cwd4) : cwd4;
|
|
707824
|
-
const cwdPath =
|
|
707865
|
+
const cwdPath = path37.resolve(cwdString);
|
|
707825
707866
|
const result = [];
|
|
707826
707867
|
if (preferLocal) {
|
|
707827
707868
|
applyPreferLocal2(result, cwdPath);
|
|
@@ -707829,17 +707870,17 @@ var npmRunPath2 = ({
|
|
|
707829
707870
|
if (addExecPath) {
|
|
707830
707871
|
applyExecPath2(result, execPath3, cwdPath);
|
|
707831
707872
|
}
|
|
707832
|
-
return [...result, pathOption].join(
|
|
707873
|
+
return [...result, pathOption].join(path37.delimiter);
|
|
707833
707874
|
}, applyPreferLocal2 = (result, cwdPath) => {
|
|
707834
707875
|
let previous;
|
|
707835
707876
|
while (previous !== cwdPath) {
|
|
707836
|
-
result.push(
|
|
707877
|
+
result.push(path37.join(cwdPath, "node_modules/.bin"));
|
|
707837
707878
|
previous = cwdPath;
|
|
707838
|
-
cwdPath =
|
|
707879
|
+
cwdPath = path37.resolve(cwdPath, "..");
|
|
707839
707880
|
}
|
|
707840
707881
|
}, applyExecPath2 = (result, execPath3, cwdPath) => {
|
|
707841
707882
|
const execPathString = execPath3 instanceof URL ? fileURLToPath7(execPath3) : execPath3;
|
|
707842
|
-
result.push(
|
|
707883
|
+
result.push(path37.resolve(cwdPath, execPathString, ".."));
|
|
707843
707884
|
}, npmRunPathEnv2 = ({ env: env6 = process26.env, ...options } = {}) => {
|
|
707844
707885
|
env6 = { ...env6 };
|
|
707845
707886
|
const pathName = pathKey2({ env: env6 });
|
|
@@ -708913,7 +708954,7 @@ var init_verbose = __esm(() => {
|
|
|
708913
708954
|
|
|
708914
708955
|
// ../../node_modules/clipboardy/node_modules/execa/index.js
|
|
708915
708956
|
import { Buffer as Buffer7 } from "buffer";
|
|
708916
|
-
import
|
|
708957
|
+
import path39 from "path";
|
|
708917
708958
|
import childProcess from "child_process";
|
|
708918
708959
|
import process29 from "process";
|
|
708919
708960
|
function execa2(file, args, options) {
|
|
@@ -709095,7 +709136,7 @@ var import_cross_spawn2, DEFAULT_MAX_BUFFER, getEnv2 = ({ env: envOption, extend
|
|
|
709095
709136
|
};
|
|
709096
709137
|
options.env = getEnv2(options);
|
|
709097
709138
|
options.stdio = normalizeStdio(options);
|
|
709098
|
-
if (process29.platform === "win32" &&
|
|
709139
|
+
if (process29.platform === "win32" && path39.basename(file, ".exe") === "cmd") {
|
|
709099
709140
|
args.unshift("/q");
|
|
709100
709141
|
}
|
|
709101
709142
|
return { file, args, options, parsed };
|
|
@@ -709172,7 +709213,7 @@ var init_termux = __esm(() => {
|
|
|
709172
709213
|
});
|
|
709173
709214
|
|
|
709174
709215
|
// ../../node_modules/clipboardy/lib/linux.js
|
|
709175
|
-
import
|
|
709216
|
+
import path40 from "path";
|
|
709176
709217
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
709177
709218
|
var __dirname2, xsel = "xsel", xselFallback, copyArguments, pasteArguments, makeError3 = (xselError, fallbackError) => {
|
|
709178
709219
|
let error;
|
|
@@ -709209,8 +709250,8 @@ var __dirname2, xsel = "xsel", xselFallback, copyArguments, pasteArguments, make
|
|
|
709209
709250
|
}, clipboard2, linux_default;
|
|
709210
709251
|
var init_linux = __esm(() => {
|
|
709211
709252
|
init_execa2();
|
|
709212
|
-
__dirname2 =
|
|
709213
|
-
xselFallback =
|
|
709253
|
+
__dirname2 = path40.dirname(fileURLToPath8(import.meta.url));
|
|
709254
|
+
xselFallback = path40.join(__dirname2, "../fallbacks/linux/xsel");
|
|
709214
709255
|
copyArguments = ["--clipboard", "--input"];
|
|
709215
709256
|
pasteArguments = ["--clipboard", "--output"];
|
|
709216
709257
|
clipboard2 = {
|
|
@@ -709290,15 +709331,15 @@ var init_is64bit = __esm(() => {
|
|
|
709290
709331
|
});
|
|
709291
709332
|
|
|
709292
709333
|
// ../../node_modules/clipboardy/lib/windows.js
|
|
709293
|
-
import
|
|
709334
|
+
import path41 from "path";
|
|
709294
709335
|
import { fileURLToPath as fileURLToPath9 } from "url";
|
|
709295
709336
|
var __dirname3, binarySuffix, windowBinaryPath, clipboard4, windows_default;
|
|
709296
709337
|
var init_windows = __esm(() => {
|
|
709297
709338
|
init_execa2();
|
|
709298
709339
|
init_is64bit();
|
|
709299
|
-
__dirname3 =
|
|
709340
|
+
__dirname3 = path41.dirname(fileURLToPath9(import.meta.url));
|
|
709300
709341
|
binarySuffix = is64bitSync() ? "x86_64" : "i686";
|
|
709301
|
-
windowBinaryPath =
|
|
709342
|
+
windowBinaryPath = path41.join(__dirname3, `../fallbacks/windows/clipboard_${binarySuffix}.exe`);
|
|
709302
709343
|
clipboard4 = {
|
|
709303
709344
|
copy: async (options) => execa2(windowBinaryPath, ["--copy"], options),
|
|
709304
709345
|
async paste(options) {
|
|
@@ -710832,7 +710873,7 @@ var init_package_manager = () => {};
|
|
|
710832
710873
|
|
|
710833
710874
|
// ../../node_modules/wsl-utils/index.js
|
|
710834
710875
|
import process32 from "process";
|
|
710835
|
-
import
|
|
710876
|
+
import fs27, { constants as fsConstants } from "fs/promises";
|
|
710836
710877
|
var wslDrivesMountPoint, powerShellPathFromWsl = async () => {
|
|
710837
710878
|
const mountPoint = await wslDrivesMountPoint();
|
|
710838
710879
|
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
@@ -710855,13 +710896,13 @@ var init_wsl_utils = __esm(() => {
|
|
|
710855
710896
|
const configFilePath = "/etc/wsl.conf";
|
|
710856
710897
|
let isConfigFileExists = false;
|
|
710857
710898
|
try {
|
|
710858
|
-
await
|
|
710899
|
+
await fs27.access(configFilePath, fsConstants.F_OK);
|
|
710859
710900
|
isConfigFileExists = true;
|
|
710860
710901
|
} catch {}
|
|
710861
710902
|
if (!isConfigFileExists) {
|
|
710862
710903
|
return defaultMountPoint;
|
|
710863
710904
|
}
|
|
710864
|
-
const configContent = await
|
|
710905
|
+
const configContent = await fs27.readFile(configFilePath, { encoding: "utf8" });
|
|
710865
710906
|
const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
|
|
710866
710907
|
if (!configMountPoint) {
|
|
710867
710908
|
return defaultMountPoint;
|
|
@@ -711009,11 +711050,11 @@ var init_default_browser = __esm(() => {
|
|
|
711009
711050
|
// ../../node_modules/open/index.js
|
|
711010
711051
|
import process36 from "process";
|
|
711011
711052
|
import { Buffer as Buffer8 } from "buffer";
|
|
711012
|
-
import
|
|
711053
|
+
import path44 from "path";
|
|
711013
711054
|
import { fileURLToPath as fileURLToPath10 } from "url";
|
|
711014
711055
|
import { promisify as promisify9 } from "util";
|
|
711015
711056
|
import childProcess3 from "child_process";
|
|
711016
|
-
import
|
|
711057
|
+
import fs28, { constants as fsConstants2 } from "fs/promises";
|
|
711017
711058
|
async function getWindowsDefaultBrowserFromWsl() {
|
|
711018
711059
|
const powershellPath = await powerShellPath();
|
|
711019
711060
|
const rawCommand = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
|
|
@@ -711170,7 +711211,7 @@ var execFile5, __dirname4, localXdgOpenPath, platform4, arch3, pTryEach = async
|
|
|
711170
711211
|
const isBundled = !__dirname4 || __dirname4 === "/";
|
|
711171
711212
|
let exeLocalXdgOpen = false;
|
|
711172
711213
|
try {
|
|
711173
|
-
await
|
|
711214
|
+
await fs28.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
711174
711215
|
exeLocalXdgOpen = true;
|
|
711175
711216
|
} catch {}
|
|
711176
711217
|
const useSystemXdgOpen = process36.versions.electron ?? (platform4 === "android" || isBundled || !exeLocalXdgOpen);
|
|
@@ -711219,8 +711260,8 @@ var init_open = __esm(() => {
|
|
|
711219
711260
|
init_default_browser();
|
|
711220
711261
|
init_is_inside_container();
|
|
711221
711262
|
execFile5 = promisify9(childProcess3.execFile);
|
|
711222
|
-
__dirname4 =
|
|
711223
|
-
localXdgOpenPath =
|
|
711263
|
+
__dirname4 = path44.dirname(fileURLToPath10(import.meta.url));
|
|
711264
|
+
localXdgOpenPath = path44.join(__dirname4, "xdg-open");
|
|
711224
711265
|
({ platform: platform4, arch: arch3 } = process36);
|
|
711225
711266
|
apps = {};
|
|
711226
711267
|
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
@@ -712394,7 +712435,7 @@ function isElementOfLoose(node, type) {
|
|
|
712394
712435
|
return false;
|
|
712395
712436
|
return unwrapType(node.type) === unwrapType(type);
|
|
712396
712437
|
}
|
|
712397
|
-
function sumTextStringsIn(children, TextComp,
|
|
712438
|
+
function sumTextStringsIn(children, TextComp, path38 = ["<root>"]) {
|
|
712398
712439
|
const nodes = import_react35.default.Children.toArray(children);
|
|
712399
712440
|
return nodes.reduce((acc, node) => {
|
|
712400
712441
|
if (typeof node === "string")
|
|
@@ -712405,9 +712446,9 @@ function sumTextStringsIn(children, TextComp, path37 = ["<root>"]) {
|
|
|
712405
712446
|
return acc;
|
|
712406
712447
|
if (isElementOfLoose(node, TextComp)) {
|
|
712407
712448
|
const next = getDisplayName(unwrapType(node.type));
|
|
712408
|
-
return acc + sumTextStringsIn(node.props.children, TextComp,
|
|
712449
|
+
return acc + sumTextStringsIn(node.props.children, TextComp, path38.concat(`<${next}>`));
|
|
712409
712450
|
}
|
|
712410
|
-
throw new Error(`Unsupported child in Text tree at ${
|
|
712451
|
+
throw new Error(`Unsupported child in Text tree at ${path38.join(" \u2192 ")}: ${describeNode(node)}`);
|
|
712411
712452
|
}, 0);
|
|
712412
712453
|
}
|
|
712413
712454
|
function flattenChildren(children) {
|
|
@@ -712595,7 +712636,7 @@ var init_Separator = __esm(async () => {
|
|
|
712595
712636
|
var require_package4 = __commonJS((exports7, module) => {
|
|
712596
712637
|
module.exports = {
|
|
712597
712638
|
name: "@botpress/adk",
|
|
712598
|
-
version: "1.12.
|
|
712639
|
+
version: "1.12.3",
|
|
712599
712640
|
description: "Core ADK library for building AI agents on Botpress",
|
|
712600
712641
|
type: "module",
|
|
712601
712642
|
main: "dist/index.js",
|
|
@@ -712642,7 +712683,7 @@ var require_package4 = __commonJS((exports7, module) => {
|
|
|
712642
712683
|
"@botpress/cli": "^4.27.3",
|
|
712643
712684
|
"@botpress/client": "^1.28.0",
|
|
712644
712685
|
"@botpress/cognitive": "^0.2.0",
|
|
712645
|
-
"@botpress/runtime": "^1.12.
|
|
712686
|
+
"@botpress/runtime": "^1.12.3",
|
|
712646
712687
|
"@botpress/sdk": "^4.18.1",
|
|
712647
712688
|
"@bpinternal/jex": "^1.2.4",
|
|
712648
712689
|
"@bpinternal/yargs-extra": "^0.0.21",
|
|
@@ -713536,7 +713577,7 @@ var init_DevStatus = __esm(async () => {
|
|
|
713536
713577
|
});
|
|
713537
713578
|
|
|
713538
713579
|
// src/components/LogsView.tsx
|
|
713539
|
-
import { readFileSync as readFileSync9, existsSync as
|
|
713580
|
+
import { readFileSync as readFileSync9, existsSync as existsSync10, statSync as statSync2, watchFile, unwatchFile } from "fs";
|
|
713540
713581
|
var import_react37, jsx_dev_runtime18, parseLogLine = (line, lineNumber) => {
|
|
713541
713582
|
try {
|
|
713542
713583
|
const parsed = JSON.parse(line);
|
|
@@ -713580,7 +713621,7 @@ var import_react37, jsx_dev_runtime18, parseLogLine = (line, lineNumber) => {
|
|
|
713580
713621
|
});
|
|
713581
713622
|
}
|
|
713582
713623
|
import_react37.useEffect(() => {
|
|
713583
|
-
if (!
|
|
713624
|
+
if (!existsSync10(logFilePath)) {
|
|
713584
713625
|
return;
|
|
713585
713626
|
}
|
|
713586
713627
|
const checkForNewLogs = () => {
|
|
@@ -714536,12 +714577,12 @@ __export(exports_runtime_version_check, {
|
|
|
714536
714577
|
getInstalledRuntimeVersion: () => getInstalledRuntimeVersion,
|
|
714537
714578
|
checkRuntimeVersion: () => checkRuntimeVersion
|
|
714538
714579
|
});
|
|
714539
|
-
import { readFileSync as readFileSync10, existsSync as
|
|
714580
|
+
import { readFileSync as readFileSync10, existsSync as existsSync12 } from "fs";
|
|
714540
714581
|
import { join as join12 } from "path";
|
|
714541
714582
|
function getInstalledRuntimeVersion(agentRoot) {
|
|
714542
714583
|
try {
|
|
714543
714584
|
const runtimePackagePath = join12(agentRoot, "node_modules", "@botpress", "runtime", "package.json");
|
|
714544
|
-
if (!
|
|
714585
|
+
if (!existsSync12(runtimePackagePath)) {
|
|
714545
714586
|
return null;
|
|
714546
714587
|
}
|
|
714547
714588
|
const packageJson = JSON.parse(readFileSync10(runtimePackagePath, "utf-8"));
|
|
@@ -714582,7 +714623,7 @@ function checkRuntimeVersion(agentRoot) {
|
|
|
714582
714623
|
`));
|
|
714583
714624
|
}
|
|
714584
714625
|
}
|
|
714585
|
-
var semver2, EXPECTED_RUNTIME_VERSION = "1.12.
|
|
714626
|
+
var semver2, EXPECTED_RUNTIME_VERSION = "1.12.3", SUPPORTED_RUNTIME_RANGE = ">=1.11.0";
|
|
714586
714627
|
var init_runtime_version_check = __esm(() => {
|
|
714587
714628
|
init_source();
|
|
714588
714629
|
semver2 = __toESM(require_semver2(), 1);
|
|
@@ -714616,7 +714657,7 @@ function updateWorkerStats(stats) {
|
|
|
714616
714657
|
var serverConfig, serverStartTime, devCommandStatus = "running", latestWorkerStats = null;
|
|
714617
714658
|
|
|
714618
714659
|
// src/utils/trace-reader.ts
|
|
714619
|
-
import { existsSync as
|
|
714660
|
+
import { existsSync as existsSync13, readFileSync as readFileSync11 } from "fs";
|
|
714620
714661
|
import { join as join13 } from "path";
|
|
714621
714662
|
import { Transform as Transform3 } from "stream";
|
|
714622
714663
|
|
|
@@ -714640,7 +714681,7 @@ class TraceReader {
|
|
|
714640
714681
|
const indexedAttributes = ["conversationId", "messageId", "eventId", "userId", "workflowId"];
|
|
714641
714682
|
if (indexedAttributes.includes(attributeName)) {
|
|
714642
714683
|
const indexFile3 = this.getIndexFile();
|
|
714643
|
-
if (
|
|
714684
|
+
if (existsSync13(indexFile3)) {
|
|
714644
714685
|
const lines = readFileSync11(indexFile3, "utf-8").split(`
|
|
714645
714686
|
`).filter(Boolean);
|
|
714646
714687
|
for (let i2 = lines.length - 1;i2 >= 0; i2--) {
|
|
@@ -714660,7 +714701,7 @@ class TraceReader {
|
|
|
714660
714701
|
}
|
|
714661
714702
|
} else {
|
|
714662
714703
|
const dayFile3 = this.getDayFile();
|
|
714663
|
-
if (
|
|
714704
|
+
if (existsSync13(dayFile3)) {
|
|
714664
714705
|
const lines = readFileSync11(dayFile3, "utf-8").split(`
|
|
714665
714706
|
`).filter(Boolean);
|
|
714666
714707
|
for (let i2 = lines.length - 1;i2 >= 0; i2--) {
|
|
@@ -714681,7 +714722,7 @@ class TraceReader {
|
|
|
714681
714722
|
}
|
|
714682
714723
|
for (const traceId of relatedTraceIds) {
|
|
714683
714724
|
const traceFile = join13(this.byTraceDir, `${traceId}.ndjson`);
|
|
714684
|
-
if (
|
|
714725
|
+
if (existsSync13(traceFile)) {
|
|
714685
714726
|
const traceLines = readFileSync11(traceFile, "utf-8").split(`
|
|
714686
714727
|
`).filter(Boolean);
|
|
714687
714728
|
for (const line of traceLines) {
|
|
@@ -714696,7 +714737,7 @@ class TraceReader {
|
|
|
714696
714737
|
async getTraceById(traceId) {
|
|
714697
714738
|
const spans = [];
|
|
714698
714739
|
const traceFile = join13(this.byTraceDir, `${traceId}.ndjson`);
|
|
714699
|
-
if (
|
|
714740
|
+
if (existsSync13(traceFile)) {
|
|
714700
714741
|
const lines = readFileSync11(traceFile, "utf-8").split(`
|
|
714701
714742
|
`).filter(Boolean);
|
|
714702
714743
|
for (const line of lines) {
|
|
@@ -714710,7 +714751,7 @@ class TraceReader {
|
|
|
714710
714751
|
async getRecentTraces(limit = 100) {
|
|
714711
714752
|
const spans = [];
|
|
714712
714753
|
const dayFile3 = this.getDayFile();
|
|
714713
|
-
if (
|
|
714754
|
+
if (existsSync13(dayFile3)) {
|
|
714714
714755
|
const lines = readFileSync11(dayFile3, "utf-8").split(`
|
|
714715
714756
|
`).filter(Boolean);
|
|
714716
714757
|
const recentLines = lines.slice(-limit);
|
|
@@ -714725,7 +714766,7 @@ class TraceReader {
|
|
|
714725
714766
|
async getAllTodayTraces() {
|
|
714726
714767
|
const spans = [];
|
|
714727
714768
|
const dayFile3 = this.getDayFile();
|
|
714728
|
-
if (
|
|
714769
|
+
if (existsSync13(dayFile3)) {
|
|
714729
714770
|
const lines = readFileSync11(dayFile3, "utf-8").split(`
|
|
714730
714771
|
`).filter(Boolean);
|
|
714731
714772
|
for (const line of lines) {
|
|
@@ -714744,11 +714785,11 @@ class TraceReader {
|
|
|
714744
714785
|
callback();
|
|
714745
714786
|
}
|
|
714746
714787
|
});
|
|
714747
|
-
if (
|
|
714788
|
+
if (existsSync13(this.liveFile)) {
|
|
714748
714789
|
let lastSize = 0;
|
|
714749
714790
|
const watcher = setInterval(() => {
|
|
714750
714791
|
try {
|
|
714751
|
-
const stats =
|
|
714792
|
+
const stats = existsSync13(this.liveFile) ? __require("fs").statSync(this.liveFile) : null;
|
|
714752
714793
|
if (stats && stats.size > lastSize) {
|
|
714753
714794
|
const newContent = readFileSync11(this.liveFile, "utf-8");
|
|
714754
714795
|
const lines = newContent.split(`
|
|
@@ -714793,12 +714834,12 @@ class TraceReader {
|
|
|
714793
714834
|
|
|
714794
714835
|
`));
|
|
714795
714836
|
let id3 = 0;
|
|
714796
|
-
if (
|
|
714837
|
+
if (existsSync13(this.liveFile)) {
|
|
714797
714838
|
const stats = __require("fs").statSync(this.liveFile);
|
|
714798
714839
|
filePosition = stats.size;
|
|
714799
714840
|
}
|
|
714800
714841
|
watchTimer = setInterval(async () => {
|
|
714801
|
-
if (!
|
|
714842
|
+
if (!existsSync13(this.liveFile))
|
|
714802
714843
|
return;
|
|
714803
714844
|
try {
|
|
714804
714845
|
const stats = __require("fs").statSync(this.liveFile);
|
|
@@ -714807,8 +714848,8 @@ class TraceReader {
|
|
|
714807
714848
|
partialLine = "";
|
|
714808
714849
|
}
|
|
714809
714850
|
if (stats.size > filePosition) {
|
|
714810
|
-
const
|
|
714811
|
-
const stream7 =
|
|
714851
|
+
const fs20 = __require("fs");
|
|
714852
|
+
const stream7 = fs20.createReadStream(this.liveFile, {
|
|
714812
714853
|
encoding: "utf-8",
|
|
714813
714854
|
start: filePosition,
|
|
714814
714855
|
end: stats.size - 1
|
|
@@ -715007,13 +715048,13 @@ var init_validation2 = __esm(() => {
|
|
|
715007
715048
|
});
|
|
715008
715049
|
|
|
715009
715050
|
// src/server/handlers/health.ts
|
|
715010
|
-
import { existsSync as
|
|
715051
|
+
import { existsSync as existsSync14, readFileSync as readFileSync12 } from "fs";
|
|
715011
715052
|
import { join as join14 } from "path";
|
|
715012
715053
|
async function handleHealth() {
|
|
715013
715054
|
let adkVersion = "unknown";
|
|
715014
715055
|
try {
|
|
715015
715056
|
const adkPackagePath = join14(process.cwd(), "node_modules/@botpress/adk/package.json");
|
|
715016
|
-
if (
|
|
715057
|
+
if (existsSync14(adkPackagePath)) {
|
|
715017
715058
|
const pkg = JSON.parse(readFileSync12(adkPackagePath, "utf-8"));
|
|
715018
715059
|
adkVersion = pkg.version;
|
|
715019
715060
|
}
|
|
@@ -715065,7 +715106,7 @@ var init_worker_stats = __esm(() => {
|
|
|
715065
715106
|
});
|
|
715066
715107
|
|
|
715067
715108
|
// src/server/handlers/agent.ts
|
|
715068
|
-
import { existsSync as
|
|
715109
|
+
import { existsSync as existsSync15, readFileSync as readFileSync13 } from "fs";
|
|
715069
715110
|
import { join as join15 } from "path";
|
|
715070
715111
|
function handleAgentInfo() {
|
|
715071
715112
|
const serverConfig2 = getServerConfig();
|
|
@@ -715075,14 +715116,14 @@ function handleAgentInfo() {
|
|
|
715075
715116
|
let agentInfo = {
|
|
715076
715117
|
path: serverConfig2.agentPath
|
|
715077
715118
|
};
|
|
715078
|
-
if (
|
|
715119
|
+
if (existsSync15(agentConfigPath)) {
|
|
715079
715120
|
const configContent = readFileSync13(agentConfigPath, "utf-8");
|
|
715080
715121
|
const nameMatch = configContent.match(/name:\s*['"`]([^'"`]+)['"`]/);
|
|
715081
715122
|
const versionMatch = configContent.match(/version:\s*['"`]([^'"`]+)['"`]/);
|
|
715082
715123
|
agentInfo.name = nameMatch?.[1] || "unknown";
|
|
715083
715124
|
agentInfo.version = versionMatch?.[1] || "0.0.0";
|
|
715084
715125
|
}
|
|
715085
|
-
if (
|
|
715126
|
+
if (existsSync15(agentJsonPath)) {
|
|
715086
715127
|
try {
|
|
715087
715128
|
const agentJson = JSON.parse(readFileSync13(agentJsonPath, "utf-8"));
|
|
715088
715129
|
agentInfo = { ...agentInfo, ...agentJson };
|
|
@@ -715264,7 +715305,7 @@ var init_inspector = __esm(() => {
|
|
|
715264
715305
|
});
|
|
715265
715306
|
|
|
715266
715307
|
// src/server/routes/streaming.ts
|
|
715267
|
-
import { existsSync as
|
|
715308
|
+
import { existsSync as existsSync16, createReadStream as createReadStream4, statSync as statSync3, watch as watch3 } from "fs";
|
|
715268
715309
|
import { createInterface as createInterface2 } from "readline";
|
|
715269
715310
|
function handleSSEStream(req) {
|
|
715270
715311
|
const headers = {
|
|
@@ -715303,7 +715344,7 @@ function streamLogs(logFilePath) {
|
|
|
715303
715344
|
`));
|
|
715304
715345
|
};
|
|
715305
715346
|
try {
|
|
715306
|
-
if (
|
|
715347
|
+
if (existsSync16(logFilePath)) {
|
|
715307
715348
|
const fileStream = createReadStream4(logFilePath, { encoding: "utf-8" });
|
|
715308
715349
|
const rl = createInterface2({
|
|
715309
715350
|
input: fileStream,
|
|
@@ -715318,9 +715359,9 @@ function streamLogs(logFilePath) {
|
|
|
715318
715359
|
}
|
|
715319
715360
|
}
|
|
715320
715361
|
}
|
|
715321
|
-
let lastSize =
|
|
715362
|
+
let lastSize = existsSync16(logFilePath) ? statSync3(logFilePath).size : 0;
|
|
715322
715363
|
const watcher = watch3(logFilePath, async (eventType) => {
|
|
715323
|
-
if (eventType === "change" &&
|
|
715364
|
+
if (eventType === "change" && existsSync16(logFilePath)) {
|
|
715324
715365
|
const currentSize = statSync3(logFilePath).size;
|
|
715325
715366
|
if (currentSize > lastSize) {
|
|
715326
715367
|
const fileStream = createReadStream4(logFilePath, {
|
|
@@ -715441,8 +715482,8 @@ var init_api = __esm(() => {
|
|
|
715441
715482
|
});
|
|
715442
715483
|
|
|
715443
715484
|
// src/utils/embedded-assets.ts
|
|
715444
|
-
function getEmbeddedAsset(
|
|
715445
|
-
return embeddedAssets.find((asset) => asset.path ===
|
|
715485
|
+
function getEmbeddedAsset(path38) {
|
|
715486
|
+
return embeddedAssets.find((asset) => asset.path === path38);
|
|
715446
715487
|
}
|
|
715447
715488
|
function hasEmbeddedAssets() {
|
|
715448
715489
|
return embeddedAssets.length > 0;
|
|
@@ -718357,16 +718398,16 @@ function getContentType(pathname) {
|
|
|
718357
718398
|
}
|
|
718358
718399
|
|
|
718359
718400
|
// src/server/routes/static.ts
|
|
718360
|
-
import { readFileSync as readFileSync14, existsSync as
|
|
718401
|
+
import { readFileSync as readFileSync14, existsSync as existsSync17 } from "fs";
|
|
718361
718402
|
import { join as join16, resolve as resolve5 } from "path";
|
|
718362
|
-
import
|
|
718403
|
+
import path46 from "path";
|
|
718363
718404
|
import { fileURLToPath as fileURLToPath11 } from "url";
|
|
718364
718405
|
function getUIDistPath() {
|
|
718365
718406
|
const __filename2 = fileURLToPath11(import.meta.url);
|
|
718366
|
-
const __dirname5 =
|
|
718407
|
+
const __dirname5 = path46.dirname(__filename2);
|
|
718367
718408
|
const isBinary = !__filename2.endsWith(".js") && !__filename2.endsWith(".ts");
|
|
718368
718409
|
if (isBinary) {
|
|
718369
|
-
const execDir =
|
|
718410
|
+
const execDir = path46.dirname(process.execPath);
|
|
718370
718411
|
return resolve5(execDir, "assets/ui-dist");
|
|
718371
718412
|
} else {
|
|
718372
718413
|
const isCompiledDist = __filename2.includes("/dist/");
|
|
@@ -718388,7 +718429,7 @@ function serveStaticFile(pathname, uiDistPath) {
|
|
|
718388
718429
|
}
|
|
718389
718430
|
}
|
|
718390
718431
|
const indexPath2 = join16(uiDistPath, "index.html");
|
|
718391
|
-
if (
|
|
718432
|
+
if (existsSync17(indexPath2)) {
|
|
718392
718433
|
return new Response(readFileSync14(indexPath2), {
|
|
718393
718434
|
headers: {
|
|
718394
718435
|
"Content-Type": "text/html",
|
|
@@ -718416,7 +718457,7 @@ function serveStaticFile(pathname, uiDistPath) {
|
|
|
718416
718457
|
if (pathname.startsWith("/assets/")) {
|
|
718417
718458
|
filePath = join16(uiDistPath, pathname);
|
|
718418
718459
|
}
|
|
718419
|
-
if (
|
|
718460
|
+
if (existsSync17(filePath)) {
|
|
718420
718461
|
const file = readFileSync14(filePath);
|
|
718421
718462
|
return new Response(file, {
|
|
718422
718463
|
headers: {
|
|
@@ -718437,7 +718478,7 @@ function serveStaticFile(pathname, uiDistPath) {
|
|
|
718437
718478
|
}
|
|
718438
718479
|
}
|
|
718439
718480
|
const indexPath = join16(uiDistPath, "index.html");
|
|
718440
|
-
if (
|
|
718481
|
+
if (existsSync17(indexPath)) {
|
|
718441
718482
|
return new Response(readFileSync14(indexPath), {
|
|
718442
718483
|
headers: {
|
|
718443
718484
|
"Content-Type": "text/html",
|
|
@@ -718506,7 +718547,7 @@ var init_server = __esm(() => {
|
|
|
718506
718547
|
// src/utils/node-inspector.ts
|
|
718507
718548
|
import { spawn as spawn3 } from "child_process";
|
|
718508
718549
|
import os11 from "os";
|
|
718509
|
-
import
|
|
718550
|
+
import path47 from "path";
|
|
718510
718551
|
function openDevtools(url4) {
|
|
718511
718552
|
const platform5 = os11.platform();
|
|
718512
718553
|
if (platform5 === "darwin") {
|
|
@@ -718525,9 +718566,9 @@ function openDevtools(url4) {
|
|
|
718525
718566
|
}).unref();
|
|
718526
718567
|
};
|
|
718527
718568
|
const candidates = [
|
|
718528
|
-
|
|
718529
|
-
|
|
718530
|
-
|
|
718569
|
+
path47.join(process.env["ProgramFiles"] ?? "", "Google/Chrome/Application/chrome.exe"),
|
|
718570
|
+
path47.join(process.env["ProgramFiles(x86)"] ?? "", "Google/Chrome/Application/chrome.exe"),
|
|
718571
|
+
path47.join(process.env["LocalAppData"] ?? "", "Google/Chrome/Application/chrome.exe")
|
|
718531
718572
|
].filter(Boolean);
|
|
718532
718573
|
return tryStart(candidates.find(() => true));
|
|
718533
718574
|
}
|
|
@@ -718626,7 +718667,7 @@ var init_debugger = __esm(() => {
|
|
|
718626
718667
|
});
|
|
718627
718668
|
|
|
718628
718669
|
// src/utils/inspector-pid-cache.ts
|
|
718629
|
-
import { existsSync as
|
|
718670
|
+
import { existsSync as existsSync18, readFileSync as readFileSync15, writeFileSync as writeFileSync5, mkdirSync as mkdirSync2 } from "fs";
|
|
718630
718671
|
import { join as join17 } from "path";
|
|
718631
718672
|
function getCachePath(agentRoot) {
|
|
718632
718673
|
const adkDir = join17(agentRoot, ".adk");
|
|
@@ -718635,7 +718676,7 @@ function getCachePath(agentRoot) {
|
|
|
718635
718676
|
}
|
|
718636
718677
|
function readCache2(agentRoot) {
|
|
718637
718678
|
const cachePath = getCachePath(agentRoot);
|
|
718638
|
-
if (!
|
|
718679
|
+
if (!existsSync18(cachePath)) {
|
|
718639
718680
|
return { pids: [] };
|
|
718640
718681
|
}
|
|
718641
718682
|
try {
|
|
@@ -718687,7 +718728,7 @@ __export(exports_adk_dev, {
|
|
|
718687
718728
|
adkDev: () => adkDev
|
|
718688
718729
|
});
|
|
718689
718730
|
import { createWriteStream as createWriteStream3, mkdirSync as mkdirSync3 } from "fs";
|
|
718690
|
-
import
|
|
718731
|
+
import path48 from "path";
|
|
718691
718732
|
async function adkDev(port = "3000", options = {
|
|
718692
718733
|
ui: true,
|
|
718693
718734
|
logs: false
|
|
@@ -718706,9 +718747,9 @@ async function adkDev(port = "3000", options = {
|
|
|
718706
718747
|
const dateStr = now2.toISOString().replace(/[:.]/g, "-").split("T")[0];
|
|
718707
718748
|
const timeStr = now2.toTimeString().split(" ")[0].replace(/:/g, "-");
|
|
718708
718749
|
const logFileName = `adk-dev-${dateStr}-${timeStr}.log`;
|
|
718709
|
-
const logsDir =
|
|
718750
|
+
const logsDir = path48.join(agentRoot, ".adk", "logs");
|
|
718710
718751
|
mkdirSync3(logsDir, { recursive: true });
|
|
718711
|
-
const logFilePath =
|
|
718752
|
+
const logFilePath = path48.join(logsDir, logFileName);
|
|
718712
718753
|
const { unmount, waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime23.jsxDEV(DevUI, {
|
|
718713
718754
|
port,
|
|
718714
718755
|
portConsole,
|
|
@@ -718958,7 +718999,7 @@ var import_react39, jsx_dev_runtime23, DevUI = ({ port, portConsole, options, lo
|
|
|
718958
718999
|
};
|
|
718959
719000
|
const setupLogging = () => {
|
|
718960
719001
|
const agentRoot = debuggerRef.current.agentRoot;
|
|
718961
|
-
const logsDir =
|
|
719002
|
+
const logsDir = path48.join(agentRoot, ".adk", "logs");
|
|
718962
719003
|
mkdirSync3(logsDir, { recursive: true });
|
|
718963
719004
|
const logStream = createWriteStream3(logFilePath, { flags: "a" });
|
|
718964
719005
|
return logStream;
|
|
@@ -718975,7 +719016,7 @@ var import_react39, jsx_dev_runtime23, DevUI = ({ port, portConsole, options, lo
|
|
|
718975
719016
|
};
|
|
718976
719017
|
const generateBot = async (agentProject2) => {
|
|
718977
719018
|
addActivity("Generating bot project...");
|
|
718978
|
-
const botPath =
|
|
719019
|
+
const botPath = path48.join(agentProject2.path, ".adk", "bot");
|
|
718979
719020
|
await generateBotProject({
|
|
718980
719021
|
projectPath: agentProject2.path,
|
|
718981
719022
|
outputPath: botPath
|
|
@@ -719709,7 +719750,7 @@ var exports_adk_build = {};
|
|
|
719709
719750
|
__export(exports_adk_build, {
|
|
719710
719751
|
adkBuild: () => adkBuild
|
|
719711
719752
|
});
|
|
719712
|
-
import
|
|
719753
|
+
import path49 from "path";
|
|
719713
719754
|
async function adkBuild(options = {}) {
|
|
719714
719755
|
const { silent = false } = options;
|
|
719715
719756
|
const log4 = silent ? () => {} : console.log;
|
|
@@ -719735,7 +719776,7 @@ async function adkBuild(options = {}) {
|
|
|
719735
719776
|
log4(source_default.yellow("\u26A0\uFE0F No assets directory found, skipping asset type generation"));
|
|
719736
719777
|
}
|
|
719737
719778
|
log4(source_default.cyan("\uD83D\uDD28 Generating Botpress bot project..."));
|
|
719738
|
-
const botPath =
|
|
719779
|
+
const botPath = path49.join(project.path, ".adk", "bot");
|
|
719739
719780
|
await generateBotProject({
|
|
719740
719781
|
projectPath: project.path,
|
|
719741
719782
|
outputPath: botPath
|
|
@@ -719747,7 +719788,7 @@ async function adkBuild(options = {}) {
|
|
|
719747
719788
|
await buildCommand.output();
|
|
719748
719789
|
log4(source_default.green(`
|
|
719749
719790
|
\u2705 Build completed successfully!`));
|
|
719750
|
-
log4(source_default.gray(`\uD83D\uDCE6 Output directory: ${
|
|
719791
|
+
log4(source_default.gray(`\uD83D\uDCE6 Output directory: ${path49.join(botPath, ".botpress", "dist")}`));
|
|
719751
719792
|
log4(source_default.gray(`
|
|
719752
719793
|
Next steps:`));
|
|
719753
719794
|
log4(source_default.gray(" - Run `adk deploy` to deploy your agent"));
|
|
@@ -720078,7 +720119,7 @@ var exports_adk_deploy = {};
|
|
|
720078
720119
|
__export(exports_adk_deploy, {
|
|
720079
720120
|
adkDeploy: () => adkDeploy
|
|
720080
720121
|
});
|
|
720081
|
-
import
|
|
720122
|
+
import path50 from "path";
|
|
720082
720123
|
import readline from "readline";
|
|
720083
720124
|
async function promptUserApproval() {
|
|
720084
720125
|
const readlineInterface = readline.createInterface({
|
|
@@ -720162,7 +720203,7 @@ async function adkDeploy(environment = "production", options = {}) {
|
|
|
720162
720203
|
}
|
|
720163
720204
|
const credentials = await auth.getAgentCredentials(agentRoot);
|
|
720164
720205
|
const workspaceId = credentials.workspaceId;
|
|
720165
|
-
const botPath =
|
|
720206
|
+
const botPath = path50.join(project.path, ".adk", "bot");
|
|
720166
720207
|
console.log(source_default.cyan(`
|
|
720167
720208
|
\uD83D\uDCE4 Deploying bot to Botpress...`));
|
|
720168
720209
|
const deployCommand = new BpDeployCommand({
|
|
@@ -722533,11 +722574,11 @@ var init_adk_integration = __esm(async () => {
|
|
|
722533
722574
|
|
|
722534
722575
|
// ../../node_modules/@isaacs/fs-minipass/dist/esm/index.js
|
|
722535
722576
|
import EE3 from "events";
|
|
722536
|
-
import
|
|
722577
|
+
import fs29 from "fs";
|
|
722537
722578
|
var writev, _autoClose, _close, _ended, _fd, _finished, _flags, _flush, _handleChunk, _makeBuf, _mode, _needDrain, _onerror, _onopen, _onread, _onwrite, _open, _path, _pos, _queue, _read, _readSize, _reading, _remain, _size, _write, _writing, _defaultFlag, _errored, ReadStream, ReadStreamSync, WriteStream, WriteStreamSync;
|
|
722538
722579
|
var init_esm17 = __esm(() => {
|
|
722539
722580
|
init_esm13();
|
|
722540
|
-
writev =
|
|
722581
|
+
writev = fs29.writev;
|
|
722541
722582
|
_autoClose = Symbol("_autoClose");
|
|
722542
722583
|
_close = Symbol("_close");
|
|
722543
722584
|
_ended = Symbol("_ended");
|
|
@@ -722575,17 +722616,17 @@ var init_esm17 = __esm(() => {
|
|
|
722575
722616
|
[_size];
|
|
722576
722617
|
[_remain];
|
|
722577
722618
|
[_autoClose];
|
|
722578
|
-
constructor(
|
|
722619
|
+
constructor(path38, opt) {
|
|
722579
722620
|
opt = opt || {};
|
|
722580
722621
|
super(opt);
|
|
722581
722622
|
this.readable = true;
|
|
722582
722623
|
this.writable = false;
|
|
722583
|
-
if (typeof
|
|
722624
|
+
if (typeof path38 !== "string") {
|
|
722584
722625
|
throw new TypeError("path must be a string");
|
|
722585
722626
|
}
|
|
722586
722627
|
this[_errored] = false;
|
|
722587
722628
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : undefined;
|
|
722588
|
-
this[_path] =
|
|
722629
|
+
this[_path] = path38;
|
|
722589
722630
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
722590
722631
|
this[_reading] = false;
|
|
722591
722632
|
this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -722610,7 +722651,7 @@ var init_esm17 = __esm(() => {
|
|
|
722610
722651
|
throw new TypeError("this is a readable stream");
|
|
722611
722652
|
}
|
|
722612
722653
|
[_open]() {
|
|
722613
|
-
|
|
722654
|
+
fs29.open(this[_path], "r", (er3, fd4) => this[_onopen](er3, fd4));
|
|
722614
722655
|
}
|
|
722615
722656
|
[_onopen](er3, fd4) {
|
|
722616
722657
|
if (er3) {
|
|
@@ -722631,7 +722672,7 @@ var init_esm17 = __esm(() => {
|
|
|
722631
722672
|
if (buf.length === 0) {
|
|
722632
722673
|
return process.nextTick(() => this[_onread](null, 0, buf));
|
|
722633
722674
|
}
|
|
722634
|
-
|
|
722675
|
+
fs29.read(this[_fd], buf, 0, buf.length, null, (er3, br3, b5) => this[_onread](er3, br3, b5));
|
|
722635
722676
|
}
|
|
722636
722677
|
}
|
|
722637
722678
|
[_onread](er3, br3, buf) {
|
|
@@ -722646,7 +722687,7 @@ var init_esm17 = __esm(() => {
|
|
|
722646
722687
|
if (this[_autoClose] && typeof this[_fd] === "number") {
|
|
722647
722688
|
const fd4 = this[_fd];
|
|
722648
722689
|
this[_fd] = undefined;
|
|
722649
|
-
|
|
722690
|
+
fs29.close(fd4, (er3) => er3 ? this.emit("error", er3) : this.emit("close"));
|
|
722650
722691
|
}
|
|
722651
722692
|
}
|
|
722652
722693
|
[_onerror](er3) {
|
|
@@ -722692,7 +722733,7 @@ var init_esm17 = __esm(() => {
|
|
|
722692
722733
|
[_open]() {
|
|
722693
722734
|
let threw = true;
|
|
722694
722735
|
try {
|
|
722695
|
-
this[_onopen](null,
|
|
722736
|
+
this[_onopen](null, fs29.openSync(this[_path], "r"));
|
|
722696
722737
|
threw = false;
|
|
722697
722738
|
} finally {
|
|
722698
722739
|
if (threw) {
|
|
@@ -722707,7 +722748,7 @@ var init_esm17 = __esm(() => {
|
|
|
722707
722748
|
this[_reading] = true;
|
|
722708
722749
|
do {
|
|
722709
722750
|
const buf = this[_makeBuf]();
|
|
722710
|
-
const br3 = buf.length === 0 ? 0 :
|
|
722751
|
+
const br3 = buf.length === 0 ? 0 : fs29.readSync(this[_fd], buf, 0, buf.length, null);
|
|
722711
722752
|
if (!this[_handleChunk](br3, buf)) {
|
|
722712
722753
|
break;
|
|
722713
722754
|
}
|
|
@@ -722725,7 +722766,7 @@ var init_esm17 = __esm(() => {
|
|
|
722725
722766
|
if (this[_autoClose] && typeof this[_fd] === "number") {
|
|
722726
722767
|
const fd4 = this[_fd];
|
|
722727
722768
|
this[_fd] = undefined;
|
|
722728
|
-
|
|
722769
|
+
fs29.closeSync(fd4);
|
|
722729
722770
|
this.emit("close");
|
|
722730
722771
|
}
|
|
722731
722772
|
}
|
|
@@ -722746,10 +722787,10 @@ var init_esm17 = __esm(() => {
|
|
|
722746
722787
|
[_flags];
|
|
722747
722788
|
[_finished] = false;
|
|
722748
722789
|
[_pos];
|
|
722749
|
-
constructor(
|
|
722790
|
+
constructor(path38, opt) {
|
|
722750
722791
|
opt = opt || {};
|
|
722751
722792
|
super(opt);
|
|
722752
|
-
this[_path] =
|
|
722793
|
+
this[_path] = path38;
|
|
722753
722794
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : undefined;
|
|
722754
722795
|
this[_mode] = opt.mode === undefined ? 438 : opt.mode;
|
|
722755
722796
|
this[_pos] = typeof opt.start === "number" ? opt.start : undefined;
|
|
@@ -722782,7 +722823,7 @@ var init_esm17 = __esm(() => {
|
|
|
722782
722823
|
this.emit("error", er3);
|
|
722783
722824
|
}
|
|
722784
722825
|
[_open]() {
|
|
722785
|
-
|
|
722826
|
+
fs29.open(this[_path], this[_flags], this[_mode], (er3, fd4) => this[_onopen](er3, fd4));
|
|
722786
722827
|
}
|
|
722787
722828
|
[_onopen](er3, fd4) {
|
|
722788
722829
|
if (this[_defaultFlag] && this[_flags] === "r+" && er3 && er3.code === "ENOENT") {
|
|
@@ -722826,7 +722867,7 @@ var init_esm17 = __esm(() => {
|
|
|
722826
722867
|
return true;
|
|
722827
722868
|
}
|
|
722828
722869
|
[_write](buf) {
|
|
722829
|
-
|
|
722870
|
+
fs29.write(this[_fd], buf, 0, buf.length, this[_pos], (er3, bw3) => this[_onwrite](er3, bw3));
|
|
722830
722871
|
}
|
|
722831
722872
|
[_onwrite](er3, bw3) {
|
|
722832
722873
|
if (er3) {
|
|
@@ -722867,7 +722908,7 @@ var init_esm17 = __esm(() => {
|
|
|
722867
722908
|
if (this[_autoClose] && typeof this[_fd] === "number") {
|
|
722868
722909
|
const fd4 = this[_fd];
|
|
722869
722910
|
this[_fd] = undefined;
|
|
722870
|
-
|
|
722911
|
+
fs29.close(fd4, (er3) => er3 ? this.emit("error", er3) : this.emit("close"));
|
|
722871
722912
|
}
|
|
722872
722913
|
}
|
|
722873
722914
|
};
|
|
@@ -722876,7 +722917,7 @@ var init_esm17 = __esm(() => {
|
|
|
722876
722917
|
let fd4;
|
|
722877
722918
|
if (this[_defaultFlag] && this[_flags] === "r+") {
|
|
722878
722919
|
try {
|
|
722879
|
-
fd4 =
|
|
722920
|
+
fd4 = fs29.openSync(this[_path], this[_flags], this[_mode]);
|
|
722880
722921
|
} catch (er3) {
|
|
722881
722922
|
if (er3?.code === "ENOENT") {
|
|
722882
722923
|
this[_flags] = "w";
|
|
@@ -722886,7 +722927,7 @@ var init_esm17 = __esm(() => {
|
|
|
722886
722927
|
}
|
|
722887
722928
|
}
|
|
722888
722929
|
} else {
|
|
722889
|
-
fd4 =
|
|
722930
|
+
fd4 = fs29.openSync(this[_path], this[_flags], this[_mode]);
|
|
722890
722931
|
}
|
|
722891
722932
|
this[_onopen](null, fd4);
|
|
722892
722933
|
}
|
|
@@ -722894,14 +722935,14 @@ var init_esm17 = __esm(() => {
|
|
|
722894
722935
|
if (this[_autoClose] && typeof this[_fd] === "number") {
|
|
722895
722936
|
const fd4 = this[_fd];
|
|
722896
722937
|
this[_fd] = undefined;
|
|
722897
|
-
|
|
722938
|
+
fs29.closeSync(fd4);
|
|
722898
722939
|
this.emit("close");
|
|
722899
722940
|
}
|
|
722900
722941
|
}
|
|
722901
722942
|
[_write](buf) {
|
|
722902
722943
|
let threw = true;
|
|
722903
722944
|
try {
|
|
722904
|
-
this[_onwrite](null,
|
|
722945
|
+
this[_onwrite](null, fs29.writeSync(this[_fd], buf, 0, buf.length, this[_pos]));
|
|
722905
722946
|
threw = false;
|
|
722906
722947
|
} finally {
|
|
722907
722948
|
if (threw) {
|
|
@@ -723607,10 +723648,10 @@ class Header {
|
|
|
723607
723648
|
}
|
|
723608
723649
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
723609
723650
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
723610
|
-
const
|
|
723651
|
+
const path38 = split[0];
|
|
723611
723652
|
const prefix = split[1];
|
|
723612
723653
|
this.needPax = !!split[2];
|
|
723613
|
-
this.needPax = encString(buf, off3, 100,
|
|
723654
|
+
this.needPax = encString(buf, off3, 100, path38) || this.needPax;
|
|
723614
723655
|
this.needPax = encNumber(buf, off3 + 100, 8, this.mode) || this.needPax;
|
|
723615
723656
|
this.needPax = encNumber(buf, off3 + 108, 8, this.uid) || this.needPax;
|
|
723616
723657
|
this.needPax = encNumber(buf, off3 + 116, 8, this.gid) || this.needPax;
|
|
@@ -724462,7 +724503,7 @@ var stripTrailingSlashes = (str) => {
|
|
|
724462
724503
|
};
|
|
724463
724504
|
|
|
724464
724505
|
// ../../node_modules/tar/dist/esm/list.js
|
|
724465
|
-
import
|
|
724506
|
+
import fs30 from "fs";
|
|
724466
724507
|
import { dirname as dirname4, parse as parse9 } from "path";
|
|
724467
724508
|
var onReadEntryFunction = (opt) => {
|
|
724468
724509
|
const onReadEntry = opt.onReadEntry;
|
|
@@ -724495,18 +724536,18 @@ var onReadEntryFunction = (opt) => {
|
|
|
724495
724536
|
const file = opt.file;
|
|
724496
724537
|
let fd4;
|
|
724497
724538
|
try {
|
|
724498
|
-
fd4 =
|
|
724499
|
-
const stat2 =
|
|
724539
|
+
fd4 = fs30.openSync(file, "r");
|
|
724540
|
+
const stat2 = fs30.fstatSync(fd4);
|
|
724500
724541
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
724501
724542
|
if (stat2.size < readSize) {
|
|
724502
724543
|
const buf = Buffer.allocUnsafe(stat2.size);
|
|
724503
|
-
|
|
724544
|
+
fs30.readSync(fd4, buf, 0, stat2.size, 0);
|
|
724504
724545
|
p.end(buf);
|
|
724505
724546
|
} else {
|
|
724506
724547
|
let pos2 = 0;
|
|
724507
724548
|
const buf = Buffer.allocUnsafe(readSize);
|
|
724508
724549
|
while (pos2 < stat2.size) {
|
|
724509
|
-
const bytesRead =
|
|
724550
|
+
const bytesRead = fs30.readSync(fd4, buf, 0, readSize, pos2);
|
|
724510
724551
|
pos2 += bytesRead;
|
|
724511
724552
|
p.write(buf.subarray(0, bytesRead));
|
|
724512
724553
|
}
|
|
@@ -724515,7 +724556,7 @@ var onReadEntryFunction = (opt) => {
|
|
|
724515
724556
|
} finally {
|
|
724516
724557
|
if (typeof fd4 === "number") {
|
|
724517
724558
|
try {
|
|
724518
|
-
|
|
724559
|
+
fs30.closeSync(fd4);
|
|
724519
724560
|
} catch (er3) {}
|
|
724520
724561
|
}
|
|
724521
724562
|
}
|
|
@@ -724526,7 +724567,7 @@ var onReadEntryFunction = (opt) => {
|
|
|
724526
724567
|
const p = new Promise((resolve6, reject) => {
|
|
724527
724568
|
parse10.on("error", reject);
|
|
724528
724569
|
parse10.on("end", resolve6);
|
|
724529
|
-
|
|
724570
|
+
fs30.stat(file, (er3, stat2) => {
|
|
724530
724571
|
if (er3) {
|
|
724531
724572
|
reject(er3);
|
|
724532
724573
|
} else {
|
|
@@ -724575,16 +724616,16 @@ var modeFix = (mode, isDir, portable) => {
|
|
|
724575
724616
|
|
|
724576
724617
|
// ../../node_modules/tar/dist/esm/strip-absolute-path.js
|
|
724577
724618
|
import { win32 as win325 } from "path";
|
|
724578
|
-
var isAbsolute3, parse10, stripAbsolutePath = (
|
|
724619
|
+
var isAbsolute3, parse10, stripAbsolutePath = (path38) => {
|
|
724579
724620
|
let r = "";
|
|
724580
|
-
let parsed = parse10(
|
|
724581
|
-
while (isAbsolute3(
|
|
724582
|
-
const root5 =
|
|
724583
|
-
|
|
724621
|
+
let parsed = parse10(path38);
|
|
724622
|
+
while (isAbsolute3(path38) || parsed.root) {
|
|
724623
|
+
const root5 = path38.charAt(0) === "/" && path38.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
724624
|
+
path38 = path38.slice(root5.length);
|
|
724584
724625
|
r += root5;
|
|
724585
|
-
parsed = parse10(
|
|
724626
|
+
parsed = parse10(path38);
|
|
724586
724627
|
}
|
|
724587
|
-
return [r,
|
|
724628
|
+
return [r, path38];
|
|
724588
724629
|
};
|
|
724589
724630
|
var init_strip_absolute_path = __esm(() => {
|
|
724590
724631
|
({ isAbsolute: isAbsolute3, parse: parse10 } = win325);
|
|
@@ -724600,14 +724641,14 @@ var init_winchars = __esm(() => {
|
|
|
724600
724641
|
});
|
|
724601
724642
|
|
|
724602
724643
|
// ../../node_modules/tar/dist/esm/write-entry.js
|
|
724603
|
-
import
|
|
724604
|
-
import
|
|
724605
|
-
var prefixPath = (
|
|
724644
|
+
import fs31 from "fs";
|
|
724645
|
+
import path51 from "path";
|
|
724646
|
+
var prefixPath = (path38, prefix) => {
|
|
724606
724647
|
if (!prefix) {
|
|
724607
|
-
return normalizeWindowsPath2(
|
|
724648
|
+
return normalizeWindowsPath2(path38);
|
|
724608
724649
|
}
|
|
724609
|
-
|
|
724610
|
-
return stripTrailingSlashes(prefix) + "/" +
|
|
724650
|
+
path38 = normalizeWindowsPath2(path38).replace(/^\.(\/|$)/, "");
|
|
724651
|
+
return stripTrailingSlashes(prefix) + "/" + path38;
|
|
724611
724652
|
}, maxReadSize, PROCESS4, FILE, DIRECTORY, SYMLINK, HARDLINK, HEADER, READ4, LSTAT, ONLSTAT, ONREAD, ONREADLINK, OPENFILE, ONOPENFILE, CLOSE, MODE, AWAITDRAIN, ONDRAIN, PREFIX, WriteEntry, WriteEntrySync, WriteEntryTar, getType = (stat2) => stat2.isFile() ? "File" : stat2.isDirectory() ? "Directory" : stat2.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
|
|
724612
724653
|
var init_write_entry = __esm(() => {
|
|
724613
724654
|
init_esm13();
|
|
@@ -724699,7 +724740,7 @@ var init_write_entry = __esm(() => {
|
|
|
724699
724740
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
724700
724741
|
p = p.replace(/\\/g, "/");
|
|
724701
724742
|
}
|
|
724702
|
-
this.absolute = normalizeWindowsPath2(opt.absolute ||
|
|
724743
|
+
this.absolute = normalizeWindowsPath2(opt.absolute || path51.resolve(this.cwd, p));
|
|
724703
724744
|
if (this.path === "") {
|
|
724704
724745
|
this.path = "./";
|
|
724705
724746
|
}
|
|
@@ -724726,7 +724767,7 @@ var init_write_entry = __esm(() => {
|
|
|
724726
724767
|
return super.emit(ev4, ...data);
|
|
724727
724768
|
}
|
|
724728
724769
|
[LSTAT]() {
|
|
724729
|
-
|
|
724770
|
+
fs31.lstat(this.absolute, (er3, stat2) => {
|
|
724730
724771
|
if (er3) {
|
|
724731
724772
|
return this.emit("error", er3);
|
|
724732
724773
|
}
|
|
@@ -724758,8 +724799,8 @@ var init_write_entry = __esm(() => {
|
|
|
724758
724799
|
[MODE](mode) {
|
|
724759
724800
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
724760
724801
|
}
|
|
724761
|
-
[PREFIX](
|
|
724762
|
-
return prefixPath(
|
|
724802
|
+
[PREFIX](path38) {
|
|
724803
|
+
return prefixPath(path38, this.prefix);
|
|
724763
724804
|
}
|
|
724764
724805
|
[HEADER]() {
|
|
724765
724806
|
if (!this.stat) {
|
|
@@ -724816,7 +724857,7 @@ var init_write_entry = __esm(() => {
|
|
|
724816
724857
|
this.end();
|
|
724817
724858
|
}
|
|
724818
724859
|
[SYMLINK]() {
|
|
724819
|
-
|
|
724860
|
+
fs31.readlink(this.absolute, (er3, linkpath) => {
|
|
724820
724861
|
if (er3) {
|
|
724821
724862
|
return this.emit("error", er3);
|
|
724822
724863
|
}
|
|
@@ -724833,7 +724874,7 @@ var init_write_entry = __esm(() => {
|
|
|
724833
724874
|
throw new Error("cannot create link entry without stat");
|
|
724834
724875
|
}
|
|
724835
724876
|
this.type = "Link";
|
|
724836
|
-
this.linkpath = normalizeWindowsPath2(
|
|
724877
|
+
this.linkpath = normalizeWindowsPath2(path51.relative(this.cwd, linkpath));
|
|
724837
724878
|
this.stat.size = 0;
|
|
724838
724879
|
this[HEADER]();
|
|
724839
724880
|
this.end();
|
|
@@ -724857,7 +724898,7 @@ var init_write_entry = __esm(() => {
|
|
|
724857
724898
|
this[OPENFILE]();
|
|
724858
724899
|
}
|
|
724859
724900
|
[OPENFILE]() {
|
|
724860
|
-
|
|
724901
|
+
fs31.open(this.absolute, "r", (er3, fd4) => {
|
|
724861
724902
|
if (er3) {
|
|
724862
724903
|
return this.emit("error", er3);
|
|
724863
724904
|
}
|
|
@@ -724887,7 +724928,7 @@ var init_write_entry = __esm(() => {
|
|
|
724887
724928
|
if (fd4 === undefined || buf === undefined) {
|
|
724888
724929
|
throw new Error("cannot read file without first opening");
|
|
724889
724930
|
}
|
|
724890
|
-
|
|
724931
|
+
fs31.read(fd4, buf, offset2, length, pos2, (er3, bytesRead) => {
|
|
724891
724932
|
if (er3) {
|
|
724892
724933
|
return this[CLOSE](() => this.emit("error", er3));
|
|
724893
724934
|
}
|
|
@@ -724896,7 +724937,7 @@ var init_write_entry = __esm(() => {
|
|
|
724896
724937
|
}
|
|
724897
724938
|
[CLOSE](cb4 = () => {}) {
|
|
724898
724939
|
if (this.fd !== undefined)
|
|
724899
|
-
|
|
724940
|
+
fs31.close(this.fd, cb4);
|
|
724900
724941
|
}
|
|
724901
724942
|
[ONREAD](bytesRead) {
|
|
724902
724943
|
if (bytesRead <= 0 && this.remain > 0) {
|
|
@@ -724977,13 +725018,13 @@ var init_write_entry = __esm(() => {
|
|
|
724977
725018
|
WriteEntrySync = class WriteEntrySync extends WriteEntry {
|
|
724978
725019
|
sync = true;
|
|
724979
725020
|
[LSTAT]() {
|
|
724980
|
-
this[ONLSTAT](
|
|
725021
|
+
this[ONLSTAT](fs31.lstatSync(this.absolute));
|
|
724981
725022
|
}
|
|
724982
725023
|
[SYMLINK]() {
|
|
724983
|
-
this[ONREADLINK](
|
|
725024
|
+
this[ONREADLINK](fs31.readlinkSync(this.absolute));
|
|
724984
725025
|
}
|
|
724985
725026
|
[OPENFILE]() {
|
|
724986
|
-
this[ONOPENFILE](
|
|
725027
|
+
this[ONOPENFILE](fs31.openSync(this.absolute, "r"));
|
|
724987
725028
|
}
|
|
724988
725029
|
[READ4]() {
|
|
724989
725030
|
let threw = true;
|
|
@@ -724992,7 +725033,7 @@ var init_write_entry = __esm(() => {
|
|
|
724992
725033
|
if (fd4 === undefined || buf === undefined) {
|
|
724993
725034
|
throw new Error("fd and buf must be set in READ method");
|
|
724994
725035
|
}
|
|
724995
|
-
const bytesRead =
|
|
725036
|
+
const bytesRead = fs31.readSync(fd4, buf, offset2, length, pos2);
|
|
724996
725037
|
this[ONREAD](bytesRead);
|
|
724997
725038
|
threw = false;
|
|
724998
725039
|
} finally {
|
|
@@ -725008,7 +725049,7 @@ var init_write_entry = __esm(() => {
|
|
|
725008
725049
|
}
|
|
725009
725050
|
[CLOSE](cb4 = () => {}) {
|
|
725010
725051
|
if (this.fd !== undefined)
|
|
725011
|
-
|
|
725052
|
+
fs31.closeSync(this.fd);
|
|
725012
725053
|
cb4();
|
|
725013
725054
|
}
|
|
725014
725055
|
};
|
|
@@ -725128,8 +725169,8 @@ var init_write_entry = __esm(() => {
|
|
|
725128
725169
|
super.write(b5);
|
|
725129
725170
|
readEntry.pipe(this);
|
|
725130
725171
|
}
|
|
725131
|
-
[PREFIX](
|
|
725132
|
-
return prefixPath(
|
|
725172
|
+
[PREFIX](path38) {
|
|
725173
|
+
return prefixPath(path38, this.prefix);
|
|
725133
725174
|
}
|
|
725134
725175
|
[MODE](mode) {
|
|
725135
725176
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -725547,8 +725588,8 @@ var init_esm19 = __esm(() => {
|
|
|
725547
725588
|
});
|
|
725548
725589
|
|
|
725549
725590
|
// ../../node_modules/tar/dist/esm/pack.js
|
|
725550
|
-
import
|
|
725551
|
-
import
|
|
725591
|
+
import fs33 from "fs";
|
|
725592
|
+
import path53 from "path";
|
|
725552
725593
|
|
|
725553
725594
|
class PackJob {
|
|
725554
725595
|
path;
|
|
@@ -725559,8 +725600,8 @@ class PackJob {
|
|
|
725559
725600
|
pending = false;
|
|
725560
725601
|
ignore = false;
|
|
725561
725602
|
piped = false;
|
|
725562
|
-
constructor(
|
|
725563
|
-
this.path =
|
|
725603
|
+
constructor(path38, absolute) {
|
|
725604
|
+
this.path = path38 || "./";
|
|
725564
725605
|
this.absolute = absolute;
|
|
725565
725606
|
}
|
|
725566
725607
|
}
|
|
@@ -725688,21 +725729,21 @@ var init_pack = __esm(() => {
|
|
|
725688
725729
|
[WRITE](chunk2) {
|
|
725689
725730
|
return super.write(chunk2);
|
|
725690
725731
|
}
|
|
725691
|
-
add(
|
|
725692
|
-
this.write(
|
|
725732
|
+
add(path38) {
|
|
725733
|
+
this.write(path38);
|
|
725693
725734
|
return this;
|
|
725694
725735
|
}
|
|
725695
|
-
end(
|
|
725696
|
-
if (typeof
|
|
725697
|
-
cb4 =
|
|
725698
|
-
|
|
725736
|
+
end(path38, encoding, cb4) {
|
|
725737
|
+
if (typeof path38 === "function") {
|
|
725738
|
+
cb4 = path38;
|
|
725739
|
+
path38 = undefined;
|
|
725699
725740
|
}
|
|
725700
725741
|
if (typeof encoding === "function") {
|
|
725701
725742
|
cb4 = encoding;
|
|
725702
725743
|
encoding = undefined;
|
|
725703
725744
|
}
|
|
725704
|
-
if (
|
|
725705
|
-
this.add(
|
|
725745
|
+
if (path38) {
|
|
725746
|
+
this.add(path38);
|
|
725706
725747
|
}
|
|
725707
725748
|
this[ENDED2] = true;
|
|
725708
725749
|
this[PROCESS5]();
|
|
@@ -725710,19 +725751,19 @@ var init_pack = __esm(() => {
|
|
|
725710
725751
|
cb4();
|
|
725711
725752
|
return this;
|
|
725712
725753
|
}
|
|
725713
|
-
write(
|
|
725754
|
+
write(path38) {
|
|
725714
725755
|
if (this[ENDED2]) {
|
|
725715
725756
|
throw new Error("write after end");
|
|
725716
725757
|
}
|
|
725717
|
-
if (
|
|
725718
|
-
this[ADDTARENTRY](
|
|
725758
|
+
if (path38 instanceof ReadEntry) {
|
|
725759
|
+
this[ADDTARENTRY](path38);
|
|
725719
725760
|
} else {
|
|
725720
|
-
this[ADDFSENTRY](
|
|
725761
|
+
this[ADDFSENTRY](path38);
|
|
725721
725762
|
}
|
|
725722
725763
|
return this.flowing;
|
|
725723
725764
|
}
|
|
725724
725765
|
[ADDTARENTRY](p) {
|
|
725725
|
-
const absolute = normalizeWindowsPath2(
|
|
725766
|
+
const absolute = normalizeWindowsPath2(path53.resolve(this.cwd, p.path));
|
|
725726
725767
|
if (!this.filter(p.path, p)) {
|
|
725727
725768
|
p.resume();
|
|
725728
725769
|
} else {
|
|
@@ -725735,7 +725776,7 @@ var init_pack = __esm(() => {
|
|
|
725735
725776
|
this[PROCESS5]();
|
|
725736
725777
|
}
|
|
725737
725778
|
[ADDFSENTRY](p) {
|
|
725738
|
-
const absolute = normalizeWindowsPath2(
|
|
725779
|
+
const absolute = normalizeWindowsPath2(path53.resolve(this.cwd, p));
|
|
725739
725780
|
this[QUEUE2].push(new PackJob(p, absolute));
|
|
725740
725781
|
this[PROCESS5]();
|
|
725741
725782
|
}
|
|
@@ -725743,7 +725784,7 @@ var init_pack = __esm(() => {
|
|
|
725743
725784
|
job.pending = true;
|
|
725744
725785
|
this[JOBS] += 1;
|
|
725745
725786
|
const stat2 = this.follow ? "stat" : "lstat";
|
|
725746
|
-
|
|
725787
|
+
fs33[stat2](job.absolute, (er3, stat3) => {
|
|
725747
725788
|
job.pending = false;
|
|
725748
725789
|
this[JOBS] -= 1;
|
|
725749
725790
|
if (er3) {
|
|
@@ -725764,7 +725805,7 @@ var init_pack = __esm(() => {
|
|
|
725764
725805
|
[READDIR](job) {
|
|
725765
725806
|
job.pending = true;
|
|
725766
725807
|
this[JOBS] += 1;
|
|
725767
|
-
|
|
725808
|
+
fs33.readdir(job.absolute, (er3, entries) => {
|
|
725768
725809
|
job.pending = false;
|
|
725769
725810
|
this[JOBS] -= 1;
|
|
725770
725811
|
if (er3) {
|
|
@@ -725932,10 +725973,10 @@ var init_pack = __esm(() => {
|
|
|
725932
725973
|
resume() {}
|
|
725933
725974
|
[STAT](job) {
|
|
725934
725975
|
const stat2 = this.follow ? "statSync" : "lstatSync";
|
|
725935
|
-
this[ONSTAT](job,
|
|
725976
|
+
this[ONSTAT](job, fs33[stat2](job.absolute));
|
|
725936
725977
|
}
|
|
725937
725978
|
[READDIR](job) {
|
|
725938
|
-
this[ONREADDIR](job,
|
|
725979
|
+
this[ONREADDIR](job, fs33.readdirSync(job.absolute));
|
|
725939
725980
|
}
|
|
725940
725981
|
[PIPE](job) {
|
|
725941
725982
|
const source = job.entry;
|
|
@@ -725963,7 +726004,7 @@ var init_pack = __esm(() => {
|
|
|
725963
726004
|
});
|
|
725964
726005
|
|
|
725965
726006
|
// ../../node_modules/tar/dist/esm/create.js
|
|
725966
|
-
import
|
|
726007
|
+
import path55 from "path";
|
|
725967
726008
|
var createFileSync = (opt, files) => {
|
|
725968
726009
|
const p = new PackSync(opt);
|
|
725969
726010
|
const stream7 = new WriteStreamSync(opt.file, {
|
|
@@ -725988,7 +726029,7 @@ var createFileSync = (opt, files) => {
|
|
|
725988
726029
|
files.forEach((file) => {
|
|
725989
726030
|
if (file.charAt(0) === "@") {
|
|
725990
726031
|
list({
|
|
725991
|
-
file:
|
|
726032
|
+
file: path55.resolve(p.cwd, file.slice(1)),
|
|
725992
726033
|
sync: true,
|
|
725993
726034
|
noResume: true,
|
|
725994
726035
|
onReadEntry: (entry) => p.add(entry)
|
|
@@ -726003,7 +726044,7 @@ var createFileSync = (opt, files) => {
|
|
|
726003
726044
|
const file = String(files[i2]);
|
|
726004
726045
|
if (file.charAt(0) === "@") {
|
|
726005
726046
|
await list({
|
|
726006
|
-
file:
|
|
726047
|
+
file: path55.resolve(String(p.cwd), file.slice(1)),
|
|
726007
726048
|
noResume: true,
|
|
726008
726049
|
onReadEntry: (entry) => {
|
|
726009
726050
|
p.add(entry);
|
|
@@ -726036,13 +726077,13 @@ var init_create2 = __esm(() => {
|
|
|
726036
726077
|
});
|
|
726037
726078
|
|
|
726038
726079
|
// ../../node_modules/tar/dist/esm/get-write-flag.js
|
|
726039
|
-
import
|
|
726080
|
+
import fs35 from "fs";
|
|
726040
726081
|
var platform6, isWindows3, O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP, fMapEnabled, fMapLimit, fMapFlag, getWriteFlag;
|
|
726041
726082
|
var init_get_write_flag = __esm(() => {
|
|
726042
726083
|
platform6 = process.env.__FAKE_PLATFORM__ || process.platform;
|
|
726043
726084
|
isWindows3 = platform6 === "win32";
|
|
726044
|
-
({ O_CREAT, O_TRUNC, O_WRONLY } =
|
|
726045
|
-
UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) ||
|
|
726085
|
+
({ O_CREAT, O_TRUNC, O_WRONLY } = fs35.constants);
|
|
726086
|
+
UV_FS_O_FILEMAP = Number(process.env.__FAKE_FS_O_FILENAME__) || fs35.constants.UV_FS_O_FILEMAP || 0;
|
|
726046
726087
|
fMapEnabled = isWindows3 && !!UV_FS_O_FILEMAP;
|
|
726047
726088
|
fMapLimit = 512 * 1024;
|
|
726048
726089
|
fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY;
|
|
@@ -726050,33 +726091,33 @@ var init_get_write_flag = __esm(() => {
|
|
|
726050
726091
|
});
|
|
726051
726092
|
|
|
726052
726093
|
// ../../node_modules/chownr/dist/esm/index.js
|
|
726053
|
-
import
|
|
726054
|
-
import
|
|
726055
|
-
var lchownSync = (
|
|
726094
|
+
import fs36 from "fs";
|
|
726095
|
+
import path56 from "path";
|
|
726096
|
+
var lchownSync = (path38, uid, gid) => {
|
|
726056
726097
|
try {
|
|
726057
|
-
return
|
|
726098
|
+
return fs36.lchownSync(path38, uid, gid);
|
|
726058
726099
|
} catch (er3) {
|
|
726059
726100
|
if (er3?.code !== "ENOENT")
|
|
726060
726101
|
throw er3;
|
|
726061
726102
|
}
|
|
726062
726103
|
}, chown = (cpath, uid, gid, cb4) => {
|
|
726063
|
-
|
|
726104
|
+
fs36.lchown(cpath, uid, gid, (er3) => {
|
|
726064
726105
|
cb4(er3 && er3?.code !== "ENOENT" ? er3 : null);
|
|
726065
726106
|
});
|
|
726066
726107
|
}, chownrKid = (p, child, uid, gid, cb4) => {
|
|
726067
726108
|
if (child.isDirectory()) {
|
|
726068
|
-
chownr(
|
|
726109
|
+
chownr(path56.resolve(p, child.name), uid, gid, (er3) => {
|
|
726069
726110
|
if (er3)
|
|
726070
726111
|
return cb4(er3);
|
|
726071
|
-
const cpath =
|
|
726112
|
+
const cpath = path56.resolve(p, child.name);
|
|
726072
726113
|
chown(cpath, uid, gid, cb4);
|
|
726073
726114
|
});
|
|
726074
726115
|
} else {
|
|
726075
|
-
const cpath =
|
|
726116
|
+
const cpath = path56.resolve(p, child.name);
|
|
726076
726117
|
chown(cpath, uid, gid, cb4);
|
|
726077
726118
|
}
|
|
726078
726119
|
}, chownr = (p, uid, gid, cb4) => {
|
|
726079
|
-
|
|
726120
|
+
fs36.readdir(p, { withFileTypes: true }, (er3, children) => {
|
|
726080
726121
|
if (er3) {
|
|
726081
726122
|
if (er3.code === "ENOENT")
|
|
726082
726123
|
return cb4();
|
|
@@ -726101,12 +726142,12 @@ var lchownSync = (path37, uid, gid) => {
|
|
|
726101
726142
|
});
|
|
726102
726143
|
}, chownrKidSync = (p, child, uid, gid) => {
|
|
726103
726144
|
if (child.isDirectory())
|
|
726104
|
-
chownrSync(
|
|
726105
|
-
lchownSync(
|
|
726145
|
+
chownrSync(path56.resolve(p, child.name), uid, gid);
|
|
726146
|
+
lchownSync(path56.resolve(p, child.name), uid, gid);
|
|
726106
726147
|
}, chownrSync = (p, uid, gid) => {
|
|
726107
726148
|
let children;
|
|
726108
726149
|
try {
|
|
726109
|
-
children =
|
|
726150
|
+
children = fs36.readdirSync(p, { withFileTypes: true });
|
|
726110
726151
|
} catch (er3) {
|
|
726111
726152
|
const e6 = er3;
|
|
726112
726153
|
if (e6?.code === "ENOENT")
|
|
@@ -726130,9 +726171,9 @@ var init_cwd_error = __esm(() => {
|
|
|
726130
726171
|
path;
|
|
726131
726172
|
code;
|
|
726132
726173
|
syscall = "chdir";
|
|
726133
|
-
constructor(
|
|
726134
|
-
super(`${code2}: Cannot cd into '${
|
|
726135
|
-
this.path =
|
|
726174
|
+
constructor(path38, code2) {
|
|
726175
|
+
super(`${code2}: Cannot cd into '${path38}'`);
|
|
726176
|
+
this.path = path38;
|
|
726136
726177
|
this.code = code2;
|
|
726137
726178
|
}
|
|
726138
726179
|
get name() {
|
|
@@ -726149,10 +726190,10 @@ var init_symlink_error = __esm(() => {
|
|
|
726149
726190
|
symlink;
|
|
726150
726191
|
syscall = "symlink";
|
|
726151
726192
|
code = "TAR_SYMLINK_ERROR";
|
|
726152
|
-
constructor(symlink,
|
|
726193
|
+
constructor(symlink, path38) {
|
|
726153
726194
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
726154
726195
|
this.symlink = symlink;
|
|
726155
|
-
this.path =
|
|
726196
|
+
this.path = path38;
|
|
726156
726197
|
}
|
|
726157
726198
|
get name() {
|
|
726158
726199
|
return "SymlinkError";
|
|
@@ -726161,11 +726202,11 @@ var init_symlink_error = __esm(() => {
|
|
|
726161
726202
|
});
|
|
726162
726203
|
|
|
726163
726204
|
// ../../node_modules/tar/dist/esm/mkdir.js
|
|
726164
|
-
import
|
|
726205
|
+
import fs37 from "fs";
|
|
726165
726206
|
import fsp from "fs/promises";
|
|
726166
|
-
import
|
|
726207
|
+
import path57 from "path";
|
|
726167
726208
|
var checkCwd = (dir, cb4) => {
|
|
726168
|
-
|
|
726209
|
+
fs37.stat(dir, (er3, st4) => {
|
|
726169
726210
|
if (er3 || !st4.isDirectory()) {
|
|
726170
726211
|
er3 = new CwdError(dir, er3?.code || "ENOTDIR");
|
|
726171
726212
|
}
|
|
@@ -726189,7 +726230,7 @@ var checkCwd = (dir, cb4) => {
|
|
|
726189
726230
|
if (created && doChown) {
|
|
726190
726231
|
chownr(created, uid, gid, (er4) => done(er4));
|
|
726191
726232
|
} else if (needChmod) {
|
|
726192
|
-
|
|
726233
|
+
fs37.chmod(dir, mode, cb4);
|
|
726193
726234
|
} else {
|
|
726194
726235
|
cb4();
|
|
726195
726236
|
}
|
|
@@ -726201,7 +726242,7 @@ var checkCwd = (dir, cb4) => {
|
|
|
726201
726242
|
if (preserve) {
|
|
726202
726243
|
return fsp.mkdir(dir, { mode, recursive: true }).then((made) => done(null, made ?? undefined), done);
|
|
726203
726244
|
}
|
|
726204
|
-
const sub = normalizeWindowsPath2(
|
|
726245
|
+
const sub = normalizeWindowsPath2(path57.relative(cwd4, dir));
|
|
726205
726246
|
const parts = sub.split("/");
|
|
726206
726247
|
mkdir_(cwd4, parts, mode, unlink2, cwd4, undefined, done);
|
|
726207
726248
|
}, mkdir_ = (base3, parts, mode, unlink2, cwd4, created, cb4) => {
|
|
@@ -726209,22 +726250,22 @@ var checkCwd = (dir, cb4) => {
|
|
|
726209
726250
|
return cb4(null, created);
|
|
726210
726251
|
}
|
|
726211
726252
|
const p = parts.shift();
|
|
726212
|
-
const part = normalizeWindowsPath2(
|
|
726213
|
-
|
|
726253
|
+
const part = normalizeWindowsPath2(path57.resolve(base3 + "/" + p));
|
|
726254
|
+
fs37.mkdir(part, mode, onmkdir(part, parts, mode, unlink2, cwd4, created, cb4));
|
|
726214
726255
|
}, onmkdir = (part, parts, mode, unlink2, cwd4, created, cb4) => (er3) => {
|
|
726215
726256
|
if (er3) {
|
|
726216
|
-
|
|
726257
|
+
fs37.lstat(part, (statEr, st4) => {
|
|
726217
726258
|
if (statEr) {
|
|
726218
726259
|
statEr.path = statEr.path && normalizeWindowsPath2(statEr.path);
|
|
726219
726260
|
cb4(statEr);
|
|
726220
726261
|
} else if (st4.isDirectory()) {
|
|
726221
726262
|
mkdir_(part, parts, mode, unlink2, cwd4, created, cb4);
|
|
726222
726263
|
} else if (unlink2) {
|
|
726223
|
-
|
|
726264
|
+
fs37.unlink(part, (er4) => {
|
|
726224
726265
|
if (er4) {
|
|
726225
726266
|
return cb4(er4);
|
|
726226
726267
|
}
|
|
726227
|
-
|
|
726268
|
+
fs37.mkdir(part, mode, onmkdir(part, parts, mode, unlink2, cwd4, created, cb4));
|
|
726228
726269
|
});
|
|
726229
726270
|
} else if (st4.isSymbolicLink()) {
|
|
726230
726271
|
return cb4(new SymlinkError(part, part + "/" + parts.join("/")));
|
|
@@ -726240,7 +726281,7 @@ var checkCwd = (dir, cb4) => {
|
|
|
726240
726281
|
let ok3 = false;
|
|
726241
726282
|
let code2 = undefined;
|
|
726242
726283
|
try {
|
|
726243
|
-
ok3 =
|
|
726284
|
+
ok3 = fs37.statSync(dir).isDirectory();
|
|
726244
726285
|
} catch (er3) {
|
|
726245
726286
|
code2 = er3?.code;
|
|
726246
726287
|
} finally {
|
|
@@ -726264,7 +726305,7 @@ var checkCwd = (dir, cb4) => {
|
|
|
726264
726305
|
chownrSync(created2, uid, gid);
|
|
726265
726306
|
}
|
|
726266
726307
|
if (needChmod) {
|
|
726267
|
-
|
|
726308
|
+
fs37.chmodSync(dir, mode);
|
|
726268
726309
|
}
|
|
726269
726310
|
};
|
|
726270
726311
|
if (dir === cwd4) {
|
|
@@ -726272,23 +726313,23 @@ var checkCwd = (dir, cb4) => {
|
|
|
726272
726313
|
return done();
|
|
726273
726314
|
}
|
|
726274
726315
|
if (preserve) {
|
|
726275
|
-
return done(
|
|
726316
|
+
return done(fs37.mkdirSync(dir, { mode, recursive: true }) ?? undefined);
|
|
726276
726317
|
}
|
|
726277
|
-
const sub = normalizeWindowsPath2(
|
|
726318
|
+
const sub = normalizeWindowsPath2(path57.relative(cwd4, dir));
|
|
726278
726319
|
const parts = sub.split("/");
|
|
726279
726320
|
let created = undefined;
|
|
726280
726321
|
for (let p = parts.shift(), part = cwd4;p && (part += "/" + p); p = parts.shift()) {
|
|
726281
|
-
part = normalizeWindowsPath2(
|
|
726322
|
+
part = normalizeWindowsPath2(path57.resolve(part));
|
|
726282
726323
|
try {
|
|
726283
|
-
|
|
726324
|
+
fs37.mkdirSync(part, mode);
|
|
726284
726325
|
created = created || part;
|
|
726285
726326
|
} catch (er3) {
|
|
726286
|
-
const st4 =
|
|
726327
|
+
const st4 = fs37.lstatSync(part);
|
|
726287
726328
|
if (st4.isDirectory()) {
|
|
726288
726329
|
continue;
|
|
726289
726330
|
} else if (unlink2) {
|
|
726290
|
-
|
|
726291
|
-
|
|
726331
|
+
fs37.unlinkSync(part);
|
|
726332
|
+
fs37.mkdirSync(part, mode);
|
|
726292
726333
|
created = created || part;
|
|
726293
726334
|
continue;
|
|
726294
726335
|
} else if (st4.isSymbolicLink()) {
|
|
@@ -726341,7 +726382,7 @@ class PathReservations {
|
|
|
726341
726382
|
paths = isWindows4 ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
726342
726383
|
return stripTrailingSlashes(join18(normalizeUnicode(p))).toLowerCase();
|
|
726343
726384
|
});
|
|
726344
|
-
const dirs = new Set(paths.map((
|
|
726385
|
+
const dirs = new Set(paths.map((path38) => getDirs(path38)).reduce((a2, b5) => a2.concat(b5)));
|
|
726345
726386
|
this.#reservations.set(fn4, { dirs, paths });
|
|
726346
726387
|
for (const p of paths) {
|
|
726347
726388
|
const q3 = this.#queues.get(p);
|
|
@@ -726372,8 +726413,8 @@ class PathReservations {
|
|
|
726372
726413
|
throw new Error("function does not have any path reservations");
|
|
726373
726414
|
}
|
|
726374
726415
|
return {
|
|
726375
|
-
paths: res.paths.map((
|
|
726376
|
-
dirs: [...res.dirs].map((
|
|
726416
|
+
paths: res.paths.map((path38) => this.#queues.get(path38)),
|
|
726417
|
+
dirs: [...res.dirs].map((path38) => this.#queues.get(path38))
|
|
726377
726418
|
};
|
|
726378
726419
|
}
|
|
726379
726420
|
check(fn4) {
|
|
@@ -726398,14 +726439,14 @@ class PathReservations {
|
|
|
726398
726439
|
}
|
|
726399
726440
|
const { paths, dirs } = res;
|
|
726400
726441
|
const next = new Set;
|
|
726401
|
-
for (const
|
|
726402
|
-
const q3 = this.#queues.get(
|
|
726442
|
+
for (const path38 of paths) {
|
|
726443
|
+
const q3 = this.#queues.get(path38);
|
|
726403
726444
|
if (!q3 || q3?.[0] !== fn4) {
|
|
726404
726445
|
continue;
|
|
726405
726446
|
}
|
|
726406
726447
|
const q0 = q3[1];
|
|
726407
726448
|
if (!q0) {
|
|
726408
|
-
this.#queues.delete(
|
|
726449
|
+
this.#queues.delete(path38);
|
|
726409
726450
|
continue;
|
|
726410
726451
|
}
|
|
726411
726452
|
q3.shift();
|
|
@@ -726440,8 +726481,8 @@ class PathReservations {
|
|
|
726440
726481
|
return true;
|
|
726441
726482
|
}
|
|
726442
726483
|
}
|
|
726443
|
-
var platform7, isWindows4, getDirs = (
|
|
726444
|
-
const dirs =
|
|
726484
|
+
var platform7, isWindows4, getDirs = (path38) => {
|
|
726485
|
+
const dirs = path38.split("/").slice(0, -1).reduce((set, path45) => {
|
|
726445
726486
|
const s2 = set[set.length - 1];
|
|
726446
726487
|
if (s2 !== undefined) {
|
|
726447
726488
|
path45 = join18(s2, path45);
|
|
@@ -726460,26 +726501,26 @@ var init_path_reservations = __esm(() => {
|
|
|
726460
726501
|
// ../../node_modules/tar/dist/esm/unpack.js
|
|
726461
726502
|
import assert6 from "assert";
|
|
726462
726503
|
import { randomBytes as randomBytes3 } from "crypto";
|
|
726463
|
-
import
|
|
726464
|
-
import
|
|
726465
|
-
var ONENTRY, CHECKFS, CHECKFS2, ISREUSABLE, MAKEFS, FILE2, DIRECTORY2, LINK, SYMLINK2, HARDLINK2, UNSUPPORTED, CHECKPATH, MKDIR, ONERROR, PENDING, PEND, UNPEND, ENDED3, MAYBECLOSE, SKIP, DOCHOWN, UID, GID, CHECKED_CWD, platform8, isWindows5, DEFAULT_MAX_DEPTH = 1024, unlinkFile = (
|
|
726504
|
+
import fs38 from "fs";
|
|
726505
|
+
import path58 from "path";
|
|
726506
|
+
var ONENTRY, CHECKFS, CHECKFS2, ISREUSABLE, MAKEFS, FILE2, DIRECTORY2, LINK, SYMLINK2, HARDLINK2, UNSUPPORTED, CHECKPATH, MKDIR, ONERROR, PENDING, PEND, UNPEND, ENDED3, MAYBECLOSE, SKIP, DOCHOWN, UID, GID, CHECKED_CWD, platform8, isWindows5, DEFAULT_MAX_DEPTH = 1024, unlinkFile = (path38, cb4) => {
|
|
726466
726507
|
if (!isWindows5) {
|
|
726467
|
-
return
|
|
726508
|
+
return fs38.unlink(path38, cb4);
|
|
726468
726509
|
}
|
|
726469
|
-
const name3 =
|
|
726470
|
-
|
|
726510
|
+
const name3 = path38 + ".DELETE." + randomBytes3(16).toString("hex");
|
|
726511
|
+
fs38.rename(path38, name3, (er3) => {
|
|
726471
726512
|
if (er3) {
|
|
726472
726513
|
return cb4(er3);
|
|
726473
726514
|
}
|
|
726474
|
-
|
|
726515
|
+
fs38.unlink(name3, cb4);
|
|
726475
726516
|
});
|
|
726476
|
-
}, unlinkFileSync = (
|
|
726517
|
+
}, unlinkFileSync = (path38) => {
|
|
726477
726518
|
if (!isWindows5) {
|
|
726478
|
-
return
|
|
726519
|
+
return fs38.unlinkSync(path38);
|
|
726479
726520
|
}
|
|
726480
|
-
const name3 =
|
|
726481
|
-
|
|
726482
|
-
|
|
726521
|
+
const name3 = path38 + ".DELETE." + randomBytes3(16).toString("hex");
|
|
726522
|
+
fs38.renameSync(path38, name3);
|
|
726523
|
+
fs38.unlinkSync(name3);
|
|
726483
726524
|
}, uint32 = (a2, b5, c4) => a2 !== undefined && a2 === a2 >>> 0 ? a2 : b5 !== undefined && b5 === b5 >>> 0 ? b5 : c4, Unpack, callSync = (fn4) => {
|
|
726484
726525
|
try {
|
|
726485
726526
|
return [null, fn4()];
|
|
@@ -726589,7 +726630,7 @@ var init_unpack = __esm(() => {
|
|
|
726589
726630
|
this.noMtime = !!opt.noMtime;
|
|
726590
726631
|
this.preservePaths = !!opt.preservePaths;
|
|
726591
726632
|
this.unlink = !!opt.unlink;
|
|
726592
|
-
this.cwd = normalizeWindowsPath2(
|
|
726633
|
+
this.cwd = normalizeWindowsPath2(path58.resolve(opt.cwd || process.cwd()));
|
|
726593
726634
|
this.strip = Number(opt.strip) || 0;
|
|
726594
726635
|
this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
|
|
726595
726636
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
@@ -726654,10 +726695,10 @@ var init_unpack = __esm(() => {
|
|
|
726654
726695
|
});
|
|
726655
726696
|
}
|
|
726656
726697
|
}
|
|
726657
|
-
if (
|
|
726658
|
-
entry.absolute = normalizeWindowsPath2(
|
|
726698
|
+
if (path58.isAbsolute(entry.path)) {
|
|
726699
|
+
entry.absolute = normalizeWindowsPath2(path58.resolve(entry.path));
|
|
726659
726700
|
} else {
|
|
726660
|
-
entry.absolute = normalizeWindowsPath2(
|
|
726701
|
+
entry.absolute = normalizeWindowsPath2(path58.resolve(this.cwd, entry.path));
|
|
726661
726702
|
}
|
|
726662
726703
|
if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
726663
726704
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
@@ -726672,9 +726713,9 @@ var init_unpack = __esm(() => {
|
|
|
726672
726713
|
return false;
|
|
726673
726714
|
}
|
|
726674
726715
|
if (this.win32) {
|
|
726675
|
-
const { root: aRoot } =
|
|
726716
|
+
const { root: aRoot } = path58.win32.parse(String(entry.absolute));
|
|
726676
726717
|
entry.absolute = aRoot + encode6(String(entry.absolute).slice(aRoot.length));
|
|
726677
|
-
const { root: pRoot } =
|
|
726718
|
+
const { root: pRoot } = path58.win32.parse(entry.path);
|
|
726678
726719
|
entry.path = pRoot + encode6(entry.path.slice(pRoot.length));
|
|
726679
726720
|
}
|
|
726680
726721
|
return true;
|
|
@@ -726743,7 +726784,7 @@ var init_unpack = __esm(() => {
|
|
|
726743
726784
|
});
|
|
726744
726785
|
stream7.on("error", (er3) => {
|
|
726745
726786
|
if (stream7.fd) {
|
|
726746
|
-
|
|
726787
|
+
fs38.close(stream7.fd, () => {});
|
|
726747
726788
|
}
|
|
726748
726789
|
stream7.write = () => true;
|
|
726749
726790
|
this[ONERROR](er3, entry);
|
|
@@ -726753,7 +726794,7 @@ var init_unpack = __esm(() => {
|
|
|
726753
726794
|
const done = (er3) => {
|
|
726754
726795
|
if (er3) {
|
|
726755
726796
|
if (stream7.fd) {
|
|
726756
|
-
|
|
726797
|
+
fs38.close(stream7.fd, () => {});
|
|
726757
726798
|
}
|
|
726758
726799
|
this[ONERROR](er3, entry);
|
|
726759
726800
|
fullyDone();
|
|
@@ -726761,7 +726802,7 @@ var init_unpack = __esm(() => {
|
|
|
726761
726802
|
}
|
|
726762
726803
|
if (--actions3 === 0) {
|
|
726763
726804
|
if (stream7.fd !== undefined) {
|
|
726764
|
-
|
|
726805
|
+
fs38.close(stream7.fd, (er4) => {
|
|
726765
726806
|
if (er4) {
|
|
726766
726807
|
this[ONERROR](er4, entry);
|
|
726767
726808
|
} else {
|
|
@@ -726779,14 +726820,14 @@ var init_unpack = __esm(() => {
|
|
|
726779
726820
|
actions3++;
|
|
726780
726821
|
const atime = entry.atime || new Date;
|
|
726781
726822
|
const mtime = entry.mtime;
|
|
726782
|
-
|
|
726823
|
+
fs38.futimes(fd4, atime, mtime, (er3) => er3 ? fs38.utimes(abs, atime, mtime, (er22) => done(er22 && er3)) : done());
|
|
726783
726824
|
}
|
|
726784
726825
|
if (typeof fd4 === "number" && this[DOCHOWN](entry)) {
|
|
726785
726826
|
actions3++;
|
|
726786
726827
|
const uid = this[UID](entry);
|
|
726787
726828
|
const gid = this[GID](entry);
|
|
726788
726829
|
if (typeof uid === "number" && typeof gid === "number") {
|
|
726789
|
-
|
|
726830
|
+
fs38.fchown(fd4, uid, gid, (er3) => er3 ? fs38.chown(abs, uid, gid, (er22) => done(er22 && er3)) : done());
|
|
726790
726831
|
}
|
|
726791
726832
|
}
|
|
726792
726833
|
done();
|
|
@@ -726819,11 +726860,11 @@ var init_unpack = __esm(() => {
|
|
|
726819
726860
|
};
|
|
726820
726861
|
if (entry.mtime && !this.noMtime) {
|
|
726821
726862
|
actions3++;
|
|
726822
|
-
|
|
726863
|
+
fs38.utimes(String(entry.absolute), entry.atime || new Date, entry.mtime, done);
|
|
726823
726864
|
}
|
|
726824
726865
|
if (this[DOCHOWN](entry)) {
|
|
726825
726866
|
actions3++;
|
|
726826
|
-
|
|
726867
|
+
fs38.chown(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)), done);
|
|
726827
726868
|
}
|
|
726828
726869
|
done();
|
|
726829
726870
|
});
|
|
@@ -726837,7 +726878,7 @@ var init_unpack = __esm(() => {
|
|
|
726837
726878
|
this[LINK](entry, String(entry.linkpath), "symlink", done);
|
|
726838
726879
|
}
|
|
726839
726880
|
[HARDLINK2](entry, done) {
|
|
726840
|
-
const linkpath = normalizeWindowsPath2(
|
|
726881
|
+
const linkpath = normalizeWindowsPath2(path58.resolve(this.cwd, String(entry.linkpath)));
|
|
726841
726882
|
this[LINK](entry, linkpath, "link", done);
|
|
726842
726883
|
}
|
|
726843
726884
|
[PEND]() {
|
|
@@ -726879,7 +726920,7 @@ var init_unpack = __esm(() => {
|
|
|
726879
726920
|
};
|
|
726880
726921
|
const start = () => {
|
|
726881
726922
|
if (entry.absolute !== this.cwd) {
|
|
726882
|
-
const parent2 = normalizeWindowsPath2(
|
|
726923
|
+
const parent2 = normalizeWindowsPath2(path58.dirname(String(entry.absolute)));
|
|
726883
726924
|
if (parent2 !== this.cwd) {
|
|
726884
726925
|
return this[MKDIR](parent2, this.dmode, (er3) => {
|
|
726885
726926
|
if (er3) {
|
|
@@ -726894,7 +726935,7 @@ var init_unpack = __esm(() => {
|
|
|
726894
726935
|
afterMakeParent();
|
|
726895
726936
|
};
|
|
726896
726937
|
const afterMakeParent = () => {
|
|
726897
|
-
|
|
726938
|
+
fs38.lstat(String(entry.absolute), (lstatEr, st4) => {
|
|
726898
726939
|
if (st4 && (this.keep || this.newer && st4.mtime > (entry.mtime ?? st4.mtime))) {
|
|
726899
726940
|
this[SKIP](entry);
|
|
726900
726941
|
done();
|
|
@@ -726910,10 +726951,10 @@ var init_unpack = __esm(() => {
|
|
|
726910
726951
|
if (!needChmod) {
|
|
726911
726952
|
return afterChmod();
|
|
726912
726953
|
}
|
|
726913
|
-
return
|
|
726954
|
+
return fs38.chmod(String(entry.absolute), Number(entry.mode), afterChmod);
|
|
726914
726955
|
}
|
|
726915
726956
|
if (entry.absolute !== this.cwd) {
|
|
726916
|
-
return
|
|
726957
|
+
return fs38.rmdir(String(entry.absolute), (er3) => this[MAKEFS](er3 ?? null, entry, done));
|
|
726917
726958
|
}
|
|
726918
726959
|
}
|
|
726919
726960
|
if (entry.absolute === this.cwd) {
|
|
@@ -726949,7 +726990,7 @@ var init_unpack = __esm(() => {
|
|
|
726949
726990
|
}
|
|
726950
726991
|
}
|
|
726951
726992
|
[LINK](entry, linkpath, link2, done) {
|
|
726952
|
-
|
|
726993
|
+
fs38[link2](linkpath, String(entry.absolute), (er3) => {
|
|
726953
726994
|
if (er3) {
|
|
726954
726995
|
this[ONERROR](er3, entry);
|
|
726955
726996
|
} else {
|
|
@@ -726974,7 +727015,7 @@ var init_unpack = __esm(() => {
|
|
|
726974
727015
|
this[CHECKED_CWD] = true;
|
|
726975
727016
|
}
|
|
726976
727017
|
if (entry.absolute !== this.cwd) {
|
|
726977
|
-
const parent2 = normalizeWindowsPath2(
|
|
727018
|
+
const parent2 = normalizeWindowsPath2(path58.dirname(String(entry.absolute)));
|
|
726978
727019
|
if (parent2 !== this.cwd) {
|
|
726979
727020
|
const mkParent = this[MKDIR](parent2, this.dmode);
|
|
726980
727021
|
if (mkParent) {
|
|
@@ -726982,7 +727023,7 @@ var init_unpack = __esm(() => {
|
|
|
726982
727023
|
}
|
|
726983
727024
|
}
|
|
726984
727025
|
}
|
|
726985
|
-
const [lstatEr, st4] = callSync(() =>
|
|
727026
|
+
const [lstatEr, st4] = callSync(() => fs38.lstatSync(String(entry.absolute)));
|
|
726986
727027
|
if (st4 && (this.keep || this.newer && st4.mtime > (entry.mtime ?? st4.mtime))) {
|
|
726987
727028
|
return this[SKIP](entry);
|
|
726988
727029
|
}
|
|
@@ -726993,11 +727034,11 @@ var init_unpack = __esm(() => {
|
|
|
726993
727034
|
if (entry.type === "Directory") {
|
|
726994
727035
|
const needChmod = this.chmod && entry.mode && (st4.mode & 4095) !== entry.mode;
|
|
726995
727036
|
const [er5] = needChmod ? callSync(() => {
|
|
726996
|
-
|
|
727037
|
+
fs38.chmodSync(String(entry.absolute), Number(entry.mode));
|
|
726997
727038
|
}) : [];
|
|
726998
727039
|
return this[MAKEFS](er5, entry);
|
|
726999
727040
|
}
|
|
727000
|
-
const [er4] = callSync(() =>
|
|
727041
|
+
const [er4] = callSync(() => fs38.rmdirSync(String(entry.absolute)));
|
|
727001
727042
|
this[MAKEFS](er4, entry);
|
|
727002
727043
|
}
|
|
727003
727044
|
const [er3] = entry.absolute === this.cwd ? [] : callSync(() => unlinkFileSync(String(entry.absolute)));
|
|
@@ -727008,7 +727049,7 @@ var init_unpack = __esm(() => {
|
|
|
727008
727049
|
const oner = (er3) => {
|
|
727009
727050
|
let closeError;
|
|
727010
727051
|
try {
|
|
727011
|
-
|
|
727052
|
+
fs38.closeSync(fd4);
|
|
727012
727053
|
} catch (e6) {
|
|
727013
727054
|
closeError = e6;
|
|
727014
727055
|
}
|
|
@@ -727019,7 +727060,7 @@ var init_unpack = __esm(() => {
|
|
|
727019
727060
|
};
|
|
727020
727061
|
let fd4;
|
|
727021
727062
|
try {
|
|
727022
|
-
fd4 =
|
|
727063
|
+
fd4 = fs38.openSync(String(entry.absolute), getWriteFlag(entry.size), mode);
|
|
727023
727064
|
} catch (er3) {
|
|
727024
727065
|
return oner(er3);
|
|
727025
727066
|
}
|
|
@@ -727030,7 +727071,7 @@ var init_unpack = __esm(() => {
|
|
|
727030
727071
|
}
|
|
727031
727072
|
tx4.on("data", (chunk2) => {
|
|
727032
727073
|
try {
|
|
727033
|
-
|
|
727074
|
+
fs38.writeSync(fd4, chunk2, 0, chunk2.length);
|
|
727034
727075
|
} catch (er3) {
|
|
727035
727076
|
oner(er3);
|
|
727036
727077
|
}
|
|
@@ -727041,10 +727082,10 @@ var init_unpack = __esm(() => {
|
|
|
727041
727082
|
const atime = entry.atime || new Date;
|
|
727042
727083
|
const mtime = entry.mtime;
|
|
727043
727084
|
try {
|
|
727044
|
-
|
|
727085
|
+
fs38.futimesSync(fd4, atime, mtime);
|
|
727045
727086
|
} catch (futimeser) {
|
|
727046
727087
|
try {
|
|
727047
|
-
|
|
727088
|
+
fs38.utimesSync(String(entry.absolute), atime, mtime);
|
|
727048
727089
|
} catch (utimeser) {
|
|
727049
727090
|
er3 = futimeser;
|
|
727050
727091
|
}
|
|
@@ -727054,10 +727095,10 @@ var init_unpack = __esm(() => {
|
|
|
727054
727095
|
const uid = this[UID](entry);
|
|
727055
727096
|
const gid = this[GID](entry);
|
|
727056
727097
|
try {
|
|
727057
|
-
|
|
727098
|
+
fs38.fchownSync(fd4, Number(uid), Number(gid));
|
|
727058
727099
|
} catch (fchowner) {
|
|
727059
727100
|
try {
|
|
727060
|
-
|
|
727101
|
+
fs38.chownSync(String(entry.absolute), Number(uid), Number(gid));
|
|
727061
727102
|
} catch (chowner) {
|
|
727062
727103
|
er3 = er3 || fchowner;
|
|
727063
727104
|
}
|
|
@@ -727076,12 +727117,12 @@ var init_unpack = __esm(() => {
|
|
|
727076
727117
|
}
|
|
727077
727118
|
if (entry.mtime && !this.noMtime) {
|
|
727078
727119
|
try {
|
|
727079
|
-
|
|
727120
|
+
fs38.utimesSync(String(entry.absolute), entry.atime || new Date, entry.mtime);
|
|
727080
727121
|
} catch (er4) {}
|
|
727081
727122
|
}
|
|
727082
727123
|
if (this[DOCHOWN](entry)) {
|
|
727083
727124
|
try {
|
|
727084
|
-
|
|
727125
|
+
fs38.chownSync(String(entry.absolute), Number(this[UID](entry)), Number(this[GID](entry)));
|
|
727085
727126
|
} catch (er4) {}
|
|
727086
727127
|
}
|
|
727087
727128
|
done();
|
|
@@ -727107,7 +727148,7 @@ var init_unpack = __esm(() => {
|
|
|
727107
727148
|
[LINK](entry, linkpath, link2, done) {
|
|
727108
727149
|
const ls4 = `${link2}Sync`;
|
|
727109
727150
|
try {
|
|
727110
|
-
|
|
727151
|
+
fs38[ls4](linkpath, String(entry.absolute));
|
|
727111
727152
|
done();
|
|
727112
727153
|
entry.resume();
|
|
727113
727154
|
} catch (er3) {
|
|
@@ -727118,11 +727159,11 @@ var init_unpack = __esm(() => {
|
|
|
727118
727159
|
});
|
|
727119
727160
|
|
|
727120
727161
|
// ../../node_modules/tar/dist/esm/extract.js
|
|
727121
|
-
import
|
|
727162
|
+
import fs39 from "fs";
|
|
727122
727163
|
var extractFileSync = (opt) => {
|
|
727123
727164
|
const u2 = new UnpackSync(opt);
|
|
727124
727165
|
const file = opt.file;
|
|
727125
|
-
const stat2 =
|
|
727166
|
+
const stat2 = fs39.statSync(file);
|
|
727126
727167
|
const readSize = opt.maxReadSize || 16 * 1024 * 1024;
|
|
727127
727168
|
const stream7 = new ReadStreamSync(file, {
|
|
727128
727169
|
readSize,
|
|
@@ -727136,7 +727177,7 @@ var extractFileSync = (opt) => {
|
|
|
727136
727177
|
const p = new Promise((resolve6, reject) => {
|
|
727137
727178
|
u2.on("error", reject);
|
|
727138
727179
|
u2.on("close", resolve6);
|
|
727139
|
-
|
|
727180
|
+
fs39.stat(file, (er3, stat2) => {
|
|
727140
727181
|
if (er3) {
|
|
727141
727182
|
reject(er3);
|
|
727142
727183
|
} else {
|
|
@@ -727163,8 +727204,8 @@ var init_extract2 = __esm(() => {
|
|
|
727163
727204
|
});
|
|
727164
727205
|
|
|
727165
727206
|
// ../../node_modules/tar/dist/esm/replace.js
|
|
727166
|
-
import
|
|
727167
|
-
import
|
|
727207
|
+
import fs40 from "fs";
|
|
727208
|
+
import path59 from "path";
|
|
727168
727209
|
var replaceSync = (opt, files) => {
|
|
727169
727210
|
const p = new PackSync(opt);
|
|
727170
727211
|
let threw = true;
|
|
@@ -727172,20 +727213,20 @@ var replaceSync = (opt, files) => {
|
|
|
727172
727213
|
let position;
|
|
727173
727214
|
try {
|
|
727174
727215
|
try {
|
|
727175
|
-
fd4 =
|
|
727216
|
+
fd4 = fs40.openSync(opt.file, "r+");
|
|
727176
727217
|
} catch (er3) {
|
|
727177
727218
|
if (er3?.code === "ENOENT") {
|
|
727178
|
-
fd4 =
|
|
727219
|
+
fd4 = fs40.openSync(opt.file, "w+");
|
|
727179
727220
|
} else {
|
|
727180
727221
|
throw er3;
|
|
727181
727222
|
}
|
|
727182
727223
|
}
|
|
727183
|
-
const st4 =
|
|
727224
|
+
const st4 = fs40.fstatSync(fd4);
|
|
727184
727225
|
const headBuf = Buffer.alloc(512);
|
|
727185
727226
|
POSITION:
|
|
727186
727227
|
for (position = 0;position < st4.size; position += 512) {
|
|
727187
727228
|
for (let bufPos = 0, bytes3 = 0;bufPos < 512; bufPos += bytes3) {
|
|
727188
|
-
bytes3 =
|
|
727229
|
+
bytes3 = fs40.readSync(fd4, headBuf, bufPos, headBuf.length - bufPos, position + bufPos);
|
|
727189
727230
|
if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
|
|
727190
727231
|
throw new Error("cannot append to compressed archives");
|
|
727191
727232
|
}
|
|
@@ -727211,7 +727252,7 @@ var replaceSync = (opt, files) => {
|
|
|
727211
727252
|
} finally {
|
|
727212
727253
|
if (threw) {
|
|
727213
727254
|
try {
|
|
727214
|
-
|
|
727255
|
+
fs40.closeSync(fd4);
|
|
727215
727256
|
} catch (er3) {}
|
|
727216
727257
|
}
|
|
727217
727258
|
}
|
|
@@ -727228,7 +727269,7 @@ var replaceSync = (opt, files) => {
|
|
|
727228
727269
|
const getPos = (fd4, size, cb_) => {
|
|
727229
727270
|
const cb4 = (er3, pos2) => {
|
|
727230
727271
|
if (er3) {
|
|
727231
|
-
|
|
727272
|
+
fs40.close(fd4, (_2) => cb_(er3));
|
|
727232
727273
|
} else {
|
|
727233
727274
|
cb_(null, pos2);
|
|
727234
727275
|
}
|
|
@@ -727245,7 +727286,7 @@ var replaceSync = (opt, files) => {
|
|
|
727245
727286
|
}
|
|
727246
727287
|
bufPos += bytes3;
|
|
727247
727288
|
if (bufPos < 512 && bytes3) {
|
|
727248
|
-
return
|
|
727289
|
+
return fs40.read(fd4, headBuf, bufPos, headBuf.length - bufPos, position + bufPos, onread);
|
|
727249
727290
|
}
|
|
727250
727291
|
if (position === 0 && headBuf[0] === 31 && headBuf[1] === 139) {
|
|
727251
727292
|
return cb4(new Error("cannot append to compressed archives"));
|
|
@@ -727269,9 +727310,9 @@ var replaceSync = (opt, files) => {
|
|
|
727269
727310
|
opt.mtimeCache.set(String(h3.path), h3.mtime);
|
|
727270
727311
|
}
|
|
727271
727312
|
bufPos = 0;
|
|
727272
|
-
|
|
727313
|
+
fs40.read(fd4, headBuf, 0, 512, position, onread);
|
|
727273
727314
|
};
|
|
727274
|
-
|
|
727315
|
+
fs40.read(fd4, headBuf, 0, 512, position, onread);
|
|
727275
727316
|
};
|
|
727276
727317
|
const promise = new Promise((resolve6, reject) => {
|
|
727277
727318
|
p.on("error", reject);
|
|
@@ -727279,14 +727320,14 @@ var replaceSync = (opt, files) => {
|
|
|
727279
727320
|
const onopen = (er3, fd4) => {
|
|
727280
727321
|
if (er3 && er3.code === "ENOENT" && flag === "r+") {
|
|
727281
727322
|
flag = "w+";
|
|
727282
|
-
return
|
|
727323
|
+
return fs40.open(opt.file, flag, onopen);
|
|
727283
727324
|
}
|
|
727284
727325
|
if (er3 || !fd4) {
|
|
727285
727326
|
return reject(er3);
|
|
727286
727327
|
}
|
|
727287
|
-
|
|
727328
|
+
fs40.fstat(fd4, (er4, st4) => {
|
|
727288
727329
|
if (er4) {
|
|
727289
|
-
return
|
|
727330
|
+
return fs40.close(fd4, () => reject(er4));
|
|
727290
727331
|
}
|
|
727291
727332
|
getPos(fd4, st4.size, (er5, position) => {
|
|
727292
727333
|
if (er5) {
|
|
@@ -727303,14 +727344,14 @@ var replaceSync = (opt, files) => {
|
|
|
727303
727344
|
});
|
|
727304
727345
|
});
|
|
727305
727346
|
};
|
|
727306
|
-
|
|
727347
|
+
fs40.open(opt.file, flag, onopen);
|
|
727307
727348
|
});
|
|
727308
727349
|
return promise;
|
|
727309
727350
|
}, addFilesSync2 = (p, files) => {
|
|
727310
727351
|
files.forEach((file) => {
|
|
727311
727352
|
if (file.charAt(0) === "@") {
|
|
727312
727353
|
list({
|
|
727313
|
-
file:
|
|
727354
|
+
file: path59.resolve(p.cwd, file.slice(1)),
|
|
727314
727355
|
sync: true,
|
|
727315
727356
|
noResume: true,
|
|
727316
727357
|
onReadEntry: (entry) => p.add(entry)
|
|
@@ -727325,7 +727366,7 @@ var replaceSync = (opt, files) => {
|
|
|
727325
727366
|
const file = String(files[i2]);
|
|
727326
727367
|
if (file.charAt(0) === "@") {
|
|
727327
727368
|
await list({
|
|
727328
|
-
file:
|
|
727369
|
+
file: path59.resolve(String(p.cwd), file.slice(1)),
|
|
727329
727370
|
noResume: true,
|
|
727330
727371
|
onReadEntry: (entry) => p.add(entry)
|
|
727331
727372
|
});
|
|
@@ -727365,7 +727406,7 @@ var update, mtimeFilter = (opt) => {
|
|
|
727365
727406
|
if (!opt.mtimeCache) {
|
|
727366
727407
|
opt.mtimeCache = new Map;
|
|
727367
727408
|
}
|
|
727368
|
-
opt.filter = filter5 ? (
|
|
727409
|
+
opt.filter = filter5 ? (path38, stat2) => filter5(path38, stat2) && !((opt.mtimeCache?.get(path38) ?? stat2.mtime ?? 0) > (stat2.mtime ?? 0)) : (path38, stat2) => !((opt.mtimeCache?.get(path38) ?? stat2.mtime ?? 0) > (stat2.mtime ?? 0));
|
|
727369
727410
|
};
|
|
727370
727411
|
var init_update = __esm(() => {
|
|
727371
727412
|
init_make_command();
|
|
@@ -727614,26 +727655,26 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727614
727655
|
}
|
|
727615
727656
|
mkdirSync5(folder);
|
|
727616
727657
|
};
|
|
727617
|
-
Utils.prototype.writeFileTo = function(
|
|
727658
|
+
Utils.prototype.writeFileTo = function(path38, content, overwrite, attr) {
|
|
727618
727659
|
const self2 = this;
|
|
727619
|
-
if (self2.fs.existsSync(
|
|
727660
|
+
if (self2.fs.existsSync(path38)) {
|
|
727620
727661
|
if (!overwrite)
|
|
727621
727662
|
return false;
|
|
727622
|
-
var stat2 = self2.fs.statSync(
|
|
727663
|
+
var stat2 = self2.fs.statSync(path38);
|
|
727623
727664
|
if (stat2.isDirectory()) {
|
|
727624
727665
|
return false;
|
|
727625
727666
|
}
|
|
727626
727667
|
}
|
|
727627
|
-
var folder = pth.dirname(
|
|
727668
|
+
var folder = pth.dirname(path38);
|
|
727628
727669
|
if (!self2.fs.existsSync(folder)) {
|
|
727629
727670
|
self2.makeDir(folder);
|
|
727630
727671
|
}
|
|
727631
727672
|
var fd4;
|
|
727632
727673
|
try {
|
|
727633
|
-
fd4 = self2.fs.openSync(
|
|
727674
|
+
fd4 = self2.fs.openSync(path38, "w", 438);
|
|
727634
727675
|
} catch (e6) {
|
|
727635
|
-
self2.fs.chmodSync(
|
|
727636
|
-
fd4 = self2.fs.openSync(
|
|
727676
|
+
self2.fs.chmodSync(path38, 438);
|
|
727677
|
+
fd4 = self2.fs.openSync(path38, "w", 438);
|
|
727637
727678
|
}
|
|
727638
727679
|
if (fd4) {
|
|
727639
727680
|
try {
|
|
@@ -727642,33 +727683,33 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727642
727683
|
self2.fs.closeSync(fd4);
|
|
727643
727684
|
}
|
|
727644
727685
|
}
|
|
727645
|
-
self2.fs.chmodSync(
|
|
727686
|
+
self2.fs.chmodSync(path38, attr || 438);
|
|
727646
727687
|
return true;
|
|
727647
727688
|
};
|
|
727648
|
-
Utils.prototype.writeFileToAsync = function(
|
|
727689
|
+
Utils.prototype.writeFileToAsync = function(path38, content, overwrite, attr, callback) {
|
|
727649
727690
|
if (typeof attr === "function") {
|
|
727650
727691
|
callback = attr;
|
|
727651
727692
|
attr = undefined;
|
|
727652
727693
|
}
|
|
727653
727694
|
const self2 = this;
|
|
727654
|
-
self2.fs.exists(
|
|
727695
|
+
self2.fs.exists(path38, function(exist) {
|
|
727655
727696
|
if (exist && !overwrite)
|
|
727656
727697
|
return callback(false);
|
|
727657
|
-
self2.fs.stat(
|
|
727698
|
+
self2.fs.stat(path38, function(err, stat2) {
|
|
727658
727699
|
if (exist && stat2.isDirectory()) {
|
|
727659
727700
|
return callback(false);
|
|
727660
727701
|
}
|
|
727661
|
-
var folder = pth.dirname(
|
|
727702
|
+
var folder = pth.dirname(path38);
|
|
727662
727703
|
self2.fs.exists(folder, function(exists2) {
|
|
727663
727704
|
if (!exists2)
|
|
727664
727705
|
self2.makeDir(folder);
|
|
727665
|
-
self2.fs.open(
|
|
727706
|
+
self2.fs.open(path38, "w", 438, function(err2, fd4) {
|
|
727666
727707
|
if (err2) {
|
|
727667
|
-
self2.fs.chmod(
|
|
727668
|
-
self2.fs.open(
|
|
727708
|
+
self2.fs.chmod(path38, 438, function() {
|
|
727709
|
+
self2.fs.open(path38, "w", 438, function(err3, fd5) {
|
|
727669
727710
|
self2.fs.write(fd5, content, 0, content.length, 0, function() {
|
|
727670
727711
|
self2.fs.close(fd5, function() {
|
|
727671
|
-
self2.fs.chmod(
|
|
727712
|
+
self2.fs.chmod(path38, attr || 438, function() {
|
|
727672
727713
|
callback(true);
|
|
727673
727714
|
});
|
|
727674
727715
|
});
|
|
@@ -727678,13 +727719,13 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727678
727719
|
} else if (fd4) {
|
|
727679
727720
|
self2.fs.write(fd4, content, 0, content.length, 0, function() {
|
|
727680
727721
|
self2.fs.close(fd4, function() {
|
|
727681
|
-
self2.fs.chmod(
|
|
727722
|
+
self2.fs.chmod(path38, attr || 438, function() {
|
|
727682
727723
|
callback(true);
|
|
727683
727724
|
});
|
|
727684
727725
|
});
|
|
727685
727726
|
});
|
|
727686
727727
|
} else {
|
|
727687
|
-
self2.fs.chmod(
|
|
727728
|
+
self2.fs.chmod(path38, attr || 438, function() {
|
|
727688
727729
|
callback(true);
|
|
727689
727730
|
});
|
|
727690
727731
|
}
|
|
@@ -727693,7 +727734,7 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727693
727734
|
});
|
|
727694
727735
|
});
|
|
727695
727736
|
};
|
|
727696
|
-
Utils.prototype.findFiles = function(
|
|
727737
|
+
Utils.prototype.findFiles = function(path38) {
|
|
727697
727738
|
const self2 = this;
|
|
727698
727739
|
function findSync(dir, pattern, recursive) {
|
|
727699
727740
|
if (typeof pattern === "boolean") {
|
|
@@ -727712,7 +727753,7 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727712
727753
|
});
|
|
727713
727754
|
return files;
|
|
727714
727755
|
}
|
|
727715
|
-
return findSync(
|
|
727756
|
+
return findSync(path38, undefined, true);
|
|
727716
727757
|
};
|
|
727717
727758
|
Utils.prototype.findFilesAsync = function(dir, cb4) {
|
|
727718
727759
|
const self2 = this;
|
|
@@ -727772,16 +727813,16 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727772
727813
|
return "UNSUPPORTED (" + method + ")";
|
|
727773
727814
|
}
|
|
727774
727815
|
};
|
|
727775
|
-
Utils.canonical = function(
|
|
727776
|
-
if (!
|
|
727816
|
+
Utils.canonical = function(path38) {
|
|
727817
|
+
if (!path38)
|
|
727777
727818
|
return "";
|
|
727778
|
-
const safeSuffix = pth.posix.normalize("/" +
|
|
727819
|
+
const safeSuffix = pth.posix.normalize("/" + path38.split("\\").join("/"));
|
|
727779
727820
|
return pth.join(".", safeSuffix);
|
|
727780
727821
|
};
|
|
727781
|
-
Utils.zipnamefix = function(
|
|
727782
|
-
if (!
|
|
727822
|
+
Utils.zipnamefix = function(path38) {
|
|
727823
|
+
if (!path38)
|
|
727783
727824
|
return "";
|
|
727784
|
-
const safeSuffix = pth.posix.normalize("/" +
|
|
727825
|
+
const safeSuffix = pth.posix.normalize("/" + path38.split("\\").join("/"));
|
|
727785
727826
|
return pth.posix.join(".", safeSuffix);
|
|
727786
727827
|
};
|
|
727787
727828
|
Utils.findLast = function(arr, callback) {
|
|
@@ -727799,9 +727840,9 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727799
727840
|
prefix = pth.resolve(pth.normalize(prefix));
|
|
727800
727841
|
var parts = name3.split("/");
|
|
727801
727842
|
for (var i2 = 0, l3 = parts.length;i2 < l3; i2++) {
|
|
727802
|
-
var
|
|
727803
|
-
if (
|
|
727804
|
-
return
|
|
727843
|
+
var path38 = pth.normalize(pth.join(prefix, parts.slice(i2, l3).join(pth.sep)));
|
|
727844
|
+
if (path38.indexOf(prefix) === 0) {
|
|
727845
|
+
return path38;
|
|
727805
727846
|
}
|
|
727806
727847
|
}
|
|
727807
727848
|
return pth.normalize(pth.join(prefix, pth.basename(name3)));
|
|
@@ -727839,8 +727880,8 @@ var require_utils8 = __commonJS((exports7, module) => {
|
|
|
727839
727880
|
// ../../node_modules/adm-zip/util/fattr.js
|
|
727840
727881
|
var require_fattr = __commonJS((exports7, module) => {
|
|
727841
727882
|
var pth = __require("path");
|
|
727842
|
-
module.exports = function(
|
|
727843
|
-
var _path2 =
|
|
727883
|
+
module.exports = function(path38, { fs: fs20 }) {
|
|
727884
|
+
var _path2 = path38 || "", _obj = newAttr(), _stat = null;
|
|
727844
727885
|
function newAttr() {
|
|
727845
727886
|
return {
|
|
727846
727887
|
directory: false,
|
|
@@ -727851,8 +727892,8 @@ var require_fattr = __commonJS((exports7, module) => {
|
|
|
727851
727892
|
atime: 0
|
|
727852
727893
|
};
|
|
727853
727894
|
}
|
|
727854
|
-
if (_path2 &&
|
|
727855
|
-
_stat =
|
|
727895
|
+
if (_path2 && fs20.existsSync(_path2)) {
|
|
727896
|
+
_stat = fs20.statSync(_path2);
|
|
727856
727897
|
_obj.directory = _stat.isDirectory();
|
|
727857
727898
|
_obj.mtime = _stat.mtime;
|
|
727858
727899
|
_obj.atime = _stat.atime;
|
|
@@ -729695,7 +729736,7 @@ var exports_upgrade = {};
|
|
|
729695
729736
|
__export(exports_upgrade, {
|
|
729696
729737
|
adkSelfUpgrade: () => adkSelfUpgrade
|
|
729697
729738
|
});
|
|
729698
|
-
import { existsSync as
|
|
729739
|
+
import { existsSync as existsSync19, writeFileSync as writeFileSync6, chmodSync, renameSync, unlinkSync, readFileSync as readFileSync16, mkdirSync as mkdirSync5, rmdirSync, accessSync, constants as constants8 } from "fs";
|
|
729699
729740
|
import { join as join19, dirname as dirname5 } from "path";
|
|
729700
729741
|
import { tmpdir } from "os";
|
|
729701
729742
|
import { execSync as execSync4 } from "child_process";
|
|
@@ -729782,12 +729823,12 @@ async function downloadBinaryWindows(version3, target, extension) {
|
|
|
729782
729823
|
function getCurrentBinaryPath() {
|
|
729783
729824
|
return process.execPath;
|
|
729784
729825
|
}
|
|
729785
|
-
function checkWritePermissions(
|
|
729826
|
+
function checkWritePermissions(path38) {
|
|
729786
729827
|
try {
|
|
729787
|
-
const dir = dirname5(
|
|
729828
|
+
const dir = dirname5(path38);
|
|
729788
729829
|
accessSync(dir, constants8.W_OK);
|
|
729789
|
-
if (
|
|
729790
|
-
accessSync(
|
|
729830
|
+
if (existsSync19(path38)) {
|
|
729831
|
+
accessSync(path38, constants8.W_OK);
|
|
729791
729832
|
}
|
|
729792
729833
|
return true;
|
|
729793
729834
|
} catch {
|
|
@@ -729818,7 +729859,7 @@ del "%~f0"
|
|
|
729818
729859
|
unlinkSync(backupPath);
|
|
729819
729860
|
console.log("\u2705 Successfully upgraded!");
|
|
729820
729861
|
} catch (error) {
|
|
729821
|
-
if (
|
|
729862
|
+
if (existsSync19(backupPath)) {
|
|
729822
729863
|
try {
|
|
729823
729864
|
renameSync(backupPath, currentPath);
|
|
729824
729865
|
} catch {}
|
|
@@ -730134,10 +730175,10 @@ function assignProp(target, prop, value2) {
|
|
|
730134
730175
|
configurable: true
|
|
730135
730176
|
});
|
|
730136
730177
|
}
|
|
730137
|
-
function getElementAtPath(obj,
|
|
730138
|
-
if (!
|
|
730178
|
+
function getElementAtPath(obj, path38) {
|
|
730179
|
+
if (!path38)
|
|
730139
730180
|
return obj;
|
|
730140
|
-
return
|
|
730181
|
+
return path38.reduce((acc, key) => acc?.[key], obj);
|
|
730141
730182
|
}
|
|
730142
730183
|
function promiseAllObject(promisesObj) {
|
|
730143
730184
|
const keys4 = Object.keys(promisesObj);
|
|
@@ -730383,11 +730424,11 @@ function aborted2(x, startIndex = 0) {
|
|
|
730383
730424
|
}
|
|
730384
730425
|
return false;
|
|
730385
730426
|
}
|
|
730386
|
-
function prefixIssues(
|
|
730427
|
+
function prefixIssues(path38, issues) {
|
|
730387
730428
|
return issues.map((iss) => {
|
|
730388
730429
|
var _a4;
|
|
730389
730430
|
(_a4 = iss).path ?? (_a4.path = []);
|
|
730390
|
-
iss.path.unshift(
|
|
730431
|
+
iss.path.unshift(path38);
|
|
730391
730432
|
return iss;
|
|
730392
730433
|
});
|
|
730393
730434
|
}
|
|
@@ -739055,8 +739096,8 @@ var require_utils9 = __commonJS((exports7, module) => {
|
|
|
739055
739096
|
}
|
|
739056
739097
|
return ind;
|
|
739057
739098
|
}
|
|
739058
|
-
function removeDotSegments(
|
|
739059
|
-
let input =
|
|
739099
|
+
function removeDotSegments(path38) {
|
|
739100
|
+
let input = path38;
|
|
739060
739101
|
const output = [];
|
|
739061
739102
|
let nextSlash = -1;
|
|
739062
739103
|
let len = 0;
|
|
@@ -739246,8 +739287,8 @@ var require_schemes = __commonJS((exports7, module) => {
|
|
|
739246
739287
|
wsComponent.secure = undefined;
|
|
739247
739288
|
}
|
|
739248
739289
|
if (wsComponent.resourceName) {
|
|
739249
|
-
const [
|
|
739250
|
-
wsComponent.path =
|
|
739290
|
+
const [path38, query] = wsComponent.resourceName.split("?");
|
|
739291
|
+
wsComponent.path = path38 && path38 !== "/" ? path38 : undefined;
|
|
739251
739292
|
wsComponent.query = query;
|
|
739252
739293
|
wsComponent.resourceName = undefined;
|
|
739253
739294
|
}
|
|
@@ -742382,12 +742423,12 @@ var require_dist5 = __commonJS((exports7, module) => {
|
|
|
742382
742423
|
throw new Error(`Unknown format "${name3}"`);
|
|
742383
742424
|
return f;
|
|
742384
742425
|
};
|
|
742385
|
-
function addFormats(ajv, list3,
|
|
742426
|
+
function addFormats(ajv, list3, fs20, exportName) {
|
|
742386
742427
|
var _a4;
|
|
742387
742428
|
var _b4;
|
|
742388
742429
|
(_a4 = (_b4 = ajv.opts.code).formats) !== null && _a4 !== undefined || (_b4.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`);
|
|
742389
742430
|
for (const f of list3)
|
|
742390
|
-
ajv.addFormat(f,
|
|
742431
|
+
ajv.addFormat(f, fs20[f]);
|
|
742391
742432
|
}
|
|
742392
742433
|
module.exports = exports7 = formatsPlugin;
|
|
742393
742434
|
Object.defineProperty(exports7, "__esModule", { value: true });
|
|
@@ -742950,15 +742991,15 @@ var init_stdio4 = __esm(() => {
|
|
|
742950
742991
|
});
|
|
742951
742992
|
|
|
742952
742993
|
// src/mcp/context.ts
|
|
742953
|
-
import { existsSync as
|
|
742994
|
+
import { existsSync as existsSync20 } from "fs";
|
|
742954
742995
|
import { resolve as resolve6, join as join20 } from "path";
|
|
742955
742996
|
async function resolveContext(cwd4) {
|
|
742956
742997
|
const resolvedCwd = resolve6(cwd4 ?? process.cwd());
|
|
742957
|
-
if (!
|
|
742998
|
+
if (!existsSync20(resolvedCwd)) {
|
|
742958
742999
|
throw new Error(`Directory not found: ${resolvedCwd}`);
|
|
742959
743000
|
}
|
|
742960
743001
|
const configPath = join20(resolvedCwd, "agent.config.ts");
|
|
742961
|
-
const isAdkProject =
|
|
743002
|
+
const isAdkProject = existsSync20(configPath);
|
|
742962
743003
|
let project;
|
|
742963
743004
|
if (isAdkProject) {
|
|
742964
743005
|
try {
|
|
@@ -744519,11 +744560,11 @@ function Oo4(t9) {
|
|
|
744519
744560
|
function hs4(t9) {
|
|
744520
744561
|
return Object.prototype.toString.call(t9);
|
|
744521
744562
|
}
|
|
744522
|
-
function
|
|
744563
|
+
function fs41(t9) {
|
|
744523
744564
|
return t9 < 10 ? "0" + t9.toString(10) : t9.toString(10);
|
|
744524
744565
|
}
|
|
744525
744566
|
function yE3() {
|
|
744526
|
-
var t9 = new Date, e6 = [
|
|
744567
|
+
var t9 = new Date, e6 = [fs41(t9.getHours()), fs41(t9.getMinutes()), fs41(t9.getSeconds())].join(":");
|
|
744527
744568
|
return [t9.getDate(), gE3[t9.getMonth()], e6].join(" ");
|
|
744528
744569
|
}
|
|
744529
744570
|
function Am3(t9, e6) {
|
|
@@ -755464,7 +755505,7 @@ var init_schemas4 = __esm(() => {
|
|
|
755464
755505
|
|
|
755465
755506
|
// src/mcp/tools/init-project.ts
|
|
755466
755507
|
import { join as join21 } from "path";
|
|
755467
|
-
import { existsSync as
|
|
755508
|
+
import { existsSync as existsSync21 } from "fs";
|
|
755468
755509
|
async function initProjectHandler(args, context4) {
|
|
755469
755510
|
const validation = validateInput(InitProjectInputSchema, args);
|
|
755470
755511
|
if (!validation.success) {
|
|
@@ -755478,7 +755519,7 @@ async function initProjectHandler(args, context4) {
|
|
|
755478
755519
|
};
|
|
755479
755520
|
}
|
|
755480
755521
|
const projectPath = join21(context4.cwd, name3);
|
|
755481
|
-
if (
|
|
755522
|
+
if (existsSync21(projectPath)) {
|
|
755482
755523
|
return {
|
|
755483
755524
|
success: false,
|
|
755484
755525
|
error: `Directory "${name3}" already exists in ${context4.cwd}`
|
|
@@ -870270,9 +870311,9 @@ function getPathFromURLPosix$1(url5) {
|
|
|
870270
870311
|
return decodeURIComponent(pathname);
|
|
870271
870312
|
}
|
|
870272
870313
|
function pathToFileURL$1(filepath) {
|
|
870273
|
-
let resolved =
|
|
870314
|
+
let resolved = path60.resolve(filepath);
|
|
870274
870315
|
const filePathLast = filepath.charCodeAt(filepath.length - 1);
|
|
870275
|
-
if ((filePathLast === CHAR_FORWARD_SLASH$1 || isWindows$1 && filePathLast === CHAR_BACKWARD_SLASH$1) && resolved[resolved.length - 1] !==
|
|
870316
|
+
if ((filePathLast === CHAR_FORWARD_SLASH$1 || isWindows$1 && filePathLast === CHAR_BACKWARD_SLASH$1) && resolved[resolved.length - 1] !== path60.sep) {
|
|
870276
870317
|
resolved += "/";
|
|
870277
870318
|
}
|
|
870278
870319
|
const outURL = new URL("file://");
|
|
@@ -874783,7 +874824,7 @@ var __create7, __defProp12, __getOwnPropDesc6, __getOwnPropNames7, __getProtoOf7
|
|
|
874783
874824
|
__defProp12(to4, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc6(from, key)) || desc2.enumerable });
|
|
874784
874825
|
}
|
|
874785
874826
|
return to4;
|
|
874786
|
-
}, __toESM7 = (mod, isNodeMode, target) => (target = mod != null ? __create7(__getProtoOf7(mod)) : {}, __copyProps6(isNodeMode || !mod || !mod.__esModule ? __defProp12(target, "default", { value: mod, enumerable: true }) : target, mod)), __toCommonJS4 = (mod) => __copyProps6(__defProp12({}, "__esModule", { value: true }), mod), init_dirname2, process_exports2, queue3, draining3, currentQueue3, queueIndex3, title3, arch5, platform9, env7, argv3, execArgv3, version4, versions5, emitWarning5, binding3, umask3, cwd4, chdir3, release3, browser2, _rawDebug3, moduleLoadList3, domain3, _exiting3, config5, reallyExit3, _kill3, cpuUsage3, resourceUsage3, memoryUsage3, kill3, exit3, openStdin3, allowedNodeEnvironmentFlags3, features3, _fatalExceptions3, setUncaughtExceptionCaptureCallback3, _tickCallback3, _debugProcess3, _debugEnd3, _startProfilerIdleNotifier3, _stopProfilerIdleNotifier3, stdout3, stderr3, stdin3, abort3, pid3, ppid3, execPath3, debugPort3, argv03, _preload_modules3, setSourceMapsEnabled3, _performance3, nowOffset2, nanoPerSec3, _maxListeners3, _events3, _eventsCount3, addListener3, once10, off3, removeListener3, removeAllListeners3, emit3, prependListener3, prependOnceListener3, process38, init_process3, init_process22, exports$24, _dewExec$24, exports$15, _dewExec$14, exports7, _dewExec6, init_chunk_DtuTasat2, buffer_exports, exports23, Buffer26, INSPECT_MAX_BYTES2, kMaxLength2, init_buffer5, init_buffer22, require_browser4, exports$k2, _dewExec$k2, exports$j2, _dewExec$j2, exports$i2, _dewExec$i2, exports$h2, _dewExec$h2, exports$g2, _dewExec$g2, exports$f2, _dewExec$f2, exports$e2, _dewExec$e2, exports$d2, _dewExec$d2, exports$c3, _dewExec$c2, exports$b3, _dewExec$b3, exports$a3, _dewExec$a3, exports$93, _dewExec$93, exports$83, _dewExec$83, exports$73, _dewExec$73, exports$63, _dewExec$63, exports$53, _dewExec$53, exports$43, _dewExec$43, exports$33, _dewExec$33, exports$222, _dewExec$222, exports$122, _dewExec$122, exports32, _dewExec22, init_chunk_DtcTpLWz2, exports42, _dewExec32, init_chunk_CkFCi_G12, queue22, draining22, currentQueue22, queueIndex22, title22, arch22, platform23, env23, argv22, execArgv23, version23, versions22, emitWarning23, binding22, umask22, cwd23, chdir22, release22, _rawDebug22, moduleLoadList22, domain22, _exiting22, config22, reallyExit22, _kill22, cpuUsage22, resourceUsage22, memoryUsage22, kill22, exit22, openStdin22, allowedNodeEnvironmentFlags22, features22, _fatalExceptions22, setUncaughtExceptionCaptureCallback22, _tickCallback22, _debugProcess22, _debugEnd22, _startProfilerIdleNotifier22, _stopProfilerIdleNotifier22, stdout22, stderr22, stdin22, abort22, pid22, ppid22, execPath23, debugPort22, argv022, _preload_modules22, setSourceMapsEnabled22, _performance22, nowOffset2, nanoPerSec22, _maxListeners22, _events22, _eventsCount22, addListener22, once23, off22, removeListener22, removeAllListeners22, emit22, prependListener22, prependOnceListener22, process25, init_chunk_DEMDiNwt2, util_exports2, exports$c22, _dewExec$b22, exports$b22, _dewExec$a22, exports$a22, _dewExec$922, exports$922, _dewExec$822, exports$822, _dewExec$722, exports$722, _dewExec$622, exports$622, _dewExec$522, _global$22, exports$522, _dewExec$422, _global$12, exports$422, _dewExec$322, exports$322, _dewExec$232, exports$232, _dewExec$132, exports$132, _dewExec42, _global24, exports52, _extend2, callbackify9, debuglog4, deprecate2, format5, inherits22, inspect5, isArray22, isBoolean22, isBuffer22, isDate22, isError3, isFunction24, isNull2, isNullOrUndefined2, isNumber24, isObject22, isPrimitive6, isRegExp22, isString22, isSymbol6, isUndefined22, log4, promisify11, types7, TextEncoder4, TextDecoder3, init_util5, assert_exports, exports$i22, _dewExec$h22, exports$h22, _dewExec$g22, exports$g22, _dewExec$f22, exports$f22, _dewExec$e22, exports$e22, _dewExec$d22, exports$d22, _dewExec$c22, exports$c32, _dewExec$b32, exports$b32, _dewExec$a32, exports$a32, _dewExec$932, exports$932, _dewExec$832, exports$832, _dewExec$732, exports$732, _dewExec$632, exports$632, _dewExec$532, exports$532, _dewExec$432, exports$432, _dewExec$332, exports$332, _dewExec$242, exports$242, _dewExec$142, exports$142, _dewExec52, exports62, AssertionError, deepEqual, deepStrictEqual, doesNotReject, doesNotThrow, equal, fail, ifError, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok4, rejects, strict, strictEqual, throws, init_assert, events_exports, exports$152, _dewExec62, exports72, EventEmitter10, defaultMaxListeners, init4, listenerCount, on32, once32, init_events5, exports$25, _dewExec$15, exports$16, _dewExec7, exports8, StringDecoder6, init_chunk_CcCWfKp1, stream_exports, exports$p, _dewExec$o, exports$o, _dewExec$n, exports$n, _dewExec$m, exports$m, _dewExec$l, exports$l, _dewExec$k22, exports$k22, _dewExec$j22, exports$j22, _dewExec$i22, exports$i3, _dewExec$h3, exports$h3, _dewExec$g3, exports$g3, _dewExec$f3, exports$f3, _dewExec$e3, exports$e3, _dewExec$d3, exports$d3, _dewExec$c3, exports$c4, _dewExec$b4, _global$222, exports$b4, _dewExec$a4, _global$122, exports$a4, _dewExec$94, exports$94, _dewExec$84, exports$84, _dewExec$74, exports$74, _dewExec$64, exports$64, _dewExec$54, exports$54, _dewExec$44, exports$44, _dewExec$34, exports$34, _dewExec$25, exports$26, _dewExec$16, _global32, exports$17, _dewExec8, exports9, Readable8, Writable4, Duplex4, Transform4, PassThrough3, finished7, pipeline2, Stream5, promises, init_stream3, require_assert, require_extsprintf, require_util8, require_verror, e7, t13, n6, r, i5, s4, y3, init_chunk_tHuMsdT0, init_chunk_DtDiafJB, e$2, t$3, n$2, r$2, o$3, l$2, s$1, f$1, a$1, T$1, t23, e22, o22, n22, r2, l22, t$1, o$1, n$1, e$1, r$1, c22, u22, i22, t$2, i$1, o$2, u$1, f22, a22, s22, p22, y22, l$1, d7, m3, h22, j3, A6, Q2, X4, Y3, ee, te4, re5, ne6, ie2, Se, Ee4, promisify22, init_chunk_D3uu3VYh, exports10, _dewExec9, _global42, process39, init_chunk_b0rmRow7, r$14, t$14, e$24, n$24, o$24, a$14, h$14, a$1$1, e$1$1, n$1$1, i$12, o$1$1, j22, Y22, e32, n32, o3, u32, e$12, s32, i32, exports$2$1, _dewExec$2$1, exports$1$1, _dewExec$1$1, exports$g4, _dewExec$g4, buffer, exports$f4, _dewExec$f4, exports$e4, _dewExec$e4, exports$d4, _dewExec$d4, exports$c5, _dewExec$c4, exports$b5, _dewExec$b5, exports$a5, _dewExec$a5, exports$95, _dewExec$95, _global$23, exports$85, _dewExec$85, _global$13, exports$75, _dewExec$75, exports$65, _dewExec$65, exports$55, _dewExec$55, exports$45, _dewExec$45, exports$35, _dewExec$35, _global5, exports$27, _dewExec$26, exports$18, _dewExec$17, exports11, _dewExec10, init_chunk_B738Er4n, promisify32, init_chunk_CbQqNoLO, exports$19, _dewExec11, _global6, exports12, Readable22, init_chunk_B6_G_Ftj, exports13, _dewExec12, init_chunk_C4rKjYLo, exports14, _dewExec13, _global7, init_chunk_BsRZ0PEC, exports$110, _dewExec14, _global8, exports15, Script2, createContext11, createScript, isContext, runInContext, runInNewContext, runInThisContext, init_vm, crypto_exports, exports$3H, _dewExec$3G, _global$1e, exports$3G, _dewExec$3F, exports$3F, _dewExec$3E, exports$3E, _dewExec$3D, exports$3D, _dewExec$3C, _global$1d, exports$3C, _dewExec$3B, _global$1c, exports$3B, _dewExec$3A, _global$1b, exports$3A, _dewExec$3z, _global$1a, exports$3z, _dewExec$3y, _global$19, exports$3y, _dewExec$3x, _global$18, exports$3x, _dewExec$3w, _global$17, exports$3w, _dewExec$3v, module$f, exports$3v, _dewExec$3u, _global$16, exports$3u, _dewExec$3t, exports$3t, _dewExec$3s, exports$3s, _dewExec$3r, exports$3r, _dewExec$3q, _algorithms$2, exports$3q, _dewExec$3p, exports$3p, _dewExec$3o, exports$3o, _dewExec$3n, _global$15, exports$3n, _dewExec$3m, exports$3m, _dewExec$3l, _global$14, exports$3l, _dewExec$3k, _global$132, exports$3k, _dewExec$3j, exports$3j, _dewExec$3i, exports$3i, _dewExec$3h, exports$3h, _dewExec$3g, exports$3g, _dewExec$3f, exports$3f, _dewExec$3e, exports$3e, _dewExec$3d, exports$3d, _dewExec$3c, exports$3c, _dewExec$3b, _global$1222, exports$3b, _dewExec$3a, exports$3a, _dewExec$39, exports$39, _dewExec$38, exports$38, _dewExec$37, exports$37, _dewExec$36, exports$36, _dewExec$352, exports$352, _dewExec$342, exports$342, _dewExec$3322, exports$3322, _dewExec$3222, _list$2, exports$3222, _dewExec$31, exports$31, _dewExec$30, _global$11, exports$30, _dewExec$2$, _global$10, exports$2$, _dewExec$2_, _global$$, exports$2_, _dewExec$2Z, _global$_, exports$2Z, _dewExec$2Y, exports$2Y, _dewExec$2X, _global$Z, exports$2X, _dewExec$2W, _global$Y, exports$2W, _dewExec$2V, exports$2V, _dewExec$2U, exports$2U, _dewExec$2T, exports$2T, _dewExec$2S, module$e, _global$X, exports$2S, _dewExec$2R, module$d, _global$W, exports$2Q, _dewExec$2P, exports$2P, _dewExec$2O, _global$U, exports$2O, _dewExec$2N, exports$2N, _dewExec$2M, exports$2M, _dewExec$2L, exports$2L, _dewExec$2K, exports$2K, _dewExec$2J, _global$T, exports$2J, _dewExec$2I, _global$S, exports$2I, _dewExec$2H, _global$R, exports$2H, _dewExec$2G, _global$Q, exports$2G, _dewExec$2F, _global$P, exports$2F, _dewExec$2E, _global$O, exports$2E, _dewExec$2D, _global$N, exports$2D, _dewExec$2C, module$b, exports$f$2, _dewExec$f$2, exports$e$2, _dewExec$e$2, exports$d$2, _dewExec$d$2, exports$c$2, _dewExec$c$2, exports$b$2, _dewExec$b$2, exports$a$2, _dewExec$a$2, exports$9$2, _dewExec$9$2, _global$2$2, exports$8$2, _dewExec$8$2, _global$1$2, exports$7$2, _dewExec$7$2, exports$6$2, _dewExec$6$2, exports$5$2, _dewExec$5$2, exports$4$2, _dewExec$4$2, exports$3$2, _dewExec$3$2, _global$M, exports$2$2, _dewExec$2$2, exports$1$2, _dewExec$1$2, exports$2C, _dewExec$2B, exports$2B, _dewExec$2A, _global$L, stream7, exports$2A, _dewExec$2z, _global$K, exports$2z, _dewExec$2y, exports$2y, _dewExec$2x, exports$2x, _dewExec$2w, exports$2w, _dewExec$2v, _algorithms$1, exports$2v, _dewExec$2u, exports$2u, _dewExec$2t, exports$2t, _dewExec$2s, _global$J, exports$2s, _dewExec$2r, exports$2r, _dewExec$2q, _global$I, exports$2q, _dewExec$2p, _global$H, exports$2p, _dewExec$2o, exports$2o, _dewExec$2n, exports$2n, _dewExec$2m, exports$2m, _dewExec$2l, exports$2l, _dewExec$2k, exports$2k, _dewExec$2j, exports$2j, _dewExec$2i, exports$2i, _dewExec$2h, exports$2h, _dewExec$2g, _global$G, exports$2g, _dewExec$2f, exports$2f, _dewExec$2e, exports$2e, _dewExec$2d, exports$2d, _dewExec$2c, exports$2c, _dewExec$2b, exports$2b, _dewExec$2a, exports$2a, _dewExec$29, exports$29, _dewExec$28, exports$28, _dewExec$27, _list$1, exports$272, _dewExec$262, exports$262, _dewExec$252, _global$F, exports$252, _dewExec$2422, _global$E, exports$2422, _dewExec$2322, _global$D, exports$2322, _dewExec$2222, _global$C, exports$2222, _dewExec$21, exports$21, _dewExec$20, _global$B, exports$20, _dewExec$1$, _global$A, exports$1$, _dewExec$1_, exports$1_, _dewExec$1Z, exports$1Z, _dewExec$1Y, exports$1Y, _dewExec$1X, module$a, _global$z, exports$1X, _dewExec$1W, module$9, _global$y, exports$1W, _dewExec$1V, exports$1U, _dewExec$1T, exports$1T, _dewExec$1S, _global$w, exports$1S, _dewExec$1R, exports$1R, _dewExec$1Q, exports$1Q, _dewExec$1P, exports$1P, _dewExec$1O, _global$v, exports$1O, _dewExec$1N, _global$u, exports$1N, _dewExec$1M, _global$t, exports$1M, _dewExec$1L, _global$s, exports$1L, _dewExec$1K, _global$r, exports$1K, _dewExec$1J, _global$q, exports$1J, _dewExec$1I, _global$p, exports$1I, _dewExec$1H, module$7, e$g, e$1$12, t$c, r$1$1, r$2$1, t$1$1, c$n, b$j, p$s, g$h, y$n, m$m, S$e, R$7, k$g, M$a, j$a, O$8, P$8, x$a, L$8, D$9, C$9, A$c, q$8, W$5, U$a, H$7, F$8, V$6, G$5, Y$4, z$9, J$5, Q$4, Z$3, $$3, t$2$1, r$3$1, n$1$12, b$1$1, p$1$1, g$1$1, y$1$1, w$1$1, S$1$1, R$1$1, k$1$1, E$1$1, M$1$1, O$1$1, T$1$1, x$1$1, P$1$1, D$1$1, L$1$1, C$1$1, A$1$1, I$1$1, N$1$1, U$1$1, H$1$1, F$1$1, V$1$1, Y$1$1, K$1$1, z$1$1, Q$1$1, X$1$1, t$4$1, t$5$1, n$2$1, i$e, a$p, o$s, s$q, f$2$1, h$2$1, p$2$1, o$1$12, e$3$1, s$1$1, t$6$1, o$2$1, e$4$1, f$3$1, v$2$1, l$r, d$n, f$u, b$i, exports$1H, _dewExec$1G, _global$o, exports$1G, _dewExec$1F, exports$1F, _dewExec$1E, exports$1E, _dewExec$1D, exports$1D, _dewExec$1C, _algorithms, exports$1C, _dewExec$1B, exports$1B, _dewExec$1A, exports$1A, _dewExec$1z, _global$n, exports$1z, _dewExec$1y, exports$1y, _dewExec$1x, _global$m, exports$1x, _dewExec$1w, _global$l, exports$1w, _dewExec$1v, exports$1v, _dewExec$1u, exports$1u, _dewExec$1t, exports$1t, _dewExec$1s, exports$1s, _dewExec$1r, exports$1r, _dewExec$1q, exports$1q, _dewExec$1p, exports$1p, _dewExec$1o, exports$1o, _dewExec$1n, _global$k, exports$1n, _dewExec$1m, exports$1m, _dewExec$1l, exports$1l, _dewExec$1k, exports$1k, _dewExec$1j, exports$1j$1, _dewExec$1i$1, exports$1i$1, _dewExec$1h$1, exports$1h$1, _dewExec$1g$1, exports$1g$1, _dewExec$1f$1, exports$1f$1, _dewExec$1e$1, _list, exports$1e$1, _dewExec$1d$1, exports$1d$1, _dewExec$1c$1, _global$j$1, exports$1c$1, _dewExec$1b$1, _global$i$1, exports$1b$1, _dewExec$1a$1, _global$h$1, exports$1a$1, _dewExec$19$1, _global$g$1, exports$19$1, _dewExec$18$1, exports$18$1, _dewExec$17$1, _global$f$1, exports$17$1, _dewExec$16$1, _global$e$1, exports$16$1, _dewExec$15$1, exports$15$1, _dewExec$14$1, exports$14$1, _dewExec$13$1, exports$13$1, _dewExec$12$1, module$6, _global$d$1, exports$12$1, _dewExec$11$1, module$5, _global$c$1, _global$b$1, exports$11$1, indexOf2, Object_keys2, forEach32, defineProp2, globals2, Script3, o4, n42, t42, f4, a4, e62, o$13, f$13, h42, r4, _32, e$13, u42, h$12, _$1, r$12, e$22, n$22, o$32, f$3, c$13, a$22, l$13, I32, s$13, h$2, _$2, n$3, r$22, o$4, f$4, l$22, a$3, w$1, _$3, e$4, n$4, r$3, l$3, o$5, c$3, d$2, p$2, b$2, w$2, g32, B32, T32, m32, A32, U32, x32, j32, q22, L32, k$2, z32, D32, F32, G22, H22, W22, X22, Y32, Z22, $22, tt2, it4, st5, _t5, et5, nt5, e$5, n$5, s$2, h$3, f$6, m$12, n$6, p$3, s$3, h$4, e$6, r$4, o$6, h$5, n$7, p$4, l$4, d$3, c$4, _$4, m$2, u$4, g$1, v$1, w$3, s$4, f$8, a$7, u$5, h$6, c$5, l$5, p$5, d$4, m$3, y$2, b$3, v$2, w$4, g$2, B$1, k$3, S$1, A$1, H$1, E$2, P$1, U$1, K$1, x$1, z$1, I$2, F$1, M$1, r$5, o$7, r$6, i42, n$8, f$9, o$8, p$6, s$6, a$8, h$7, c$6, l$6, d$5, _$5, b$4, k$4, g$3, m$4, z$2, w$5, E$3, I$3, A$2, U$2, d$6, i$13, f$a, o$9, a$9, c$7, n$9, l$7, e$8, f$b, t$12, a$a, p$8, n$a, i$22, o$a, h$8, y$4, f$c, l$8, m$5, B$3, u$7, C$1, d$7, b$5, A$3, S$3, F$2, U$3, w$6, I$4, M$2, a$b, h$9, o$b, f$d, u$8, _$7, d$8, y$5, S$4, v$5, I$5, U$4, w$7, m$6, E$5, b$6, k$6, T$2, O$2, A$4, M$3, V$1, t$22, f$e, a$c, c$9, s$9, f$f, p$a, u$9, l$a, d$9, y$6, m$7, c$a, s$a, f$g, p$b, l$b, u$a, d$a, m$8, y$7, _$8, t$32, p$c, c$b, o$c, e$9, p$d, n$b, s$b, v$8, y$8, a$d, t$4, i$3, r$7, h$a, n$c, t$5, e$a, r$8, n$d, a$e, f$i, n$e, t$6, o$e, a$f, i$4, b$7, d$c, r$9, t$7, n$f, i$5, o$f, p$e, s$c, m$9, u$b, h$b, w$a, y$9, P$2, B$5, K$2, R$1, S$5, x$2, C$2, D$2, G$1, H$2, T$3, j$1, M$4, q$1, O$3, z$3, F$3, I$6, J$1, N$2, m$a, u$c, n$g, d$d, l$d, r$a, e$b, n$i, a$g, i$7, o$g, c$d, s$d, l$e, u$d, h$c, d$e, r$b, i$8, e$c, a$h, l$f, g$9, r$c, n$j, s$f, o$i, e$d, u$f, a$i, c$f, f$k, v$b, _$a, l$g, p$g, m$c, g$a, k$8, d$f, C$3, s$g, n$k, u$g, a$j, c$g, f$l, _$b, g$b, m$d, p$h, l$h, v$c, d$g, k$9, b$9, j$3, x$4, y$c, w$c, r$e, o$k, a$k, u$h, l$i, c$h, p$i, f$m, g$c, d$h, S$8, _$c, b$a, z$5, k$a, y$d, H$4, w$d, L$3, j$4, A$7, B$7, W$2, q$3, C$4, D$3, E$7, F$4, M$5, N$3, O$4, P$3, Q$1, R$2, T$4, V$2, X$2, Y$1, s$h, h$e, r$f, n$l, a$l, b$b, i$9, n$m, s$i, o$m, u$i, l$j, v$e, y$e, m$f, S$9, g$d, M$6, x$6, _$d, z$6, q$4, R$3, N$4, E$8, k$b, O$5, L$4, B$8, T$5, J$3, X$3, D$4, Y$2, W$3, K$4, U$6, G$3, H$5, Z$1, $$1, ee2, de22, ce22, te22, ae22, re22, be22, ie, ne22, se22, ue22, he22, pe22, le22, ve2, me22, Se2, ge22, Ae22, Ie4, we22, xe4, _e, ze, qe2, Re4, Pe2, je22, Ne4, Ee22, Oe2, Le4, Be2, o$n, s$j, a$m, u$j, c$i, f$n, p$k, d$i, g$e, _$e, v$f, b$c, m$g, S$a, j$6, w$f, B$9, k$c, D$5, U$7, N$5, O$6, A$9, x$7, I$9, q$5, F$6, K$5, R$4, G$4, L$5, M$7, J$4, V$4, z$7, H$6, Q$3, e$f, t$a, s$k, n$n, o$o, h$h, y$g, r$g, u$k, a$n, c$j, k$d, f$o, b$d, l$l, d$j, p$l, j$7, v$g, m$h, q$6, K$6, P$6, s$l, i$a, o$p, d$k, n$o, p$m, u$l, y$h, m$i, f$p, b$e, E$a, h$i, v$h, p$n, d$l, f$q, c$k, g$f, w$g, l$n, m$j, v$i, E$b, L$6, R$5, j$8, T$7, P$7, K$7, W$4, x$8, B$a, S$b, q$7, U$8, V$5, C$7, z$8, i$b, n$p, p$o, s$m, u$m, o$q, f$r, i$c, l$o, u$n, c$m, p$p, d$m, h$j, s$n, g$g, m$k, w$h, v$j, y$k, E$c, b$g, B$b, x$9, L$7, k$f, D$7, U$9, R$6, S$c, j$9, A$b, I$a, M$9, o$r, t$b, f$t, u$o, a$o, s$o, l$p, m$l, p$q, l$q, D$8, s$p, _$g, h$k, y$m, E$d, S$d, C$8, N$6, exports$10$1, _dewExec$10$1, _global$a$1, exports$$$1, _dewExec$$$1, _global$9$1, exports$_$1, _dewExec$_$1, _primes$1, exports$Z$1, _dewExec$Z$1, _global$8$1, exports$Y$1, _dewExec$Y$1, exports$X$1, _dewExec$X$1, module$4$1, _global$7$1, exports$W$1, _dewExec$W$1, _package$1, exports$V$1, _dewExec$V$1, module$3$1, _global$6$1, exports$U$1, _dewExec$U$1, exports$T$1, _dewExec$T$1, exports$S$1, _dewExec$S$1, exports$R$1, _dewExec$R$1, exports$Q$1, _dewExec$Q$1, exports$P$1, _dewExec$P$1, exports$O$1, _dewExec$O$1, exports$N$1, _dewExec$N$1, exports$M$1, _dewExec$M$1, exports$L$1, _dewExec$L$1, exports$K$1, _dewExec$K$1, exports$J$1, _dewExec$J$1, exports$I$1, _dewExec$I$1, exports$H$1, _dewExec$H$1, exports$G$1, _dewExec$G$1, exports$F$1, _dewExec$F$1, exports$E$1, _dewExec$E$1, exports$D$1, _dewExec$D$1, exports$C$1, _dewExec$C$1, exports$B$1, _dewExec$B$1, exports$A$1, _dewExec$A$1, exports$z$1, _dewExec$z$1, exports$y$1, _dewExec$y$1, exports$x$1, _dewExec$x$1, module$2$1, _global$5$1, exports$w$1, _dewExec$w$1, exports$v$1, _dewExec$v$1, exports$u$1, _dewExec$u$1, exports$t$1, _dewExec$t$1, exports$s$1, _dewExec$s$1, exports$r$1, _dewExec$r$1, exports$q$1, _dewExec$q$1, exports$p$1, _dewExec$p$1, exports$o$1, _dewExec$o$1, exports$n$1, _dewExec$n$1, exports$m$1, _dewExec$m$1, exports$l$1, _dewExec$l$1, exports$k$1, _dewExec$k$1, exports$j$1, _dewExec$j$1, exports$i$1, _dewExec$i$1, exports$h$1, _dewExec$h$1, exports$g$1, _dewExec$g$1, _aesid$1, exports$f$1, _dewExec$f$1, exports$e$1, _dewExec$e$1, _curves$1, exports$d$1, _dewExec$d$1, exports$c$1, _dewExec$c$1, exports$b$1, _dewExec$b$1, _global$4$1, exports$a$1, _dewExec$a$1, module$1$1, _global$3$1, exports$9$1, _dewExec$9$1, _global$2$1, exports$8$1, _dewExec$8$1, exports$7$1, _dewExec$7$1, exports$6$1, _dewExec$6$1, module$8, _global$1$1, exports$5$1, _dewExec$5$1, exports$4$1, _dewExec$4$1, exports$3$1, _dewExec$3$1, exports$2$12, _dewExec$2$12, exports$1$12, _dewExec$1$12, _global$x, exports$1V, _dewExec$1U, crypto7, exports$12$2, _dewExec$11$2, _global$a$2, exports$11$2, _dewExec$10$2, _global$9$2, exports$10$2, _dewExec$$$2, _primes$2, exports$$$2, _dewExec$_$2, _global$8$2, exports$_$2, _dewExec$Z$2, exports$Z$2, _dewExec$Y$2, exports$Y$2, _dewExec$X$2, module$4$2, _global$7$2, exports$X$2, _dewExec$W$2, _package$2, exports$W$2, _dewExec$V$2, module$3$2, _global$6$2, exports$V$2, _dewExec$U$2, exports$U$2, _dewExec$T$2, exports$T$2, _dewExec$S$2, exports$S$2, _dewExec$R$2, exports$R$2, _dewExec$Q$2, exports$Q$2, _dewExec$P$2, exports$P$2, _dewExec$O$2, exports$O$2, _dewExec$N$2, exports$N$2, _dewExec$M$2, exports$M$2, _dewExec$L$2, exports$L$2, _dewExec$K$2, exports$K$2, _dewExec$J$2, exports$J$2, _dewExec$I$2, exports$I$2, _dewExec$H$2, exports$H$2, _dewExec$G$2, exports$G$2, _dewExec$F$2, exports$F$2, _dewExec$E$2, exports$E$2, _dewExec$D$2, exports$D$2, _dewExec$C$2, exports$C$2, _dewExec$B$2, exports$B$2, _dewExec$A$2, exports$A$2, _dewExec$z$2, exports$z$2, _dewExec$y$2, exports$y$2, _dewExec$x$2, module$2$2, _global$5$2, exports$x$2, _dewExec$w$2, exports$w$2, _dewExec$v$2, exports$v$2, _dewExec$u$2, exports$u$2, _dewExec$t$2, exports$t$2, _dewExec$s$2, exports$s$2, _dewExec$r$2, exports$r$2, _dewExec$q$2, exports$q$2, _dewExec$p$2, exports$p$2, _dewExec$o$2, exports$o$2, _dewExec$n$2, exports$n$2, _dewExec$m$2, exports$m$2, _dewExec$l$2, exports$l$2, _dewExec$k$2, exports$k$2, _dewExec$j$2, exports$j$2, _dewExec$i$2, exports$i$2, _dewExec$h$2, exports$h$2, _dewExec$g$2, _aesid$2, exports$g$2, _dewExec$f$3, exports$f$3, _dewExec$e$3, _curves$2, exports$e$3, _dewExec$d$3, exports$d$3, _dewExec$c$3, exports$c$3, _dewExec$b$3, _global$4$2, exports$b$3, _dewExec$a$3, module$1$2, _global$3$2, exports$a$3, _dewExec$9$3, _global$2$3, exports$9$3, _dewExec$8$3, exports$8$3, _dewExec$7$3, exports$7$3, _dewExec$6$3, module$c, _global$1$3, exports$6$3, _dewExec$5$3, exports$5$3, _dewExec$4$3, exports$4$3, _dewExec$3$3, exports$3$3, _dewExec$2$3, exports$2$3, _dewExec$1$3, _global$V, exports$1$3, _dewExec$2Q, exports$2R, exports$1j, _dewExec$1i, _global$j, exports$1i, _dewExec$1h, _global$i, exports$1h, _dewExec$1g, _primes, exports$1g, _dewExec$1f, _global$h, exports$1f, _dewExec$1e, exports$1e, _dewExec$1d, exports$1d, _dewExec$1c, exports$1c, _dewExec$1b, exports$1b, _dewExec$1a, exports$1a, _dewExec$19, exports$192, _dewExec$18, exports$182, _dewExec$172, exports$172, _dewExec$162, _global$g, exports$162, _dewExec$152, exports$1522, _dewExec$1422, _global$f, exports$1422, _dewExec$1322, exports$1322, _dewExec$1222, exports$1222, _dewExec$11, exports$11, _dewExec$10, module$4, _global$e, exports$10, _dewExec$$, _package, exports$$, _dewExec$_, module$3, _global$d, exports$_, _dewExec$Z, exports$Z, _dewExec$Y, exports$Y, _dewExec$X, exports$X, _dewExec$W, exports$W, _dewExec$V, exports$V, _dewExec$U, exports$U, _dewExec$T, exports$T, _dewExec$S, exports$S, _dewExec$R, exports$R, _dewExec$Q, exports$Q, _dewExec$P, exports$P, _dewExec$O, exports$O, _dewExec$N, exports$N, _dewExec$M, exports$M, _dewExec$L, exports$L, _dewExec$K, exports$K, _dewExec$J, exports$J, _dewExec$I, exports$I, _dewExec$H, exports$H, _dewExec$G, exports$G, _dewExec$F, exports$F, _dewExec$E, exports$E, _dewExec$D, exports$D, _dewExec$C, exports$C, _dewExec$B, exports$B, _dewExec$A, exports$A, _dewExec$z, exports$z, _dewExec$y, exports$y, _dewExec$x, exports$x, _dewExec$w, module$2, _global$c, exports$w, _dewExec$v, _global$b, exports$v, _dewExec$u, _global$a, exports$u, _dewExec$t, _global$9, exports$t, _dewExec$s, _global$8, exports$s, _dewExec$r, exports$r, _dewExec$q, exports$q, _dewExec$p, exports$p2, _dewExec$o2, _global$7, exports$o2, _dewExec$n2, _global$6, exports$n2, _dewExec$m2, exports$m2, _dewExec$l2, _global$5, exports$l2, _dewExec$k3, _global$4, exports$k3, _dewExec$j3, exports$j3, _dewExec$i3, exports$i4, _dewExec$h4, exports$h4, _dewExec$g5, _aesid, exports$g5, _dewExec$f5, exports$f5, _dewExec$e5, _curves, exports$e5, _dewExec$d5, exports$d5, _dewExec$c5, exports$c6, _dewExec$b6, exports$b6, _dewExec$a6, module$1, _global$3, exports$a6, _dewExec$96, _global$24, exports$96, _dewExec$86, exports$86, _dewExec$76, exports$76, _dewExec$66, module, _global$110, exports$66, _dewExec$56, exports$56, _dewExec$46, exports$46, _dewExec$310, exports$310, _dewExec$210, exports$210, _dewExec$110, _global9, exports$111, _dewExec15, exports16, Cipher, Cipheriv, Decipher, Decipheriv, DiffieHellman, DiffieHellmanGroup, Hash4, Hmac, Sign, Verify, constants9, createCipher, createCipheriv, createCredentials, createDecipher, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash3, createHmac, createSign, createVerify, getCiphers, getDiffieHellman, getHashes, listCiphers, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, prng, pseudoRandomBytes, publicDecrypt, publicEncrypt, randomBytes4, randomFill, randomFillSync, rng, webcrypto, getRandomValues, randomUUID, init_crypto2, require_lib32, require_es_object_atoms4, require_es_errors4, require_eval4, require_range5, require_ref6, require_syntax4, require_type5, require_uri5, require_abs4, require_floor4, require_max4, require_min4, require_pow4, require_round4, require_isNaN4, require_sign4, require_gOPD4, require_gopd4, require_es_define_property4, require_shams5, require_has_symbols4, require_Reflect_getPrototypeOf4, require_Object_getPrototypeOf4, require_implementation4, require_function_bind4, require_functionCall4, require_functionApply4, require_reflectApply4, require_actualApply4, require_call_bind_apply_helpers4, require_get4, require_get_proto4, require_hasown4, require_get_intrinsic4, require_es_object_atoms22, require_functionApply22, require_functionCall22, require_get_intrinsic22, require_define_data_property, require_has_property_descriptors, require_set_function_length, require_call_bind, require_callBound, require_util22, require_object_inspect, require_side_channel, require_formats2, require_utils10, require_stringify2, require_parse9, require_lib210, require_safe_buffer, require_data_stream, require_buffer_equal_constant_time, require_param_bytes_for_alg, require_ecdsa_sig_formatter, require_jwa, require_tostring, require_sign_stream, require_verify_stream, require_jws, require_decode, require_JsonWebTokenError, require_NotBeforeError, require_TokenExpiredError, require_ms4, require_timespan, require_constants8, require_debug6, require_re2, require_parse_options2, require_identifiers2, require_semver6, require_parse22, require_valid3, require_clean2, require_inc2, require_diff2, require_major2, require_minor2, require_patch2, require_prerelease2, require_compare2, require_rcompare2, require_compare_loose2, require_compare_build2, require_sort2, require_rsort2, require_gt2, require_lt2, require_eq2, require_neq2, require_gte2, require_lte2, require_cmp2, require_coerce2, require_lrucache2, require_range22, require_comparator2, require_satisfies2, require_to_comparators2, require_max_satisfying2, require_min_satisfying2, require_min_version2, require_valid22, require_outside2, require_gtr2, require_ltr2, require_intersects2, require_simplify2, require_subset2, require_semver22, require_asymmetricKeyDetailsSupported, require_rsaPssKeyDetailsSupported, require_validateAsymmetricKey, require_psSupported, require_verify, require_lodash4, require_lodash22, require_lodash32, require_lodash42, require_lodash5, require_lodash6, require_lodash7, require_sign22, require_jsonwebtoken, require_eventsource, exports$112, _dewExec16, exports17, decode2, encode32, toASCII, toUnicode, ucs2, version32, init_punycode, exports$113, _dewExec17, exports18, init_chunk_BlJi4mNy2, url_exports, empty, exports$87, _dewExec$77, _global10, exports$77, _dewExec$67, exports$67, _dewExec$57, exports$57, _dewExec$47, exports$47, _dewExec$311, exports$311, _dewExec$211, exports$211, _dewExec$111, exports$114, _dewExec18, exports19, processPlatform, Url, format23, resolve7, resolveObject, parse17, _URL, CHAR_BACKWARD_SLASH, CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, isWindows6, forwardSlashRegEx, percentRegEx, backslashRegEx, newlineRegEx, carriageReturnRegEx, tabRegEx, init_url, exports$115, _dewExec$112, exports$212, t$13, o$23, n$23, e$23, r$23, c$14, s5, u$14, a$13, d42, h$13, p$13, n$14, r$13, t52, o$14, h52, e72, a5, o5, n52, i52, l52, p5, c52, u5, f6, m4, v52, g42, y5, b42, exports20, _dewExec19, path59, processPlatform$1, CHAR_BACKWARD_SLASH$1, CHAR_FORWARD_SLASH$1, CHAR_LOWERCASE_A$1, CHAR_LOWERCASE_Z$1, isWindows$1, forwardSlashRegEx$1, percentRegEx$1, backslashRegEx$1, newlineRegEx$1, carriageReturnRegEx$1, tabRegEx$1, processPlatform2, CHAR_BACKWARD_SLASH2, CHAR_FORWARD_SLASH2, CHAR_LOWERCASE_A2, CHAR_LOWERCASE_Z2, isWindows22, forwardSlashRegEx2, percentRegEx2, backslashRegEx2, newlineRegEx2, carriageReturnRegEx2, tabRegEx2, init_chunk_DHWh_hmB, https_exports, exports$68, _dewExec$58, _global$32, exports$58, _dewExec$48, _global$25, exports$48, _dewExec$312, _global$111, exports$312, _dewExec$212, exports$213, _dewExec$113, exports$1$13, _dewExec$68, _global$42, exports$78, exports$116, _dewExec20, _global11, exports21, Agent, ClientRequest, IncomingMessage, METHODS, STATUS_CODES, get4, globalAgent, request, init_https, http_exports, exports$l3, _dewExec$k4, _global$52, exports$k4, _dewExec$j4, exports$j4, _dewExec$i4, exports$i5, _dewExec$h5, exports$h5, _dewExec$g6, exports$g6, _dewExec$f6, exports$f6, _dewExec$e6, _global$43, exports$e6, _dewExec$d6, exports$d6, _dewExec$c6, exports$c7, _dewExec$b7, exports$b7, _dewExec$a7, exports$a7, _dewExec$97, _global$33, exports$97, _dewExec$87, exports$88, _dewExec$78, exports$79, _dewExec$69, exports$69, _dewExec$59, exports$59, _dewExec$49, _global$26, exports$49, _dewExec$313, _global$112, exports$313, _dewExec$213, exports$214, _dewExec$114, exports$117, _dewExec21, _global12, exports222, Agent2, ClientRequest2, IncomingMessage2, METHODS2, STATUS_CODES2, get22, globalAgent2, request2, init_http4, require_eventsource2, axios_exports, toString10, getPrototypeOf4, kindOf4, kindOfTest4 = (type) => {
|
|
874827
|
+
}, __toESM7 = (mod, isNodeMode, target) => (target = mod != null ? __create7(__getProtoOf7(mod)) : {}, __copyProps6(isNodeMode || !mod || !mod.__esModule ? __defProp12(target, "default", { value: mod, enumerable: true }) : target, mod)), __toCommonJS4 = (mod) => __copyProps6(__defProp12({}, "__esModule", { value: true }), mod), init_dirname2, process_exports2, queue3, draining3, currentQueue3, queueIndex3, title3, arch5, platform9, env7, argv3, execArgv3, version4, versions5, emitWarning5, binding3, umask3, cwd4, chdir3, release3, browser2, _rawDebug3, moduleLoadList3, domain3, _exiting3, config5, reallyExit3, _kill3, cpuUsage3, resourceUsage3, memoryUsage3, kill3, exit3, openStdin3, allowedNodeEnvironmentFlags3, features3, _fatalExceptions3, setUncaughtExceptionCaptureCallback3, _tickCallback3, _debugProcess3, _debugEnd3, _startProfilerIdleNotifier3, _stopProfilerIdleNotifier3, stdout3, stderr3, stdin3, abort3, pid3, ppid3, execPath3, debugPort3, argv03, _preload_modules3, setSourceMapsEnabled3, _performance3, nowOffset2, nanoPerSec3, _maxListeners3, _events3, _eventsCount3, addListener3, once10, off3, removeListener3, removeAllListeners3, emit3, prependListener3, prependOnceListener3, process38, init_process3, init_process22, exports$24, _dewExec$24, exports$15, _dewExec$14, exports7, _dewExec6, init_chunk_DtuTasat2, buffer_exports, exports23, Buffer26, INSPECT_MAX_BYTES2, kMaxLength2, init_buffer5, init_buffer22, require_browser4, exports$k2, _dewExec$k2, exports$j2, _dewExec$j2, exports$i2, _dewExec$i2, exports$h2, _dewExec$h2, exports$g2, _dewExec$g2, exports$f2, _dewExec$f2, exports$e2, _dewExec$e2, exports$d2, _dewExec$d2, exports$c3, _dewExec$c2, exports$b3, _dewExec$b3, exports$a3, _dewExec$a3, exports$93, _dewExec$93, exports$83, _dewExec$83, exports$73, _dewExec$73, exports$63, _dewExec$63, exports$53, _dewExec$53, exports$43, _dewExec$43, exports$33, _dewExec$33, exports$222, _dewExec$222, exports$122, _dewExec$122, exports32, _dewExec22, init_chunk_DtcTpLWz2, exports42, _dewExec32, init_chunk_CkFCi_G12, queue22, draining22, currentQueue22, queueIndex22, title22, arch22, platform23, env23, argv22, execArgv23, version23, versions22, emitWarning23, binding22, umask22, cwd23, chdir22, release22, _rawDebug22, moduleLoadList22, domain22, _exiting22, config22, reallyExit22, _kill22, cpuUsage22, resourceUsage22, memoryUsage22, kill22, exit22, openStdin22, allowedNodeEnvironmentFlags22, features22, _fatalExceptions22, setUncaughtExceptionCaptureCallback22, _tickCallback22, _debugProcess22, _debugEnd22, _startProfilerIdleNotifier22, _stopProfilerIdleNotifier22, stdout22, stderr22, stdin22, abort22, pid22, ppid22, execPath23, debugPort22, argv022, _preload_modules22, setSourceMapsEnabled22, _performance22, nowOffset2, nanoPerSec22, _maxListeners22, _events22, _eventsCount22, addListener22, once23, off22, removeListener22, removeAllListeners22, emit22, prependListener22, prependOnceListener22, process25, init_chunk_DEMDiNwt2, util_exports2, exports$c22, _dewExec$b22, exports$b22, _dewExec$a22, exports$a22, _dewExec$922, exports$922, _dewExec$822, exports$822, _dewExec$722, exports$722, _dewExec$622, exports$622, _dewExec$522, _global$22, exports$522, _dewExec$422, _global$12, exports$422, _dewExec$322, exports$322, _dewExec$232, exports$232, _dewExec$132, exports$132, _dewExec42, _global24, exports52, _extend2, callbackify9, debuglog4, deprecate2, format5, inherits22, inspect5, isArray22, isBoolean22, isBuffer22, isDate22, isError3, isFunction24, isNull2, isNullOrUndefined2, isNumber24, isObject22, isPrimitive6, isRegExp22, isString22, isSymbol6, isUndefined22, log4, promisify11, types7, TextEncoder4, TextDecoder3, init_util5, assert_exports, exports$i22, _dewExec$h22, exports$h22, _dewExec$g22, exports$g22, _dewExec$f22, exports$f22, _dewExec$e22, exports$e22, _dewExec$d22, exports$d22, _dewExec$c22, exports$c32, _dewExec$b32, exports$b32, _dewExec$a32, exports$a32, _dewExec$932, exports$932, _dewExec$832, exports$832, _dewExec$732, exports$732, _dewExec$632, exports$632, _dewExec$532, exports$532, _dewExec$432, exports$432, _dewExec$332, exports$332, _dewExec$242, exports$242, _dewExec$142, exports$142, _dewExec52, exports62, AssertionError, deepEqual, deepStrictEqual, doesNotReject, doesNotThrow, equal, fail, ifError, notDeepEqual, notDeepStrictEqual, notEqual, notStrictEqual, ok4, rejects, strict, strictEqual, throws, init_assert, events_exports, exports$152, _dewExec62, exports72, EventEmitter10, defaultMaxListeners, init4, listenerCount, on32, once32, init_events5, exports$25, _dewExec$15, exports$16, _dewExec7, exports8, StringDecoder6, init_chunk_CcCWfKp1, stream_exports, exports$p, _dewExec$o, exports$o, _dewExec$n, exports$n, _dewExec$m, exports$m, _dewExec$l, exports$l, _dewExec$k22, exports$k22, _dewExec$j22, exports$j22, _dewExec$i22, exports$i3, _dewExec$h3, exports$h3, _dewExec$g3, exports$g3, _dewExec$f3, exports$f3, _dewExec$e3, exports$e3, _dewExec$d3, exports$d3, _dewExec$c3, exports$c4, _dewExec$b4, _global$222, exports$b4, _dewExec$a4, _global$122, exports$a4, _dewExec$94, exports$94, _dewExec$84, exports$84, _dewExec$74, exports$74, _dewExec$64, exports$64, _dewExec$54, exports$54, _dewExec$44, exports$44, _dewExec$34, exports$34, _dewExec$25, exports$26, _dewExec$16, _global32, exports$17, _dewExec8, exports9, Readable8, Writable4, Duplex4, Transform4, PassThrough3, finished7, pipeline2, Stream5, promises, init_stream3, require_assert, require_extsprintf, require_util8, require_verror, e7, t13, n6, r, i5, s4, y3, init_chunk_tHuMsdT0, init_chunk_DtDiafJB, e$2, t$3, n$2, r$2, o$3, l$2, s$1, f$1, a$1, T$1, t23, e22, o22, n22, r2, l22, t$1, o$1, n$1, e$1, r$1, c22, u22, i22, t$2, i$1, o$2, u$1, f22, a22, s22, p22, y22, l$1, d7, m3, h22, j3, A6, Q2, X4, Y3, ee, te4, re5, ne6, ie2, Se, Ee4, promisify22, init_chunk_D3uu3VYh, exports10, _dewExec9, _global42, process39, init_chunk_b0rmRow7, r$14, t$14, e$24, n$24, o$24, a$14, h$14, a$1$1, e$1$1, n$1$1, i$12, o$1$1, j22, Y22, e32, n32, o3, u32, e$12, s32, i32, exports$2$1, _dewExec$2$1, exports$1$1, _dewExec$1$1, exports$g4, _dewExec$g4, buffer, exports$f4, _dewExec$f4, exports$e4, _dewExec$e4, exports$d4, _dewExec$d4, exports$c5, _dewExec$c4, exports$b5, _dewExec$b5, exports$a5, _dewExec$a5, exports$95, _dewExec$95, _global$23, exports$85, _dewExec$85, _global$13, exports$75, _dewExec$75, exports$65, _dewExec$65, exports$55, _dewExec$55, exports$45, _dewExec$45, exports$35, _dewExec$35, _global5, exports$27, _dewExec$26, exports$18, _dewExec$17, exports11, _dewExec10, init_chunk_B738Er4n, promisify32, init_chunk_CbQqNoLO, exports$19, _dewExec11, _global6, exports12, Readable22, init_chunk_B6_G_Ftj, exports13, _dewExec12, init_chunk_C4rKjYLo, exports14, _dewExec13, _global7, init_chunk_BsRZ0PEC, exports$110, _dewExec14, _global8, exports15, Script2, createContext11, createScript, isContext, runInContext, runInNewContext, runInThisContext, init_vm, crypto_exports, exports$3H, _dewExec$3G, _global$1e, exports$3G, _dewExec$3F, exports$3F, _dewExec$3E, exports$3E, _dewExec$3D, exports$3D, _dewExec$3C, _global$1d, exports$3C, _dewExec$3B, _global$1c, exports$3B, _dewExec$3A, _global$1b, exports$3A, _dewExec$3z, _global$1a, exports$3z, _dewExec$3y, _global$19, exports$3y, _dewExec$3x, _global$18, exports$3x, _dewExec$3w, _global$17, exports$3w, _dewExec$3v, module$f, exports$3v, _dewExec$3u, _global$16, exports$3u, _dewExec$3t, exports$3t, _dewExec$3s, exports$3s, _dewExec$3r, exports$3r, _dewExec$3q, _algorithms$2, exports$3q, _dewExec$3p, exports$3p, _dewExec$3o, exports$3o, _dewExec$3n, _global$15, exports$3n, _dewExec$3m, exports$3m, _dewExec$3l, _global$14, exports$3l, _dewExec$3k, _global$132, exports$3k, _dewExec$3j, exports$3j, _dewExec$3i, exports$3i, _dewExec$3h, exports$3h, _dewExec$3g, exports$3g, _dewExec$3f, exports$3f, _dewExec$3e, exports$3e, _dewExec$3d, exports$3d, _dewExec$3c, exports$3c, _dewExec$3b, _global$1222, exports$3b, _dewExec$3a, exports$3a, _dewExec$39, exports$39, _dewExec$38, exports$38, _dewExec$37, exports$37, _dewExec$36, exports$36, _dewExec$352, exports$352, _dewExec$342, exports$342, _dewExec$3322, exports$3322, _dewExec$3222, _list$2, exports$3222, _dewExec$31, exports$31, _dewExec$30, _global$11, exports$30, _dewExec$2$, _global$10, exports$2$, _dewExec$2_, _global$$, exports$2_, _dewExec$2Z, _global$_, exports$2Z, _dewExec$2Y, exports$2Y, _dewExec$2X, _global$Z, exports$2X, _dewExec$2W, _global$Y, exports$2W, _dewExec$2V, exports$2V, _dewExec$2U, exports$2U, _dewExec$2T, exports$2T, _dewExec$2S, module$e, _global$X, exports$2S, _dewExec$2R, module$d, _global$W, exports$2Q, _dewExec$2P, exports$2P, _dewExec$2O, _global$U, exports$2O, _dewExec$2N, exports$2N, _dewExec$2M, exports$2M, _dewExec$2L, exports$2L, _dewExec$2K, exports$2K, _dewExec$2J, _global$T, exports$2J, _dewExec$2I, _global$S, exports$2I, _dewExec$2H, _global$R, exports$2H, _dewExec$2G, _global$Q, exports$2G, _dewExec$2F, _global$P, exports$2F, _dewExec$2E, _global$O, exports$2E, _dewExec$2D, _global$N, exports$2D, _dewExec$2C, module$b, exports$f$2, _dewExec$f$2, exports$e$2, _dewExec$e$2, exports$d$2, _dewExec$d$2, exports$c$2, _dewExec$c$2, exports$b$2, _dewExec$b$2, exports$a$2, _dewExec$a$2, exports$9$2, _dewExec$9$2, _global$2$2, exports$8$2, _dewExec$8$2, _global$1$2, exports$7$2, _dewExec$7$2, exports$6$2, _dewExec$6$2, exports$5$2, _dewExec$5$2, exports$4$2, _dewExec$4$2, exports$3$2, _dewExec$3$2, _global$M, exports$2$2, _dewExec$2$2, exports$1$2, _dewExec$1$2, exports$2C, _dewExec$2B, exports$2B, _dewExec$2A, _global$L, stream7, exports$2A, _dewExec$2z, _global$K, exports$2z, _dewExec$2y, exports$2y, _dewExec$2x, exports$2x, _dewExec$2w, exports$2w, _dewExec$2v, _algorithms$1, exports$2v, _dewExec$2u, exports$2u, _dewExec$2t, exports$2t, _dewExec$2s, _global$J, exports$2s, _dewExec$2r, exports$2r, _dewExec$2q, _global$I, exports$2q, _dewExec$2p, _global$H, exports$2p, _dewExec$2o, exports$2o, _dewExec$2n, exports$2n, _dewExec$2m, exports$2m, _dewExec$2l, exports$2l, _dewExec$2k, exports$2k, _dewExec$2j, exports$2j, _dewExec$2i, exports$2i, _dewExec$2h, exports$2h, _dewExec$2g, _global$G, exports$2g, _dewExec$2f, exports$2f, _dewExec$2e, exports$2e, _dewExec$2d, exports$2d, _dewExec$2c, exports$2c, _dewExec$2b, exports$2b, _dewExec$2a, exports$2a, _dewExec$29, exports$29, _dewExec$28, exports$28, _dewExec$27, _list$1, exports$272, _dewExec$262, exports$262, _dewExec$252, _global$F, exports$252, _dewExec$2422, _global$E, exports$2422, _dewExec$2322, _global$D, exports$2322, _dewExec$2222, _global$C, exports$2222, _dewExec$21, exports$21, _dewExec$20, _global$B, exports$20, _dewExec$1$, _global$A, exports$1$, _dewExec$1_, exports$1_, _dewExec$1Z, exports$1Z, _dewExec$1Y, exports$1Y, _dewExec$1X, module$a, _global$z, exports$1X, _dewExec$1W, module$9, _global$y, exports$1W, _dewExec$1V, exports$1U, _dewExec$1T, exports$1T, _dewExec$1S, _global$w, exports$1S, _dewExec$1R, exports$1R, _dewExec$1Q, exports$1Q, _dewExec$1P, exports$1P, _dewExec$1O, _global$v, exports$1O, _dewExec$1N, _global$u, exports$1N, _dewExec$1M, _global$t, exports$1M, _dewExec$1L, _global$s, exports$1L, _dewExec$1K, _global$r, exports$1K, _dewExec$1J, _global$q, exports$1J, _dewExec$1I, _global$p, exports$1I, _dewExec$1H, module$7, e$g, e$1$12, t$c, r$1$1, r$2$1, t$1$1, c$n, b$j, p$s, g$h, y$n, m$m, S$e, R$7, k$g, M$a, j$a, O$8, P$8, x$a, L$8, D$9, C$9, A$c, q$8, W$5, U$a, H$7, F$8, V$6, G$5, Y$4, z$9, J$5, Q$4, Z$3, $$3, t$2$1, r$3$1, n$1$12, b$1$1, p$1$1, g$1$1, y$1$1, w$1$1, S$1$1, R$1$1, k$1$1, E$1$1, M$1$1, O$1$1, T$1$1, x$1$1, P$1$1, D$1$1, L$1$1, C$1$1, A$1$1, I$1$1, N$1$1, U$1$1, H$1$1, F$1$1, V$1$1, Y$1$1, K$1$1, z$1$1, Q$1$1, X$1$1, t$4$1, t$5$1, n$2$1, i$e, a$p, o$s, s$q, f$2$1, h$2$1, p$2$1, o$1$12, e$3$1, s$1$1, t$6$1, o$2$1, e$4$1, f$3$1, v$2$1, l$r, d$n, f$u, b$i, exports$1H, _dewExec$1G, _global$o, exports$1G, _dewExec$1F, exports$1F, _dewExec$1E, exports$1E, _dewExec$1D, exports$1D, _dewExec$1C, _algorithms, exports$1C, _dewExec$1B, exports$1B, _dewExec$1A, exports$1A, _dewExec$1z, _global$n, exports$1z, _dewExec$1y, exports$1y, _dewExec$1x, _global$m, exports$1x, _dewExec$1w, _global$l, exports$1w, _dewExec$1v, exports$1v, _dewExec$1u, exports$1u, _dewExec$1t, exports$1t, _dewExec$1s, exports$1s, _dewExec$1r, exports$1r, _dewExec$1q, exports$1q, _dewExec$1p, exports$1p, _dewExec$1o, exports$1o, _dewExec$1n, _global$k, exports$1n, _dewExec$1m, exports$1m, _dewExec$1l, exports$1l, _dewExec$1k, exports$1k, _dewExec$1j, exports$1j$1, _dewExec$1i$1, exports$1i$1, _dewExec$1h$1, exports$1h$1, _dewExec$1g$1, exports$1g$1, _dewExec$1f$1, exports$1f$1, _dewExec$1e$1, _list, exports$1e$1, _dewExec$1d$1, exports$1d$1, _dewExec$1c$1, _global$j$1, exports$1c$1, _dewExec$1b$1, _global$i$1, exports$1b$1, _dewExec$1a$1, _global$h$1, exports$1a$1, _dewExec$19$1, _global$g$1, exports$19$1, _dewExec$18$1, exports$18$1, _dewExec$17$1, _global$f$1, exports$17$1, _dewExec$16$1, _global$e$1, exports$16$1, _dewExec$15$1, exports$15$1, _dewExec$14$1, exports$14$1, _dewExec$13$1, exports$13$1, _dewExec$12$1, module$6, _global$d$1, exports$12$1, _dewExec$11$1, module$5, _global$c$1, _global$b$1, exports$11$1, indexOf2, Object_keys2, forEach32, defineProp2, globals2, Script3, o4, n42, t42, f4, a4, e62, o$13, f$13, h42, r4, _32, e$13, u42, h$12, _$1, r$12, e$22, n$22, o$32, f$3, c$13, a$22, l$13, I32, s$13, h$2, _$2, n$3, r$22, o$4, f$4, l$22, a$3, w$1, _$3, e$4, n$4, r$3, l$3, o$5, c$3, d$2, p$2, b$2, w$2, g32, B32, T32, m32, A32, U32, x32, j32, q22, L32, k$2, z32, D32, F32, G22, H22, W22, X22, Y32, Z22, $22, tt2, it4, st5, _t5, et5, nt5, e$5, n$5, s$2, h$3, f$6, m$12, n$6, p$3, s$3, h$4, e$6, r$4, o$6, h$5, n$7, p$4, l$4, d$3, c$4, _$4, m$2, u$4, g$1, v$1, w$3, s$4, f$8, a$7, u$5, h$6, c$5, l$5, p$5, d$4, m$3, y$2, b$3, v$2, w$4, g$2, B$1, k$3, S$1, A$1, H$1, E$2, P$1, U$1, K$1, x$1, z$1, I$2, F$1, M$1, r$5, o$7, r$6, i42, n$8, f$9, o$8, p$6, s$6, a$8, h$7, c$6, l$6, d$5, _$5, b$4, k$4, g$3, m$4, z$2, w$5, E$3, I$3, A$2, U$2, d$6, i$13, f$a, o$9, a$9, c$7, n$9, l$7, e$8, f$b, t$12, a$a, p$8, n$a, i$22, o$a, h$8, y$4, f$c, l$8, m$5, B$3, u$7, C$1, d$7, b$5, A$3, S$3, F$2, U$3, w$6, I$4, M$2, a$b, h$9, o$b, f$d, u$8, _$7, d$8, y$5, S$4, v$5, I$5, U$4, w$7, m$6, E$5, b$6, k$6, T$2, O$2, A$4, M$3, V$1, t$22, f$e, a$c, c$9, s$9, f$f, p$a, u$9, l$a, d$9, y$6, m$7, c$a, s$a, f$g, p$b, l$b, u$a, d$a, m$8, y$7, _$8, t$32, p$c, c$b, o$c, e$9, p$d, n$b, s$b, v$8, y$8, a$d, t$4, i$3, r$7, h$a, n$c, t$5, e$a, r$8, n$d, a$e, f$i, n$e, t$6, o$e, a$f, i$4, b$7, d$c, r$9, t$7, n$f, i$5, o$f, p$e, s$c, m$9, u$b, h$b, w$a, y$9, P$2, B$5, K$2, R$1, S$5, x$2, C$2, D$2, G$1, H$2, T$3, j$1, M$4, q$1, O$3, z$3, F$3, I$6, J$1, N$2, m$a, u$c, n$g, d$d, l$d, r$a, e$b, n$i, a$g, i$7, o$g, c$d, s$d, l$e, u$d, h$c, d$e, r$b, i$8, e$c, a$h, l$f, g$9, r$c, n$j, s$f, o$i, e$d, u$f, a$i, c$f, f$k, v$b, _$a, l$g, p$g, m$c, g$a, k$8, d$f, C$3, s$g, n$k, u$g, a$j, c$g, f$l, _$b, g$b, m$d, p$h, l$h, v$c, d$g, k$9, b$9, j$3, x$4, y$c, w$c, r$e, o$k, a$k, u$h, l$i, c$h, p$i, f$m, g$c, d$h, S$8, _$c, b$a, z$5, k$a, y$d, H$4, w$d, L$3, j$4, A$7, B$7, W$2, q$3, C$4, D$3, E$7, F$4, M$5, N$3, O$4, P$3, Q$1, R$2, T$4, V$2, X$2, Y$1, s$h, h$e, r$f, n$l, a$l, b$b, i$9, n$m, s$i, o$m, u$i, l$j, v$e, y$e, m$f, S$9, g$d, M$6, x$6, _$d, z$6, q$4, R$3, N$4, E$8, k$b, O$5, L$4, B$8, T$5, J$3, X$3, D$4, Y$2, W$3, K$4, U$6, G$3, H$5, Z$1, $$1, ee2, de22, ce22, te22, ae22, re22, be22, ie, ne22, se22, ue22, he22, pe22, le22, ve2, me22, Se2, ge22, Ae22, Ie4, we22, xe4, _e, ze, qe2, Re4, Pe2, je22, Ne4, Ee22, Oe2, Le4, Be2, o$n, s$j, a$m, u$j, c$i, f$n, p$k, d$i, g$e, _$e, v$f, b$c, m$g, S$a, j$6, w$f, B$9, k$c, D$5, U$7, N$5, O$6, A$9, x$7, I$9, q$5, F$6, K$5, R$4, G$4, L$5, M$7, J$4, V$4, z$7, H$6, Q$3, e$f, t$a, s$k, n$n, o$o, h$h, y$g, r$g, u$k, a$n, c$j, k$d, f$o, b$d, l$l, d$j, p$l, j$7, v$g, m$h, q$6, K$6, P$6, s$l, i$a, o$p, d$k, n$o, p$m, u$l, y$h, m$i, f$p, b$e, E$a, h$i, v$h, p$n, d$l, f$q, c$k, g$f, w$g, l$n, m$j, v$i, E$b, L$6, R$5, j$8, T$7, P$7, K$7, W$4, x$8, B$a, S$b, q$7, U$8, V$5, C$7, z$8, i$b, n$p, p$o, s$m, u$m, o$q, f$r, i$c, l$o, u$n, c$m, p$p, d$m, h$j, s$n, g$g, m$k, w$h, v$j, y$k, E$c, b$g, B$b, x$9, L$7, k$f, D$7, U$9, R$6, S$c, j$9, A$b, I$a, M$9, o$r, t$b, f$t, u$o, a$o, s$o, l$p, m$l, p$q, l$q, D$8, s$p, _$g, h$k, y$m, E$d, S$d, C$8, N$6, exports$10$1, _dewExec$10$1, _global$a$1, exports$$$1, _dewExec$$$1, _global$9$1, exports$_$1, _dewExec$_$1, _primes$1, exports$Z$1, _dewExec$Z$1, _global$8$1, exports$Y$1, _dewExec$Y$1, exports$X$1, _dewExec$X$1, module$4$1, _global$7$1, exports$W$1, _dewExec$W$1, _package$1, exports$V$1, _dewExec$V$1, module$3$1, _global$6$1, exports$U$1, _dewExec$U$1, exports$T$1, _dewExec$T$1, exports$S$1, _dewExec$S$1, exports$R$1, _dewExec$R$1, exports$Q$1, _dewExec$Q$1, exports$P$1, _dewExec$P$1, exports$O$1, _dewExec$O$1, exports$N$1, _dewExec$N$1, exports$M$1, _dewExec$M$1, exports$L$1, _dewExec$L$1, exports$K$1, _dewExec$K$1, exports$J$1, _dewExec$J$1, exports$I$1, _dewExec$I$1, exports$H$1, _dewExec$H$1, exports$G$1, _dewExec$G$1, exports$F$1, _dewExec$F$1, exports$E$1, _dewExec$E$1, exports$D$1, _dewExec$D$1, exports$C$1, _dewExec$C$1, exports$B$1, _dewExec$B$1, exports$A$1, _dewExec$A$1, exports$z$1, _dewExec$z$1, exports$y$1, _dewExec$y$1, exports$x$1, _dewExec$x$1, module$2$1, _global$5$1, exports$w$1, _dewExec$w$1, exports$v$1, _dewExec$v$1, exports$u$1, _dewExec$u$1, exports$t$1, _dewExec$t$1, exports$s$1, _dewExec$s$1, exports$r$1, _dewExec$r$1, exports$q$1, _dewExec$q$1, exports$p$1, _dewExec$p$1, exports$o$1, _dewExec$o$1, exports$n$1, _dewExec$n$1, exports$m$1, _dewExec$m$1, exports$l$1, _dewExec$l$1, exports$k$1, _dewExec$k$1, exports$j$1, _dewExec$j$1, exports$i$1, _dewExec$i$1, exports$h$1, _dewExec$h$1, exports$g$1, _dewExec$g$1, _aesid$1, exports$f$1, _dewExec$f$1, exports$e$1, _dewExec$e$1, _curves$1, exports$d$1, _dewExec$d$1, exports$c$1, _dewExec$c$1, exports$b$1, _dewExec$b$1, _global$4$1, exports$a$1, _dewExec$a$1, module$1$1, _global$3$1, exports$9$1, _dewExec$9$1, _global$2$1, exports$8$1, _dewExec$8$1, exports$7$1, _dewExec$7$1, exports$6$1, _dewExec$6$1, module$8, _global$1$1, exports$5$1, _dewExec$5$1, exports$4$1, _dewExec$4$1, exports$3$1, _dewExec$3$1, exports$2$12, _dewExec$2$12, exports$1$12, _dewExec$1$12, _global$x, exports$1V, _dewExec$1U, crypto7, exports$12$2, _dewExec$11$2, _global$a$2, exports$11$2, _dewExec$10$2, _global$9$2, exports$10$2, _dewExec$$$2, _primes$2, exports$$$2, _dewExec$_$2, _global$8$2, exports$_$2, _dewExec$Z$2, exports$Z$2, _dewExec$Y$2, exports$Y$2, _dewExec$X$2, module$4$2, _global$7$2, exports$X$2, _dewExec$W$2, _package$2, exports$W$2, _dewExec$V$2, module$3$2, _global$6$2, exports$V$2, _dewExec$U$2, exports$U$2, _dewExec$T$2, exports$T$2, _dewExec$S$2, exports$S$2, _dewExec$R$2, exports$R$2, _dewExec$Q$2, exports$Q$2, _dewExec$P$2, exports$P$2, _dewExec$O$2, exports$O$2, _dewExec$N$2, exports$N$2, _dewExec$M$2, exports$M$2, _dewExec$L$2, exports$L$2, _dewExec$K$2, exports$K$2, _dewExec$J$2, exports$J$2, _dewExec$I$2, exports$I$2, _dewExec$H$2, exports$H$2, _dewExec$G$2, exports$G$2, _dewExec$F$2, exports$F$2, _dewExec$E$2, exports$E$2, _dewExec$D$2, exports$D$2, _dewExec$C$2, exports$C$2, _dewExec$B$2, exports$B$2, _dewExec$A$2, exports$A$2, _dewExec$z$2, exports$z$2, _dewExec$y$2, exports$y$2, _dewExec$x$2, module$2$2, _global$5$2, exports$x$2, _dewExec$w$2, exports$w$2, _dewExec$v$2, exports$v$2, _dewExec$u$2, exports$u$2, _dewExec$t$2, exports$t$2, _dewExec$s$2, exports$s$2, _dewExec$r$2, exports$r$2, _dewExec$q$2, exports$q$2, _dewExec$p$2, exports$p$2, _dewExec$o$2, exports$o$2, _dewExec$n$2, exports$n$2, _dewExec$m$2, exports$m$2, _dewExec$l$2, exports$l$2, _dewExec$k$2, exports$k$2, _dewExec$j$2, exports$j$2, _dewExec$i$2, exports$i$2, _dewExec$h$2, exports$h$2, _dewExec$g$2, _aesid$2, exports$g$2, _dewExec$f$3, exports$f$3, _dewExec$e$3, _curves$2, exports$e$3, _dewExec$d$3, exports$d$3, _dewExec$c$3, exports$c$3, _dewExec$b$3, _global$4$2, exports$b$3, _dewExec$a$3, module$1$2, _global$3$2, exports$a$3, _dewExec$9$3, _global$2$3, exports$9$3, _dewExec$8$3, exports$8$3, _dewExec$7$3, exports$7$3, _dewExec$6$3, module$c, _global$1$3, exports$6$3, _dewExec$5$3, exports$5$3, _dewExec$4$3, exports$4$3, _dewExec$3$3, exports$3$3, _dewExec$2$3, exports$2$3, _dewExec$1$3, _global$V, exports$1$3, _dewExec$2Q, exports$2R, exports$1j, _dewExec$1i, _global$j, exports$1i, _dewExec$1h, _global$i, exports$1h, _dewExec$1g, _primes, exports$1g, _dewExec$1f, _global$h, exports$1f, _dewExec$1e, exports$1e, _dewExec$1d, exports$1d, _dewExec$1c, exports$1c, _dewExec$1b, exports$1b, _dewExec$1a, exports$1a, _dewExec$19, exports$192, _dewExec$18, exports$182, _dewExec$172, exports$172, _dewExec$162, _global$g, exports$162, _dewExec$152, exports$1522, _dewExec$1422, _global$f, exports$1422, _dewExec$1322, exports$1322, _dewExec$1222, exports$1222, _dewExec$11, exports$11, _dewExec$10, module$4, _global$e, exports$10, _dewExec$$, _package, exports$$, _dewExec$_, module$3, _global$d, exports$_, _dewExec$Z, exports$Z, _dewExec$Y, exports$Y, _dewExec$X, exports$X, _dewExec$W, exports$W, _dewExec$V, exports$V, _dewExec$U, exports$U, _dewExec$T, exports$T, _dewExec$S, exports$S, _dewExec$R, exports$R, _dewExec$Q, exports$Q, _dewExec$P, exports$P, _dewExec$O, exports$O, _dewExec$N, exports$N, _dewExec$M, exports$M, _dewExec$L, exports$L, _dewExec$K, exports$K, _dewExec$J, exports$J, _dewExec$I, exports$I, _dewExec$H, exports$H, _dewExec$G, exports$G, _dewExec$F, exports$F, _dewExec$E, exports$E, _dewExec$D, exports$D, _dewExec$C, exports$C, _dewExec$B, exports$B, _dewExec$A, exports$A, _dewExec$z, exports$z, _dewExec$y, exports$y, _dewExec$x, exports$x, _dewExec$w, module$2, _global$c, exports$w, _dewExec$v, _global$b, exports$v, _dewExec$u, _global$a, exports$u, _dewExec$t, _global$9, exports$t, _dewExec$s, _global$8, exports$s, _dewExec$r, exports$r, _dewExec$q, exports$q, _dewExec$p, exports$p2, _dewExec$o2, _global$7, exports$o2, _dewExec$n2, _global$6, exports$n2, _dewExec$m2, exports$m2, _dewExec$l2, _global$5, exports$l2, _dewExec$k3, _global$4, exports$k3, _dewExec$j3, exports$j3, _dewExec$i3, exports$i4, _dewExec$h4, exports$h4, _dewExec$g5, _aesid, exports$g5, _dewExec$f5, exports$f5, _dewExec$e5, _curves, exports$e5, _dewExec$d5, exports$d5, _dewExec$c5, exports$c6, _dewExec$b6, exports$b6, _dewExec$a6, module$1, _global$3, exports$a6, _dewExec$96, _global$24, exports$96, _dewExec$86, exports$86, _dewExec$76, exports$76, _dewExec$66, module, _global$110, exports$66, _dewExec$56, exports$56, _dewExec$46, exports$46, _dewExec$310, exports$310, _dewExec$210, exports$210, _dewExec$110, _global9, exports$111, _dewExec15, exports16, Cipher, Cipheriv, Decipher, Decipheriv, DiffieHellman, DiffieHellmanGroup, Hash4, Hmac, Sign, Verify, constants9, createCipher, createCipheriv, createCredentials, createDecipher, createDecipheriv, createDiffieHellman, createDiffieHellmanGroup, createECDH, createHash3, createHmac, createSign, createVerify, getCiphers, getDiffieHellman, getHashes, listCiphers, pbkdf2, pbkdf2Sync, privateDecrypt, privateEncrypt, prng, pseudoRandomBytes, publicDecrypt, publicEncrypt, randomBytes4, randomFill, randomFillSync, rng, webcrypto, getRandomValues, randomUUID, init_crypto2, require_lib32, require_es_object_atoms4, require_es_errors4, require_eval4, require_range5, require_ref6, require_syntax4, require_type5, require_uri5, require_abs4, require_floor4, require_max4, require_min4, require_pow4, require_round4, require_isNaN4, require_sign4, require_gOPD4, require_gopd4, require_es_define_property4, require_shams5, require_has_symbols4, require_Reflect_getPrototypeOf4, require_Object_getPrototypeOf4, require_implementation4, require_function_bind4, require_functionCall4, require_functionApply4, require_reflectApply4, require_actualApply4, require_call_bind_apply_helpers4, require_get4, require_get_proto4, require_hasown4, require_get_intrinsic4, require_es_object_atoms22, require_functionApply22, require_functionCall22, require_get_intrinsic22, require_define_data_property, require_has_property_descriptors, require_set_function_length, require_call_bind, require_callBound, require_util22, require_object_inspect, require_side_channel, require_formats2, require_utils10, require_stringify2, require_parse9, require_lib210, require_safe_buffer, require_data_stream, require_buffer_equal_constant_time, require_param_bytes_for_alg, require_ecdsa_sig_formatter, require_jwa, require_tostring, require_sign_stream, require_verify_stream, require_jws, require_decode, require_JsonWebTokenError, require_NotBeforeError, require_TokenExpiredError, require_ms4, require_timespan, require_constants8, require_debug6, require_re2, require_parse_options2, require_identifiers2, require_semver6, require_parse22, require_valid3, require_clean2, require_inc2, require_diff2, require_major2, require_minor2, require_patch2, require_prerelease2, require_compare2, require_rcompare2, require_compare_loose2, require_compare_build2, require_sort2, require_rsort2, require_gt2, require_lt2, require_eq2, require_neq2, require_gte2, require_lte2, require_cmp2, require_coerce2, require_lrucache2, require_range22, require_comparator2, require_satisfies2, require_to_comparators2, require_max_satisfying2, require_min_satisfying2, require_min_version2, require_valid22, require_outside2, require_gtr2, require_ltr2, require_intersects2, require_simplify2, require_subset2, require_semver22, require_asymmetricKeyDetailsSupported, require_rsaPssKeyDetailsSupported, require_validateAsymmetricKey, require_psSupported, require_verify, require_lodash4, require_lodash22, require_lodash32, require_lodash42, require_lodash5, require_lodash6, require_lodash7, require_sign22, require_jsonwebtoken, require_eventsource, exports$112, _dewExec16, exports17, decode2, encode32, toASCII, toUnicode, ucs2, version32, init_punycode, exports$113, _dewExec17, exports18, init_chunk_BlJi4mNy2, url_exports, empty, exports$87, _dewExec$77, _global10, exports$77, _dewExec$67, exports$67, _dewExec$57, exports$57, _dewExec$47, exports$47, _dewExec$311, exports$311, _dewExec$211, exports$211, _dewExec$111, exports$114, _dewExec18, exports19, processPlatform, Url, format23, resolve7, resolveObject, parse17, _URL, CHAR_BACKWARD_SLASH, CHAR_FORWARD_SLASH, CHAR_LOWERCASE_A, CHAR_LOWERCASE_Z, isWindows6, forwardSlashRegEx, percentRegEx, backslashRegEx, newlineRegEx, carriageReturnRegEx, tabRegEx, init_url, exports$115, _dewExec$112, exports$212, t$13, o$23, n$23, e$23, r$23, c$14, s5, u$14, a$13, d42, h$13, p$13, n$14, r$13, t52, o$14, h52, e72, a5, o5, n52, i52, l52, p5, c52, u5, f6, m4, v52, g42, y5, b42, exports20, _dewExec19, path60, processPlatform$1, CHAR_BACKWARD_SLASH$1, CHAR_FORWARD_SLASH$1, CHAR_LOWERCASE_A$1, CHAR_LOWERCASE_Z$1, isWindows$1, forwardSlashRegEx$1, percentRegEx$1, backslashRegEx$1, newlineRegEx$1, carriageReturnRegEx$1, tabRegEx$1, processPlatform2, CHAR_BACKWARD_SLASH2, CHAR_FORWARD_SLASH2, CHAR_LOWERCASE_A2, CHAR_LOWERCASE_Z2, isWindows22, forwardSlashRegEx2, percentRegEx2, backslashRegEx2, newlineRegEx2, carriageReturnRegEx2, tabRegEx2, init_chunk_DHWh_hmB, https_exports, exports$68, _dewExec$58, _global$32, exports$58, _dewExec$48, _global$25, exports$48, _dewExec$312, _global$111, exports$312, _dewExec$212, exports$213, _dewExec$113, exports$1$13, _dewExec$68, _global$42, exports$78, exports$116, _dewExec20, _global11, exports21, Agent, ClientRequest, IncomingMessage, METHODS, STATUS_CODES, get4, globalAgent, request, init_https, http_exports, exports$l3, _dewExec$k4, _global$52, exports$k4, _dewExec$j4, exports$j4, _dewExec$i4, exports$i5, _dewExec$h5, exports$h5, _dewExec$g6, exports$g6, _dewExec$f6, exports$f6, _dewExec$e6, _global$43, exports$e6, _dewExec$d6, exports$d6, _dewExec$c6, exports$c7, _dewExec$b7, exports$b7, _dewExec$a7, exports$a7, _dewExec$97, _global$33, exports$97, _dewExec$87, exports$88, _dewExec$78, exports$79, _dewExec$69, exports$69, _dewExec$59, exports$59, _dewExec$49, _global$26, exports$49, _dewExec$313, _global$112, exports$313, _dewExec$213, exports$214, _dewExec$114, exports$117, _dewExec21, _global12, exports222, Agent2, ClientRequest2, IncomingMessage2, METHODS2, STATUS_CODES2, get22, globalAgent2, request2, init_http4, require_eventsource2, axios_exports, toString10, getPrototypeOf4, kindOf4, kindOfTest4 = (type) => {
|
|
874787
874828
|
type = type.toLowerCase();
|
|
874788
874829
|
return (thing) => kindOf4(thing) === type;
|
|
874789
874830
|
}, typeOfTest4 = (type) => (thing) => typeof thing === type, isArray10, isUndefined9, isArrayBuffer5, isString8, isFunction10, isNumber5, isObject11 = (thing) => thing !== null && typeof thing === "object", isBoolean5 = (thing) => thing === true || thing === false, isPlainObject11 = (val) => {
|
|
@@ -894324,7 +894365,7 @@ Use Chrome, Firefox or Internet Explorer 11`);
|
|
|
894324
894365
|
h52.resolveObject;
|
|
894325
894366
|
exports20 = {};
|
|
894326
894367
|
_dewExec19 = false;
|
|
894327
|
-
|
|
894368
|
+
path60 = dew19();
|
|
894328
894369
|
processPlatform$1 = typeof Deno !== "undefined" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : undefined;
|
|
894329
894370
|
h52.URL = typeof URL !== "undefined" ? URL : null;
|
|
894330
894371
|
h52.pathToFileURL = pathToFileURL$1;
|
|
@@ -900108,11 +900149,11 @@ var init_start_workflow = __esm(() => {
|
|
|
900108
900149
|
});
|
|
900109
900150
|
|
|
900110
900151
|
// src/mcp/tools/get-dev-logs.ts
|
|
900111
|
-
import { existsSync as
|
|
900152
|
+
import { existsSync as existsSync22, readFileSync as readFileSync17, readdirSync as readdirSync5, statSync as statSync4 } from "fs";
|
|
900112
900153
|
import { join as join23 } from "path";
|
|
900113
900154
|
function findMostRecentLogFile(projectPath) {
|
|
900114
900155
|
const logsDir = join23(projectPath, ".adk", "logs");
|
|
900115
|
-
if (!
|
|
900156
|
+
if (!existsSync22(logsDir)) {
|
|
900116
900157
|
return null;
|
|
900117
900158
|
}
|
|
900118
900159
|
try {
|
|
@@ -902446,10 +902487,10 @@ __export(exports_adk_mcp, {
|
|
|
902446
902487
|
adkMcp: () => adkMcp
|
|
902447
902488
|
});
|
|
902448
902489
|
import { resolve as resolve8 } from "path";
|
|
902449
|
-
import { existsSync as
|
|
902490
|
+
import { existsSync as existsSync23 } from "fs";
|
|
902450
902491
|
async function adkMcp(options = {}) {
|
|
902451
902492
|
const cwd5 = options.cwd ? resolve8(options.cwd) : process.cwd();
|
|
902452
|
-
if (!
|
|
902493
|
+
if (!existsSync23(cwd5)) {
|
|
902453
902494
|
console.error(`Error: Directory not found: ${cwd5}`);
|
|
902454
902495
|
process.exit(1);
|
|
902455
902496
|
}
|
|
@@ -902465,7 +902506,7 @@ var init_adk_mcp = __esm(() => {
|
|
|
902465
902506
|
});
|
|
902466
902507
|
|
|
902467
902508
|
// src/mcp/config-generator.ts
|
|
902468
|
-
import { existsSync as
|
|
902509
|
+
import { existsSync as existsSync24, mkdirSync as mkdirSync6, writeFileSync as writeFileSync7, readFileSync as readFileSync19 } from "fs";
|
|
902469
902510
|
import { dirname as dirname7, resolve as resolve9 } from "path";
|
|
902470
902511
|
function validatePath(basePath, relativePath) {
|
|
902471
902512
|
const resolvedBase = resolve9(basePath);
|
|
@@ -902515,7 +902556,7 @@ function detectAvailableTools(cwd5) {
|
|
|
902515
902556
|
if (config4.detectPath) {
|
|
902516
902557
|
try {
|
|
902517
902558
|
const safePath = validatePath(cwd5, config4.detectPath);
|
|
902518
|
-
if (
|
|
902559
|
+
if (existsSync24(safePath)) {
|
|
902519
902560
|
detected.push(tool);
|
|
902520
902561
|
}
|
|
902521
902562
|
} catch {
|
|
@@ -902537,7 +902578,7 @@ function getConfigPath(tool, cwd5) {
|
|
|
902537
902578
|
}
|
|
902538
902579
|
function isAdkConfigured(tool, cwd5) {
|
|
902539
902580
|
const configPath = getConfigPath(tool, cwd5);
|
|
902540
|
-
if (!
|
|
902581
|
+
if (!existsSync24(configPath)) {
|
|
902541
902582
|
return false;
|
|
902542
902583
|
}
|
|
902543
902584
|
try {
|
|
@@ -902560,10 +902601,10 @@ function generateConfig(tool, cwd5, options = {}) {
|
|
|
902560
902601
|
}
|
|
902561
902602
|
try {
|
|
902562
902603
|
const dir = dirname7(configPath);
|
|
902563
|
-
if (!
|
|
902604
|
+
if (!existsSync24(dir)) {
|
|
902564
902605
|
mkdirSync6(dir, { recursive: true });
|
|
902565
902606
|
}
|
|
902566
|
-
const existingContent =
|
|
902607
|
+
const existingContent = existsSync24(configPath) ? readFileSync19(configPath, "utf-8") : null;
|
|
902567
902608
|
const adkConfig = generateAdkConfig(options.projectDir);
|
|
902568
902609
|
const mergedConfig = mergeConfig6(existingContent, adkConfig);
|
|
902569
902610
|
writeFileSync7(configPath, JSON.stringify(mergedConfig, null, 2) + `
|
|
@@ -902631,11 +902672,11 @@ var exports_adk_mcp_init = {};
|
|
|
902631
902672
|
__export(exports_adk_mcp_init, {
|
|
902632
902673
|
adkMcpInit: () => adkMcpInit
|
|
902633
902674
|
});
|
|
902634
|
-
import { existsSync as
|
|
902675
|
+
import { existsSync as existsSync25, readdirSync as readdirSync6, statSync as statSync5 } from "fs";
|
|
902635
902676
|
import { join as join27 } from "path";
|
|
902636
902677
|
function detectAdkProjects(cwd5) {
|
|
902637
902678
|
const projects = [];
|
|
902638
|
-
if (
|
|
902679
|
+
if (existsSync25(join27(cwd5, "agent.config.ts"))) {
|
|
902639
902680
|
projects.push(".");
|
|
902640
902681
|
}
|
|
902641
902682
|
try {
|
|
@@ -902647,7 +902688,7 @@ function detectAdkProjects(cwd5) {
|
|
|
902647
902688
|
const fullPath = join27(cwd5, entry);
|
|
902648
902689
|
try {
|
|
902649
902690
|
if (statSync5(fullPath).isDirectory()) {
|
|
902650
|
-
if (
|
|
902691
|
+
if (existsSync25(join27(fullPath, "agent.config.ts"))) {
|
|
902651
902692
|
projects.push(`./${entry}`);
|
|
902652
902693
|
}
|
|
902653
902694
|
}
|
|
@@ -902759,10 +902800,10 @@ All selected tools are already configured.`));
|
|
|
902759
902800
|
console.log();
|
|
902760
902801
|
console.log(source_default.bold("Configuration files:"));
|
|
902761
902802
|
for (const tool of tools) {
|
|
902762
|
-
const
|
|
902803
|
+
const path38 = getConfigPath(tool, cwd5);
|
|
902763
902804
|
const configured = isAdkConfigured(tool, cwd5);
|
|
902764
902805
|
const status = configured ? source_default.green("\u2713") : source_default.dim("-");
|
|
902765
|
-
console.log(` ${status} ${getToolDisplayName(tool)}: ${source_default.dim(
|
|
902806
|
+
console.log(` ${status} ${getToolDisplayName(tool)}: ${source_default.dim(path38)}`);
|
|
902766
902807
|
}
|
|
902767
902808
|
if (hasError) {
|
|
902768
902809
|
process.exit(1);
|
|
@@ -902821,8 +902862,8 @@ var exports_adk_run = {};
|
|
|
902821
902862
|
__export(exports_adk_run, {
|
|
902822
902863
|
adkRun: () => adkRun
|
|
902823
902864
|
});
|
|
902824
|
-
import
|
|
902825
|
-
import { existsSync as
|
|
902865
|
+
import path61 from "path";
|
|
902866
|
+
import { existsSync as existsSync26 } from "fs";
|
|
902826
902867
|
async function adkRun(scriptPath, args = [], options = {}) {
|
|
902827
902868
|
const envLabel = options.prod ? "production" : "development";
|
|
902828
902869
|
console.log(source_default.blue(`\uD83D\uDE80 Running script with ADK runtime (${envLabel})...`));
|
|
@@ -902842,11 +902883,11 @@ async function adkRun(scriptPath, args = [], options = {}) {
|
|
|
902842
902883
|
});
|
|
902843
902884
|
await assertValidProject(project);
|
|
902844
902885
|
console.log(source_default.green(`\uD83D\uDCE6 Project: ${project.config?.name || "Unknown"}`));
|
|
902845
|
-
const absoluteScriptPath =
|
|
902846
|
-
if (!
|
|
902886
|
+
const absoluteScriptPath = path61.isAbsolute(scriptPath) ? scriptPath : path61.resolve(process.cwd(), scriptPath);
|
|
902887
|
+
if (!existsSync26(absoluteScriptPath)) {
|
|
902847
902888
|
throw new Error(`Script not found: ${absoluteScriptPath}`);
|
|
902848
902889
|
}
|
|
902849
|
-
console.log(source_default.cyan(`\uD83D\uDCDC Script: ${
|
|
902890
|
+
console.log(source_default.cyan(`\uD83D\uDCDC Script: ${path61.relative(process.cwd(), absoluteScriptPath)}`));
|
|
902850
902891
|
const runner = new ScriptRunner({
|
|
902851
902892
|
projectPath: agentRoot,
|
|
902852
902893
|
forceRegenerate: options.force,
|
|
@@ -902891,9 +902932,9 @@ __export(exports_adk_config, {
|
|
|
902891
902932
|
adkConfigGet: () => adkConfigGet,
|
|
902892
902933
|
adkConfig: () => adkConfig
|
|
902893
902934
|
});
|
|
902894
|
-
import
|
|
902935
|
+
import path63 from "path";
|
|
902895
902936
|
async function adkConfig(key, options = {}) {
|
|
902896
|
-
const projectPath =
|
|
902937
|
+
const projectPath = path63.resolve(process.cwd());
|
|
902897
902938
|
const isProd = options.prod || false;
|
|
902898
902939
|
const project = await AgentProject.load(projectPath);
|
|
902899
902940
|
const configSchema3 = project.config?.configuration?.schema;
|
|
@@ -902936,7 +902977,7 @@ async function adkConfig(key, options = {}) {
|
|
|
902936
902977
|
console.log();
|
|
902937
902978
|
}
|
|
902938
902979
|
async function adkConfigSet(key, value2, options = {}) {
|
|
902939
|
-
const projectPath =
|
|
902980
|
+
const projectPath = path63.resolve(process.cwd());
|
|
902940
902981
|
const isProd = options.prod || false;
|
|
902941
902982
|
const project = await AgentProject.load(projectPath);
|
|
902942
902983
|
const configSchema3 = project.config?.configuration?.schema;
|
|
@@ -903814,7 +903855,7 @@ if (!checkNodeVersion(true)) {
|
|
|
903814
903855
|
checkNodeVersion(false);
|
|
903815
903856
|
process.exit(1);
|
|
903816
903857
|
}
|
|
903817
|
-
var CLI_VERSION = "1.12.
|
|
903858
|
+
var CLI_VERSION = "1.12.3";
|
|
903818
903859
|
if (CLI_VERSION.startsWith("<<") && CLI_VERSION.endsWith(">>")) {
|
|
903819
903860
|
try {
|
|
903820
903861
|
const __filename2 = fileURLToPath14(import.meta.url);
|