bun-workspaces 1.5.1 → 1.6.0
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/README.md +96 -2
- 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 +299 -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 +1085 -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 +151 -10
- package/src/config/public.mjs +4 -6
- package/src/config/rootConfig/defineRootConfig.mjs +1 -2
- package/src/config/rootConfig/errors.mjs +1 -2
- package/src/config/rootConfig/index.mjs +3 -1
- package/src/config/rootConfig/loadRootConfig.mjs +1 -4
- package/src/config/rootConfig/mergeRootConfig.mjs +24 -0
- package/src/config/rootConfig/rootConfig.mjs +8 -6
- package/src/config/rootConfig/rootConfigSchema.mjs +19 -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 +3 -1
- package/src/config/workspaceConfig/loadWorkspaceConfig.mjs +2 -8
- package/src/config/workspaceConfig/mergeWorkspaceConfig.mjs +75 -0
- package/src/config/workspaceConfig/workspaceConfig.mjs +1 -13
- 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 +516 -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 +92 -15
- package/src/internal/generated/ajv/validateRootConfig.mjs +1 -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 +4 -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/applyWorkspacePatternConfigs.mjs +58 -0
- 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 +12 -13
- package/src/workspaces/errors.mjs +1 -2
- package/src/workspaces/findWorkspaces.mjs +11 -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/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",
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { BunWorkspacesError } from "../../../../internal/core/error/index.mjs";
|
|
2
|
-
import { IS_TTY } from "../../../../internal/core/runtime/terminal.mjs";
|
|
3
|
-
// CONCATENATED MODULE: external "../../../../internal/core/runtime/terminal.mjs"
|
|
4
|
-
// CONCATENATED MODULE: ./src/cli/commands/runScript/output/outputStyle.ts
|
|
2
|
+
import { IS_TTY } from "../../../../internal/core/runtime/terminal.mjs";
|
|
5
3
|
|
|
6
4
|
const OUTPUT_STYLE_VALUES = ["grouped", "prefixed", "plain", "none"];
|
|
7
5
|
const getDefaultOutputStyle = () => (IS_TTY ? "grouped" : "prefixed");
|
|
@@ -8,12 +8,7 @@ import {
|
|
|
8
8
|
truncateTerminalString,
|
|
9
9
|
} from "../../../../internal/core/language/string/utf/visibleLength.mjs";
|
|
10
10
|
import { logger } from "../../../../internal/logger/index.mjs";
|
|
11
|
-
import { generatePlainOutputLines } from "./renderPlainOutput.mjs";
|
|
12
|
-
// CONCATENATED MODULE: external "../../../../internal/core/language/events/typedEventTarget.mjs"
|
|
13
|
-
// CONCATENATED MODULE: external "../../../../internal/core/language/string/utf/visibleLength.mjs"
|
|
14
|
-
// CONCATENATED MODULE: external "../../../../internal/logger/index.mjs"
|
|
15
|
-
// CONCATENATED MODULE: external "./renderPlainOutput.mjs"
|
|
16
|
-
// CONCATENATED MODULE: ./src/cli/commands/runScript/output/renderGroupedOutput.ts
|
|
11
|
+
import { generatePlainOutputLines } from "./renderPlainOutput.mjs";
|
|
17
12
|
|
|
18
13
|
class ScriptEventTarget extends TypedEventTarget {}
|
|
19
14
|
const createScriptEventTarget = () => new ScriptEventTarget();
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { sanitizeChunk } from "./sanitizeChunk.mjs";
|
|
2
|
-
// CONCATENATED MODULE: ./src/cli/commands/runScript/output/renderPlainOutput.ts
|
|
1
|
+
import { sanitizeChunk } from "./sanitizeChunk.mjs";
|
|
3
2
|
|
|
4
3
|
async function* generatePlainOutputLines(
|
|
5
4
|
output,
|
package/src/cli/createCli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createCommand } from "commander";
|
|
2
1
|
import package_0 from "../../package.json";
|
|
3
2
|
import { validateCurrentBunVersion } from "../internal/bun/index.mjs";
|
|
3
|
+
import { createCommand } from "../internal/bundledDeps/commander.mjs";
|
|
4
4
|
import { BunWorkspacesError } from "../internal/core/index.mjs";
|
|
5
5
|
import { logger } from "../internal/logger/index.mjs";
|
|
6
6
|
import {
|
|
@@ -10,17 +10,7 @@ import {
|
|
|
10
10
|
import { commandOutputLogger } from "./commands/commandHandlerUtils.mjs";
|
|
11
11
|
import { fatalErrorLogger } from "./fatalErrorLogger.mjs";
|
|
12
12
|
import { initializeWithGlobalOptions } from "./globalOptions/index.mjs";
|
|
13
|
-
import { resolveMiddleware } from "./middleware.mjs";
|
|
14
|
-
// CONCATENATED MODULE: external "../../package.json"
|
|
15
|
-
// CONCATENATED MODULE: external "../internal/bun/index.mjs"
|
|
16
|
-
// CONCATENATED MODULE: external "../internal/core/index.mjs"
|
|
17
|
-
// CONCATENATED MODULE: external "../internal/logger/index.mjs"
|
|
18
|
-
// CONCATENATED MODULE: external "./commands/index.mjs"
|
|
19
|
-
// CONCATENATED MODULE: external "./commands/commandHandlerUtils.mjs"
|
|
20
|
-
// CONCATENATED MODULE: external "./fatalErrorLogger.mjs"
|
|
21
|
-
// CONCATENATED MODULE: external "./globalOptions/index.mjs"
|
|
22
|
-
// CONCATENATED MODULE: external "./middleware.mjs"
|
|
23
|
-
// CONCATENATED MODULE: ./src/cli/createCli.ts
|
|
13
|
+
import { resolveMiddleware } from "./middleware.mjs";
|
|
24
14
|
|
|
25
15
|
const createCli = ({ defaultCwd = process.cwd(), defaultMiddleware } = {}) => {
|
|
26
16
|
logger.debug(`Creating CLI with default cwd: ${defaultCwd}`);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { createLogger } from "../internal/logger/index.mjs";
|
|
2
|
-
// CONCATENATED MODULE: ./src/cli/fatalErrorLogger.ts
|
|
1
|
+
import { createLogger } from "../internal/logger/index.mjs";
|
|
3
2
|
|
|
4
3
|
const fatalErrorLogger = createLogger("fatalError");
|
|
5
4
|
fatalErrorLogger.printLevel = "error";
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { Option } from "commander";
|
|
3
|
+
import { Option } from "../../internal/bundledDeps/commander.mjs";
|
|
4
4
|
import { defineErrors, expandHomePath } from "../../internal/core/index.mjs";
|
|
5
5
|
import { logger } from "../../internal/logger/index.mjs";
|
|
6
6
|
import {
|
|
7
7
|
createFileSystemProject,
|
|
8
8
|
createMemoryProject,
|
|
9
9
|
} from "../../project/index.mjs";
|
|
10
|
-
import { getCliGlobalOptionConfig } from "
|
|
11
|
-
// CONCATENATED MODULE: external "path"
|
|
12
|
-
// CONCATENATED MODULE: external "commander"
|
|
13
|
-
// CONCATENATED MODULE: external "../../internal/core/index.mjs"
|
|
14
|
-
// CONCATENATED MODULE: external "../../internal/logger/index.mjs"
|
|
15
|
-
// CONCATENATED MODULE: external "../../project/index.mjs"
|
|
16
|
-
// CONCATENATED MODULE: external "./globalOptionsConfig.mjs"
|
|
17
|
-
// CONCATENATED MODULE: ./src/cli/globalOptions/globalOptions.ts
|
|
10
|
+
import { getCliGlobalOptionConfig } from "../../2392.mjs";
|
|
18
11
|
|
|
19
12
|
const ERRORS = defineErrors(
|
|
20
13
|
"WorkingDirectoryNotFound",
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
|
|
1
|
+
export * from "./globalOptions.mjs";
|
|
2
|
+
|
|
3
|
+
export {};
|