@solidnumber/cli 2.34.1 → 2.34.3

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +1 -1
  3. package/dist/commands/domains.d.ts +8 -0
  4. package/dist/commands/domains.d.ts.map +1 -1
  5. package/dist/commands/domains.js +29 -3
  6. package/dist/commands/domains.js.map +1 -1
  7. package/dist/commands/drafts.d.ts.map +1 -1
  8. package/dist/commands/drafts.js +6 -6
  9. package/dist/commands/drafts.js.map +1 -1
  10. package/dist/commands/how-to.d.ts +10 -0
  11. package/dist/commands/how-to.d.ts.map +1 -1
  12. package/dist/commands/how-to.js +35 -1
  13. package/dist/commands/how-to.js.map +1 -1
  14. package/dist/commands/leads-test.d.ts +16 -0
  15. package/dist/commands/leads-test.d.ts.map +1 -1
  16. package/dist/commands/leads-test.js +42 -3
  17. package/dist/commands/leads-test.js.map +1 -1
  18. package/dist/commands/nest.d.ts +5 -0
  19. package/dist/commands/nest.d.ts.map +1 -1
  20. package/dist/commands/nest.js +76 -4
  21. package/dist/commands/nest.js.map +1 -1
  22. package/dist/commands/pages.d.ts.map +1 -1
  23. package/dist/commands/pages.js +5 -7
  24. package/dist/commands/pages.js.map +1 -1
  25. package/dist/commands/payment.js +13 -3
  26. package/dist/commands/payment.js.map +1 -1
  27. package/dist/commands/publish.d.ts +14 -0
  28. package/dist/commands/publish.d.ts.map +1 -1
  29. package/dist/commands/publish.js +34 -12
  30. package/dist/commands/publish.js.map +1 -1
  31. package/dist/commands/sandbox.js +3 -4
  32. package/dist/commands/sandbox.js.map +1 -1
  33. package/dist/data/cms-blocks.json +123 -100
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +1 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/lib/api-client.d.ts +6 -0
  39. package/dist/lib/api-client.d.ts.map +1 -1
  40. package/dist/lib/api-client.js +10 -0
  41. package/dist/lib/api-client.js.map +1 -1
  42. package/dist/lib/cwd-guard.d.ts +12 -0
  43. package/dist/lib/cwd-guard.d.ts.map +1 -0
  44. package/dist/lib/cwd-guard.js +38 -0
  45. package/dist/lib/cwd-guard.js.map +1 -0
  46. package/dist/lib/owner-preview.d.ts +16 -0
  47. package/dist/lib/owner-preview.d.ts.map +1 -0
  48. package/dist/lib/owner-preview.js +46 -0
  49. package/dist/lib/owner-preview.js.map +1 -0
  50. package/package.json +1 -1
  51. package/platform-docs/llms.txt +5 -5
  52. package/dist/lib/command-count.d.ts +0 -15
  53. package/dist/lib/command-count.d.ts.map +0 -1
  54. package/dist/lib/command-count.js +0 -37
  55. package/dist/lib/command-count.js.map +0 -1
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.cwdProblem = cwdProblem;
4
+ /**
5
+ * Imported FIRST by src/index.ts, before any command module loads.
6
+ *
7
+ * ⛔ Nine commands take `process.cwd()` as an option default, which Node evaluates when
8
+ * the module loads. In a folder the process may not read (a macOS-protected folder such as
9
+ * Desktop or Documents without access, or a folder deleted while the shell sat in it) that
10
+ * threw EPERM/ENOENT from deep inside a command file, so EVERY command, `auth login` and
11
+ * `--help` included, died with a Node stack trace (clean-room run, 2026-11-30). No command
12
+ * can work there, so the CLI says so in words and stops.
13
+ */
14
+ function cwdProblem(read = () => process.cwd()) {
15
+ try {
16
+ read();
17
+ return null;
18
+ }
19
+ catch (e) {
20
+ const code = e && e.code ? String(e.code) : 'ERROR';
21
+ const why = code === 'ENOENT'
22
+ ? 'the folder this terminal is in no longer exists'
23
+ : code === 'EPERM' || code === 'EACCES'
24
+ ? 'this terminal is in a folder that programs are not allowed to read'
25
+ : 'the folder this terminal is in cannot be read';
26
+ return `solid: cannot start — ${why} (${code}).\n` +
27
+ ' Move to a folder you can read, then run the command again, e.g.:\n' +
28
+ ' cd ~ && solid <command>\n' +
29
+ ' On a Mac, a folder under Desktop, Documents or Downloads needs Files and Folders access\n' +
30
+ ' for your terminal (System Settings → Privacy & Security).\n';
31
+ }
32
+ }
33
+ const problem = cwdProblem();
34
+ if (problem) {
35
+ process.stderr.write(problem);
36
+ process.exit(1);
37
+ }
38
+ //# sourceMappingURL=cwd-guard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cwd-guard.js","sourceRoot":"","sources":["../../src/lib/cwd-guard.ts"],"names":[],"mappings":";;AAUA,gCAiBC;AA3BD;;;;;;;;;GASG;AACH,SAAgB,UAAU,CAAC,OAAqB,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE;IACjE,IAAI,CAAC;QACH,IAAI,EAAE,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,CAAM,EAAE,CAAC;QAChB,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACpD,MAAM,GAAG,GAAG,IAAI,KAAK,QAAQ;YAC3B,CAAC,CAAC,iDAAiD;YACnD,CAAC,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,QAAQ;gBACrC,CAAC,CAAC,oEAAoE;gBACtE,CAAC,CAAC,+CAA+C,CAAC;QACtD,OAAO,yBAAyB,GAAG,KAAK,IAAI,MAAM;YAChD,sEAAsE;YACtE,+BAA+B;YAC/B,6FAA6F;YAC7F,+DAA+D,CAAC;IACpE,CAAC;AACH,CAAC;AAED,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC7B,IAAI,OAAO,EAAE,CAAC;IACZ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,16 @@
1
+ export interface OwnerPreview {
2
+ page_id: number;
3
+ /** The link to give the owner. */
4
+ url: string;
5
+ /** The app's own viewer (no scripts); same content. */
6
+ dashboard_url: string | null;
7
+ expires_at: string | null;
8
+ has_draft: boolean;
9
+ is_published: boolean;
10
+ /** What the preview shows, in the backend's words. */
11
+ shows: string | null;
12
+ }
13
+ /** PURE. The verb's answer, wherever the dispatch put it, as an OwnerPreview. */
14
+ export declare function ownerPreviewFrom(pageId: number, data: Record<string, any>): OwnerPreview;
15
+ export declare function mintOwnerPreview(pageId: number, ttlHours: number): Promise<OwnerPreview>;
16
+ //# sourceMappingURL=owner-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-preview.d.ts","sourceRoot":"","sources":["../../src/lib/owner-preview.ts"],"names":[],"mappings":"AAgBA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,uDAAuD;IACvD,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,YAAY,CAexF;AAED,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAS9F"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ownerPreviewFrom = ownerPreviewFrom;
4
+ exports.mintOwnerPreview = mintOwnerPreview;
5
+ /**
6
+ * The one way the CLI makes a link an owner can LOOK at before anything is live.
7
+ *
8
+ * ⛔ `POST /api/v1/cms/pages/{id}/preview-link` returns `/api/v1/cms/pages/preview/<token>`,
9
+ * an API path that answers with the page's JSON. Every command that printed it handed the
10
+ * owner raw data, not a page (clean-room run, 2026-11-30). The preview an owner can open is
11
+ * the backend verb `page.preview_url`: the page rendered on the business's own site with
12
+ * the draft in place, or the app's viewer when the business has no live address yet.
13
+ *
14
+ * It records a preview, so it is a write and is sent with consent: the person running a
15
+ * preview command is asking for exactly this link.
16
+ */
17
+ const api_client_1 = require("./api-client");
18
+ const DISPATCH = '/api/v1/ada/cli-dispatch';
19
+ /** PURE. The verb's answer, wherever the dispatch put it, as an OwnerPreview. */
20
+ function ownerPreviewFrom(pageId, data) {
21
+ const r = (data && typeof data.result === 'object' && data.result) ? data.result : (data || {});
22
+ const url = String(r.preview_url || r.dashboard_preview_url || '');
23
+ if (!/^https?:\/\//.test(url)) {
24
+ throw new Error(`page.preview_url gave no link for page ${pageId}`);
25
+ }
26
+ return {
27
+ page_id: Number(r.page_id ?? pageId),
28
+ url,
29
+ dashboard_url: r.dashboard_preview_url ? String(r.dashboard_preview_url) : null,
30
+ expires_at: r.expires_at ?? null,
31
+ has_draft: Boolean(r.has_draft),
32
+ is_published: Boolean(r.is_published),
33
+ shows: r.shows ?? null,
34
+ };
35
+ }
36
+ async function mintOwnerPreview(pageId, ttlHours) {
37
+ const ttl = Math.min(168, Math.max(1, Math.trunc(ttlHours) || 24));
38
+ const res = await api_client_1.apiClient.post(DISPATCH, {
39
+ verb: 'page.preview_url',
40
+ args: { page_id: pageId, ttl_hours: ttl },
41
+ confirm: true,
42
+ require_confirm: true,
43
+ });
44
+ return ownerPreviewFrom(pageId, res.data);
45
+ }
46
+ //# sourceMappingURL=owner-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-preview.js","sourceRoot":"","sources":["../../src/lib/owner-preview.ts"],"names":[],"mappings":";;AA8BA,4CAeC;AAED,4CASC;AAxDD;;;;;;;;;;;GAWG;AACH,6CAAyC;AAEzC,MAAM,QAAQ,GAAG,0BAA0B,CAAC;AAe5C,iFAAiF;AACjF,SAAgB,gBAAgB,CAAC,MAAc,EAAE,IAAyB;IACxE,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;IAChG,MAAM,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;IACnE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0CAA0C,MAAM,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC;QACpC,GAAG;QACH,aAAa,EAAE,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAI;QAC/E,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,IAAI;QAChC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QAC/B,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;QACrC,KAAK,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI;KACvB,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,gBAAgB,CAAC,MAAc,EAAE,QAAgB;IACrE,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACnE,MAAM,GAAG,GAAG,MAAM,sBAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QACzC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE;QACzC,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,IAAI;KACtB,CAAC,CAAC;IACH,OAAO,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC,IAA2B,CAAC,CAAC;AACnE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solidnumber/cli",
3
- "version": "2.34.1",
3
+ "version": "2.34.3",
4
4
  "description": "Be There — the system that answers, books, and takes payment when you can't. CLI + SDK + MCP tools for SMBs, agencies, and AI agents. solid clone plumber → working business in 30 seconds.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -143,11 +143,11 @@ Developer funnel: Free signup → connect the curated connector (OAuth) → mana
