@vxil/cli 0.4.0 → 0.4.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/README.md +30 -8
- package/dist/vxil.js +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# vxil
|
|
1
|
+
# @vxil/cli
|
|
2
2
|
|
|
3
|
-
The [Vxil](https://vxil.com) CLI — config-as-code for backend building blocks you enable in one line.
|
|
3
|
+
The [Vxil](https://vxil.com) CLI — config-as-code for backend building blocks you enable in one line. The package is `@vxil/cli` and it installs the `vxil` command — the bare `vxil` name on npm is blocked, so always install the scoped package.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx @vxil/cli quickstart # create a tenant + scaffold vxil.config.ts
|
|
@@ -9,24 +9,46 @@ npx @vxil/cli gen # generate a typed client + MCP manifest for Y
|
|
|
9
9
|
npx @vxil/cli functions dev fn # run a tenant function locally against the remote edge
|
|
10
10
|
npx @vxil/cli listen --forward-to localhost:3000/webhook # forward inbound webhook events to your local server
|
|
11
11
|
npx @vxil/cli mcp install --client cursor # wire your backend's MCP server into your editor's agent
|
|
12
|
-
npx @vxil/cli doctor #
|
|
12
|
+
npx @vxil/cli doctor # keys, URLs, reachability + secrets referenced-vs-stored + per-function hashes
|
|
13
|
+
npx @vxil/cli diff --against staging # CI drift gate vs a named slot: exit 0 no drift · 1 drift · 2 error
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
Config-as-code lives in `vxil.config.ts`, typed
|
|
16
|
+
Config-as-code lives in `vxil.config.ts`, typed by `@vxil/config` (also bundled as the `@vxil/cli/config` subpath):
|
|
16
17
|
|
|
17
18
|
```ts
|
|
18
19
|
import { defineConfig } from '@vxil/config';
|
|
19
20
|
|
|
20
21
|
export default defineConfig({
|
|
22
|
+
// (a) per-feature config — the same typed manifests the server validates
|
|
21
23
|
features: {
|
|
22
|
-
auth: { enabled: true
|
|
23
|
-
cms: { enabled: true,
|
|
24
|
-
notifications: { enabled: true, provider: 'resend' },
|
|
24
|
+
auth: { enabled: true },
|
|
25
|
+
cms: { enabled: true, draftPublish: true },
|
|
26
|
+
notifications: { enabled: true, provider: 'resend', fromEmail: 'noreply@example.app' },
|
|
27
|
+
},
|
|
28
|
+
// (b) CMS schema-as-code — collections + fields, reconciled by `vxil push`
|
|
29
|
+
cms: {
|
|
30
|
+
collections: {
|
|
31
|
+
tasks: {
|
|
32
|
+
fields: {
|
|
33
|
+
title: { type: 'string', required: true, indexSlot: 's1' },
|
|
34
|
+
done: { type: 'bool' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
25
38
|
},
|
|
26
39
|
});
|
|
27
40
|
```
|
|
28
41
|
|
|
29
|
-
Verbs: `init quickstart push pull diff gen secrets env seed export import functions listen mcp cms dev
|
|
42
|
+
Verbs: `init templates quickstart try login link plan push pull diff gen doctor architect versions rollback secrets env seed export import functions listen mcp cms dev payments migrate config users send deliveries api`.
|
|
43
|
+
|
|
44
|
+
**Every verb names its target.** `--dev` selects the dev slot, `--target <name>` a named slot bound by `vxil link <slug> --as <name>` (which merges into the existing binding rather than replacing it). The selector is **fail-closed** — an unbound slot exits 1 telling you the fix, and never falls through to another tenant — and every write verb prints a target banner (slug + env, never a key) before it acts.
|
|
45
|
+
|
|
46
|
+
- `vxil plan --explain` — the config plan with every leaf tagged *declared* or *default*.
|
|
47
|
+
- `vxil diff [--against <target>] [--ignore <k,…>]` — the CI drift gate; secrets compared by name only.
|
|
48
|
+
- `vxil doctor` — preflight: secrets referenced-vs-stored (advisory, names only) plus a served / published / local hash verdict per function.
|
|
49
|
+
- `vxil secrets list --all-projects` — the names-and-metadata matrix across every bound project (values never come back).
|
|
50
|
+
- `vxil migrate payments --from-provider stripe|paddle|paypal|revenuecat (--customers <f.csv> | --all) [--dry-run]` — backfill subscriptions through the server sync leg; resumable.
|
|
51
|
+
- `vxil payments simulate --scenario <s> --user <id> [--tier <t>]` — mock/dev projects only: drive a refund pair, cross-platform unlock, renewal, expiry, past-due grace or transfer and check the oracle.
|
|
30
52
|
|
|
31
53
|
`vxil listen --forward-to <url>` polls your tenant's inbound webhook events and re-POSTs each new one to your local server under the exact delivery contract production uses — same body shape, same signed `X-Vxil-Jobs-Signature` header (your real signing secret) — so the handler you test locally is the handler you ship. `--replay-last <n>` re-forwards recent events; `--raw` posts the stored provider payload alone.
|
|
32
54
|
|
package/dist/vxil.js
CHANGED
|
@@ -32,7 +32,7 @@ function lowerTriggerBindings(trigger) {
|
|
|
32
32
|
return [{ kind: "http", ...str("path") ? { path: str("path") } : {} }];
|
|
33
33
|
}
|
|
34
34
|
var CONFIG_FILENAMES = ["vxil.config.ts", "vxil.config.mjs", "vxil.config.js"];
|
|
35
|
-
var VXIL_CONFIG_PKG_VERSION = "0.
|
|
35
|
+
var VXIL_CONFIG_PKG_VERSION = "0.3.0";
|
|
36
36
|
function ensureScaffoldPackageJson(cwd) {
|
|
37
37
|
const file = resolve(cwd, "package.json");
|
|
38
38
|
const spec = `^${VXIL_CONFIG_PKG_VERSION}`;
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vxil/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "The vxil CLI
|
|
5
|
+
"description": "The vxil CLI — init, quickstart, push, gen, secrets, migrate, doctor, diff, functions, payments; installs the `vxil` command (npm i -g @vxil/cli).",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://vxil.com",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"backend",
|
|
10
10
|
"baas",
|
|
11
11
|
"cli",
|
|
12
|
-
"config-as-code"
|
|
13
|
-
"cloudflare-workers"
|
|
12
|
+
"config-as-code"
|
|
14
13
|
],
|
|
15
14
|
"type": "module",
|
|
16
15
|
"bin": {
|