@pipelab/core-node 1.0.0-beta.34 → 1.0.0-beta.35

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.34",
3
+ "version": "1.0.0-beta.35",
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.30",
44
- "@pipelab/shared": "1.0.0-beta.29"
43
+ "@pipelab/constants": "1.0.0-beta.31",
44
+ "@pipelab/shared": "1.0.0-beta.30"
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.28"
59
+ "@pipelab/tsconfig": "1.0.0-beta.29"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",
@@ -202,24 +202,16 @@ export const registerPluginsHandlers = (context: PipelabContext) => {
202
202
  const packagesDir = context.getPackagesPath();
203
203
  const rawInstalled = await findInstalledPlugins(packagesDir);
204
204
 
205
- const DEFAULT_PLUGIN_IDS = [
206
- "construct",
207
- "filesystem",
208
- "system",
209
- "steam",
210
- "itch",
211
- "electron",
212
- "discord",
213
- "poki",
214
- "nvpatch",
215
- "tauri",
216
- "minify",
217
- "netlify",
218
- ];
205
+ const { DEFAULT_PLUGIN_IDS, DEV_ONLY_PLUGIN_IDS } = await import("@pipelab/shared");
206
+ const defaultPluginIds = [...DEFAULT_PLUGIN_IDS];
207
+
208
+ if (isDev) {
209
+ defaultPluginIds.push(...DEV_ONLY_PLUGIN_IDS);
210
+ }
219
211
 
220
212
  const installed = rawInstalled
221
213
  .filter((item) => {
222
- const isDefault = DEFAULT_PLUGIN_IDS.some((id) => item.name === `@pipelab/plugin-${id}`);
214
+ const isDefault = defaultPluginIds.some((id) => item.name === `@pipelab/plugin-${id}`);
223
215
  return !isDefault;
224
216
  })
225
217
  .map((item) => ({
@@ -172,7 +172,11 @@ export async function findInstalledPlugins(
172
172
  try {
173
173
  const content = await readFile(join(dir, "package.json"), "utf8");
174
174
  const pkg = JSON.parse(content);
175
- if (pkg.name && pkg.name !== "pnpm") {
175
+ if (
176
+ pkg.name &&
177
+ pkg.name !== "pnpm" &&
178
+ (pkg.pipelab || (pkg.keywords && pkg.keywords.includes("pipelab-plugin")))
179
+ ) {
176
180
  installed.push({
177
181
  name: pkg.name,
178
182
  version: pkg.version || "0.0.0",
@@ -222,20 +226,12 @@ export const builtInPlugins = async (options: { context: PipelabContext }): Prom
222
226
  const pluginsToLoad = new Map<string, string>(); // packageName -> version
223
227
 
224
228
  // Load default/native plugins by default
225
- const defaultPlugins = [
226
- "@pipelab/plugin-construct",
227
- "@pipelab/plugin-filesystem",
228
- "@pipelab/plugin-system",
229
- "@pipelab/plugin-steam",
230
- "@pipelab/plugin-itch",
231
- "@pipelab/plugin-electron",
232
- "@pipelab/plugin-discord",
233
- "@pipelab/plugin-poki",
234
- "@pipelab/plugin-nvpatch",
235
- "@pipelab/plugin-tauri",
236
- "@pipelab/plugin-minify",
237
- "@pipelab/plugin-netlify",
238
- ];
229
+ const { DEFAULT_PLUGIN_IDS, DEV_ONLY_PLUGIN_IDS } = await import("@pipelab/shared");
230
+ const defaultPlugins = [...DEFAULT_PLUGIN_IDS].map((id) => `@pipelab/plugin-${id}`);
231
+
232
+ if (isDev) {
233
+ defaultPlugins.push(...DEV_ONLY_PLUGIN_IDS.map((id) => `@pipelab/plugin-${id}`));
234
+ }
239
235
  for (const name of defaultPlugins) {
240
236
  pluginsToLoad.set(name, "latest");
241
237
  }