@pipelab/cli 2.0.0-beta.2 → 2.0.0-beta.21

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.
@@ -4,29 +4,21 @@ import { hostname } from "os";
4
4
  import { normalize } from "path";
5
5
  import { formatWithOptions, types } from "util";
6
6
  //#region ../../packages/migration/src/models/createMigration.ts
7
- function createMigration(migration) {
7
+ function createMigration$1(migration) {
8
8
  return {
9
9
  version: migration.version,
10
10
  up: async (state, nextVersion) => {
11
- const newState = await migration.up(state, nextVersion);
12
- newState.version = nextVersion;
13
- return newState;
14
- },
15
- down: async (state, nextVersion) => {
16
- const newState = await migration.down(state, nextVersion);
11
+ const newState = migration.up ? await migration.up(state, nextVersion) : state;
17
12
  newState.version = nextVersion;
18
13
  return newState;
19
14
  }
20
15
  };
21
16
  }
22
- const initialVersion = () => {
23
- throw new Error("Unable to go down on the initial version!");
24
- };
25
17
  const finalVersion = () => {
26
18
  throw new Error("Unable to go up on the final version!");
27
19
  };
28
20
  //#endregion
29
- //#region ../../node_modules/semver/internal/constants.js
21
+ //#region ../../packages/migration/node_modules/semver/internal/constants.js
30
22
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
31
23
  const SEMVER_SPEC_VERSION = "2.0.0";
32
24
  const MAX_LENGTH = 256;
@@ -51,12 +43,12 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
51
43
  };
52
44
  }));
53
45
  //#endregion
54
- //#region ../../node_modules/semver/internal/debug.js
46
+ //#region ../../packages/migration/node_modules/semver/internal/debug.js
55
47
  var require_debug = /* @__PURE__ */ __commonJSMin(((exports, module) => {
56
48
  module.exports = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {};
57
49
  }));
58
50
  //#endregion
59
- //#region ../../node_modules/semver/internal/re.js
51
+ //#region ../../packages/migration/node_modules/semver/internal/re.js
60
52
  var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
61
53
  const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH } = require_constants();
62
54
  const debug = require_debug();
@@ -135,7 +127,7 @@ var require_re = /* @__PURE__ */ __commonJSMin(((exports, module) => {
135
127
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
136
128
  }));
137
129
  //#endregion
138
- //#region ../../node_modules/semver/internal/parse-options.js
130
+ //#region ../../packages/migration/node_modules/semver/internal/parse-options.js
139
131
  var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
140
132
  const looseOption = Object.freeze({ loose: true });
141
133
  const emptyOpts = Object.freeze({});
@@ -147,7 +139,7 @@ var require_parse_options = /* @__PURE__ */ __commonJSMin(((exports, module) =>
147
139
  module.exports = parseOptions;
148
140
  }));
149
141
  //#endregion
150
- //#region ../../node_modules/semver/internal/identifiers.js
142
+ //#region ../../packages/migration/node_modules/semver/internal/identifiers.js
151
143
  var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
152
144
  const numeric = /^[0-9]+$/;
153
145
  const compareIdentifiers = (a, b) => {
@@ -167,7 +159,7 @@ var require_identifiers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
167
159
  };
168
160
  }));
169
161
  //#endregion
170
- //#region ../../node_modules/semver/classes/semver.js
162
+ //#region ../../packages/migration/node_modules/semver/classes/semver.js
171
163
  var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
172
164
  const debug = require_debug();
173
165
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
@@ -345,7 +337,7 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
345
337
  };
346
338
  }));
347
339
  //#endregion
348
- //#region ../../node_modules/semver/functions/parse.js
340
+ //#region ../../packages/migration/node_modules/semver/functions/parse.js
349
341
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
350
342
  const SemVer = require_semver$1();
351
343
  const parse = (version, options, throwErrors = false) => {
@@ -360,7 +352,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
360
352
  module.exports = parse;
361
353
  }));
362
354
  //#endregion
363
- //#region ../../node_modules/semver/functions/valid.js
355
+ //#region ../../packages/migration/node_modules/semver/functions/valid.js
364
356
  var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
365
357
  const parse = require_parse();
366
358
  const valid = (version, options) => {
@@ -370,7 +362,7 @@ var require_valid$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
370
362
  module.exports = valid;
371
363
  }));
372
364
  //#endregion
373
- //#region ../../node_modules/semver/functions/clean.js
365
+ //#region ../../packages/migration/node_modules/semver/functions/clean.js
374
366
  var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
375
367
  const parse = require_parse();
376
368
  const clean = (version, options) => {
@@ -380,7 +372,7 @@ var require_clean = /* @__PURE__ */ __commonJSMin(((exports, module) => {
380
372
  module.exports = clean;
381
373
  }));
382
374
  //#endregion
383
- //#region ../../node_modules/semver/functions/inc.js
375
+ //#region ../../packages/migration/node_modules/semver/functions/inc.js
384
376
  var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
385
377
  const SemVer = require_semver$1();
386
378
  const inc = (version, release, options, identifier, identifierBase) => {
@@ -398,7 +390,7 @@ var require_inc = /* @__PURE__ */ __commonJSMin(((exports, module) => {
398
390
  module.exports = inc;
399
391
  }));
400
392
  //#endregion
401
- //#region ../../node_modules/semver/functions/diff.js
393
+ //#region ../../packages/migration/node_modules/semver/functions/diff.js
402
394
  var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
403
395
  const parse = require_parse();
404
396
  const diff = (version1, version2) => {
@@ -426,28 +418,28 @@ var require_diff = /* @__PURE__ */ __commonJSMin(((exports, module) => {
426
418
  module.exports = diff;
427
419
  }));
428
420
  //#endregion
429
- //#region ../../node_modules/semver/functions/major.js
421
+ //#region ../../packages/migration/node_modules/semver/functions/major.js
430
422
  var require_major = /* @__PURE__ */ __commonJSMin(((exports, module) => {
431
423
  const SemVer = require_semver$1();
432
424
  const major = (a, loose) => new SemVer(a, loose).major;
433
425
  module.exports = major;
434
426
  }));
435
427
  //#endregion
436
- //#region ../../node_modules/semver/functions/minor.js
428
+ //#region ../../packages/migration/node_modules/semver/functions/minor.js
437
429
  var require_minor = /* @__PURE__ */ __commonJSMin(((exports, module) => {
438
430
  const SemVer = require_semver$1();
439
431
  const minor = (a, loose) => new SemVer(a, loose).minor;
440
432
  module.exports = minor;
441
433
  }));
442
434
  //#endregion
443
- //#region ../../node_modules/semver/functions/patch.js
435
+ //#region ../../packages/migration/node_modules/semver/functions/patch.js
444
436
  var require_patch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
445
437
  const SemVer = require_semver$1();
446
438
  const patch = (a, loose) => new SemVer(a, loose).patch;
447
439
  module.exports = patch;
448
440
  }));
449
441
  //#endregion
