superlore-cli 0.4.3 → 0.5.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/dist/index.d.ts +1 -1
- package/dist/index.js +13 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ declare function serializeSuperloreJson(config: SuperloreJson): string;
|
|
|
87
87
|
declare function resolveMcpPath(config: SuperloreJson): string | undefined;
|
|
88
88
|
|
|
89
89
|
/** The CLI version, kept in sync with package.json at build time. */
|
|
90
|
-
declare const VERSION = "0.
|
|
90
|
+
declare const VERSION = "0.5.1";
|
|
91
91
|
/** Build the argument parser. Exported for tests; `run()` wires it to argv. */
|
|
92
92
|
declare function buildCli(argv?: readonly string[]): cac.CAC;
|
|
93
93
|
/** Parse argv and dispatch. Reports unknown commands and unexpected errors cleanly. */
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
+
import { realpathSync } from "fs";
|
|
4
5
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
5
6
|
import process3 from "process";
|
|
6
7
|
import { cac } from "cac";
|
|
@@ -1811,10 +1812,8 @@ function writeSkeleton(root, config) {
|
|
|
1811
1812
|
"fumadocs-core": "^16.8.2",
|
|
1812
1813
|
"fumadocs-mdx": "^14.3.1",
|
|
1813
1814
|
"fumadocs-ui": "^16.8.2",
|
|
1814
|
-
superlore: "^0.
|
|
1815
|
+
superlore: "^0.6.0",
|
|
1815
1816
|
"lucide-react": "^1.21.0",
|
|
1816
|
-
// superlore peers the rendered components pull in: Mermaid (Diagram), themes.
|
|
1817
|
-
mermaid: "^11.15.0",
|
|
1818
1817
|
...mcpEnabled ? (
|
|
1819
1818
|
// mcp-handler pins an EXACT sdk peer (1.26.0); npm errors on anything else (pnpm only
|
|
1820
1819
|
// warns). Pin the sdk to match so `npm install` resolves cleanly for every package manager.
|
|
@@ -2479,7 +2478,7 @@ function printNextSteps(root, config) {
|
|
|
2479
2478
|
}
|
|
2480
2479
|
|
|
2481
2480
|
// src/index.ts
|
|
2482
|
-
var VERSION = "0.
|
|
2481
|
+
var VERSION = "0.5.1";
|
|
2483
2482
|
function buildCli(argv = process3.argv) {
|
|
2484
2483
|
const cli = cac("superlore");
|
|
2485
2484
|
cli.command("init [dir]", "Scaffold a new superlore knowledge base").option("--name <name>", "KB name").option("--type <type>", "KB type: company-kb | product-docs | personal-kb").option("--auth", "Enable the Google SSO auth gate").option("--no-auth", "Disable the auth gate").option("--allowed-domain <domain>", "Restrict SSO to one email domain (implies --auth)").option("--accent <color>", "Brand accent colour (any CSS colour)").option("--no-mcp", "Disable the MCP endpoint (on by default)").option("--connect", "Install the editor extension after scaffolding (skip the prompt)").option("--no-connect", "Don't set up the editor extension").option("-y, --yes", "Skip prompts; use flags + defaults").example("superlore init my-kb --type product-docs").example("superlore init acme --type company-kb --auth --allowed-domain acme.com").example("superlore init me --type personal-kb").action(
|
|
@@ -2538,8 +2537,16 @@ async function run(argv = process3.argv) {
|
|
|
2538
2537
|
process3.exit(1);
|
|
2539
2538
|
}
|
|
2540
2539
|
}
|
|
2541
|
-
|
|
2542
|
-
|
|
2540
|
+
function isEntrypoint() {
|
|
2541
|
+
const entry = process3.argv[1];
|
|
2542
|
+
if (!entry) return false;
|
|
2543
|
+
try {
|
|
2544
|
+
return realpathSync(fileURLToPath2(import.meta.url)) === realpathSync(entry);
|
|
2545
|
+
} catch {
|
|
2546
|
+
return false;
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
if (isEntrypoint()) {
|
|
2543
2550
|
void run();
|
|
2544
2551
|
}
|
|
2545
2552
|
export {
|
package/package.json
CHANGED