superlore-cli 0.5.0 → 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 +12 -3
- 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.5.
|
|
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";
|
|
@@ -2477,7 +2478,7 @@ function printNextSteps(root, config) {
|
|
|
2477
2478
|
}
|
|
2478
2479
|
|
|
2479
2480
|
// src/index.ts
|
|
2480
|
-
var VERSION = "0.5.
|
|
2481
|
+
var VERSION = "0.5.1";
|
|
2481
2482
|
function buildCli(argv = process3.argv) {
|
|
2482
2483
|
const cli = cac("superlore");
|
|
2483
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(
|
|
@@ -2536,8 +2537,16 @@ async function run(argv = process3.argv) {
|
|
|
2536
2537
|
process3.exit(1);
|
|
2537
2538
|
}
|
|
2538
2539
|
}
|
|
2539
|
-
|
|
2540
|
-
|
|
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()) {
|
|
2541
2550
|
void run();
|
|
2542
2551
|
}
|
|
2543
2552
|
export {
|
package/package.json
CHANGED