450
- //#region ../../node_modules/semver/functions/prerelease.js
442
+ //#region ../../packages/migration/node_modules/semver/functions/prerelease.js
451
443
  var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
452
444
  const parse = require_parse();
453
445
  const prerelease = (version, options) => {
@@ -457,28 +449,28 @@ var require_prerelease = /* @__PURE__ */ __commonJSMin(((exports, module) => {
457
449
  module.exports = prerelease;
458
450
  }));
459
451
  //#endregion
460
- //#region ../../node_modules/semver/functions/compare.js
452
+ //#region ../../packages/migration/node_modules/semver/functions/compare.js
461
453
  var require_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
462
454
  const SemVer = require_semver$1();
463
455
  const compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
464
456
  module.exports = compare;
465
457
  }));
466
458
  //#endregion
467
- //#region ../../node_modules/semver/functions/rcompare.js
459
+ //#region ../../packages/migration/node_modules/semver/functions/rcompare.js
468
460
  var require_rcompare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
469
461
  const compare = require_compare();
470
462
  const rcompare = (a, b, loose) => compare(b, a, loose);
471
463
  module.exports = rcompare;
472
464
  }));
473
465
  //#endregion
474
- //#region ../../node_modules/semver/functions/compare-loose.js
466
+ //#region ../../packages/migration/node_modules/semver/functions/compare-loose.js
475
467
  var require_compare_loose = /* @__PURE__ */ __commonJSMin(((exports, module) => {
476
468
  const compare = require_compare();
477
469
  const compareLoose = (a, b) => compare(a, b, true);
478
470
  module.exports = compareLoose;
479
471
  }));
480
472
  //#endregion
481
- //#region ../../node_modules/semver/functions/compare-build.js
473
+ //#region ../../packages/migration/node_modules/semver/functions/compare-build.js
482
474
  var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) => {
483
475
  const SemVer = require_semver$1();
484
476
  const compareBuild = (a, b, loose) => {
@@ -489,63 +481,63 @@ var require_compare_build = /* @__PURE__ */ __commonJSMin(((exports, module) =>
489
481
  module.exports = compareBuild;
490
482
  }));
491
483
  //#endregion
492
- //#region ../../node_modules/semver/functions/sort.js
484
+ //#region ../../packages/migration/node_modules/semver/functions/sort.js
493
485
  var require_sort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
494
486
  const compareBuild = require_compare_build();
495
487
  const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
496
488
  module.exports = sort;
497
489
  }));
498
490
  //#endregion
499
- //#region ../../node_modules/semver/functions/rsort.js
491
+ //#region ../../packages/migration/node_modules/semver/functions/rsort.js
500
492
  var require_rsort = /* @__PURE__ */ __commonJSMin(((exports, module) => {
501
493
  const compareBuild = require_compare_build();
502
494
  const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
503
495
  module.exports = rsort;
504
496
  }));
505
497
  //#endregion
506
- //#region ../../node_modules/semver/functions/gt.js
498
+ //#region ../../packages/migration/node_modules/semver/functions/gt.js
507
499
  var require_gt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
508
500
  const compare = require_compare();
509
501
  const gt = (a, b, loose) => compare(a, b, loose) > 0;
510
502
  module.exports = gt;
511
503
  }));
512
504
  //#endregion
513
- //#region ../../node_modules/semver/functions/lt.js
505
+ //#region ../../packages/migration/node_modules/semver/functions/lt.js
514
506
  var require_lt = /* @__PURE__ */ __commonJSMin(((exports, module) => {
515
507
  const compare = require_compare();
516
508
  const lt = (a, b, loose) => compare(a, b, loose) < 0;
517
509
  module.exports = lt;
518
510
  }));
519
511
  //#endregion
520
- //#region ../../node_modules/semver/functions/eq.js
512
+ //#region ../../packages/migration/node_modules/semver/functions/eq.js
521
513
  var require_eq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
522
514
  const compare = require_compare();
523
515
  const eq = (a, b, loose) => compare(a, b, loose) === 0;
524
516
  module.exports = eq;
525
517
  }));
526
518
  //#endregion
527
- //#region ../../node_modules/semver/functions/neq.js
519
+ //#region ../../packages/migration/node_modules/semver/functions/neq.js
528
520
  var require_neq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
529
521
  const compare = require_compare();
530
522
  const neq = (a, b, loose) => compare(a, b, loose) !== 0;
531
523
  module.exports = neq;
532
524
  }));
533
525
  //#endregion
534
- //#region ../../node_modules/semver/functions/gte.js
526
+ //#region ../../packages/migration/node_modules/semver/functions/gte.js
535
527
  var require_gte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
536
528
  const compare = require_compare();
537
529
  const gte = (a, b, loose) => compare(a, b, loose) >= 0;
538
530
  module.exports = gte;
539
531
  }));
540
532
  //#endregion
541
- //#region ../../node_modules/semver/functions/lte.js
533
+ //#region ../../packages/migration/node_modules/semver/functions/lte.js
542
534
  var require_lte = /* @__PURE__ */ __commonJSMin(((exports, module) => {
543
535
  const compare = require_compare();
544
536
  const lte = (a, b, loose) => compare(a, b, loose) <= 0;
545
537
  module.exports = lte;
546
538
  }));
547
539
  //#endregion
548
- //#region ../../node_modules/semver/functions/cmp.js
540
+ //#region ../../packages/migration/node_modules/semver/functions/cmp.js
549
541
  var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
550
542
  const eq = require_eq();
551
543
  const neq = require_neq();
@@ -577,7 +569,7 @@ var require_cmp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
577
569
  module.exports = cmp;
578
570
  }));
579
571
  //#endregion
580
- //#region ../../node_modules/semver/functions/coerce.js
572
+ //#region ../../packages/migration/node_modules/semver/functions/coerce.js
581
573
  var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
582
574
  const SemVer = require_semver$1();
583
575
  const parse = require_parse();
@@ -605,7 +597,7 @@ var require_coerce = /* @__PURE__ */ __commonJSMin(((exports, module) => {
605
597
  module.exports = coerce;
606
598
  }));
607
599
  //#endregion
608
- //#region ../../node_modules/semver/internal/lrucache.js
600
+ //#region ../../packages/migration/node_modules/semver/internal/lrucache.js
609
601
  var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
610
602
  var LRUCache = class {
611
603
  constructor() {
@@ -638,7 +630,7 @@ var require_lrucache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
638
630
  module.exports = LRUCache;
639
631
  }));
640
632
  //#endregion
641
- //#region ../../node_modules/semver/classes/range.js
633
+ //#region ../../packages/migration/node_modules/semver/classes/range.js
642
634
  var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
643
635
  const SPACE_CHARACTERS = /\s+/g;
644
636
  module.exports = class Range {
@@ -910,7 +902,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
910
902
  };
911
903
  }));
912
904
  //#endregion
913
- //#region ../../node_modules/semver/classes/comparator.js
905
+ //#region ../../packages/migration/node_modules/semver/classes/comparator.js
914
906
  var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
