@solidnumber/cli 2.34.0 → 2.34.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/CHANGELOG.md +42 -0
- package/dist/commands/app.d.ts.map +1 -1
- package/dist/commands/app.js +21 -1
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/domains.d.ts +8 -0
- package/dist/commands/domains.d.ts.map +1 -1
- package/dist/commands/domains.js +29 -3
- package/dist/commands/domains.js.map +1 -1
- package/dist/commands/drafts.d.ts.map +1 -1
- package/dist/commands/drafts.js +6 -6
- package/dist/commands/drafts.js.map +1 -1
- package/dist/commands/how-to.d.ts +10 -0
- package/dist/commands/how-to.d.ts.map +1 -1
- package/dist/commands/how-to.js +35 -1
- package/dist/commands/how-to.js.map +1 -1
- package/dist/commands/leads-test.d.ts +16 -0
- package/dist/commands/leads-test.d.ts.map +1 -1
- package/dist/commands/leads-test.js +42 -3
- package/dist/commands/leads-test.js.map +1 -1
- package/dist/commands/nest.d.ts +5 -0
- package/dist/commands/nest.d.ts.map +1 -1
- package/dist/commands/nest.js +20 -4
- package/dist/commands/nest.js.map +1 -1
- package/dist/commands/pages.d.ts.map +1 -1
- package/dist/commands/pages.js +5 -7
- package/dist/commands/pages.js.map +1 -1
- package/dist/commands/payment.js +13 -3
- package/dist/commands/payment.js.map +1 -1
- package/dist/commands/publish.d.ts +14 -0
- package/dist/commands/publish.d.ts.map +1 -1
- package/dist/commands/publish.js +34 -12
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/sandbox.js +3 -4
- package/dist/commands/sandbox.js.map +1 -1
- package/dist/data/cms-blocks.json +123 -100
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.d.ts +6 -0
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js +10 -0
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/cwd-guard.d.ts +12 -0
- package/dist/lib/cwd-guard.d.ts.map +1 -0
- package/dist/lib/cwd-guard.js +38 -0
- package/dist/lib/cwd-guard.js.map +1 -0
- package/dist/lib/owner-preview.d.ts +16 -0
- package/dist/lib/owner-preview.d.ts.map +1 -0
- package/dist/lib/owner-preview.js +46 -0
- package/dist/lib/owner-preview.js.map +1 -0
- package/package.json +1 -1
- package/platform-docs/llms.txt +2 -2
|
@@ -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.
|
|
3
|
+
"version": "2.34.2",
|
|
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",
|
package/platform-docs/llms.txt
CHANGED
|
@@ -143,7 +143,7 @@ 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.
|
|
146
|
+
- [npm](https://www.npmjs.com/package/@solidnumber/cli): `@solidnumber/cli` v2.34.2
|
|
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`.
|
|
@@ -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.
|
|
299
|
+
*Auto-generated from the live commander tree at build time. CLI version 2.34.2, 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
|
|