bun-workspaces 1.5.1 → 1.5.2
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/cli.js +0 -0
- package/package.json +1 -5
- package/src/1108.mjs +30 -0
- package/src/{cli/commands/commandsConfig.mjs → 2392.mjs} +52 -11
- package/src/4427.mjs +9 -0
- package/src/5166.mjs +8 -0
- package/src/8126.mjs +4 -0
- package/src/8257.mjs +4 -0
- package/src/{config/util/configLocation.mjs → 8529.mjs} +11 -2
- package/src/ai/mcp/bwMcpServer.mjs +213 -9
- package/src/ai/mcp/core/index.mjs +3 -1
- package/src/ai/mcp/core/server.mjs +1 -3
- package/src/ai/mcp/core/transport.mjs +1 -2
- package/src/ai/mcp/core/types.mjs +0 -1
- package/src/ai/mcp/index.mjs +3 -1
- package/src/ai/mcp/resources.mjs +1 -2
- package/src/ai/mcp/tools.mjs +1 -5
- package/src/cli/commands/commandHandlerUtils.mjs +2 -6
- package/src/cli/commands/commands.mjs +1 -4
- package/src/cli/commands/handleSimpleCommands.mjs +4 -10
- package/src/cli/commands/index.mjs +11 -2
- package/src/cli/commands/mcp.mjs +1 -4
- package/src/cli/commands/runScript/handleRunScript.mjs +1 -9
- package/src/cli/commands/runScript/index.mjs +3 -1
- package/src/cli/commands/runScript/output/index.mjs +3 -1
- package/src/cli/commands/runScript/output/outputStyle.mjs +1 -3
- package/src/cli/commands/runScript/output/renderGroupedOutput.mjs +1 -6
- package/src/cli/commands/runScript/output/renderPlainOutput.mjs +1 -2
- package/src/cli/commands/runScript/output/sanitizeChunk.mjs +0 -1
- package/src/cli/createCli.mjs +2 -12
- package/src/cli/fatalErrorLogger.mjs +1 -2
- package/src/cli/globalOptions/globalOptions.mjs +2 -9
- package/src/cli/globalOptions/index.mjs +3 -2
- package/src/cli/index.d.ts +1025 -3
- package/src/cli/index.mjs +3 -1
- package/src/cli/middleware.mjs +1 -3
- package/src/config/index.mjs +3 -1
- package/src/config/public.d.ts +93 -10
- package/src/config/public.mjs +2 -6
- package/src/config/rootConfig/defineRootConfig.mjs +1 -2
- package/src/config/rootConfig/errors.mjs +1 -2
- package/src/config/rootConfig/index.mjs +2 -1
- package/src/config/rootConfig/loadRootConfig.mjs +1 -4
- package/src/config/rootConfig/rootConfig.mjs +1 -6
- package/src/config/rootConfig/rootConfigSchema.mjs +0 -1
- package/src/config/userEnvVars/index.mjs +3 -1
- package/src/config/userEnvVars/userEnvVars.mjs +3 -8
- package/src/config/util/ajvTypes.mjs +2 -1
- package/src/config/util/index.mjs +2 -1
- package/src/config/util/loadConfig.mjs +1 -6
- package/src/config/util/validateConfig.mjs +0 -1
- package/src/config/workspaceConfig/defineWorkspaceConfig.mjs +1 -2
- package/src/config/workspaceConfig/errors.mjs +1 -2
- package/src/config/workspaceConfig/index.mjs +2 -1
- package/src/config/workspaceConfig/loadWorkspaceConfig.mjs +2 -8
- package/src/config/workspaceConfig/workspaceConfig.mjs +1 -5
- package/src/config/workspaceConfig/workspaceConfigSchema.mjs +0 -1
- package/src/doctor/doctor.mjs +1 -5
- package/src/doctor/index.mjs +3 -1
- package/src/index.d.ts +458 -38
- package/src/index.mjs +4 -13
- package/src/internal/bun/bunLock.mjs +2 -4
- package/src/internal/bun/bunVersion.mjs +1 -3
- package/src/internal/bun/index.mjs +3 -1
- package/src/internal/bundledDeps/commander.mjs +3843 -0
- package/src/internal/bundledDeps/shellQuote.mjs +291 -0
- package/src/internal/core/error/error.mjs +0 -1
- package/src/internal/core/error/index.mjs +3 -1
- package/src/internal/core/index.mjs +3 -1
- package/src/internal/core/json/index.mjs +3 -1
- package/src/internal/core/json/json.mjs +3 -5
- package/src/internal/core/json/jsonc.mjs +0 -1
- package/src/internal/core/language/array/index.mjs +3 -1
- package/src/internal/core/language/array/optionalArray.mjs +0 -1
- package/src/internal/core/language/asyncIterable/asyncIterableQueue.mjs +0 -1
- package/src/internal/core/language/asyncIterable/index.mjs +3 -1
- package/src/internal/core/language/asyncIterable/mergeAsyncIterables.mjs +0 -1
- package/src/internal/core/language/events/typedEventTarget.mjs +0 -1
- package/src/internal/core/language/index.mjs +3 -1
- package/src/internal/core/language/regex/index.mjs +3 -1
- package/src/internal/core/language/regex/regex.mjs +0 -1
- package/src/internal/core/language/string/id.mjs +0 -1
- package/src/internal/core/language/string/index.mjs +3 -1
- package/src/internal/core/language/string/utf/eastAsianWidth.mjs +0 -1
- package/src/internal/core/language/string/utf/visibleLength.mjs +1 -2
- package/src/internal/core/language/types/index.mjs +3 -1
- package/src/internal/core/language/types/typeof.mjs +1 -3
- package/src/internal/core/language/types/types.mjs +3 -2
- package/src/internal/core/runtime/env.mjs +0 -1
- package/src/internal/core/runtime/index.mjs +3 -1
- package/src/internal/core/runtime/onExit.mjs +1 -2
- package/src/internal/core/runtime/os.mjs +1 -3
- package/src/internal/core/runtime/tempFile.mjs +1 -9
- package/src/internal/core/runtime/terminal.mjs +0 -1
- package/src/internal/generated/aiDocs/.gitkeep.mjs +1 -0
- package/src/internal/generated/aiDocs/docs.mjs +0 -1
- package/src/internal/logger/index.mjs +3 -1
- package/src/internal/logger/logger.mjs +4 -14
- package/src/internal/version.mjs +1 -2
- package/src/project/errors.mjs +1 -2
- package/src/project/implementations/fileSystemProject.mjs +3 -18
- package/src/project/implementations/memoryProject.mjs +1 -5
- package/src/project/implementations/projectBase.mjs +10 -19
- package/src/project/index.mjs +3 -1
- package/src/project/project.mjs +2 -1
- package/src/rslib-runtime.mjs +62 -0
- package/src/runScript/index.mjs +3 -1
- package/src/runScript/output/index.mjs +3 -1
- package/src/runScript/output/multiProcessOutput.mjs +1 -2
- package/src/runScript/output/outputStream.mjs +1 -1
- package/src/runScript/output/processOutput.mjs +1 -2
- package/src/runScript/parallel.mjs +4 -10
- package/src/runScript/recursion.mjs +1 -2
- package/src/runScript/runScript.mjs +1 -4
- package/src/runScript/runScripts.mjs +1 -6
- package/src/runScript/scriptCommand.mjs +1 -2
- package/src/runScript/scriptExecution.mjs +1 -3
- package/src/runScript/scriptRuntimeMetadata.mjs +38 -56
- package/src/runScript/scriptShellOption.mjs +5 -14
- package/src/runScript/subprocesses.mjs +1 -3
- package/src/workspaces/dependencyGraph/cycles.mjs +0 -1
- package/src/workspaces/dependencyGraph/index.mjs +3 -1
- package/src/workspaces/dependencyGraph/resolveDependencies.mjs +1 -2
- package/src/workspaces/dependencyGraph/validateDependencyRules.mjs +1 -3
- package/src/workspaces/errors.mjs +1 -2
- package/src/workspaces/findWorkspaces.mjs +1 -11
- package/src/workspaces/index.mjs +3 -1
- package/src/workspaces/packageJson.mjs +2 -7
- package/src/workspaces/workspace.mjs +2 -1
- package/src/workspaces/workspacePattern.mjs +4 -4
- package/src/ai/mcp/bwMcpServer.d.ts +0 -4
- package/src/ai/mcp/core/index.d.ts +0 -3
- package/src/ai/mcp/core/server.d.ts +0 -14
- package/src/ai/mcp/core/transport.d.ts +0 -12
- package/src/ai/mcp/core/types.d.ts +0 -104
- package/src/ai/mcp/index.d.ts +0 -2
- package/src/ai/mcp/resources.d.ts +0 -6
- package/src/ai/mcp/tools.d.ts +0 -6
- package/src/cli/commands/commandHandlerUtils.d.ts +0 -51
- package/src/cli/commands/commands.d.ts +0 -10
- package/src/cli/commands/commandsConfig.d.ts +0 -436
- package/src/cli/commands/handleSimpleCommands.d.ts +0 -21
- package/src/cli/commands/index.d.ts +0 -4
- package/src/cli/commands/mcp.d.ts +0 -3
- package/src/cli/commands/runScript/handleRunScript.d.ts +0 -3
- package/src/cli/commands/runScript/index.d.ts +0 -2
- package/src/cli/commands/runScript/output/index.d.ts +0 -1
- package/src/cli/commands/runScript/output/outputStyle.d.ts +0 -9
- package/src/cli/commands/runScript/output/renderGroupedOutput.d.ts +0 -75
- package/src/cli/commands/runScript/output/renderPlainOutput.d.ts +0 -24
- package/src/cli/commands/runScript/output/sanitizeChunk.d.ts +0 -4
- package/src/cli/createCli.d.ts +0 -26
- package/src/cli/fatalErrorLogger.d.ts +0 -1
- package/src/cli/globalOptions/globalOptions.d.ts +0 -43
- package/src/cli/globalOptions/globalOptionsConfig.d.ts +0 -52
- package/src/cli/globalOptions/globalOptionsConfig.mjs +0 -43
- package/src/cli/globalOptions/index.d.ts +0 -2
- package/src/cli/middleware.d.ts +0 -83
- package/src/config/index.d.ts +0 -3
- package/src/config/rootConfig/defineRootConfig.d.ts +0 -4
- package/src/config/rootConfig/errors.d.ts +0 -1
- package/src/config/rootConfig/index.d.ts +0 -5
- package/src/config/rootConfig/loadRootConfig.d.ts +0 -3
- package/src/config/rootConfig/rootConfig.d.ts +0 -25
- package/src/config/rootConfig/rootConfigLocation.d.ts +0 -2
- package/src/config/rootConfig/rootConfigLocation.mjs +0 -5
- package/src/config/rootConfig/rootConfigSchema.d.ts +0 -21
- package/src/config/userEnvVars/index.d.ts +0 -1
- package/src/config/userEnvVars/userEnvVars.d.ts +0 -13
- package/src/config/util/ajvTypes.d.ts +0 -10
- package/src/config/util/configLocation.d.ts +0 -18
- package/src/config/util/index.d.ts +0 -4
- package/src/config/util/loadConfig.d.ts +0 -18
- package/src/config/util/validateConfig.d.ts +0 -8
- package/src/config/workspaceConfig/defineWorkspaceConfig.d.ts +0 -7
- package/src/config/workspaceConfig/errors.d.ts +0 -1
- package/src/config/workspaceConfig/index.d.ts +0 -5
- package/src/config/workspaceConfig/loadWorkspaceConfig.d.ts +0 -3
- package/src/config/workspaceConfig/workspaceConfig.d.ts +0 -56
- package/src/config/workspaceConfig/workspaceConfigLocation.d.ts +0 -2
- package/src/config/workspaceConfig/workspaceConfigLocation.mjs +0 -5
- package/src/config/workspaceConfig/workspaceConfigSchema.d.ts +0 -56
- package/src/doctor/doctor.d.ts +0 -35
- package/src/doctor/index.d.ts +0 -1
- package/src/internal/bun/bunLock.d.ts +0 -20
- package/src/internal/bun/bunVersion.d.ts +0 -21
- package/src/internal/bun/index.d.ts +0 -2
- package/src/internal/core/error/error.d.ts +0 -13
- package/src/internal/core/error/index.d.ts +0 -1
- package/src/internal/core/index.d.ts +0 -4
- package/src/internal/core/json/index.d.ts +0 -2
- package/src/internal/core/json/json.d.ts +0 -49
- package/src/internal/core/json/jsonc.d.ts +0 -9
- package/src/internal/core/language/array/index.d.ts +0 -1
- package/src/internal/core/language/array/optionalArray.d.ts +0 -15
- package/src/internal/core/language/asyncIterable/asyncIterableQueue.d.ts +0 -16
- package/src/internal/core/language/asyncIterable/index.d.ts +0 -2
- package/src/internal/core/language/asyncIterable/mergeAsyncIterables.d.ts +0 -5
- package/src/internal/core/language/events/typedEventTarget.d.ts +0 -50
- package/src/internal/core/language/index.d.ts +0 -5
- package/src/internal/core/language/regex/index.d.ts +0 -1
- package/src/internal/core/language/regex/regex.d.ts +0 -3
- package/src/internal/core/language/string/id.d.ts +0 -1
- package/src/internal/core/language/string/index.d.ts +0 -1
- package/src/internal/core/language/string/utf/eastAsianWidth.d.ts +0 -16
- package/src/internal/core/language/string/utf/visibleLength.d.ts +0 -5
- package/src/internal/core/language/types/index.d.ts +0 -2
- package/src/internal/core/language/types/typeof.d.ts +0 -102
- package/src/internal/core/language/types/types.d.ts +0 -19
- package/src/internal/core/runtime/env.d.ts +0 -6
- package/src/internal/core/runtime/index.d.ts +0 -5
- package/src/internal/core/runtime/onExit.d.ts +0 -4
- package/src/internal/core/runtime/os.d.ts +0 -6
- package/src/internal/core/runtime/tempFile.d.ts +0 -20
- package/src/internal/core/runtime/terminal.d.ts +0 -1
- package/src/internal/docs/apiQuickstart.d.ts +0 -3
- package/src/internal/docs/apiQuickstart.mjs +0 -132
- package/src/internal/docs/cliQuickstart.d.ts +0 -2
- package/src/internal/docs/cliQuickstart.mjs +0 -86
- package/src/internal/docs/index.d.ts +0 -2
- package/src/internal/docs/index.mjs +0 -2
- package/src/internal/generated/aiDocs/docs.d.ts +0 -10
- package/src/internal/logger/index.d.ts +0 -1
- package/src/internal/logger/logger.d.ts +0 -45
- package/src/internal/version.d.ts +0 -1
- package/src/project/errors.d.ts +0 -5
- package/src/project/implementations/fileSystemProject.d.ts +0 -148
- package/src/project/implementations/memoryProject.d.ts +0 -41
- package/src/project/implementations/projectBase.d.ts +0 -37
- package/src/project/index.d.ts +0 -5
- package/src/project/project.d.ts +0 -79
- package/src/runScript/index.d.ts +0 -7
- package/src/runScript/output/index.d.ts +0 -3
- package/src/runScript/output/multiProcessOutput.d.ts +0 -14
- package/src/runScript/output/outputStream.d.ts +0 -1
- package/src/runScript/output/processOutput.d.ts +0 -33
- package/src/runScript/parallel.d.ts +0 -24
- package/src/runScript/recursion.d.ts +0 -4
- package/src/runScript/runScript.d.ts +0 -45
- package/src/runScript/runScripts.d.ts +0 -65
- package/src/runScript/scriptCommand.d.ts +0 -33
- package/src/runScript/scriptExecution.d.ts +0 -9
- package/src/runScript/scriptRuntimeMetadata.d.ts +0 -73
- package/src/runScript/scriptShellOption.d.ts +0 -8
- package/src/runScript/subprocesses.d.ts +0 -11
- package/src/workspaces/dependencyGraph/cycles.d.ts +0 -9
- package/src/workspaces/dependencyGraph/index.d.ts +0 -3
- package/src/workspaces/dependencyGraph/resolveDependencies.d.ts +0 -18
- package/src/workspaces/dependencyGraph/validateDependencyRules.d.ts +0 -7
- package/src/workspaces/errors.d.ts +0 -14
- package/src/workspaces/findWorkspaces.d.ts +0 -24
- package/src/workspaces/index.d.ts +0 -4
- package/src/workspaces/packageJson.d.ts +0 -31
- package/src/workspaces/workspace.d.ts +0 -21
- package/src/workspaces/workspacePattern.d.ts +0 -22
package/bin/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bun-workspaces",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "A monorepo management tool for Bun, with a CLI and API to enhance Bun's native workspaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"exports": {
|
|
@@ -43,9 +43,5 @@
|
|
|
43
43
|
"build": "1.3.5",
|
|
44
44
|
"libraryConsumer": "^1.2.0"
|
|
45
45
|
}
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"commander": "^12.1.0",
|
|
49
|
-
"shell-quote": "^1.8.3"
|
|
50
46
|
}
|
|
51
47
|
}
|
package/src/1108.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const SCRIPT_RUNTIME_METADATA_CONFIG = {
|
|
2
|
+
projectPath: {
|
|
3
|
+
inlineName: "<projectPath>",
|
|
4
|
+
envVarName: "BW_PROJECT_PATH",
|
|
5
|
+
},
|
|
6
|
+
projectName: {
|
|
7
|
+
inlineName: "<projectName>",
|
|
8
|
+
envVarName: "BW_PROJECT_NAME",
|
|
9
|
+
},
|
|
10
|
+
workspacePath: {
|
|
11
|
+
inlineName: "<workspacePath>",
|
|
12
|
+
envVarName: "BW_WORKSPACE_PATH",
|
|
13
|
+
},
|
|
14
|
+
workspaceRelativePath: {
|
|
15
|
+
inlineName: "<workspaceRelativePath>",
|
|
16
|
+
envVarName: "BW_WORKSPACE_RELATIVE_PATH",
|
|
17
|
+
},
|
|
18
|
+
scriptName: {
|
|
19
|
+
inlineName: "<scriptName>",
|
|
20
|
+
envVarName: "BW_SCRIPT_NAME",
|
|
21
|
+
},
|
|
22
|
+
workspaceName: {
|
|
23
|
+
inlineName: "<workspaceName>",
|
|
24
|
+
envVarName: "BW_WORKSPACE_NAME",
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const getScriptRuntimeMetadataConfig = (key) =>
|
|
28
|
+
SCRIPT_RUNTIME_METADATA_CONFIG[key];
|
|
29
|
+
|
|
30
|
+
export { getScriptRuntimeMetadataConfig };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { SCRIPT_SHELL_OPTIONS } from "
|
|
2
|
-
import {
|
|
3
|
-
// CONCATENATED MODULE: external "./runScript/output/outputStyle.mjs"
|
|
4
|
-
// CONCATENATED MODULE: ./src/cli/commands/commandsConfig.ts
|
|
1
|
+
import { OUTPUT_STYLE_VALUES, SCRIPT_SHELL_OPTIONS } from "./4427.mjs";
|
|
2
|
+
import { LOG_LEVELS } from "./8126.mjs";
|
|
5
3
|
|
|
6
4
|
const JSON_FLAGS = ["-j", "--json"];
|
|
5
|
+
const PRETTY_FLAGS = ["-p", "--pretty"];
|
|
7
6
|
const CLI_COMMANDS_CONFIG = {
|
|
8
7
|
doctor: {
|
|
9
8
|
command: "doctor",
|
|
@@ -16,7 +15,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
16
15
|
description: "Output as JSON",
|
|
17
16
|
},
|
|
18
17
|
pretty: {
|
|
19
|
-
flags:
|
|
18
|
+
flags: PRETTY_FLAGS,
|
|
20
19
|
description: "Pretty print JSON",
|
|
21
20
|
},
|
|
22
21
|
},
|
|
@@ -40,7 +39,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
40
39
|
description: "Output as JSON",
|
|
41
40
|
},
|
|
42
41
|
pretty: {
|
|
43
|
-
flags:
|
|
42
|
+
flags: PRETTY_FLAGS,
|
|
44
43
|
description: "Pretty print JSON",
|
|
45
44
|
},
|
|
46
45
|
},
|
|
@@ -60,7 +59,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
60
59
|
description: "Output as JSON",
|
|
61
60
|
},
|
|
62
61
|
pretty: {
|
|
63
|
-
flags:
|
|
62
|
+
flags: PRETTY_FLAGS,
|
|
64
63
|
description: "Pretty print JSON",
|
|
65
64
|
},
|
|
66
65
|
},
|
|
@@ -76,7 +75,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
76
75
|
description: "Output as JSON",
|
|
77
76
|
},
|
|
78
77
|
pretty: {
|
|
79
|
-
flags:
|
|
78
|
+
flags: PRETTY_FLAGS,
|
|
80
79
|
description: "Pretty print JSON",
|
|
81
80
|
},
|
|
82
81
|
},
|
|
@@ -96,7 +95,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
96
95
|
description: "Output as JSON",
|
|
97
96
|
},
|
|
98
97
|
pretty: {
|
|
99
|
-
flags:
|
|
98
|
+
flags: PRETTY_FLAGS,
|
|
100
99
|
description: "Pretty print JSON",
|
|
101
100
|
},
|
|
102
101
|
},
|
|
@@ -116,7 +115,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
116
115
|
description: "Output as JSON",
|
|
117
116
|
},
|
|
118
117
|
pretty: {
|
|
119
|
-
flags:
|
|
118
|
+
flags: PRETTY_FLAGS,
|
|
120
119
|
description: "Pretty print JSON",
|
|
121
120
|
},
|
|
122
121
|
},
|
|
@@ -132,7 +131,7 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
132
131
|
description: "Output as JSON",
|
|
133
132
|
},
|
|
134
133
|
pretty: {
|
|
135
|
-
flags:
|
|
134
|
+
flags: PRETTY_FLAGS,
|
|
136
135
|
description: "Pretty print JSON",
|
|
137
136
|
},
|
|
138
137
|
},
|
|
@@ -217,9 +216,51 @@ const CLI_COMMANDS_CONFIG = {
|
|
|
217
216
|
const getCliCommandConfig = (commandName) => CLI_COMMANDS_CONFIG[commandName];
|
|
218
217
|
const getCliCommandNames = () => Object.keys(CLI_COMMANDS_CONFIG);
|
|
219
218
|
|
|
219
|
+
const CLI_GLOBAL_OPTIONS_CONFIG = {
|
|
220
|
+
logLevel: {
|
|
221
|
+
mainOption: "--log-level",
|
|
222
|
+
shortOption: "-l",
|
|
223
|
+
description: "Log levels",
|
|
224
|
+
defaultValue: "info",
|
|
225
|
+
values: [...LOG_LEVELS, "silent"],
|
|
226
|
+
param: "level",
|
|
227
|
+
},
|
|
228
|
+
cwd: {
|
|
229
|
+
mainOption: "--cwd",
|
|
230
|
+
shortOption: "-d",
|
|
231
|
+
description: "Working directory",
|
|
232
|
+
defaultValue: "",
|
|
233
|
+
values: null,
|
|
234
|
+
param: "path",
|
|
235
|
+
},
|
|
236
|
+
includeRoot: {
|
|
237
|
+
mainOption: "--include-root",
|
|
238
|
+
shortOption: "-r",
|
|
239
|
+
description: "Include the root workspace as a normal workspace",
|
|
240
|
+
defaultValue: "",
|
|
241
|
+
values: null,
|
|
242
|
+
param: "",
|
|
243
|
+
},
|
|
244
|
+
workspaceRoot: {
|
|
245
|
+
mainOption: "--workspace-root",
|
|
246
|
+
shortOption: "-w",
|
|
247
|
+
description:
|
|
248
|
+
"Run from the project root above the current working directory",
|
|
249
|
+
defaultValue: "",
|
|
250
|
+
values: null,
|
|
251
|
+
param: "",
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
const getCliGlobalOptionConfig = (optionName) =>
|
|
255
|
+
CLI_GLOBAL_OPTIONS_CONFIG[optionName];
|
|
256
|
+
const getCliGlobalOptionNames = () => Object.keys(CLI_GLOBAL_OPTIONS_CONFIG);
|
|
257
|
+
|
|
220
258
|
export {
|
|
221
259
|
CLI_COMMANDS_CONFIG,
|
|
222
260
|
JSON_FLAGS,
|
|
261
|
+
PRETTY_FLAGS,
|
|
223
262
|
getCliCommandConfig,
|
|
224
263
|
getCliCommandNames,
|
|
264
|
+
getCliGlobalOptionConfig,
|
|
265
|
+
getCliGlobalOptionNames,
|
|
225
266
|
};
|
package/src/4427.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const SCRIPT_SHELL_OPTIONS = ["bun", "system"];
|
|
2
|
+
const OUTPUT_STYLE_VALUES = ["grouped", "prefixed", "plain", "none"];
|
|
3
|
+
const PARALLEL_MAX_VALUES = /* unused pure expression or super */ null && [
|
|
4
|
+
"auto",
|
|
5
|
+
"unbounded",
|
|
6
|
+
"default",
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
export { OUTPUT_STYLE_VALUES, SCRIPT_SHELL_OPTIONS };
|
package/src/5166.mjs
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const USER_ENV_VARS = {
|
|
2
|
+
parallelMaxDefault: "BW_PARALLEL_MAX_DEFAULT",
|
|
3
|
+
scriptShellDefault: "BW_SHELL_DEFAULT",
|
|
4
|
+
includeRootWorkspaceDefault: "BW_INCLUDE_ROOT_WORKSPACE_DEFAULT",
|
|
5
|
+
};
|
|
6
|
+
const getUserEnvVarName = (key) => USER_ENV_VARS[key];
|
|
7
|
+
|
|
8
|
+
export { USER_ENV_VARS, getUserEnvVarName };
|
package/src/8126.mjs
ADDED
package/src/8257.mjs
ADDED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
const ROOT_CONFIG_FILE_NAME = "bw.root";
|
|
2
|
+
const ROOT_CONFIG_PACKAGE_JSON_KEY = "bw-root";
|
|
3
|
+
const WORKSPACE_CONFIG_FILE_NAME = "bw.workspace";
|
|
4
|
+
const WORKSPACE_CONFIG_PACKAGE_JSON_KEY = "bw";
|
|
2
5
|
const CONFIG_LOCATION_TYPES = [
|
|
3
6
|
"tsFile",
|
|
4
7
|
"jsFile",
|
|
@@ -16,4 +19,10 @@ const CONFIG_LOCATION_PATHS = {
|
|
|
16
19
|
const createConfigLocationPath = (locationType, name, packageJsonKey) =>
|
|
17
20
|
CONFIG_LOCATION_PATHS[locationType](name, packageJsonKey);
|
|
18
21
|
|
|
19
|
-
export {
|
|
22
|
+
export {
|
|
23
|
+
CONFIG_LOCATION_TYPES,
|
|
24
|
+
ROOT_CONFIG_FILE_NAME,
|
|
25
|
+
ROOT_CONFIG_PACKAGE_JSON_KEY,
|
|
26
|
+
WORKSPACE_CONFIG_FILE_NAME,
|
|
27
|
+
createConfigLocationPath,
|
|
28
|
+
};
|
|
@@ -1,15 +1,219 @@
|
|
|
1
1
|
import package_0 from "../../../package.json";
|
|
2
|
-
import { API_QUICKSTART } from "../../internal/docs/apiQuickstart.mjs";
|
|
3
|
-
import { CLI_QUICKSTART } from "../../internal/docs/cliQuickstart.mjs";
|
|
4
2
|
import { createMcpServer } from "./core/index.mjs";
|
|
5
3
|
import { registerBwResources } from "./resources.mjs";
|
|
6
|
-
import { registerBwTools } from "./tools.mjs";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
import { registerBwTools } from "./tools.mjs";
|
|
5
|
+
|
|
6
|
+
const CLI_QUICKSTART = `
|
|
7
|
+
# You can add this to .bashrc, .zshrc, or similar.
|
|
8
|
+
# You can also invoke "bw" in your root package.json scripts.
|
|
9
|
+
alias bw="bunx bun-workspaces"
|
|
10
|
+
|
|
11
|
+
# List all workspaces in your project
|
|
12
|
+
bw list-workspaces
|
|
13
|
+
|
|
14
|
+
# ls is an alias for list-workspaces
|
|
15
|
+
bw ls --json --pretty # Output as formatted JSON
|
|
16
|
+
|
|
17
|
+
# Get info about a workspace
|
|
18
|
+
bw workspace-info my-workspace
|
|
19
|
+
bw info my-workspace --json --pretty # info is alias for workspace-info
|
|
20
|
+
|
|
21
|
+
# Get info about a script, such as the workspaces that have it
|
|
22
|
+
bw script-info my-script
|
|
23
|
+
|
|
24
|
+
# Run the lint script for all workspaces
|
|
25
|
+
# that have it in their package.json "scripts" field
|
|
26
|
+
bw run-script lint
|
|
27
|
+
|
|
28
|
+
# run is an alias for run-script
|
|
29
|
+
bw run lint my-workspace # Run for a single workspace
|
|
30
|
+
bw run lint my-workspace-a my-workspace-b # Run for multiple workspaces
|
|
31
|
+
bw run lint my-alias-a my-alias-b # Run by alias (set by optional config)
|
|
32
|
+
|
|
33
|
+
# A workspace's script will wait until any workspaces it depends on have completed
|
|
34
|
+
# Similar to Bun's --filter behavior
|
|
35
|
+
bw run lint --dep-order
|
|
36
|
+
|
|
37
|
+
# Continue running scripts even if a dependency fails
|
|
38
|
+
bw run lint --dep-order --ignore-dep-failure
|
|
39
|
+
|
|
40
|
+
bw run lint "my-workspace-*" # Run for matching workspace names
|
|
41
|
+
bw run lint "alias:my-alias-*" "path:my-glob/**/*" "tag:my-tag" # Use matching specifiers
|
|
42
|
+
bw run lint "*" "not:path:my-path/*" # Run for all workspaces not in my-path/
|
|
43
|
+
|
|
44
|
+
bw run lint --args="--my-appended-args" # Add args to each script call
|
|
45
|
+
bw run lint --args="--my-arg=<workspaceName>" # Use the workspace name in args
|
|
46
|
+
|
|
47
|
+
bw run "bun build" --inline # Run an inline command via the Bun shell
|
|
48
|
+
|
|
49
|
+
# Scripts run in parallel by default
|
|
50
|
+
bw run lint --parallel=false # Run in series
|
|
51
|
+
bw run lint --parallel=2 # Run in parallel with a max of 2 concurrent scripts
|
|
52
|
+
bw run lint --parallel=auto # Default, based on number of available logical CPUs
|
|
53
|
+
bw run lint --parallel=50% # Run in parallel with a max of 50% of the "auto" limit
|
|
54
|
+
|
|
55
|
+
# Use the grouped output style (default when on a TTY)
|
|
56
|
+
bw run my-script --output-style=grouped
|
|
57
|
+
|
|
58
|
+
# Set the max preview lines for script output in grouped output style
|
|
59
|
+
bw run my-script --output-style=grouped --grouped-lines=auto
|
|
60
|
+
bw run my-script --output-style=grouped --grouped-lines=10
|
|
61
|
+
|
|
62
|
+
# Use simple script output with workspace prefixes (default when not on a TTY)
|
|
63
|
+
bw run my-script --output-style=prefixed
|
|
64
|
+
|
|
65
|
+
# Use the plain output style (no workspace prefixes)
|
|
66
|
+
bw run my-script --output-style=plain
|
|
67
|
+
|
|
68
|
+
# Silence all output of the run command
|
|
69
|
+
bw --log-level=silent run my-script --output-style=none
|
|
70
|
+
|
|
71
|
+
# Show usage (you can pass --help to any command)
|
|
72
|
+
bw help
|
|
73
|
+
bw --help
|
|
74
|
+
|
|
75
|
+
# Show version
|
|
76
|
+
bw --version
|
|
77
|
+
|
|
78
|
+
# Pass --cwd to any command
|
|
79
|
+
bw --cwd=/path/to/your/project ls
|
|
80
|
+
bw --cwd=/path/to/your/project run my-script
|
|
81
|
+
|
|
82
|
+
# Pass --log-level to any command (debug, info, warn, error, or silent)
|
|
83
|
+
bw --log-level=debug ls
|
|
84
|
+
`.trim();
|
|
85
|
+
const INLINE_SCRIPT_EXAMPLE =
|
|
86
|
+
/* unused pure expression or super */ null &&
|
|
87
|
+
`
|
|
88
|
+
# Run an inline command from the workspace directory
|
|
89
|
+
bw run "bun run build" --inline
|
|
90
|
+
`.trim();
|
|
91
|
+
|
|
92
|
+
const RUN_WORKSPACE_SCRIPT_EXAMPLE = `
|
|
93
|
+
const { output, exit } = project.runWorkspaceScript({
|
|
94
|
+
workspaceNameOrAlias: "my-workspace",
|
|
95
|
+
script: "my-script",
|
|
96
|
+
|
|
97
|
+
// Optional. Arguments to add to the command
|
|
98
|
+
// Can be a string or an array of strings
|
|
99
|
+
// If string, the argv will be parsed POSIX-style
|
|
100
|
+
args: ["--my", "--appended", "--args"],
|
|
101
|
+
|
|
102
|
+
// Optional. Whether to ignore all output from the script.
|
|
103
|
+
// This saves memory when you don't need script output.
|
|
104
|
+
ignoreOutput: false,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Get a stream of the script subprocess's output
|
|
108
|
+
for await (const { chunk, metadata } of output.text()) {
|
|
109
|
+
// console.log(chunk); // The output chunk's content (string)
|
|
110
|
+
// console.log(metadata.streamName); // The output stream, "stdout" or "stderr"
|
|
111
|
+
// console.log(metadata.workspace); // The target Workspace
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Get data about the script execution after it exits
|
|
115
|
+
const exitResult = await exit;
|
|
116
|
+
|
|
117
|
+
// exitResult.exitCode // The exit code (number)
|
|
118
|
+
// exitResult.signal // The exit signal (string), or null
|
|
119
|
+
// exitResult.success // true if exit code was 0
|
|
120
|
+
// exitResult.startTimeISO // Start time (string)
|
|
121
|
+
// exitResult.endTimeISO // End time (string)
|
|
122
|
+
// exitResult.durationMs // Duration in milliseconds (number)
|
|
123
|
+
// exitResult.metadata.workspace // The target workspace (Workspace)
|
|
124
|
+
|
|
125
|
+
`.trim();
|
|
126
|
+
const RUN_SCRIPT_ACROSS_WORKSPACES_EXAMPLE = `
|
|
127
|
+
|
|
128
|
+
const { output, summary } = project.runScriptAcrossWorkspaces({
|
|
129
|
+
// Optional. This will run in all matching workspaces that have my-script
|
|
130
|
+
// Accepts same values as the CLI run-script command's workspace patterns
|
|
131
|
+
// When not provided, all workspaces that have the script will be used.
|
|
132
|
+
workspacePatterns: ["my-workspace", "my-name-pattern-*"],
|
|
133
|
+
|
|
134
|
+
// Required. The package.json "scripts" field name to run
|
|
135
|
+
script: "my-script",
|
|
136
|
+
|
|
137
|
+
// Optional. Arguments to add to the command (same as for runWorkspaceScript)
|
|
138
|
+
args: ["--my", "--appended", "--args"],
|
|
139
|
+
|
|
140
|
+
// Optional. Whether to run the scripts in parallel (default: true)
|
|
141
|
+
parallel: true,
|
|
142
|
+
|
|
143
|
+
// Optional. When true, a workspace's script will wait
|
|
144
|
+
// until any workspaces it depends on have completed
|
|
145
|
+
dependencyOrder: false,
|
|
146
|
+
|
|
147
|
+
// Optional. When true and dependencyOrder is true,
|
|
148
|
+
// continue running scripts even if a dependency fails
|
|
149
|
+
ignoreDependencyFailure: false,
|
|
150
|
+
|
|
151
|
+
// Optional. Whether to ignore all output from the scripts.
|
|
152
|
+
// This saves memory when you don't need script output.
|
|
153
|
+
ignoreOutput: false,
|
|
154
|
+
|
|
155
|
+
// Optional, callback when script starts, skips, or exits
|
|
156
|
+
onScriptEvent: (event, { workspace, exitResult }) => {
|
|
157
|
+
// event: "start", "skip", "exit"
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
// Get a stream of script output
|
|
162
|
+
for await (const { chunk, metadata } of output.text()) {
|
|
163
|
+
// console.log(chunk); // the output chunk's content (string)
|
|
164
|
+
// console.log(metadata.streamName); // "stdout" or "stderr"
|
|
165
|
+
// console.log(metadata.workspace); // the Workspace that the output came from
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Get final summary data and script exit details after all scripts have completed
|
|
169
|
+
const summaryResult = await summary;
|
|
170
|
+
|
|
171
|
+
// summaryResult.totalCount // Total number of scripts
|
|
172
|
+
// summaryResult.allSuccess // true if all scripts succeeded
|
|
173
|
+
// summaryResult.successCount // Number of scripts that succeeded
|
|
174
|
+
// summaryResult.failureCount // Number of scripts that failed
|
|
175
|
+
// summaryResult.startTimeISO // Start time (string)
|
|
176
|
+
// summaryResult.endTimeISO // End time (string)
|
|
177
|
+
// summaryResult.durationMs // Total duration in milliseconds (number)
|
|
178
|
+
|
|
179
|
+
// The exit details of each workspace script
|
|
180
|
+
for (const exitResult of summaryResult.scriptResults) {
|
|
181
|
+
// exitResult.exitCode // The exit code (number)
|
|
182
|
+
// exitResult.signal // The exit signal (string), or null
|
|
183
|
+
// exitResult.success // true if exit code was 0
|
|
184
|
+
// exitResult.startTimeISO // Start time (ISO string)
|
|
185
|
+
// exitResult.endTimeISO // End time (ISO string)
|
|
186
|
+
// exitResult.durationMs // Duration in milliseconds (number)
|
|
187
|
+
// exitResult.metadata.workspace // The target workspace (Workspace)
|
|
188
|
+
}
|
|
189
|
+
`.trim();
|
|
190
|
+
const API_QUICKSTART = `
|
|
191
|
+
import { createFileSystemProject } from "bun-workspaces";
|
|
192
|
+
|
|
193
|
+
// A Project contains the core functionality of bun-workspaces.
|
|
194
|
+
// Below defaults to process.cwd() for the project root directory
|
|
195
|
+
// Pass { rootDirectory: "path/to/your/project" } to use a different root directory
|
|
196
|
+
const project = createFileSystemProject();
|
|
197
|
+
|
|
198
|
+
// A Workspace that matches the name or alias "my-workspace"
|
|
199
|
+
const myWorkspace = project.findWorkspaceByNameOrAlias("my-workspace");
|
|
200
|
+
|
|
201
|
+
// Array of workspaces whose names match the wildcard pattern
|
|
202
|
+
const wildcardWorkspaces = project.findWorkspacesByPattern("my-workspace-*");
|
|
203
|
+
|
|
204
|
+
// Array of workspaces that have "my-script" in their package.json "scripts"
|
|
205
|
+
const workspacesWithScript = project.listWorkspacesWithScript("my-script");
|
|
206
|
+
|
|
207
|
+
// Run a script in a workspace
|
|
208
|
+
const runSingleScript = async () => {
|
|
209
|
+
${RUN_WORKSPACE_SCRIPT_EXAMPLE.split("\n").join("\n ")}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Run a script in all workspaces that have it in their package.json "scripts" field
|
|
213
|
+
const runManyScripts = async () => {
|
|
214
|
+
${RUN_SCRIPT_ACROSS_WORKSPACES_EXAMPLE.split("\n").join("\n ")}
|
|
215
|
+
}
|
|
216
|
+
`.trim();
|
|
13
217
|
|
|
14
218
|
const SERVER_INSTRUCTIONS = `
|
|
15
219
|
bun-workspaces MCP server: tools to query Bun monorepo workspace metadata and documentation resources for the bun-workspaces CLI and TypeScript API.
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { createStdioTransport } from "./transport.mjs";
|
|
2
|
-
import { JSON_RPC_ERROR_CODES, MCP_PROTOCOL_VERSION } from "./types.mjs";
|
|
3
|
-
// CONCATENATED MODULE: external "./types.mjs"
|
|
4
|
-
// CONCATENATED MODULE: ./src/ai/mcp/core/server.ts
|
|
2
|
+
import { JSON_RPC_ERROR_CODES, MCP_PROTOCOL_VERSION } from "./types.mjs";
|
|
5
3
|
|
|
6
4
|
const createMcpServer = (info) => {
|
|
7
5
|
const tools = new Map();
|
package/src/ai/mcp/index.mjs
CHANGED
package/src/ai/mcp/resources.mjs
CHANGED
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
DOC_CONCEPTS,
|
|
5
5
|
DOC_CONFIG,
|
|
6
6
|
DOC_OVERVIEW,
|
|
7
|
-
} from "../../internal/generated/aiDocs/docs.mjs";
|
|
8
|
-
// CONCATENATED MODULE: ./src/ai/mcp/resources.ts
|
|
7
|
+
} from "../../internal/generated/aiDocs/docs.mjs";
|
|
9
8
|
|
|
10
9
|
const textResource = (uri, text) => ({
|
|
11
10
|
contents: [
|
package/src/ai/mcp/tools.mjs
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { getDoctorInfo } from "../../doctor/index.mjs";
|
|
2
2
|
import { BUN_WORKSPACES_VERSION } from "../../internal/version.mjs";
|
|
3
|
-
import { ROOT_WORKSPACE_SELECTOR } from "../../project/implementations/projectBase.mjs"; // CONCATENATED MODULE: external "../../doctor/index.mjs"
|
|
4
|
-
// CONCATENATED MODULE: external "../../internal/version.mjs"
|
|
5
|
-
// CONCATENATED MODULE: external "../../project/implementations/projectBase.mjs"
|
|
6
|
-
// CONCATENATED MODULE: ./src/ai/mcp/tools.ts
|
|
7
3
|
|
|
8
4
|
const textResult = (data) => ({
|
|
9
5
|
content: [
|
|
@@ -83,7 +79,7 @@ const registerBwTools = (server, project) => {
|
|
|
83
79
|
({ nameOrAlias }) => {
|
|
84
80
|
const name = nameOrAlias;
|
|
85
81
|
const workspace =
|
|
86
|
-
name === ROOT_WORKSPACE_SELECTOR
|
|
82
|
+
name === /* inlined export .ROOT_WORKSPACE_SELECTOR */ "@root"
|
|
87
83
|
? project.rootWorkspace
|
|
88
84
|
: project.findWorkspaceByNameOrAlias(name);
|
|
89
85
|
if (!workspace) {
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { Option } from "commander";
|
|
1
|
+
import { Option } from "../../internal/bundledDeps/commander.mjs";
|
|
2
2
|
import { BunWorkspacesError } from "../../internal/core/error/index.mjs";
|
|
3
3
|
import { createLogger, logger } from "../../internal/logger/index.mjs";
|
|
4
|
-
import { getCliCommandConfig } from "
|
|
5
|
-
// CONCATENATED MODULE: external "../../internal/core/error/index.mjs"
|
|
6
|
-
// CONCATENATED MODULE: external "../../internal/logger/index.mjs"
|
|
7
|
-
// CONCATENATED MODULE: external "./commandsConfig.mjs"
|
|
8
|
-
// CONCATENATED MODULE: ./src/cli/commands/commandHandlerUtils.ts
|
|
4
|
+
import { getCliCommandConfig } from "../../2392.mjs";
|
|
9
5
|
|
|
10
6
|
/** Splits workspace patterns by whitespace, but allows escaping spaces via backslash */ const splitWorkspacePatterns =
|
|
11
7
|
(workspacePatterns) =>
|
|
@@ -8,10 +8,7 @@ import {
|
|
|
8
8
|
workspaceInfo,
|
|
9
9
|
} from "./handleSimpleCommands.mjs";
|
|
10
10
|
import { mcpServer } from "./mcp.mjs";
|
|
11
|
-
import { runScript } from "./runScript/index.mjs";
|
|
12
|
-
// CONCATENATED MODULE: external "./mcp.mjs"
|
|
13
|
-
// CONCATENATED MODULE: external "./runScript/index.mjs"
|
|
14
|
-
// CONCATENATED MODULE: ./src/cli/commands/commands.ts
|
|
11
|
+
import { runScript } from "./runScript/index.mjs";
|
|
15
12
|
|
|
16
13
|
const defineGlobalCommands = (context) => {
|
|
17
14
|
doctor(context);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { getDoctorInfo } from "../../doctor/index.mjs";
|
|
2
|
-
import { isJSONObject } from "../../internal/core/index.mjs";
|
|
3
2
|
import { logger } from "../../internal/logger/index.mjs";
|
|
4
|
-
import { ROOT_WORKSPACE_SELECTOR } from "../../project/index.mjs";
|
|
5
3
|
import {
|
|
6
4
|
commandOutputLogger,
|
|
7
5
|
createJsonLines,
|
|
@@ -10,12 +8,8 @@ import {
|
|
|
10
8
|
handleGlobalCommand,
|
|
11
9
|
handleProjectCommand,
|
|
12
10
|
splitWorkspacePatterns,
|
|
13
|
-
} from "./commandHandlerUtils.mjs";
|
|
14
|
-
|
|
15
|
-
// CONCATENATED MODULE: external "../../internal/logger/index.mjs"
|
|
16
|
-
// CONCATENATED MODULE: external "../../project/index.mjs"
|
|
17
|
-
// CONCATENATED MODULE: external "./commandHandlerUtils.mjs"
|
|
18
|
-
// CONCATENATED MODULE: ./src/cli/commands/handleSimpleCommands.ts
|
|
11
|
+
} from "./commandHandlerUtils.mjs";
|
|
12
|
+
import { isJSONObject } from "../../8257.mjs";
|
|
19
13
|
|
|
20
14
|
const doctor = handleGlobalCommand("doctor", (_, options) => {
|
|
21
15
|
logger.debug(`Options: ${JSON.stringify(options)}`);
|
|
@@ -128,7 +122,7 @@ const workspaceInfo = handleProjectCommand(
|
|
|
128
122
|
({ project }, workspaceName, options) => {
|
|
129
123
|
logger.debug(`Options: ${JSON.stringify(options)}`);
|
|
130
124
|
const workspace =
|
|
131
|
-
workspaceName === ROOT_WORKSPACE_SELECTOR
|
|
125
|
+
workspaceName === /* inlined export .ROOT_WORKSPACE_SELECTOR */ "@root"
|
|
132
126
|
? project.rootWorkspace
|
|
133
127
|
: project.findWorkspaceByNameOrAlias(workspaceName);
|
|
134
128
|
if (!workspace) {
|
|
@@ -230,10 +224,10 @@ const handleSimpleCommands_tagInfo = handleProjectCommand(
|
|
|
230
224
|
|
|
231
225
|
export {
|
|
232
226
|
doctor,
|
|
227
|
+
handleSimpleCommands_tagInfo as tagInfo,
|
|
233
228
|
listScripts,
|
|
234
229
|
listTags,
|
|
235
230
|
listWorkspaces,
|
|
236
231
|
scriptInfo,
|
|
237
|
-
handleSimpleCommands_tagInfo as tagInfo,
|
|
238
232
|
workspaceInfo,
|
|
239
233
|
};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export * from "./commands.mjs";
|
|
2
|
-
export * from "./commandsConfig.mjs";
|
|
3
2
|
export * from "./mcp.mjs";
|
|
4
|
-
export * from "./runScript/index.mjs";
|
|
3
|
+
export * from "./runScript/index.mjs";
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
CLI_COMMANDS_CONFIG,
|
|
7
|
+
JSON_FLAGS,
|
|
8
|
+
PRETTY_FLAGS,
|
|
9
|
+
getCliCommandConfig,
|
|
10
|
+
getCliCommandNames,
|
|
11
|
+
getCliGlobalOptionConfig,
|
|
12
|
+
getCliGlobalOptionNames,
|
|
13
|
+
} from "../../2392.mjs";
|
package/src/cli/commands/mcp.mjs
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { startBwMcpServer } from "../../ai/mcp/index.mjs";
|
|
2
2
|
import { logger } from "../../internal/logger/index.mjs";
|
|
3
|
-
import { handleProjectCommand } from "./commandHandlerUtils.mjs";
|
|
4
|
-
// CONCATENATED MODULE: external "../../internal/logger/index.mjs"
|
|
5
|
-
// CONCATENATED MODULE: external "./commandHandlerUtils.mjs"
|
|
6
|
-
// CONCATENATED MODULE: ./src/cli/commands/mcp.ts
|
|
3
|
+
import { handleProjectCommand } from "./commandHandlerUtils.mjs";
|
|
7
4
|
|
|
8
5
|
const mcpServer = handleProjectCommand("mcpServer", async ({ project }) => {
|
|
9
6
|
logger.printLevel = "silent";
|
|
@@ -15,15 +15,7 @@ import {
|
|
|
15
15
|
createScriptEventTarget,
|
|
16
16
|
renderGroupedOutput,
|
|
17
17
|
} from "./output/renderGroupedOutput.mjs";
|
|
18
|
-
import { renderPlainOutput } from "./output/renderPlainOutput.mjs";
|
|
19
|
-
// CONCATENATED MODULE: external "path"
|
|
20
|
-
// CONCATENATED MODULE: external "../../../internal/core/index.mjs"
|
|
21
|
-
// CONCATENATED MODULE: external "../../../internal/logger/index.mjs"
|
|
22
|
-
// CONCATENATED MODULE: external "../commandHandlerUtils.mjs"
|
|
23
|
-
// CONCATENATED MODULE: external "./output/outputStyle.mjs"
|
|
24
|
-
// CONCATENATED MODULE: external "./output/renderGroupedOutput.mjs"
|
|
25
|
-
// CONCATENATED MODULE: external "./output/renderPlainOutput.mjs"
|
|
26
|
-
// CONCATENATED MODULE: ./src/cli/commands/runScript/handleRunScript.ts
|
|
18
|
+
import { renderPlainOutput } from "./output/renderPlainOutput.mjs";
|
|
27
19
|
|
|
28
20
|
const runScript = handleProjectCommand(
|
|
29
21
|
"runScript",
|