915
907
  const ANY = Symbol("SemVer ANY");
916
908
  module.exports = class Comparator {
@@ -980,7 +972,7 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
980
972
  const Range = require_range();
981
973
  }));
982
974
  //#endregion
983
- //#region ../../node_modules/semver/functions/satisfies.js
975
+ //#region ../../packages/migration/node_modules/semver/functions/satisfies.js
984
976
  var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
985
977
  const Range = require_range();
986
978
  const satisfies = (version, range, options) => {
@@ -994,14 +986,14 @@ var require_satisfies = /* @__PURE__ */ __commonJSMin(((exports, module) => {
994
986
  module.exports = satisfies;
995
987
  }));
996
988
  //#endregion
997
- //#region ../../node_modules/semver/ranges/to-comparators.js
989
+ //#region ../../packages/migration/node_modules/semver/ranges/to-comparators.js
998
990
  var require_to_comparators = /* @__PURE__ */ __commonJSMin(((exports, module) => {
999
991
  const Range = require_range();
1000
992
  const toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
1001
993
  module.exports = toComparators;
1002
994
  }));
1003
995
  //#endregion
1004
- //#region ../../node_modules/semver/ranges/max-satisfying.js
996
+ //#region ../../packages/migration/node_modules/semver/ranges/max-satisfying.js
1005
997
  var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1006
998
  const SemVer = require_semver$1();
1007
999
  const Range = require_range();
@@ -1027,7 +1019,7 @@ var require_max_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
1027
1019
  module.exports = maxSatisfying;
1028
1020
  }));
1029
1021
  //#endregion
1030
- //#region ../../node_modules/semver/ranges/min-satisfying.js
1022
+ //#region ../../packages/migration/node_modules/semver/ranges/min-satisfying.js
1031
1023
  var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1032
1024
  const SemVer = require_semver$1();
1033
1025
  const Range = require_range();
@@ -1053,7 +1045,7 @@ var require_min_satisfying = /* @__PURE__ */ __commonJSMin(((exports, module) =>
1053
1045
  module.exports = minSatisfying;
1054
1046
  }));
1055
1047
  //#endregion
1056
- //#region ../../node_modules/semver/ranges/min-version.js
1048
+ //#region ../../packages/migration/node_modules/semver/ranges/min-version.js
1057
1049
  var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1058
1050
  const SemVer = require_semver$1();
1059
1051
  const Range = require_range();
@@ -1092,7 +1084,7 @@ var require_min_version = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1092
1084
  module.exports = minVersion;
1093
1085
  }));
1094
1086
  //#endregion
1095
- //#region ../../node_modules/semver/ranges/valid.js
1087
+ //#region ../../packages/migration/node_modules/semver/ranges/valid.js
1096
1088
  var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1097
1089
  const Range = require_range();
1098
1090
  const validRange = (range, options) => {
@@ -1105,7 +1097,7 @@ var require_valid = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1105
1097
  module.exports = validRange;
1106
1098
  }));
1107
1099
  //#endregion
1108
- //#region ../../node_modules/semver/ranges/outside.js
1100
+ //#region ../../packages/migration/node_modules/semver/ranges/outside.js
1109
1101
  var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1110
1102
  const SemVer = require_semver$1();
1111
1103
  const Comparator = require_comparator();
@@ -1158,21 +1150,21 @@ var require_outside = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1158
1150
  module.exports = outside;
1159
1151
  }));
1160
1152
  //#endregion
1161
- //#region ../../node_modules/semver/ranges/gtr.js
1153
+ //#region ../../packages/migration/node_modules/semver/ranges/gtr.js
1162
1154
  var require_gtr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1163
1155
  const outside = require_outside();
1164
1156
  const gtr = (version, range, options) => outside(version, range, ">", options);
1165
1157
  module.exports = gtr;
1166
1158
  }));
1167
1159
  //#endregion
1168
- //#region ../../node_modules/semver/ranges/ltr.js
1160
+ //#region ../../packages/migration/node_modules/semver/ranges/ltr.js
1169
1161
  var require_ltr = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1170
1162
  const outside = require_outside();
1171
1163
  const ltr = (version, range, options) => outside(version, range, "<", options);
1172
1164
  module.exports = ltr;
1173
1165
  }));
1174
1166
  //#endregion
1175
- //#region ../../node_modules/semver/ranges/intersects.js
1167
+ //#region ../../packages/migration/node_modules/semver/ranges/intersects.js
1176
1168
  var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1177
1169
  const Range = require_range();
1178
1170
  const intersects = (r1, r2, options) => {
@@ -1183,7 +1175,7 @@ var require_intersects = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1183
1175
  module.exports = intersects;
1184
1176
  }));
1185
1177
  //#endregion
1186
- //#region ../../node_modules/semver/ranges/simplify.js
1178
+ //#region ../../packages/migration/node_modules/semver/ranges/simplify.js
1187
1179
  var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1188
1180
  const satisfies = require_satisfies();
1189
1181
  const compare = require_compare();
@@ -1213,7 +1205,7 @@ var require_simplify = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1213
1205
  };
1214
1206
  }));
1215
1207
  //#endregion
1216
- //#region ../../node_modules/semver/ranges/subset.js
1208
+ //#region ../../packages/migration/node_modules/semver/ranges/subset.js
1217
1209
  var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1218
1210
  const Range = require_range();
1219
1211
  const Comparator = require_comparator();
@@ -1308,7 +1300,7 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1308
1300
  module.exports = subset;
1309
1301
  }));
1310
1302
  //#endregion
1311
- //#region ../../node_modules/semver/index.js
1303
+ //#region ../../packages/migration/node_modules/semver/index.js
1312
1304
  var require_semver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1313
1305
  const internalRe = require_re();
1314
1306
  const constants = require_constants();
@@ -1572,19 +1564,6 @@ function custom(check2, message) {
1572
1564
  }
1573
1565
  };
1574
1566
  }
1575
- function lazy(getter) {
1576
- return {
1577
- kind: "schema",
1578
- type: "lazy",
1579
- reference: lazy,
1580
- expects: "unknown",
1581
- async: false,
1582
- getter,
1583
- _run(dataset, config2) {
1584
- return this.getter(dataset.value)._run(dataset, config2);
1585
- }
1586
- };
1587
- }
1588
1567
  function literal(literal_, message) {
1589
1568
  return {
1590
1569
  kind: "schema",
@@ -1601,6 +1580,56 @@ function literal(literal_, message) {
1601
1580
  }
1602
1581
  };
1603
1582
  }
