@pipelab/plugin-construct 1.0.0-beta.14 → 1.0.0-beta.16
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/index.cjs +209 -104
- package/dist/index.mjs +186 -82
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -8,11 +8,11 @@ let node_os = require("node:os");
|
|
|
8
8
|
let node_url = require("node:url");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
node_fs = require_chunk.__toESM(node_fs);
|
|
11
|
+
let node_fs_promises = require("node:fs/promises");
|
|
12
|
+
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
11
13
|
let node_http = require("node:http");
|
|
12
14
|
node_http = require_chunk.__toESM(node_http);
|
|
13
15
|
let node_crypto = require("node:crypto");
|
|
14
|
-
let node_fs_promises = require("node:fs/promises");
|
|
15
|
-
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
16
16
|
let node_child_process = require("node:child_process");
|
|
17
17
|
let node_string_decoder = require("node:string_decoder");
|
|
18
18
|
let node_util = require("node:util");
|
|
@@ -26,6 +26,8 @@ let node_v8 = require("node:v8");
|
|
|
26
26
|
let node_stream_promises = require("node:stream/promises");
|
|
27
27
|
let node_stream = require("node:stream");
|
|
28
28
|
let node_buffer = require("node:buffer");
|
|
29
|
+
let node_dns_promises = require("node:dns/promises");
|
|
30
|
+
node_dns_promises = require_chunk.__toESM(node_dns_promises);
|
|
29
31
|
let node_module = require("node:module");
|
|
30
32
|
//#region ../../packages/migration/src/models/createMigration.ts
|
|
31
33
|
function createMigration$1(migration) {
|
|
@@ -1605,6 +1607,56 @@ function literal(literal_, message) {
|
|
|
1605
1607
|
}
|
|
1606
1608
|
};
|
|
1607
1609
|
}
|
|
1610
|
+
function looseObject(entries, message) {
|
|
1611
|
+
return {
|
|
1612
|
+
kind: "schema",
|
|
1613
|
+
type: "loose_object",
|
|
1614
|
+
reference: looseObject,
|
|
1615
|
+
expects: "Object",
|
|
1616
|
+
async: false,
|
|
1617
|
+
entries,
|
|
1618
|
+
message,
|
|
1619
|
+
_run(dataset, config2) {
|
|
1620
|
+
const input = dataset.value;
|
|
1621
|
+
if (input && typeof input === "object") {
|
|
1622
|
+
dataset.typed = true;
|
|
1623
|
+
dataset.value = {};
|
|
1624
|
+
for (const key in this.entries) {
|
|
1625
|
+
const value2 = input[key];
|
|
1626
|
+
const valueDataset = this.entries[key]._run({
|
|
1627
|
+
typed: false,
|
|
1628
|
+
value: value2
|
|
1629
|
+
}, config2);
|
|
1630
|
+
if (valueDataset.issues) {
|
|
1631
|
+
const pathItem = {
|
|
1632
|
+
type: "object",
|
|
1633
|
+
origin: "value",
|
|
1634
|
+
input,
|
|
1635
|
+
key,
|
|
1636
|
+
value: value2
|
|
1637
|
+
};
|
|
1638
|
+
for (const issue of valueDataset.issues) {
|
|
1639
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
1640
|
+
else issue.path = [pathItem];
|
|
1641
|
+
dataset.issues?.push(issue);
|
|
1642
|
+
}
|
|
1643
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
1644
|
+
if (config2.abortEarly) {
|
|
1645
|
+
dataset.typed = false;
|
|
1646
|
+
break;
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
1650
|
+
if (valueDataset.value !== void 0 || key in input) dataset.value[key] = valueDataset.value;
|
|
1651
|
+
}
|
|
1652
|
+
if (!dataset.issues || !config2.abortEarly) {
|
|
1653
|
+
for (const key in input) if (_isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
|
|
1654
|
+
}
|
|
1655
|
+
} else _addIssue(this, "type", dataset, config2);
|
|
1656
|
+
return dataset;
|
|
1657
|
+
}
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1608
1660
|
function number(message) {
|
|
1609
1661
|
return {
|
|
1610
1662
|
kind: "schema",
|
|
@@ -2142,6 +2194,18 @@ settingsMigratorInternal.createMigrations({
|
|
|
2142
2194
|
})
|
|
2143
2195
|
]
|
|
2144
2196
|
});
|
|
2197
|
+
const connectionsMigratorInternal = createMigrator();
|
|
2198
|
+
const defaultConnections = connectionsMigratorInternal.createDefault({
|
|
2199
|
+
version: "1.0.0",
|
|
2200
|
+
connections: []
|
|
2201
|
+
});
|
|
2202
|
+
connectionsMigratorInternal.createMigrations({
|
|
2203
|
+
defaultValue: defaultConnections,
|
|
2204
|
+
migrations: [createMigration({
|
|
2205
|
+
version: "1.0.0",
|
|
2206
|
+
up: finalVersion
|
|
2207
|
+
})]
|
|
2208
|
+
});
|
|
2145
2209
|
const fileRepoMigratorInternal = createMigrator();
|
|
2146
2210
|
const defaultFileRepo = fileRepoMigratorInternal.createDefault({
|
|
2147
2211
|
version: "2.0.0",
|
|
@@ -2303,11 +2367,51 @@ const LEGACY_ID_MAP = {
|
|
|
2303
2367
|
};
|
|
2304
2368
|
const getStrictPluginId = (pluginId) => {
|
|
2305
2369
|
if (!pluginId) return pluginId;
|
|
2306
|
-
|
|
2307
|
-
if (pluginId.startsWith("@") || pluginId.includes("/") || pluginId.startsWith("pipelab-plugin-")) return pluginId;
|
|
2308
|
-
const prefixed = `@pipelab/plugin-${pluginId}`;
|
|
2309
|
-
return LEGACY_ID_MAP[prefixed] || prefixed;
|
|
2370
|
+
return LEGACY_ID_MAP[pluginId] || pluginId;
|
|
2310
2371
|
};
|
|
2372
|
+
//#endregion
|
|
2373
|
+
//#region ../../packages/shared/src/save-location.ts
|
|
2374
|
+
const SaveLocationInternalValidator = object({
|
|
2375
|
+
id: string(),
|
|
2376
|
+
project: string(),
|
|
2377
|
+
lastModified: string(),
|
|
2378
|
+
type: literal("internal"),
|
|
2379
|
+
configName: string()
|
|
2380
|
+
});
|
|
2381
|
+
const SaveLocationValidator = union([
|
|
2382
|
+
object({
|
|
2383
|
+
id: string(),
|
|
2384
|
+
project: string(),
|
|
2385
|
+
path: string(),
|
|
2386
|
+
lastModified: string(),
|
|
2387
|
+
type: literal("external"),
|
|
2388
|
+
summary: object({
|
|
2389
|
+
plugins: array(string()),
|
|
2390
|
+
name: string(),
|
|
2391
|
+
description: string()
|
|
2392
|
+
})
|
|
2393
|
+
}),
|
|
2394
|
+
SaveLocationInternalValidator,
|
|
2395
|
+
object({
|
|
2396
|
+
id: string(),
|
|
2397
|
+
project: string(),
|
|
2398
|
+
type: literal("pipelab-cloud")
|
|
2399
|
+
})
|
|
2400
|
+
]);
|
|
2401
|
+
object({
|
|
2402
|
+
version: literal("1.0.0"),
|
|
2403
|
+
data: optional(record(string(), SaveLocationValidator), {})
|
|
2404
|
+
});
|
|
2405
|
+
const FileRepoProjectValidatorV2$1 = object({
|
|
2406
|
+
id: string(),
|
|
2407
|
+
name: string(),
|
|
2408
|
+
description: string()
|
|
2409
|
+
});
|
|
2410
|
+
object({
|
|
2411
|
+
version: literal("2.0.0"),
|
|
2412
|
+
projects: array(FileRepoProjectValidatorV2$1),
|
|
2413
|
+
pipelines: optional(array(SaveLocationValidator), [])
|
|
2414
|
+
});
|
|
2311
2415
|
object({
|
|
2312
2416
|
cacheFolder: string(),
|
|
2313
2417
|
theme: union([literal("light"), literal("dark")]),
|
|
@@ -2459,6 +2563,17 @@ object({
|
|
|
2459
2563
|
})),
|
|
2460
2564
|
isInternalMigrationBannerClosed: optional(boolean(), false)
|
|
2461
2565
|
});
|
|
2566
|
+
const ConnectionValidator = looseObject({
|
|
2567
|
+
id: string(),
|
|
2568
|
+
pluginName: string(),
|
|
2569
|
+
name: string(),
|
|
2570
|
+
createdAt: string(),
|
|
2571
|
+
isDefault: boolean()
|
|
2572
|
+
});
|
|
2573
|
+
object({
|
|
2574
|
+
version: literal("1.0.0"),
|
|
2575
|
+
connections: array(ConnectionValidator)
|
|
2576
|
+
});
|
|
2462
2577
|
//#endregion
|
|
2463
2578
|
//#region ../../node_modules/tslog/dist/esm/prettyLogStyles.js
|
|
2464
2579
|
const prettyLogStyles = {
|
|
@@ -2979,7 +3094,7 @@ const useLogger = () => {
|
|
|
2979
3094
|
const OriginValidator = object({
|
|
2980
3095
|
pluginId: string(),
|
|
2981
3096
|
nodeId: string(),
|
|
2982
|
-
version: pipe(
|
|
3097
|
+
version: optional(pipe(string(), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent.")))
|
|
2983
3098
|
});
|
|
2984
3099
|
const BlockActionValidatorV1 = object({
|
|
2985
3100
|
type: literal("action"),
|
|
@@ -2992,7 +3107,7 @@ const EditorParamValidatorV3 = union([literal("simple"), literal("editor")]);
|
|
|
2992
3107
|
const BlockActionValidatorV3 = object({
|
|
2993
3108
|
type: literal("action"),
|
|
2994
3109
|
uid: string(),
|
|
2995
|
-
name: pipe(
|
|
3110
|
+
name: optional(pipe(string(), description("A custom name provided by the user"))),
|
|
2996
3111
|
disabled: optional(boolean()),
|
|
2997
3112
|
params: record(string(), object({
|
|
2998
3113
|
editor: EditorParamValidatorV3,
|
|
@@ -45315,35 +45430,6 @@ const createNumberParam = (value, definition) => {
|
|
|
45315
45430
|
};
|
|
45316
45431
|
};
|
|
45317
45432
|
//#endregion
|
|
45318
|
-
//#region ../../packages/shared/src/save-location.ts
|
|
45319
|
-
const SaveLocationInternalValidator = object({
|
|
45320
|
-
id: string(),
|
|
45321
|
-
project: string(),
|
|
45322
|
-
lastModified: string(),
|
|
45323
|
-
type: literal("internal"),
|
|
45324
|
-
configName: string()
|
|
45325
|
-
});
|
|
45326
|
-
const SaveLocationValidator = union([
|
|
45327
|
-
object({
|
|
45328
|
-
id: string(),
|
|
45329
|
-
project: string(),
|
|
45330
|
-
path: string(),
|
|
45331
|
-
lastModified: string(),
|
|
45332
|
-
type: literal("external"),
|
|
45333
|
-
summary: object({
|
|
45334
|
-
plugins: array(string()),
|
|
45335
|
-
name: string(),
|
|
45336
|
-
description: string()
|
|
45337
|
-
})
|
|
45338
|
-
}),
|
|
45339
|
-
SaveLocationInternalValidator,
|
|
45340
|
-
object({
|
|
45341
|
-
id: string(),
|
|
45342
|
-
project: string(),
|
|
45343
|
-
type: literal("pipelab-cloud")
|
|
45344
|
-
})
|
|
45345
|
-
]);
|
|
45346
|
-
//#endregion
|
|
45347
45433
|
//#region ../../packages/shared/src/websocket.types.ts
|
|
45348
45434
|
var WebSocketError = class extends Error {
|
|
45349
45435
|
constructor(message, code, requestId) {
|
|
@@ -45360,20 +45446,6 @@ object({
|
|
|
45360
45446
|
version: literal("1.0.0"),
|
|
45361
45447
|
data: optional(record(string(), SaveLocationValidator), {})
|
|
45362
45448
|
});
|
|
45363
|
-
const FileRepoProjectValidatorV2$1 = object({
|
|
45364
|
-
id: string(),
|
|
45365
|
-
name: string(),
|
|
45366
|
-
description: string()
|
|
45367
|
-
});
|
|
45368
|
-
object({
|
|
45369
|
-
version: literal("2.0.0"),
|
|
45370
|
-
projects: array(FileRepoProjectValidatorV2$1),
|
|
45371
|
-
pipelines: optional(array(SaveLocationValidator), [])
|
|
45372
|
-
});
|
|
45373
|
-
object({
|
|
45374
|
-
version: literal("1.0.0"),
|
|
45375
|
-
data: optional(record(string(), SaveLocationValidator), {})
|
|
45376
|
-
});
|
|
45377
45449
|
const FileRepoProjectValidatorV2 = object({
|
|
45378
45450
|
id: string(),
|
|
45379
45451
|
name: string(),
|
|
@@ -45385,8 +45457,14 @@ object({
|
|
|
45385
45457
|
pipelines: optional(array(SaveLocationValidator), [])
|
|
45386
45458
|
});
|
|
45387
45459
|
//#endregion
|
|
45460
|
+
//#region ../../packages/constants/src/index.ts
|
|
45461
|
+
const websocketPort = 33753;
|
|
45462
|
+
const DEFAULT_NODE_VERSION = "24.14.1";
|
|
45463
|
+
const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
45464
|
+
//#endregion
|
|
45388
45465
|
//#region ../../packages/core-node/src/context.ts
|
|
45389
|
-
const
|
|
45466
|
+
const metaUrl = require("url").pathToFileURL(__filename).href;
|
|
45467
|
+
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? (0, node_path.dirname)((0, node_url.fileURLToPath)(metaUrl)) : process.cwd();
|
|
45390
45468
|
const isDev = process.env.NODE_ENV === "development";
|
|
45391
45469
|
/**
|
|
45392
45470
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
@@ -48958,9 +49036,6 @@ const useAPI = () => {
|
|
|
48958
49036
|
};
|
|
48959
49037
|
};
|
|
48960
49038
|
//#endregion
|
|
48961
|
-
//#region ../../packages/constants/src/index.ts
|
|
48962
|
-
const websocketPort = 33753;
|
|
48963
|
-
//#endregion
|
|
48964
49039
|
//#region ../../packages/core-node/src/websocket-server.ts
|
|
48965
49040
|
var WebSocketServer = class {
|
|
48966
49041
|
wss = null;
|
|
@@ -59969,14 +60044,14 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
59969
60044
|
const assert$1 = require("assert");
|
|
59970
60045
|
const normalize = require_normalize_unicode();
|
|
59971
60046
|
const stripSlashes = require_strip_trailing_slashes();
|
|
59972
|
-
const { join: join$
|
|
60047
|
+
const { join: join$20 } = require("path");
|
|
59973
60048
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
59974
60049
|
module.exports = () => {
|
|
59975
60050
|
const queues = /* @__PURE__ */ new Map();
|
|
59976
60051
|
const reservations = /* @__PURE__ */ new Map();
|
|
59977
60052
|
const getDirs = (path$62) => {
|
|
59978
60053
|
return path$62.split("/").slice(0, -1).reduce((set, path$63) => {
|
|
59979
|
-
if (set.length) path$63 = join$
|
|
60054
|
+
if (set.length) path$63 = join$20(set[set.length - 1], path$63);
|
|
59980
60055
|
set.push(path$63 || "/");
|
|
59981
60056
|
return set;
|
|
59982
60057
|
}, []);
|
|
@@ -60030,7 +60105,7 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
60030
60105
|
};
|
|
60031
60106
|
const reserve = (paths, fn) => {
|
|
60032
60107
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
60033
|
-
return stripSlashes(join$
|
|
60108
|
+
return stripSlashes(join$20(normalize(p))).toLowerCase();
|
|
60034
60109
|
});
|
|
60035
60110
|
const dirs = new Set(paths.map((path$67) => getDirs(path$67)).reduce((a, b) => a.concat(b)));
|
|
60036
60111
|
reservations.set(fn, {
|
|
@@ -89368,14 +89443,6 @@ var import_tar = /* @__PURE__ */ require_chunk.__toESM(require_tar$1(), 1);
|
|
|
89368
89443
|
var import_yauzl = /* @__PURE__ */ require_chunk.__toESM(require_yauzl(), 1);
|
|
89369
89444
|
var import_archiver = /* @__PURE__ */ require_chunk.__toESM(require_archiver(), 1);
|
|
89370
89445
|
/**
|
|
89371
|
-
* Generates a unique temporary folder.
|
|
89372
|
-
*/
|
|
89373
|
-
const generateTempFolder = async (base) => {
|
|
89374
|
-
const targetBase = base || (0, node_os.tmpdir)();
|
|
89375
|
-
await (0, node_fs_promises.mkdir)(targetBase, { recursive: true });
|
|
89376
|
-
return await (0, node_fs_promises.mkdtemp)((0, node_path.join)(await (0, node_fs_promises.realpath)(targetBase), "pipelab-"));
|
|
89377
|
-
};
|
|
89378
|
-
/**
|
|
89379
89446
|
* Extracts a .tar.gz archive.
|
|
89380
89447
|
*/
|
|
89381
89448
|
async function extractTarGz(archivePath, destinationDir) {
|
|
@@ -95875,7 +95942,7 @@ var require_index_min$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
95875
95942
|
//#region ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
95876
95943
|
var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
95877
95944
|
const { isexe, sync: isexeSync } = require_index_min$3();
|
|
95878
|
-
const { join: join$
|
|
95945
|
+
const { join: join$17, delimiter: delimiter$4, sep: sep$4, posix: posix$1 } = require("path");
|
|
95879
95946
|
const isWindows = process.platform === "win32";
|
|
95880
95947
|
/* istanbul ignore next */
|
|
95881
95948
|
const rSlash = new RegExp(`[${posix$1.sep}${sep$4 === posix$1.sep ? "" : sep$4}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -95905,7 +95972,7 @@ var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
95905
95972
|
};
|
|
95906
95973
|
const getPathPart = (raw, cmd) => {
|
|
95907
95974
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
95908
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
95975
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$17(pathPart, cmd);
|
|
95909
95976
|
};
|
|
95910
95977
|
const which = async (cmd, opt = {}) => {
|
|
95911
95978
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -96654,7 +96721,7 @@ var require_index_min$2 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
96654
96721
|
//#region ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
96655
96722
|
var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
96656
96723
|
const { isexe, sync: isexeSync } = require_index_min$2();
|
|
96657
|
-
const { join: join$
|
|
96724
|
+
const { join: join$16, delimiter: delimiter$3, sep: sep$3, posix } = require("path");
|
|
96658
96725
|
const isWindows = process.platform === "win32";
|
|
96659
96726
|
/* istanbul ignore next */
|
|
96660
96727
|
const rSlash = new RegExp(`[${posix.sep}${sep$3 === posix.sep ? "" : sep$3}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -96684,7 +96751,7 @@ var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
96684
96751
|
};
|
|
96685
96752
|
const getPathPart = (raw, cmd) => {
|
|
96686
96753
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
96687
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
96754
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$16(pathPart, cmd);
|
|
96688
96755
|
};
|
|
96689
96756
|
const which = async (cmd, opt = {}) => {
|
|
96690
96757
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -98582,7 +98649,7 @@ var require_lib$22 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98582
98649
|
//#endregion
|
|
98583
98650
|
//#region ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
98584
98651
|
var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98585
|
-
const { join: join$
|
|
98652
|
+
const { join: join$15, basename: basename$4 } = require("path");
|
|
98586
98653
|
const normalize = (pkg) => !pkg.bin ? removeBin(pkg) : typeof pkg.bin === "string" ? normalizeString(pkg) : Array.isArray(pkg.bin) ? normalizeArray(pkg) : typeof pkg.bin === "object" ? normalizeObject(pkg) : removeBin(pkg);
|
|
98587
98654
|
const normalizeString = (pkg) => {
|
|
98588
98655
|
if (!pkg.name) return removeBin(pkg);
|
|
@@ -98605,9 +98672,9 @@ var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98605
98672
|
const clean = {};
|
|
98606
98673
|
let hasBins = false;
|
|
98607
98674
|
Object.keys(orig).forEach((binKey) => {
|
|
98608
|
-
const base = join$
|
|
98675
|
+
const base = join$15("/", basename$4(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
98609
98676
|
if (typeof orig[binKey] !== "string" || !base) return;
|
|
98610
|
-
const binTarget = join$
|
|
98677
|
+
const binTarget = join$15("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
98611
98678
|
if (!binTarget) return;
|
|
98612
98679
|
clean[base] = binTarget;
|
|
98613
98680
|
hasBins = true;
|
|
@@ -100680,7 +100747,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100680
100747
|
const { ERR_FS_CP_DIR_TO_NON_DIR, ERR_FS_CP_EEXIST, ERR_FS_CP_EINVAL, ERR_FS_CP_FIFO_PIPE, ERR_FS_CP_NON_DIR_TO_DIR, ERR_FS_CP_SOCKET, ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY, ERR_FS_CP_UNKNOWN, ERR_FS_EISDIR, ERR_INVALID_ARG_TYPE } = require_errors$3();
|
|
100681
100748
|
const { constants: { errno: { EEXIST, EISDIR, EINVAL, ENOTDIR } } } = require("os");
|
|
100682
100749
|
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$8, readdir: readdir$6, readlink, stat: stat$5, symlink, unlink, utimes } = require("fs/promises");
|
|
100683
|
-
const { dirname: dirname$9, isAbsolute: isAbsolute$2, join: join$
|
|
100750
|
+
const { dirname: dirname$9, isAbsolute: isAbsolute$2, join: join$14, parse, resolve: resolve$10, sep: sep$2, toNamespacedPath } = require("path");
|
|
100684
100751
|
const { fileURLToPath } = require("url");
|
|
100685
100752
|
const defaultOptions = {
|
|
100686
100753
|
dereference: false,
|
|
@@ -100889,8 +100956,8 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100889
100956
|
const dir = await readdir$6(src);
|
|
100890
100957
|
for (let i = 0; i < dir.length; i++) {
|
|
100891
100958
|
const item = dir[i];
|
|
100892
|
-
const srcItem = join$
|
|
100893
|
-
const destItem = join$
|
|
100959
|
+
const srcItem = join$14(src, item);
|
|
100960
|
+
const destItem = join$14(dest, item);
|
|
100894
100961
|
const { destStat } = await checkPaths(srcItem, destItem, opts);
|
|
100895
100962
|
await startCopy(destStat, srcItem, destItem, opts);
|
|
100896
100963
|
}
|
|
@@ -100954,13 +101021,13 @@ var require_cp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
100954
101021
|
//#endregion
|
|
100955
101022
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/with-temp-dir.js
|
|
100956
101023
|
var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100957
|
-
const { join: join$
|
|
101024
|
+
const { join: join$13, sep: sep$1 } = require("path");
|
|
100958
101025
|
const getOptions = require_get_options();
|
|
100959
101026
|
const { mkdir: mkdir$7, mkdtemp, rm: rm$7 } = require("fs/promises");
|
|
100960
101027
|
const withTempDir = async (root, fn, opts) => {
|
|
100961
101028
|
const options = getOptions(opts, { copy: ["tmpPrefix"] });
|
|
100962
101029
|
await mkdir$7(root, { recursive: true });
|
|
100963
|
-
const target = await mkdtemp(join$
|
|
101030
|
+
const target = await mkdtemp(join$13(`${root}${sep$1}`, options.tmpPrefix || ""));
|
|
100964
101031
|
let err;
|
|
100965
101032
|
let result;
|
|
100966
101033
|
try {
|
|
@@ -100983,10 +101050,10 @@ var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
100983
101050
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/readdir-scoped.js
|
|
100984
101051
|
var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100985
101052
|
const { readdir: readdir$5 } = require("fs/promises");
|
|
100986
|
-
const { join: join$
|
|
101053
|
+
const { join: join$12 } = require("path");
|
|
100987
101054
|
const readdirScoped = async (dir) => {
|
|
100988
101055
|
const results = [];
|
|
100989
|
-
for (const item of await readdir$5(dir)) if (item.startsWith("@")) for (const scopedItem of await readdir$5(join$
|
|
101056
|
+
for (const item of await readdir$5(dir)) if (item.startsWith("@")) for (const scopedItem of await readdir$5(join$12(dir, item))) results.push(join$12(item, scopedItem));
|
|
100990
101057
|
else results.push(item);
|
|
100991
101058
|
return results;
|
|
100992
101059
|
};
|
|
@@ -100995,7 +101062,7 @@ var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
100995
101062
|
//#endregion
|
|
100996
101063
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/move-file.js
|
|
100997
101064
|
var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100998
|
-
const { dirname: dirname$8, join: join$
|
|
101065
|
+
const { dirname: dirname$8, join: join$11, resolve: resolve$9, relative: relative$1, isAbsolute: isAbsolute$1 } = require("path");
|
|
100999
101066
|
const fs$12 = require("fs/promises");
|
|
101000
101067
|
const pathExists = async (path$54) => {
|
|
101001
101068
|
try {
|
|
@@ -101020,7 +101087,7 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
101020
101087
|
const sourceStat = await fs$12.lstat(source);
|
|
101021
101088
|
if (sourceStat.isDirectory()) {
|
|
101022
101089
|
const files = await fs$12.readdir(source);
|
|
101023
|
-
await Promise.all(files.map((file) => moveFile(join$
|
|
101090
|
+
await Promise.all(files.map((file) => moveFile(join$11(source, file), join$11(destination, file), options, false, symlinks)));
|
|
101024
101091
|
} else if (sourceStat.isSymbolicLink()) symlinks.push({
|
|
101025
101092
|
source,
|
|
101026
101093
|
destination
|
|
@@ -110559,9 +110626,9 @@ var require_protected = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
110559
110626
|
//#region ../../node_modules/pacote/lib/util/cache-dir.js
|
|
110560
110627
|
var require_cache_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
110561
110628
|
const { resolve: resolve$7 } = require("node:path");
|
|
110562
|
-
const { tmpdir
|
|
110629
|
+
const { tmpdir, homedir: homedir$1 } = require("node:os");
|
|
110563
110630
|
module.exports = (fakePlatform = false) => {
|
|
110564
|
-
const temp = tmpdir
|
|
110631
|
+
const temp = tmpdir();
|
|
110565
110632
|
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
110566
110633
|
const home = homedir$1() || resolve$7(temp, "npm-" + uidOrPid);
|
|
110567
110634
|
const platform = fakePlatform || process.platform;
|
|
@@ -112383,7 +112450,7 @@ var require_lib$10 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112383
112450
|
var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112384
112451
|
const { Walker: IgnoreWalker } = require_lib$10();
|
|
112385
112452
|
const { lstatSync: lstat$1, readFileSync: readFile$4 } = require("fs");
|
|
112386
|
-
const { basename: basename$2, dirname: dirname$6, extname: extname$1, join: join$
|
|
112453
|
+
const { basename: basename$2, dirname: dirname$6, extname: extname$1, join: join$10, relative, resolve: resolve$6, sep } = require("path");
|
|
112387
112454
|
const { log } = require_lib$29();
|
|
112388
112455
|
const defaultRules = Symbol("npm-packlist.rules.default");
|
|
112389
112456
|
const strictRules = Symbol("npm-packlist.rules.strict");
|
|
@@ -112416,7 +112483,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112416
112483
|
const normalizePath = (path$46) => path$46.split("\\").join("/");
|
|
112417
112484
|
const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
|
|
112418
112485
|
for (const file of [".npmignore", ".gitignore"]) try {
|
|
112419
|
-
const ignoreContent = readFile$4(join$
|
|
112486
|
+
const ignoreContent = readFile$4(join$10(root, file), { encoding: "utf8" });
|
|
112420
112487
|
result.push(ignoreContent);
|
|
112421
112488
|
break;
|
|
112422
112489
|
} catch (err) {
|
|
@@ -112425,8 +112492,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112425
112492
|
}
|
|
112426
112493
|
if (!rel) return result;
|
|
112427
112494
|
const firstRel = rel.split(sep, 1)[0];
|
|
112428
|
-
const newRoot = join$
|
|
112429
|
-
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$
|
|
112495
|
+
const newRoot = join$10(root, firstRel);
|
|
112496
|
+
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$10(root, rel)), result);
|
|
112430
112497
|
};
|
|
112431
112498
|
var PackWalker = class PackWalker extends IgnoreWalker {
|
|
112432
112499
|
constructor(tree, opts) {
|
|
@@ -112493,7 +112560,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112493
112560
|
let ignoreFiles = null;
|
|
112494
112561
|
if (this.tree.workspaces) {
|
|
112495
112562
|
const workspaceDirs = [...this.tree.workspaces.values()].map((dir) => dir.replace(/\\/g, "/"));
|
|
112496
|
-
const entryPath = join$
|
|
112563
|
+
const entryPath = join$10(this.path, entry).replace(/\\/g, "/");
|
|
112497
112564
|
if (workspaceDirs.includes(entryPath)) ignoreFiles = [
|
|
112498
112565
|
defaultRules,
|
|
112499
112566
|
"package.json",
|
|
@@ -112553,7 +112620,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112553
112620
|
if (file.endsWith("/*")) file += "*";
|
|
112554
112621
|
const inverse = `!${file}`;
|
|
112555
112622
|
try {
|
|
112556
|
-
const stat = lstat$1(join$
|
|
112623
|
+
const stat = lstat$1(join$10(this.path, file.replace(/^!+/, "")).replace(/\\/g, "/"));
|
|
112557
112624
|
if (stat.isFile()) {
|
|
112558
112625
|
strict.unshift(inverse);
|
|
112559
112626
|
this.requiredFiles.push(file.startsWith("/") ? file.slice(1) : file);
|
|
@@ -112610,7 +112677,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112610
112677
|
walker.start();
|
|
112611
112678
|
});
|
|
112612
112679
|
const relativeFrom = relative(this.root, walker.path);
|
|
112613
|
-
for (const file of bundled) this.result.add(join$
|
|
112680
|
+
for (const file of bundled) this.result.add(join$10(relativeFrom, file).replace(/\\/g, "/"));
|
|
112614
112681
|
}
|
|
112615
112682
|
}
|
|
112616
112683
|
};
|
|
@@ -123811,7 +123878,7 @@ var require_auth = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module
|
|
|
123811
123878
|
//#endregion
|
|
123812
123879
|
//#region ../../node_modules/make-fetch-happen/lib/options.js
|
|
123813
123880
|
var require_options$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
123814
|
-
const dns$
|
|
123881
|
+
const dns$3 = require("dns");
|
|
123815
123882
|
const conditionalHeaders = [
|
|
123816
123883
|
"if-modified-since",
|
|
123817
123884
|
"if-none-match",
|
|
@@ -123836,7 +123903,7 @@ var require_options$1 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
123836
123903
|
};
|
|
123837
123904
|
options.dns = {
|
|
123838
123905
|
ttl: 300 * 1e3,
|
|
123839
|
-
lookup: dns$
|
|
123906
|
+
lookup: dns$3.lookup,
|
|
123840
123907
|
...options.dns
|
|
123841
123908
|
};
|
|
123842
123909
|
options.cache = options.cache || "default";
|
|
@@ -125253,9 +125320,9 @@ var require_key$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
125253
125320
|
//#region ../../node_modules/@npmcli/agent/lib/dns.js
|
|
125254
125321
|
var require_dns = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
125255
125322
|
const { LRUCache } = require_index_min$5();
|
|
125256
|
-
const dns$
|
|
125323
|
+
const dns$2 = require("dns");
|
|
125257
125324
|
const cache = new LRUCache({ max: 50 });
|
|
125258
|
-
const getOptions = ({ family = 0, hints = dns$
|
|
125325
|
+
const getOptions = ({ family = 0, hints = dns$2.ADDRCONFIG, all = false, verbatim = void 0, ttl = 300 * 1e3, lookup = dns$2.lookup }) => ({
|
|
125259
125326
|
hints,
|
|
125260
125327
|
lookup: (hostname, ...args) => {
|
|
125261
125328
|
const callback = args.pop();
|
|
@@ -130294,7 +130361,7 @@ var require_dist$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
|
130294
130361
|
const socks_1 = require_build$1();
|
|
130295
130362
|
const agent_base_1 = require_dist$12();
|
|
130296
130363
|
const debug_1 = __importDefault(require_src$1());
|
|
130297
|
-
const dns = __importStar(require("dns"));
|
|
130364
|
+
const dns$1 = __importStar(require("dns"));
|
|
130298
130365
|
const net$1 = __importStar(require("net"));
|
|
130299
130366
|
const tls$1 = __importStar(require("tls"));
|
|
130300
130367
|
const url_1$1 = require("url");
|
|
@@ -130366,7 +130433,7 @@ var require_dist$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports) => {
|
|
|
130366
130433
|
const { shouldLookup, proxy, timeout } = this;
|
|
130367
130434
|
if (!opts.host) throw new Error("No `host` defined!");
|
|
130368
130435
|
let { host } = opts;
|
|
130369
|
-
const { port, lookup: lookupFn = dns.lookup } = opts;
|
|
130436
|
+
const { port, lookup: lookupFn = dns$1.lookup } = opts;
|
|
130370
130437
|
if (shouldLookup) host = await new Promise((resolve, reject) => {
|
|
130371
130438
|
lookupFn(host, {}, (err, res) => {
|
|
130372
130439
|
if (err) reject(err);
|
|
@@ -151095,8 +151162,6 @@ const sendStartupProgress = (message) => {
|
|
|
151095
151162
|
};
|
|
151096
151163
|
//#endregion
|
|
151097
151164
|
//#region ../../packages/core-node/src/utils/remote.ts
|
|
151098
|
-
const DEFAULT_NODE_VERSION = "24.14.1";
|
|
151099
|
-
const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
151100
151165
|
function isPackageComplete(packageDir) {
|
|
151101
151166
|
return (0, node_fs.existsSync)((0, node_path.join)(packageDir, "package.json"));
|
|
151102
151167
|
}
|
|
@@ -151137,6 +151202,20 @@ async function withLock(key, fn) {
|
|
|
151137
151202
|
activeOperations.set(key, promise);
|
|
151138
151203
|
return promise;
|
|
151139
151204
|
}
|
|
151205
|
+
let isOnlineCached = null;
|
|
151206
|
+
let lastCheckTime = 0;
|
|
151207
|
+
async function isOnline() {
|
|
151208
|
+
const now = Date.now();
|
|
151209
|
+
if (isOnlineCached !== null && now - lastCheckTime < 1e4) return isOnlineCached;
|
|
151210
|
+
try {
|
|
151211
|
+
await Promise.race([node_dns_promises.default.lookup("registry.npmjs.org"), new Promise((_, reject) => setTimeout(() => reject(/* @__PURE__ */ new Error("timeout")), 1500))]);
|
|
151212
|
+
isOnlineCached = true;
|
|
151213
|
+
} catch {
|
|
151214
|
+
isOnlineCached = false;
|
|
151215
|
+
}
|
|
151216
|
+
lastCheckTime = now;
|
|
151217
|
+
return isOnlineCached;
|
|
151218
|
+
}
|
|
151140
151219
|
/**
|
|
151141
151220
|
* Robust utility to fetch, cache, and resolve an NPM package.
|
|
151142
151221
|
* Centralized in core-node to avoid circular dependencies.
|
|
@@ -151163,7 +151242,15 @@ async function fetchPackage(packageName, versionOrRange, options) {
|
|
|
151163
151242
|
if (resolvedVersionOrRange === "local") resolvedVersionOrRange = "latest";
|
|
151164
151243
|
console.log(`[Fetcher] Resolving ${packageName}@${resolvedVersionOrRange || "latest"}...`);
|
|
151165
151244
|
const resolveStart = Date.now();
|
|
151166
|
-
|
|
151245
|
+
if (!await isOnline()) {
|
|
151246
|
+
console.warn(`[Fetcher] ${packageName}: offline mode detected (${Date.now() - resolveStart}ms), trying local fallback...`);
|
|
151247
|
+
const fallbackStart = Date.now();
|
|
151248
|
+
const fallbackVersion = await tryLocalFallback(resolvedVersionOrRange, /* @__PURE__ */ new Error("Offline"), baseDir, packageName);
|
|
151249
|
+
if (fallbackVersion) {
|
|
151250
|
+
resolvedVersion = fallbackVersion;
|
|
151251
|
+
console.log(`[Fetcher] ${packageName}: Resolved to local fallback ${resolvedVersion} (${Date.now() - fallbackStart}ms)`);
|
|
151252
|
+
} else throw new Error(`Offline and no local fallback version available for ${packageName}`);
|
|
151253
|
+
} else try {
|
|
151167
151254
|
const cachePath = (0, node_path.join)(ctx.userDataPath, "cache", "pacote");
|
|
151168
151255
|
let packumentPromise = packumentRequests.get(packageName);
|
|
151169
151256
|
if (!packumentPromise) {
|
|
@@ -151173,7 +151260,16 @@ async function fetchPackage(packageName, versionOrRange, options) {
|
|
|
151173
151260
|
const packument = await packumentPromise;
|
|
151174
151261
|
const versions = Object.keys(packument.versions);
|
|
151175
151262
|
const range = resolvedVersionOrRange || "latest";
|
|
151176
|
-
|
|
151263
|
+
let foundVersion = packument["dist-tags"]?.[range] || import_semver.default.maxSatisfying(versions, range);
|
|
151264
|
+
if (range === "latest" && ctx.releaseTag && ctx.releaseTag !== "latest") {
|
|
151265
|
+
const releaseTagVersion = packument["dist-tags"]?.[ctx.releaseTag];
|
|
151266
|
+
if (releaseTagVersion && import_semver.default.valid(releaseTagVersion)) {
|
|
151267
|
+
if (!foundVersion || import_semver.default.valid(foundVersion) && import_semver.default.gte(releaseTagVersion, foundVersion)) {
|
|
151268
|
+
console.log(`[Fetcher] Using release tag "${ctx.releaseTag}" (${releaseTagVersion}) instead of "latest" (${foundVersion || "none"}) for ${packageName}`);
|
|
151269
|
+
foundVersion = releaseTagVersion;
|
|
151270
|
+
} else if (foundVersion) console.warn(`[Fetcher] Tag "${ctx.releaseTag}" (${releaseTagVersion}) is older than "latest" (${foundVersion}) for ${packageName}, keeping "latest"`);
|
|
151271
|
+
}
|
|
151272
|
+
}
|
|
151177
151273
|
if (!foundVersion) throw new Error(`Package ${packageName}@${range} not found on npm (available tags: ${Object.keys(packument["dist-tags"] || {}).join(", ")})`);
|
|
151178
151274
|
resolvedVersion = foundVersion;
|
|
151179
151275
|
console.log(`[Fetcher] ${packageName}: Resolved to v${resolvedVersion} via npm (${Date.now() - resolveStart}ms)`);
|
|
@@ -151288,7 +151384,7 @@ async function ensureNodeJS(context, version = DEFAULT_NODE_VERSION) {
|
|
|
151288
151384
|
const extension = isWindows ? "zip" : "tar.gz";
|
|
151289
151385
|
const fileName = `node-v${version}-${platform === "osx" ? "darwin" : platform}-${arch}.${extension}`;
|
|
151290
151386
|
const downloadUrl = `https://nodejs.org/dist/v${version}/${fileName}`;
|
|
151291
|
-
const tempDir = await
|
|
151387
|
+
const tempDir = await context.createTempFolder("node-download-");
|
|
151292
151388
|
const archivePath = (0, node_path.join)(tempDir, fileName);
|
|
151293
151389
|
sendStartupProgress(`Downloading Node.js v${version}...`);
|
|
151294
151390
|
console.log(`Downloading Node.js from ${downloadUrl}...`);
|
|
@@ -151490,7 +151586,7 @@ async function resolveEntryPoint(packageDir, packageName) {
|
|
|
151490
151586
|
}
|
|
151491
151587
|
//#endregion
|
|
151492
151588
|
//#region ../../packages/core-node/src/handler-func.ts
|
|
151493
|
-
const { join: join$
|
|
151589
|
+
const { join: join$8 } = node_path.default;
|
|
151494
151590
|
//#endregion
|
|
151495
151591
|
//#region ../../packages/core-node/src/handlers/plugins.ts
|
|
151496
151592
|
const localPluginsMap = /* @__PURE__ */ new Map();
|
|
@@ -151956,7 +152052,16 @@ var src_default = createNodeDefinition({
|
|
|
151956
152052
|
node: exportProjectAction,
|
|
151957
152053
|
runner: ExportProjectActionRunner
|
|
151958
152054
|
}],
|
|
151959
|
-
validators: []
|
|
152055
|
+
validators: [],
|
|
152056
|
+
integrations: [{
|
|
152057
|
+
name: "Browser Executable Link",
|
|
152058
|
+
fields: [{
|
|
152059
|
+
key: "path",
|
|
152060
|
+
label: "Browser Executable Path",
|
|
152061
|
+
type: "file",
|
|
152062
|
+
placeholder: "e.g., /usr/bin/google-chrome"
|
|
152063
|
+
}]
|
|
152064
|
+
}]
|
|
151960
152065
|
});
|
|
151961
152066
|
//#endregion
|
|
151962
152067
|
module.exports = src_default;
|