@pipelab/shared 1.0.0-beta.1 → 1.0.0-beta.11

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.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { createMigration, createMigrator, finalVersion, initialVersion } from "@pipelab/migration";
2
- import { any, array, boolean, custom, description, lazy, literal, number, object, optional, pipe, record, string, union, unknown, variant } from "valibot";
1
+ import { createMigration, createMigrator, finalVersion } from "@pipelab/migration";
2
+ import { any, array, boolean, custom, description, literal, looseObject, number, object, optional, pipe, record, string, union, unknown, variant } from "valibot";
3
3
  import { Logger } from "tslog";
4
4
  import { RELEASE_SYNC, newQuickJSWASMModuleFromVariant, newVariant } from "quickjs-emscripten";
5
5
  import { Arena } from "quickjs-emscripten-sync";
@@ -39,13 +39,74 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  }) : target, mod));
40
40
  //#endregion
41
41
  //#region src/config/migrators.ts
42
+ const DEFAULT_PLUGINS = [
43
+ {
44
+ name: "@pipelab/plugin-construct",
45
+ enabled: true,
46
+ description: "Construct 3 export & packaging"
47
+ },
48
+ {
49
+ name: "@pipelab/plugin-filesystem",
50
+ enabled: true,
51
+ description: "Filesystem utilities"
52
+ },
53
+ {
54
+ name: "@pipelab/plugin-system",
55
+ enabled: true,
56
+ description: "System & shell commands"
57
+ },
58
+ {
59
+ name: "@pipelab/plugin-steam",
60
+ enabled: true,
61
+ description: "Steam publishing"
62
+ },
63
+ {
64
+ name: "@pipelab/plugin-itch",
65
+ enabled: true,
66
+ description: "Itch.io publishing"
67
+ },
68
+ {
69
+ name: "@pipelab/plugin-electron",
70
+ enabled: true,
71
+ description: "Electron packaging"
72
+ },
73
+ {
74
+ name: "@pipelab/plugin-discord",
75
+ enabled: true,
76
+ description: "Discord Rich Presence"
77
+ },
78
+ {
79
+ name: "@pipelab/plugin-poki",
80
+ enabled: true,
81
+ description: "Poki publishing"
82
+ },
83
+ {
84
+ name: "@pipelab/plugin-nvpatch",
85
+ enabled: true,
86
+ description: "NW.js patching"
87
+ },
88
+ {
89
+ name: "@pipelab/plugin-tauri",
90
+ enabled: true,
91
+ description: "Tauri packaging"
92
+ },
93
+ {
94
+ name: "@pipelab/plugin-minify",
95
+ enabled: true,
96
+ description: "Asset minification"
97
+ },
98
+ {
99
+ name: "@pipelab/plugin-netlify",
100
+ enabled: true,
101
+ description: "Netlify deployment"
102
+ }
103
+ ];
104
+ const createMigration$1 = (config) => createMigration(config);
42
105
  const settingsMigratorInternal = createMigrator();
43
106
  const defaultAppSettings$1 = settingsMigratorInternal.createDefault({
44
- cacheFolder: "",
45
- clearTemporaryFoldersOnPipelineEnd: false,
46
107
  locale: "en-US",
47
108
  theme: "light",
48
- version: "7.0.0",
109
+ version: "8.0.0",
49
110
  autosave: true,
50
111
  agents: [],
51
112
  tours: {
@@ -57,40 +118,39 @@ const defaultAppSettings$1 = settingsMigratorInternal.createDefault({
57
118
  step: 0,
58
119
  completed: false
59
120
  }
60
- }
121
+ },
122
+ buildHistory: { retentionPolicy: {
123
+ enabled: false,
124
+ maxEntries: 50,
125
+ maxAge: 30
126
+ } },
127
+ plugins: DEFAULT_PLUGINS,
128
+ isInternalMigrationBannerClosed: false
61
129
  });
62
130
  const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
63
131
  defaultValue: defaultAppSettings$1,