1583
+ function looseObject(entries, message) {
1584
+ return {
1585
+ kind: "schema",
1586
+ type: "loose_object",
1587
+ reference: looseObject,
1588
+ expects: "Object",
1589
+ async: false,
1590
+ entries,
1591
+ message,
1592
+ _run(dataset, config2) {
1593
+ const input = dataset.value;
1594
+ if (input && typeof input === "object") {
1595
+ dataset.typed = true;
1596
+ dataset.value = {};
1597
+ for (const key in this.entries) {
1598
+ const value2 = input[key];
1599
+ const valueDataset = this.entries[key]._run({
1600
+ typed: false,
1601
+ value: value2
1602
+ }, config2);
1603
+ if (valueDataset.issues) {
1604
+ const pathItem = {
1605
+ type: "object",
1606
+ origin: "value",
1607
+ input,
1608
+ key,
1609
+ value: value2
1610
+ };
1611
+ for (const issue of valueDataset.issues) {
1612
+ if (issue.path) issue.path.unshift(pathItem);
1613
+ else issue.path = [pathItem];
1614
+ dataset.issues?.push(issue);
1615
+ }
1616
+ if (!dataset.issues) dataset.issues = valueDataset.issues;
1617
+ if (config2.abortEarly) {
1618
+ dataset.typed = false;
1619
+ break;
1620
+ }
1621
+ }
1622
+ if (!valueDataset.typed) dataset.typed = false;
1623
+ if (valueDataset.value !== void 0 || key in input) dataset.value[key] = valueDataset.value;
1624
+ }
1625
+ if (!dataset.issues || !config2.abortEarly) {
1626
+ for (const key in input) if (_isValidObjectKey(input, key) && !(key in this.entries)) dataset.value[key] = input[key];
1627
+ }
1628
+ } else _addIssue(this, "type", dataset, config2);
1629
+ return dataset;
1630
+ }
1631
+ };
1632
+ }
1604
1633
  function number(message) {
1605
1634
  return {
1606
1635
  kind: "schema",
@@ -1945,20 +1974,19 @@ var Migrator = class {
1945
1974
  if (currentIndex === -1) throw new Error(`Current version "${currentVersion}" not found in migrations`);
1946
1975
  if (targetIndex === -1) throw new Error(`Target version "${targetVersion}" not found in migrations`);
1947
1976
  if (currentIndex === targetIndex) return finalState;
1948
- const isUpgrade = currentIndex < targetIndex;
1949
- const increment = isUpgrade ? 1 : -1;
1950
- const direction = isUpgrade ? "up" : "down";
1951
- for (let i = currentIndex; isUpgrade ? i < targetIndex : i > targetIndex; i += increment) {
1977
+ if (!(currentIndex < targetIndex)) return finalState;
1978
+ for (let i = currentIndex; i < targetIndex; i++) {
1952
1979
  const currentVersion = versions[i];
1953
- const nextVersion = versions[i + increment];
1980
+ const nextVersion = versions[i + 1];
1954
1981
  if (options?.debug) console.log(" Migrating to version:", nextVersion);
1955
1982
  const migrationVersion = currentVersion;
1956
1983
  const migration = this.migrations[migrationVersion];
1957
1984
  const { version: _, ...stateWithoutVersion } = finalState;
1958
1985
  finalState = {
1959
- ...await migration[direction](stateWithoutVersion, currentVersion),
1986
+ ...await migration.up(stateWithoutVersion, currentVersion),
1960
1987
  version: nextVersion
1961
1988
  };
1989
+ if (options?.onStep) await options.onStep(finalState, nextVersion);
1962
1990
  if (options?.debug) console.log(" Migrated state:", finalState);
1963
1991
  }
1964
1992
  return finalState;
@@ -1985,10 +2013,71 @@ const createMigrator = () => {
1985
2013
  };
1986
2014
  //#endregion
1987
2015
  //#region ../../packages/shared/src/config/migrators.ts
2016
+ const DEFAULT_PLUGINS = [
2017
+ {
2018
+ name: "@pipelab/plugin-construct",
2019
+ enabled: true,
2020
+ description: "Construct 3 export & packaging"
2021
+ },
2022
+ {
2023
+ name: "@pipelab/plugin-filesystem",
2024
+ enabled: true,
2025
+ description: "Filesystem utilities"
2026
+ },
2027
+ {
2028
+ name: "@pipelab/plugin-system",
2029
+ enabled: true,
2030
+ description: "System & shell commands"
2031
+ },
2032
+ {
2033
+ name: "@pipelab/plugin-steam",
2034
+ enabled: true,
2035
+ description: "Steam publishing"
2036
+ },
2037
+ {
2038
+ name: "@pipelab/plugin-itch",
2039
+ enabled: true,
2040
+ description: "Itch.io publishing"
2041
+ },
2042
+ {
2043
+ name: "@pipelab/plugin-electron",
2044
+ enabled: true,
2045
+ description: "Electron packaging"
2046
+ },
2047
+ {
2048
+ name: "@pipelab/plugin-discord",
2049
+ enabled: true,
2050
+ description: "Discord Rich Presence"
2051
+ },
2052
+ {
2053
+ name: "@pipelab/plugin-poki",
2054
+ enabled: true,
2055
+ description: "Poki publishing"
2056
+ },
2057
+ {
2058
+ name: "@pipelab/plugin-nvpatch",
2059
+ enabled: true,
2060
+ description: "NW.js patching"
2061
+ },
2062
+ {
2063
+ name: "@pipelab/plugin-tauri",
2064
+ enabled: true,
2065
+ description: "Tauri packaging"
2066
+ },
2067
+ {
2068
+ name: "@pipelab/plugin-minify",
2069
+ enabled: true,
2070
+ description: "Asset minification"
2071
+ },
2072
+ {
2073
+ name: "@pipelab/plugin-netlify",
2074
+ enabled: true,
2075
+ description: "Netlify deployment"
2076
+ }
2077
+ ];
2078
+ const createMigration = (config) => createMigration$1(config);
1988
2079
  const settingsMigratorInternal = createMigrator();
1989
2080
  const defaultAppSettings = settingsMigratorInternal.createDefault({
1990
- cacheFolder: "",
1991
- clearTemporaryFoldersOnPipelineEnd: false,
1992
2081
  locale: "en-US",
1993
2082
  theme: "light",
1994
2083
  version: "7.0.0",
@@ -2003,15 +2092,15 @@ const defaultAppSettings = settingsMigratorInternal.createDefault({
2003
2092
  step: 0,
2004
2093
  completed: false
2005
2094
  }
2006
- }
2095
+ },
2096
+ plugins: DEFAULT_PLUGINS
2007
2097
  });
2008
2098
  const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
2009
2099
  defaultValue: defaultAppSettings,
2010
2100
  migrations: [
2011
2101
  createMigration({
2012
2102
  version: "1.0.0",
2013
- up: (state) => state,
2014
- down: initialVersion
2103
+ up: (state) => state
2015
2104
  }),
2016
2105
  createMigration({
2017
2106
  version: "2.0.0",
@@ -2020,9 +2109,6 @@ const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
2020
2109
  ...state,
2021
2110
  clearTemporaryFoldersOnPipelineEnd: false
2022
2111
  };
2023
- },
2024
- down: () => {
2025
- throw new Error("Can't migrate down from 2.0.0");
2026
2112
  }
2027
2113
  }),
2028
2114
  createMigration({
@@ -2030,11 +2116,7 @@ const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
2030
2116
  up: (state) => ({
2031
2117
  ...state,
2032
2118
  locale: "en-US"
2033
- }),
2034
- down: (state) => {
2035
- const { locale, ...rest } = state;
2036
- return rest;
2037
- }
2119
+ })
2038
2120
  }),
