@bagelink/workspace 1.7.27 → 1.7.31

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/bin/bgl.ts CHANGED
@@ -99,9 +99,10 @@ SDK Commands:
99
99
  }
100
100
  }
101
101
  else if (command === 'dev') {
102
- // Get optional filter argument
102
+ // Get optional filter argument and additional args
103
103
  const filter = subcommand || './[!shared]*'
104
- const exitCode = await runDev(filter)
104
+ const additionalArgs = args // Any additional args after filter
105
+ const exitCode = await runDev(filter, additionalArgs)
105
106
  process.exit(exitCode)
106
107
  }
107
108
  else {
@@ -113,7 +114,8 @@ Usage:
113
114
  bgl init --workspace Create a new workspace with multiple projects
114
115
  bgl add <name> Add a new project to workspace
115
116
  bgl list List all projects in workspace
116
- bgl dev [filter] Run dev servers with clean output (default: './[!shared]*')
117
+ bgl dev [filter] [...args] Run dev servers with clean output (default: './[!shared]*')
118
+ Additional args are passed to vite (e.g., --mode localhost)
117
119
  bgl lint init Set up linting (auto-detects workspace)
118
120
  bgl sdk generate Generate SDK (auto-detects workspace)
119
121
 
package/dist/bin/bgl.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  const process = require('node:process');
5
- const workspace = require('../shared/workspace.CFgMNgfN.cjs');
5
+ const workspace = require('../shared/workspace.OuHxYc4s.cjs');
6
6
  require('node:fs');
7
7
  require('node:path');
8
8
  require('prompts');
@@ -84,7 +84,8 @@ SDK Commands:
84
84
  }
