@bagelink/workspace 1.8.96 → 1.8.98

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/dist/bin/bgl.cjs CHANGED
@@ -4,7 +4,7 @@
4
4
  const node_path = require('node:path');
5
5
  const process = require('node:process');
6
6
  const node_child_process = require('node:child_process');
7
- const netlify = require('../shared/workspace.Didrexg0.cjs');
7
+ const netlify = require('../shared/workspace.DRlDHdPw.cjs');
8
8
  const node_fs = require('node:fs');
9
9
  const prompts = require('prompts');
10
10
 
package/dist/bin/bgl.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { resolve } from 'node:path';
3
3
  import process from 'node:process';
4
4
  import { spawn } from 'node:child_process';
5
- import { l as listProjects, w as writeNetlifyConfig, i as initWorkspace, a as addProject } from '../shared/workspace.CzoC6XYF.mjs';
5
+ import { l as listProjects, w as writeNetlifyConfig, i as initWorkspace, a as addProject } from '../shared/workspace.Bc_dpzhA.mjs';
6
6
  import { existsSync, readFileSync, readdirSync, writeFileSync, unlinkSync, mkdirSync } from 'node:fs';
7
7
  import prompts from 'prompts';
8
8
 
@@ -349,9 +349,12 @@ export default defineConfig({
349
349
  `;
350
350
  writeFileSync(resolve(projectDir, "index.html"), indexHtml);
351
351
  const mainTs = `import { createApp } from 'vue'
352
+ import { BagelVue } from '@bagelink/vue'
352
353
  import App from './App.vue'
353
354
 
354
- createApp(App).mount('#app')
355
+ createApp(App)
356
+ .use(BagelVue)
357
+ .mount('#app')
355
358
  `;
356
359
  writeFileSync(resolve(srcDir, "main.ts"), mainTs);
357
360
  const appVue = `<script setup lang="ts">
@@ -406,7 +409,16 @@ function listProjects(root = process.cwd()) {
406
409
  const items = readdirSync(root, { withFileTypes: true });
407
410
  return items.filter(
408
411
  (item) => item.isDirectory() && item.name !== "node_modules" && item.name !== "shared" && item.name !== "scripts" && item.name !== ".git" && !item.name.startsWith(".")
409
- ).map((item) => item.name).sort();
412
+ ).filter((item) => {
413
+ const packageJsonPath = resolve(root, item.name, "package.json");
414
+ if (!existsSync(packageJsonPath)) return false;
415
+ try {
416
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
417
+ return packageJson.scripts?.dev !== void 0;
418
+ } catch {
419
+ return false;
420
+ }
421
+ }).map((item) => item.name).sort();
410
422
  } catch {
411
423
  return [];
412
424
  }
@@ -356,9 +356,12 @@ export default defineConfig({
356
356
  `;
357
357
  node_fs.writeFileSync(node_path.resolve(projectDir, "index.html"), indexHtml);
358
358
  const mainTs = `import { createApp } from 'vue'
359
+ import { BagelVue } from '@bagelink/vue'
359
360
  import App from './App.vue'
360
361
 
361
- createApp(App).mount('#app')
362
+ createApp(App)
363
+ .use(BagelVue)
364
+ .mount('#app')
362
365
  `;
363
366
  node_fs.writeFileSync(node_path.resolve(srcDir, "main.ts"), mainTs);
364
367
  const appVue = `<script setup lang="ts">
@@ -413,7 +416,16 @@ function listProjects(root = process__default.cwd()) {
413
416
  const items = node_fs.readdirSync(root, { withFileTypes: true });
414
417
  return items.filter(
415
418
  (item) => item.isDirectory() && item.name !== "node_modules" && item.name !== "shared" && item.name !== "scripts" && item.name !== ".git" && !item.name.startsWith(".")
416
- ).map((item) => item.name).sort();
419
+ ).filter((item) => {
420
+ const packageJsonPath = node_path.resolve(root, item.name, "package.json");
421
+ if (!node_fs.existsSync(packageJsonPath)) return false;
422
+ try {
423
+ const packageJson = JSON.parse(node_fs.readFileSync(packageJsonPath, "utf-8"));
424
+ return packageJson.scripts?.dev !== void 0;
425
+ } catch {
426
+ return false;
427
+ }
428
+ }).map((item) => item.name).sort();
417
429
  } catch {
418
430
  return [];
419
431
  }
package/dist/vite.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  const node_path = require('node:path');
4
4
  const process = require('node:process');
5
5
  const node_url = require('node:url');
6
- const netlify = require('./shared/workspace.Didrexg0.cjs');
6
+ const netlify = require('./shared/workspace.DRlDHdPw.cjs');
7
7
  require('node:fs');
8
8
  require('prompts');
9
9
 
package/dist/vite.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { basename } from 'node:path';
2
2
  import process from 'node:process';
3
3
  import { fileURLToPath } from 'node:url';
4
- import { l as listProjects } from './shared/workspace.CzoC6XYF.mjs';
5
- export { g as generateNetlifyConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.CzoC6XYF.mjs';
4
+ import { l as listProjects } from './shared/workspace.Bc_dpzhA.mjs';
5
+ export { g as generateNetlifyConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.Bc_dpzhA.mjs';
6
6
  import 'node:fs';
7
7
  import 'prompts';
8
8
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/workspace",
3
3
  "type": "module",
4
- "version": "1.8.96",
4
+ "version": "1.8.98",
5
5
  "description": "Monorepo workspace tooling for Bagel projects with proxy and config management",
6
6
  "author": {
7
7
  "name": "Bagel Studio",
package/src/workspace.ts CHANGED
@@ -427,9 +427,12 @@ export default defineConfig({
427
427
 
428
428
  // main.ts
429
429
  const mainTs = `import { createApp } from 'vue'
430
+ import { BagelVue } from '@bagelink/vue'
430
431
  import App from './App.vue'
431
432
 
432
- createApp(App).mount('#app')
433
+ createApp(App)
434
+ .use(BagelVue)
435
+ .mount('#app')
433
436
  `
434
437
 
435
438
  writeFileSync(resolve(srcDir, 'main.ts'), mainTs)
@@ -513,6 +516,19 @@ export function listProjects(root: string = process.cwd()): string[] {
513
516
  && item.name !== '.git'
514
517
  && !item.name.startsWith('.'),
515
518
  )
519
+ .filter((item) => {
520
+ // Only include directories with package.json that has a dev script
521
+ const packageJsonPath = resolve(root, item.name, 'package.json')
522
+ if (!existsSync(packageJsonPath)) return false
523
+
524
+ try {
525
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'))
526
+ return packageJson.scripts?.dev !== undefined
527
+ }
528
+ catch {
529
+ return false
530
+ }
531
+ })
516
532
  .map(item => item.name)
517
533
  .sort() // Sort alphabetically for consistent port assignment
518
534
  }