2039
2121
  createMigration({
2040
2122
  version: "4.0.0",
@@ -2050,84 +2132,90 @@ const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
2050
2132
  completed: false
2051
2133
  }
2052
2134
  }
2053
- }),
2054
- down: (state) => {
2055
- const { tours, ...rest } = state;
2056
- return rest;
2057
- }
2135
+ })
2058
2136
  }),
2059
2137
  createMigration({
2060
2138
  version: "5.0.0",
2061
2139
  up: (state) => ({
2062
2140
  ...state,
2063
2141
  autosave: true
2064
- }),
2065
- down: (state) => {
2066
- const { autosave, ...rest } = state;
2067
- return rest;
2068
- }
2142
+ })
2069
2143
  }),
2070
2144
  createMigration({
2071
2145
  version: "6.0.0",
2072
- up: (state) => ({
2073
- ...state,
2074
- agents: []
2075
- }),
2076
- down: (state) => {
2077
- const { agents, ...rest } = state;
2078
- return rest;
2146
+ up: (state) => {
2147
+ const { cacheFolder, clearTemporaryFoldersOnPipelineEnd: __, ...rest } = state;
2148
+ return {
2149
+ ...rest,
2150
+ cacheFolder,
2151
+ agents: [],
2152
+ plugins: DEFAULT_PLUGINS
2153
+ };
2079
2154
  }
2080
2155
  }),
2081
2156
  createMigration({
2082
2157
  version: "7.0.0",
2083
- up: finalVersion,
2084
- down: () => {
2085
- throw new Error("Can't migrate down from 7.0.0");
2086
- }
2158
+ up: finalVersion
2087
2159
  })
2088
2160
  ]
2089
2161
  });
2162
+ const connectionsMigratorInternal = createMigrator();
2163
+ const defaultConnections = connectionsMigratorInternal.createDefault({
2164
+ version: "1.0.0",
2165
+ connections: []
2166
+ });
2167
+ const connectionsMigrator$1 = connectionsMigratorInternal.createMigrations({
2168
+ defaultValue: defaultConnections,
2169
+ migrations: [createMigration({
2170
+ version: "1.0.0",
2171
+ up: finalVersion
2172
+ })]
2173
+ });
2090
2174
  const fileRepoMigratorInternal = createMigrator();
2091
2175
  const defaultFileRepo = fileRepoMigratorInternal.createDefault({
2092
- version: "2.0.0",
2176
+ version: "3.0.0",
2093
2177
  projects: [{
2094
2178
  id: "main",
2095
2179
  name: "Default project",
2096
2180
  description: "The initial default project"
2097
2181
  }],
2098
- pipelines: [],
2099
- proxies: []
2182
+ pipelines: []
2100
2183
  });
2101
2184
  const fileRepoMigrations$1 = fileRepoMigratorInternal.createMigrations({
2102
2185
  defaultValue: defaultFileRepo,
2103
- migrations: [createMigration({
2104
- version: "1.0.0",
2105
- up: (state) => {
2106
- return {
2107
- version: "2.0.0",
2108
- projects: [{
2109
- id: "main",
2110
- name: "Default project",
2111
- description: "The initial default project"
2112
- }],
2113
- pipelines: Object.entries(state.data || {}).map(([id, file]) => {
2186
+ migrations: [
2187
+ createMigration({
2188
+ version: "1.0.0",
2189
+ up: (state) => {
2190
+ const pipelines = Object.entries(state.data || {}).map(([id, file]) => {
2114
2191
  return {
2115
2192
  ...file,
2116
2193
  id,
2117
2194
  project: "main"
2118
2195
  };
2119
- }),
2120
- proxies: []
2121
- };
2122
- },
2123
- down: initialVersion
2124
- }), createMigration({
2125
- version: "2.0.0",
2126
- up: finalVersion,
2127
- down: (state) => {
2128
- throw new Error("Cannot downgrade to version 1.0.0");
2129
- }
2130
- })]
2196
+ });
2197
+ return {
2198
+ ...state,
2199
+ projects: [{
2200
+ id: "main",
2201
+ name: "Default project",
2202
+ description: "The initial default project"
2203
+ }],
2204
+ pipelines
2205
+ };
2206
+ }
2207
+ }),
2208
+ createMigration({
2209
+ version: "2.0.0",
2210
+ up: (state) => {
2211
+ return { ...state };
2212
+ }
2213
+ }),
2214
+ createMigration({
2215
+ version: "3.0.0",
2216
+ up: finalVersion
2217
+ })
2218
+ ]
2131
2219
  });
2132
2220
  const savedFileMigratorInternal = createMigrator();
2133
2221
  const savedFileDefaultValue = savedFileMigratorInternal.createDefault({
@@ -2138,8 +2226,7 @@ const savedFileDefaultValue = savedFileMigratorInternal.createDefault({
2138
2226
  description: "",
2139
2227
  name: "",
2140
2228
  variables: [],
2141
- type: "default",
2142
- version: "4.0.0"
2229
+ version: "5.0.0"
2143
2230
  });
2144
2231
  const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
2145
2232
  defaultValue: savedFileDefaultValue,
@@ -2153,21 +2240,19 @@ const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
2153
2240
  for (const block of blocks) if (block.type === "event") triggers.push(block);
2154
2241
  else newBlocks.push(block);
2155
2242
  return {
2243
+ ...state,
2156
2244
  canvas: {
2245
+ ...state.canvas,
2157
2246
  blocks: newBlocks,
2158
2247
  triggers
2159
- },
2160
- description: state.description,
2161
- name: state.name,
2162
- variables: state.variables
2248
+ }
2163
2249
  };
2164
- },
2165
- down: initialVersion
2250
+ }
2166
2251
  }),
2167
2252
  createMigration({
2168
2253
  version: "2.0.0",
2169
2254
  up: (state) => {
2170
- const { canvas, ...rest } = state;
2255
+ const { canvas } = state;
2171
2256
  const { blocks, triggers } = canvas;
2172
2257
  const newBlocks = [];
2173
2258
  for (const block of blocks) {
@@ -2186,43 +2271,129 @@ const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
2186
2271
  });
2187
2272
  }
2188
2273
  return {
2189
- ...rest,
2274
+ ...state,
2190
2275
  canvas: {
2276
+ ...canvas,
2191
2277
  triggers,
2192
2278
  blocks: newBlocks
2193
2279
  }
2194
2280
  };
2195
- },
2196
- down: () => {
2197
- throw new Error("Migration down not implemented");
2198
2281
  }
2199
2282
  }),