64
132
  migrations: [
65
- createMigration({
133
+ createMigration$1({
66
134
  version: "1.0.0",
67
- up: (state) => state,
68
- down: initialVersion
135
+ up: (state) => state
69
136
  }),
70
- createMigration({
137
+ createMigration$1({
71
138
  version: "2.0.0",
72
139
  up: (state) => {
73
140
  return {
74
141
  ...state,
75
142
  clearTemporaryFoldersOnPipelineEnd: false
76
143
  };
77
- },
78
- down: () => {
79
- throw new Error("Can't migrate down from 2.0.0");
80
144
  }
81
145
  }),
82
- createMigration({
146
+ createMigration$1({
83
147
  version: "3.0.0",
84
148
  up: (state) => ({
85
149
  ...state,
86
150
  locale: "en-US"
87
- }),
88
- down: (state) => {
89
- const { locale, ...rest } = state;
90
- return rest;
91
- }
151
+ })
92
152
  }),
93
- createMigration({
153
+ createMigration$1({
94
154
  version: "4.0.0",
95
155
  up: (state) => ({
96
156
  ...state,
@@ -104,43 +164,50 @@ const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
104
164
  completed: false
105
165
  }
106
166
  }
107
- }),
108
- down: (state) => {
109
- const { tours, ...rest } = state;
110
- return rest;
111
- }
167
+ })
112
168
  }),
113
- createMigration({
169
+ createMigration$1({
114
170
  version: "5.0.0",
115
171
  up: (state) => ({
116
172
  ...state,
117
173
  autosave: true
118
- }),
119
- down: (state) => {
120
- const { autosave, ...rest } = state;
121
- return rest;
122
- }
174
+ })
123
175
  }),
124
- createMigration({
176
+ createMigration$1({
125
177
  version: "6.0.0",
126
- up: (state) => ({
127
- ...state,
128
- agents: []
129
- }),
130
- down: (state) => {
131
- const { agents, ...rest } = state;
132
- return rest;
178
+ up: (state) => {
179
+ const { cacheFolder: _, clearTemporaryFoldersOnPipelineEnd: __, ...rest } = state;
180
+ return {
181
+ ...rest,
182
+ agents: [],
183
+ buildHistory: { retentionPolicy: {
184
+ enabled: false,
185
+ maxEntries: 50,
186
+ maxAge: 30
187
+ } },
188
+ plugins: DEFAULT_PLUGINS,
189
+ isInternalMigrationBannerClosed: false
190
+ };
133
191
  }
134
192
  }),
135
- createMigration({
136
- version: "7.0.0",
137
- up: finalVersion,
138
- down: () => {
139
- throw new Error("Can't migrate down from 7.0.0");
140
- }
193
+ createMigration$1({
194
+ version: "8.0.0",
195
+ up: finalVersion
141
196
  })
142
197
  ]
143
198
  });
199
+ const connectionsMigratorInternal = createMigrator();
200
+ const defaultConnections$1 = connectionsMigratorInternal.createDefault({
201
+ version: "1.0.0",
202
+ connections: []
203
+ });
204
+ const connectionsMigrator$1 = connectionsMigratorInternal.createMigrations({
205
+ defaultValue: defaultConnections$1,
206
+ migrations: [createMigration$1({
207
+ version: "1.0.0",
208
+ up: finalVersion
209
+ })]
210
+ });
144
211
  const fileRepoMigratorInternal = createMigrator();
145
212
  const defaultFileRepo$1 = fileRepoMigratorInternal.createDefault({
146
213
  version: "2.0.0",
@@ -149,38 +216,33 @@ const defaultFileRepo$1 = fileRepoMigratorInternal.createDefault({
149
216
  name: "Default project",
150
217
  description: "The initial default project"
151
218
  }],
152
- pipelines: [],
153
- proxies: []
219
+ pipelines: []
154
220
  });
155
221
  const fileRepoMigrations$1 = fileRepoMigratorInternal.createMigrations({
156
222
  defaultValue: defaultFileRepo$1,
157
- migrations: [createMigration({
223
+ migrations: [createMigration$1({
158
224
  version: "1.0.0",
159
225
  up: (state) => {
226
+ const pipelines = Object.entries(state.data || {}).map(([id, file]) => {
227
+ return {
228
+ ...file,
229
+ id,
230
+ project: "main"
231
+ };
232
+ });
160
233
  return {
161
- version: "2.0.0",
234
+ ...state,
162
235
  projects: [{
163
236
  id: "main",
164
237
  name: "Default project",
165
238
  description: "The initial default project"
166
239
  }],
167
- pipelines: Object.entries(state.data || {}).map(([id, file]) => {
168
- return {
169
- ...file,
170
- id,
171
- project: "main"
172
- };
173
- }),
174
- proxies: []
240
+ pipelines
175
241
  };
176
- },
177
- down: initialVersion
178
- }), createMigration({
179
- version: "2.0.0",
180
- up: finalVersion,
181
- down: (state) => {
182
- throw new Error("Cannot downgrade to version 1.0.0");
183
242
  }
243
+ }), createMigration$1({
244
+ version: "2.0.0",
245
+ up: finalVersion
184
246
  })]
185
247
  });
186
248
  const savedFileMigratorInternal = createMigrator();
@@ -192,13 +254,12 @@ const savedFileDefaultValue = savedFileMigratorInternal.createDefault({
192
254
  description: "",
193
255
  name: "",
194
256
  variables: [],
195
- type: "default",
196
- version: "4.0.0"
257
+ version: "5.0.0"
197
258
  });
198
259
  const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
199
260
  defaultValue: savedFileDefaultValue,
200
261
  migrations: [
201
- createMigration({
262
+ createMigration$1({
202
263
  version: "1.0.0",
203
264
  up: (state) => {
204
265
  const blocks = state.canvas.blocks;
@@ -207,21 +268,19 @@ const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
207
268
  for (const block of blocks) if (block.type === "event") triggers.push(block);
208
269
  else newBlocks.push(block);
209
270
  return {
271
+ ...state,
210
272
  canvas: {
273
+ ...state.canvas,
211
274
  blocks: newBlocks,
212
275
  triggers
213
- },
214
- description: state.description,
215
- name: state.name,
216
- variables: state.variables
276
+ }
217
277
  };
218
- },
219
- down: initialVersion
278
+ }
220
279
  }),
221
- createMigration({
280
+ createMigration$1({
222
281
  version: "2.0.0",
223
282
  up: (state) => {
224
- const { canvas, ...rest } = state;
283
+ const { canvas } = state;
225
284
  const { blocks, triggers } = canvas;
226
285
  const newBlocks = [];
227
286
  for (const block of blocks) {
@@ -240,44 +299,159 @@ const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
240
299
  });
241
300
  }
242
301
  return {
243
- ...rest,
302
+ ...state,
244
303
  canvas: {
304
+ ...canvas,
245
305
  triggers,
246
306
  blocks: newBlocks
247
307
  }
248
308
  };
249
- },
250
- down: () => {
251
- throw new Error("Migration down not implemented");
252
309
  }
253
310
  }),
254
- createMigration({
311
+ createMigration$1({
255
312
  version: "3.0.0",
256
- up: (state) => {
257
- return {
258
- ...state,
259
- type: "default"
260
- };
261
- },
262
- down: () => {
263
- throw new Error("Migration down not implemented");
264
- }
313
+ up: (state) => ({
314
+ ...state,
315
+ type: "default"
316
+ })
265
317
  }),
266
- createMigration({
318
+ createMigration$1({
267
319
  version: "4.0.0",
268
- up: finalVersion,
269
- down: () => {
270
- throw new Error("Migration down not implemented");
320
+ up: (_state) => {
321
+ const state = _state;
322
+ if (state.type === "simple") return {
323
+ name: state.name,
324
+ description: state.description,
325
+ canvas: {
326
+ blocks: [],
327
+ triggers: []
328
+ },
329
+ variables: []
330
+ };
331
+ const migrateBlock = (block, pluginsMap) => {
332
+ if (!block) return;
333
+ if (block.origin?.pluginId) {
334
+ block.origin.pluginId = getStrictPluginId(block.origin.pluginId);
335
+ block.origin.version = pluginsMap[block.origin.pluginId] ?? "latest";
336
+ }
337
+ };
338
+ const normalizedPlugins = {};
339
+ if (state.plugins) for (const [key, val] of Object.entries(state.plugins)) normalizedPlugins[getStrictPluginId(key)] = val;
340
+ if (state.canvas) {
341
+ for (const block of state.canvas.blocks ?? []) migrateBlock(block, normalizedPlugins);
342
+ for (const trigger of state.canvas.triggers ?? []) migrateBlock(trigger, normalizedPlugins);
343
+ }
344
+ const { plugins: _dropped, type: _type, ...rest } = state;
345
+ return rest;
271
346
  }
347
+ }),
348
+ createMigration$1({
349
+ version: "5.0.0",
350
+ up: finalVersion
272
351
  })
273
352
  ]
274
353
  });
354
+ const LEGACY_ID_MAP = {
355
+ construct: "@pipelab/plugin-construct",
356
+ filesystem: "@pipelab/plugin-filesystem",
357
+ system: "@pipelab/plugin-system",
358
+ steam: "@pipelab/plugin-steam",
359
+ itch: "@pipelab/plugin-itch",
360
+ electron: "@pipelab/plugin-electron",
361
+ discord: "@pipelab/plugin-discord",
362
+ dicord: "@pipelab/plugin-discord",
363
+ "@pipelab/plugin-dicord": "@pipelab/plugin-discord",
364
+ poki: "@pipelab/plugin-poki",
365
+ nvpatch: "@pipelab/plugin-nvpatch",
366
+ tauri: "@pipelab/plugin-tauri",
367
+ minify: "@pipelab/plugin-minify",
368
+ netlify: "@pipelab/plugin-netlify"
369
+ };
370
+ const getStrictPluginId = (pluginId) => {
371
+ if (!pluginId) return pluginId;
372
+ return LEGACY_ID_MAP[pluginId] || pluginId;
373
+ };
374
+ const normalizeBlockPluginId = (block) => {
375
+ if (!block) return false;
376
+ let changed = false;
377
+ if (block.origin?.pluginId) {
378
+ const strictId = getStrictPluginId(block.origin.pluginId);
379
+ if (block.origin.pluginId !== strictId) {
380
+ block.origin.pluginId = strictId;
381
+ changed = true;
382
+ }
383
+ }
384
+ return changed;
385
+ };
386
+ const normalizePipelineConfig$1 = (state) => {
387
+ if (!state) return false;
388
+ let changed = false;
389
+ if (state.type === "default" && state.canvas) {
390
+ if (Array.isArray(state.canvas.blocks)) {
391
+ for (const block of state.canvas.blocks) if (normalizeBlockPluginId(block)) changed = true;
392
+ }
393
+ if (Array.isArray(state.canvas.triggers)) {
394
+ for (const trigger of state.canvas.triggers) if (normalizeBlockPluginId(trigger)) changed = true;
395
+ }
396
+ }
397
+ return changed;
398
+ };
275
399
  const configRegistry$1 = {
276
400
  settings: appSettingsMigrator$1,
277
401
  projects: fileRepoMigrations$1,
278
- pipeline: savedFileMigrator$1
402
+ pipeline: savedFileMigrator$1,
403
+ connections: connectionsMigrator$1
279
404
  };
280
405
  //#endregion
406
+ //#region src/save-location.ts
407
+ const SaveLocationInternalValidator = object({
408
+ id: string(),
409
+ project: string(),
410
+ lastModified: string(),
411
+ type: literal("internal"),
412
+ configName: string()
413
+ });
414
+ /** @deprecated External pipeline files are deprecated and will be removed in future versions. */
415
+ const SaveLocationExternalValidator = object({
416
+ id: string(),
417
+ project: string(),
418
+ path: string(),
419
+ lastModified: string(),
420
+ type: literal("external"),
421
+ summary: object({
422
+ plugins: array(string()),
423
+ name: string(),
424
+ description: string()
425
+ })
426
+ });
427
+ const SaveLocationPipelabCloudValidator = object({
428
+ id: string(),
429
+ project: string(),
430
+ type: literal("pipelab-cloud")
431
+ });
432
+ const SaveLocationValidator = union([
433
+ SaveLocationExternalValidator,
434
+ SaveLocationInternalValidator,
435
+ SaveLocationPipelabCloudValidator
436
+ ]);
437
+ //#endregion
438
+ //#region src/config/projects-definition.ts
439
+ const FileRepoValidatorV1 = object({
440
+ version: literal("1.0.0"),
441
+ data: optional(record(string(), SaveLocationValidator), {})
442
+ });
443
+ const FileRepoProjectValidatorV2 = object({
444
+ id: string(),
445
+ name: string(),
446
+ description: string()
447
+ });
448
+ const FileRepoValidatorV2 = object({
449
+ version: literal("2.0.0"),
450
+ projects: array(FileRepoProjectValidatorV2),
451
+ pipelines: optional(array(SaveLocationValidator), [])
452
+ });
453
+ const FileRepoValidator = FileRepoValidatorV2;
454
+ //#endregion
281
455
  //#region src/apis.ts
282
456
  const ShellChannels = ["dialog:showOpenDialog", "dialog:showSaveDialog"];
283
457
  //#endregion
@@ -395,7 +569,58 @@ const AppSettingsValidatorV7 = object({
395
569
  maxAge: number()
396
570
  }) })
397
571
  });
398
- const AppSettingsValidator = AppSettingsValidatorV7;
572
+ const AppSettingsValidatorV8 = object({
573
+ theme: union([literal("light"), literal("dark")]),
574
+ version: literal("8.0.0"),
575
+ locale: union([
576
+ literal("en-US"),
577
+ literal("fr-FR"),
578
+ literal("pt-BR"),
579
+ literal("zh-CN"),
580
+ literal("es-ES"),
581
+ literal("de-DE")
582
+ ]),
583
+ tours: object({
584
+ dashboard: object({
585
+ step: number(),
586
+ completed: boolean()
587
+ }),
588
+ editor: object({
589
+ step: number(),
590
+ completed: boolean()
591
+ })
592
+ }),
593
+ autosave: boolean(),
594
+ agents: array(object({
595
+ id: string(),
596
+ name: string(),
597
+ url: string()
598
+ })),
599
+ buildHistory: object({ retentionPolicy: object({
600
+ enabled: boolean(),
601
+ maxEntries: number(),
602
+ maxAge: number()
603
+ }) }),
604
+ plugins: array(object({
605
+ name: string(),
606
+ enabled: boolean(),
607
+ description: string()
608
+ })),
609
+ isInternalMigrationBannerClosed: optional(boolean(), false)
610
+ });
611
+ const ConnectionValidator = looseObject({
612
+ id: string(),
613
+ pluginName: string(),
614
+ name: string(),
615
+ createdAt: string(),
616
+ isDefault: boolean()
617
+ });
618
+ const ConnectionsValidatorV1 = object({
619
+ version: literal("1.0.0"),
620
+ connections: array(ConnectionValidator)
621
+ });
622
+ const ConnectionsValidator = ConnectionsValidatorV1;
623
+ const AppSettingsValidator = AppSettingsValidatorV8;
399
624
  //#endregion
400
625
  //#region src/logger.ts
401
626
  const createDefaultLogger = () => new Logger({
@@ -576,9 +801,6 @@ const processGraph = async (options) => {
576
801
  options.steps[rawNode.uid].outputs = result.result.outputs;
577
802
  }
578
803
  options.onNodeExit(rawNode);
579
- } else if (rawNode.type === "loop") {
580
- options.onNodeEnter(rawNode);
581
- options.onNodeExit(rawNode);
582
804
  } else if (rawNode.type === "comment") {} else if (rawNode.type === "event") {
583
805
  options.onNodeEnter(rawNode);
584
806
  options.onNodeExit(rawNode);
@@ -608,7 +830,11 @@ var en_US_default = {
608
830
  "storage": "Storage",
609
831
  "integrations": "Integrations",
610
832
  "advanced": "Advanced",
611
- "billing": "Billing"
833
+ "billing": "Billing",
834
+ "plugins": "Plugins",
835
+ "core-plugins": "Core Plugins",
836
+ "community-plugins": "Community Plugins",
837
+ "versions": "Versions"
612
838
  },
613
839
  "pipeline-cache-folder": "Pipeline Cache Folder:",
614
840
  "enter-or-browse-for-a-folder": "Enter or browse for a folder",
@@ -672,7 +898,14 @@ var en_US_default = {
672
898
  "your-project-has-be-saved-successfully": "Your project has be saved successfully",
673
899
  "view-history": "History",
674
900
  "add-plugin": "Add plugin",
675
- "display-advanced-nodes": "Display advanced nodes"
901
+ "display-advanced-nodes": "Display advanced nodes",
902
+ "project-settings": "Pipeline Settings",
903
+ "jit-loading-title": "Installing Required Plugins",
904
+ "jit-loading-subtitle": "Please wait while Pipelab fetches and prepares the necessary nodes for this pipeline.",
905
+ "jit-loading-status": "Downloading and building plugin packages…",
906
+ "validation-failed": "Validation Failed",
907
+ "validation-plugin-disabled-or-missing": "Plugin \"{pluginId}\" is disabled or not installed (required by \"{nodeName}\").",
908
+ "validation-missing-param": "Block \"{nodeName}\": missing required parameter \"{paramName}\"."
676
909
  },
677
910
  home: {
678
911
  "invalid-preset": "Invalid preset",
@@ -718,7 +951,11 @@ var en_US_default = {
718
951
  "confirm-migration-message": "Are you sure you want to migrate this pipeline to internal storage? This will create a copy in the internal storage managed by Pipelab.",
719
952
  "migrate-pipeline": "Migrate Pipeline",
720
953
  "migration-success": "Pipeline migrated successfully",
721
- "migrate-to-internal": "Migrate to Internal"
954
+ "migrate-to-internal": "Migrate to Internal",
955
+ "only-internal-supported-notice": "Pipelab now stores pipelines internally. External pipeline files are deprecated. You can still import external files as internal pipelines.",
956
+ "import-pipeline": "Import Pipeline",
957
+ "import-success": "Pipeline imported successfully",
958
+ "failed-to-read-file": "Failed to read the selected file"
722
959
  },
723
960
  scenarios: { "scenarios": "Scenarios" },
724
961
  tour: {
@@ -762,7 +999,11 @@ var fr_FR_default = {
762
999
  "storage": "Stockage",
763
1000
  "integrations": "Intégrations",
764
1001
  "advanced": "Avancé",
765
- "billing": "Facturation"
1002
+ "billing": "Facturation",
1003
+ "plugins": "Plugins",
1004
+ "core-plugins": "Plugins de base",
1005
+ "community-plugins": "Plugins de la communauté",
1006
+ "versions": "Versions"
766
1007
  },
767
1008
  "clearTempFolders": "Nettoyer automatiquement les fichiers temporaires",
768
1009
  "clearTempFoldersDescription": "Lorsque cette option est activée, tous les fichiers temporaires créés lors de l'exécution du pipeline seront automatiquement supprimés une fois le pipeline terminé. Cela permet d'économiser de l'espace disque, mais vous devrez peut-être copier vous-même des artefacts pour les préserver.",
@@ -851,7 +1092,11 @@ var pt_BR_default = {
851
1092
  "storage": "Armazenagem",
852
1093
  "integrations": "Integrações",
853
1094
  "advanced": "Avançado",
854
- "billing": "Pagamento"
1095
+ "billing": "Pagamento",
1096
+ "plugins": "Plugins",
1097
+ "core-plugins": "Plugins nativos",
1098
+ "community-plugins": "Plugins da comunidade",
1099
+ "versions": "Versões"
855
1100
  },
856
1101
  "clearTempFolders": "Automatically clean up temporary files",
857
1102
  "clearTempFoldersDescription": "When enabled, all temporary files created during pipeline execution will be automatically deleted after the pipeline completes. This helps save disk space but you may need to copy artifacts yourself to preserve them.",
@@ -937,7 +1182,11 @@ var zh_CN_default = {
937
1182
  "storage": "Storage",
938
1183
  "integrations": "Integrations",
939
1184
  "advanced": "Advanced",
940
- "billing": "Billing"
1185
+ "billing": "Billing",
1186
+ "plugins": "Plugins",
1187
+ "core-plugins": "核心插件",
1188
+ "community-plugins": "社区插件",
1189
+ "versions": "版本"
941
1190
  },
942
1191
  "clearTempFolders": "Automatically clean up temporary files",
943
1192
  "clearTempFoldersDescription": "When enabled, all temporary files created during pipeline execution will be automatically deleted after the pipeline completes. This helps save disk space but you may need to copy artifacts yourself to preserve them.",
@@ -1023,7 +1272,11 @@ var es_ES_default = {
1023
1272
  "storage": "Storage",
1024
1273
  "integrations": "Integrations",
1025
1274
  "advanced": "Advanced",
1026
- "billing": "Billing"
1275
+ "billing": "Billing",
1276
+ "plugins": "Plugins",
1277
+ "core-plugins": "Complementos principales",
1278
+ "community-plugins": "Complementos de la comunidad",
1279
+ "versions": "Versiones"
1027
1280
  },
1028
1281
  "clearTempFolders": "Automatically clean up temporary files",
1029
1282
  "clearTempFoldersDescription": "Cuando está habilitado, todos los archivos temporales creados durante la ejecución del pipeline se eliminarán automáticamente después de que el pipeline se complete. Esto ayuda a ahorrar espacio en el disco, pero puede que necesite copiar los artefactos usted mismo para preservarlos.",
@@ -1109,7 +1362,11 @@ var de_DE_default = {
1109
1362
  "storage": "Storage",
1110
1363
  "integrations": "Integrations",
1111
1364
  "advanced": "Advanced",
1112
- "billing": "Billing"
1365
+ "billing": "Billing",
1366
+ "plugins": "Plugins",
1367
+ "core-plugins": "Core-Plugins",
1368
+ "community-plugins": "Community-Plugins",
1369
+ "versions": "Versionen"
1113
1370
  },
1114
1371
  "clearTempFolders": "Automatically clean up temporary files",
1115
1372
  "clearTempFoldersDescription": "Wenn aktiviert, werden alle temporären Dateien, die während der Pipeline-Ausführung erstellt wurden, automatisch gelöscht, nachdem die Pipeline abgeschlossen ist. Dies hilft, Speicherplatz auf der Festplatte zu sparen, aber möglicherweise müssen Sie selbst Artefakte kopieren, um sie zu bewahren.",
@@ -1180,7 +1437,8 @@ var de_DE_default = {
1180
1437
  //#region src/model.ts
1181
1438
  const OriginValidator = object({
1182
1439
  pluginId: string(),
1183
- nodeId: string()
1440
+ nodeId: string(),
1441
+ version: optional(pipe(string(), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent.")))
1184
1442
  });
1185
1443
  const BlockActionValidatorV1 = object({
1186
1444
  type: literal("action"),
@@ -1193,7 +1451,7 @@ const EditorParamValidatorV3 = union([literal("simple"), literal("editor")]);
1193
1451
  const BlockActionValidatorV3 = object({
1194
1452
  type: literal("action"),
1195
1453
  uid: string(),
1196
- name: pipe(optional(string()), description("A custom name provided by the user")),
1454
+ name: optional(pipe(string(), description("A custom name provided by the user"))),
1197
1455
  disabled: optional(boolean()),
1198
1456
  params: record(string(), object({
1199
1457
  editor: EditorParamValidatorV3,
@@ -1201,21 +1459,6 @@ const BlockActionValidatorV3 = object({
1201
1459
  })),
1202
1460
  origin: OriginValidator
1203
1461
  });
1204
- object({
1205
- type: literal("condition"),
1206
- uid: string(),
1207
- origin: OriginValidator,
1208
- params: record(string(), any()),
1209
- branchTrue: lazy(() => array(BlockValidator)),
1210
- branchFalse: lazy(() => array(BlockValidator))
1211
- });
1212
- object({
1213
- type: literal("loop"),
1214
- uid: string(),
1215
- origin: OriginValidator,
1216
- params: record(string(), any()),
1217
- children: lazy(() => array(BlockValidator))
1218
- });
1219
1462
  const BlockEventValidator = object({
1220
1463
  type: literal("event"),
1221
1464
  uid: string(),
@@ -1231,7 +1474,6 @@ object({
1231
1474
  const BlockValidatorV1 = variant("type", [BlockActionValidatorV1, BlockEventValidator]);
1232
1475
  const BlockValidatorV2 = variant("type", [BlockActionValidatorV1]);
1233
1476
  const BlockValidatorV3 = variant("type", [BlockActionValidatorV3]);
1234
- const BlockValidator = BlockValidatorV3;
1235
1477
  const CanvasValidatorV1 = object({ blocks: array(BlockValidatorV1) });
1236
1478
  const CanvasValidatorV2 = object({
1237
1479
  blocks: array(BlockValidatorV2),
@@ -1263,19 +1505,59 @@ const SavedFileValidatorV3 = object({
1263
1505
  canvas: CanvasValidatorV3,
1264
1506
  variables: array(VariableValidatorV1)
1265
1507
  });
1266
- const SavedFileDefaultValidator = object({
1508
+ const SavedFileDefaultValidatorV4 = object({
1267
1509
  version: literal("4.0.0"),
1268
1510
  type: literal("default"),
1269
1511
  name: string(),
1270
1512
  description: string(),
1513
+ plugins: optional(record(string(), string())),
1271
1514
  canvas: CanvasValidatorV3,
1272
1515
  variables: array(VariableValidatorV1)
1273
1516
  });
1274
- const SavedFileSimpleValidator = object({
1517
+ const SavedFileSimpleValidatorV4 = object({
1275
1518
  version: literal("4.0.0"),
1276
1519
  type: literal("simple"),
1277
1520
  name: string(),
1278
1521
  description: string(),
1522
+ plugins: optional(record(string(), string())),
1523
+ source: object({
1524
+ type: union([
1525
+ literal("c3-html"),
1526
+ literal("c3-nwjs"),
1527
+ literal("godot"),
1528
+ literal("html")
1529
+ ]),
1530
+ path: string()
1531
+ }),
1532
+ packaging: object({ enabled: boolean() }),
1533
+ publishing: object({
1534
+ steam: object({
1535
+ enabled: boolean(),
1536
+ appId: optional(string())
1537
+ }),
1538
+ itch: object({
1539
+ enabled: boolean(),
1540
+ project: optional(string())
1541
+ }),
1542
+ poki: object({
1543
+ enabled: boolean(),
1544
+ gameId: optional(string())
1545
+ })
1546
+ })
1547
+ });
1548
+ const SavedFileDefaultValidatorV5 = object({
1549
+ version: literal("5.0.0"),
1550
+ name: string(),
1551
+ description: string(),
1552
+ canvas: CanvasValidatorV3,
1553
+ variables: array(VariableValidatorV1)
1554
+ });
1555
+ const SavedFileSimpleValidatorV5 = object({
1556
+ version: literal("5.0.0"),
1557
+ type: literal("simple"),
1558
+ name: string(),
1559
+ description: string(),
1560
+ plugins: record(string(), string()),
1279
1561
  source: object({
1280
1562
  type: union([
1281
1563
  literal("c3-html"),
@@ -1301,8 +1583,9 @@ const SavedFileSimpleValidator = object({
1301
1583
  })
1302
1584
  })
1303
1585
  });
1304
- const SavedFileValidatorV4 = union([SavedFileDefaultValidator, SavedFileSimpleValidator]);
1305
- const SavedFileValidator = SavedFileValidatorV4;
1586
+ const SavedFileValidatorV4 = union([SavedFileDefaultValidatorV4, SavedFileSimpleValidatorV4]);
1587
+ const SavedFileValidatorV5 = SavedFileDefaultValidatorV5;
1588
+ const SavedFileValidator = SavedFileValidatorV5;
1306
1589
  //#endregion
1307
1590
  //#region ../../node_modules/vue/node_modules/@vue/shared/dist/shared.cjs.prod.js
1308
1591
  /**
@@ -43447,7 +43730,13 @@ const plugins = (0, vue_exports.shallowRef)([]);
43447
43730
  const usePlugins = () => {
43448
43731
  const load = () => {};
43449
43732
  const registerPlugins = (newPlugins) => {
43450
- plugins.value.push(...newPlugins);
43733
+ const current = [...plugins.value];
43734
+ for (const np of newPlugins) {
43735
+ const idx = current.findIndex((p) => p.id === np.id);
43736
+ if (idx !== -1) current[idx] = np;
43737
+ else current.push(np);
43738
+ }
43739
+ plugins.value = current;
43451
43740
  };
43452
43741
  return {
43453
43742
  load,
@@ -43554,18 +43843,6 @@ const createExpression = (expression) => {
43554
43843
  type: "expression"
43555
43844
  };
43556
43845
  };
43557
- const createCondition = (condition) => {
43558
- return {
43559
- ...condition,
43560
- type: "condition"
43561
- };
43562
- };
43563
- const createLoop = (loop) => {
43564
- return {
43565
- ...loop,
43566
- type: "loop"
43567
- };
43568
- };
43569
43846
  const createEvent = (event) => {
43570
43847
  return {
43571
43848
  ...event,
@@ -43573,38 +43850,6 @@ const createEvent = (event) => {
43573
43850
  };
43574
43851
  };
43575
43852
  //#endregion
43576
- //#region src/save-location.ts
43577
- const SaveLocationInternalValidator = object({
43578
- id: string(),
43579
- project: string(),
43580
- lastModified: string(),
43581
- type: literal("internal"),
43582
- configName: string()
43583
- });
43584
- /** @deprecated External pipeline files are deprecated and will be removed in future versions. */
43585
- const SaveLocationExternalValidator = object({
43586
- id: string(),
43587
- project: string(),
43588
- path: string(),
43589
- lastModified: string(),
43590
- type: literal("external"),
43591
- summary: object({
43592
- plugins: array(string()),
43593
- name: string(),
43594
- description: string()
43595
- })
43596
- });
43597
- const SaveLocationPipelabCloudValidator = object({
43598
- id: string(),
43599
- project: string(),
43600
- type: literal("pipelab-cloud")
43601
- });
43602
- const SaveLocationValidator = union([
43603
- SaveLocationExternalValidator,
43604
- SaveLocationInternalValidator,
43605
- SaveLocationPipelabCloudValidator
43606
- ]);
43607
- //#endregion
43608
43853
  //#region src/subscription-errors.ts
43609
43854
  var SubscriptionRequiredError = class extends Error {
43610
43855
  code = "SUBSCRIPTION_REQUIRED";
@@ -43692,6 +43937,24 @@ const supabase = (options) => {
43692
43937
  //#endregion
43693
43938
  //#region src/utils.ts
43694
43939
  const foo = "bar";
43940
+ const transformUrl = (url) => {
43941
+ if (url && typeof url === "string") {
43942
+ const getHost = () => {
43943
+ if (typeof window !== "undefined") if (window.location.port === "5173") return `http://${window.location.hostname}:33753`;
43944
+ else return `${window.location.protocol}//${window.location.host}`;
43945
+ return "http://localhost:33753";
43946
+ };
43947
+ if (url.startsWith("file://")) {
43948
+ const filePath = url.substring(7);
43949
+ return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
43950
+ }
43951
+ if (url.startsWith("media://")) {
43952
+ const filePath = url.replace(/^media:\/\/+/, "/");
43953
+ return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
43954
+ }
43955
+ }
43956
+ return url || "";
43957
+ };
43695
43958
  //#endregion
43696
43959
  //#region src/validation.ts
43697
43960
  const isRequired = (param) => {
@@ -43749,20 +44012,6 @@ object({
43749
44012
  projects: array(FileRepoProjectValidatorV2$1),
43750
44013
  pipelines: optional(array(SaveLocationValidator), [])
43751
44014
  });
43752
- object({
43753
- version: literal("1.0.0"),
43754
- data: optional(record(string(), SaveLocationValidator), {})
43755
- });
43756
- const FileRepoProjectValidatorV2 = object({
43757
- id: string(),
43758
- name: string(),
43759
- description: string()
43760
- });
43761
- object({
43762
- version: literal("2.0.0"),
43763
- projects: array(FileRepoProjectValidatorV2),
43764
- pipelines: optional(array(SaveLocationValidator), [])
43765
- });
43766
44015
  //#endregion
43767
44016
  //#region src/index.ts
43768
44017
  const appSettingsMigrator = appSettingsMigrator$1;
@@ -43771,7 +44020,10 @@ const fileRepoMigrations = fileRepoMigrations$1;
43771
44020
  const defaultFileRepo = defaultFileRepo$1;
43772
44021
  const savedFileMigrator = savedFileMigrator$1;
43773
44022
  const configRegistry = configRegistry$1;
44023
+ const normalizePipelineConfig = normalizePipelineConfig$1;
44024
+ const connectionsMigrator = connectionsMigrator$1;
44025
+ const defaultConnections = defaultConnections$1;
43774
44026
  //#endregion
43775
- export { AppSettingsValidator, AppSettingsValidatorV1, AppSettingsValidatorV2, AppSettingsValidatorV3, AppSettingsValidatorV4, AppSettingsValidatorV5, AppSettingsValidatorV6, AppSettingsValidatorV7, BenefitNotFoundError, EditorParamValidatorV3, OriginValidator, RELEASE_SYNC, SaveLocationExternalValidator, SaveLocationInternalValidator, SaveLocationPipelabCloudValidator, SaveLocationValidator, SavedFileDefaultValidator, SavedFileSimpleValidator, SavedFileValidator, SavedFileValidatorV1, SavedFileValidatorV2, SavedFileValidatorV3, SavedFileValidatorV4, ShellChannels, SubscriptionExpiredError, SubscriptionRequiredError, UnauthorizedError, VariableValidatorV1, WebSocketConnectionError, WebSocketError, WebSocketTimeoutError, appSettingsMigrator, configRegistry, createAction, createArray, createBooleanParam, createColorPicker, createCondition, createDefinition, createEvent, createExpression, createLoop, createNetlifySiteParam, createNodeDefinition, createNumberParam, createPasswordParam, createPathParam, createQuickJs, createQuickJsFromVariant, createRawParam, createStringParam, createSubscriptionError, createVersionSchema, de_DE_default as de_DE, defaultAppSettings, defaultFileRepo, en_US_default as en_US, es_ES_default as es_ES, fileRepoMigrations, fmt, foo, fr_FR_default as fr_FR, getSubscriptionErrorMessage, isRenderer, isRequired, isSubscriptionError, isSupabaseAvailable, isWebSocketErrorMessage, isWebSocketRequestMessage, isWebSocketResponseMessage, makeResolvedParams, newVariant, processGraph, pt_BR_default as pt_BR, savedFileMigrator, supabase, useLogger, usePlugins, variableToFormattedVariable, zh_CN_default as zh_CN };
44027
+ export { AppSettingsValidator, AppSettingsValidatorV1, AppSettingsValidatorV2, AppSettingsValidatorV3, AppSettingsValidatorV4, AppSettingsValidatorV5, AppSettingsValidatorV6, AppSettingsValidatorV7, AppSettingsValidatorV8, BenefitNotFoundError, ConnectionValidator, ConnectionsValidator, ConnectionsValidatorV1, EditorParamValidatorV3, FileRepoProjectValidatorV2, FileRepoValidator, FileRepoValidatorV1, FileRepoValidatorV2, OriginValidator, RELEASE_SYNC, SaveLocationExternalValidator, SaveLocationInternalValidator, SaveLocationPipelabCloudValidator, SaveLocationValidator, SavedFileDefaultValidatorV4, SavedFileDefaultValidatorV5, SavedFileSimpleValidatorV4, SavedFileSimpleValidatorV5, SavedFileValidator, SavedFileValidatorV1, SavedFileValidatorV2, SavedFileValidatorV3, SavedFileValidatorV4, SavedFileValidatorV5, ShellChannels, SubscriptionExpiredError, SubscriptionRequiredError, UnauthorizedError, VariableValidatorV1, WebSocketConnectionError, WebSocketError, WebSocketTimeoutError, appSettingsMigrator, configRegistry, connectionsMigrator, createAction, createArray, createBooleanParam, createColorPicker, createDefinition, createEvent, createExpression, createNetlifySiteParam, createNodeDefinition, createNumberParam, createPasswordParam, createPathParam, createQuickJs, createQuickJsFromVariant, createRawParam, createStringParam, createSubscriptionError, createVersionSchema, de_DE_default as de_DE, defaultAppSettings, defaultConnections, defaultFileRepo, en_US_default as en_US, es_ES_default as es_ES, fileRepoMigrations, fmt, foo, fr_FR_default as fr_FR, getSubscriptionErrorMessage, isRenderer, isRequired, isSubscriptionError, isSupabaseAvailable, isWebSocketErrorMessage, isWebSocketRequestMessage, isWebSocketResponseMessage, makeResolvedParams, newVariant, normalizePipelineConfig, processGraph, pt_BR_default as pt_BR, savedFileMigrator, supabase, transformUrl, useLogger, usePlugins, variableToFormattedVariable, zh_CN_default as zh_CN };
43776
44028
 
43777
44029
  //# sourceMappingURL=index.mjs.map