85
85
  } else if (command === "dev") {
86
86
  const filter = subcommand || "./[!shared]*";
87
- const exitCode = await workspace.runDev(filter);
87
+ const additionalArgs = args;
88
+ const exitCode = await workspace.runDev(filter, additionalArgs);
88
89
  process__default.exit(exitCode);
89
90
  } else {
90
91
  console.log(`
@@ -95,7 +96,8 @@ Usage:
95
96
  bgl init --workspace Create a new workspace with multiple projects
96
97
  bgl add <name> Add a new project to workspace
97
98
  bgl list List all projects in workspace
98
- bgl dev [filter] Run dev servers with clean output (default: './[!shared]*')
99
+ bgl dev [filter] [...args] Run dev servers with clean output (default: './[!shared]*')
100
+ Additional args are passed to vite (e.g., --mode localhost)
99
101
  bgl lint init Set up linting (auto-detects workspace)
100
102
  bgl sdk generate Generate SDK (auto-detects workspace)
101
103
 
package/dist/bin/bgl.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import process from 'node:process';
3
- import { k as initWorkspace, g as generateWorkspaceConfig, j as addProject, l as listProjects, i as isWorkspace, e as setupLint, h as generateSDKForWorkspace, f as generateSDK, r as runDev } from '../shared/workspace.DChvMH3n.mjs';
3
+ import { k as initWorkspace, g as generateWorkspaceConfig, j as addProject, l as listProjects, i as isWorkspace, e as setupLint, h as generateSDKForWorkspace, f as generateSDK, r as runDev } from '../shared/workspace.CcKgYZPx.mjs';
4
4
  import 'node:fs';
5
5
  import 'node:path';
6
6
  import 'prompts';
@@ -78,7 +78,8 @@ SDK Commands:
78
78
  }
79
79
  } else if (command === "dev") {
80
80
  const filter = subcommand || "./[!shared]*";
81
- const exitCode = await runDev(filter);
81
+ const additionalArgs = args;
82
+ const exitCode = await runDev(filter, additionalArgs);
82
83
  process.exit(exitCode);
83
84
  } else {
84
85
  console.log(`
@@ -89,7 +90,8 @@ Usage:
89
90
  bgl init --workspace Create a new workspace with multiple projects
90
91
  bgl add <name> Add a new project to workspace
91
92
  bgl list List all projects in workspace
92
- bgl dev [filter] Run dev servers with clean output (default: './[!shared]*')
93
+ bgl dev [filter] [...args] Run dev servers with clean output (default: './[!shared]*')
94
+ Additional args are passed to vite (e.g., --mode localhost)
93
95
  bgl lint init Set up linting (auto-detects workspace)
94
96
  bgl sdk generate Generate SDK (auto-detects workspace)
95
97
 
package/dist/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const node_fs = require('node:fs');
4
4
  const node_path = require('node:path');
5
5
  const process = require('node:process');
6
- const workspace = require('./shared/workspace.CFgMNgfN.cjs');
6
+ const workspace = require('./shared/workspace.OuHxYc4s.cjs');
7
7
  require('prompts');
8
8
  require('node:child_process');
9
9
 
package/dist/index.d.cts CHANGED
@@ -104,7 +104,7 @@ declare function getWorkspaceInfo(root?: string): {
104
104
  hasShared: boolean;
105
105
  };
106
106
 
107
- declare function runDev(filter?: string): Promise<number>;
107
+ declare function runDev(filter?: string, additionalArgs?: string[]): Promise<number>;
108
108
 
109
109
  /**
110
110
  * Set up linting in a project
package/dist/index.d.mts CHANGED
@@ -104,7 +104,7 @@ declare function getWorkspaceInfo(root?: string): {
104
104
  hasShared: boolean;
105
105
  };
106
106
 
107
- declare function runDev(filter?: string): Promise<number>;
107
+ declare function runDev(filter?: string, additionalArgs?: string[]): Promise<number>;
108
108
 
109
109
  /**
110
110
  * Set up linting in a project
package/dist/index.d.ts CHANGED
@@ -104,7 +104,7 @@ declare function getWorkspaceInfo(root?: string): {
104
104
  hasShared: boolean;
105
105
  };
106
106
 
107
- declare function runDev(filter?: string): Promise<number>;
107
+ declare function runDev(filter?: string, additionalArgs?: string[]): Promise<number>;
108
108
 
109
109
  /**
110
110
  * Set up linting in a project
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { resolve, join } from 'node:path';
3
3
  import process from 'node:process';
4
- import { g as generateWorkspaceConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.DChvMH3n.mjs';
5
- export { j as addProject, a as generateNetlifyConfig, b as generateNetlifyRedirect, f as generateSDK, h as generateSDKForWorkspace, c as generateWorkspaceConfigSync, d as getWorkspaceInfo, k as initWorkspace, i as isWorkspace, l as listProjects, r as runDev, e as setupLint } from './shared/workspace.DChvMH3n.mjs';
4
+ import { g as generateWorkspaceConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.CcKgYZPx.mjs';
5
+ export { j as addProject, a as generateNetlifyConfig, b as generateNetlifyRedirect, f as generateSDK, h as generateSDKForWorkspace, c as generateWorkspaceConfigSync, d as getWorkspaceInfo, k as initWorkspace, i as isWorkspace, l as listProjects, r as runDev, e as setupLint } from './shared/workspace.CcKgYZPx.mjs';
6
6
  import 'prompts';
7
7
  import 'node:child_process';
8
8
 
@@ -308,10 +308,11 @@ function clearAndPrintServers() {
308
308
  }
309
309
  console.log("");
310
310
  }
311
- async function runDev(filter = "./[!shared]*") {
312
- console.log(`${colors.dim}Starting dev servers with filter: ${filter}${colors.reset}
311
+ async function runDev(filter = "./[!shared]*", additionalArgs = []) {
312
+ const argsStr = additionalArgs.length > 0 ? ` -- ${additionalArgs.join(" ")}` : "";
313
+ console.log(`${colors.dim}Starting dev servers with filter: ${filter}${argsStr}${colors.reset}
313
314
  `);
314
- const command = `bun run --filter '${filter}' dev`;
315
+ const command = `bun run --filter '${filter}' dev${argsStr}`;
315
316
  const proc = spawn(command, {
316
317
  cwd: process.cwd(),
317
318
  stdio: ["inherit", "pipe", "pipe"],
@@ -327,6 +328,7 @@ async function runDev(filter = "./[!shared]*") {
327
328
  if (projectMatch) {
328
329
  const name = projectMatch[1];
329
330
  if (!servers.has(name)) {
331
+ console.log(`${colors.dim}[DEBUG] Detected project: ${name}${colors.reset}`);
330
332
  servers.set(name, { name, status: "starting" });
331
333
  clearAndPrintServers();
332
334
  }
@@ -338,6 +340,7 @@ async function runDev(filter = "./[!shared]*") {
338
340
  if (projectInLine) {
339
341
  const name = projectInLine[1];
340
342
  const info = servers.get(name);
343
+ console.log(`${colors.dim}[DEBUG] Port ${port} for project: ${name}, exists: ${!!info}, hasPort: ${info?.port}${colors.reset}`);
341
344
  if (info && !info.port) {
342
345
  info.port = port;
343
346
  info.status = "ready";
@@ -315,10 +315,11 @@ function clearAndPrintServers() {
315
315
  }
316
316
  console.log("");
317
317
  }
318
- async function runDev(filter = "./[!shared]*") {
319
- console.log(`${colors.dim}Starting dev servers with filter: ${filter}${colors.reset}
318
+ async function runDev(filter = "./[!shared]*", additionalArgs = []) {
319
+ const argsStr = additionalArgs.length > 0 ? ` -- ${additionalArgs.join(" ")}` : "";
320
+ console.log(`${colors.dim}Starting dev servers with filter: ${filter}${argsStr}${colors.reset}
320
321
  `);
321
- const command = `bun run --filter '${filter}' dev`;
322
+ const command = `bun run --filter '${filter}' dev${argsStr}`;
322
323
  const proc = node_child_process.spawn(command, {
323
324
  cwd: process__default.cwd(),
324
325
  stdio: ["inherit", "pipe", "pipe"],
@@ -334,6 +335,7 @@ async function runDev(filter = "./[!shared]*") {
334
335
  if (projectMatch) {
335
336
  const name = projectMatch[1];
336
337
  if (!servers.has(name)) {
338
+ console.log(`${colors.dim}[DEBUG] Detected project: ${name}${colors.reset}`);
337
339
  servers.set(name, { name, status: "starting" });
338
340
  clearAndPrintServers();
339
341
  }
@@ -345,6 +347,7 @@ async function runDev(filter = "./[!shared]*") {
345
347
  if (projectInLine) {
346
348
  const name = projectInLine[1];
347
349
  const info = servers.get(name);
350
+ console.log(`${colors.dim}[DEBUG] Port ${port} for project: ${name}, exists: ${!!info}, hasPort: ${info?.port}${colors.reset}`);
348
351
  if (info && !info.port) {
349
352
  info.port = port;
350
353
  info.status = "ready";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/workspace",
3
3
  "type": "module",
4
- "version": "1.7.27",
4
+ "version": "1.7.31",
5
5
  "description": "Monorepo workspace tooling for Bagel projects with proxy and config management",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
package/src/dev.ts CHANGED
@@ -41,10 +41,11 @@ function clearAndPrintServers() {
41
41
  console.log('')
42
42
  }
43
43
 
44
- export async function runDev(filter = './[!shared]*') {
45
- console.log(`${colors.dim}Starting dev servers with filter: ${filter}${colors.reset}\n`)
44
+ export async function runDev(filter = './[!shared]*', additionalArgs: string[] = []) {
45
+ const argsStr = additionalArgs.length > 0 ? ` -- ${additionalArgs.join(' ')}` : ''
46
+ console.log(`${colors.dim}Starting dev servers with filter: ${filter}${argsStr}${colors.reset}\n`)
46
47
 
47
- const command = `bun run --filter '${filter}' dev`
48
+ const command = `bun run --filter '${filter}' dev${argsStr}`
48
49
  const proc = spawn(command, {
49
50
  cwd: process.cwd(),
50
51
  stdio: ['inherit', 'pipe', 'pipe'],
@@ -66,6 +67,7 @@ export async function runDev(filter = './[!shared]*') {
66
67
  if (projectMatch) {
67
68
  const name = projectMatch[1]
68
69
  if (!servers.has(name)) {
70
+ console.log(`${colors.dim}[DEBUG] Detected project: ${name}${colors.reset}`)
69
71
  servers.set(name, { name, status: 'starting' })
70
72
  clearAndPrintServers()
71
73
  }
@@ -81,6 +83,7 @@ export async function runDev(filter = './[!shared]*') {
81
83
  if (projectInLine) {
82
84
  const name = projectInLine[1]
83
85
  const info = servers.get(name)
86
+ console.log(`${colors.dim}[DEBUG] Port ${port} for project: ${name}, exists: ${!!info}, hasPort: ${info?.port}${colors.reset}`)
84
87
  if (info && !info.port) {
85
88
  info.port = port
86
89
  info.status = 'ready'