2200
2283
  createMigration({
2201
2284
  version: "3.0.0",
2202
- up: (state) => {
2203
- return {
2204
- ...state,
2205
- type: "default"
2206
- };
2207
- },
2208
- down: () => {
2209
- throw new Error("Migration down not implemented");
2210
- }
2285
+ up: (state) => ({
2286
+ ...state,
2287
+ type: "default"
2288
+ })
2211
2289
  }),
2212
2290
  createMigration({
2213
2291
  version: "4.0.0",
2214
- up: finalVersion,
2215
- down: () => {
2216
- throw new Error("Migration down not implemented");
2292
+ up: (_state) => {
2293
+ const state = _state;
2294
+ if (state.type === "simple") return {
2295
+ name: state.name,
2296
+ description: state.description,
2297
+ canvas: {
2298
+ blocks: [],
2299
+ triggers: []
2300
+ },
2301
+ variables: []
2302
+ };
2303
+ const migrateBlock = (block, pluginsMap) => {
2304
+ if (!block) return;
2305
+ if (block.origin?.pluginId) {
2306
+ block.origin.pluginId = getStrictPluginId(block.origin.pluginId);
2307
+ block.origin.version = pluginsMap[block.origin.pluginId] ?? "latest";
2308
+ }
2309
+ };
2310
+ const normalizedPlugins = {};
2311
+ if (state.plugins) for (const [key, val] of Object.entries(state.plugins)) normalizedPlugins[getStrictPluginId(key)] = val;
2312
+ if (state.canvas) {
2313
+ for (const block of state.canvas.blocks ?? []) migrateBlock(block, normalizedPlugins);
2314
+ for (const trigger of state.canvas.triggers ?? []) migrateBlock(trigger, normalizedPlugins);
2315
+ }
2316
+ const { plugins: _dropped, type: _type, ...rest } = state;
2317
+ return rest;
2217
2318
  }
2319
+ }),
2320
+ createMigration({
2321
+ version: "5.0.0",
2322
+ up: finalVersion
2218
2323
  })
2219
2324
  ]
2220
2325
  });
2221
- const configRegistry$1 = {
2222
- settings: appSettingsMigrator$1,
2223
- projects: fileRepoMigrations$1,
2224
- pipeline: savedFileMigrator$1
2326
+ const LEGACY_ID_MAP = {
2327
+ construct: "@pipelab/plugin-construct",
2328
+ filesystem: "@pipelab/plugin-filesystem",
2329
+ system: "@pipelab/plugin-system",
2330
+ steam: "@pipelab/plugin-steam",
2331
+ itch: "@pipelab/plugin-itch",
2332
+ electron: "@pipelab/plugin-electron",
2333
+ discord: "@pipelab/plugin-discord",
2334
+ dicord: "@pipelab/plugin-discord",
2335
+ "@pipelab/plugin-dicord": "@pipelab/plugin-discord",
2336
+ poki: "@pipelab/plugin-poki",
2337
+ nvpatch: "@pipelab/plugin-nvpatch",
2338
+ tauri: "@pipelab/plugin-tauri",
2339
+ minify: "@pipelab/plugin-minify",
2340
+ netlify: "@pipelab/plugin-netlify"
2341
+ };
2342
+ const getStrictPluginId = (pluginId) => {
2343
+ if (!pluginId) return pluginId;
2344
+ return LEGACY_ID_MAP[pluginId] || pluginId;
2225
2345
  };
2346
+ //#endregion
2347
+ //#region ../../packages/shared/src/save-location.ts
2348
+ const SaveLocationInternalValidator = object({
2349
+ id: string(),
2350
+ project: string(),
2351
+ lastModified: string(),
2352
+ type: literal("internal"),
2353
+ configName: string()
2354
+ });
2355
+ /** @deprecated External pipeline files are deprecated and will be removed in future versions. */
2356
+ const SaveLocationExternalValidator = object({
2357
+ id: string(),
2358
+ project: string(),
2359
+ path: string(),
2360
+ lastModified: string(),
2361
+ type: literal("external"),
2362
+ summary: object({
2363
+ plugins: array(string()),
2364
+ name: string(),
2365
+ description: string()
2366
+ })
2367
+ });
2368
+ const SaveLocationPipelabCloudValidator = object({
2369
+ id: string(),
2370
+ project: string(),
2371
+ type: literal("pipelab-cloud")
2372
+ });
2373
+ const SaveLocationValidator = union([
2374
+ SaveLocationExternalValidator,
2375
+ SaveLocationInternalValidator,
2376
+ SaveLocationPipelabCloudValidator
2377
+ ]);
2378
+ object({
2379
+ version: literal("1.0.0"),
2380
+ data: optional(record(string(), SaveLocationValidator), {})
2381
+ });
2382
+ const FileRepoProjectValidatorV2 = object({
2383
+ id: string(),
2384
+ name: string(),
2385
+ description: string()
2386
+ });
2387
+ object({
2388
+ version: literal("2.0.0"),
2389
+ projects: array(FileRepoProjectValidatorV2),
2390
+ pipelines: optional(array(SaveLocationValidator), [])
2391
+ });
2392
+ object({
2393
+ version: literal("3.0.0"),
2394
+ projects: array(FileRepoProjectValidatorV2),
2395
+ pipelines: optional(array(SaveLocationValidator), [])
2396
+ });
2226
2397
  object({
2227
2398
  cacheFolder: string(),
2228
2399
  theme: union([literal("light"), literal("dark")]),
@@ -2329,11 +2500,24 @@ object({
2329
2500
  name: string(),
2330
2501
  url: string()
2331
2502
  })),
2332
- buildHistory: object({ retentionPolicy: object({
2503
+ plugins: array(object({
2504
+ name: string(),
2333
2505
  enabled: boolean(),
2334
- maxEntries: number(),
2335
- maxAge: number()
2336
- }) })
2506
+ description: string()
2507
+ })),
2508
+ cacheFolder: optional(string()),
2509
+ tempFolder: optional(string())
2510
+ });
2511
+ const ConnectionValidator = looseObject({
2512
+ id: string(),
2513
+ pluginName: string(),
2514
+ name: string(),
2515
+ createdAt: string(),
2516
+ isDefault: boolean()
2517
+ });
2518
+ object({
2519
+ version: literal("1.0.0"),
2520
+ connections: array(ConnectionValidator)
2337
2521
  });
2338
2522
  //#endregion
2339
2523
  //#region ../../node_modules/tslog/dist/esm/prettyLogStyles.js