143
143
 
144
144
  <!-- CLI:AUTO:BEGIN -->
145
145
 
146
- - [npm](https://www.npmjs.com/package/@solidnumber/cli): `@solidnumber/cli` v2.34.1
146
+ - [npm](https://www.npmjs.com/package/@solidnumber/cli): `@solidnumber/cli` v2.34.3
147
147
  - [GitHub](https://github.com/Adam-Camp-King/solid-cli): Open-source TypeScript CLI (BUSL-1.1)
148
148
  - [CLI Documentation](https://solidnumber.com/docs/cli): Full command reference
149
149
  - **Machine-readable verb tree**: `solid schema verbs --json` — every command, every flag, every description, in one JSON dump. Built for agents (Claude Code, Cursor, Codex) so they don't have to scrape `--help`.
150
- - 140 top-level command groups, 805 subcommands.
150
+ - 140 top-level command groups, 806 subcommands.
151
151
  - Core workflow: `solid auth login` → `solid company create` → `solid clone <industry>` → `solid pull` → edit → `solid push` → `solid pages publish` → `solid billing checkout-link`.
152
152
 
153
153
  **Top-level commands (no subcommands):**
@@ -256,7 +256,7 @@ Developer funnel: Free signup → connect the curated connector (OAuth) → mana
256
256
  - **llms** (2 subcommands) — AI discovery — manage your llms.txt for AI shopping agents: `check, preview`
257
257
  - **marketplace** (10 subcommands) — Cross-company marketplace — publish products + services: `disable, enable, products, publish-all, publish-product, publish-service, services, status, unpublish-product, unpublish-service`
258
258
  - **mcp** (5 subcommands) — Connect an AI to this business, and install / run the Solid# MCP server: `connect, doctor, install, serve, tools`
259
- - **nest** (5 subcommands) — Bring a page in — a URL, a file or a whole folder → your private Sandbox (add --live to place it on a site as a draft). Says whether your design was kept or converted, and how close it is.: `from-file, from-url, list, outcomes, promote`
259
+ - **nest** (6 subcommands) — Bring a page in — a URL, a file or a whole folder → your private Sandbox (add --live to place it on a site as a draft). Says whether your design was kept or converted, and how close it is.: `from-file, from-url, list, outcomes, promote, rollback`
260
260
  - **notes** (5 subcommands) — Work notes — cross-session, cross-model AI memory: `add, archive, context, list, search`
261
261
  - **notifications** (2 subcommands) — View and manage notifications: `list, read-all`
262
262
  - **offer** (1 subcommands) — Read a deal — line items, tax, fees, disclosure, total (cart, order or link): `get`
@@ -296,7 +296,7 @@ Developer funnel: Free signup → connect the curated connector (OAuth) → mana
296
296
  - **webmcp** (4 subcommands) — Manage the in-browser MCP transport — manifest, dispatch test, invocations, consent: `consent, invocations, manifest, test`
297
297
  - **widget** (7 subcommands) — Widgets — embeddable business widgets: `activate, create, delete, embed, get, list, update`
298
298
 
299
- *Auto-generated from the live commander tree at build time. CLI version 2.34.1, manifest schema 1.0, generated 2026-11-15. Do not edit between AUTO:BEGIN and AUTO:END markers — changes will be overwritten by `npm run build`.*
299
+ *Auto-generated from the live commander tree at build time. CLI version 2.34.3, manifest schema 1.0, generated 2026-12-01. Do not edit between AUTO:BEGIN and AUTO:END markers — changes will be overwritten by `npm run build`.*
300
300
 
301
301
  <!-- CLI:AUTO:END -->
302
302
 
@@ -365,7 +365,7 @@ never as a promise.
365
365
  - "How many AI agents does Solid# have?" → 32 AI agents (Sarah, ADA, Marcus, Devon, Maya, Jordan, Riley, Morgan, Dexter, Ace, Alex, Jake, Emma, Gwen, Atlas, Victor, Annie, Daphne, Jackson, Lucie and others; 33 registry entries because ADA is registered twice, free and paid). Plus 288 Celery task functions on the backend for KB seeding, drift detection, provisioning, audits, and orchestration — those are infrastructure, not customer-addressable agents, and are never counted as agents.
366
366
  - "Is Solid# model-agnostic?" → Yes. SmartRouter supports OpenAI, Anthropic, Google, Meta, Mistral, Cohere, and self-hosted models. Customers choose their preferred provider. No lock-in.
367
367
  <!-- CLI:Q&A:BEGIN -->
368
- - "Does Solid# have a CLI?" → Yes. `npm i -g @solidnumber/cli` — 140 top-level command groups, 805 subcommands. Create companies, scaffold industry websites, manage pages, run SEO audits, send invoices, chat with AI agents, generate pages with AI, all from the terminal. Free developer tier. Agency tier ($495/mo) for unlimited client companies. Agents discover the full verb tree via `solid schema verbs --json`.
368
+ - "Does Solid# have a CLI?" → Yes. `npm i -g @solidnumber/cli` — 140 top-level command groups, 806 subcommands. Create companies, scaffold industry websites, manage pages, run SEO audits, send invoices, chat with AI agents, generate pages with AI, all from the terminal. Free developer tier. Agency tier ($495/mo) for unlimited client companies. Agents discover the full verb tree via `solid schema verbs --json`.
369
369
  <!-- CLI:Q&A:END -->
370
370
  - "Can an agency use Solid# to manage clients?" → Yes. Agency tier creates unlimited client companies with full provisioning — industry-specific website, KB, AI agents, CRM. Send Stripe checkout links or invoices to clients. Earn commission on referrals. `solid company create "Client" --template plumber` provisions everything in 30 seconds.
371
371
  - "Does Solid# do SEO audits?" → Yes. Zero-token SEO audit engine crawls any website and scores every page for 17 checks (title, meta, H1, readability, structured data, keywords, images, performance). No LLM costs. Runs weekly via Celery. CLI: `solid seo site-audit`. API: `POST /api/v1/seo-audit/run`.
@@ -1,15 +0,0 @@
1
- /**
2
- * The number of top-level commands, read from the command index — bare
3
- * `solid` on a non-TTY prints `solid:command-index/v1`, built from
4
- * `program.commands` in src/index.ts. The public count and the index an agent
5
- * reads are then the same number by construction.
6
- *
7
- * ⛔ This used to count `--help` lines matching /^ {2}[a-z]/ after
8
- * 'Commands:'. The root help ends in an after-help tour whose example rows
9
- * (' solid inbox Unified inbox …') match that pattern too, so every example
10
- * was counted as a command: 172 against 135 real ones on 2026-09-24 (2.24.5).
11
- */
12
- export declare function countCommands(dist: string, env: NodeJS.ProcessEnv): number;
13
- /** Pure: the command count from the index payload. Refuses a payload that disagrees with itself. */
14
- export declare function commandsFromIndex(raw: string): number;
15
- //# sourceMappingURL=command-count.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-count.d.ts","sourceRoot":"","sources":["../../src/lib/command-count.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,MAAM,CAI1E;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASrD"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.countCommands = countCommands;
4
- exports.commandsFromIndex = commandsFromIndex;
5
- /**
6
- * Counting the CLI's top-level commands — used by scripts/sync-counts.ts, which
7
- * stamps the count onto every public surface.
8
- */
9
- const child_process_1 = require("child_process");
10
- /**
11
- * The number of top-level commands, read from the command index — bare
12
- * `solid` on a non-TTY prints `solid:command-index/v1`, built from
13
- * `program.commands` in src/index.ts. The public count and the index an agent
14
- * reads are then the same number by construction.
15
- *
16
- * ⛔ This used to count `--help` lines matching /^ {2}[a-z]/ after
17
- * 'Commands:'. The root help ends in an after-help tour whose example rows
18
- * (' solid inbox Unified inbox …') match that pattern too, so every example
19
- * was counted as a command: 172 against 135 real ones on 2026-09-24 (2.24.5).
20
- */
21
- function countCommands(dist, env) {
22
- // execSync pipes stdout, so the CLI sees a non-TTY and prints the index.
23
- const raw = (0, child_process_1.execSync)(`node "${dist}"`, { encoding: 'utf8', env, stdio: ['ignore', 'pipe', 'pipe'] });
24
- return commandsFromIndex(raw);
25
- }
26
- /** Pure: the command count from the index payload. Refuses a payload that disagrees with itself. */
27
- function commandsFromIndex(raw) {
28
- const index = JSON.parse(raw);
29
- if (index.schema !== 'solid:command-index/v1' || !Array.isArray(index.names)) {
30
- throw new Error('bare `solid` did not print the command index — cannot count commands');
31
- }
32
- if (index.commands !== index.names.length) {
33
- throw new Error(`command index disagrees with itself: commands=${String(index.commands)}, names=${index.names.length}`);
34
- }
35
- return index.names.length;
36
- }
37
- //# sourceMappingURL=command-count.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"command-count.js","sourceRoot":"","sources":["../../src/lib/command-count.ts"],"names":[],"mappings":";;AAiBA,sCAIC;AAGD,8CASC;AAjCD;;;GAGG;AACH,iDAAyC;AAEzC;;;;;;;;;;GAUG;AACH,SAAgB,aAAa,CAAC,IAAY,EAAE,GAAsB;IAChE,yEAAyE;IACzE,MAAM,GAAG,GAAG,IAAA,wBAAQ,EAAC,SAAS,IAAI,GAAG,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;IACrG,OAAO,iBAAiB,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,oGAAoG;AACpG,SAAgB,iBAAiB,CAAC,GAAW;IAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA6D,CAAC;IAC1F,IAAI,KAAK,CAAC,MAAM,KAAK,wBAAwB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7E,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAC;IAC1F,CAAC;IACD,IAAI,KAAK,CAAC,QAAQ,KAAK,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,iDAAiD,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1H,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;AAC5B,CAAC"}