@bagelink/workspace 1.10.6 → 1.10.7
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 +7 -2
- package/dist/bin/bgl.cjs +3 -3
- package/dist/bin/bgl.mjs +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +2 -2
- package/dist/shared/{workspace.DQ-r7Tja.cjs → workspace.BPEOymAx.cjs} +3 -2
- package/dist/shared/{workspace.Dq4_YhqE.mjs → workspace.DfYoqH33.mjs} +3 -2
- package/package.json +1 -1
- package/src/workspace.ts +4 -2
package/bin/bgl.ts
CHANGED
|
@@ -10,7 +10,12 @@ const [,, command, subcommand, ...args] = process.argv
|
|
|
10
10
|
|
|
11
11
|
async function main() {
|
|
12
12
|
if (command === 'init') {
|
|
13
|
-
|
|
13
|
+
// Check both subcommand and args for --workspace flag
|
|
14
|
+
const createWorkspace
|
|
15
|
+
= subcommand === '--workspace'
|
|
16
|
+
|| subcommand === '-w'
|
|
17
|
+
|| args.includes('--workspace')
|
|
18
|
+
|| args.includes('-w')
|
|
14
19
|
if (createWorkspace) {
|
|
15
20
|
await initWorkspace()
|
|
16
21
|
}
|
|
@@ -19,7 +24,7 @@ async function main() {
|
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
else if (command === 'add') {
|
|
22
|
-
const projectName =
|
|
27
|
+
const projectName = subcommand // 'bgl add admin' -> subcommand is 'admin'
|
|
23
28
|
if (!projectName) {
|
|
24
29
|
console.error('Error: Project name is required')
|
|
25
30
|
console.log('Usage: bgl add <project-name>')
|
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 detect = require('../shared/workspace.
|
|
5
|
+
const detect = require('../shared/workspace.BPEOymAx.cjs');
|
|
6
6
|
require('node:fs');
|
|
7
7
|
require('node:path');
|
|
8
8
|
require('prompts');
|
|
@@ -14,14 +14,14 @@ const process__default = /*#__PURE__*/_interopDefaultCompat(process);
|
|
|
14
14
|
const [, , command, subcommand, ...args] = process__default.argv;
|
|
15
15
|
async function main() {
|
|
16
16
|
if (command === "init") {
|
|
17
|
-
const createWorkspace = args.includes("--workspace") || args.includes("-w");
|
|
17
|
+
const createWorkspace = subcommand === "--workspace" || subcommand === "-w" || args.includes("--workspace") || args.includes("-w");
|
|
18
18
|
if (createWorkspace) {
|
|
19
19
|
await detect.initWorkspace();
|
|
20
20
|
} else {
|
|
21
21
|
await detect.generateWorkspaceConfig();
|
|
22
22
|
}
|
|
23
23
|
} else if (command === "add") {
|
|
24
|
-
const projectName =
|
|
24
|
+
const projectName = subcommand;
|
|
25
25
|
if (!projectName) {
|
|
26
26
|
console.error("Error: Project name is required");
|
|
27
27
|
console.log("Usage: bgl add <project-name>");
|
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 { i as initWorkspace, g as generateWorkspaceConfig, h as addProject, l as listProjects, k as isWorkspace, d as setupLint, f as generateSDKForWorkspace, e as generateSDK } from '../shared/workspace.
|
|
3
|
+
import { i as initWorkspace, g as generateWorkspaceConfig, h as addProject, l as listProjects, k as isWorkspace, d as setupLint, f as generateSDKForWorkspace, e as generateSDK } from '../shared/workspace.DfYoqH33.mjs';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:path';
|
|
6
6
|
import 'prompts';
|
|
@@ -8,14 +8,14 @@ import 'prompts';
|
|
|
8
8
|
const [, , command, subcommand, ...args] = process.argv;
|
|
9
9
|
async function main() {
|
|
10
10
|
if (command === "init") {
|
|
11
|
-
const createWorkspace = args.includes("--workspace") || args.includes("-w");
|
|
11
|
+
const createWorkspace = subcommand === "--workspace" || subcommand === "-w" || args.includes("--workspace") || args.includes("-w");
|
|
12
12
|
if (createWorkspace) {
|
|
13
13
|
await initWorkspace();
|
|
14
14
|
} else {
|
|
15
15
|
await generateWorkspaceConfig();
|
|
16
16
|
}
|
|
17
17
|
} else if (command === "add") {
|
|
18
|
-
const projectName =
|
|
18
|
+
const projectName = subcommand;
|
|
19
19
|
if (!projectName) {
|
|
20
20
|
console.error("Error: Project name is required");
|
|
21
21
|
console.log("Usage: bgl add <project-name>");
|
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 detect = require('./shared/workspace.
|
|
6
|
+
const detect = require('./shared/workspace.BPEOymAx.cjs');
|
|
7
7
|
require('prompts');
|
|
8
8
|
|
|
9
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
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.
|
|
5
|
-
export { h as addProject, a as generateNetlifyConfig, b as generateNetlifyRedirect, e as generateSDK, f as generateSDKForWorkspace, c as generateWorkspaceConfigSync, j as getWorkspaceInfo, i as initWorkspace, k as isWorkspace, l as listProjects, d as setupLint } from './shared/workspace.
|
|
4
|
+
import { g as generateWorkspaceConfig, s as setBuildEnvVars, w as writeNetlifyConfig } from './shared/workspace.DfYoqH33.mjs';
|
|
5
|
+
export { h as addProject, a as generateNetlifyConfig, b as generateNetlifyRedirect, e as generateSDK, f as generateSDKForWorkspace, c as generateWorkspaceConfigSync, j as getWorkspaceInfo, i as initWorkspace, k as isWorkspace, l as listProjects, d as setupLint } from './shared/workspace.DfYoqH33.mjs';
|
|
6
6
|
import 'prompts';
|
|
7
7
|
|
|
8
8
|
async function resolveConfig(mode = "development", options = {}) {
|
|
@@ -566,10 +566,11 @@ async function initWorkspace(root = process__default.cwd()) {
|
|
|
566
566
|
process__default.exit(1);
|
|
567
567
|
}
|
|
568
568
|
const { workspaceName, projectId, createFirstProject, firstProjectName } = response;
|
|
569
|
+
const workspaceDir = node_path.resolve(root, workspaceName);
|
|
569
570
|
createWorkspaceRoot(root, workspaceName, projectId);
|
|
570
|
-
createSharedPackage(
|
|
571
|
+
createSharedPackage(workspaceDir);
|
|
571
572
|
if (createFirstProject && firstProjectName) {
|
|
572
|
-
await addProject(firstProjectName,
|
|
573
|
+
await addProject(firstProjectName, workspaceDir);
|
|
573
574
|
}
|
|
574
575
|
console.log("\n\u2705 Workspace created successfully!");
|
|
575
576
|
console.log("\nNext steps:");
|
|
@@ -559,10 +559,11 @@ async function initWorkspace(root = process.cwd()) {
|
|
|
559
559
|
process.exit(1);
|
|
560
560
|
}
|
|
561
561
|
const { workspaceName, projectId, createFirstProject, firstProjectName } = response;
|
|
562
|
+
const workspaceDir = resolve(root, workspaceName);
|
|
562
563
|
createWorkspaceRoot(root, workspaceName, projectId);
|
|
563
|
-
createSharedPackage(
|
|
564
|
+
createSharedPackage(workspaceDir);
|
|
564
565
|
if (createFirstProject && firstProjectName) {
|
|
565
|
-
await addProject(firstProjectName,
|
|
566
|
+
await addProject(firstProjectName, workspaceDir);
|
|
566
567
|
}
|
|
567
568
|
console.log("\n\u2705 Workspace created successfully!");
|
|
568
569
|
console.log("\nNext steps:");
|
package/package.json
CHANGED
package/src/workspace.ts
CHANGED
|
@@ -43,14 +43,16 @@ export async function initWorkspace(root: string = process.cwd()): Promise<void>
|
|
|
43
43
|
|
|
44
44
|
const { workspaceName, projectId, createFirstProject, firstProjectName } = response
|
|
45
45
|
|
|
46
|
+
const workspaceDir = resolve(root, workspaceName)
|
|
47
|
+
|
|
46
48
|
// Create workspace structure
|
|
47
49
|
createWorkspaceRoot(root, workspaceName, projectId)
|
|
48
50
|
|
|
49
51
|
// Create shared package
|
|
50
|
-
createSharedPackage(
|
|
52
|
+
createSharedPackage(workspaceDir)
|
|
51
53
|
|
|
52
54
|
if (createFirstProject && firstProjectName) {
|
|
53
|
-
await addProject(firstProjectName,
|
|
55
|
+
await addProject(firstProjectName, workspaceDir)
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
console.log('\n✅ Workspace created successfully!')
|