@@ -2856,7 +3040,7 @@ async function newQuickJSWASMModuleFromVariant(variantOrPromise) {
2856
3040
  let variant = smartUnwrap(await variantOrPromise), [wasmModuleLoader, QuickJSFFI, { QuickJSWASMModule: QuickJSWASMModule2 }] = await Promise.all([
2857
3041
  variant.importModuleLoader().then(smartUnwrap),
2858
3042
  variant.importFFI(),
2859
- import("./module-6F3E5H7Y-BhC3bDbd.mjs").then(smartUnwrap)
3043
+ import("./module-6F3E5H7Y-DS2ftHS3.mjs").then(smartUnwrap)
2860
3044
  ]), wasmModule = await wasmModuleLoader();
2861
3045
  wasmModule.type = "sync";
2862
3046
  return new QuickJSWASMModule2(wasmModule, new QuickJSFFI(wasmModule));
@@ -3770,8 +3954,8 @@ const fmt = { param: (value, variant, ifEmpty = "") => {
3770
3954
  //#region ../../node_modules/@jitl/quickjs-singlefile-mjs-release-sync/dist/index.mjs
3771
3955
  var src_default = {
3772
3956
  type: "sync",
3773
- importFFI: () => import("./ffi-H2UhpTE6.mjs").then((mod) => mod.QuickJSFFI),
3774
- importModuleLoader: () => import("./emscripten-module-VHMWRAJ2-C6K1oxel.mjs").then((mod) => mod.default)
3957
+ importFFI: () => import("./ffi-DpuJHCem.mjs").then((mod) => mod.QuickJSFFI),
3958
+ importModuleLoader: () => import("./emscripten-module-VHMWRAJ2-Jdkq656T.mjs").then((mod) => mod.default)
3775
3959
  };
3776
3960
  //#endregion
3777
3961
  //#region ../../packages/shared/src/quickjs.ts
@@ -3932,9 +4116,6 @@ const processGraph = async (options) => {
3932
4116
  options.steps[rawNode.uid].outputs = result.result.outputs;
3933
4117
  }
3934
4118
  options.onNodeExit(rawNode);
3935
- } else if (rawNode.type === "loop") {
3936
- options.onNodeEnter(rawNode);
3937
- options.onNodeExit(rawNode);
3938
4119
  } else if (rawNode.type === "comment") {} else if (rawNode.type === "event") {
3939
4120
  options.onNodeEnter(rawNode);
3940
4121
  options.onNodeExit(rawNode);
@@ -3947,7 +4128,8 @@ const processGraph = async (options) => {
3947
4128
  //#region ../../packages/shared/src/model.ts
3948
4129
  const OriginValidator = object({
3949
4130
  pluginId: string(),
3950
- nodeId: string()
4131
+ nodeId: string(),
4132
+ version: optional(pipe(string(), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent.")))
3951
4133
  });
3952
4134
  const BlockActionValidatorV1 = object({
3953
4135
  type: literal("action"),
@@ -3960,7 +4142,7 @@ const EditorParamValidatorV3 = union([literal("simple"), literal("editor")]);
3960
4142
  const BlockActionValidatorV3 = object({
3961
4143
  type: literal("action"),
3962
4144
  uid: string(),
3963
- name: pipe(optional(string()), description("A custom name provided by the user")),
4145
+ name: optional(pipe(string(), description("A custom name provided by the user"))),
3964
4146
  disabled: optional(boolean()),
3965
4147
  params: record(string(), object({
3966
4148
  editor: EditorParamValidatorV3,
@@ -3968,21 +4150,6 @@ const BlockActionValidatorV3 = object({
3968
4150
  })),
3969
4151
  origin: OriginValidator
3970
4152
  });
3971
- object({
3972
- type: literal("condition"),
3973
- uid: string(),
3974
- origin: OriginValidator,
3975
- params: record(string(), any()),
3976
- branchTrue: lazy(() => array(BlockValidator)),
3977
- branchFalse: lazy(() => array(BlockValidator))
3978
- });
3979
- object({
3980
- type: literal("loop"),
3981
- uid: string(),
3982
- origin: OriginValidator,
3983
- params: record(string(), any()),
3984
- children: lazy(() => array(BlockValidator))
3985
- });
3986
4153
  const BlockEventValidator = object({
3987
4154
  type: literal("event"),
3988
4155
  uid: string(),
@@ -3998,7 +4165,6 @@ object({
3998
4165
  const BlockValidatorV1 = variant("type", [BlockActionValidatorV1, BlockEventValidator]);
3999
4166
  const BlockValidatorV2 = variant("type", [BlockActionValidatorV1]);
4000
4167
  const BlockValidatorV3 = variant("type", [BlockActionValidatorV3]);
4001
- const BlockValidator = BlockValidatorV3;
4002
4168
  const CanvasValidatorV1 = object({ blocks: array(BlockValidatorV1) });
4003
4169
  const CanvasValidatorV2 = object({
4004
4170
  blocks: array(BlockValidatorV2),
@@ -4030,19 +4196,21 @@ object({
4030
4196
  canvas: CanvasValidatorV3,
4031
4197
  variables: array(VariableValidatorV1)
4032
4198
  });
4033
- const SavedFileDefaultValidator = object({
4199
+ const SavedFileDefaultValidatorV4 = object({
4034
4200
  version: literal("4.0.0"),
4035
4201
  type: literal("default"),
4036
4202
  name: string(),
4037
4203
  description: string(),
4204
+ plugins: optional(record(string(), string())),
4038
4205
  canvas: CanvasValidatorV3,
4039
4206
  variables: array(VariableValidatorV1)
4040
4207
  });
4041
- const SavedFileSimpleValidator = object({
4208
+ const SavedFileSimpleValidatorV4 = object({
4042
4209
  version: literal("4.0.0"),
4043
4210
  type: literal("simple"),
4044
4211
  name: string(),
4045
4212
  description: string(),
4213
+ plugins: optional(record(string(), string())),
4046
4214
  source: object({
4047
4215
  type: union([
4048
4216
  literal("c3-html"),
@@ -4068,7 +4236,45 @@ const SavedFileSimpleValidator = object({
4068
4236
  })
4069
4237
  })
4070
4238
  });
4071
- union([SavedFileDefaultValidator, SavedFileSimpleValidator]);
4239
+ object({
4240
+ version: literal("5.0.0"),
4241
+ name: string(),
4242
+ description: string(),
4243
+ canvas: CanvasValidatorV3,
4244
+ variables: array(VariableValidatorV1)
4245
+ });
4246
+ object({
4247
+ version: literal("5.0.0"),
4248
+ type: literal("simple"),
4249
+ name: string(),
4250
+ description: string(),
4251
+ plugins: record(string(), string()),
4252
+ source: object({
4253
+ type: union([
4254
+ literal("c3-html"),
4255
+ literal("c3-nwjs"),
4256
+ literal("godot"),
4257
+ literal("html")
4258
+ ]),
4259
+ path: string()
4260
+ }),
4261
+ packaging: object({ enabled: boolean() }),
4262
+ publishing: object({
4263
+ steam: object({
4264
+ enabled: boolean(),
4265
+ appId: optional(string())
4266
+ }),
4267
+ itch: object({
4268
+ enabled: boolean(),
4269
+ project: optional(string())
4270
+ }),
4271
+ poki: object({
4272
+ enabled: boolean(),
4273
+ gameId: optional(string())
4274
+ })
4275
+ })
4276
+ });
4277
+ union([SavedFileDefaultValidatorV4, SavedFileSimpleValidatorV4]);
4072
4278
  //#endregion
4073
4279
  //#region ../../node_modules/vue/node_modules/@vue/shared/dist/shared.cjs.prod.js
4074
4280
  /**
@@ -32072,7 +32278,13 @@ const plugins = (0, vue_exports.shallowRef)([]);
32072
32278
  const usePlugins = () => {
32073
32279
  const load = () => {};
32074
32280
  const registerPlugins = (newPlugins) => {
32075
- plugins.value.push(...newPlugins);
32281
+ const current = [...plugins.value];
32282
+ for (const np of newPlugins) {
32283
+ const idx = current.findIndex((p) => p.id === np.id);
32284
+ if (idx !== -1) current[idx] = np;
32285
+ else current.push(np);
32286
+ }
32287
+ plugins.value = current;
32076
32288
  };
32077
32289
  return {
32078
32290
  load,
@@ -32081,38 +32293,6 @@ const usePlugins = () => {
32081
32293
  };
32082
32294
  };
32083
32295
  //#endregion
32084
- //#region ../../packages/shared/src/save-location.ts
32085
- const SaveLocationInternalValidator = object({
32086
- id: string(),
32087
- project: string(),
32088
- lastModified: string(),
32089
- type: literal("internal"),
32090
- configName: string()
32091
- });
32092
- /** @deprecated External pipeline files are deprecated and will be removed in future versions. */
32093
- const SaveLocationExternalValidator = object({
32094
- id: string(),
32095
- project: string(),
32096
- path: string(),
32097
- lastModified: string(),
32098
- type: literal("external"),
32099
- summary: object({
32100
- plugins: array(string()),
32101
- name: string(),
32102
- description: string()
32103
- })
32104
- });
32105
- const SaveLocationPipelabCloudValidator = object({
32106
- id: string(),
32107
- project: string(),
32108
- type: literal("pipelab-cloud")
32109
- });
32110
- const SaveLocationValidator = union([
32111
- SaveLocationExternalValidator,
32112
- SaveLocationInternalValidator,
32113
- SaveLocationPipelabCloudValidator
32114
- ]);
32115
- //#endregion
32116
32296
  //#region ../../packages/shared/src/subscription-errors.ts
32117
32297
  var SubscriptionRequiredError = class extends Error {
32118
32298
  code = "SUBSCRIPTION_REQUIRED";
@@ -32146,6 +32326,26 @@ const supabase = (options) => {
32146
32326
  return createClient(url, anonKey, options);
32147
32327
  };
32148
32328
  //#endregion
32329
+ //#region ../../packages/shared/src/utils.ts
32330
+ const transformUrl = (url) => {
32331
+ if (url && typeof url === "string") {
32332
+ const getHost = () => {
32333
+ if (typeof window !== "undefined") if (window.location.port === "5173") return `http://${window.location.hostname}:33753`;
32334
+ else return `${window.location.protocol}//${window.location.host}`;
32335
+ return "http://localhost:33753";
32336
+ };
32337
+ if (url.startsWith("file://")) {
32338
+ const filePath = url.substring(7);
32339
+ return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
32340
+ }
32341
+ if (url.startsWith("media://")) {
32342
+ const filePath = url.replace(/^media:\/\/+/, "/");
32343
+ return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
32344
+ }
32345
+ }
32346
+ return url || "";
32347
+ };
32348
+ //#endregion
32149
32349
  //#region ../../packages/shared/src/validation.ts
32150
32350
  const isRequired = (param) => {
32151
32351
  return param.required === true;
@@ -32163,39 +32363,11 @@ var WebSocketError = class extends Error {
32163
32363
  const isWebSocketRequestMessage = (message) => {
32164
32364
  return message && typeof message.channel === "string" && message.requestId;
32165
32365
  };
32166
- object({
32167
- version: literal("1.0.0"),
32168
- data: optional(record(string(), SaveLocationValidator), {})
32169
- });
32170
- const FileRepoProjectValidatorV2$1 = object({
32171
- id: string(),
32172
- name: string(),
32173
- description: string()
32174
- });
32175
- object({
32176
- version: literal("2.0.0"),
32177
- projects: array(FileRepoProjectValidatorV2$1),
32178
- pipelines: optional(array(SaveLocationValidator), [])
32179
- });
32180
- object({
32181
- version: literal("1.0.0"),
32182
- data: optional(record(string(), SaveLocationValidator), {})
32183
- });
32184
- const FileRepoProjectValidatorV2 = object({
32185
- id: string(),
32186
- name: string(),
32187
- description: string()
32188
- });
32189
- object({
32190
- version: literal("2.0.0"),
32191
- projects: array(FileRepoProjectValidatorV2),
32192
- pipelines: optional(array(SaveLocationValidator), [])
32193
- });
32194
32366
  //#endregion
32195
32367
  //#region ../../packages/shared/src/index.ts
32196
32368
  const appSettingsMigrator = appSettingsMigrator$1;
32197
32369
  const fileRepoMigrations = fileRepoMigrations$1;
32198
32370
  const savedFileMigrator = savedFileMigrator$1;
32199
- const configRegistry = configRegistry$1;
32371
+ const connectionsMigrator = connectionsMigrator$1;
32200
32372
  //#endregion
32201
- export { require_valid as A, variableToFormattedVariable as C, fmt as D, createQuickJsFromVariant as E, require_clean as M, require_valid$1 as N, useLogger as O, processGraph as S, createQuickJs as T, EditorParamValidatorV3 as _, FileRepoProjectValidatorV2$1 as a, SavedFileSimpleValidator as b, isRequired as c, SubscriptionRequiredError as d, SaveLocationExternalValidator as f, usePlugins as g, SaveLocationValidator as h, savedFileMigrator as i, require_satisfies as j, require_semver as k, isSupabaseAvailable as l, SaveLocationPipelabCloudValidator as m, configRegistry as n, WebSocketError as o, SaveLocationInternalValidator as p, fileRepoMigrations as r, isWebSocketRequestMessage as s, appSettingsMigrator as t, supabase as u, OriginValidator as v, makeResolvedParams as w, VariableValidatorV1 as x, SavedFileDefaultValidator as y };
32373
+ export { SaveLocationValidator as A, fmt as C, SaveLocationExternalValidator as D, FileRepoProjectValidatorV2 as E, SaveLocationInternalValidator as O, createQuickJsFromVariant as S, ConnectionValidator as T, VariableValidatorV1 as _, WebSocketError as a, makeResolvedParams as b, transformUrl as c, SubscriptionRequiredError as d, usePlugins as f, SavedFileSimpleValidatorV4 as g, SavedFileDefaultValidatorV4 as h, savedFileMigrator as i, SaveLocationPipelabCloudValidator as k, isSupabaseAvailable as l, OriginValidator as m, connectionsMigrator as n, isWebSocketRequestMessage as o, EditorParamValidatorV3 as p, fileRepoMigrations as r, isRequired as s, appSettingsMigrator as t, supabase as u, processGraph as v, useLogger as w, createQuickJs as x, variableToFormattedVariable as y };