@vxil/cli 0.5.1 → 0.5.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.
- package/README.md +8 -3
- package/dist/_vxil-feature-configs.d.ts +25 -3
- package/dist/config.d.ts +28 -19
- package/dist/vxil.js +653 -84
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -39,13 +39,18 @@ export default defineConfig({
|
|
|
39
39
|
});
|
|
40
40
|
```
|
|
41
41
|
|
|
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`.
|
|
42
|
+
Verbs: `init templates quickstart try login link keys 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
43
|
|
|
44
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
45
|
|
|
46
46
|
- `vxil plan --explain` — the config plan with every leaf tagged *declared* or *default*.
|
|
47
|
-
- `vxil
|
|
48
|
-
- `vxil
|
|
47
|
+
- `vxil push [--skip-functions]` — apply schema → config → functions; a project below the functions plan is stopped *before anything is pushed*, and `--skip-functions` pushes the rest.
|
|
48
|
+
- `vxil diff [--against <target>] [--ignore <k,…>] [--strict-secrets]` — the CI drift gate; secrets compared by name only, and a referenced-but-unstored name is informational unless `--strict-secrets`.
|
|
49
|
+
- `vxil doctor` — preflight: secrets referenced-vs-stored (advisory, names only) plus a served / published / local hash verdict per function. Under `--json` stdout is one JSON document; notices go to stderr.
|
|
50
|
+
- `vxil link <slug>` — reuses the key already stored for the slug on this machine; `--mint` for a fresh one, `--key` to hand one in.
|
|
51
|
+
- `vxil keys mint --name <name> --scopes <a,b,c> [--env live|test] [--store]` — mint a **narrow** key for a server (scopes validated locally; `admin` refused); the key prints **once** to stdout (`--json` → `{ api_key, key_id, scopes }`) and is never stored unless `--store`. `vxil keys list` shows names, ids, scopes, created and last-used (never secrets); `vxil keys revoke <key_id> [--yes]` asks you to type the id, and refuses the key the CLI itself is using unless `--yes`. Needs a dashboard session (`vxil login`, or it prompts at a terminal; a piped / `--json` run fails with that remedy instead — pass `--email`/`--password` to script it, which never stores the session).
|
|
52
|
+
- `vxil cms drop <collection> [--yes]` — remove one collection definition through the same guarded ack `push --allow-destructive` uses (rows are retained).
|
|
53
|
+
- `vxil api <METHOD> <path> ['<json>' | --data '<json>']` — call any `/v1` route; bare JSON on stdout, banner on stderr.
|
|
49
54
|
- `vxil secrets list --all-projects` — the names-and-metadata matrix across every bound project (values never come back).
|
|
50
55
|
- `vxil migrate payments --from-provider stripe|paddle|paypal|revenuecat (--customers <f.csv> | --all) [--dry-run]` — backfill subscriptions through the server sync leg; resumable.
|
|
51
56
|
- `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.
|
|
@@ -37,6 +37,12 @@ export declare function validateNotificationOverrides(templates: {
|
|
|
37
37
|
text?: string;
|
|
38
38
|
}>>;
|
|
39
39
|
} | undefined): string[];
|
|
40
|
+
/** AWS region grammar for `notifications.ses.region` (`us-east-1`,
|
|
41
|
+
* `eu-central-1`, `ap-southeast-2`, `us-gov-west-1`, …): two-letter partition,
|
|
42
|
+
* one or more lowercase words, a single digit. Pinned as a pattern rather than
|
|
43
|
+
* a list so a newly launched SES region needs no vxil release; a typo still
|
|
44
|
+
* fails at `vxil push` (TypeBox), never as a DNS error on the first send. */
|
|
45
|
+
export declare const SES_REGION_PATTERN = "^[a-z]{2}(-[a-z]+)+-\\d$";
|
|
40
46
|
export declare const NotificationsConfigSchema: import("@sinclair/typebox").TObject<{
|
|
41
47
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
42
48
|
fromEmail: import("@sinclair/typebox").TString;
|
|
@@ -44,7 +50,12 @@ export declare const NotificationsConfigSchema: import("@sinclair/typebox").TObj
|
|
|
44
50
|
replyTo: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
45
51
|
resendApiKeyRef: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
46
52
|
webhookSecretRef: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
47
|
-
provider: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"resend">, import("@sinclair/typebox").TLiteral<"mock">]>;
|
|
53
|
+
provider: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"resend">, import("@sinclair/typebox").TLiteral<"ses">, import("@sinclair/typebox").TLiteral<"mock">]>;
|
|
54
|
+
ses: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
55
|
+
region: import("@sinclair/typebox").TString;
|
|
56
|
+
accessKeyIdRef: import("@sinclair/typebox").TString;
|
|
57
|
+
secretAccessKeyRef: import("@sinclair/typebox").TString;
|
|
58
|
+
}>>;
|
|
48
59
|
defaultLocale: import("@sinclair/typebox").TString;
|
|
49
60
|
retry: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
50
61
|
maxAttempts: import("@sinclair/typebox").TInteger;
|
|
@@ -53,10 +64,10 @@ export declare const NotificationsConfigSchema: import("@sinclair/typebox").TObj
|
|
|
53
64
|
suppression: import("@sinclair/typebox").TObject<{
|
|
54
65
|
softBounceThreshold: import("@sinclair/typebox").TInteger;
|
|
55
66
|
}>;
|
|
56
|
-
rateLimit: import("@sinclair/typebox").TObject<{
|
|
67
|
+
rateLimit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
57
68
|
perDay: import("@sinclair/typebox").TInteger;
|
|
58
69
|
perTenantSec: import("@sinclair/typebox").TInteger;
|
|
59
|
-
}
|
|
70
|
+
}>>;
|
|
60
71
|
templates: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
61
72
|
allowOverride: import("@sinclair/typebox").TBoolean;
|
|
62
73
|
overrides: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
@@ -150,6 +161,17 @@ declare const OidcProviderSchema: import("@sinclair/typebox").TObject<{
|
|
|
150
161
|
allowedDomains: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
151
162
|
autoLink: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
152
163
|
}>;
|
|
164
|
+
export declare const REDIRECT_ORIGIN_PATTERN = "^(https://[^/?#\\s]+|http://(localhost|127\\.0\\.0\\.1)(:[0-9]{1,5})?)$";
|
|
165
|
+
/** THE scheme rule for a redirect/return URL: https anywhere, http on loopback
|
|
166
|
+
* only. Takes the parsed URL (or any {protocol, hostname} pair) so the config
|
|
167
|
+
* validator and the worker's runtime guard call the identical predicate. */
|
|
168
|
+
export declare function redirectSchemeAllowed(u: {
|
|
169
|
+
protocol: string;
|
|
170
|
+
hostname: string;
|
|
171
|
+
}): boolean;
|
|
172
|
+
/** An allow-list ENTRY is a bare origin that parses and passes the scheme
|
|
173
|
+
* rule. Used by validateFeatureConfig (auth) on top of the coarse pattern. */
|
|
174
|
+
export declare function isAllowedRedirectOriginEntry(entry: string): boolean;
|
|
153
175
|
export declare const AuthConfigSchema: import("@sinclair/typebox").TObject<{
|
|
154
176
|
enabled: import("@sinclair/typebox").TBoolean;
|
|
155
177
|
methods: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
package/dist/config.d.ts
CHANGED
|
@@ -221,6 +221,15 @@ export type ApiVersion = 'v1';
|
|
|
221
221
|
* only by a real v2. */
|
|
222
222
|
export declare const RELEASED_API_VERSIONS: readonly ApiVersion[];
|
|
223
223
|
/** The whole vxil backend, declared in one typed, version-controlled file. */
|
|
224
|
+
/** Recursive partial: a `vxil.config.ts` may write any SUBSET of a nested bag
|
|
225
|
+
* (`auth: { otp: { enabled: true } }`) — the server applies the defaults for
|
|
226
|
+
* the rest (Value.Default). A shallow `Partial` made `tsc` reject every
|
|
227
|
+
* partially-written nested bag, including the guide's own skeleton
|
|
228
|
+
* (found by the 2026-09-19 cvskit dry-run). Arrays and primitives are kept
|
|
229
|
+
* as-is; only plain object bags recurse. */
|
|
230
|
+
export type DeepPartial<T> = T extends readonly unknown[] ? T : T extends object ? {
|
|
231
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
232
|
+
} : T;
|
|
224
233
|
export interface VxilConfig {
|
|
225
234
|
/** target environment label; resolved to a baseUrl by `vxil link` / `--env`. */
|
|
226
235
|
env?: string;
|
|
@@ -233,25 +242,25 @@ export interface VxilConfig {
|
|
|
233
242
|
* same Value.Default/Clean pipeline the server uses. Keys match FEATURE_SCHEMAS
|
|
234
243
|
* exactly (note the hyphenated ids). */
|
|
235
244
|
features?: {
|
|
236
|
-
notifications?:
|
|
237
|
-
jobs?:
|
|
238
|
-
auth?:
|
|
239
|
-
'rate-limits'?:
|
|
240
|
-
files?:
|
|
241
|
-
webhooks?:
|
|
242
|
-
comments?:
|
|
243
|
-
cms?:
|
|
244
|
-
mcp?:
|
|
245
|
-
realtime?:
|
|
246
|
-
presence?:
|
|
247
|
-
orgs?:
|
|
248
|
-
'activity-feed'?:
|
|
249
|
-
'vector-search'?:
|
|
250
|
-
ai?:
|
|
251
|
-
rag?:
|
|
252
|
-
payments?:
|
|
253
|
-
functions?:
|
|
254
|
-
copilot?:
|
|
245
|
+
notifications?: DeepPartial<NotificationsConfig>;
|
|
246
|
+
jobs?: DeepPartial<JobsConfig>;
|
|
247
|
+
auth?: DeepPartial<AuthConfig>;
|
|
248
|
+
'rate-limits'?: DeepPartial<RateLimitsConfig>;
|
|
249
|
+
files?: DeepPartial<FilesConfig>;
|
|
250
|
+
webhooks?: DeepPartial<WebhooksConfig>;
|
|
251
|
+
comments?: DeepPartial<CommentsConfig>;
|
|
252
|
+
cms?: DeepPartial<CmsConfig>;
|
|
253
|
+
mcp?: DeepPartial<McpConfig>;
|
|
254
|
+
realtime?: DeepPartial<RealtimeConfig>;
|
|
255
|
+
presence?: DeepPartial<PresenceConfig>;
|
|
256
|
+
orgs?: DeepPartial<OrgsConfig>;
|
|
257
|
+
'activity-feed'?: DeepPartial<ActivityFeedConfig>;
|
|
258
|
+
'vector-search'?: DeepPartial<VectorSearchConfig>;
|
|
259
|
+
ai?: DeepPartial<AiConfig>;
|
|
260
|
+
rag?: DeepPartial<RagConfig>;
|
|
261
|
+
payments?: DeepPartial<PaymentsConfig>;
|
|
262
|
+
functions?: DeepPartial<FunctionsConfig>;
|
|
263
|
+
copilot?: DeepPartial<CopilotConfig>;
|
|
255
264
|
};
|
|
256
265
|
/** (b) CMS SCHEMA-AS-CODE — collections + fields. `push` reconciles them
|
|
257
266
|
* additively against GET /v1/cms/collections (no destructive drops without
|