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
|
@@ -5,21 +5,12 @@ import { logger } from "../../internal/logger/index.mjs";
|
|
|
5
5
|
import { createWorkspaceScriptCommand } from "../../runScript/index.mjs";
|
|
6
6
|
import { sortWorkspaces } from "../../workspaces/index.mjs";
|
|
7
7
|
import { matchWorkspacesByPatterns } from "../../workspaces/workspacePattern.mjs";
|
|
8
|
-
import { PROJECT_ERRORS } from "../errors.mjs";
|
|
9
|
-
// CONCATENATED MODULE: external "../../internal/bun/index.mjs"
|
|
10
|
-
// CONCATENATED MODULE: external "../../internal/core/index.mjs"
|
|
11
|
-
// CONCATENATED MODULE: external "../../internal/logger/index.mjs"
|
|
12
|
-
// CONCATENATED MODULE: external "../../runScript/index.mjs"
|
|
13
|
-
// CONCATENATED MODULE: external "../../workspaces/index.mjs"
|
|
14
|
-
// CONCATENATED MODULE: external "../../workspaces/workspacePattern.mjs"
|
|
15
|
-
// CONCATENATED MODULE: external "../errors.mjs"
|
|
16
|
-
// CONCATENATED MODULE: ./src/project/implementations/projectBase.ts
|
|
8
|
+
import { PROJECT_ERRORS } from "../errors.mjs";
|
|
17
9
|
|
|
18
10
|
const resolveWorkspacePath = (project, workspace) =>
|
|
19
11
|
path.resolve(project.rootDirectory, workspace.path);
|
|
20
|
-
const ROOT_WORKSPACE_SELECTOR = "@root";
|
|
21
12
|
const resolveRootWorkspaceSelector = (workspacePattern, project) =>
|
|
22
|
-
workspacePattern === ROOT_WORKSPACE_SELECTOR
|
|
13
|
+
workspacePattern === /* inlined export .ROOT_WORKSPACE_SELECTOR */ "@root"
|
|
23
14
|
? project.rootWorkspace
|
|
24
15
|
: project.findWorkspaceByNameOrAlias(workspacePattern);
|
|
25
16
|
class ProjectBase {
|
|
@@ -140,10 +131,15 @@ class ProjectBase {
|
|
|
140
131
|
}
|
|
141
132
|
findWorkspacesByPattern(...workspacePatterns) {
|
|
142
133
|
const workspaces = [];
|
|
143
|
-
if (
|
|
134
|
+
if (
|
|
135
|
+
workspacePatterns.includes(
|
|
136
|
+
/* inlined export .ROOT_WORKSPACE_SELECTOR */ "@root",
|
|
137
|
+
)
|
|
138
|
+
) {
|
|
144
139
|
workspaces.push(this.rootWorkspace);
|
|
145
140
|
workspacePatterns = workspacePatterns.filter(
|
|
146
|
-
(pattern) =>
|
|
141
|
+
(pattern) =>
|
|
142
|
+
pattern !== /* inlined export .ROOT_WORKSPACE_SELECTOR */ "@root",
|
|
147
143
|
);
|
|
148
144
|
}
|
|
149
145
|
workspaces.push(
|
|
@@ -207,9 +203,4 @@ class ProjectBase {
|
|
|
207
203
|
}
|
|
208
204
|
}
|
|
209
205
|
|
|
210
|
-
export {
|
|
211
|
-
ProjectBase,
|
|
212
|
-
ROOT_WORKSPACE_SELECTOR,
|
|
213
|
-
resolveRootWorkspaceSelector,
|
|
214
|
-
resolveWorkspacePath,
|
|
215
|
-
};
|
|
206
|
+
export { ProjectBase, resolveRootWorkspaceSelector, resolveWorkspacePath };
|
package/src/project/index.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from "./errors.mjs";
|
|
2
2
|
export * from "./implementations/projectBase.mjs";
|
|
3
3
|
export * from "./implementations/fileSystemProject.mjs";
|
|
4
|
-
export * from "./implementations/memoryProject.mjs";
|
|
4
|
+
export * from "./implementations/memoryProject.mjs";
|
|
5
|
+
|
|
6
|
+
export {};
|
package/src/project/project.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
// CONCATENATED MODULE: ./src/project/project.ts
|
|
2
1
|
/**
|
|
3
2
|
* A project contains a collection of workspaces and is the core of `bun-workspaces`'s functionality.
|
|
4
3
|
*
|
|
5
4
|
* Typically based on a root package.json file's `"workspaces"` field and any matching nested package.json files that are found.
|
|
6
5
|
*/
|
|
6
|
+
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __webpack_modules__ = {};
|
|
2
|
+
// The module cache
|
|
3
|
+
var __webpack_module_cache__ = {};
|
|
4
|
+
// The require function
|
|
5
|
+
function __webpack_require__(moduleId) {
|
|
6
|
+
// Check if module is in cache
|
|
7
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
8
|
+
if (cachedModule !== undefined) {
|
|
9
|
+
return cachedModule.exports;
|
|
10
|
+
}
|
|
11
|
+
// Create a new module (and put it into the cache)
|
|
12
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
13
|
+
exports: {},
|
|
14
|
+
});
|
|
15
|
+
// Execute the module function
|
|
16
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
17
|
+
|
|
18
|
+
// Return the exports of the module
|
|
19
|
+
return module.exports;
|
|
20
|
+
}
|
|
21
|
+
// expose the modules object (__webpack_modules__)
|
|
22
|
+
__webpack_require__.m = __webpack_modules__;
|
|
23
|
+
|
|
24
|
+
// webpack/runtime/compat_get_default_export
|
|
25
|
+
(() => {
|
|
26
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
27
|
+
__webpack_require__.n = (module) => {
|
|
28
|
+
var getter =
|
|
29
|
+
module && module.__esModule ? () => module["default"] : () => module;
|
|
30
|
+
__webpack_require__.d(getter, { a: getter });
|
|
31
|
+
return getter;
|
|
32
|
+
};
|
|
33
|
+
})();
|
|
34
|
+
// webpack/runtime/define_property_getters
|
|
35
|
+
(() => {
|
|
36
|
+
__webpack_require__.d = (exports, definition) => {
|
|
37
|
+
for (var key in definition) {
|
|
38
|
+
if (
|
|
39
|
+
__webpack_require__.o(definition, key) &&
|
|
40
|
+
!__webpack_require__.o(exports, key)
|
|
41
|
+
) {
|
|
42
|
+
Object.defineProperty(exports, key, {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: definition[key],
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
})();
|
|
50
|
+
// webpack/runtime/esm_register_module
|
|
51
|
+
(() => {
|
|
52
|
+
__webpack_require__.add = function registerModules(modules) {
|
|
53
|
+
Object.assign(__webpack_require__.m, modules);
|
|
54
|
+
};
|
|
55
|
+
})();
|
|
56
|
+
// webpack/runtime/has_own_property
|
|
57
|
+
(() => {
|
|
58
|
+
__webpack_require__.o = (obj, prop) =>
|
|
59
|
+
Object.prototype.hasOwnProperty.call(obj, prop);
|
|
60
|
+
})();
|
|
61
|
+
|
|
62
|
+
export { __webpack_require__ };
|
package/src/runScript/index.mjs
CHANGED
|
@@ -4,4 +4,6 @@ export * from "./scriptCommand.mjs";
|
|
|
4
4
|
export * from "./output/index.mjs";
|
|
5
5
|
export * from "./parallel.mjs";
|
|
6
6
|
export * from "./scriptRuntimeMetadata.mjs";
|
|
7
|
-
export * from "./scriptShellOption.mjs";
|
|
7
|
+
export * from "./scriptShellOption.mjs";
|
|
8
|
+
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { mergeAsyncIterables } from "../../internal/core/index.mjs";
|
|
2
|
-
// CONCATENATED MODULE: ./src/runScript/output/multiProcessOutput.ts
|
|
1
|
+
import { mergeAsyncIterables } from "../../internal/core/index.mjs";
|
|
3
2
|
|
|
4
3
|
class _MultiProcessOutput {
|
|
5
4
|
processes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -2,8 +2,7 @@ import {
|
|
|
2
2
|
BunWorkspacesError,
|
|
3
3
|
createAsyncIterableQueue,
|
|
4
4
|
defineErrors,
|
|
5
|
-
} from "../../internal/core/index.mjs";
|
|
6
|
-
// CONCATENATED MODULE: ./src/runScript/output/processOutput.ts
|
|
5
|
+
} from "../../internal/core/index.mjs";
|
|
7
6
|
|
|
8
7
|
const ERRORS = defineErrors(
|
|
9
8
|
BunWorkspacesError,
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import os from "os";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from "../config/userEnvVars/index.mjs";
|
|
6
|
-
import { BunWorkspacesError } from "../internal/core/index.mjs"; // CONCATENATED MODULE: external "os"
|
|
7
|
-
// CONCATENATED MODULE: external "../config/userEnvVars/index.mjs"
|
|
8
|
-
// CONCATENATED MODULE: external "../internal/core/index.mjs"
|
|
9
|
-
// CONCATENATED MODULE: ./src/runScript/parallel.ts
|
|
2
|
+
import { getUserEnvVar } from "../config/userEnvVars/index.mjs";
|
|
3
|
+
import { BunWorkspacesError } from "../internal/core/index.mjs";
|
|
4
|
+
import { getUserEnvVarName } from "../5166.mjs";
|
|
10
5
|
|
|
11
|
-
const PARALLEL_MAX_VALUES = ["auto", "unbounded", "default"];
|
|
12
6
|
/** Should always return at least 1 */ const determineParallelMax = (
|
|
13
7
|
value,
|
|
14
8
|
errorMessageSuffix = "",
|
|
@@ -53,4 +47,4 @@ const PARALLEL_MAX_VALUES = ["auto", "unbounded", "default"];
|
|
|
53
47
|
);
|
|
54
48
|
};
|
|
55
49
|
|
|
56
|
-
export {
|
|
50
|
+
export { determineParallelMax };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { getScriptRuntimeMetadataConfig } from "
|
|
2
|
-
// CONCATENATED MODULE: ./src/runScript/recursion.ts
|
|
1
|
+
import { getScriptRuntimeMetadataConfig } from "../1108.mjs";
|
|
3
2
|
|
|
4
3
|
const checkIsRecursiveScript = (workspaceName, scriptName) => {
|
|
5
4
|
const parentWorkspace =
|
|
@@ -3,10 +3,7 @@ import {
|
|
|
3
3
|
createProcessOutput,
|
|
4
4
|
} from "./output/index.mjs";
|
|
5
5
|
import { createScriptExecutor } from "./scriptExecution.mjs";
|
|
6
|
-
import { createSubprocess } from "./subprocesses.mjs";
|
|
7
|
-
// CONCATENATED MODULE: external "./scriptExecution.mjs"
|
|
8
|
-
// CONCATENATED MODULE: external "./subprocesses.mjs"
|
|
9
|
-
// CONCATENATED MODULE: ./src/runScript/runScript.ts
|
|
6
|
+
import { createSubprocess } from "./subprocesses.mjs";
|
|
10
7
|
|
|
11
8
|
const SIGNAL_MAP = {
|
|
12
9
|
130: "SIGINT",
|
|
@@ -5,12 +5,7 @@ import {
|
|
|
5
5
|
createProcessOutput,
|
|
6
6
|
} from "./output/index.mjs";
|
|
7
7
|
import { determineParallelMax } from "./parallel.mjs";
|
|
8
|
-
import { runScript } from "./runScript.mjs";
|
|
9
|
-
// CONCATENATED MODULE: external "../internal/logger/index.mjs"
|
|
10
|
-
// CONCATENATED MODULE: external "./output/index.mjs"
|
|
11
|
-
// CONCATENATED MODULE: external "./parallel.mjs"
|
|
12
|
-
// CONCATENATED MODULE: external "./runScript.mjs"
|
|
13
|
-
// CONCATENATED MODULE: ./src/runScript/runScripts.ts
|
|
8
|
+
import { runScript } from "./runScript.mjs";
|
|
14
9
|
|
|
15
10
|
/** Validate dependency indices and detect cycles via DFS */ const validateScriptDependencies =
|
|
16
11
|
(scripts) => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import path from "path";
|
|
2
|
-
// CONCATENATED MODULE: ./src/runScript/scriptCommand.ts
|
|
1
|
+
import path from "path";
|
|
3
2
|
|
|
4
3
|
const WORKSPACE_SCRIPT_COMMAND_METHODS = ["cd", "filter"];
|
|
5
4
|
const spaceArgs = (args) => (args ? ` ${args.trim()}` : "");
|
|
@@ -4,9 +4,7 @@ import {
|
|
|
4
4
|
IS_WINDOWS,
|
|
5
5
|
createShortId,
|
|
6
6
|
} from "../internal/core/index.mjs";
|
|
7
|
-
import { resolveScriptShell } from "./scriptShellOption.mjs";
|
|
8
|
-
// CONCATENATED MODULE: external "./scriptShellOption.mjs"
|
|
9
|
-
// CONCATENATED MODULE: ./src/runScript/scriptExecution.ts
|
|
7
|
+
import { resolveScriptShell } from "./scriptShellOption.mjs";
|
|
10
8
|
|
|
11
9
|
const createWindowsBatchFile = (command) => {
|
|
12
10
|
const fileName = `${createShortId(6)}.cmd`;
|
|
@@ -1,61 +1,43 @@
|
|
|
1
|
-
import { IS_WINDOWS } from "../internal/core/index.mjs";
|
|
2
|
-
|
|
1
|
+
import { IS_WINDOWS } from "../internal/core/index.mjs";
|
|
2
|
+
import { getScriptRuntimeMetadataConfig } from "../1108.mjs";
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
envVarName
|
|
16
|
-
},
|
|
17
|
-
workspaceRelativePath: {
|
|
18
|
-
inlineName: "<workspaceRelativePath>",
|
|
19
|
-
envVarName: "BW_WORKSPACE_RELATIVE_PATH",
|
|
20
|
-
},
|
|
21
|
-
scriptName: {
|
|
22
|
-
inlineName: "<scriptName>",
|
|
23
|
-
envVarName: "BW_SCRIPT_NAME",
|
|
24
|
-
},
|
|
25
|
-
workspaceName: {
|
|
26
|
-
inlineName: "<workspaceName>",
|
|
27
|
-
envVarName: "BW_WORKSPACE_NAME",
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
const getScriptRuntimeMetadataConfig = (key) =>
|
|
31
|
-
SCRIPT_RUNTIME_METADATA_CONFIG[key];
|
|
32
|
-
const createScriptRuntimeEnvVars = (metadata) =>
|
|
33
|
-
Object.entries(SCRIPT_RUNTIME_METADATA_CONFIG).reduce((acc, [key, value]) => {
|
|
34
|
-
acc[value.envVarName] = metadata[key];
|
|
4
|
+
const createScriptRuntimeEnvVars = (metadata) => {
|
|
5
|
+
const keys = [
|
|
6
|
+
"projectPath",
|
|
7
|
+
"projectName",
|
|
8
|
+
"workspacePath",
|
|
9
|
+
"workspaceRelativePath",
|
|
10
|
+
"scriptName",
|
|
11
|
+
"workspaceName",
|
|
12
|
+
];
|
|
13
|
+
return keys.reduce((acc, key) => {
|
|
14
|
+
const { envVarName } = getScriptRuntimeMetadataConfig(key);
|
|
15
|
+
acc[envVarName] = metadata[key];
|
|
35
16
|
return acc;
|
|
36
17
|
}, {});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const value = metadata[key];
|
|
50
|
-
if (IS_WINDOWS && shell === "bun") {
|
|
51
|
-
return value.replace(/\\/g, "\\\\");
|
|
52
|
-
}
|
|
53
|
-
return value;
|
|
54
|
-
},
|
|
18
|
+
};
|
|
19
|
+
const interpolateScriptRuntimeMetadata = (text, metadata, shell) => {
|
|
20
|
+
const keys = [
|
|
21
|
+
"projectPath",
|
|
22
|
+
"projectName",
|
|
23
|
+
"workspacePath",
|
|
24
|
+
"workspaceRelativePath",
|
|
25
|
+
"scriptName",
|
|
26
|
+
"workspaceName",
|
|
27
|
+
];
|
|
28
|
+
const inlineNames = keys.map(
|
|
29
|
+
(key) => getScriptRuntimeMetadataConfig(key).inlineName,
|
|
55
30
|
);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
31
|
+
return text.replace(new RegExp(inlineNames.join("|"), "g"), (match) => {
|
|
32
|
+
const key = keys.find(
|
|
33
|
+
(k) => getScriptRuntimeMetadataConfig(k).inlineName === match,
|
|
34
|
+
);
|
|
35
|
+
const value = metadata[key];
|
|
36
|
+
if (IS_WINDOWS && shell === "bun") {
|
|
37
|
+
return value.replace(/\\/g, "\\\\");
|
|
38
|
+
}
|
|
39
|
+
return value;
|
|
40
|
+
});
|
|
61
41
|
};
|
|
42
|
+
|
|
43
|
+
export { createScriptRuntimeEnvVars, interpolateScriptRuntimeMetadata };
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "../
|
|
5
|
-
import { BunWorkspacesError } from "../internal/core/error/index.mjs"; // CONCATENATED MODULE: external "../config/userEnvVars/index.mjs"
|
|
6
|
-
// CONCATENATED MODULE: external "../internal/core/error/index.mjs"
|
|
7
|
-
// CONCATENATED MODULE: ./src/runScript/scriptShellOption.ts
|
|
1
|
+
import { getUserEnvVar } from "../config/userEnvVars/index.mjs";
|
|
2
|
+
import { BunWorkspacesError } from "../internal/core/error/index.mjs";
|
|
3
|
+
import { SCRIPT_SHELL_OPTIONS } from "../4427.mjs";
|
|
4
|
+
import { getUserEnvVarName } from "../5166.mjs";
|
|
8
5
|
|
|
9
|
-
const SCRIPT_SHELL_OPTIONS = ["bun", "system"];
|
|
10
6
|
const validateScriptShellOption = (shell, fromEnvVar = false) => {
|
|
11
7
|
if (!SCRIPT_SHELL_OPTIONS.includes(shell)) {
|
|
12
8
|
throw new BunWorkspacesError(
|
|
@@ -31,9 +27,4 @@ const resolveScriptShell = (shell) => {
|
|
|
31
27
|
return validateScriptShellOption(shell);
|
|
32
28
|
};
|
|
33
29
|
|
|
34
|
-
export {
|
|
35
|
-
SCRIPT_SHELL_OPTIONS,
|
|
36
|
-
getScriptShellDefault,
|
|
37
|
-
resolveScriptShell,
|
|
38
|
-
validateScriptShellOption,
|
|
39
|
-
};
|
|
30
|
+
export { getScriptShellDefault, resolveScriptShell, validateScriptShellOption };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { IS_WINDOWS, runOnExit } from "../internal/core/index.mjs";
|
|
2
|
-
import { logger } from "../internal/logger/index.mjs";
|
|
3
|
-
// CONCATENATED MODULE: external "../internal/logger/index.mjs"
|
|
4
|
-
// CONCATENATED MODULE: ./src/runScript/subprocesses.ts
|
|
2
|
+
import { logger } from "../internal/logger/index.mjs";
|
|
5
3
|
|
|
6
4
|
const SUBPROCESS_REGISTRY = {};
|
|
7
5
|
runOnExit((codeOrSignal) => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { resolveCatalogDependencyVersion } from "../packageJson.mjs";
|
|
2
|
-
// CONCATENATED MODULE: ./src/workspaces/dependencyGraph/resolveDependencies.ts
|
|
1
|
+
import { resolveCatalogDependencyVersion } from "../packageJson.mjs";
|
|
3
2
|
|
|
4
3
|
const resolveWorkspaceDependencies = (
|
|
5
4
|
workspaceMap,
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { WORKSPACE_ERRORS } from "../errors.mjs";
|
|
2
|
-
import { matchWorkspacesByPatterns } from "../workspacePattern.mjs";
|
|
3
|
-
// CONCATENATED MODULE: external "../workspacePattern.mjs"
|
|
4
|
-
// CONCATENATED MODULE: ./src/workspaces/dependencyGraph/validateDependencyRules.ts
|
|
2
|
+
import { matchWorkspacesByPatterns } from "../workspacePattern.mjs";
|
|
5
3
|
|
|
6
4
|
const getTransitiveDeps = (workspaceName, workspaceMap, chain, visited) => {
|
|
7
5
|
const entry = workspaceMap[workspaceName];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { defineErrors } from "../internal/core/index.mjs";
|
|
2
|
-
// CONCATENATED MODULE: ./src/workspaces/errors.ts
|
|
1
|
+
import { defineErrors } from "../internal/core/index.mjs";
|
|
3
2
|
|
|
4
3
|
const WORKSPACE_ERRORS = defineErrors(
|
|
5
4
|
"PackageNotFound",
|
|
@@ -16,17 +16,7 @@ import { WORKSPACE_ERRORS } from "./errors.mjs";
|
|
|
16
16
|
import {
|
|
17
17
|
resolvePackageJsonContent,
|
|
18
18
|
resolvePackageJsonPath,
|
|
19
|
-
} from "./packageJson.mjs";
|
|
20
|
-
// CONCATENATED MODULE: external "path"
|
|
21
|
-
// CONCATENATED MODULE: external "bun"
|
|
22
|
-
// CONCATENATED MODULE: external "../config/index.mjs"
|
|
23
|
-
// CONCATENATED MODULE: external "../internal/bun/index.mjs"
|
|
24
|
-
// CONCATENATED MODULE: external "../internal/core/index.mjs"
|
|
25
|
-
// CONCATENATED MODULE: external "../internal/logger/logger.mjs"
|
|
26
|
-
// CONCATENATED MODULE: external "./dependencyGraph/index.mjs"
|
|
27
|
-
// CONCATENATED MODULE: external "./errors.mjs"
|
|
28
|
-
// CONCATENATED MODULE: external "./packageJson.mjs"
|
|
29
|
-
// CONCATENATED MODULE: ./src/workspaces/findWorkspaces.ts
|
|
19
|
+
} from "./packageJson.mjs";
|
|
30
20
|
|
|
31
21
|
const sortWorkspaces = (workspaces) =>
|
|
32
22
|
[...workspaces]
|
package/src/workspaces/index.mjs
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { isJSONObject } from "../internal/core/index.mjs";
|
|
4
3
|
import { logger } from "../internal/logger/index.mjs";
|
|
5
|
-
import { WORKSPACE_ERRORS } from "./errors.mjs";
|
|
6
|
-
|
|
7
|
-
// CONCATENATED MODULE: external "../internal/core/index.mjs"
|
|
8
|
-
// CONCATENATED MODULE: external "../internal/logger/index.mjs"
|
|
9
|
-
// CONCATENATED MODULE: external "./errors.mjs"
|
|
10
|
-
// CONCATENATED MODULE: ./src/workspaces/packageJson.ts
|
|
4
|
+
import { WORKSPACE_ERRORS } from "./errors.mjs";
|
|
5
|
+
import { isJSONObject } from "../8257.mjs";
|
|
11
6
|
|
|
12
7
|
const resolvePackageJsonPath = (directoryItem) => {
|
|
13
8
|
if (path.basename(directoryItem) === "package.json") {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import bun from "bun";
|
|
2
|
-
import { createWildcardRegex, defineErrors } from "../internal/core/index.mjs";
|
|
3
|
-
// CONCATENATED MODULE: external "../internal/core/index.mjs"
|
|
4
|
-
// CONCATENATED MODULE: ./src/workspaces/workspacePattern.ts
|
|
2
|
+
import { createWildcardRegex, defineErrors } from "../internal/core/index.mjs";
|
|
5
3
|
|
|
6
|
-
const
|
|
4
|
+
const WORKSPACE_PATTERN_TARGETS = ["path", "alias", "name", "tag"];
|
|
5
|
+
|
|
6
|
+
const TARGETS = WORKSPACE_PATTERN_TARGETS;
|
|
7
7
|
const WORKSPACE_PATTERN_ERRORS = defineErrors("InvalidWorkspacePattern");
|
|
8
8
|
const WORKSPACE_PATTERN_NEGATION_PREFIX = "not:";
|
|
9
9
|
const WORKSPACE_PATTERN_SEPARATOR = ":";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type McpTransport } from "./transport";
|
|
2
|
-
import {
|
|
3
|
-
type McpServerInfo,
|
|
4
|
-
type Resource,
|
|
5
|
-
type ResourceHandler,
|
|
6
|
-
type Tool,
|
|
7
|
-
type ToolHandler,
|
|
8
|
-
} from "./types";
|
|
9
|
-
export type McpServer = {
|
|
10
|
-
registerTool: (tool: Tool, handler: ToolHandler) => void;
|
|
11
|
-
registerResource: (resource: Resource, handler: ResourceHandler) => void;
|
|
12
|
-
start: (transport?: McpTransport) => Promise<void>;
|
|
13
|
-
};
|
|
14
|
-
export declare const createMcpServer: (info: McpServerInfo) => McpServer;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type RawMessage = Record<string, unknown>;
|
|
2
|
-
export type McpTransport = {
|
|
3
|
-
receive: () => AsyncGenerator<RawMessage>;
|
|
4
|
-
send: (message: RawMessage) => void;
|
|
5
|
-
};
|
|
6
|
-
export type MemoryTransport = McpTransport & {
|
|
7
|
-
sent: RawMessage[];
|
|
8
|
-
};
|
|
9
|
-
export declare const createMemoryTransport: (
|
|
10
|
-
messages: RawMessage[],
|
|
11
|
-
) => MemoryTransport;
|
|
12
|
-
export declare const createStdioTransport: () => McpTransport;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
export type JsonRpcId = string | number;
|
|
2
|
-
export type JsonRpcSuccessResponse = {
|
|
3
|
-
jsonrpc: "2.0";
|
|
4
|
-
id: JsonRpcId;
|
|
5
|
-
result: unknown;
|
|
6
|
-
};
|
|
7
|
-
export type JsonRpcErrorResponse = {
|
|
8
|
-
jsonrpc: "2.0";
|
|
9
|
-
id: JsonRpcId;
|
|
10
|
-
error: {
|
|
11
|
-
code: number;
|
|
12
|
-
message: string;
|
|
13
|
-
data?: unknown;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare const JSON_RPC_ERROR_CODES: {
|
|
17
|
-
readonly parseError: -32700;
|
|
18
|
-
readonly invalidRequest: -32600;
|
|
19
|
-
readonly methodNotFound: -32601;
|
|
20
|
-
readonly invalidParams: -32602;
|
|
21
|
-
readonly internalError: -32603;
|
|
22
|
-
};
|
|
23
|
-
export declare const MCP_PROTOCOL_VERSION = "2024-11-05";
|
|
24
|
-
export type ServerCapabilities = {
|
|
25
|
-
tools?: Record<string, never>;
|
|
26
|
-
resources?: Record<string, never>;
|
|
27
|
-
};
|
|
28
|
-
export type McpServerInfo = {
|
|
29
|
-
name: string;
|
|
30
|
-
version: string;
|
|
31
|
-
instructions?: string;
|
|
32
|
-
};
|
|
33
|
-
export type InitializeResult = {
|
|
34
|
-
protocolVersion: string;
|
|
35
|
-
capabilities: ServerCapabilities;
|
|
36
|
-
serverInfo: {
|
|
37
|
-
name: string;
|
|
38
|
-
version: string;
|
|
39
|
-
};
|
|
40
|
-
instructions?: string;
|
|
41
|
-
};
|
|
42
|
-
export type JsonSchemaProperty =
|
|
43
|
-
| {
|
|
44
|
-
type: "string";
|
|
45
|
-
description?: string;
|
|
46
|
-
enum?: string[];
|
|
47
|
-
}
|
|
48
|
-
| {
|
|
49
|
-
type: "number";
|
|
50
|
-
description?: string;
|
|
51
|
-
}
|
|
52
|
-
| {
|
|
53
|
-
type: "boolean";
|
|
54
|
-
description?: string;
|
|
55
|
-
}
|
|
56
|
-
| {
|
|
57
|
-
type: "array";
|
|
58
|
-
items: JsonSchemaProperty;
|
|
59
|
-
description?: string;
|
|
60
|
-
}
|
|
61
|
-
| {
|
|
62
|
-
type: "object";
|
|
63
|
-
properties?: Record<string, JsonSchemaProperty>;
|
|
64
|
-
required?: string[];
|
|
65
|
-
description?: string;
|
|
66
|
-
};
|
|
67
|
-
export type ToolInputSchema = {
|
|
68
|
-
type: "object";
|
|
69
|
-
properties?: Record<string, JsonSchemaProperty>;
|
|
70
|
-
required?: string[];
|
|
71
|
-
};
|
|
72
|
-
export type Tool = {
|
|
73
|
-
name: string;
|
|
74
|
-
description: string;
|
|
75
|
-
inputSchema: ToolInputSchema;
|
|
76
|
-
};
|
|
77
|
-
export type TextContent = {
|
|
78
|
-
type: "text";
|
|
79
|
-
text: string;
|
|
80
|
-
};
|
|
81
|
-
export type CallToolResult = {
|
|
82
|
-
content: TextContent[];
|
|
83
|
-
isError?: boolean;
|
|
84
|
-
};
|
|
85
|
-
export type Resource = {
|
|
86
|
-
uri: string;
|
|
87
|
-
name: string;
|
|
88
|
-
description?: string;
|
|
89
|
-
mimeType?: string;
|
|
90
|
-
};
|
|
91
|
-
export type ResourceContent = {
|
|
92
|
-
uri: string;
|
|
93
|
-
mimeType: string;
|
|
94
|
-
text: string;
|
|
95
|
-
};
|
|
96
|
-
export type ReadResourceResult = {
|
|
97
|
-
contents: ResourceContent[];
|
|
98
|
-
};
|
|
99
|
-
export type ToolHandler = (
|
|
100
|
-
args: Record<string, unknown>,
|
|
101
|
-
) => Promise<CallToolResult> | CallToolResult;
|
|
102
|
-
export type ResourceHandler = (
|
|
103
|
-
uri: string,
|
|
104
|
-
) => Promise<ReadResourceResult> | ReadResourceResult;
|
package/src/ai/mcp/index.d.ts
DELETED