@tikoci/rosetta 0.6.0 → 0.6.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/README.md +6 -0
- package/package.json +1 -1
- package/src/mcp.ts +9 -1
- package/src/release.test.ts +12 -0
- package/src/setup.ts +2 -2
package/README.md
CHANGED
|
@@ -115,6 +115,12 @@ bunx @tikoci/rosetta --setup
|
|
|
115
115
|
|
|
116
116
|
This downloads the database and prints config snippets for all supported MCP clients. Copy-paste the config for your client and you're done.
|
|
117
117
|
|
|
118
|
+
Need to force a database reload later? Use:
|
|
119
|
+
|
|
120
|
+
```sh
|
|
121
|
+
bunx @tikoci/rosetta --refresh
|
|
122
|
+
```
|
|
123
|
+
|
|
118
124
|
### Configure your MCP client
|
|
119
125
|
|
|
120
126
|
<details>
|
package/package.json
CHANGED
package/src/mcp.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* CLI flags (for compiled binary or `bun run src/mcp.ts`):
|
|
9
9
|
* browse Interactive terminal browser (REPL)
|
|
10
10
|
* --setup [--force] Download database + print MCP client config
|
|
11
|
+
* --refresh Shortcut for --setup --force (refresh DB)
|
|
11
12
|
* --version Print version
|
|
12
13
|
* --help Print usage
|
|
13
14
|
* --http Start with Streamable HTTP transport (instead of stdio)
|
|
@@ -59,6 +60,7 @@ if (args.includes("--help") || args.includes("-h")) {
|
|
|
59
60
|
console.log(" rosetta browse Interactive terminal browser");
|
|
60
61
|
console.log(" rosetta --setup Download database + print MCP client config");
|
|
61
62
|
console.log(" rosetta --setup --force Re-download database");
|
|
63
|
+
console.log(" rosetta --refresh Shortcut for --setup --force");
|
|
62
64
|
console.log(" rosetta --version Print version");
|
|
63
65
|
console.log(" rosetta --help Print this help");
|
|
64
66
|
console.log();
|
|
@@ -95,6 +97,12 @@ if (args.includes("--setup")) {
|
|
|
95
97
|
process.exit(0);
|
|
96
98
|
}
|
|
97
99
|
|
|
100
|
+
if (args.includes("--refresh")) {
|
|
101
|
+
const { runSetup } = await import("./setup.ts");
|
|
102
|
+
await runSetup(true);
|
|
103
|
+
process.exit(0);
|
|
104
|
+
}
|
|
105
|
+
|
|
98
106
|
// ── MCP Server ──
|
|
99
107
|
|
|
100
108
|
const useHttp = args.includes("--http");
|
|
@@ -158,7 +166,7 @@ if (_dbSchemaVersion !== SCHEMA_VERSION) {
|
|
|
158
166
|
log("Database updated successfully.");
|
|
159
167
|
} catch (e) {
|
|
160
168
|
log(`Auto-download failed: ${e}`);
|
|
161
|
-
log(`Run: ${process.argv[0]} --
|
|
169
|
+
log(`Run: ${process.argv[0]} --refresh`);
|
|
162
170
|
}
|
|
163
171
|
}
|
|
164
172
|
|
package/src/release.test.ts
CHANGED
|
@@ -225,6 +225,14 @@ describe("Makefile", () => {
|
|
|
225
225
|
expect(makefile).toMatch(/^release:.*build-release/m);
|
|
226
226
|
});
|
|
227
227
|
|
|
228
|
+
test("extract target includes Dude cache import", () => {
|
|
229
|
+
expect(makefile).toMatch(/^extract:.*extract-dude-from-cache/m);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test("extract-full target includes Dude cache import", () => {
|
|
233
|
+
expect(makefile).toMatch(/^extract-full:.*extract-dude-from-cache/m);
|
|
234
|
+
});
|
|
235
|
+
|
|
228
236
|
test("preflight checks dirty tree", () => {
|
|
229
237
|
expect(makefile).toContain("git diff --quiet");
|
|
230
238
|
});
|
|
@@ -312,6 +320,10 @@ describe("CLI flags", () => {
|
|
|
312
320
|
test("supports --setup flag", () => {
|
|
313
321
|
expect(src).toContain("--setup");
|
|
314
322
|
});
|
|
323
|
+
|
|
324
|
+
test("supports --refresh flag", () => {
|
|
325
|
+
expect(src).toContain("--refresh");
|
|
326
|
+
});
|
|
315
327
|
});
|
|
316
328
|
|
|
317
329
|
// ---------------------------------------------------------------------------
|
package/src/setup.ts
CHANGED
|
@@ -72,7 +72,7 @@ export async function runSetup(force = false) {
|
|
|
72
72
|
const needsDownload = force || !dbHasData(dbPath);
|
|
73
73
|
if (!needsDownload) {
|
|
74
74
|
console.log(`Database already exists: ${dbPath}`);
|
|
75
|
-
console.log(` (use --setup --force to re-download)`);
|
|
75
|
+
console.log(` (use --refresh or --setup --force to re-download)`);
|
|
76
76
|
} else {
|
|
77
77
|
await downloadDb(dbPath);
|
|
78
78
|
}
|
|
@@ -94,7 +94,7 @@ export async function runSetup(force = false) {
|
|
|
94
94
|
} catch (e) {
|
|
95
95
|
console.error(`✗ Database validation failed: ${e}`);
|
|
96
96
|
const retryCmd = mode === "compiled" ? "rosetta" : mode === "package" ? "bunx @tikoci/rosetta" : "bun run src/setup.ts";
|
|
97
|
-
console.error(` Try re-downloading with: ${retryCmd} --
|
|
97
|
+
console.error(` Try re-downloading with: ${retryCmd} --refresh`);
|
|
98
98
|
process.exit(1);
|
|
99
99
|
}
|
|
100
100
|
|