@pipelab/core-node 1.0.0-beta.16 → 1.0.0-beta.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipelab/core-node",
3
- "version": "1.0.0-beta.16",
3
+ "version": "1.0.0-beta.17",
4
4
  "private": false,
5
5
  "description": "The Pipelab automation engine for Node.js",
6
6
  "license": "FSL-1.1-MIT",
@@ -40,8 +40,8 @@
40
40
  "type-fest": "4.39.0",
41
41
  "ws": "8.18.3",
42
42
  "yauzl": "2.10.0",
43
- "@pipelab/constants": "1.0.0-beta.14",
44
- "@pipelab/shared": "1.0.0-beta.12"
43
+ "@pipelab/constants": "1.0.0-beta.15",
44
+ "@pipelab/shared": "1.0.0-beta.13"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/adm-zip": "0.5.7",
@@ -56,7 +56,7 @@
56
56
  "tsdown": "0.21.2",
57
57
  "typescript": "^5.0.0",
58
58
  "vitest": "3.1.4",
59
- "@pipelab/tsconfig": "1.0.0-beta.12"
59
+ "@pipelab/tsconfig": "1.0.0-beta.13"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",
@@ -298,23 +298,26 @@ export const builtInPlugins = async (options: { context: PipelabContext }): Prom
298
298
 
299
299
  console.log(`[Plugins] Total plugins to load on startup:`, Array.from(pluginsToLoad.entries()));
300
300
 
301
- // Now load all collected plugins
302
- for (const [packageName, version] of pluginsToLoad.entries()) {
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
- );
301
+ // Now load all collected plugins in parallel
302
+ const loadPromises = Array.from(pluginsToLoad.entries()).map(
303
+ async ([packageName, version]) => {
304
+ sendStartupProgress(`Loading plugin: ${packageName}`);
305
+ const pluginStart = Date.now();
306
+ try {
307
+ const plugin = await loadCustomPlugin(packageName, version, options);
308
+ if (plugin) {
309
+ registerPlugins([plugin]);
310
+ webSocketServer.broadcast("plugin:loaded", { plugin });
311
+ console.log(
312
+ `[Plugins] Loaded ${packageName}@${version} in ${Date.now() - pluginStart}ms`,
313
+ );
314
+ }
315
+ } catch (err) {
316
+ console.error(`[Plugins] Failed to load plugin ${packageName} at startup:`, err);
313
317
  }
314
- } catch (err) {
315
- console.error(`[Plugins] Failed to load plugin ${packageName} at startup:`, err);
316
- }
317
- }
318
+ },
319
+ );
320
+ await Promise.all(loadPromises);
318
321
 
319
322
  console.log(`[Plugins] All startup plugins loaded in ${Date.now() - totalStart}ms.`);
320
323
  sendStartupProgress("All plugins loaded.");
@@ -38,6 +38,7 @@ export async function fetchPackageReleases(
38
38
  "User-Agent": "Pipelab-Desktop-Updater",
39
39
  Accept: "application/vnd.github.v3+json",
40
40
  },
41
+ signal: AbortSignal.timeout(10000),
41
42
  },
42
43
  );
43
44
  if (response.ok) {
@@ -55,6 +56,7 @@ export async function fetchPackageReleases(
55
56
  "User-Agent": "Pipelab-Desktop-Updater",
56
57
  Accept: "application/vnd.github.v3+json",
57
58
  },
59
+ signal: AbortSignal.timeout(10000),
58
60
  });
59
61
 
60
62
  if (!response.ok) {
@@ -104,6 +106,7 @@ export async function fetchPackageReleases(
104
106
  "User-Agent": "Pipelab-Desktop-Updater",
105
107
  Accept: "application/vnd.github.v3+json",
106
108
  },
109
+ signal: AbortSignal.timeout(10000),
107
110
  },
108
111
  );
109
112