@intentius/chant-lexicon-fly 0.16.0
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 +91 -0
- package/dist/codegen/docs-cli.d.ts +3 -0
- package/dist/codegen/docs-cli.d.ts.map +1 -0
- package/dist/codegen/docs.d.ts +27 -0
- package/dist/codegen/docs.d.ts.map +1 -0
- package/dist/codegen/generate-cli.d.ts +6 -0
- package/dist/codegen/generate-cli.d.ts.map +1 -0
- package/dist/codegen/generate-lexicon.d.ts +18 -0
- package/dist/codegen/generate-lexicon.d.ts.map +1 -0
- package/dist/codegen/generate-typescript.d.ts +11 -0
- package/dist/codegen/generate-typescript.d.ts.map +1 -0
- package/dist/codegen/generate.d.ts +15 -0
- package/dist/codegen/generate.d.ts.map +1 -0
- package/dist/codegen/naming.d.ts +14 -0
- package/dist/codegen/naming.d.ts.map +1 -0
- package/dist/codegen/package.d.ts +17 -0
- package/dist/codegen/package.d.ts.map +1 -0
- package/dist/composites/fly-deploy.d.ts +110 -0
- package/dist/composites/fly-deploy.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +74 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/detect.d.ts +22 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/export-resources.d.ts +25 -0
- package/dist/export-resources.d.ts.map +1 -0
- package/dist/generated/index.d.ts +42 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/runtime.d.ts +5 -0
- package/dist/generated/runtime.d.ts.map +1 -0
- package/dist/import/generator.d.ts +21 -0
- package/dist/import/generator.d.ts.map +1 -0
- package/dist/import/live-export.d.ts +42 -0
- package/dist/import/live-export.d.ts.map +1 -0
- package/dist/import/parser.d.ts +40 -0
- package/dist/import/parser.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +9 -0
- package/dist/lint/post-synth/fly-helpers.d.ts +15 -0
- package/dist/lint/post-synth/fly-helpers.d.ts.map +1 -0
- package/dist/lint/post-synth/fly010-machine-requires-image.d.ts +10 -0
- package/dist/lint/post-synth/fly010-machine-requires-image.d.ts.map +1 -0
- package/dist/lint/post-synth/fly011-mount-references-declared-volume.d.ts +12 -0
- package/dist/lint/post-synth/fly011-mount-references-declared-volume.d.ts.map +1 -0
- package/dist/lint/post-synth/index.d.ts +3 -0
- package/dist/lint/post-synth/index.d.ts.map +1 -0
- package/dist/lint/rules/guest-sizing.d.ts +9 -0
- package/dist/lint/rules/guest-sizing.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +7 -0
- package/dist/lint/rules/index.d.ts.map +1 -0
- package/dist/lint/rules/no-secret-literals.d.ts +13 -0
- package/dist/lint/rules/no-secret-literals.d.ts.map +1 -0
- package/dist/lint/rules/valid-region.d.ts +9 -0
- package/dist/lint/rules/valid-region.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +9 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +9 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +4 -0
- package/dist/meta.json +285 -0
- package/dist/op/activities/flaps.d.ts +29 -0
- package/dist/op/activities/flaps.d.ts.map +1 -0
- package/dist/op/activities/fly-apply.d.ts +382 -0
- package/dist/op/activities/fly-apply.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +12 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/ownership.d.ts +27 -0
- package/dist/ownership.d.ts.map +1 -0
- package/dist/package-cli.d.ts +3 -0
- package/dist/package-cli.d.ts.map +1 -0
- package/dist/plugin.d.ts +8 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/pseudo.d.ts +23 -0
- package/dist/pseudo.d.ts.map +1 -0
- package/dist/serializer.d.ts +36 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/spec/fetch.d.ts +12 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/spec/parse.d.ts +58 -0
- package/dist/spec/parse.d.ts.map +1 -0
- package/dist/types/index.d.ts +590 -0
- package/dist/validate-cli.d.ts +3 -0
- package/dist/validate-cli.d.ts.map +1 -0
- package/dist/validate.d.ts +15 -0
- package/dist/validate.d.ts.map +1 -0
- package/package.json +76 -0
- package/src/codegen/docs-cli.ts +7 -0
- package/src/codegen/docs.ts +208 -0
- package/src/codegen/generate-cli.ts +36 -0
- package/src/codegen/generate-lexicon.ts +52 -0
- package/src/codegen/generate-typescript.ts +69 -0
- package/src/codegen/generate.ts +106 -0
- package/src/codegen/naming.ts +45 -0
- package/src/codegen/package.ts +25 -0
- package/src/composites/fly-deploy.ts +169 -0
- package/src/describe-resources.test.ts +188 -0
- package/src/describe-resources.ts +0 -0
- package/src/detect.ts +64 -0
- package/src/export-resources.ts +123 -0
- package/src/generated/.gitkeep +0 -0
- package/src/generated/index.d.ts +590 -0
- package/src/generated/index.ts +47 -0
- package/src/generated/lexicon-fly.json +285 -0
- package/src/generated/runtime.ts +4 -0
- package/src/import/generator.test.ts +123 -0
- package/src/import/generator.ts +242 -0
- package/src/import/live-export.test.ts +150 -0
- package/src/import/live-export.ts +107 -0
- package/src/import/parser.test.ts +132 -0
- package/src/import/parser.ts +185 -0
- package/src/import/roundtrip.test.ts +77 -0
- package/src/index.ts +23 -0
- package/src/lint/post-synth/fly-helpers.ts +25 -0
- package/src/lint/post-synth/fly010-machine-requires-image.test.ts +59 -0
- package/src/lint/post-synth/fly010-machine-requires-image.ts +39 -0
- package/src/lint/post-synth/fly011-mount-references-declared-volume.test.ts +92 -0
- package/src/lint/post-synth/fly011-mount-references-declared-volume.ts +61 -0
- package/src/lint/post-synth/index.ts +9 -0
- package/src/lint/rules/guest-sizing.ts +100 -0
- package/src/lint/rules/index.ts +15 -0
- package/src/lint/rules/no-secret-literals.ts +67 -0
- package/src/lint/rules/rules.test.ts +127 -0
- package/src/lint/rules/valid-region.ts +58 -0
- package/src/lsp/completions.test.ts +10 -0
- package/src/lsp/completions.ts +14 -0
- package/src/lsp/hover.test.ts +10 -0
- package/src/lsp/hover.ts +14 -0
- package/src/op/activities/describe-resources.integration.test.ts +105 -0
- package/src/op/activities/flaps.test.ts +29 -0
- package/src/op/activities/flaps.ts +44 -0
- package/src/op/activities/fly-apply.integration.test.ts +245 -0
- package/src/op/activities/fly-apply.test.ts +513 -0
- package/src/op/activities/fly-apply.ts +1014 -0
- package/src/op/activities/index.ts +48 -0
- package/src/ownership.ts +32 -0
- package/src/package-cli.ts +24 -0
- package/src/plugin.test.ts +17 -0
- package/src/plugin.ts +285 -0
- package/src/pseudo.test.ts +32 -0
- package/src/pseudo.ts +29 -0
- package/src/serializer.test.ts +232 -0
- package/src/serializer.ts +293 -0
- package/src/skills/chant-fly-ops.md +55 -0
- package/src/skills/chant-fly-patterns.md +71 -0
- package/src/skills/chant-fly.md +123 -0
- package/src/spec/fetch.ts +34 -0
- package/src/spec/parse.ts +323 -0
- package/src/validate-cli.ts +5 -0
- package/src/validate.ts +28 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fly (Machines API / "flaps") native applier — #739.
|
|
3
|
+
*
|
|
4
|
+
* Peer of `gcpApply` (#706): a direct-REST applier that does its own diff,
|
|
5
|
+
* owned-only prune, and mutation waiting. GCP has no server-side declarative
|
|
6
|
+
* apply, and neither does flaps, so this loop is hand-rolled — GET-then-
|
|
7
|
+
* create/update per resource, poll `/wait` after each mutation, and prune only
|
|
8
|
+
* what chant owns. Unlike GCP's long-running operations, flaps gates mutations
|
|
9
|
+
* behind machine leases (a nonce echoed in the `fly-machine-lease-nonce`
|
|
10
|
+
* header), so the tricky paths here are the lease-conflict retry and waiting on
|
|
11
|
+
* the correct new `instance_id` after an update.
|
|
12
|
+
*
|
|
13
|
+
* Input is the #738 serializer's output: a JSON object keyed by entity name,
|
|
14
|
+
* each value a single flaps create request `{ endpoint, method, body }` (app →
|
|
15
|
+
* `/v1/apps`, machine → `/v1/apps/{app}/machines`). A machine endpoint may carry
|
|
16
|
+
* a literal `{app}` placeholder when the stack declares more than one app; it is
|
|
17
|
+
* resolved from the owning app at apply time.
|
|
18
|
+
*
|
|
19
|
+
* D1: direct REST, no flyctl, no state file. D2: owned-only prune via the
|
|
20
|
+
* `managed-by: chant` machine metadata. D3: endpoint override via
|
|
21
|
+
* `FLY_FLAPS_BASE_URL` (or an explicit `endpoint` arg), so the same code points
|
|
22
|
+
* at real Fly or at mudflaps (`:4280`).
|
|
23
|
+
*/
|
|
24
|
+
/** Default flaps host when neither an `endpoint` arg nor `FLY_FLAPS_BASE_URL` is set. */
|
|
25
|
+
export declare const DEFAULT_FLAPS_BASE_URL = "https://api.machines.dev";
|
|
26
|
+
/** Header carrying a lease nonce on a mutating request, matching fly-go/flaps. */
|
|
27
|
+
export declare const LEASE_NONCE_HEADER = "fly-machine-lease-nonce";
|
|
28
|
+
/** One flaps REST call as emitted by the #738 serializer. */
|
|
29
|
+
export interface FlapsRequest {
|
|
30
|
+
endpoint: string;
|
|
31
|
+
method: string;
|
|
32
|
+
body: Record<string, unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* D7: apply-only resources (Secrets) are POSTed but never read back for a
|
|
35
|
+
* diff — flaps returns only a digest, never the value. `flyApply` always
|
|
36
|
+
* POSTs these and excludes them from any drift/diff.
|
|
37
|
+
*/
|
|
38
|
+
applyOnly?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/** The serializer's whole output: entity name → flaps create request. */
|
|
41
|
+
export type FlyPlan = Record<string, FlapsRequest>;
|
|
42
|
+
/** The subset of a live flaps machine the applier reads back. */
|
|
43
|
+
export interface FlapsMachine {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
state: string;
|
|
47
|
+
instance_id: string;
|
|
48
|
+
config?: {
|
|
49
|
+
metadata?: Record<string, string>;
|
|
50
|
+
} & Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Resolve the flaps base URL (D3): an explicit `endpoint` arg wins, then the
|
|
54
|
+
* `FLY_FLAPS_BASE_URL` env, then the real-Fly default. The trailing slash is
|
|
55
|
+
* stripped so `${base}/v1/...` never doubles up. Pure.
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveEndpoint(args?: {
|
|
58
|
+
endpoint?: string;
|
|
59
|
+
}, env?: NodeJS.ProcessEnv): string;
|
|
60
|
+
/** Parse the serializer's JSON output into a plan. Pure. */
|
|
61
|
+
export declare function parsePlan(content: string): FlyPlan;
|
|
62
|
+
/** True when a request creates an App (`POST /v1/apps`). Pure. */
|
|
63
|
+
export declare function isAppRequest(req: FlapsRequest): boolean;
|
|
64
|
+
/** True when a request creates a Machine (`.../machines`). Pure. */
|
|
65
|
+
export declare function isMachineRequest(req: FlapsRequest): boolean;
|
|
66
|
+
/** The app segment of a machine endpoint, or the literal `{app}` placeholder. Pure. */
|
|
67
|
+
export declare function machineAppSegment(endpoint: string): string;
|
|
68
|
+
/** True when a request creates a Volume (`.../volumes`). Pure. */
|
|
69
|
+
export declare function isVolumeRequest(req: FlapsRequest): boolean;
|
|
70
|
+
/** True when a request assigns an IP (`.../ip_assignments`). Pure. */
|
|
71
|
+
export declare function isIpRequest(req: FlapsRequest): boolean;
|
|
72
|
+
/** True when a request creates a Certificate (`.../certificates`). Pure. */
|
|
73
|
+
export declare function isCertRequest(req: FlapsRequest): boolean;
|
|
74
|
+
/** True when a request sets a Secret (`.../secrets/{name}`). Pure. */
|
|
75
|
+
export declare function isSecretRequest(req: FlapsRequest): boolean;
|
|
76
|
+
/**
|
|
77
|
+
* The app segment of any app-scoped resource endpoint (volumes, ip_assignments,
|
|
78
|
+
* certificates, secrets), or the literal `{app}` placeholder. Pure.
|
|
79
|
+
*/
|
|
80
|
+
export declare function resourceAppSegment(endpoint: string): string;
|
|
81
|
+
/** The secret name segment of a `.../secrets/{name}` endpoint. Pure. */
|
|
82
|
+
export declare function secretNameSegment(endpoint: string): string;
|
|
83
|
+
/**
|
|
84
|
+
* Resolve a machine's owning app: the endpoint segment as-is, unless it is the
|
|
85
|
+
* `{app}` placeholder the serializer leaves when it can't decide — then fall
|
|
86
|
+
* back to the stack's sole app. Throws when neither settles it. Pure.
|
|
87
|
+
*/
|
|
88
|
+
export declare function resolveApp(segment: string, soleApp: string | undefined): string;
|
|
89
|
+
/** The `app_name` an app request creates. Pure. */
|
|
90
|
+
export declare function appNameFromRequest(req: FlapsRequest): string;
|
|
91
|
+
/**
|
|
92
|
+
* True when a machine's live metadata carries chant's ownership marker (D2).
|
|
93
|
+
* Pure. Reads the key convention the fly lexicon declares via the #686 seam
|
|
94
|
+
* (`FLY_METADATA_OWNERSHIP_KEYS`) through core's `hasOwnershipMarker`, so the
|
|
95
|
+
* prune filter and the serializer's stamp can never drift apart — the marker
|
|
96
|
+
* key lives in exactly one place.
|
|
97
|
+
*/
|
|
98
|
+
export declare function isChantOwned(metadata: Record<string, string> | null | undefined): boolean;
|
|
99
|
+
/** Structural equality over two config values, order-insensitive. Pure. */
|
|
100
|
+
export declare function configEqual(a: unknown, b: unknown): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* The lease-conflict retry decision. A 409 whose body mentions a lease is a
|
|
103
|
+
* stale/lost nonce (the `lease_currently_held` acquire envelope, or the "machine
|
|
104
|
+
* is leased" gate on a mutation) — the caller should re-acquire and retry once.
|
|
105
|
+
* A 409 that is not lease-shaped (e.g. "app already exists") is not retried. Pure.
|
|
106
|
+
*/
|
|
107
|
+
export declare function isLeaseConflict(status: number, text: string): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Injectable HTTP client — mirrors gcp-apply's `GcpHttp`, extended with a
|
|
110
|
+
* per-call `headers` map so the applier can carry the `fly-machine-lease-nonce`
|
|
111
|
+
* header on a mutation (and so tests can assert it). Tests inject a fake; the
|
|
112
|
+
* default hits `fetch`.
|
|
113
|
+
*/
|
|
114
|
+
export type FlyHttp = (method: string, url: string, body?: unknown, headers?: Record<string, string>, signal?: AbortSignal) => Promise<{
|
|
115
|
+
status: number;
|
|
116
|
+
text: string;
|
|
117
|
+
}>;
|
|
118
|
+
/**
|
|
119
|
+
* Default `fetch`-based client. Sends `Authorization: Bearer <token>` when a
|
|
120
|
+
* token is set (real Fly); mudflaps ignores it. The token defaults to
|
|
121
|
+
* `FLY_API_TOKEN` at call time.
|
|
122
|
+
*/
|
|
123
|
+
export declare function defaultFlyHttp(token?: string): FlyHttp;
|
|
124
|
+
/** Wait-loop tuning. Defaults suit real flaps; tests shrink the interval. */
|
|
125
|
+
export interface WaitOpts {
|
|
126
|
+
/** Server-side long-poll cap per request (clamped to 60s by flaps). */
|
|
127
|
+
timeoutSecs?: number;
|
|
128
|
+
/** Delay between re-polls after a non-terminal response. */
|
|
129
|
+
intervalMs?: number;
|
|
130
|
+
/** Overall client deadline across re-polls. */
|
|
131
|
+
deadlineMs?: number;
|
|
132
|
+
}
|
|
133
|
+
export interface ApplyCtx {
|
|
134
|
+
base: string;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Acquire a lease, retrying once on a lease-conflict 409. The retry is what
|
|
138
|
+
* lets a stale/lost hold clear (the prior lease expired or was released) before
|
|
139
|
+
* the mutation goes out with a fresh nonce. Returns the nonce.
|
|
140
|
+
*/
|
|
141
|
+
export declare function acquireLease(ctx: ApplyCtx, app: string, id: string, http: FlyHttp, signal?: AbortSignal): Promise<string>;
|
|
142
|
+
/** Best-effort lease release. A cleared lease (post-destroy) 404s — ignored. */
|
|
143
|
+
export declare function releaseLease(ctx: ApplyCtx, app: string, id: string, nonce: string, http: FlyHttp, signal?: AbortSignal): Promise<void>;
|
|
144
|
+
/**
|
|
145
|
+
* Run a lease-gated mutation: acquire → mutate (nonce in the header) → release.
|
|
146
|
+
* On a lease-conflict 409 from the mutation (a stale/lost nonce), re-acquire a
|
|
147
|
+
* fresh nonce and retry the mutation once. `mutate` receives the nonce so the
|
|
148
|
+
* caller can put it in the header; it returns the raw response. Returns the
|
|
149
|
+
* final mutation response.
|
|
150
|
+
*/
|
|
151
|
+
export declare function withLease(ctx: ApplyCtx, app: string, id: string, http: FlyHttp, signal: AbortSignal | undefined, mutate: (nonce: string) => Promise<{
|
|
152
|
+
status: number;
|
|
153
|
+
text: string;
|
|
154
|
+
}>): Promise<{
|
|
155
|
+
status: number;
|
|
156
|
+
text: string;
|
|
157
|
+
}>;
|
|
158
|
+
/**
|
|
159
|
+
* Poll `GET .../wait` until the machine reaches `state` at the given `version`
|
|
160
|
+
* (its new `instance_id`). flaps clamps its own timeout to 60s and answers 408
|
|
161
|
+
* on expiry, so the client re-polls until its own deadline. A destroyed+reaped
|
|
162
|
+
* machine satisfies a `state=destroyed` wait (flaps returns `ok` on the missing
|
|
163
|
+
* machine). `http` and the interval are injectable so tests avoid real waits.
|
|
164
|
+
*/
|
|
165
|
+
export declare function waitForMachine(ctx: ApplyCtx, app: string, id: string, version: string, http: FlyHttp, signal?: AbortSignal, opts?: WaitOpts & {
|
|
166
|
+
state?: string;
|
|
167
|
+
}): Promise<void>;
|
|
168
|
+
/** Create the app if absent (idempotent). A create-time conflict means it exists. */
|
|
169
|
+
export declare function applyApp(ctx: ApplyCtx, req: FlapsRequest, http: FlyHttp, signal?: AbortSignal): Promise<{
|
|
170
|
+
app: string;
|
|
171
|
+
created: boolean;
|
|
172
|
+
}>;
|
|
173
|
+
/** List an app's live machines. */
|
|
174
|
+
export declare function listMachines(ctx: ApplyCtx, app: string, http: FlyHttp, signal?: AbortSignal): Promise<FlapsMachine[]>;
|
|
175
|
+
/**
|
|
176
|
+
* Reconcile one machine: create it when absent; when present, update it only if
|
|
177
|
+
* its config drifted (else no-op). A create/update is followed by a wait on the
|
|
178
|
+
* machine's new `instance_id`. Updates go through a lease. The declared machine
|
|
179
|
+
* is identified by name (falling back to the plan entity name), so re-applying
|
|
180
|
+
* an unchanged machine is a no-op.
|
|
181
|
+
*/
|
|
182
|
+
export declare function applyMachine(ctx: ApplyCtx, app: string, entityName: string, req: FlapsRequest, http: FlyHttp, signal?: AbortSignal, opts?: WaitOpts): Promise<{
|
|
183
|
+
action: "created" | "updated" | "noop";
|
|
184
|
+
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
}>;
|
|
187
|
+
/** Lease → destroy → wait for the machine to be reaped. */
|
|
188
|
+
export declare function destroyMachine(ctx: ApplyCtx, app: string, id: string, http: FlyHttp, signal?: AbortSignal, opts?: WaitOpts): Promise<void>;
|
|
189
|
+
/** Delete an app (idempotent; a 404 means it is already gone). */
|
|
190
|
+
export declare function deleteApp(ctx: ApplyCtx, app: string, http: FlyHttp, signal?: AbortSignal): Promise<{
|
|
191
|
+
app: string;
|
|
192
|
+
deleted: boolean;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* Owned-only prune (D2): for one app, destroy the chant-owned machines whose
|
|
196
|
+
* name is not in `keep`. An unmarked machine (no `managed-by: chant`) is never
|
|
197
|
+
* touched, so it survives an apply that would otherwise delete it. Machines
|
|
198
|
+
* already tearing down are skipped.
|
|
199
|
+
*/
|
|
200
|
+
export declare function pruneMachines(ctx: ApplyCtx, app: string, keep: Set<string>, http: FlyHttp, signal?: AbortSignal, opts?: WaitOpts): Promise<Array<{
|
|
201
|
+
app: string;
|
|
202
|
+
name: string;
|
|
203
|
+
id: string;
|
|
204
|
+
}>>;
|
|
205
|
+
/** A live volume as flaps lists it. */
|
|
206
|
+
export interface FlapsVolume {
|
|
207
|
+
id: string;
|
|
208
|
+
name: string;
|
|
209
|
+
state?: string;
|
|
210
|
+
}
|
|
211
|
+
/** A live IP assignment as flaps lists it. */
|
|
212
|
+
export interface FlapsIp {
|
|
213
|
+
ip: string;
|
|
214
|
+
shared?: boolean;
|
|
215
|
+
}
|
|
216
|
+
/** A live certificate as flaps lists it. */
|
|
217
|
+
export interface FlapsCert {
|
|
218
|
+
hostname: string;
|
|
219
|
+
}
|
|
220
|
+
/** A live secret as flaps lists it (digest only, never the value). */
|
|
221
|
+
export interface FlapsSecret {
|
|
222
|
+
name: string;
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* The declared identity of an IP: its `type` collapses to a family key the
|
|
226
|
+
* live-list can be mapped back to (shared v4 / dedicated v4 / v6). This lets a
|
|
227
|
+
* re-apply of the same declared type be a no-op even though the address is
|
|
228
|
+
* server-allocated. Pure.
|
|
229
|
+
*/
|
|
230
|
+
export declare function ipType(shared: boolean | undefined, address: string): string;
|
|
231
|
+
/** The declared IP family from a request body's `type`. Pure. */
|
|
232
|
+
export declare function declaredIpType(type: unknown): string;
|
|
233
|
+
/** List an app's live volumes (flaps returns a bare array). */
|
|
234
|
+
export declare function listVolumes(ctx: ApplyCtx, app: string, http: FlyHttp, signal?: AbortSignal): Promise<FlapsVolume[]>;
|
|
235
|
+
/** List an app's live IP assignments (`{ ips: [...] }`). */
|
|
236
|
+
export declare function listIps(ctx: ApplyCtx, app: string, http: FlyHttp, signal?: AbortSignal): Promise<FlapsIp[]>;
|
|
237
|
+
/** List an app's live certificates (`{ certificates: [...] }`). */
|
|
238
|
+
export declare function listCerts(ctx: ApplyCtx, app: string, http: FlyHttp, signal?: AbortSignal): Promise<FlapsCert[]>;
|
|
239
|
+
/** List an app's live secrets (`{ secrets: [...] }`; digests only, never values). */
|
|
240
|
+
export declare function listSecrets(ctx: ApplyCtx, app: string, http: FlyHttp, signal?: AbortSignal): Promise<FlapsSecret[]>;
|
|
241
|
+
/** Create a volume if absent (idempotent by name). Machines that mount it apply after. */
|
|
242
|
+
export declare function applyVolume(ctx: ApplyCtx, app: string, entityName: string, req: FlapsRequest, http: FlyHttp, signal?: AbortSignal): Promise<{
|
|
243
|
+
action: "created" | "noop";
|
|
244
|
+
name: string;
|
|
245
|
+
}>;
|
|
246
|
+
/** Assign an IP if the declared type is not already present (idempotent by family). */
|
|
247
|
+
export declare function applyIp(ctx: ApplyCtx, app: string, req: FlapsRequest, http: FlyHttp, signal?: AbortSignal): Promise<{
|
|
248
|
+
action: "created" | "noop";
|
|
249
|
+
type: string;
|
|
250
|
+
}>;
|
|
251
|
+
/** Create a certificate if absent (idempotent by hostname). */
|
|
252
|
+
export declare function applyCert(ctx: ApplyCtx, app: string, req: FlapsRequest, http: FlyHttp, signal?: AbortSignal): Promise<{
|
|
253
|
+
action: "created" | "noop";
|
|
254
|
+
hostname: string;
|
|
255
|
+
}>;
|
|
256
|
+
/**
|
|
257
|
+
* Set a secret (D7, apply-only): always POST, never read back for a diff. flaps
|
|
258
|
+
* returns only a digest, so there is nothing to compare — every apply re-sets it.
|
|
259
|
+
*/
|
|
260
|
+
export declare function applySecret(ctx: ApplyCtx, app: string, name: string, req: FlapsRequest, http: FlyHttp, signal?: AbortSignal): Promise<{
|
|
261
|
+
action: "set";
|
|
262
|
+
name: string;
|
|
263
|
+
}>;
|
|
264
|
+
/** App-scoped prune (D2): destroy volumes the plan no longer declares (by name). */
|
|
265
|
+
export declare function pruneVolumes(ctx: ApplyCtx, app: string, keep: Set<string>, http: FlyHttp, signal?: AbortSignal): Promise<Array<{
|
|
266
|
+
app: string;
|
|
267
|
+
name: string;
|
|
268
|
+
id: string;
|
|
269
|
+
}>>;
|
|
270
|
+
/** App-scoped prune (D2): release IP assignments whose type the plan no longer declares. */
|
|
271
|
+
export declare function pruneIps(ctx: ApplyCtx, app: string, keep: Set<string>, http: FlyHttp, signal?: AbortSignal): Promise<Array<{
|
|
272
|
+
app: string;
|
|
273
|
+
address: string;
|
|
274
|
+
}>>;
|
|
275
|
+
/** App-scoped prune (D2): destroy certificates whose hostname the plan no longer declares. */
|
|
276
|
+
export declare function pruneCerts(ctx: ApplyCtx, app: string, keep: Set<string>, http: FlyHttp, signal?: AbortSignal): Promise<Array<{
|
|
277
|
+
app: string;
|
|
278
|
+
hostname: string;
|
|
279
|
+
}>>;
|
|
280
|
+
/**
|
|
281
|
+
* App-scoped prune (D2) for apply-only secrets: a declared-then-removed secret
|
|
282
|
+
* is still prunable by name, even though it never enters a drift/diff.
|
|
283
|
+
*/
|
|
284
|
+
export declare function pruneSecrets(ctx: ApplyCtx, app: string, keep: Set<string>, http: FlyHttp, signal?: AbortSignal): Promise<Array<{
|
|
285
|
+
app: string;
|
|
286
|
+
name: string;
|
|
287
|
+
}>>;
|
|
288
|
+
export interface FlyApplyArgs {
|
|
289
|
+
/** Path to the #738 serializer's JSON output (entity name → flaps request). */
|
|
290
|
+
planPath: string;
|
|
291
|
+
/** flaps endpoint override (D3). Default: `FLY_FLAPS_BASE_URL` env, else real Fly. */
|
|
292
|
+
endpoint?: string;
|
|
293
|
+
/** Bearer token for real Fly. Default: `FLY_API_TOKEN`. mudflaps ignores it. */
|
|
294
|
+
token?: string;
|
|
295
|
+
/**
|
|
296
|
+
* Prune (D2): destroy declared-then-removed resources. Machines are owned-only
|
|
297
|
+
* (chant metadata marker); an unmarked machine is never touched. The
|
|
298
|
+
* metadata-less types (volumes/ips/certs/secrets) are app-scoped: anything the
|
|
299
|
+
* plan no longer declares under a managed app is removed. Destructive — off by
|
|
300
|
+
* default.
|
|
301
|
+
*/
|
|
302
|
+
prune?: boolean;
|
|
303
|
+
/** Wait-loop tuning (mainly for tests). */
|
|
304
|
+
wait?: WaitOpts;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* The native fly applier (#739, #741): read the serialized plan and apply it
|
|
308
|
+
* straight to flaps in dependency order — app → volumes → machines → ips →
|
|
309
|
+
* certificates → secrets — then optionally prune. Machines prune owned-only via
|
|
310
|
+
* the metadata marker (D2); the metadata-less types (volumes/ips/certs/secrets)
|
|
311
|
+
* prune app-scoped: everything the plan no longer declares under a managed app.
|
|
312
|
+
* Secrets are apply-only (D7): set, never read back for a diff. `http` is
|
|
313
|
+
* injectable for tests.
|
|
314
|
+
*/
|
|
315
|
+
export declare function flyApply(args: FlyApplyArgs, signal?: AbortSignal, http?: FlyHttp): Promise<{
|
|
316
|
+
apps: Array<{
|
|
317
|
+
app: string;
|
|
318
|
+
created: boolean;
|
|
319
|
+
}>;
|
|
320
|
+
machines: Array<{
|
|
321
|
+
app: string;
|
|
322
|
+
name: string;
|
|
323
|
+
action: "created" | "updated" | "noop";
|
|
324
|
+
}>;
|
|
325
|
+
volumes: Array<{
|
|
326
|
+
app: string;
|
|
327
|
+
name: string;
|
|
328
|
+
action: "created" | "noop";
|
|
329
|
+
}>;
|
|
330
|
+
ips: Array<{
|
|
331
|
+
app: string;
|
|
332
|
+
type: string;
|
|
333
|
+
action: "created" | "noop";
|
|
334
|
+
}>;
|
|
335
|
+
certs: Array<{
|
|
336
|
+
app: string;
|
|
337
|
+
hostname: string;
|
|
338
|
+
action: "created" | "noop";
|
|
339
|
+
}>;
|
|
340
|
+
secrets: Array<{
|
|
341
|
+
app: string;
|
|
342
|
+
name: string;
|
|
343
|
+
}>;
|
|
344
|
+
pruned: Array<{
|
|
345
|
+
app: string;
|
|
346
|
+
name: string;
|
|
347
|
+
id: string;
|
|
348
|
+
}>;
|
|
349
|
+
prunedVolumes: Array<{
|
|
350
|
+
app: string;
|
|
351
|
+
name: string;
|
|
352
|
+
id: string;
|
|
353
|
+
}>;
|
|
354
|
+
prunedIps: Array<{
|
|
355
|
+
app: string;
|
|
356
|
+
address: string;
|
|
357
|
+
}>;
|
|
358
|
+
prunedCerts: Array<{
|
|
359
|
+
app: string;
|
|
360
|
+
hostname: string;
|
|
361
|
+
}>;
|
|
362
|
+
prunedSecrets: Array<{
|
|
363
|
+
app: string;
|
|
364
|
+
name: string;
|
|
365
|
+
}>;
|
|
366
|
+
}>;
|
|
367
|
+
/**
|
|
368
|
+
* The inverse of {@link flyApply}: destroy the machines the plan declares, then
|
|
369
|
+
* delete the apps (dependents before their app). Idempotent — already-absent
|
|
370
|
+
* resources are a no-op. `http` is injectable for tests.
|
|
371
|
+
*/
|
|
372
|
+
export declare function flyDelete(args: FlyApplyArgs, signal?: AbortSignal, http?: FlyHttp): Promise<{
|
|
373
|
+
machines: Array<{
|
|
374
|
+
app: string;
|
|
375
|
+
name: string;
|
|
376
|
+
}>;
|
|
377
|
+
apps: Array<{
|
|
378
|
+
app: string;
|
|
379
|
+
deleted: boolean;
|
|
380
|
+
}>;
|
|
381
|
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AC;IACtD,aAAa,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD,CAAC,CAqID;AAED;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,IAAI,EAAE,YAAY,EAClB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,GAAE,OAAoC,GACzC,OAAO,CAAC;IAAE,QAAQ,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAgC7G"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fly Op activities — resolved by the core activity registry when a project's
|
|
3
|
+
* `chant.config.ts` lists the `fly` lexicon. Contributes the native flaps
|
|
4
|
+
* applier (`flyApply`), which speaks the Fly Machines REST API directly (no
|
|
5
|
+
* flyctl, no state file), and the mudflaps emulator lifecycle it is tested
|
|
6
|
+
* against.
|
|
7
|
+
*/
|
|
8
|
+
export { flyApply, flyDelete, applyApp, applyMachine, destroyMachine, deleteApp, listMachines, pruneMachines, waitForMachine, acquireLease, releaseLease, withLease, resolveEndpoint, parsePlan, isAppRequest, isMachineRequest, machineAppSegment, resolveApp, appNameFromRequest, isChantOwned, configEqual, isLeaseConflict, defaultFlyHttp, DEFAULT_FLAPS_BASE_URL, LEASE_NONCE_HEADER, } from "./fly-apply.js";
|
|
9
|
+
export type { FlyApplyArgs, FlyPlan, FlapsRequest, FlapsMachine, FlyHttp, WaitOpts, ApplyCtx } from "./fly-apply.js";
|
|
10
|
+
export { flapsUp, flapsDown, flapsRunCommand, flapsRmCommand, flapsExistsCommand, flapsHealthUrl, flapsEndpoint, } from "./flaps.js";
|
|
11
|
+
export type { FlapsUpArgs, FlapsDownArgs } from "./flaps.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/activities/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,eAAe,EACf,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIlH,OAAO,EACL,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The fly lexicon's ownership convention (#743, decision D2), declared here so
|
|
3
|
+
* core carries no fly-specific branch — the #686 seam: each lexicon owns its key
|
|
4
|
+
* names; core keeps only the generic stamp/detect logic
|
|
5
|
+
* (@intentius/chant/ownership), the same way aws declares `AWS_TAG_OWNERSHIP_KEYS`
|
|
6
|
+
* and azure `AZURE_TAG_OWNERSHIP_KEYS`.
|
|
7
|
+
*
|
|
8
|
+
* The convention is two-tier, because flaps resources differ in what they can
|
|
9
|
+
* carry:
|
|
10
|
+
*
|
|
11
|
+
* 1. Primary marker — machine `config.metadata`. Machines carry a flat
|
|
12
|
+
* `Record<string, string>`, so chant stamps `managed-by: chant` (+ stack/env)
|
|
13
|
+
* there. This is the k8s-label / AWS-tag analogue and the basis for
|
|
14
|
+
* owned-only machine prune (a metadata filter — a foreign machine survives).
|
|
15
|
+
* The serializer stamps it (see serializer.ts); the applier reads it via
|
|
16
|
+
* `isChantOwned` → core `hasOwnershipMarker(..., FLY_METADATA_OWNERSHIP_KEYS)`.
|
|
17
|
+
*
|
|
18
|
+
* 2. Secondary boundary — the app. Volumes, secrets, certs, and IPs carry no
|
|
19
|
+
* arbitrary metadata, so for them the Fly app is the ownership boundary
|
|
20
|
+
* (like a CloudFormation stack): chant owns the app's declared-type
|
|
21
|
+
* resources and prunes owned orphans within app scope. See the app-scoped
|
|
22
|
+
* prune block in op/activities/fly-apply.ts for the limitation this leaves.
|
|
23
|
+
*/
|
|
24
|
+
import type { ChannelKeys } from "@intentius/chant/ownership";
|
|
25
|
+
/** Machine `config.metadata` keys for chant's ownership markers (tier 1, D2). */
|
|
26
|
+
export declare const FLY_METADATA_OWNERSHIP_KEYS: ChannelKeys;
|
|
27
|
+
//# sourceMappingURL=ownership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership.d.ts","sourceRoot":"","sources":["../src/ownership.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,EAAE,WAIzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-cli.d.ts","sourceRoot":"","sources":["../src/package-cli.ts"],"names":[],"mappings":""}
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAkD,MAAM,0BAA0B,CAAC;AAiB9G;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,aAsQvB,CAAC"}
|
package/dist/pseudo.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PseudoParameter } from "@intentius/chant/pseudo-parameter";
|
|
2
|
+
export { PseudoParameter };
|
|
3
|
+
/**
|
|
4
|
+
* Fly pseudo-parameters — environment-resolved values a project references
|
|
5
|
+
* without hard-coding. Each serializes to a `{ Ref: "Fly::..." }` marker that
|
|
6
|
+
* the serializer resolves from an environment variable at build time (see
|
|
7
|
+
* PSEUDO_ENV_MAP in ./serializer.ts), mirroring gcp's `GCP.Region` /
|
|
8
|
+
* `GCP.ProjectId`.
|
|
9
|
+
*
|
|
10
|
+
* - Region → the target Fly region (FLY_REGION), e.g. `iad`.
|
|
11
|
+
* - OrgSlug → the owning org slug (FLY_ORG / FLY_ORG_SLUG).
|
|
12
|
+
* - AppName → the target app name (FLY_APP_NAME).
|
|
13
|
+
*/
|
|
14
|
+
export declare const Region: PseudoParameter, OrgSlug: PseudoParameter, AppName: PseudoParameter;
|
|
15
|
+
/**
|
|
16
|
+
* Fly namespace containing all pseudo-parameters.
|
|
17
|
+
*/
|
|
18
|
+
export declare const Fly: {
|
|
19
|
+
readonly Region: PseudoParameter;
|
|
20
|
+
readonly OrgSlug: PseudoParameter;
|
|
21
|
+
readonly AppName: PseudoParameter;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=pseudo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pseudo.d.ts","sourceRoot":"","sources":["../src/pseudo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA0B,MAAM,mCAAmC,CAAC;AAE5F,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,eAAO,MAAQ,MAAM,mBAAE,OAAO,mBAAE,OAAO,iBAIrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,GAAG;;;;CAIN,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fly (Machines API / "flaps") serializer.
|
|
3
|
+
*
|
|
4
|
+
* Turns declared `App`, `Machine`, `Volume`, `IPAddress`, `Certificate`, and
|
|
5
|
+
* `Secret` resources into the JSON create bodies the flaps REST API accepts, so
|
|
6
|
+
* #739's applier can POST them straight through and mudflaps (#740) can
|
|
7
|
+
* round-trip them.
|
|
8
|
+
*
|
|
9
|
+
* Output shape — a JSON object keyed by entity name. Each value is a single
|
|
10
|
+
* flaps request:
|
|
11
|
+
*
|
|
12
|
+
* {
|
|
13
|
+
* "<entityName>": {
|
|
14
|
+
* "endpoint": "/v1/apps", // or /v1/apps/{app}/machines
|
|
15
|
+
* "method": "POST",
|
|
16
|
+
* "body": { ... } // the create body
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
*
|
|
20
|
+
* Field names are taken from mudflaps' Go structs (the wire oracle), which win
|
|
21
|
+
* over the OpenAPI-generated TypeScript names:
|
|
22
|
+
* - App → CreateAppRequest `{ app_name, org_slug? }` (NOT `name`).
|
|
23
|
+
* - Machine→ CreateMachineRequest `{ name?, region?, config?, skip_launch? }`;
|
|
24
|
+
* `config` is the full MachineConfig. The owning app is a URL path segment,
|
|
25
|
+
* not a body field, so it lands in `endpoint`.
|
|
26
|
+
*
|
|
27
|
+
* D2: every serialized Machine carries the `managed-by: chant` ownership marker
|
|
28
|
+
* (plus the stack/env identity from `context.ownership`) merged into
|
|
29
|
+
* `config.metadata`, even when the user supplied no metadata.
|
|
30
|
+
*/
|
|
31
|
+
import type { Serializer } from "@intentius/chant/serializer";
|
|
32
|
+
/**
|
|
33
|
+
* fly flaps serializer.
|
|
34
|
+
*/
|
|
35
|
+
export declare const flySerializer: Serializer;
|
|
36
|
+
//# sourceMappingURL=serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serializer.d.ts","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAoB,MAAM,6BAA6B,CAAC;AAmHhF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,UA6I3B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch the flaps OpenAPI spec and return it as a Map<typeName, Buffer>
|
|
3
|
+
* compatible with the generatePipeline fetchSchemas callback.
|
|
4
|
+
*
|
|
5
|
+
* The flaps spec is a single document, so we return a single entry keyed by
|
|
6
|
+
* "Fly::OpenAPI" — the parse step splits it into the curated resources and
|
|
7
|
+
* their reachable property types.
|
|
8
|
+
*/
|
|
9
|
+
export declare function fetchSchemas(options?: {
|
|
10
|
+
force?: boolean;
|
|
11
|
+
}): Promise<Map<string, Buffer>>;
|
|
12
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/spec/fetch.ts"],"names":[],"mappings":"AAsBA;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAG9F"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fly Machines API OpenAPI 3.0.1 parser.
|
|
3
|
+
*
|
|
4
|
+
* The flaps spec has no resource marker and is mostly request/response DTOs,
|
|
5
|
+
* so we generate a curated set of resources rather than every schema. Each
|
|
6
|
+
* curated resource pairs a request schema (writable authoring surface) with a
|
|
7
|
+
* response schema (read-only attributes). The property types reachable from the
|
|
8
|
+
* request schemas — notably the fly.MachineConfig graph — are emitted as
|
|
9
|
+
* standalone property-type classes so `config` is fully typed.
|
|
10
|
+
*/
|
|
11
|
+
import { type PropertyConstraints } from "@intentius/chant/codegen/json-schema";
|
|
12
|
+
export type { PropertyConstraints };
|
|
13
|
+
export interface ParsedProperty {
|
|
14
|
+
name: string;
|
|
15
|
+
tsType: string;
|
|
16
|
+
required: boolean;
|
|
17
|
+
description?: string;
|
|
18
|
+
constraints: PropertyConstraints;
|
|
19
|
+
}
|
|
20
|
+
export interface ParsedResource {
|
|
21
|
+
typeName: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
properties: ParsedProperty[];
|
|
24
|
+
attributes: Array<{
|
|
25
|
+
name: string;
|
|
26
|
+
tsType: string;
|
|
27
|
+
}>;
|
|
28
|
+
}
|
|
29
|
+
export interface FlyParseResult {
|
|
30
|
+
resource: ParsedResource;
|
|
31
|
+
/** Always empty — fly emits property types as standalone results. */
|
|
32
|
+
propertyTypes: Array<{
|
|
33
|
+
name: string;
|
|
34
|
+
defType: string;
|
|
35
|
+
}>;
|
|
36
|
+
/** Always empty — enums are inlined as string-literal unions. */
|
|
37
|
+
enums: Array<{
|
|
38
|
+
name: string;
|
|
39
|
+
values: string[];
|
|
40
|
+
}>;
|
|
41
|
+
/** Whether this entity is a property type (nested config shape). */
|
|
42
|
+
isProperty?: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse the flaps OpenAPI spec into the curated resources and the property
|
|
46
|
+
* types reachable from their request schemas.
|
|
47
|
+
*/
|
|
48
|
+
export declare function parseFlyOpenAPI(data: string | Buffer): FlyParseResult[];
|
|
49
|
+
/**
|
|
50
|
+
* Convert a schema name into a PascalCase class-name segment.
|
|
51
|
+
* "fly.MachineConfig" → "MachineConfig", "fly.dnsOption" → "DnsOption".
|
|
52
|
+
*/
|
|
53
|
+
export declare function schemaToClassName(schemaName: string): string;
|
|
54
|
+
/** Extract short name: "Fly::Machines::Machine" → "Machine". */
|
|
55
|
+
export declare function flyShortName(typeName: string): string;
|
|
56
|
+
/** Extract service name: "Fly::Machines::Machine" → "Machines". */
|
|
57
|
+
export declare function flyServiceName(typeName: string): string;
|
|
58
|
+
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/spec/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,sCAAsC,CAAC;AAI9C,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,UAAU,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,cAAc,CAAC;IACzB,qEAAqE;IACrE,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,iEAAiE;IACjE,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACjD,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAuCD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,EAAE,CAyEvE;AA6ID;;;GA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