argsbarg 4.0.4 → 4.1.1
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/CHANGELOG.md +77 -1
- package/README.md +91 -85
- package/docs/README.md +6 -6
- package/docs/ai-skills.md +8 -5
- package/docs/bundled-docs.md +1 -1
- package/docs/cli-program.md +9 -7
- package/docs/config-schema.md +37 -13
- package/docs/developing.md +8 -8
- package/docs/distribution-homebrew.md +103 -0
- package/docs/install.md +143 -106
- package/docs/mcp.md +23 -12
- package/docs/output-schema.md +1 -1
- package/examples/full-example/Formula/.gitkeep +0 -0
- package/examples/full-example/README.md +98 -0
- package/examples/full-example/biome.json +22 -0
- package/examples/{consumer-app → full-example}/bun.lock +2 -0
- package/examples/full-example/justfile +134 -0
- package/examples/{consumer-app → full-example}/package.json +10 -3
- package/examples/{consumer-app → full-example}/schemas/generated/app-config.json +1 -1
- package/examples/{consumer-app → full-example}/schemas/generated/status.json +1 -1
- package/examples/full-example/scripts/create-identity.ts +11 -0
- package/examples/full-example/scripts/formula-shared.ts +73 -0
- package/examples/full-example/scripts/gen-dev-formula.ts +26 -0
- package/examples/full-example/scripts/print-identity.ts +27 -0
- package/examples/full-example/src/commands/echo/command.ts +21 -0
- package/examples/full-example/src/commands/status/command.test.ts +10 -0
- package/examples/full-example/src/commands/status/command.ts +36 -0
- package/examples/{consumer-app → full-example}/src/commands/status/types.ts +1 -1
- package/examples/full-example/src/index.ts +10 -0
- package/examples/full-example/src/program.ts +57 -0
- package/examples/{consumer-app → full-example}/src/types.ts +1 -1
- package/examples/mcp-test.ts +8 -24
- package/examples/nested.ts +1 -3
- package/index.d.ts +81 -65
- package/package.json +2 -2
- package/src/builtins/builtins.test.ts +37 -22
- package/src/builtins/completion-group.ts +17 -15
- package/src/builtins/config.test.ts +31 -25
- package/src/builtins/config.ts +4 -3
- package/src/builtins/dispatch.ts +25 -1
- package/src/builtins/install.ts +45 -82
- package/src/builtins/mcp.ts +1 -1
- package/src/builtins/registry.ts +2 -0
- package/src/builtins/uninstall.ts +80 -0
- package/src/capabilities.ts +5 -7
- package/src/cli-tool/cli-smoke.test.ts +19 -0
- package/src/cli-tool/create.test.ts +119 -0
- package/src/cli-tool/create.ts +380 -0
- package/{examples/consumer-app/capabilities.test.ts → src/cli-tool/full-example-capabilities.test.ts} +15 -14
- package/src/cli-tool/main.ts +8 -0
- package/src/cli-tool/post-create.ts +111 -0
- package/src/cli-tool/program.ts +82 -0
- package/src/cli-tool/prompt.ts +28 -0
- package/src/cli-tool/run-create.ts +149 -0
- package/src/config/bootstrap.ts +174 -66
- package/src/config/context.test.ts +22 -36
- package/src/config/context.ts +5 -4
- package/src/config/file.test.ts +66 -56
- package/src/config/file.ts +33 -25
- package/src/config/resolve.test.ts +192 -1
- package/src/config/resolve.ts +92 -13
- package/src/config.integration.test.ts +17 -10
- package/src/docs/api-guide.test.ts +4 -5
- package/src/docs/docs.test.ts +2 -1
- package/src/docs/mcp-guide.ts +7 -8
- package/src/hidden-mcpb.test.ts +41 -1
- package/src/index.ts +7 -10
- package/src/install/binary-placement.test.ts +101 -0
- package/src/install/binary-placement.ts +47 -0
- package/src/install/detect-installed.ts +2 -97
- package/src/install/index.ts +239 -168
- package/src/install/install-validate.test.ts +61 -0
- package/src/install/install.test.ts +170 -90
- package/src/install/mcp-openclaw.test.ts +40 -0
- package/src/install/mcp-openclaw.ts +106 -0
- package/src/install/normalize-uninstall.ts +11 -0
- package/src/install/normalize.ts +20 -0
- package/src/install/paths.ts +18 -26
- package/src/install/plan.ts +40 -261
- package/src/install/shell.ts +0 -14
- package/src/install/status.test.ts +85 -0
- package/src/install/status.ts +22 -15
- package/src/install/target-base.ts +93 -0
- package/src/install/target-detect.ts +20 -0
- package/src/install/target-effective.ts +129 -0
- package/src/install/target-mcp-cli.ts +149 -0
- package/src/install/target-mcp-json.ts +130 -0
- package/src/install/target-plan-build.ts +67 -0
- package/src/install/target-registry.ts +57 -0
- package/src/install/target-scope.ts +253 -0
- package/src/install/target-skill.ts +104 -0
- package/src/install/target-types.ts +129 -0
- package/src/install/targets/app.ts +60 -0
- package/src/install/targets/chatgpt-mcp.ts +12 -0
- package/src/install/targets/claude-code-mcp.ts +15 -0
- package/src/install/targets/claude-desktop-mcp.ts +12 -0
- package/src/install/targets/claude-skill.ts +16 -0
- package/src/install/targets/codex-mcp.ts +25 -0
- package/src/install/targets/codex-skill.ts +14 -0
- package/src/install/targets/configure.ts +63 -0
- package/src/install/targets/cursor-mcp.ts +15 -0
- package/src/install/targets/cursor-skill.ts +16 -0
- package/src/install/targets/index.ts +50 -0
- package/src/install/targets/openclaw-mcp.ts +25 -0
- package/src/install/targets/openclaw-skill.ts +17 -0
- package/src/install/targets/opencode-mcp.ts +101 -0
- package/src/install/targets/opencode-skill.ts +15 -0
- package/src/install/targets.test.ts +118 -0
- package/src/install/uninstall.ts +16 -152
- package/src/invoke.test.ts +7 -1
- package/src/mcp/bundle.ts +16 -4
- package/src/mcp/claude.test.ts +14 -1
- package/src/mcp/claude.ts +11 -4
- package/src/mcp/env.test.ts +92 -0
- package/src/mcp/env.ts +15 -14
- package/src/mcp/zip.test.ts +17 -0
- package/src/mcp/zip.ts +62 -9
- package/src/mcp.integration.test.ts +1 -1
- package/src/parse.test.ts +14 -2
- package/src/paths/host.ts +11 -11
- package/src/paths/remove-empty-dir.ts +13 -0
- package/src/prompt.ts +10 -0
- package/src/schema.ts +9 -1
- package/src/skill/generate.ts +18 -4
- package/src/skill/install.ts +33 -6
- package/src/skill/naming.ts +28 -0
- package/src/types.ts +86 -7
- package/src/validate.ts +73 -9
- package/docs/templates/cursor/rules/cli-program.mdc +0 -31
- package/examples/config-app/main.ts +0 -20
- package/examples/config-app/program.ts +0 -81
- package/examples/config-app/schema.ts +0 -37
- package/examples/config-app/types.ts +0 -19
- package/examples/consumer-app/README.md +0 -57
- package/examples/consumer-app/src/main.ts +0 -15
- package/examples/consumer-app/src/program.ts +0 -108
- package/src/install/binary.ts +0 -94
- package/src/install/completions.ts +0 -56
- package/src/install/update.test.ts +0 -108
- package/src/install/update.ts +0 -57
- /package/examples/{consumer-app → full-example}/schemas/configSchemas.ts +0 -0
- /package/examples/{consumer-app → full-example}/schemas/outputSchemas.ts +0 -0
- /package/examples/{consumer-app → full-example}/scripts/schemagen/discover-schema-roots.test.ts +0 -0
- /package/examples/{consumer-app → full-example}/scripts/schemagen/discover-schema-roots.ts +0 -0
- /package/examples/{consumer-app → full-example}/scripts/schemagen/naming.ts +0 -0
- /package/examples/{consumer-app → full-example}/scripts/schemagen.ts +0 -0
- /package/examples/{consumer-app → full-example}/tsconfig.json +0 -0
package/src/install/binary.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
copyFileSync,
|
|
3
|
-
existsSync,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
readFileSync,
|
|
6
|
-
unlinkSync,
|
|
7
|
-
writeFileSync,
|
|
8
|
-
} from "node:fs";
|
|
9
|
-
import { dirname, join } from "node:path";
|
|
10
|
-
import type { CliProgram } from "../types.ts";
|
|
11
|
-
import type { InstallPaths } from "./paths.ts";
|
|
12
|
-
import {
|
|
13
|
-
buildPathRcBlock,
|
|
14
|
-
buildZshFpathRcBlock,
|
|
15
|
-
detectShells,
|
|
16
|
-
hasRcBlock,
|
|
17
|
-
removeRcBlock,
|
|
18
|
-
} from "./shell.ts";
|
|
19
|
-
|
|
20
|
-
export interface BinaryInstallResult {
|
|
21
|
-
changedFiles: string[];
|
|
22
|
-
patchedBashRc: boolean;
|
|
23
|
-
patchedZshRc: boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/** Copies a binary to the install path and patches rc files when shells are detected. */
|
|
27
|
-
export function installBinary(
|
|
28
|
-
root: CliProgram,
|
|
29
|
-
paths: InstallPaths,
|
|
30
|
-
dry: boolean,
|
|
31
|
-
sourcePath: string = process.execPath,
|
|
32
|
-
): BinaryInstallResult {
|
|
33
|
-
const changed: string[] = [];
|
|
34
|
-
const shells = detectShells();
|
|
35
|
-
let patchedBashRc = false;
|
|
36
|
-
let patchedZshRc = false;
|
|
37
|
-
|
|
38
|
-
if (!dry) {
|
|
39
|
-
mkdirSync(paths.bindir, { recursive: true });
|
|
40
|
-
copyFileSync(sourcePath, paths.binaryPath);
|
|
41
|
-
}
|
|
42
|
-
changed.push(paths.binaryPath);
|
|
43
|
-
|
|
44
|
-
if (shells.bash && existsSync(dirname(paths.bashRc))) {
|
|
45
|
-
const block = buildPathRcBlock(root.key, paths.bindir);
|
|
46
|
-
let content = existsSync(paths.bashRc) ? readFileSync(paths.bashRc, "utf8") : "";
|
|
47
|
-
if (!hasRcBlock(content, root.key, "path")) {
|
|
48
|
-
if (!content.endsWith("\n") && content.length > 0) content += "\n";
|
|
49
|
-
content += `${block}\n`;
|
|
50
|
-
if (!dry) writeFileSync(paths.bashRc, content, "utf8");
|
|
51
|
-
changed.push(paths.bashRc);
|
|
52
|
-
patchedBashRc = true;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (shells.zsh) {
|
|
57
|
-
const completionsDir = join(dirname(paths.zshCompletion));
|
|
58
|
-
const block = buildZshFpathRcBlock(root.key, completionsDir);
|
|
59
|
-
let content = existsSync(paths.zshRc) ? readFileSync(paths.zshRc, "utf8") : "";
|
|
60
|
-
if (!hasRcBlock(content, root.key, "fpath")) {
|
|
61
|
-
if (!content.endsWith("\n") && content.length > 0) content += "\n";
|
|
62
|
-
content += `${block}\n`;
|
|
63
|
-
if (!dry) writeFileSync(paths.zshRc, content, "utf8");
|
|
64
|
-
changed.push(paths.zshRc);
|
|
65
|
-
patchedZshRc = true;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return { changedFiles: changed, patchedBashRc, patchedZshRc };
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/** Removes binary and rc marker blocks. */
|
|
73
|
-
export function uninstallBinary(root: CliProgram, paths: InstallPaths, dry: boolean): string[] {
|
|
74
|
-
const changed: string[] = [];
|
|
75
|
-
if (existsSync(paths.binaryPath)) {
|
|
76
|
-
if (!dry) unlinkSync(paths.binaryPath);
|
|
77
|
-
changed.push(paths.binaryPath);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
for (const [rcPath, tag] of [
|
|
81
|
-
[paths.bashRc, "path"],
|
|
82
|
-
[paths.zshRc, "fpath"],
|
|
83
|
-
] as const) {
|
|
84
|
-
if (!existsSync(rcPath)) continue;
|
|
85
|
-
const content = readFileSync(rcPath, "utf8");
|
|
86
|
-
if (hasRcBlock(content, root.key, tag)) {
|
|
87
|
-
const next = removeRcBlock(content, root.key, tag);
|
|
88
|
-
if (!dry) writeFileSync(rcPath, next, "utf8");
|
|
89
|
-
changed.push(rcPath);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
return changed;
|
|
94
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
import {
|
|
4
|
-
completionBashScript,
|
|
5
|
-
completionFishScript,
|
|
6
|
-
completionZshScript,
|
|
7
|
-
} from "../builtins/index.ts";
|
|
8
|
-
import { cliPresentationRoot } from "../builtins/presentation.ts";
|
|
9
|
-
import type { CliProgram } from "../types.ts";
|
|
10
|
-
import type { InstallPaths } from "./paths.ts";
|
|
11
|
-
import { detectShells } from "./shell.ts";
|
|
12
|
-
|
|
13
|
-
/** Writes shell completion scripts for detected shells. */
|
|
14
|
-
export function installCompletions(root: CliProgram, paths: InstallPaths, dry: boolean): string[] {
|
|
15
|
-
const changed: string[] = [];
|
|
16
|
-
const shells = detectShells();
|
|
17
|
-
const schema = cliPresentationRoot(root);
|
|
18
|
-
|
|
19
|
-
if (shells.bash) {
|
|
20
|
-
if (!dry) {
|
|
21
|
-
mkdirSync(dirname(paths.bashCompletion), { recursive: true });
|
|
22
|
-
writeFileSync(paths.bashCompletion, completionBashScript(schema), "utf8");
|
|
23
|
-
}
|
|
24
|
-
changed.push(paths.bashCompletion);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (shells.zsh) {
|
|
28
|
-
if (!dry) {
|
|
29
|
-
mkdirSync(dirname(paths.zshCompletion), { recursive: true });
|
|
30
|
-
writeFileSync(paths.zshCompletion, completionZshScript(schema), "utf8");
|
|
31
|
-
}
|
|
32
|
-
changed.push(paths.zshCompletion);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (shells.fish) {
|
|
36
|
-
if (!dry) {
|
|
37
|
-
mkdirSync(dirname(paths.fishCompletion), { recursive: true });
|
|
38
|
-
writeFileSync(paths.fishCompletion, completionFishScript(schema), "utf8");
|
|
39
|
-
}
|
|
40
|
-
changed.push(paths.fishCompletion);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
return changed;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** Removes shell completion files. */
|
|
47
|
-
export function uninstallCompletions(paths: InstallPaths, dry: boolean): string[] {
|
|
48
|
-
const changed: string[] = [];
|
|
49
|
-
for (const p of [paths.bashCompletion, paths.zshCompletion, paths.fishCompletion]) {
|
|
50
|
-
if (existsSync(p)) {
|
|
51
|
-
if (!dry) unlinkSync(p);
|
|
52
|
-
changed.push(p);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return changed;
|
|
56
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, expect, test } from "bun:test";
|
|
2
|
-
import { chmodSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
-
import { tmpdir } from "node:os";
|
|
4
|
-
import { join } from "node:path";
|
|
5
|
-
import { cliPresentationRoot } from "../builtins/presentation.ts";
|
|
6
|
-
import { Cli } from "../index.ts";
|
|
7
|
-
import type { CliProgram, CliUpdateArtifact } from "../types.ts";
|
|
8
|
-
import { cliValidateProgram } from "../validate.ts";
|
|
9
|
-
import { parseInstallOpts, runInstallMutation } from "./index.ts";
|
|
10
|
-
|
|
11
|
-
let home: string;
|
|
12
|
-
let prevHome: string | undefined;
|
|
13
|
-
let prevExecPath: string;
|
|
14
|
-
|
|
15
|
-
beforeEach(() => {
|
|
16
|
-
home = mkdtempSync(join(tmpdir(), "argsbarg-update-"));
|
|
17
|
-
prevHome = process.env.HOME;
|
|
18
|
-
process.env.HOME = home;
|
|
19
|
-
prevExecPath = process.execPath;
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
afterEach(() => {
|
|
23
|
-
if (prevHome === undefined) delete process.env.HOME;
|
|
24
|
-
else process.env.HOME = prevHome;
|
|
25
|
-
process.execPath = prevExecPath;
|
|
26
|
-
rmSync(home, { recursive: true, force: true });
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function fixtureWithUpdate(hook: () => Promise<CliUpdateArtifact>): CliProgram {
|
|
30
|
-
return {
|
|
31
|
-
key: "testapp",
|
|
32
|
-
version: "1.0.0",
|
|
33
|
-
description: "Test",
|
|
34
|
-
install: { updateGetLatest: hook },
|
|
35
|
-
commands: [{ key: "run", description: "Run", handler: () => {} }],
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
test("user update command is allowed when updateGetLatest is set", () => {
|
|
40
|
-
const root: CliProgram = {
|
|
41
|
-
...fixtureWithUpdate(async () => ({ path: process.execPath })),
|
|
42
|
-
commands: [{ key: "update", description: "Custom update", handler: () => {} }],
|
|
43
|
-
};
|
|
44
|
-
expect(() => cliValidateProgram(root)).not.toThrow();
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
test("presentation exposes install --update when hook is set", () => {
|
|
48
|
-
const root = fixtureWithUpdate(async () => ({ path: process.execPath }));
|
|
49
|
-
const presentation = cliPresentationRoot(root);
|
|
50
|
-
const install = presentation.commands.find((c) => c.key === "install");
|
|
51
|
-
expect(install?.options?.some((o) => o.name === "update")).toBe(true);
|
|
52
|
-
expect(presentation.commands.some((c) => c.key === "update")).toBe(false);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
test("parseInstallOpts treats --update separately from --reinstall", () => {
|
|
56
|
-
expect(parseInstallOpts({ update: "1" }).update).toBe(true);
|
|
57
|
-
expect(parseInstallOpts({ update: "1" }).reinstall).toBe(false);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
test("runInstallMutation honors --from for binary copy", async () => {
|
|
61
|
-
const root: CliProgram = {
|
|
62
|
-
key: "testapp",
|
|
63
|
-
version: "1.0.0",
|
|
64
|
-
description: "Test",
|
|
65
|
-
handler: () => {},
|
|
66
|
-
};
|
|
67
|
-
const source = join(home, "new-binary");
|
|
68
|
-
writeFileSync(source, "#!/bin/sh\necho hi\n", "utf8");
|
|
69
|
-
chmodSync(source, 0o755);
|
|
70
|
-
|
|
71
|
-
const { changed } = await runInstallMutation(root, {
|
|
72
|
-
reinstall: "1",
|
|
73
|
-
yes: "1",
|
|
74
|
-
quiet: "1",
|
|
75
|
-
from: source,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const dest = join(home, ".local", "bin", "testapp");
|
|
79
|
-
expect(changed).toContain(dest);
|
|
80
|
-
expect(readFileSync(dest, "utf8")).toContain("echo hi");
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
test("Cli.invoke install --update uses hook and reinstalls", async () => {
|
|
84
|
-
const source = join(home, "new-binary");
|
|
85
|
-
writeFileSync(source, "#!/bin/sh\necho hi\n", "utf8");
|
|
86
|
-
chmodSync(source, 0o755);
|
|
87
|
-
|
|
88
|
-
const root = fixtureWithUpdate(async () => ({
|
|
89
|
-
path: source,
|
|
90
|
-
version: "2.0.0",
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
const result = await new Cli(root).invoke(["install", "--update"]);
|
|
94
|
-
expect(result.exitCode).toBe(0);
|
|
95
|
-
expect(result.stdout).toContain("Updated testapp 1.0.0 → 2.0.0");
|
|
96
|
-
expect(existsSync(join(home, ".local", "bin", "testapp"))).toBe(true);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
test("Cli.invoke install --update reports already current", async () => {
|
|
100
|
-
const root = fixtureWithUpdate(async () => ({
|
|
101
|
-
path: process.execPath,
|
|
102
|
-
version: "1.0.0",
|
|
103
|
-
}));
|
|
104
|
-
|
|
105
|
-
const result = await new Cli(root).invoke(["install", "--update"]);
|
|
106
|
-
expect(result.exitCode).toBe(0);
|
|
107
|
-
expect(result.stdout).toContain("Already at v1.0.0");
|
|
108
|
-
});
|
package/src/install/update.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import type { CliProgram } from "../types.ts";
|
|
3
|
-
import { runInstallMutation } from "./index.ts";
|
|
4
|
-
import { installErr } from "./status.ts";
|
|
5
|
-
|
|
6
|
-
/** Downloads the latest release and reinstalls installed artifacts (`myapp install --update`). */
|
|
7
|
-
export async function cliUpdate(root: CliProgram): Promise<never> {
|
|
8
|
-
const hook = root.install?.updateGetLatest;
|
|
9
|
-
if (!hook) {
|
|
10
|
-
installErr(
|
|
11
|
-
"install --update is not configured. Set install.updateGetLatest on the program root.",
|
|
12
|
-
);
|
|
13
|
-
process.exit(1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let artifact: Awaited<ReturnType<typeof hook>>;
|
|
17
|
-
try {
|
|
18
|
-
artifact = await hook({ version: root.version });
|
|
19
|
-
} catch (err) {
|
|
20
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
21
|
-
installErr(message);
|
|
22
|
-
process.exit(1);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (!artifact.path || !existsSync(artifact.path)) {
|
|
26
|
-
installErr(`updateGetLatest returned missing binary: ${JSON.stringify(artifact.path)}`);
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (artifact.version !== undefined && artifact.version === root.version) {
|
|
31
|
-
process.stdout.write(`Already at v${root.version}\n`);
|
|
32
|
-
await artifact.cleanup?.();
|
|
33
|
-
process.exit(0);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const currentVersion = root.version;
|
|
37
|
-
try {
|
|
38
|
-
await runInstallMutation(root, {
|
|
39
|
-
reinstall: "1",
|
|
40
|
-
yes: "1",
|
|
41
|
-
quiet: "1",
|
|
42
|
-
from: artifact.path,
|
|
43
|
-
});
|
|
44
|
-
} catch (err) {
|
|
45
|
-
await artifact.cleanup?.();
|
|
46
|
-
installErr(err instanceof Error ? err.message : String(err));
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
await artifact.cleanup?.();
|
|
51
|
-
|
|
52
|
-
if (artifact.version !== undefined && artifact.version !== currentVersion) {
|
|
53
|
-
process.stdout.write(`Updated ${root.key} ${currentVersion} → ${artifact.version}\n`);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
process.exit(0);
|
|
57
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/examples/{consumer-app → full-example}/scripts/schemagen/discover-schema-roots.test.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|