@pipelab/core-node 1.0.0-beta.2 → 1.0.0-beta.22
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/.oxfmtrc.json +1 -1
- package/CHANGELOG.md +173 -0
- package/dist/config-Bi0ORcTK.mjs +2 -0
- package/dist/config-CFgGRD9U.mjs +265 -0
- package/dist/config-CFgGRD9U.mjs.map +1 -0
- package/dist/index.d.mts +74 -53
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1705 -576
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -5
- package/scratch/simulate-updates.ts +120 -0
- package/src/config.test.ts +232 -0
- package/src/config.ts +111 -50
- package/src/context.ts +117 -5
- package/src/handler-func.ts +2 -77
- package/src/handlers/build-history.ts +60 -90
- package/src/handlers/config.ts +265 -55
- package/src/handlers/engine.ts +32 -35
- package/src/handlers/history.ts +0 -40
- package/src/handlers/index.ts +4 -0
- package/src/handlers/migration.ts +621 -0
- package/src/handlers/plugins.ts +305 -0
- package/src/handlers/system.ts +7 -2
- package/src/index.ts +9 -2
- package/src/plugins-registry.ts +280 -38
- package/src/presets/c3toSteam.ts +13 -7
- package/src/presets/demo.ts +9 -9
- package/src/presets/list.ts +0 -6
- package/src/presets/moreToCome.ts +3 -2
- package/src/presets/newProject.ts +3 -2
- package/src/presets/test-c3-offline.ts +15 -6
- package/src/presets/test-c3-unzip.ts +19 -8
- package/src/runner.ts +2 -8
- package/src/server.ts +45 -4
- package/src/types/runner.ts +2 -30
- package/src/utils/fs-extras.ts +6 -24
- package/src/utils/github.test.ts +211 -0
- package/src/utils/github.ts +90 -10
- package/src/utils/remote.test.ts +209 -0
- package/src/utils/remote.ts +325 -87
- package/src/utils/storage.ts +2 -1
- package/src/utils.ts +20 -24
- package/src/migrations.ts +0 -72
- package/src/presets/if.ts +0 -69
- package/src/presets/loop.ts +0 -65
package/src/plugins-registry.ts
CHANGED
|
@@ -1,32 +1,84 @@
|
|
|
1
1
|
import { ensureNodeJS, ensurePNPM, fetchPipelabPlugin } from "./utils/remote";
|
|
2
2
|
import { pathToFileURL } from "node:url";
|
|
3
|
-
import { readdir } from "node:fs/promises";
|
|
3
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
4
4
|
import { existsSync } from "node:fs";
|
|
5
|
-
import {
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { PipelabContext, isDev, projectRoot } from "./context";
|
|
6
7
|
import { sendStartupProgress } from "./server";
|
|
7
8
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
const enhancePluginDefinition = async (
|
|
10
|
+
plugin: any,
|
|
11
|
+
packageDir: string,
|
|
12
|
+
fallbackName: string,
|
|
13
|
+
fallbackVersion: string,
|
|
14
|
+
) => {
|
|
15
|
+
if (!plugin) return plugin;
|
|
16
|
+
|
|
17
|
+
let packageName = fallbackName;
|
|
18
|
+
let version = fallbackVersion;
|
|
19
|
+
let pipelabMeta: any = null;
|
|
20
|
+
let pkgDescription = "";
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
const pkgJsonPath = join(packageDir, "package.json");
|
|
24
|
+
if (existsSync(pkgJsonPath)) {
|
|
25
|
+
const pkgContent = await readFile(pkgJsonPath, "utf8");
|
|
26
|
+
const pkg = JSON.parse(pkgContent);
|
|
27
|
+
if (pkg.name) packageName = pkg.name;
|
|
28
|
+
if (pkg.version) version = pkg.version;
|
|
29
|
+
if (pkg.description) pkgDescription = pkg.description;
|
|
30
|
+
if (pkg.pipelab) pipelabMeta = pkg.pipelab;
|
|
31
|
+
}
|
|
32
|
+
} catch (e) {
|
|
33
|
+
console.error(`[Plugins] Failed to read package.json in ${packageDir}:`, e);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
plugin.packageName = packageName;
|
|
37
|
+
plugin.id = packageName;
|
|
38
|
+
plugin.version = fallbackVersion === "local" ? "local" : version;
|
|
39
|
+
plugin.isOfficial = packageName.startsWith("@pipelab/");
|
|
40
|
+
|
|
41
|
+
// Dynamically resolve name, description, and icon from package.json
|
|
42
|
+
plugin.name = pipelabMeta?.name || packageName;
|
|
43
|
+
plugin.description = pipelabMeta?.description || pkgDescription || "";
|
|
44
|
+
|
|
45
|
+
if (pipelabMeta?.icon) {
|
|
46
|
+
if (typeof pipelabMeta.icon === "string") {
|
|
47
|
+
let iconPath = pipelabMeta.icon;
|
|
48
|
+
if (iconPath.startsWith(".")) {
|
|
49
|
+
iconPath = pathToFileURL(join(packageDir, iconPath)).href;
|
|
50
|
+
}
|
|
51
|
+
plugin.icon = {
|
|
52
|
+
type: "image",
|
|
53
|
+
image: iconPath,
|
|
54
|
+
};
|
|
55
|
+
} else {
|
|
56
|
+
plugin.icon = pipelabMeta.icon;
|
|
57
|
+
}
|
|
58
|
+
} else {
|
|
59
|
+
plugin.icon = {
|
|
60
|
+
type: "icon",
|
|
61
|
+
icon: "pi pi-box",
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return plugin;
|
|
66
|
+
};
|
|
22
67
|
|
|
23
68
|
export const loadPipelabPlugin = async (id: string, options: { context: PipelabContext }) => {
|
|
69
|
+
const start = Date.now();
|
|
24
70
|
try {
|
|
25
|
-
const packageName =
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
71
|
+
const packageName = id;
|
|
72
|
+
const fetchStart = Date.now();
|
|
73
|
+
const { packageDir, entryPoint } = await fetchPipelabPlugin(
|
|
74
|
+
packageName,
|
|
75
|
+
options.context.releaseTag,
|
|
76
|
+
{
|
|
77
|
+
context: options.context,
|
|
78
|
+
installDeps: false,
|
|
79
|
+
},
|
|
80
|
+
);
|
|
81
|
+
const fetchDuration = Date.now() - fetchStart;
|
|
30
82
|
|
|
31
83
|
console.log(`[Plugins] [${id}] Attempting to import from: ${entryPoint}`);
|
|
32
84
|
if (!existsSync(entryPoint)) {
|
|
@@ -37,11 +89,19 @@ export const loadPipelabPlugin = async (id: string, options: { context: PipelabC
|
|
|
37
89
|
} catch (e) {}
|
|
38
90
|
}
|
|
39
91
|
|
|
92
|
+
const importStart = Date.now();
|
|
40
93
|
const pluginModule = await import(pathToFileURL(entryPoint).href);
|
|
41
|
-
|
|
42
|
-
|
|
94
|
+
const importDuration = Date.now() - importStart;
|
|
95
|
+
const totalDuration = Date.now() - start;
|
|
96
|
+
console.log(
|
|
97
|
+
`[Plugins] [${id}] Successfully loaded from: ${packageDir} (fetch: ${fetchDuration}ms, import: ${importDuration}ms, total: ${totalDuration}ms)`,
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const plugin = pluginModule.default;
|
|
101
|
+
await enhancePluginDefinition(plugin, packageDir, packageName, options.context.releaseTag);
|
|
102
|
+
return plugin;
|
|
43
103
|
} catch (e: any) {
|
|
44
|
-
console.error(`[Plugins] [${id}] CRITICAL: Failed to load:`, e);
|
|
104
|
+
console.error(`[Plugins] [${id}] CRITICAL: Failed to load after ${Date.now() - start}ms:`, e);
|
|
45
105
|
if (e.code === "ERR_MODULE_NOT_FOUND") {
|
|
46
106
|
console.error(
|
|
47
107
|
`[Plugins] [${id}] This usually means a dependency is missing in the plugin's node_modules.`,
|
|
@@ -51,34 +111,216 @@ export const loadPipelabPlugin = async (id: string, options: { context: PipelabC
|
|
|
51
111
|
}
|
|
52
112
|
};
|
|
53
113
|
|
|
54
|
-
export const
|
|
114
|
+
export const loadCustomPlugin = async (
|
|
115
|
+
packageName: string,
|
|
116
|
+
version: string,
|
|
117
|
+
options: { context: PipelabContext },
|
|
118
|
+
) => {
|
|
119
|
+
const start = Date.now();
|
|
120
|
+
try {
|
|
121
|
+
const fetchStart = Date.now();
|
|
122
|
+
const { packageDir, entryPoint } = await fetchPipelabPlugin(packageName, version, {
|
|
123
|
+
context: options.context,
|
|
124
|
+
installDeps: false,
|
|
125
|
+
});
|
|
126
|
+
const fetchDuration = Date.now() - fetchStart;
|
|
127
|
+
|
|
128
|
+
console.log(
|
|
129
|
+
`[Plugins] [${packageName}] Attempting to import custom plugin from: ${entryPoint}`,
|
|
130
|
+
);
|
|
131
|
+
if (!existsSync(entryPoint)) {
|
|
132
|
+
console.error(
|
|
133
|
+
`[Plugins] [${packageName}] CRITICAL: Plugin entry point not found at ${entryPoint}`,
|
|
134
|
+
);
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const importStart = Date.now();
|
|
139
|
+
const pluginModule = await import(pathToFileURL(entryPoint).href);
|
|
140
|
+
const importDuration = Date.now() - importStart;
|
|
141
|
+
const totalDuration = Date.now() - start;
|
|
142
|
+
console.log(
|
|
143
|
+
`[Plugins] [${packageName}] Successfully loaded custom plugin from: ${packageDir} (fetch: ${fetchDuration}ms, import: ${importDuration}ms, total: ${totalDuration}ms)`,
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const plugin = pluginModule.default;
|
|
147
|
+
await enhancePluginDefinition(plugin, packageDir, packageName, version);
|
|
148
|
+
return plugin;
|
|
149
|
+
} catch (e: any) {
|
|
150
|
+
console.error(
|
|
151
|
+
`[Plugins] [${packageName}] CRITICAL: Failed to load after ${Date.now() - start}ms:`,
|
|
152
|
+
e,
|
|
153
|
+
);
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export async function findInstalledPlugins(
|
|
159
|
+
packagesDir: string,
|
|
160
|
+
): Promise<Array<{ name: string; version: string; packageDir: string; description: string }>> {
|
|
161
|
+
const installed: Array<{
|
|
162
|
+
name: string;
|
|
163
|
+
version: string;
|
|
164
|
+
packageDir: string;
|
|
165
|
+
description: string;
|
|
166
|
+
}> = [];
|
|
167
|
+
if (!existsSync(packagesDir)) return installed;
|
|
168
|
+
|
|
169
|
+
async function scan(dir: string, depth = 0) {
|
|
170
|
+
if (depth > 4) return;
|
|
171
|
+
try {
|
|
172
|
+
const entries = await readdir(dir, { withFileTypes: true });
|
|
173
|
+
const hasPkgJson = entries.some((e) => e.isFile() && e.name === "package.json");
|
|
174
|
+
if (hasPkgJson) {
|
|
175
|
+
try {
|
|
176
|
+
const content = await readFile(join(dir, "package.json"), "utf8");
|
|
177
|
+
const pkg = JSON.parse(content);
|
|
178
|
+
if (pkg.name && pkg.name !== "pnpm") {
|
|
179
|
+
installed.push({
|
|
180
|
+
name: pkg.name,
|
|
181
|
+
version: pkg.version || "0.0.0",
|
|
182
|
+
packageDir: dir,
|
|
183
|
+
description: pkg.description || "",
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
} catch (e) {
|
|
187
|
+
// ignore invalid package.json
|
|
188
|
+
}
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
for (const entry of entries) {
|
|
193
|
+
if (entry.isDirectory() && entry.name !== "node_modules" && !entry.name.startsWith(".")) {
|
|
194
|
+
await scan(join(dir, entry.name), depth + 1);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
} catch (e) {
|
|
198
|
+
// ignore errors
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
await scan(packagesDir);
|
|
203
|
+
return installed;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export const builtInPlugins = async (options: { context: PipelabContext }): Promise<void> => {
|
|
55
207
|
console.log("[Plugins] Starting background plugin loading...");
|
|
56
208
|
|
|
57
209
|
// Pre-ensure Node.js and PNPM once in parallel so plugins don't have to wait for them
|
|
58
210
|
sendStartupProgress("Preparing environment...");
|
|
211
|
+
const envStart = Date.now();
|
|
59
212
|
await Promise.all([ensureNodeJS(options.context), ensurePNPM(options.context)]);
|
|
213
|
+
console.log(`[Plugins] Environment preparation took ${Date.now() - envStart}ms`);
|
|
60
214
|
|
|
61
215
|
const { usePlugins } = await import("@pipelab/shared");
|
|
62
216
|
const { registerPlugins } = usePlugins();
|
|
63
217
|
const { webSocketServer } = await import("./index");
|
|
64
218
|
|
|
219
|
+
// Broadcast ready signal immediately so the UI launches while plugins load in the background
|
|
220
|
+
webSocketServer.broadcast("startup:progress", { type: "ready" });
|
|
221
|
+
|
|
65
222
|
// Load plugins asynchronously in the background
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
223
|
+
(async () => {
|
|
224
|
+
const totalStart = Date.now();
|
|
225
|
+
const pluginsToLoad = new Map<string, string>(); // packageName -> version
|
|
226
|
+
|
|
227
|
+
// Load default/native plugins by default
|
|
228
|
+
const defaultPlugins = [
|
|
229
|
+
"@pipelab/plugin-construct",
|
|
230
|
+
"@pipelab/plugin-filesystem",
|
|
231
|
+
"@pipelab/plugin-system",
|
|
232
|
+
"@pipelab/plugin-steam",
|
|
233
|
+
"@pipelab/plugin-itch",
|
|
234
|
+
"@pipelab/plugin-electron",
|
|
235
|
+
"@pipelab/plugin-discord",
|
|
236
|
+
"@pipelab/plugin-poki",
|
|
237
|
+
"@pipelab/plugin-nvpatch",
|
|
238
|
+
"@pipelab/plugin-tauri",
|
|
239
|
+
"@pipelab/plugin-minify",
|
|
240
|
+
"@pipelab/plugin-netlify",
|
|
241
|
+
];
|
|
242
|
+
for (const name of defaultPlugins) {
|
|
243
|
+
pluginsToLoad.set(name, "latest");
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (isDev && projectRoot) {
|
|
247
|
+
const pluginsDir = join(projectRoot, "plugins");
|
|
248
|
+
if (existsSync(pluginsDir)) {
|
|
249
|
+
try {
|
|
250
|
+
const entries = await readdir(pluginsDir, { withFileTypes: true });
|
|
251
|
+
for (const entry of entries) {
|
|
252
|
+
if (entry.isDirectory()) {
|
|
253
|
+
const pkgPath = join(pluginsDir, entry.name, "package.json");
|
|
254
|
+
if (existsSync(pkgPath)) {
|
|
255
|
+
try {
|
|
256
|
+
const pkgContent = await readFile(pkgPath, "utf-8");
|
|
257
|
+
const pkg = JSON.parse(pkgContent);
|
|
258
|
+
if (
|
|
259
|
+
pkg.name &&
|
|
260
|
+
pkg.name.startsWith("@pipelab/plugin-") &&
|
|
261
|
+
pkg.name !== "@pipelab/plugin-core"
|
|
262
|
+
) {
|
|
263
|
+
pluginsToLoad.set(pkg.name, "local");
|
|
264
|
+
}
|
|
265
|
+
} catch (e) {
|
|
266
|
+
console.error(`[Plugins] Failed to parse package.json for ${entry.name}:`, e);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
} catch (e) {
|
|
272
|
+
console.error(`[Plugins] Failed to scan local workspace plugins directory:`, e);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
try {
|
|
278
|
+
const { setupSettingsConfigFile } = await import("./config");
|
|
279
|
+
const settingsManager = await setupSettingsConfigFile(options.context);
|
|
280
|
+
const settingsConfig = await settingsManager.getConfig();
|
|
281
|
+
const settingsPlugins = settingsConfig?.plugins || [];
|
|
282
|
+
|
|
283
|
+
for (const plugin of settingsPlugins) {
|
|
284
|
+
if (plugin.name) {
|
|
285
|
+
if (plugin.enabled) {
|
|
286
|
+
if (!pluginsToLoad.has(plugin.name)) {
|
|
287
|
+
pluginsToLoad.set(plugin.name, "latest");
|
|
288
|
+
}
|
|
289
|
+
} else {
|
|
290
|
+
// If explicitly disabled in settings, remove it from the loading list
|
|
291
|
+
pluginsToLoad.delete(plugin.name);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
} catch (e) {
|
|
296
|
+
console.error(`[Plugins] Failed to load settings config on startup:`, e);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
console.log(`[Plugins] Total plugins to load on startup:`, Array.from(pluginsToLoad.entries()));
|
|
300
|
+
|
|
301
|
+
// Now load all collected plugins in parallel
|
|
302
|
+
const loadPromises = Array.from(pluginsToLoad.entries()).map(async ([packageName, version]) => {
|
|
303
|
+
sendStartupProgress(`Loading plugin: ${packageName}`);
|
|
304
|
+
const pluginStart = Date.now();
|
|
305
|
+
try {
|
|
306
|
+
const plugin = await loadCustomPlugin(packageName, version, options);
|
|
307
|
+
if (plugin) {
|
|
308
|
+
registerPlugins([plugin]);
|
|
309
|
+
webSocketServer.broadcast("plugin:loaded", { plugin });
|
|
310
|
+
console.log(
|
|
311
|
+
`[Plugins] Loaded ${packageName}@${version} in ${Date.now() - pluginStart}ms`,
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
} catch (err) {
|
|
315
|
+
console.error(`[Plugins] Failed to load plugin ${packageName} at startup:`, err);
|
|
73
316
|
}
|
|
74
|
-
})
|
|
75
|
-
|
|
76
|
-
|
|
317
|
+
});
|
|
318
|
+
await Promise.all(loadPromises);
|
|
319
|
+
|
|
320
|
+
console.log(`[Plugins] All startup plugins loaded in ${Date.now() - totalStart}ms.`);
|
|
77
321
|
sendStartupProgress("All plugins loaded.");
|
|
78
322
|
setTimeout(() => {
|
|
79
323
|
webSocketServer.broadcast("startup:progress", { type: "done" });
|
|
80
324
|
}, 2000);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
return [];
|
|
325
|
+
})();
|
|
84
326
|
};
|
package/src/presets/c3toSteam.ts
CHANGED
|
@@ -4,7 +4,7 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
4
4
|
const startId = "manual-start";
|
|
5
5
|
|
|
6
6
|
const data: SavedFile = {
|
|
7
|
-
version: "
|
|
7
|
+
version: "5.0.0",
|
|
8
8
|
name: "Construct 3 to Steam",
|
|
9
9
|
description: "A basic project to get you started with Construct 3 and Steam",
|
|
10
10
|
variables: [],
|
|
@@ -13,8 +13,9 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
13
13
|
{
|
|
14
14
|
type: "event",
|
|
15
15
|
origin: {
|
|
16
|
-
pluginId: "system",
|
|
16
|
+
pluginId: "@pipelab/plugin-system",
|
|
17
17
|
nodeId: "manual",
|
|
18
|
+
version: "latest",
|
|
18
19
|
},
|
|
19
20
|
uid: startId,
|
|
20
21
|
params: {},
|
|
@@ -26,7 +27,8 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
26
27
|
type: "action",
|
|
27
28
|
origin: {
|
|
28
29
|
nodeId: "export-construct-project",
|
|
29
|
-
pluginId: "construct",
|
|
30
|
+
pluginId: "@pipelab/plugin-construct",
|
|
31
|
+
version: "latest",
|
|
30
32
|
},
|
|
31
33
|
params: {
|
|
32
34
|
file: {
|
|
@@ -64,7 +66,8 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
64
66
|
type: "action",
|
|
65
67
|
origin: {
|
|
66
68
|
nodeId: "unzip-file-node",
|
|
67
|
-
pluginId: "filesystem",
|
|
69
|
+
pluginId: "@pipelab/plugin-filesystem",
|
|
70
|
+
version: "latest",
|
|
68
71
|
},
|
|
69
72
|
params: {
|
|
70
73
|
file: {
|
|
@@ -78,7 +81,8 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
78
81
|
type: "action",
|
|
79
82
|
origin: {
|
|
80
83
|
nodeId: "electron:package:v2",
|
|
81
|
-
pluginId: "electron",
|
|
84
|
+
pluginId: "@pipelab/plugin-electron",
|
|
85
|
+
version: "latest",
|
|
82
86
|
},
|
|
83
87
|
params: {
|
|
84
88
|
arch: {
|
|
@@ -208,7 +212,8 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
208
212
|
type: "action",
|
|
209
213
|
origin: {
|
|
210
214
|
nodeId: "steam-upload",
|
|
211
|
-
pluginId: "steam",
|
|
215
|
+
pluginId: "@pipelab/plugin-steam",
|
|
216
|
+
version: "latest",
|
|
212
217
|
},
|
|
213
218
|
params: {
|
|
214
219
|
sdk: {
|
|
@@ -251,7 +256,8 @@ export const c3toSteamPreset: PresetFn = async () => {
|
|
|
251
256
|
type: "action",
|
|
252
257
|
origin: {
|
|
253
258
|
nodeId: "fs:open-in-explorer",
|
|
254
|
-
pluginId: "filesystem",
|
|
259
|
+
pluginId: "@pipelab/plugin-filesystem",
|
|
260
|
+
version: "latest",
|
|
255
261
|
},
|
|
256
262
|
params: {
|
|
257
263
|
path: {
|
package/src/presets/demo.ts
CHANGED
|
@@ -9,7 +9,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
9
9
|
const logOkId = "log-ok";
|
|
10
10
|
|
|
11
11
|
const data: SavedFile = {
|
|
12
|
-
version: "
|
|
12
|
+
version: "5.0.0",
|
|
13
13
|
variables: [],
|
|
14
14
|
name: "demo",
|
|
15
15
|
description: "demo",
|
|
@@ -18,7 +18,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
18
18
|
{
|
|
19
19
|
type: "event",
|
|
20
20
|
origin: {
|
|
21
|
-
pluginId: "system",
|
|
21
|
+
pluginId: "@pipelab/plugin-system",
|
|
22
22
|
nodeId: "manual",
|
|
23
23
|
},
|
|
24
24
|
uid: startId,
|
|
@@ -27,7 +27,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
27
27
|
{
|
|
28
28
|
type: "action",
|
|
29
29
|
origin: {
|
|
30
|
-
pluginId: "construct",
|
|
30
|
+
pluginId: "@pipelab/plugin-construct",
|
|
31
31
|
nodeId: "export-construct-project",
|
|
32
32
|
},
|
|
33
33
|
uid: exportConstructProjectId,
|
|
@@ -41,7 +41,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
41
41
|
{
|
|
42
42
|
type: "action",
|
|
43
43
|
origin: {
|
|
44
|
-
pluginId: "filesystem",
|
|
44
|
+
pluginId: "@pipelab/plugin-filesystem",
|
|
45
45
|
nodeId: "list-files-node",
|
|
46
46
|
},
|
|
47
47
|
uid: listFilesNodeId,
|
|
@@ -53,7 +53,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
53
53
|
{
|
|
54
54
|
type: "loop",
|
|
55
55
|
origin: {
|
|
56
|
-
pluginId: "system",
|
|
56
|
+
pluginId: "@pipelab/plugin-system",
|
|
57
57
|
nodeId: "for",
|
|
58
58
|
},
|
|
59
59
|
|
|
@@ -64,7 +64,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
64
64
|
{
|
|
65
65
|
type: "condition",
|
|
66
66
|
origin: {
|
|
67
|
-
pluginId: "filesystem",
|
|
67
|
+
pluginId: "@pipelab/plugin-filesystem",
|
|
68
68
|
nodeId: "is-file",
|
|
69
69
|
},
|
|
70
70
|
uid: "is-file-condition",
|
|
@@ -76,7 +76,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
76
76
|
{
|
|
77
77
|
type: "action",
|
|
78
78
|
origin: {
|
|
79
|
-
pluginId: "system",
|
|
79
|
+
pluginId: "@pipelab/plugin-system",
|
|
80
80
|
nodeId: "log",
|
|
81
81
|
},
|
|
82
82
|
params: {
|
|
@@ -89,7 +89,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
89
89
|
{
|
|
90
90
|
type: "action",
|
|
91
91
|
origin: {
|
|
92
|
-
pluginId: "system",
|
|
92
|
+
pluginId: "@pipelab/plugin-system",
|
|
93
93
|
nodeId: "log",
|
|
94
94
|
},
|
|
95
95
|
params: {
|
|
@@ -105,7 +105,7 @@ export const demoPreset: PresetFn = async () => {
|
|
|
105
105
|
{
|
|
106
106
|
type: "action",
|
|
107
107
|
origin: {
|
|
108
|
-
pluginId: "system",
|
|
108
|
+
pluginId: "@pipelab/plugin-system",
|
|
109
109
|
nodeId: "log",
|
|
110
110
|
},
|
|
111
111
|
uid: logOkId,
|
package/src/presets/list.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
// import { demoPreset } from './demo'
|
|
2
|
-
// import { ifPreset } from './if'
|
|
3
|
-
// import { loopPreset } from './loop'
|
|
4
2
|
// import { testC3Unzip } from './test-c3-unzip'
|
|
5
3
|
// import { testC3Offline } from './test-c3-offline'
|
|
6
4
|
import { c3toSteamPreset } from "./c3toSteam";
|
|
@@ -13,8 +11,6 @@ export const presets = async () => {
|
|
|
13
11
|
const moreToComeVal = await moreToCome();
|
|
14
12
|
|
|
15
13
|
// const demoPresetVal = await demoPreset()
|
|
16
|
-
// const ifPresetVal = await ifPreset()
|
|
17
|
-
// const loopPresetVal = await loopPreset()
|
|
18
14
|
// const testC3UnzipVal = await testC3Unzip()
|
|
19
15
|
// const testC3OfflineVal = await testC3Offline()
|
|
20
16
|
return {
|
|
@@ -22,8 +18,6 @@ export const presets = async () => {
|
|
|
22
18
|
c3toSteam: c3toSteamVal,
|
|
23
19
|
moreToCome: moreToComeVal,
|
|
24
20
|
// demo: demoPresetVal,
|
|
25
|
-
// if: ifPresetVal,
|
|
26
|
-
// loop: loopPresetVal,
|
|
27
21
|
// testC3Unzip: testC3UnzipVal,
|
|
28
22
|
// testC3Offline: testC3OfflineVal,
|
|
29
23
|
};
|
|
@@ -4,7 +4,7 @@ export const moreToCome: PresetFn = async () => {
|
|
|
4
4
|
const startId = "manual-start";
|
|
5
5
|
|
|
6
6
|
const data: SavedFile = {
|
|
7
|
-
version: "
|
|
7
|
+
version: "5.0.0",
|
|
8
8
|
name: "More to come!",
|
|
9
9
|
description: "Do not hesitate to suggest templates you would see here",
|
|
10
10
|
variables: [],
|
|
@@ -13,8 +13,9 @@ export const moreToCome: PresetFn = async () => {
|
|
|
13
13
|
{
|
|
14
14
|
type: "event",
|
|
15
15
|
origin: {
|
|
16
|
-
pluginId: "system",
|
|
16
|
+
pluginId: "@pipelab/plugin-system",
|
|
17
17
|
nodeId: "manual",
|
|
18
|
+
version: "latest",
|
|
18
19
|
},
|
|
19
20
|
uid: startId,
|
|
20
21
|
params: {},
|
|
@@ -4,7 +4,7 @@ export const newProjectPreset: PresetFn = async () => {
|
|
|
4
4
|
const startId = "manual-start";
|
|
5
5
|
|
|
6
6
|
const data: SavedFile = {
|
|
7
|
-
version: "
|
|
7
|
+
version: "5.0.0",
|
|
8
8
|
name: "Empty project",
|
|
9
9
|
description: "A default project with no tasks added",
|
|
10
10
|
variables: [],
|
|
@@ -13,8 +13,9 @@ export const newProjectPreset: PresetFn = async () => {
|
|
|
13
13
|
{
|
|
14
14
|
type: "event",
|
|
15
15
|
origin: {
|
|
16
|
-
pluginId: "system",
|
|
16
|
+
pluginId: "@pipelab/plugin-system",
|
|
17
17
|
nodeId: "manual",
|
|
18
|
+
version: "latest",
|
|
18
19
|
},
|
|
19
20
|
uid: startId,
|
|
20
21
|
params: {},
|
|
@@ -5,7 +5,7 @@ export const testC3Offline: PresetFn = async () => {
|
|
|
5
5
|
const steamUpload = "steam-upload-node";
|
|
6
6
|
|
|
7
7
|
const data: SavedFile = {
|
|
8
|
-
version: "
|
|
8
|
+
version: "5.0.0",
|
|
9
9
|
variables: [],
|
|
10
10
|
name: "C3 test without export",
|
|
11
11
|
description: "C3 test without export",
|
|
@@ -14,8 +14,9 @@ export const testC3Offline: PresetFn = async () => {
|
|
|
14
14
|
{
|
|
15
15
|
type: "event",
|
|
16
16
|
origin: {
|
|
17
|
-
pluginId: "system",
|
|
17
|
+
pluginId: "@pipelab/plugin-system",
|
|
18
18
|
nodeId: "manual",
|
|
19
|
+
version: "latest",
|
|
19
20
|
},
|
|
20
21
|
uid: "manual-start",
|
|
21
22
|
params: {},
|
|
@@ -27,15 +28,22 @@ export const testC3Offline: PresetFn = async () => {
|
|
|
27
28
|
type: "action",
|
|
28
29
|
origin: {
|
|
29
30
|
nodeId: "package-to-electron",
|
|
30
|
-
pluginId: "electron",
|
|
31
|
+
pluginId: "@pipelab/plugin-electron",
|
|
32
|
+
version: "latest",
|
|
31
33
|
},
|
|
32
34
|
params: {
|
|
33
35
|
"input-folder": {
|
|
34
36
|
editor: "editor",
|
|
35
37
|
value: `/home/quentin/Documents/Cyn Assets/app`,
|
|
36
38
|
},
|
|
37
|
-
arch:
|
|
38
|
-
|
|
39
|
+
arch: {
|
|
40
|
+
editor: "simple",
|
|
41
|
+
value: undefined,
|
|
42
|
+
},
|
|
43
|
+
platform: {
|
|
44
|
+
editor: "simple",
|
|
45
|
+
value: undefined,
|
|
46
|
+
},
|
|
39
47
|
},
|
|
40
48
|
},
|
|
41
49
|
{
|
|
@@ -43,7 +51,8 @@ export const testC3Offline: PresetFn = async () => {
|
|
|
43
51
|
type: "action",
|
|
44
52
|
origin: {
|
|
45
53
|
nodeId: "steam-upload",
|
|
46
|
-
pluginId: "steam",
|
|
54
|
+
pluginId: "@pipelab/plugin-steam",
|
|
55
|
+
version: "latest",
|
|
47
56
|
},
|
|
48
57
|
params: {
|
|
49
58
|
folder: {
|