@pipelab/shared 1.0.0-beta.6 → 1.0.0-beta.8
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/CHANGELOG.md +16 -0
- package/dist/index.d.mts +244 -85
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +303 -55
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/apis.ts +39 -13
- package/src/config/migrators.ts +160 -12
- package/src/config/settings-definition.ts +2 -0
- package/src/config.schema.ts +52 -2
- package/src/graph.ts +2 -70
- package/src/i18n/de_DE.json +4 -1
- package/src/i18n/en_US.json +17 -3
- package/src/i18n/es_ES.json +4 -1
- package/src/i18n/fr_FR.json +4 -1
- package/src/i18n/pt_BR.json +4 -1
- package/src/i18n/zh_CN.json +4 -1
- package/src/index.ts +2 -0
- package/src/ipc.types.ts +2 -0
- package/src/model.test.ts +176 -1
- package/src/model.ts +49 -42
- package/src/plugins/definitions.ts +11 -55
- package/src/plugins.ts +10 -1
- package/src/utils.ts +26 -0
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMigration, createMigrator, finalVersion } from "@pipelab/migration";
|
|
2
|
-
import { any, array, boolean, custom, description,
|
|
2
|
+
import { any, array, boolean, custom, description, literal, 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,12 +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
|
+
];
|
|
42
104
|
const createMigration$1 = (config) => createMigration(config);
|
|
43
105
|
const settingsMigratorInternal = createMigrator();
|
|
44
106
|
const defaultAppSettings$1 = settingsMigratorInternal.createDefault({
|
|
45
107
|
locale: "en-US",
|
|
46
108
|
theme: "light",
|
|
47
|
-
version: "
|
|
109
|
+
version: "8.0.0",
|
|
48
110
|
autosave: true,
|
|
49
111
|
agents: [],
|
|
50
112
|
tours: {
|
|
@@ -61,7 +123,9 @@ const defaultAppSettings$1 = settingsMigratorInternal.createDefault({
|
|
|
61
123
|
enabled: false,
|
|
62
124
|
maxEntries: 50,
|
|
63
125
|
maxAge: 30
|
|
64
|
-
} }
|
|
126
|
+
} },
|
|
127
|
+
plugins: DEFAULT_PLUGINS,
|
|
128
|
+
isInternalMigrationBannerClosed: false
|
|
65
129
|
});
|
|
66
130
|
const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
|
|
67
131
|
defaultValue: defaultAppSettings$1,
|
|
@@ -112,19 +176,22 @@ const appSettingsMigrator$1 = settingsMigratorInternal.createMigrations({
|
|
|
112
176
|
createMigration$1({
|
|
113
177
|
version: "6.0.0",
|
|
114
178
|
up: (state) => {
|
|
179
|
+
const { cacheFolder: _, clearTemporaryFoldersOnPipelineEnd: __, ...rest } = state;
|
|
115
180
|
return {
|
|
116
|
-
...
|
|
181
|
+
...rest,
|
|
117
182
|
agents: [],
|
|
118
183
|
buildHistory: { retentionPolicy: {
|
|
119
184
|
enabled: false,
|
|
120
185
|
maxEntries: 50,
|
|
121
186
|
maxAge: 30
|
|
122
|
-
} }
|
|
187
|
+
} },
|
|
188
|
+
plugins: DEFAULT_PLUGINS,
|
|
189
|
+
isInternalMigrationBannerClosed: false
|
|
123
190
|
};
|
|
124
191
|
}
|
|
125
192
|
}),
|
|
126
193
|
createMigration$1({
|
|
127
|
-
version: "
|
|
194
|
+
version: "8.0.0",
|
|
128
195
|
up: finalVersion
|
|
129
196
|
})
|
|
130
197
|
]
|
|
@@ -175,8 +242,7 @@ const savedFileDefaultValue = savedFileMigratorInternal.createDefault({
|
|
|
175
242
|
description: "",
|
|
176
243
|
name: "",
|
|
177
244
|
variables: [],
|
|
178
|
-
|
|
179
|
-
version: "4.0.0"
|
|
245
|
+
version: "5.0.0"
|
|
180
246
|
});
|
|
181
247
|
const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
|
|
182
248
|
defaultValue: savedFileDefaultValue,
|
|
@@ -239,10 +305,88 @@ const savedFileMigrator$1 = savedFileMigratorInternal.createMigrations({
|
|
|
239
305
|
}),
|
|
240
306
|
createMigration$1({
|
|
241
307
|
version: "4.0.0",
|
|
308
|
+
up: (_state) => {
|
|
309
|
+
const state = _state;
|
|
310
|
+
if (state.type === "simple") return {
|
|
311
|
+
name: state.name,
|
|
312
|
+
description: state.description,
|
|
313
|
+
canvas: {
|
|
314
|
+
blocks: [],
|
|
315
|
+
triggers: []
|
|
316
|
+
},
|
|
317
|
+
variables: []
|
|
318
|
+
};
|
|
319
|
+
const migrateBlock = (block, pluginsMap) => {
|
|
320
|
+
if (!block) return;
|
|
321
|
+
if (block.origin?.pluginId) {
|
|
322
|
+
block.origin.pluginId = getStrictPluginId(block.origin.pluginId);
|
|
323
|
+
block.origin.version = pluginsMap[block.origin.pluginId] ?? "latest";
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
const normalizedPlugins = {};
|
|
327
|
+
if (state.plugins) for (const [key, val] of Object.entries(state.plugins)) normalizedPlugins[getStrictPluginId(key)] = val;
|
|
328
|
+
if (state.canvas) {
|
|
329
|
+
for (const block of state.canvas.blocks ?? []) migrateBlock(block, normalizedPlugins);
|
|
330
|
+
for (const trigger of state.canvas.triggers ?? []) migrateBlock(trigger, normalizedPlugins);
|
|
331
|
+
}
|
|
332
|
+
const { plugins: _dropped, type: _type, ...rest } = state;
|
|
333
|
+
return rest;
|
|
334
|
+
}
|
|
335
|
+
}),
|
|
336
|
+
createMigration$1({
|
|
337
|
+
version: "5.0.0",
|
|
242
338
|
up: finalVersion
|
|
243
339
|
})
|
|
244
340
|
]
|
|
245
341
|
});
|
|
342
|
+
const LEGACY_ID_MAP = {
|
|
343
|
+
construct: "@pipelab/plugin-construct",
|
|
344
|
+
filesystem: "@pipelab/plugin-filesystem",
|
|
345
|
+
system: "@pipelab/plugin-system",
|
|
346
|
+
steam: "@pipelab/plugin-steam",
|
|
347
|
+
itch: "@pipelab/plugin-itch",
|
|
348
|
+
electron: "@pipelab/plugin-electron",
|
|
349
|
+
discord: "@pipelab/plugin-discord",
|
|
350
|
+
dicord: "@pipelab/plugin-discord",
|
|
351
|
+
"@pipelab/plugin-dicord": "@pipelab/plugin-discord",
|
|
352
|
+
poki: "@pipelab/plugin-poki",
|
|
353
|
+
nvpatch: "@pipelab/plugin-nvpatch",
|
|
354
|
+
tauri: "@pipelab/plugin-tauri",
|
|
355
|
+
minify: "@pipelab/plugin-minify",
|
|
356
|
+
netlify: "@pipelab/plugin-netlify"
|
|
357
|
+
};
|
|
358
|
+
const getStrictPluginId = (pluginId) => {
|
|
359
|
+
if (!pluginId) return pluginId;
|
|
360
|
+
if (LEGACY_ID_MAP[pluginId]) return LEGACY_ID_MAP[pluginId];
|
|
361
|
+
if (pluginId.startsWith("@") || pluginId.includes("/") || pluginId.startsWith("pipelab-plugin-")) return pluginId;
|
|
362
|
+
const prefixed = `@pipelab/plugin-${pluginId}`;
|
|
363
|
+
return LEGACY_ID_MAP[prefixed] || prefixed;
|
|
364
|
+
};
|
|
365
|
+
const normalizeBlockPluginId = (block) => {
|
|
366
|
+
if (!block) return false;
|
|
367
|
+
let changed = false;
|
|
368
|
+
if (block.origin?.pluginId) {
|
|
369
|
+
const strictId = getStrictPluginId(block.origin.pluginId);
|
|
370
|
+
if (block.origin.pluginId !== strictId) {
|
|
371
|
+
block.origin.pluginId = strictId;
|
|
372
|
+
changed = true;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
return changed;
|
|
376
|
+
};
|
|
377
|
+
const normalizePipelineConfig$1 = (state) => {
|
|
378
|
+
if (!state) return false;
|
|
379
|
+
let changed = false;
|
|
380
|
+
if (state.type === "default" && state.canvas) {
|
|
381
|
+
if (Array.isArray(state.canvas.blocks)) {
|
|
382
|
+
for (const block of state.canvas.blocks) if (normalizeBlockPluginId(block)) changed = true;
|
|
383
|
+
}
|
|
384
|
+
if (Array.isArray(state.canvas.triggers)) {
|
|
385
|
+
for (const trigger of state.canvas.triggers) if (normalizeBlockPluginId(trigger)) changed = true;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return changed;
|
|
389
|
+
};
|
|
246
390
|
const configRegistry$1 = {
|
|
247
391
|
settings: appSettingsMigrator$1,
|
|
248
392
|
projects: fileRepoMigrations$1,
|
|
@@ -366,7 +510,46 @@ const AppSettingsValidatorV7 = object({
|
|
|
366
510
|
maxAge: number()
|
|
367
511
|
}) })
|
|
368
512
|
});
|
|
369
|
-
const
|
|
513
|
+
const AppSettingsValidatorV8 = object({
|
|
514
|
+
theme: union([literal("light"), literal("dark")]),
|
|
515
|
+
version: literal("8.0.0"),
|
|
516
|
+
locale: union([
|
|
517
|
+
literal("en-US"),
|
|
518
|
+
literal("fr-FR"),
|
|
519
|
+
literal("pt-BR"),
|
|
520
|
+
literal("zh-CN"),
|
|
521
|
+
literal("es-ES"),
|
|
522
|
+
literal("de-DE")
|
|
523
|
+
]),
|
|
524
|
+
tours: object({
|
|
525
|
+
dashboard: object({
|
|
526
|
+
step: number(),
|
|
527
|
+
completed: boolean()
|
|
528
|
+
}),
|
|
529
|
+
editor: object({
|
|
530
|
+
step: number(),
|
|
531
|
+
completed: boolean()
|
|
532
|
+
})
|
|
533
|
+
}),
|
|
534
|
+
autosave: boolean(),
|
|
535
|
+
agents: array(object({
|
|
536
|
+
id: string(),
|
|
537
|
+
name: string(),
|
|
538
|
+
url: string()
|
|
539
|
+
})),
|
|
540
|
+
buildHistory: object({ retentionPolicy: object({
|
|
541
|
+
enabled: boolean(),
|
|
542
|
+
maxEntries: number(),
|
|
543
|
+
maxAge: number()
|
|
544
|
+
}) }),
|
|
545
|
+
plugins: array(object({
|
|
546
|
+
name: string(),
|
|
547
|
+
enabled: boolean(),
|
|
548
|
+
description: string()
|
|
549
|
+
})),
|
|
550
|
+
isInternalMigrationBannerClosed: optional(boolean(), false)
|
|
551
|
+
});
|
|
552
|
+
const AppSettingsValidator = AppSettingsValidatorV8;
|
|
370
553
|
//#endregion
|
|
371
554
|
//#region src/logger.ts
|
|
372
555
|
const createDefaultLogger = () => new Logger({
|
|
@@ -547,9 +730,6 @@ const processGraph = async (options) => {
|
|
|
547
730
|
options.steps[rawNode.uid].outputs = result.result.outputs;
|
|
548
731
|
}
|
|
549
732
|
options.onNodeExit(rawNode);
|
|
550
|
-
} else if (rawNode.type === "loop") {
|
|
551
|
-
options.onNodeEnter(rawNode);
|
|
552
|
-
options.onNodeExit(rawNode);
|
|
553
733
|
} else if (rawNode.type === "comment") {} else if (rawNode.type === "event") {
|
|
554
734
|
options.onNodeEnter(rawNode);
|
|
555
735
|
options.onNodeExit(rawNode);
|
|
@@ -579,7 +759,10 @@ var en_US_default = {
|
|
|
579
759
|
"storage": "Storage",
|
|
580
760
|
"integrations": "Integrations",
|
|
581
761
|
"advanced": "Advanced",
|
|
582
|
-
"billing": "Billing"
|
|
762
|
+
"billing": "Billing",
|
|
763
|
+
"plugins": "Plugins",
|
|
764
|
+
"core-plugins": "Core Plugins",
|
|
765
|
+
"community-plugins": "Community Plugins"
|
|
583
766
|
},
|
|
584
767
|
"pipeline-cache-folder": "Pipeline Cache Folder:",
|
|
585
768
|
"enter-or-browse-for-a-folder": "Enter or browse for a folder",
|
|
@@ -643,7 +826,14 @@ var en_US_default = {
|
|
|
643
826
|
"your-project-has-be-saved-successfully": "Your project has be saved successfully",
|
|
644
827
|
"view-history": "History",
|
|
645
828
|
"add-plugin": "Add plugin",
|
|
646
|
-
"display-advanced-nodes": "Display advanced nodes"
|
|
829
|
+
"display-advanced-nodes": "Display advanced nodes",
|
|
830
|
+
"project-settings": "Pipeline Settings",
|
|
831
|
+
"jit-loading-title": "Installing Required Plugins",
|
|
832
|
+
"jit-loading-subtitle": "Please wait while Pipelab fetches and prepares the necessary nodes for this pipeline.",
|
|
833
|
+
"jit-loading-status": "Downloading and building plugin packages…",
|
|
834
|
+
"validation-failed": "Validation Failed",
|
|
835
|
+
"validation-plugin-disabled-or-missing": "Plugin \"{pluginId}\" is disabled or not installed (required by \"{nodeName}\").",
|
|
836
|
+
"validation-missing-param": "Block \"{nodeName}\": missing required parameter \"{paramName}\"."
|
|
647
837
|
},
|
|
648
838
|
home: {
|
|
649
839
|
"invalid-preset": "Invalid preset",
|
|
@@ -689,7 +879,11 @@ var en_US_default = {
|
|
|
689
879
|
"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.",
|
|
690
880
|
"migrate-pipeline": "Migrate Pipeline",
|
|
691
881
|
"migration-success": "Pipeline migrated successfully",
|
|
692
|
-
"migrate-to-internal": "Migrate to Internal"
|
|
882
|
+
"migrate-to-internal": "Migrate to Internal",
|
|
883
|
+
"only-internal-supported-notice": "Pipelab now stores pipelines internally. External pipeline files are deprecated. You can still import external files as internal pipelines.",
|
|
884
|
+
"import-pipeline": "Import Pipeline",
|
|
885
|
+
"import-success": "Pipeline imported successfully",
|
|
886
|
+
"failed-to-read-file": "Failed to read the selected file"
|
|
693
887
|
},
|
|
694
888
|
scenarios: { "scenarios": "Scenarios" },
|
|
695
889
|
tour: {
|
|
@@ -733,7 +927,10 @@ var fr_FR_default = {
|
|
|
733
927
|
"storage": "Stockage",
|
|
734
928
|
"integrations": "Intégrations",
|
|
735
929
|
"advanced": "Avancé",
|
|
736
|
-
"billing": "Facturation"
|
|
930
|
+
"billing": "Facturation",
|
|
931
|
+
"plugins": "Plugins",
|
|
932
|
+
"core-plugins": "Plugins de base",
|
|
933
|
+
"community-plugins": "Plugins de la communauté"
|
|
737
934
|
},
|
|
738
935
|
"clearTempFolders": "Nettoyer automatiquement les fichiers temporaires",
|
|
739
936
|
"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.",
|
|
@@ -822,7 +1019,10 @@ var pt_BR_default = {
|
|
|
822
1019
|
"storage": "Armazenagem",
|
|
823
1020
|
"integrations": "Integrações",
|
|
824
1021
|
"advanced": "Avançado",
|
|
825
|
-
"billing": "Pagamento"
|
|
1022
|
+
"billing": "Pagamento",
|
|
1023
|
+
"plugins": "Plugins",
|
|
1024
|
+
"core-plugins": "Plugins nativos",
|
|
1025
|
+
"community-plugins": "Plugins da comunidade"
|
|
826
1026
|
},
|
|
827
1027
|
"clearTempFolders": "Automatically clean up temporary files",
|
|
828
1028
|
"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.",
|
|
@@ -908,7 +1108,10 @@ var zh_CN_default = {
|
|
|
908
1108
|
"storage": "Storage",
|
|
909
1109
|
"integrations": "Integrations",
|
|
910
1110
|
"advanced": "Advanced",
|
|
911
|
-
"billing": "Billing"
|
|
1111
|
+
"billing": "Billing",
|
|
1112
|
+
"plugins": "Plugins",
|
|
1113
|
+
"core-plugins": "核心插件",
|
|
1114
|
+
"community-plugins": "社区插件"
|
|
912
1115
|
},
|
|
913
1116
|
"clearTempFolders": "Automatically clean up temporary files",
|
|
914
1117
|
"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.",
|
|
@@ -994,7 +1197,10 @@ var es_ES_default = {
|
|
|
994
1197
|
"storage": "Storage",
|
|
995
1198
|
"integrations": "Integrations",
|
|
996
1199
|
"advanced": "Advanced",
|
|
997
|
-
"billing": "Billing"
|
|
1200
|
+
"billing": "Billing",
|
|
1201
|
+
"plugins": "Plugins",
|
|
1202
|
+
"core-plugins": "Complementos principales",
|
|
1203
|
+
"community-plugins": "Complementos de la comunidad"
|
|
998
1204
|
},
|
|
999
1205
|
"clearTempFolders": "Automatically clean up temporary files",
|
|
1000
1206
|
"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.",
|
|
@@ -1080,7 +1286,10 @@ var de_DE_default = {
|
|
|
1080
1286
|
"storage": "Storage",
|
|
1081
1287
|
"integrations": "Integrations",
|
|
1082
1288
|
"advanced": "Advanced",
|
|
1083
|
-
"billing": "Billing"
|
|
1289
|
+
"billing": "Billing",
|
|
1290
|
+
"plugins": "Plugins",
|
|
1291
|
+
"core-plugins": "Core-Plugins",
|
|
1292
|
+
"community-plugins": "Community-Plugins"
|
|
1084
1293
|
},
|
|
1085
1294
|
"clearTempFolders": "Automatically clean up temporary files",
|
|
1086
1295
|
"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.",
|
|
@@ -1151,7 +1360,8 @@ var de_DE_default = {
|
|
|
1151
1360
|
//#region src/model.ts
|
|
1152
1361
|
const OriginValidator = object({
|
|
1153
1362
|
pluginId: string(),
|
|
1154
|
-
nodeId: string()
|
|
1363
|
+
nodeId: string(),
|
|
1364
|
+
version: pipe(optional(string()), description("Pinned version of the plugin for this block. Falls back to \"latest\" when absent."))
|
|
1155
1365
|
});
|
|
1156
1366
|
const BlockActionValidatorV1 = object({
|
|
1157
1367
|
type: literal("action"),
|
|
@@ -1172,21 +1382,6 @@ const BlockActionValidatorV3 = object({
|
|
|
1172
1382
|
})),
|
|
1173
1383
|
origin: OriginValidator
|
|
1174
1384
|
});
|
|
1175
|
-
object({
|
|
1176
|
-
type: literal("condition"),
|
|
1177
|
-
uid: string(),
|
|
1178
|
-
origin: OriginValidator,
|
|
1179
|
-
params: record(string(), any()),
|
|
1180
|
-
branchTrue: lazy(() => array(BlockValidator)),
|
|
1181
|
-
branchFalse: lazy(() => array(BlockValidator))
|
|
1182
|
-
});
|
|
1183
|
-
object({
|
|
1184
|
-
type: literal("loop"),
|
|
1185
|
-
uid: string(),
|
|
1186
|
-
origin: OriginValidator,
|
|
1187
|
-
params: record(string(), any()),
|
|
1188
|
-
children: lazy(() => array(BlockValidator))
|
|
1189
|
-
});
|
|
1190
1385
|
const BlockEventValidator = object({
|
|
1191
1386
|
type: literal("event"),
|
|
1192
1387
|
uid: string(),
|
|
@@ -1202,7 +1397,6 @@ object({
|
|
|
1202
1397
|
const BlockValidatorV1 = variant("type", [BlockActionValidatorV1, BlockEventValidator]);
|
|
1203
1398
|
const BlockValidatorV2 = variant("type", [BlockActionValidatorV1]);
|
|
1204
1399
|
const BlockValidatorV3 = variant("type", [BlockActionValidatorV3]);
|
|
1205
|
-
const BlockValidator = BlockValidatorV3;
|
|
1206
1400
|
const CanvasValidatorV1 = object({ blocks: array(BlockValidatorV1) });
|
|
1207
1401
|
const CanvasValidatorV2 = object({
|
|
1208
1402
|
blocks: array(BlockValidatorV2),
|
|
@@ -1234,19 +1428,59 @@ const SavedFileValidatorV3 = object({
|
|
|
1234
1428
|
canvas: CanvasValidatorV3,
|
|
1235
1429
|
variables: array(VariableValidatorV1)
|
|
1236
1430
|
});
|
|
1237
|
-
const
|
|
1431
|
+
const SavedFileDefaultValidatorV4 = object({
|
|
1238
1432
|
version: literal("4.0.0"),
|
|
1239
1433
|
type: literal("default"),
|
|
1240
1434
|
name: string(),
|
|
1241
1435
|
description: string(),
|
|
1436
|
+
plugins: optional(record(string(), string())),
|
|
1242
1437
|
canvas: CanvasValidatorV3,
|
|
1243
1438
|
variables: array(VariableValidatorV1)
|
|
1244
1439
|
});
|
|
1245
|
-
const
|
|
1440
|
+
const SavedFileSimpleValidatorV4 = object({
|
|
1246
1441
|
version: literal("4.0.0"),
|
|
1247
1442
|
type: literal("simple"),
|
|
1248
1443
|
name: string(),
|
|
1249
1444
|
description: string(),
|
|
1445
|
+
plugins: optional(record(string(), string())),
|
|
1446
|
+
source: object({
|
|
1447
|
+
type: union([
|
|
1448
|
+
literal("c3-html"),
|
|
1449
|
+
literal("c3-nwjs"),
|
|
1450
|
+
literal("godot"),
|
|
1451
|
+
literal("html")
|
|
1452
|
+
]),
|
|
1453
|
+
path: string()
|
|
1454
|
+
}),
|
|
1455
|
+
packaging: object({ enabled: boolean() }),
|
|
1456
|
+
publishing: object({
|
|
1457
|
+
steam: object({
|
|
1458
|
+
enabled: boolean(),
|
|
1459
|
+
appId: optional(string())
|
|
1460
|
+
}),
|
|
1461
|
+
itch: object({
|
|
1462
|
+
enabled: boolean(),
|
|
1463
|
+
project: optional(string())
|
|
1464
|
+
}),
|
|
1465
|
+
poki: object({
|
|
1466
|
+
enabled: boolean(),
|
|
1467
|
+
gameId: optional(string())
|
|
1468
|
+
})
|
|
1469
|
+
})
|
|
1470
|
+
});
|
|
1471
|
+
const SavedFileDefaultValidatorV5 = object({
|
|
1472
|
+
version: literal("5.0.0"),
|
|
1473
|
+
name: string(),
|
|
1474
|
+
description: string(),
|
|
1475
|
+
canvas: CanvasValidatorV3,
|
|
1476
|
+
variables: array(VariableValidatorV1)
|
|
1477
|
+
});
|
|
1478
|
+
const SavedFileSimpleValidatorV5 = object({
|
|
1479
|
+
version: literal("5.0.0"),
|
|
1480
|
+
type: literal("simple"),
|
|
1481
|
+
name: string(),
|
|
1482
|
+
description: string(),
|
|
1483
|
+
plugins: record(string(), string()),
|
|
1250
1484
|
source: object({
|
|
1251
1485
|
type: union([
|
|
1252
1486
|
literal("c3-html"),
|
|
@@ -1272,8 +1506,9 @@ const SavedFileSimpleValidator = object({
|
|
|
1272
1506
|
})
|
|
1273
1507
|
})
|
|
1274
1508
|
});
|
|
1275
|
-
const SavedFileValidatorV4 = union([
|
|
1276
|
-
const
|
|
1509
|
+
const SavedFileValidatorV4 = union([SavedFileDefaultValidatorV4, SavedFileSimpleValidatorV4]);
|
|
1510
|
+
const SavedFileValidatorV5 = SavedFileDefaultValidatorV5;
|
|
1511
|
+
const SavedFileValidator = SavedFileValidatorV5;
|
|
1277
1512
|
//#endregion
|
|
1278
1513
|
//#region ../../node_modules/vue/node_modules/@vue/shared/dist/shared.cjs.prod.js
|
|
1279
1514
|
/**
|
|
@@ -43418,7 +43653,13 @@ const plugins = (0, vue_exports.shallowRef)([]);
|
|
|
43418
43653
|
const usePlugins = () => {
|
|
43419
43654
|
const load = () => {};
|
|
43420
43655
|
const registerPlugins = (newPlugins) => {
|
|
43421
|
-
plugins.value
|
|
43656
|
+
const current = [...plugins.value];
|
|
43657
|
+
for (const np of newPlugins) {
|
|
43658
|
+
const idx = current.findIndex((p) => p.id === np.id);
|
|
43659
|
+
if (idx !== -1) current[idx] = np;
|
|
43660
|
+
else current.push(np);
|
|
43661
|
+
}
|
|
43662
|
+
plugins.value = current;
|
|
43422
43663
|
};
|
|
43423
43664
|
return {
|
|
43424
43665
|
load,
|
|
@@ -43525,18 +43766,6 @@ const createExpression = (expression) => {
|
|
|
43525
43766
|
type: "expression"
|
|
43526
43767
|
};
|
|
43527
43768
|
};
|
|
43528
|
-
const createCondition = (condition) => {
|
|
43529
|
-
return {
|
|
43530
|
-
...condition,
|
|
43531
|
-
type: "condition"
|
|
43532
|
-
};
|
|
43533
|
-
};
|
|
43534
|
-
const createLoop = (loop) => {
|
|
43535
|
-
return {
|
|
43536
|
-
...loop,
|
|
43537
|
-
type: "loop"
|
|
43538
|
-
};
|
|
43539
|
-
};
|
|
43540
43769
|
const createEvent = (event) => {
|
|
43541
43770
|
return {
|
|
43542
43771
|
...event,
|
|
@@ -43663,6 +43892,24 @@ const supabase = (options) => {
|
|
|
43663
43892
|
//#endregion
|
|
43664
43893
|
//#region src/utils.ts
|
|
43665
43894
|
const foo = "bar";
|
|
43895
|
+
const transformUrl = (url) => {
|
|
43896
|
+
if (url && typeof url === "string") {
|
|
43897
|
+
const getHost = () => {
|
|
43898
|
+
if (typeof window !== "undefined") if (window.location.port === "5173") return `http://${window.location.hostname}:33753`;
|
|
43899
|
+
else return `${window.location.protocol}//${window.location.host}`;
|
|
43900
|
+
return "http://localhost:33753";
|
|
43901
|
+
};
|
|
43902
|
+
if (url.startsWith("file://")) {
|
|
43903
|
+
const filePath = url.substring(7);
|
|
43904
|
+
return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
|
|
43905
|
+
}
|
|
43906
|
+
if (url.startsWith("media://")) {
|
|
43907
|
+
const filePath = url.replace(/^media:\/\/+/, "/");
|
|
43908
|
+
return `${getHost()}/media-file/${encodeURIComponent(filePath)}`;
|
|
43909
|
+
}
|
|
43910
|
+
}
|
|
43911
|
+
return url || "";
|
|
43912
|
+
};
|
|
43666
43913
|
//#endregion
|
|
43667
43914
|
//#region src/validation.ts
|
|
43668
43915
|
const isRequired = (param) => {
|
|
@@ -43742,7 +43989,8 @@ const fileRepoMigrations = fileRepoMigrations$1;
|
|
|
43742
43989
|
const defaultFileRepo = defaultFileRepo$1;
|
|
43743
43990
|
const savedFileMigrator = savedFileMigrator$1;
|
|
43744
43991
|
const configRegistry = configRegistry$1;
|
|
43992
|
+
const normalizePipelineConfig = normalizePipelineConfig$1;
|
|
43745
43993
|
//#endregion
|
|
43746
|
-
export { AppSettingsValidator, AppSettingsValidatorV1, AppSettingsValidatorV2, AppSettingsValidatorV3, AppSettingsValidatorV4, AppSettingsValidatorV5, AppSettingsValidatorV6, AppSettingsValidatorV7, BenefitNotFoundError, EditorParamValidatorV3, OriginValidator, RELEASE_SYNC, SaveLocationExternalValidator, SaveLocationInternalValidator, SaveLocationPipelabCloudValidator, SaveLocationValidator,
|
|
43994
|
+
export { AppSettingsValidator, AppSettingsValidatorV1, AppSettingsValidatorV2, AppSettingsValidatorV3, AppSettingsValidatorV4, AppSettingsValidatorV5, AppSettingsValidatorV6, AppSettingsValidatorV7, AppSettingsValidatorV8, BenefitNotFoundError, EditorParamValidatorV3, 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, 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, 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 };
|
|
43747
43995
|
|
|
43748
43996
|
//# sourceMappingURL=index.mjs.map
|