superlore-cli 0.7.0 → 0.7.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 +11 -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.7.
|
|
90
|
+
declare const VERSION = "0.7.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
|
@@ -266,9 +266,14 @@ import { homedir, tmpdir } from "os";
|
|
|
266
266
|
import { join as join2 } from "path";
|
|
267
267
|
import process2 from "process";
|
|
268
268
|
var EXTENSION_ID = "superlore.superlore-preview";
|
|
269
|
-
var
|
|
270
|
-
async function downloadVsix(
|
|
271
|
-
const
|
|
269
|
+
var OPENVSX_LATEST_API = "https://open-vsx.org/api/superlore/superlore-preview/latest";
|
|
270
|
+
async function downloadVsix(metaUrl = OPENVSX_LATEST_API) {
|
|
271
|
+
const meta = await fetch(metaUrl, { redirect: "follow" });
|
|
272
|
+
if (!meta.ok) throw new Error(`couldn't reach Open VSX (${meta.status} ${meta.statusText})`);
|
|
273
|
+
const info = await meta.json();
|
|
274
|
+
const download = info.files?.download;
|
|
275
|
+
if (!download) throw new Error("Open VSX returned no download URL for the extension");
|
|
276
|
+
const res = await fetch(download, { redirect: "follow" });
|
|
272
277
|
if (!res.ok) throw new Error(`couldn't fetch the extension (${res.status} ${res.statusText})`);
|
|
273
278
|
const bytes = Buffer.from(await res.arrayBuffer());
|
|
274
279
|
const path = join2(tmpdir(), "superlore-preview.vsix");
|
|
@@ -433,10 +438,10 @@ function report(result) {
|
|
|
433
438
|
function printManualInstall() {
|
|
434
439
|
log.blank();
|
|
435
440
|
log.info(
|
|
436
|
-
`${dim("Install it by hand:
|
|
441
|
+
`${dim("Install it by hand: open your editor's Extensions panel and search")} ${cyan('"superlore Preview"')}${dim(" (it's on Open VSX),")}`
|
|
437
442
|
);
|
|
438
443
|
log.info(
|
|
439
|
-
`${dim("
|
|
444
|
+
`${dim("or run")} ${cyan("code --install-extension superlore.superlore-preview")} ${dim("(Cursor/Windsurf/VSCodium).")}`
|
|
440
445
|
);
|
|
441
446
|
}
|
|
442
447
|
function printMcpNextStep() {
|
|
@@ -2481,7 +2486,7 @@ function printNextSteps(root, config) {
|
|
|
2481
2486
|
}
|
|
2482
2487
|
|
|
2483
2488
|
// src/index.ts
|
|
2484
|
-
var VERSION = "0.7.
|
|
2489
|
+
var VERSION = "0.7.1";
|
|
2485
2490
|
function buildCli(argv = process3.argv) {
|
|
2486
2491
|
const cli = cac("superlore");
|
|
2487
2492
|
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(
|
package/package.json
CHANGED