@pipelab/plugin-netlify 1.0.0-beta.14 → 1.0.0-beta.15
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 +235 -161
- package/dist/index.mjs +213 -139
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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");
|
|
@@ -1604,6 +1604,56 @@ function literal(literal_, message) {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
};
|
|
1606
1606
|
}
|
|
1607
|
+
function looseObject(entries, message) {
|
|
1608
|
+
return {
|
|
1609
|
+
kind: "schema",
|
|
1610
|
+
type: "loose_object",
|
|
1611
|
+
reference: looseObject,
|
|
1612
|
+
expects: "Object",
|
|
1613
|
+
async: false,
|
|
1614
|
+
entries,
|
|
1615
|
+
message,
|
|
1616
|
+
_run(dataset, config2) {
|
|
1617
|
+
const input = dataset.value;
|
|
1618
|
+
if (input && typeof input === "object") {
|
|
1619
|
+
dataset.typed = true;
|
|
1620
|
+
dataset.value = {};
|
|
1621
|
+
for (const key in this.entries) {
|
|
1622
|
+
const value2 = input[key];
|
|
1623
|
+
const valueDataset = this.entries[key]._run({
|
|
1624
|
+
typed: false,
|
|
1625
|
+
value: value2
|
|
1626
|
+
}, config2);
|
|
1627
|
+
if (valueDataset.issues) {
|
|
1628
|
+
const pathItem = {
|
|
1629
|
+
type: "object",
|
|
1630
|
+
origin: "value",
|
|
1631
|
+
input,
|
|
1632
|
+
key,
|
|
1633
|
+
value: value2
|
|
1634
|
+
};
|
|
1635
|
+
for (const issue of valueDataset.issues) {
|
|
1636
|
+
if (issue.path) issue.path.unshift(pathItem);
|
|
1637
|
+
else issue.path = [pathItem];
|
|
1638
|
+
dataset.issues?.push(issue);
|
|
1639
|
+
}
|
|
1640
|
+
if (!dataset.issues) dataset.issues = valueDataset.issues;
|
|
1641
|
+
if (config2.abortEarly) {
|
|
1642
|
+
dataset.typed = false;
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
if (!valueDataset.typed) dataset.typed = false;
|
|
1647
|
+
if (valueDataset.value !== void 0 || key in input) dataset.value[key] = valueDataset.value;
|
|
1648
|
+
}
|
|
1649
|
+
if (!dataset.issues || !config2.abortEarly) {
|
|
1650
|
+
for (const key in input) if (_isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
|
|
1651
|
+
}
|
|
1652
|
+
} else _addIssue(this, "type", dataset, config2);
|
|
1653
|
+
return dataset;
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1607
1657
|
function number(message) {
|
|
1608
1658
|
return {
|
|
1609
1659
|
kind: "schema",
|
|
@@ -2141,6 +2191,18 @@ settingsMigratorInternal.createMigrations({
|
|
|
2141
2191
|
})
|
|
2142
2192
|
]
|
|
2143
2193
|
});
|
|
2194
|
+
const connectionsMigratorInternal = createMigrator();
|
|
2195
|
+
const defaultConnections = connectionsMigratorInternal.createDefault({
|
|
2196
|
+
version: "1.0.0",
|
|
2197
|
+
connections: []
|
|
2198
|
+
});
|
|
2199
|
+
connectionsMigratorInternal.createMigrations({
|
|
2200
|
+
defaultValue: defaultConnections,
|
|
2201
|
+
migrations: [createMigration({
|
|
2202
|
+
version: "1.0.0",
|
|
2203
|
+
up: finalVersion
|
|
2204
|
+
})]
|
|
2205
|
+
});
|
|
2144
2206
|
const fileRepoMigratorInternal = createMigrator();
|
|
2145
2207
|
const defaultFileRepo = fileRepoMigratorInternal.createDefault({
|
|
2146
2208
|
version: "2.0.0",
|
|
@@ -2302,11 +2364,51 @@ const LEGACY_ID_MAP = {
|
|
|
2302
2364
|
};
|
|
2303
2365
|
const getStrictPluginId = (pluginId) => {
|
|
2304
2366
|
if (!pluginId) return pluginId;
|
|
2305
|
-
|
|
2306
|
-
if (pluginId.startsWith("@") || pluginId.includes("/") || pluginId.startsWith("pipelab-plugin-")) return pluginId;
|
|
2307
|
-
const prefixed = `@pipelab/plugin-${pluginId}`;
|
|
2308
|
-
return LEGACY_ID_MAP[prefixed] || prefixed;
|
|
2367
|
+
return LEGACY_ID_MAP[pluginId] || pluginId;
|
|
2309
2368
|
};
|
|
2369
|
+
//#endregion
|
|
2370
|
+
//#region ../../packages/shared/src/save-location.ts
|
|
2371
|
+
const SaveLocationInternalValidator = object({
|
|
2372
|
+
id: string(),
|
|
2373
|
+
project: string(),
|
|
2374
|
+
lastModified: string(),
|
|
2375
|
+
type: literal("internal"),
|
|
2376
|
+
configName: string()
|
|
2377
|
+
});
|
|
2378
|
+
const SaveLocationValidator = union([
|
|
2379
|
+
object({
|
|
2380
|
+
id: string(),
|
|
2381
|
+
project: string(),
|
|
2382
|
+
path: string(),
|
|
2383
|
+
lastModified: string(),
|
|
2384
|
+
type: literal("external"),
|
|
2385
|
+
summary: object({
|
|
2386
|
+
plugins: array(string()),
|
|
2387
|
+
name: string(),
|
|
2388
|
+
description: string()
|
|
2389
|
+
})
|
|
2390
|
+
}),
|
|
2391
|
+
SaveLocationInternalValidator,
|
|
2392
|
+
object({
|
|
2393
|
+
id: string(),
|
|
2394
|
+
project: string(),
|
|
2395
|
+
type: literal("pipelab-cloud")
|
|
2396
|
+
})
|
|
2397
|
+
]);
|
|
2398
|
+
object({
|
|
2399
|
+
version: literal("1.0.0"),
|
|
2400
|
+
data: optional(record(string(), SaveLocationValidator), {})
|
|
2401
|
+
});
|
|
2402
|
+
const FileRepoProjectValidatorV2$1 = object({
|
|
2403
|
+
id: string(),
|
|
2404
|
+
name: string(),
|
|
2405
|
+
description: string()
|
|
2406
|
+
});
|
|
2407
|
+
object({
|
|
2408
|
+
version: literal("2.0.0"),
|
|
2409
|
+
projects: array(FileRepoProjectValidatorV2$1),
|
|
2410
|
+
pipelines: optional(array(SaveLocationValidator), [])
|
|
2411
|
+
});
|
|
2310
2412
|
object({
|
|
2311
2413
|
cacheFolder: string(),
|
|
2312
2414
|
theme: union([literal("light"), literal("dark")]),
|
|
@@ -2458,6 +2560,17 @@ object({
|
|
|
2458
2560
|
})),
|
|
2459
2561
|
isInternalMigrationBannerClosed: optional(boolean(), false)
|
|
2460
2562
|
});
|
|
2563
|
+
const ConnectionValidator = looseObject({
|
|
2564
|
+
id: string(),
|
|
2565
|
+
pluginName: string(),
|
|
2566
|
+
name: string(),
|
|
2567
|
+
createdAt: string(),
|
|
2568
|
+
isDefault: boolean()
|
|
2569
|
+
});
|
|
2570
|
+
object({
|
|
2571
|
+
version: literal("1.0.0"),
|
|
2572
|
+
connections: array(ConnectionValidator)
|
|
2573
|
+
});
|
|
2461
2574
|
//#endregion
|
|
2462
2575
|
//#region ../../node_modules/tslog/dist/esm/prettyLogStyles.js
|
|
2463
2576
|
const prettyLogStyles = {
|
|
@@ -2978,7 +3091,7 @@ const useLogger = () => {
|
|
|
2978
3091
|
const OriginValidator = object({
|
|
2979
3092
|
pluginId: string(),
|
|
2980
3093
|
nodeId: string(),
|
|
2981
|
-
version: pipe(
|
|
3094
|
+
version: optional(pipe(string(), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent.")))
|
|
2982
3095
|
});
|
|
2983
3096
|
const BlockActionValidatorV1 = object({
|
|
2984
3097
|
type: literal("action"),
|
|
@@ -2991,7 +3104,7 @@ const EditorParamValidatorV3 = union([literal("simple"), literal("editor")]);
|
|
|
2991
3104
|
const BlockActionValidatorV3 = object({
|
|
2992
3105
|
type: literal("action"),
|
|
2993
3106
|
uid: string(),
|
|
2994
|
-
name: pipe(
|
|
3107
|
+
name: optional(pipe(string(), description("A custom name provided by the user"))),
|
|
2995
3108
|
disabled: optional(boolean()),
|
|
2996
3109
|
params: record(string(), object({
|
|
2997
3110
|
editor: EditorParamValidatorV3,
|
|
@@ -45305,35 +45418,6 @@ const createNetlifySiteParam = (value, tokenKey, definition) => {
|
|
|
45305
45418
|
};
|
|
45306
45419
|
};
|
|
45307
45420
|
//#endregion
|
|
45308
|
-
//#region ../../packages/shared/src/save-location.ts
|
|
45309
|
-
const SaveLocationInternalValidator = object({
|
|
45310
|
-
id: string(),
|
|
45311
|
-
project: string(),
|
|
45312
|
-
lastModified: string(),
|
|
45313
|
-
type: literal("internal"),
|
|
45314
|
-
configName: string()
|
|
45315
|
-
});
|
|
45316
|
-
const SaveLocationValidator = union([
|
|
45317
|
-
object({
|
|
45318
|
-
id: string(),
|
|
45319
|
-
project: string(),
|
|
45320
|
-
path: string(),
|
|
45321
|
-
lastModified: string(),
|
|
45322
|
-
type: literal("external"),
|
|
45323
|
-
summary: object({
|
|
45324
|
-
plugins: array(string()),
|
|
45325
|
-
name: string(),
|
|
45326
|
-
description: string()
|
|
45327
|
-
})
|
|
45328
|
-
}),
|
|
45329
|
-
SaveLocationInternalValidator,
|
|
45330
|
-
object({
|
|
45331
|
-
id: string(),
|
|
45332
|
-
project: string(),
|
|
45333
|
-
type: literal("pipelab-cloud")
|
|
45334
|
-
})
|
|
45335
|
-
]);
|
|
45336
|
-
//#endregion
|
|
45337
45421
|
//#region ../../packages/shared/src/websocket.types.ts
|
|
45338
45422
|
var WebSocketError = class extends Error {
|
|
45339
45423
|
constructor(message, code, requestId) {
|
|
@@ -45350,20 +45434,6 @@ object({
|
|
|
45350
45434
|
version: literal("1.0.0"),
|
|
45351
45435
|
data: optional(record(string(), SaveLocationValidator), {})
|
|
45352
45436
|
});
|
|
45353
|
-
const FileRepoProjectValidatorV2$1 = object({
|
|
45354
|
-
id: string(),
|
|
45355
|
-
name: string(),
|
|
45356
|
-
description: string()
|
|
45357
|
-
});
|
|
45358
|
-
object({
|
|
45359
|
-
version: literal("2.0.0"),
|
|
45360
|
-
projects: array(FileRepoProjectValidatorV2$1),
|
|
45361
|
-
pipelines: optional(array(SaveLocationValidator), [])
|
|
45362
|
-
});
|
|
45363
|
-
object({
|
|
45364
|
-
version: literal("1.0.0"),
|
|
45365
|
-
data: optional(record(string(), SaveLocationValidator), {})
|
|
45366
|
-
});
|
|
45367
45437
|
const FileRepoProjectValidatorV2 = object({
|
|
45368
45438
|
id: string(),
|
|
45369
45439
|
name: string(),
|
|
@@ -45375,8 +45445,14 @@ object({
|
|
|
45375
45445
|
pipelines: optional(array(SaveLocationValidator), [])
|
|
45376
45446
|
});
|
|
45377
45447
|
//#endregion
|
|
45448
|
+
//#region ../../packages/constants/src/index.ts
|
|
45449
|
+
const websocketPort = 33753;
|
|
45450
|
+
const DEFAULT_NODE_VERSION = "24.14.1";
|
|
45451
|
+
const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
45452
|
+
//#endregion
|
|
45378
45453
|
//#region ../../packages/core-node/src/context.ts
|
|
45379
|
-
const
|
|
45454
|
+
const metaUrl = require("url").pathToFileURL(__filename).href;
|
|
45455
|
+
const _dirname = typeof __dirname !== "undefined" ? __dirname : metaUrl ? (0, node_path.dirname)((0, node_url.fileURLToPath)(metaUrl)) : process.cwd();
|
|
45380
45456
|
const isDev = process.env.NODE_ENV === "development";
|
|
45381
45457
|
/**
|
|
45382
45458
|
* Finds the monorepo root by looking for pnpm-workspace.yaml.
|
|
@@ -48948,9 +49024,6 @@ const useAPI = () => {
|
|
|
48948
49024
|
};
|
|
48949
49025
|
};
|
|
48950
49026
|
//#endregion
|
|
48951
|
-
//#region ../../packages/constants/src/index.ts
|
|
48952
|
-
const websocketPort = 33753;
|
|
48953
|
-
//#endregion
|
|
48954
49027
|
//#region ../../packages/core-node/src/websocket-server.ts
|
|
48955
49028
|
var WebSocketServer = class {
|
|
48956
49029
|
wss = null;
|
|
@@ -59959,14 +60032,14 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
59959
60032
|
const assert$1 = require("assert");
|
|
59960
60033
|
const normalize = require_normalize_unicode();
|
|
59961
60034
|
const stripSlashes = require_strip_trailing_slashes();
|
|
59962
|
-
const { join: join$
|
|
60035
|
+
const { join: join$19 } = require("path");
|
|
59963
60036
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
59964
60037
|
module.exports = () => {
|
|
59965
60038
|
const queues = /* @__PURE__ */ new Map();
|
|
59966
60039
|
const reservations = /* @__PURE__ */ new Map();
|
|
59967
60040
|
const getDirs = (path$62) => {
|
|
59968
60041
|
return path$62.split("/").slice(0, -1).reduce((set, path$63) => {
|
|
59969
|
-
if (set.length) path$63 = join$
|
|
60042
|
+
if (set.length) path$63 = join$19(set[set.length - 1], path$63);
|
|
59970
60043
|
set.push(path$63 || "/");
|
|
59971
60044
|
return set;
|
|
59972
60045
|
}, []);
|
|
@@ -60020,7 +60093,7 @@ var require_path_reservations = /* @__PURE__ */ require_chunk.__commonJSMin(((ex
|
|
|
60020
60093
|
};
|
|
60021
60094
|
const reserve = (paths, fn) => {
|
|
60022
60095
|
paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
60023
|
-
return stripSlashes(join$
|
|
60096
|
+
return stripSlashes(join$19(normalize(p))).toLowerCase();
|
|
60024
60097
|
});
|
|
60025
60098
|
const dirs = new Set(paths.map((path$67) => getDirs(path$67)).reduce((a, b) => a.concat(b)));
|
|
60026
60099
|
reservations.set(fn, {
|
|
@@ -89358,14 +89431,6 @@ var import_tar = /* @__PURE__ */ require_chunk.__toESM(require_tar$1(), 1);
|
|
|
89358
89431
|
var import_yauzl = /* @__PURE__ */ require_chunk.__toESM(require_yauzl(), 1);
|
|
89359
89432
|
require_archiver();
|
|
89360
89433
|
/**
|
|
89361
|
-
* Generates a unique temporary folder.
|
|
89362
|
-
*/
|
|
89363
|
-
const generateTempFolder = async (base) => {
|
|
89364
|
-
const targetBase = base || (0, node_os.tmpdir)();
|
|
89365
|
-
await (0, node_fs_promises.mkdir)(targetBase, { recursive: true });
|
|
89366
|
-
return await (0, node_fs_promises.mkdtemp)((0, node_path.join)(await (0, node_fs_promises.realpath)(targetBase), "pipelab-"));
|
|
89367
|
-
};
|
|
89368
|
-
/**
|
|
89369
89434
|
* Extracts a .tar.gz archive.
|
|
89370
89435
|
*/
|
|
89371
89436
|
async function extractTarGz(archivePath, destinationDir) {
|
|
@@ -95835,7 +95900,7 @@ var require_index_min$3 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
95835
95900
|
//#region ../../node_modules/@npmcli/promise-spawn/node_modules/which/lib/index.js
|
|
95836
95901
|
var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
95837
95902
|
const { isexe, sync: isexeSync } = require_index_min$3();
|
|
95838
|
-
const { join: join$
|
|
95903
|
+
const { join: join$16, delimiter: delimiter$3, sep: sep$4, posix: posix$1 } = require("path");
|
|
95839
95904
|
const isWindows = process.platform === "win32";
|
|
95840
95905
|
/* istanbul ignore next */
|
|
95841
95906
|
const rSlash = new RegExp(`[${posix$1.sep}${sep$4 === posix$1.sep ? "" : sep$4}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -95865,7 +95930,7 @@ var require_lib$27 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
95865
95930
|
};
|
|
95866
95931
|
const getPathPart = (raw, cmd) => {
|
|
95867
95932
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
95868
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
95933
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$16(pathPart, cmd);
|
|
95869
95934
|
};
|
|
95870
95935
|
const which = async (cmd, opt = {}) => {
|
|
95871
95936
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -96614,7 +96679,7 @@ var require_index_min$2 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports)
|
|
|
96614
96679
|
//#region ../../node_modules/@npmcli/git/node_modules/which/lib/index.js
|
|
96615
96680
|
var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
96616
96681
|
const { isexe, sync: isexeSync } = require_index_min$2();
|
|
96617
|
-
const { join: join$
|
|
96682
|
+
const { join: join$15, delimiter: delimiter$2, sep: sep$3, posix } = require("path");
|
|
96618
96683
|
const isWindows = process.platform === "win32";
|
|
96619
96684
|
/* istanbul ignore next */
|
|
96620
96685
|
const rSlash = new RegExp(`[${posix.sep}${sep$3 === posix.sep ? "" : sep$3}]`.replace(/(\\)/g, "\\$1"));
|
|
@@ -96644,7 +96709,7 @@ var require_lib$24 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
96644
96709
|
};
|
|
96645
96710
|
const getPathPart = (raw, cmd) => {
|
|
96646
96711
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
96647
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$
|
|
96712
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join$15(pathPart, cmd);
|
|
96648
96713
|
};
|
|
96649
96714
|
const which = async (cmd, opt = {}) => {
|
|
96650
96715
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -98542,7 +98607,7 @@ var require_lib$22 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98542
98607
|
//#endregion
|
|
98543
98608
|
//#region ../../node_modules/npm-normalize-package-bin/lib/index.js
|
|
98544
98609
|
var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
98545
|
-
const { join: join$
|
|
98610
|
+
const { join: join$14, basename: basename$5 } = require("path");
|
|
98546
98611
|
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);
|
|
98547
98612
|
const normalizeString = (pkg) => {
|
|
98548
98613
|
if (!pkg.name) return removeBin(pkg);
|
|
@@ -98565,9 +98630,9 @@ var require_lib$21 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
98565
98630
|
const clean = {};
|
|
98566
98631
|
let hasBins = false;
|
|
98567
98632
|
Object.keys(orig).forEach((binKey) => {
|
|
98568
|
-
const base = join$
|
|
98633
|
+
const base = join$14("/", basename$5(binKey.replace(/\\|:/g, "/"))).slice(1);
|
|
98569
98634
|
if (typeof orig[binKey] !== "string" || !base) return;
|
|
98570
|
-
const binTarget = join$
|
|
98635
|
+
const binTarget = join$14("/", orig[binKey].replace(/\\/g, "/")).replace(/\\/g, "/").slice(1);
|
|
98571
98636
|
if (!binTarget) return;
|
|
98572
98637
|
clean[base] = binTarget;
|
|
98573
98638
|
hasBins = true;
|
|
@@ -100640,7 +100705,7 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100640
100705
|
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();
|
|
100641
100706
|
const { constants: { errno: { EEXIST, EISDIR, EINVAL, ENOTDIR } } } = require("os");
|
|
100642
100707
|
const { chmod: chmod$2, copyFile, lstat: lstat$2, mkdir: mkdir$9, readdir: readdir$6, readlink, stat: stat$5, symlink, unlink, utimes } = require("fs/promises");
|
|
100643
|
-
const { dirname: dirname$8, isAbsolute: isAbsolute$2, join: join$
|
|
100708
|
+
const { dirname: dirname$8, isAbsolute: isAbsolute$2, join: join$13, parse, resolve: resolve$10, sep: sep$2, toNamespacedPath } = require("path");
|
|
100644
100709
|
const { fileURLToPath } = require("url");
|
|
100645
100710
|
const defaultOptions = {
|
|
100646
100711
|
dereference: false,
|
|
@@ -100849,8 +100914,8 @@ var require_polyfill = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, mo
|
|
|
100849
100914
|
const dir = await readdir$6(src);
|
|
100850
100915
|
for (let i = 0; i < dir.length; i++) {
|
|
100851
100916
|
const item = dir[i];
|
|
100852
|
-
const srcItem = join$
|
|
100853
|
-
const destItem = join$
|
|
100917
|
+
const srcItem = join$13(src, item);
|
|
100918
|
+
const destItem = join$13(dest, item);
|
|
100854
100919
|
const { destStat } = await checkPaths(srcItem, destItem, opts);
|
|
100855
100920
|
await startCopy(destStat, srcItem, destItem, opts);
|
|
100856
100921
|
}
|
|
@@ -100914,13 +100979,13 @@ var require_cp = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module)
|
|
|
100914
100979
|
//#endregion
|
|
100915
100980
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/with-temp-dir.js
|
|
100916
100981
|
var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100917
|
-
const { join: join$
|
|
100982
|
+
const { join: join$12, sep: sep$1 } = require("path");
|
|
100918
100983
|
const getOptions = require_get_options();
|
|
100919
100984
|
const { mkdir: mkdir$8, mkdtemp, rm: rm$7 } = require("fs/promises");
|
|
100920
100985
|
const withTempDir = async (root, fn, opts) => {
|
|
100921
100986
|
const options = getOptions(opts, { copy: ["tmpPrefix"] });
|
|
100922
100987
|
await mkdir$8(root, { recursive: true });
|
|
100923
|
-
const target = await mkdtemp(join$
|
|
100988
|
+
const target = await mkdtemp(join$12(`${root}${sep$1}`, options.tmpPrefix || ""));
|
|
100924
100989
|
let err;
|
|
100925
100990
|
let result;
|
|
100926
100991
|
try {
|
|
@@ -100943,10 +101008,10 @@ var require_with_temp_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((export
|
|
|
100943
101008
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/readdir-scoped.js
|
|
100944
101009
|
var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100945
101010
|
const { readdir: readdir$5 } = require("fs/promises");
|
|
100946
|
-
const { join: join$
|
|
101011
|
+
const { join: join$11 } = require("path");
|
|
100947
101012
|
const readdirScoped = async (dir) => {
|
|
100948
101013
|
const results = [];
|
|
100949
|
-
for (const item of await readdir$5(dir)) if (item.startsWith("@")) for (const scopedItem of await readdir$5(join$
|
|
101014
|
+
for (const item of await readdir$5(dir)) if (item.startsWith("@")) for (const scopedItem of await readdir$5(join$11(dir, item))) results.push(join$11(item, scopedItem));
|
|
100950
101015
|
else results.push(item);
|
|
100951
101016
|
return results;
|
|
100952
101017
|
};
|
|
@@ -100955,7 +101020,7 @@ var require_readdir_scoped = /* @__PURE__ */ require_chunk.__commonJSMin(((expor
|
|
|
100955
101020
|
//#endregion
|
|
100956
101021
|
//#region ../../node_modules/cacache/node_modules/@npmcli/fs/lib/move-file.js
|
|
100957
101022
|
var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
100958
|
-
const { dirname: dirname$7, join: join$
|
|
101023
|
+
const { dirname: dirname$7, join: join$10, resolve: resolve$9, relative: relative$1, isAbsolute: isAbsolute$1 } = require("path");
|
|
100959
101024
|
const fs$12 = require("fs/promises");
|
|
100960
101025
|
const pathExists = async (path$54) => {
|
|
100961
101026
|
try {
|
|
@@ -100980,7 +101045,7 @@ var require_move_file = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
100980
101045
|
const sourceStat = await fs$12.lstat(source);
|
|
100981
101046
|
if (sourceStat.isDirectory()) {
|
|
100982
101047
|
const files = await fs$12.readdir(source);
|
|
100983
|
-
await Promise.all(files.map((file) => moveFile(join$
|
|
101048
|
+
await Promise.all(files.map((file) => moveFile(join$10(source, file), join$10(destination, file), options, false, symlinks)));
|
|
100984
101049
|
} else if (sourceStat.isSymbolicLink()) symlinks.push({
|
|
100985
101050
|
source,
|
|
100986
101051
|
destination
|
|
@@ -110519,9 +110584,9 @@ var require_protected = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, m
|
|
|
110519
110584
|
//#region ../../node_modules/pacote/lib/util/cache-dir.js
|
|
110520
110585
|
var require_cache_dir = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
110521
110586
|
const { resolve: resolve$7 } = require("node:path");
|
|
110522
|
-
const { tmpdir
|
|
110587
|
+
const { tmpdir, homedir } = require("node:os");
|
|
110523
110588
|
module.exports = (fakePlatform = false) => {
|
|
110524
|
-
const temp = tmpdir
|
|
110589
|
+
const temp = tmpdir();
|
|
110525
110590
|
const uidOrPid = process.getuid ? process.getuid() : process.pid;
|
|
110526
110591
|
const home = homedir() || resolve$7(temp, "npm-" + uidOrPid);
|
|
110527
110592
|
const platform = fakePlatform || process.platform;
|
|
@@ -112343,7 +112408,7 @@ var require_lib$10 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
|
|
|
112343
112408
|
var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
|
|
112344
112409
|
const { Walker: IgnoreWalker } = require_lib$10();
|
|
112345
112410
|
const { lstatSync: lstat$1, readFileSync: readFile$4 } = require("fs");
|
|
112346
|
-
const { basename: basename$3, dirname: dirname$5, extname: extname$1, join: join$
|
|
112411
|
+
const { basename: basename$3, dirname: dirname$5, extname: extname$1, join: join$9, relative, resolve: resolve$6, sep } = require("path");
|
|
112347
112412
|
const { log } = require_lib$29();
|
|
112348
112413
|
const defaultRules = Symbol("npm-packlist.rules.default");
|
|
112349
112414
|
const strictRules = Symbol("npm-packlist.rules.strict");
|
|
@@ -112376,7 +112441,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112376
112441
|
const normalizePath = (path$46) => path$46.split("\\").join("/");
|
|
112377
112442
|
const readOutOfTreeIgnoreFiles = (root, rel, result = []) => {
|
|
112378
112443
|
for (const file of [".npmignore", ".gitignore"]) try {
|
|
112379
|
-
const ignoreContent = readFile$4(join$
|
|
112444
|
+
const ignoreContent = readFile$4(join$9(root, file), { encoding: "utf8" });
|
|
112380
112445
|
result.push(ignoreContent);
|
|
112381
112446
|
break;
|
|
112382
112447
|
} catch (err) {
|
|
@@ -112385,8 +112450,8 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112385
112450
|
}
|
|
112386
112451
|
if (!rel) return result;
|
|
112387
112452
|
const firstRel = rel.split(sep, 1)[0];
|
|
112388
|
-
const newRoot = join$
|
|
112389
|
-
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$
|
|
112453
|
+
const newRoot = join$9(root, firstRel);
|
|
112454
|
+
return readOutOfTreeIgnoreFiles(newRoot, relative(newRoot, join$9(root, rel)), result);
|
|
112390
112455
|
};
|
|
112391
112456
|
var PackWalker = class PackWalker extends IgnoreWalker {
|
|
112392
112457
|
constructor(tree, opts) {
|
|
@@ -112453,7 +112518,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112453
112518
|
let ignoreFiles = null;
|
|
112454
112519
|
if (this.tree.workspaces) {
|
|
112455
112520
|
const workspaceDirs = [...this.tree.workspaces.values()].map((dir) => dir.replace(/\\/g, "/"));
|
|
112456
|
-
const entryPath = join$
|
|
112521
|
+
const entryPath = join$9(this.path, entry).replace(/\\/g, "/");
|
|
112457
112522
|
if (workspaceDirs.includes(entryPath)) ignoreFiles = [
|
|
112458
112523
|
defaultRules,
|
|
112459
112524
|
"package.json",
|
|
@@ -112513,7 +112578,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112513
112578
|
if (file.endsWith("/*")) file += "*";
|
|
112514
112579
|
const inverse = `!${file}`;
|
|
112515
112580
|
try {
|
|
112516
|
-
const stat = lstat$1(join$
|
|
112581
|
+
const stat = lstat$1(join$9(this.path, file.replace(/^!+/, "")).replace(/\\/g, "/"));
|
|
112517
112582
|
if (stat.isFile()) {
|
|
112518
112583
|
strict.unshift(inverse);
|
|
112519
112584
|
this.requiredFiles.push(file.startsWith("/") ? file.slice(1) : file);
|
|
@@ -112570,7 +112635,7 @@ var require_lib$9 = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modul
|
|
|
112570
112635
|
walker.start();
|
|
112571
112636
|
});
|
|
112572
112637
|
const relativeFrom = relative(this.root, walker.path);
|
|
112573
|
-
for (const file of bundled) this.result.add(join$
|
|
112638
|
+
for (const file of bundled) this.result.add(join$9(relativeFrom, file).replace(/\\/g, "/"));
|
|
112574
112639
|
}
|
|
112575
112640
|
}
|
|
112576
112641
|
};
|
|
@@ -151055,8 +151120,6 @@ const sendStartupProgress = (message) => {
|
|
|
151055
151120
|
};
|
|
151056
151121
|
//#endregion
|
|
151057
151122
|
//#region ../../packages/core-node/src/utils/remote.ts
|
|
151058
|
-
const DEFAULT_NODE_VERSION = "24.14.1";
|
|
151059
|
-
const DEFAULT_PNPM_VERSION = "10.12.0";
|
|
151060
151123
|
function isPackageComplete(packageDir) {
|
|
151061
151124
|
return (0, node_fs.existsSync)((0, node_path.join)(packageDir, "package.json"));
|
|
151062
151125
|
}
|
|
@@ -151248,7 +151311,7 @@ async function ensureNodeJS(context, version = DEFAULT_NODE_VERSION) {
|
|
|
151248
151311
|
const extension = isWindows ? "zip" : "tar.gz";
|
|
151249
151312
|
const fileName = `node-v${version}-${platform === "osx" ? "darwin" : platform}-${arch}.${extension}`;
|
|
151250
151313
|
const downloadUrl = `https://nodejs.org/dist/v${version}/${fileName}`;
|
|
151251
|
-
const tempDir = await
|
|
151314
|
+
const tempDir = await context.createTempFolder("node-download-");
|
|
151252
151315
|
const archivePath = (0, node_path.join)(tempDir, fileName);
|
|
151253
151316
|
sendStartupProgress(`Downloading Node.js v${version}...`);
|
|
151254
151317
|
console.log(`Downloading Node.js from ${downloadUrl}...`);
|
|
@@ -151458,7 +151521,7 @@ async function resolveEntryPoint(packageDir, packageName) {
|
|
|
151458
151521
|
}
|
|
151459
151522
|
//#endregion
|
|
151460
151523
|
//#region ../../packages/core-node/src/handler-func.ts
|
|
151461
|
-
const { join: join$
|
|
151524
|
+
const { join: join$7 } = node_path.default;
|
|
151462
151525
|
//#endregion
|
|
151463
151526
|
//#region ../../packages/core-node/src/handlers/plugins.ts
|
|
151464
151527
|
const localPluginsMap = /* @__PURE__ */ new Map();
|
|
@@ -151570,71 +151633,82 @@ const uploadToNetlifyRunner = createActionRunner(async ({ log, inputs, cwd, abor
|
|
|
151570
151633
|
});
|
|
151571
151634
|
//#endregion
|
|
151572
151635
|
//#region src/index.ts
|
|
151573
|
-
var src_default = createNodeDefinition({
|
|
151574
|
-
|
|
151575
|
-
|
|
151576
|
-
|
|
151577
|
-
|
|
151578
|
-
|
|
151579
|
-
|
|
151580
|
-
|
|
151581
|
-
|
|
151582
|
-
|
|
151583
|
-
|
|
151584
|
-
|
|
151585
|
-
|
|
151586
|
-
|
|
151587
|
-
|
|
151588
|
-
|
|
151589
|
-
|
|
151590
|
-
|
|
151591
|
-
|
|
151592
|
-
|
|
151593
|
-
|
|
151594
|
-
|
|
151595
|
-
|
|
151596
|
-
|
|
151597
|
-
|
|
151598
|
-
|
|
151599
|
-
|
|
151600
|
-
|
|
151601
|
-
|
|
151602
|
-
|
|
151603
|
-
|
|
151604
|
-
|
|
151605
|
-
|
|
151606
|
-
|
|
151607
|
-
|
|
151608
|
-
|
|
151609
|
-
|
|
151610
|
-
|
|
151611
|
-
|
|
151612
|
-
|
|
151613
|
-
|
|
151614
|
-
|
|
151615
|
-
|
|
151616
|
-
|
|
151617
|
-
|
|
151618
|
-
|
|
151619
|
-
|
|
151620
|
-
|
|
151621
|
-
|
|
151622
|
-
|
|
151623
|
-
|
|
151624
|
-
|
|
151625
|
-
|
|
151626
|
-
|
|
151627
|
-
|
|
151628
|
-
|
|
151629
|
-
|
|
151630
|
-
|
|
151631
|
-
|
|
151632
|
-
|
|
151633
|
-
|
|
151634
|
-
|
|
151635
|
-
}
|
|
151636
|
-
|
|
151637
|
-
|
|
151638
|
-
|
|
151636
|
+
var src_default = createNodeDefinition({
|
|
151637
|
+
nodes: [{
|
|
151638
|
+
node: createAction({
|
|
151639
|
+
id: "netlify-build",
|
|
151640
|
+
name: "Build Netlify site",
|
|
151641
|
+
description: "",
|
|
151642
|
+
icon: "",
|
|
151643
|
+
displayString: "`Build ${fmt.param(params['input-folder'], 'primary', 'No path selected')}`",
|
|
151644
|
+
meta: {},
|
|
151645
|
+
params: {
|
|
151646
|
+
"input-folder": createPathParam("", {
|
|
151647
|
+
required: true,
|
|
151648
|
+
label: "Path to the folder to upload to netlify",
|
|
151649
|
+
control: {
|
|
151650
|
+
type: "path",
|
|
151651
|
+
options: { properties: ["openDirectory"] }
|
|
151652
|
+
}
|
|
151653
|
+
}),
|
|
151654
|
+
token: createStringParam("", {
|
|
151655
|
+
required: true,
|
|
151656
|
+
label: "Token"
|
|
151657
|
+
})
|
|
151658
|
+
},
|
|
151659
|
+
outputs: {}
|
|
151660
|
+
}),
|
|
151661
|
+
runner: createActionRunner(async ({ log, inputs, cwd, abortSignal, paths }) => {
|
|
151662
|
+
log("Building netlify site");
|
|
151663
|
+
const { node } = paths;
|
|
151664
|
+
const buildDir = (0, node_path.join)(cwd, "build");
|
|
151665
|
+
const inputFolder = inputs["input-folder"];
|
|
151666
|
+
if (!await fileExists((0, node_path.join)(inputFolder, "package.json"))) throw new Error("No package.json found in input folder");
|
|
151667
|
+
await (0, node_fs_promises.cp)(inputs["input-folder"], buildDir, { recursive: true });
|
|
151668
|
+
const netlifyDir = (0, node_path.join)(buildDir, ".netlify");
|
|
151669
|
+
const netlifyState = (0, node_path.join)(netlifyDir, "state.json");
|
|
151670
|
+
await (0, node_fs_promises.mkdir)(netlifyDir, { recursive: true });
|
|
151671
|
+
await (0, node_fs_promises.writeFile)(netlifyState, `{ "siteId": "${inputs.site}" }`, "utf-8");
|
|
151672
|
+
const { all: buildOut } = await runPnpm(buildDir, {
|
|
151673
|
+
args: [
|
|
151674
|
+
"--package",
|
|
151675
|
+
"netlify-cli",
|
|
151676
|
+
"dlx",
|
|
151677
|
+
"netlify",
|
|
151678
|
+
"build"
|
|
151679
|
+
],
|
|
151680
|
+
extraEnv: { NETLIFY_AUTH_TOKEN: inputs.token },
|
|
151681
|
+
signal: abortSignal
|
|
151682
|
+
});
|
|
151683
|
+
if (buildOut) log(buildOut);
|
|
151684
|
+
const { all: deployOut } = await runPnpm(buildDir, {
|
|
151685
|
+
args: [
|
|
151686
|
+
"--package",
|
|
151687
|
+
"netlify-cli",
|
|
151688
|
+
"dlx",
|
|
151689
|
+
"netlify",
|
|
151690
|
+
"deploy",
|
|
151691
|
+
"--prod"
|
|
151692
|
+
],
|
|
151693
|
+
extraEnv: { NETLIFY_AUTH_TOKEN: inputs.token },
|
|
151694
|
+
signal: abortSignal
|
|
151695
|
+
});
|
|
151696
|
+
if (deployOut) log(deployOut);
|
|
151697
|
+
log("Uploaded to netlify");
|
|
151698
|
+
})
|
|
151699
|
+
}, {
|
|
151700
|
+
node: uploadToNetlify,
|
|
151701
|
+
runner: uploadToNetlifyRunner
|
|
151702
|
+
}],
|
|
151703
|
+
integrations: [{
|
|
151704
|
+
name: "Netlify Account",
|
|
151705
|
+
fields: [{
|
|
151706
|
+
key: "apiKey",
|
|
151707
|
+
label: "Personal Access Token",
|
|
151708
|
+
type: "password",
|
|
151709
|
+
placeholder: "netlify API token"
|
|
151710
|
+
}]
|
|
151711
|
+
}]
|
|
151712
|
+
});
|
|
151639
151713
|
//#endregion
|
|
151640
151714
|
module.exports = src_default;
|