@intentius/chant-lexicon-render 0.53.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 +89 -0
- package/dist/catalog.d.ts +100 -0
- package/dist/catalog.d.ts.map +1 -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 +21 -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 +12 -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/render-deploy.d.ts +88 -0
- package/dist/composites/render-deploy.d.ts.map +1 -0
- package/dist/coverage.d.ts +15 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/describe-resources.d.ts +60 -0
- package/dist/describe-resources.d.ts.map +1 -0
- package/dist/detect.d.ts +12 -0
- package/dist/detect.d.ts.map +1 -0
- package/dist/generated/index.d.ts +38 -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/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/integrity.json +18 -0
- package/dist/lint/audit-catalog.d.ts +13 -0
- package/dist/lint/audit-catalog.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/post-synth/ren010-native-runtime-requires-commands.d.ts +12 -0
- package/dist/lint/post-synth/ren010-native-runtime-requires-commands.d.ts.map +1 -0
- package/dist/lint/post-synth/ren011-service-requires-source.d.ts +12 -0
- package/dist/lint/post-synth/ren011-service-requires-source.d.ts.map +1 -0
- package/dist/lint/post-synth/ren012-free-plan-cannot-scale.d.ts +11 -0
- package/dist/lint/post-synth/ren012-free-plan-cannot-scale.d.ts.map +1 -0
- package/dist/lint/post-synth/render-helpers.d.ts +19 -0
- package/dist/lint/post-synth/render-helpers.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-cron-schedule.d.ts +12 -0
- package/dist/lint/rules/valid-cron-schedule.d.ts.map +1 -0
- package/dist/lint/rules/valid-region.d.ts +16 -0
- package/dist/lint/rules/valid-region.d.ts.map +1 -0
- package/dist/lsp/completions.d.ts +8 -0
- package/dist/lsp/completions.d.ts.map +1 -0
- package/dist/lsp/hover.d.ts +6 -0
- package/dist/lsp/hover.d.ts.map +1 -0
- package/dist/manifest.json +6 -0
- package/dist/meta.json +304 -0
- package/dist/okf/index.md +29 -0
- package/dist/okf/rules/REN001.md +11 -0
- package/dist/okf/rules/REN002.md +15 -0
- package/dist/okf/rules/REN003.md +15 -0
- package/dist/okf/rules/REN010.md +11 -0
- package/dist/okf/rules/REN011.md +11 -0
- package/dist/okf/rules/REN012.md +11 -0
- package/dist/okf/types/BackgroundWorker.md +24 -0
- package/dist/okf/types/CronJob.md +28 -0
- package/dist/okf/types/CustomDomain.md +14 -0
- package/dist/okf/types/Disk.md +16 -0
- package/dist/okf/types/EnvGroup.md +22 -0
- package/dist/okf/types/Environment.md +17 -0
- package/dist/okf/types/KeyValue.md +20 -0
- package/dist/okf/types/Postgres.md +29 -0
- package/dist/okf/types/PrivateService.md +24 -0
- package/dist/okf/types/Project.md +15 -0
- package/dist/okf/types/RegistryCredential.md +17 -0
- package/dist/okf/types/StaticSite.md +24 -0
- package/dist/okf/types/WebService.md +24 -0
- package/dist/okf/types/Webhook.md +17 -0
- package/dist/op/activities/fake-render.d.ts +52 -0
- package/dist/op/activities/fake-render.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +10 -0
- package/dist/op/activities/index.d.ts.map +1 -0
- package/dist/op/activities/render-apply.d.ts +229 -0
- package/dist/op/activities/render-apply.d.ts.map +1 -0
- package/dist/ownership.d.ts +32 -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 +21 -0
- package/dist/pseudo.d.ts.map +1 -0
- package/dist/rules/no-secret-literals.ts +73 -0
- package/dist/rules/ren010-native-runtime-requires-commands.ts +47 -0
- package/dist/rules/ren011-service-requires-source.ts +50 -0
- package/dist/rules/ren012-free-plan-cannot-scale.ts +43 -0
- package/dist/rules/render-helpers.ts +38 -0
- package/dist/rules/valid-cron-schedule.ts +51 -0
- package/dist/rules/valid-region.ts +49 -0
- package/dist/serializer.d.ts +99 -0
- package/dist/serializer.d.ts.map +1 -0
- package/dist/skills/chant-render-patterns.md +126 -0
- package/dist/skills/chant-render.md +112 -0
- package/dist/spec/fetch.d.ts +21 -0
- package/dist/spec/fetch.d.ts.map +1 -0
- package/dist/spec/parse.d.ts +120 -0
- package/dist/spec/parse.d.ts.map +1 -0
- package/dist/types/index.d.ts +573 -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 +73 -0
- package/src/catalog.ts +286 -0
- package/src/codegen/docs-cli.ts +7 -0
- package/src/codegen/docs.ts +120 -0
- package/src/codegen/generate-cli.ts +36 -0
- package/src/codegen/generate-lexicon.ts +52 -0
- package/src/codegen/generate-typescript.ts +70 -0
- package/src/codegen/generate.ts +106 -0
- package/src/codegen/naming.ts +55 -0
- package/src/codegen/package.ts +30 -0
- package/src/composites/render-deploy.ts +133 -0
- package/src/coverage.ts +49 -0
- package/src/describe-resources.test.ts +143 -0
- package/src/describe-resources.ts +366 -0
- package/src/detect.ts +29 -0
- package/src/generated/index.d.ts +573 -0
- package/src/generated/index.ts +43 -0
- package/src/generated/lexicon-render.json +304 -0
- package/src/generated/runtime.ts +4 -0
- package/src/index.ts +30 -0
- package/src/lint/audit-catalog.ts +47 -0
- package/src/lint/post-synth/index.ts +11 -0
- package/src/lint/post-synth/post-synth.test.ts +151 -0
- package/src/lint/post-synth/ren010-native-runtime-requires-commands.ts +47 -0
- package/src/lint/post-synth/ren011-service-requires-source.ts +50 -0
- package/src/lint/post-synth/ren012-free-plan-cannot-scale.ts +43 -0
- package/src/lint/post-synth/render-helpers.ts +38 -0
- package/src/lint/rules/index.ts +11 -0
- package/src/lint/rules/no-secret-literals.ts +73 -0
- package/src/lint/rules/rules.test.ts +73 -0
- package/src/lint/rules/valid-cron-schedule.ts +51 -0
- package/src/lint/rules/valid-region.ts +49 -0
- package/src/lsp/completions.test.ts +28 -0
- package/src/lsp/completions.ts +22 -0
- package/src/lsp/hover.test.ts +32 -0
- package/src/lsp/hover.ts +50 -0
- package/src/op/activities/fake-render.ts +275 -0
- package/src/op/activities/index.ts +51 -0
- package/src/op/activities/render-apply.test.ts +403 -0
- package/src/op/activities/render-apply.ts +1042 -0
- package/src/ownership.ts +44 -0
- package/src/package-cli.ts +23 -0
- package/src/plugin.test.ts +54 -0
- package/src/plugin.ts +258 -0
- package/src/pseudo.ts +26 -0
- package/src/serializer.test.ts +221 -0
- package/src/serializer.ts +286 -0
- package/src/skills/chant-render-patterns.md +126 -0
- package/src/skills/chant-render.md +112 -0
- package/src/spec/fetch.ts +33 -0
- package/src/spec/parse.ts +721 -0
- package/src/validate-cli.ts +5 -0
- package/src/validate.ts +47 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# @intentius/chant-lexicon-render
|
|
2
|
+
|
|
3
|
+
The Render lexicon for [chant](https://intentius.io/chant/). Declare Render web services, static sites, private services, background workers, cron jobs, Postgres and Key Value datastores, env groups, projects, environments, disks, custom domains, registry credentials, and webhooks as typed TypeScript and apply them straight to the Render Public API.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install --save-dev @intentius/chant @intentius/chant-lexicon-render
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
chant is a type system for operations: you describe infrastructure as typed TypeScript, and each lexicon turns those declarations into real provider API calls. This one covers [Render](https://render.com).
|
|
12
|
+
|
|
13
|
+
The resource types are generated from Render's own [Public API OpenAPI spec](https://api-docs.render.com/v1.0/openapi/render-public-api-1.json), so they track the real API and give you full editor autocomplete — every `plan`, `region`, and `runtime` is a string-literal union, and `serviceDetails` is typed per service type. A build step lints them, and `renderApply` reconciles them against a workspace over `https://api.render.com/v1` directly.
|
|
14
|
+
|
|
15
|
+
It fits two kinds of user: teams running on Render who want their infrastructure as typed, reviewed, reconciled code rather than a `render.yaml` Blueprint or dashboard clicks, and platform engineers who already manage AWS, GCP, Kubernetes, or Fly through chant and want Render in the same model.
|
|
16
|
+
|
|
17
|
+
## Author infrastructure as typed code
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
WebService, WebServiceDetails, NativeEnvironmentDetails, EnvVar, GeneratedEnvVar, Postgres, Render,
|
|
22
|
+
} from "@intentius/chant-lexicon-render";
|
|
23
|
+
|
|
24
|
+
export const db = new Postgres({ name: "app-db", plan: "free", version: "16", region: Render.Region });
|
|
25
|
+
|
|
26
|
+
export const web = new WebService({
|
|
27
|
+
name: "app-web",
|
|
28
|
+
repo: "https://github.com/render-examples/express-hello-world",
|
|
29
|
+
serviceDetails: new WebServiceDetails({
|
|
30
|
+
runtime: "node",
|
|
31
|
+
plan: "starter",
|
|
32
|
+
region: Render.Region,
|
|
33
|
+
envSpecificDetails: new NativeEnvironmentDetails({ buildCommand: "npm ci", startCommand: "npm start" }),
|
|
34
|
+
}),
|
|
35
|
+
envVars: [
|
|
36
|
+
new EnvVar({ key: "DATABASE_URL", value: db.internalConnectionString }),
|
|
37
|
+
new GeneratedEnvVar({ key: "SESSION_SECRET", generateValue: true }),
|
|
38
|
+
],
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Each service type is its own class (`WebService`, `StaticSite`, `PrivateService`, `BackgroundWorker`, `CronJob`) with `serviceDetails` narrowed to that type's shape. Cross-resource ids accept the declared resource — `serviceId: web`, `projectId: project`, `environmentId: env` — and attribute reads like `db.internalConnectionString` resolve from the live resource at apply time. `Render.OwnerId` and `Render.Region` are pseudo-parameters resolved from `RENDER_OWNER_ID` / `RENDER_REGION`.
|
|
43
|
+
|
|
44
|
+
## Apply without a state file
|
|
45
|
+
|
|
46
|
+
`renderApply` speaks the Public API directly. There is no CLI shell-out, no Blueprint sync, and no state file to store, lock, or keep in sync. It reconciles what you declared against what is actually running:
|
|
47
|
+
|
|
48
|
+
- Finds each resource by name (services also by type), `POST`s a create when absent or `PATCH`es the differing fields when present, and replaces service env vars through `PUT /services/{id}/env-vars` — keeping a `generateValue` var's live value rather than regenerating it.
|
|
49
|
+
- Resolves references in dependency order: projects → environments → env groups and datastores → services → disks and custom domains → webhooks.
|
|
50
|
+
- Waits each created service's first deploy to `live`, and fails on `build_failed` / `update_failed`.
|
|
51
|
+
- Prunes only what chant owns. Every service and env group chant creates carries a `CHANT_MANAGED_BY=chant` env-var marker (plus `CHANT_STACK` / `CHANT_ENV`); disks and custom domains inherit their service's verdict. A resource without the marker — or belonging to another stack — is never modified or deleted by `prune`, so the applier is safe to point at a workspace that also holds resources you manage elsewhere. Datastores, projects, environments, registry credentials, and webhooks have no marker channel and are never pruned — remove those with `renderDelete`.
|
|
52
|
+
|
|
53
|
+
Auth is `RENDER_API_KEY`; the workspace is `RENDER_OWNER_ID`, or the sole workspace the key can see. `RENDER_API_BASE_URL` (or an `endpoint` arg) redirects the whole loop to a local stand-in.
|
|
54
|
+
|
|
55
|
+
## Catch mistakes at build time
|
|
56
|
+
|
|
57
|
+
Lint rules run during `chant build`, before anything reaches the API:
|
|
58
|
+
|
|
59
|
+
- `region` must be a Render region (REN001).
|
|
60
|
+
- A secret-looking env var may not carry a literal value — use `generateValue`, an `EnvGroup`, a resource attribute, or `process.env` (REN002).
|
|
61
|
+
- A cron job `schedule` must be a five-field cron expression (REN003).
|
|
62
|
+
- A native-runtime service must set `buildCommand` and `startCommand` (REN010); every service needs a `repo` or an `image` (REN011); a free-plan service cannot scale or mount a disk (REN012).
|
|
63
|
+
|
|
64
|
+
## Read back and plan
|
|
65
|
+
|
|
66
|
+
`describeResources` lists what is live for every declared entity with an ownership verdict — `owned` / `foreign` for services and env groups by the marker, inherited by their disks and custom domains, `unknown` for the rest — and surfaces undeclared chant-owned services, env groups, disks, and domains as owned orphans, so `chant lifecycle plan` shows the delete before you prune.
|
|
67
|
+
|
|
68
|
+
## The deploy Op
|
|
69
|
+
|
|
70
|
+
`renderDeploy()` returns a `build → renderApply [→ verify] [→ teardown]` Op, and the runnable [`examples/getting-started`](examples/getting-started) starter wires it up:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cd lexicons/render/examples/getting-started
|
|
74
|
+
export RENDER_API_KEY=… RENDER_OWNER_ID=…
|
|
75
|
+
chant run render
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Compared to a Blueprint (`render.yaml`)
|
|
79
|
+
|
|
80
|
+
| | Blueprint | This lexicon |
|
|
81
|
+
| ------------ | -------------------------------------------- | --------------------------------------------------------------- |
|
|
82
|
+
| **Language** | YAML, validated at sync time | TypeScript, types generated from the Public API spec, linted at build |
|
|
83
|
+
| **Apply** | Render syncs from the repo on push | `renderApply` from anywhere with an API key — CI, a laptop, an agent |
|
|
84
|
+
| **State** | Render's own; resources tied to the Blueprint | None; reconciles by name from live state + the ownership marker |
|
|
85
|
+
| **References** | `fromDatabase` / `fromService` YAML keys | `db.internalConnectionString`, `serviceId: web` — typed, checked |
|
|
86
|
+
|
|
87
|
+
## Agent skill
|
|
88
|
+
|
|
89
|
+
The agent-facing entry point is the `chant-render` skill: a short operational playbook that walks an agent through authoring a service and a database, linting with `chant build`, and reconciling over the Public API with `renderApply`, including credentials and the workspace. It ships with `chant-render-patterns` (env groups, projects and environments, disks, custom domains, image-backed and cron services, and the ownership model). The skill sources live in [`src/skills/`](src/skills/).
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Render resource catalog — the one place that knows, per chant entity
|
|
3
|
+
* type, which REST collection it lives in, how it is identified, and how it is
|
|
4
|
+
* ordered against its neighbours. The serializer, the applier, the observation
|
|
5
|
+
* seam, and the lint rules all read this table so the four cannot drift apart
|
|
6
|
+
* on a resource's wire shape.
|
|
7
|
+
*
|
|
8
|
+
* Render's Public API is a plain REST surface (`https://api.render.com/v1`):
|
|
9
|
+
* - collections are `POST /services`, `POST /postgres`, ...; children of a
|
|
10
|
+
* service are `POST /services/{serviceId}/custom-domains`;
|
|
11
|
+
* - a resource is identified by an opaque id (`srv-…`, `dpg-…`) Render
|
|
12
|
+
* assigns on create; the *name* is the human key chant reconciles by, and
|
|
13
|
+
* is unique per workspace for services (Render enforces it) and, in
|
|
14
|
+
* practice, for the rest of what chant declares;
|
|
15
|
+
* - lists paginate by cursor and filter by `name` + `ownerId`;
|
|
16
|
+
* - updates are `PATCH` with the resource's PATCH DTO — a strict subset of
|
|
17
|
+
* the POST body (`ownerId`, `type`, `envVars` and friends are excluded).
|
|
18
|
+
*/
|
|
19
|
+
export declare const ENTITY_TYPES: {
|
|
20
|
+
readonly webService: "Render::Services::WebService";
|
|
21
|
+
readonly staticSite: "Render::Services::StaticSite";
|
|
22
|
+
readonly privateService: "Render::Services::PrivateService";
|
|
23
|
+
readonly backgroundWorker: "Render::Services::BackgroundWorker";
|
|
24
|
+
readonly cronJob: "Render::Services::CronJob";
|
|
25
|
+
readonly postgres: "Render::Datastores::Postgres";
|
|
26
|
+
readonly keyValue: "Render::Datastores::KeyValue";
|
|
27
|
+
readonly envGroup: "Render::Config::EnvGroup";
|
|
28
|
+
readonly registryCredential: "Render::Config::RegistryCredential";
|
|
29
|
+
readonly webhook: "Render::Config::Webhook";
|
|
30
|
+
readonly project: "Render::Projects::Project";
|
|
31
|
+
readonly environment: "Render::Projects::Environment";
|
|
32
|
+
readonly disk: "Render::Services::Disk";
|
|
33
|
+
readonly customDomain: "Render::Services::CustomDomain";
|
|
34
|
+
};
|
|
35
|
+
export type EntityType = (typeof ENTITY_TYPES)[keyof typeof ENTITY_TYPES];
|
|
36
|
+
/** The five service entity types (share `POST /services`). */
|
|
37
|
+
export declare const SERVICE_ENTITY_TYPES: readonly string[];
|
|
38
|
+
/** Service entity type → the `type` discriminator `POST /services` takes. */
|
|
39
|
+
export declare const SERVICE_TYPE_OF: Record<string, string>;
|
|
40
|
+
/** The reverse: a live service's `type` → chant entity type. */
|
|
41
|
+
export declare const ENTITY_TYPE_OF_SERVICE: Record<string, string>;
|
|
42
|
+
export declare function isServiceEntityType(entityType: string | undefined): boolean;
|
|
43
|
+
/** How one resource kind maps onto the REST API. */
|
|
44
|
+
export interface CatalogEntry {
|
|
45
|
+
/** Short kind name — the generated class name (`WebService`, `Postgres`). */
|
|
46
|
+
kind: string;
|
|
47
|
+
/**
|
|
48
|
+
* The create collection. May carry a `{serviceId}` placeholder that the
|
|
49
|
+
* serializer fills from the resource's `serviceId` prop (a literal id, or a
|
|
50
|
+
* `{ $ref }` the applier resolves before issuing the request).
|
|
51
|
+
*/
|
|
52
|
+
collection: string;
|
|
53
|
+
/**
|
|
54
|
+
* The key in each element of the list envelope: `GET /services` returns
|
|
55
|
+
* `[{ service: {...}, cursor }]`. `null` for lists that return bare objects.
|
|
56
|
+
*/
|
|
57
|
+
listKey: string | null;
|
|
58
|
+
/** Whether the list endpoint accepts `?name=` and `?ownerId=` filters. */
|
|
59
|
+
filters: {
|
|
60
|
+
name: boolean;
|
|
61
|
+
ownerId: boolean;
|
|
62
|
+
};
|
|
63
|
+
/** Whether the API offers `PATCH /{collection}/{id}` for updates. */
|
|
64
|
+
patchable: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The body fields the PATCH DTO accepts. Fields outside this set are
|
|
67
|
+
* create-only (or apply through a side endpoint — env vars) and are excluded
|
|
68
|
+
* from the diff so a rename of `ownerId` never proposes an impossible update.
|
|
69
|
+
*/
|
|
70
|
+
patchFields: readonly string[];
|
|
71
|
+
/** Whether the resource carries chant's env-var ownership marker. */
|
|
72
|
+
marked: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The ownership boundary for a kind with no marker of its own. `"service"`:
|
|
75
|
+
* the resource hangs off a service (`serviceId`), and inherits that service's
|
|
76
|
+
* verdict — a disk or custom domain under a chant-owned service is chant's,
|
|
77
|
+
* the same way fly treats volumes and IPs at the app boundary. Absent: no
|
|
78
|
+
* boundary either; the verdict is `unknown` and the kind is never pruned.
|
|
79
|
+
*/
|
|
80
|
+
boundary?: "service";
|
|
81
|
+
/**
|
|
82
|
+
* Whether the create body takes an `ownerId` (workspace). When it does and
|
|
83
|
+
* the author omitted it, the serializer fills it from `Render.OwnerId`.
|
|
84
|
+
*/
|
|
85
|
+
ownerScoped: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Apply ordering. Lower applies first; delete runs in reverse. Projects
|
|
88
|
+
* before environments before everything that can join one; services before
|
|
89
|
+
* the disks/domains that hang off them.
|
|
90
|
+
*/
|
|
91
|
+
order: number;
|
|
92
|
+
/** Chant-side props that are association hints, not body fields. */
|
|
93
|
+
nonBodyProps: readonly string[];
|
|
94
|
+
}
|
|
95
|
+
export declare const CATALOG: Record<string, CatalogEntry>;
|
|
96
|
+
/** Look up a catalog entry, or throw — an unknown entity type is a lexicon bug, not user error. */
|
|
97
|
+
export declare function catalogEntry(entityType: string): CatalogEntry;
|
|
98
|
+
/** Entity type ← short kind (`WebService` → `Render::Services::WebService`). */
|
|
99
|
+
export declare function entityTypeOfKind(kind: string): string | undefined;
|
|
100
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;CAef,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAE1E,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAMjD,CAAC;AAEF,6EAA6E;AAC7E,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMlD,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAEzD,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE3E;AAID,oDAAoD;AACpD,MAAM,WAAW,YAAY;IAC3B,6EAA6E;IAC7E,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,0EAA0E;IAC1E,OAAO,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC7C,qEAAqE;IACrE,SAAS,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,qEAAqE;IACrE,MAAM,EAAE,OAAO,CAAC;IAChB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AA4BD,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA6HhD,CAAC;AAEF,mGAAmG;AACnG,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAI7D;AAED,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKjE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-cli.d.ts","sourceRoot":"","sources":["../../src/codegen/docs-cli.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* render documentation generator.
|
|
3
|
+
*
|
|
4
|
+
* Calls the core docsPipeline with render-specific config: service grouping and
|
|
5
|
+
* overview content. Produces a standalone Starlight docs site at
|
|
6
|
+
* lexicons/render/docs/, like the fly and gcp lexicons.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Group a render resource type into a bucket for the reference sidebar. Type
|
|
10
|
+
* names are `Render::<Group>::<Kind>`; the middle segment is the group
|
|
11
|
+
* (Services, Datastores, Config, Projects). Property types are all filed under
|
|
12
|
+
* Services by the generator; keep them there.
|
|
13
|
+
*/
|
|
14
|
+
export declare function serviceFromType(resourceType: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Generate documentation for the render lexicon.
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateDocs(options?: {
|
|
19
|
+
verbose?: boolean;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE5D;AAwED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBjF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-cli.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-cli.ts"],"names":[],"mappings":";AACA;;GAEG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lexicon JSON generator — produces lexicon-render.json with metadata for the
|
|
3
|
+
* render resource and property types.
|
|
4
|
+
*/
|
|
5
|
+
import type { PropertyConstraints } from "@intentius/chant/codegen/json-schema";
|
|
6
|
+
import type { RenderParseResult } from "../spec/parse.js";
|
|
7
|
+
import type { NamingStrategy } from "./naming.js";
|
|
8
|
+
export interface RenderLexiconEntry {
|
|
9
|
+
resourceType: string;
|
|
10
|
+
kind: "resource" | "property";
|
|
11
|
+
lexicon: "render";
|
|
12
|
+
constraints?: Record<string, PropertyConstraints>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Generate the lexicon-render.json content.
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateLexiconJSON(results: RenderParseResult[], naming: NamingStrategy): string;
|
|
18
|
+
//# sourceMappingURL=generate-lexicon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-lexicon.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-lexicon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,UAAU,GAAG,UAAU,CAAC;IAC9B,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CA8BhG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript declaration file generator — produces index.d.ts with the render
|
|
3
|
+
* resource classes (WebService, Postgres, EnvGroup, ...) and their
|
|
4
|
+
* property-type classes.
|
|
5
|
+
*/
|
|
6
|
+
import type { RenderParseResult } from "../spec/parse.js";
|
|
7
|
+
import type { NamingStrategy } from "./naming.js";
|
|
8
|
+
/**
|
|
9
|
+
* Generate the complete .d.ts file content.
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateTypeScriptDeclarations(results: RenderParseResult[], naming: NamingStrategy): string;
|
|
12
|
+
//# sourceMappingURL=generate-typescript.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-typescript.d.ts","sourceRoot":"","sources":["../../src/codegen/generate-typescript.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAe/C;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,CA4C3G"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render generation pipeline — uses core generatePipeline with render-specific
|
|
3
|
+
* fetch, parse, naming, and generation callbacks.
|
|
4
|
+
*/
|
|
5
|
+
import { type GenerateOptions, type GenerateResult } from "@intentius/chant/codegen/generate";
|
|
6
|
+
export type { GenerateResult };
|
|
7
|
+
/**
|
|
8
|
+
* Run the full render generation pipeline.
|
|
9
|
+
*/
|
|
10
|
+
export declare function generate(opts?: GenerateOptions): Promise<GenerateResult>;
|
|
11
|
+
/**
|
|
12
|
+
* Write generated artifacts to disk.
|
|
13
|
+
*/
|
|
14
|
+
export declare function writeGeneratedFiles(result: GenerateResult, baseDir: string): void;
|
|
15
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/codegen/generate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EAEpB,MAAM,mCAAmC,CAAC;AAY3C,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;GAEG;AACH,wBAAsB,QAAQ,CAAC,IAAI,GAAE,eAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAoClF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAUjF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Render naming strategy — maps Render::{Group}::{Kind} type names to
|
|
3
|
+
* user-friendly TypeScript class names.
|
|
4
|
+
*/
|
|
5
|
+
import { NamingStrategy as CoreNamingStrategy } from "@intentius/chant/codegen/naming";
|
|
6
|
+
import { type RenderParseResult } from "../spec/parse.js";
|
|
7
|
+
export { propertyTypeName, extractDefName } from "@intentius/chant/codegen/naming";
|
|
8
|
+
/**
|
|
9
|
+
* Render-specific naming strategy. Extends the core strategy with the render config.
|
|
10
|
+
*/
|
|
11
|
+
export declare class NamingStrategy extends CoreNamingStrategy {
|
|
12
|
+
constructor(results: RenderParseResult[]);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=naming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming.d.ts","sourceRoot":"","sources":["../../src/codegen/naming.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,cAAc,IAAI,kBAAkB,EAGrC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAsC,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE3F,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA+BnF;;GAEG;AACH,qBAAa,cAAe,SAAQ,kBAAkB;gBACxC,OAAO,EAAE,iBAAiB,EAAE;CAOzC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package the render lexicon for distribution.
|
|
3
|
+
*/
|
|
4
|
+
export declare function packageLexicon(options?: {
|
|
5
|
+
verbose?: boolean;
|
|
6
|
+
force?: boolean;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
spec: import("packages/core/src").BundleSpec;
|
|
9
|
+
stats: {
|
|
10
|
+
resources: number;
|
|
11
|
+
properties: number;
|
|
12
|
+
enums: number;
|
|
13
|
+
ruleCount: number;
|
|
14
|
+
skillCount: number;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=package.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/codegen/package.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE;;;;;;;;;GAmBpF"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* render deploy Op — `build → renderApply [→ verify]` on the local executor.
|
|
3
|
+
* The peer of `flyDeploy`, for a platform with no local emulator: it targets a
|
|
4
|
+
* real Render workspace with a `RENDER_API_KEY`.
|
|
5
|
+
*
|
|
6
|
+
* The phases compose modeled activities, no raw shell:
|
|
7
|
+
* Build run the project's `build:render` npm script → the serialized plan
|
|
8
|
+
* Apply `renderApply` the plan straight to the Render Public API (creates
|
|
9
|
+
* or PATCHes each resource by name, waits each created service's
|
|
10
|
+
* deploy to `live`, prunes owned-only when asked)
|
|
11
|
+
* Verify optional: GET a public URL and assert on its body
|
|
12
|
+
*
|
|
13
|
+
* The activity steps are the generic `activity(fn, args)` builder tagged with
|
|
14
|
+
* the exported activity function names the render lexicon contributes
|
|
15
|
+
* (`renderApply`/`renderDelete` from `src/op/activities`). The core activity
|
|
16
|
+
* registry resolves them by name when a project lists the `render` lexicon.
|
|
17
|
+
*/
|
|
18
|
+
import type { OpResource } from "@intentius/chant/op";
|
|
19
|
+
import type { ActivityStep } from "@intentius/chant/op";
|
|
20
|
+
/** Options for the render apply step (mirror `RenderApplyArgs`, minus `planPath`). */
|
|
21
|
+
export interface RenderApplyStepOpts {
|
|
22
|
+
/** API base URL override. Default: `RENDER_API_BASE_URL` env, else api.render.com. */
|
|
23
|
+
endpoint?: string;
|
|
24
|
+
/** Bearer token. Default: `RENDER_API_KEY`. */
|
|
25
|
+
token?: string;
|
|
26
|
+
/** Workspace id for `$owner` markers. Default: `RENDER_OWNER_ID`, else the sole visible owner. */
|
|
27
|
+
ownerId?: string;
|
|
28
|
+
/** Prune chant-owned services/env groups the plan no longer declares. Destructive — off by default. */
|
|
29
|
+
prune?: boolean;
|
|
30
|
+
/** Deploy wait tuning. */
|
|
31
|
+
wait?: Record<string, unknown>;
|
|
32
|
+
/** Activity profile override. */
|
|
33
|
+
profile?: ActivityStep["profile"];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Apply the serialized render plan straight to the Render Public API — the
|
|
37
|
+
* typed twin of `flyApplyStep`. Resolves to the `renderApply` activity.
|
|
38
|
+
* Defaults to the `longInfra` profile (a first deploy builds and can take
|
|
39
|
+
* minutes); override via `opts.profile`.
|
|
40
|
+
*/
|
|
41
|
+
export declare const renderApplyStep: (planPath: string, opts?: RenderApplyStepOpts) => ActivityStep;
|
|
42
|
+
/**
|
|
43
|
+
* Delete everything the plan declares, in reverse order — the teardown twin.
|
|
44
|
+
* Resolves to the `renderDelete` activity.
|
|
45
|
+
*/
|
|
46
|
+
export declare const renderDeleteStep: (planPath: string, opts?: RenderApplyStepOpts) => ActivityStep;
|
|
47
|
+
/** Options for {@link renderDeploy}. */
|
|
48
|
+
export interface RenderDeployOpts {
|
|
49
|
+
/** Op name (the `chant run <name>` target). Default: `render`. */
|
|
50
|
+
name?: string;
|
|
51
|
+
/** Op overview line. */
|
|
52
|
+
overview?: string;
|
|
53
|
+
/** Temporal task queue (unused by the local executor). Default: `local-render`. */
|
|
54
|
+
taskQueue?: string;
|
|
55
|
+
/** Directory the `build:render` script and plan path are relative to. Default: `.`. */
|
|
56
|
+
path?: string;
|
|
57
|
+
/** npm build script to run. Default: `build:render`. */
|
|
58
|
+
buildScript?: string;
|
|
59
|
+
/** Path to the serialized render plan the build writes. Default: `dist/render.json`. */
|
|
60
|
+
planPath?: string;
|
|
61
|
+
/** API base URL override (a local stand-in). Default: real Render via `RENDER_API_BASE_URL` / `RENDER_API_KEY`. */
|
|
62
|
+
endpoint?: string;
|
|
63
|
+
/** Workspace id. Default: `RENDER_OWNER_ID`, else the sole visible owner. */
|
|
64
|
+
ownerId?: string;
|
|
65
|
+
/** Prune declared-then-removed owned resources on apply. Off by default. */
|
|
66
|
+
prune?: boolean;
|
|
67
|
+
/** Deploy wait tuning passed through to `renderApply`. */
|
|
68
|
+
wait?: Record<string, unknown>;
|
|
69
|
+
/**
|
|
70
|
+
* A public URL to GET after apply, with the text it must contain. When set,
|
|
71
|
+
* the Op adds a Verify phase. Omitted → no Verify (the Apply step still
|
|
72
|
+
* waits each created service's deploy to `live`).
|
|
73
|
+
*/
|
|
74
|
+
verify?: {
|
|
75
|
+
url: string;
|
|
76
|
+
contains?: string;
|
|
77
|
+
retries?: number;
|
|
78
|
+
intervalMs?: number;
|
|
79
|
+
};
|
|
80
|
+
/** Add a Teardown phase that deletes what the plan declares. Off by default. */
|
|
81
|
+
teardown?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Build a render deploy Op: build the plan, apply it to the workspace, verify
|
|
85
|
+
* a URL when asked, tear down when asked. See the module docstring.
|
|
86
|
+
*/
|
|
87
|
+
export declare function renderDeploy(opts?: RenderDeployOpts): InstanceType<typeof OpResource>;
|
|
88
|
+
//# sourceMappingURL=render-deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render-deploy.d.ts","sourceRoot":"","sources":["../../src/composites/render-deploy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,sFAAsF;AACtF,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kGAAkG;IAClG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uGAAuG;IACvG,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,iCAAiC;IACjC,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CACnC;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,OAAO,mBAAmB,KAAG,YAG9E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,EAAE,OAAO,mBAAmB,KAAG,YAG/E,CAAC;AAEF,wCAAwC;AACxC,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mHAAmH;IACnH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnF,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,gBAAqB,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAsCzF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coverage analysis for the render lexicon — how much of the generated Render
|
|
3
|
+
* API surface the lexicon's typed resources cover. Thin wrapper over the shared
|
|
4
|
+
* `computeCoverage`, mirroring the fly/gcp peers.
|
|
5
|
+
*/
|
|
6
|
+
import { computeCoverage, overallPct, formatSummary, formatVerbose, checkThresholds, type CoverageReport, type CoverageThresholds } from "@intentius/chant/codegen/coverage";
|
|
7
|
+
export type { CoverageReport, CoverageThresholds };
|
|
8
|
+
export { computeCoverage, overallPct, formatSummary, formatVerbose, checkThresholds };
|
|
9
|
+
/** Run coverage analysis for the render lexicon. */
|
|
10
|
+
export declare function analyzeRenderCoverage(opts?: {
|
|
11
|
+
basePath?: string;
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
minOverall?: number;
|
|
14
|
+
}): Promise<CoverageReport>;
|
|
15
|
+
//# sourceMappingURL=coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coverage.d.ts","sourceRoot":"","sources":["../src/coverage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;AAEtF,oDAAoD;AACpD,wBAAsB,qBAAqB,CAAC,IAAI,CAAC,EAAE;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,cAAc,CAAC,CAqB1B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live introspection of Render resources — the read-back seam for chant's
|
|
3
|
+
* plan/drift machinery.
|
|
4
|
+
*
|
|
5
|
+
* The write path (renderApply) already GETs live state to decide
|
|
6
|
+
* create/update/unchanged and to prune owned orphans. This surfaces that same
|
|
7
|
+
* read side through the standard `describeResources` seam so core's change set
|
|
8
|
+
* and `chant lifecycle plan` can see live Render state and classify
|
|
9
|
+
* create/update/delete/adopt/noop.
|
|
10
|
+
*
|
|
11
|
+
* Peer of fly's describe-resources: list what is live, key it by chant entity
|
|
12
|
+
* name, attach an ownership verdict. Two-tier ownership, matching the applier:
|
|
13
|
+
*
|
|
14
|
+
* - Services and env groups carry the primary marker (`CHANT_MANAGED_BY`,
|
|
15
|
+
* RENDER_ENV_OWNERSHIP_KEYS) in their env vars, so their verdict is
|
|
16
|
+
* per-resource: `owned` when marked, else `foreign`.
|
|
17
|
+
* - Disks and custom domains carry no marker but hang off a service, so
|
|
18
|
+
* they inherit the parent's verdict (the service boundary — fly's app
|
|
19
|
+
* boundary, one level down); undeclared ones under an owned declared
|
|
20
|
+
* service surface as owned orphans.
|
|
21
|
+
* - Datastores, projects, environments, registry credentials, and webhooks
|
|
22
|
+
* carry no marker channel and no boundary, so their verdict is `unknown`
|
|
23
|
+
* — the change set never escalates `unknown` to a delete. When the
|
|
24
|
+
* `owned` filter asks for those types, this logs that no verdict is
|
|
25
|
+
* available rather than silently returning everything.
|
|
26
|
+
*
|
|
27
|
+
* Endpoint + auth reuse the applier verbatim (resolveEndpoint /
|
|
28
|
+
* RENDER_API_BASE_URL / RENDER_API_KEY), so plan reads the same target
|
|
29
|
+
* renderApply writes. Undeclared chant-marked services and env groups in the
|
|
30
|
+
* workspace are also returned (as orphans keyed by `<type>/<name>`), so a
|
|
31
|
+
* declared-then-removed service shows up as a delete candidate.
|
|
32
|
+
*/
|
|
33
|
+
import type { ObservationResult } from "@intentius/chant/lexicon";
|
|
34
|
+
import { type RenderHttp } from "./op/activities/render-apply.js";
|
|
35
|
+
export interface DescribeResourcesOptions {
|
|
36
|
+
environment: string;
|
|
37
|
+
buildOutput: string;
|
|
38
|
+
entityNames: string[];
|
|
39
|
+
entities: Map<string, {
|
|
40
|
+
entityType: string;
|
|
41
|
+
props: Record<string, unknown>;
|
|
42
|
+
}>;
|
|
43
|
+
/** Restrict to chant-owned resources (#119). */
|
|
44
|
+
owned?: boolean;
|
|
45
|
+
/** API endpoint override (tests). Defaults to resolveEndpoint() → RENDER_API_BASE_URL. */
|
|
46
|
+
endpoint?: string;
|
|
47
|
+
/** Workspace override (tests). Defaults to RENDER_OWNER_ID, else the sole visible owner. */
|
|
48
|
+
ownerId?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* List live Render resources and return them keyed by chant entity name, each
|
|
52
|
+
* tagged with an ownership verdict the core change set reads to decide whether
|
|
53
|
+
* an orphan is a delete (owned) or an adopt candidate (foreign). Reused by
|
|
54
|
+
* `renderPlugin.describeResources`.
|
|
55
|
+
*
|
|
56
|
+
* `http` is injectable for tests; the default reuses the applier's fetch client
|
|
57
|
+
* (bearer token from RENDER_API_KEY).
|
|
58
|
+
*/
|
|
59
|
+
export declare function describeResources(options: DescribeResourcesOptions, http?: RenderHttp, signal?: AbortSignal): Promise<ObservationResult>;
|
|
60
|
+
//# sourceMappingURL=describe-resources.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describe-resources.d.ts","sourceRoot":"","sources":["../src/describe-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAsC,MAAM,0BAA0B,CAAC;AAItG,OAAO,EAWL,KAAK,UAAU,EAEhB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IAC9E,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4FAA4F;IAC5F,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAaD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,EACjC,IAAI,GAAE,UAAgC,EACtC,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,CAAC,CA4Q5B"}
|
package/dist/detect.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template detection for the render lexicon.
|
|
3
|
+
*
|
|
4
|
+
* `chant import` parses a template file as JSON and asks each installed lexicon
|
|
5
|
+
* whether it recognizes the shape. render's importable source is the serializer
|
|
6
|
+
* plan (what `chant build` emits and `renderApply` POSTs): an object keyed by
|
|
7
|
+
* entity name whose values carry a `Render::…` entityType and a `POST` request.
|
|
8
|
+
*/
|
|
9
|
+
/** The serializer's whole output: entity name → request. */
|
|
10
|
+
export declare function isSerializerPlan(v: unknown): boolean;
|
|
11
|
+
export declare function detectTemplate(data: unknown): boolean;
|
|
12
|
+
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../src/detect.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,4DAA4D;AAC5D,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAIpD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export declare const BackgroundWorker: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
2
|
+
export declare const CronJob: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
3
|
+
export declare const CustomDomain: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
4
|
+
export declare const Disk: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
5
|
+
export declare const EnvGroup: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
6
|
+
export declare const Environment: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
7
|
+
export declare const KeyValue: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
8
|
+
export declare const Postgres: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
9
|
+
export declare const PrivateService: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
10
|
+
export declare const Project: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
11
|
+
export declare const RegistryCredential: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
12
|
+
export declare const StaticSite: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
13
|
+
export declare const Webhook: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
14
|
+
export declare const WebService: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
|
|
15
|
+
export declare const Autoscaling: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
16
|
+
export declare const AutoscalingCriteria: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
17
|
+
export declare const AutoscalingCriterion: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
18
|
+
export declare const BackgroundWorkerDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
19
|
+
export declare const BuildFilter: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
20
|
+
export declare const CidrBlockAndDescription: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
21
|
+
export declare const CronJobDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
22
|
+
export declare const DockerDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
23
|
+
export declare const EnvVar: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
24
|
+
export declare const GeneratedEnvVar: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
25
|
+
export declare const Header: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
26
|
+
export declare const Image: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
27
|
+
export declare const MaintenanceMode: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
28
|
+
export declare const NativeEnvironmentDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
29
|
+
export declare const Previews: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
30
|
+
export declare const PrivateServiceDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
31
|
+
export declare const ProjectEnvironment: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
32
|
+
export declare const ReadReplica: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
33
|
+
export declare const Route: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
34
|
+
export declare const SecretFile: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
35
|
+
export declare const ServiceDisk: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
36
|
+
export declare const StaticSiteDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
37
|
+
export declare const WebServiceDetails: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
|
|
38
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,+IAA4T,CAAC;AAC1V,eAAO,MAAM,OAAO,+IAAmT,CAAC;AACxU,eAAO,MAAM,YAAY,+IAA0P,CAAC;AACpR,eAAO,MAAM,IAAI,+IAAkH,CAAC;AACpI,eAAO,MAAM,QAAQ,+IAAkJ,CAAC;AACxK,eAAO,MAAM,WAAW,+IAAmL,CAAC;AAC5M,eAAO,MAAM,QAAQ,+IAAoW,CAAC;AAC1X,eAAO,MAAM,QAAQ,+IAAkkB,CAAC;AACxlB,eAAO,MAAM,cAAc,+IAA0T,CAAC;AACtV,eAAO,MAAM,OAAO,+IAAuK,CAAC;AAC5L,eAAO,MAAM,kBAAkB,+IAAsG,CAAC;AACtI,eAAO,MAAM,UAAU,+IAAsT,CAAC;AAC9U,eAAO,MAAM,OAAO,+IAAqF,CAAC;AAC1G,eAAO,MAAM,UAAU,+IAAsT,CAAC;AAE9U,eAAO,MAAM,WAAW,0GAA4D,CAAC;AACrF,eAAO,MAAM,mBAAmB,0GAAoE,CAAC;AACrG,eAAO,MAAM,oBAAoB,0GAAqE,CAAC;AACvG,eAAO,MAAM,uBAAuB,0GAAwE,CAAC;AAC7G,eAAO,MAAM,WAAW,0GAA4D,CAAC;AACrF,eAAO,MAAM,uBAAuB,0GAAwE,CAAC;AAC7G,eAAO,MAAM,cAAc,0GAA+D,CAAC;AAC3F,eAAO,MAAM,aAAa,0GAA8D,CAAC;AACzF,eAAO,MAAM,MAAM,0GAAuD,CAAC;AAC3E,eAAO,MAAM,eAAe,0GAAgE,CAAC;AAC7F,eAAO,MAAM,MAAM,0GAAuD,CAAC;AAC3E,eAAO,MAAM,KAAK,0GAAsD,CAAC;AACzE,eAAO,MAAM,eAAe,0GAAgE,CAAC;AAC7F,eAAO,MAAM,wBAAwB,0GAAyE,CAAC;AAC/G,eAAO,MAAM,QAAQ,0GAAyD,CAAC;AAC/E,eAAO,MAAM,qBAAqB,0GAAsE,CAAC;AACzG,eAAO,MAAM,kBAAkB,0GAAmE,CAAC;AACnG,eAAO,MAAM,WAAW,0GAA4D,CAAC;AACrF,eAAO,MAAM,KAAK,0GAAsD,CAAC;AACzE,eAAO,MAAM,UAAU,0GAA2D,CAAC;AACnF,eAAO,MAAM,WAAW,0GAA4D,CAAC;AACrF,eAAO,MAAM,iBAAiB,0GAAkE,CAAC;AACjG,eAAO,MAAM,iBAAiB,0GAAkE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/generated/runtime.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { renderPlugin } from "./plugin.js";
|
|
2
|
+
export { renderSerializer, isRefMarker, isAttrMarker, isOwnerMarker } from "./serializer.js";
|
|
3
|
+
export type { RenderPlan, RenderRequest, RefMarker, AttrMarker, OwnerMarker } from "./serializer.js";
|
|
4
|
+
export { Render, OwnerId, Region, PseudoParameter } from "./pseudo.js";
|
|
5
|
+
export { RENDER_ENV_OWNERSHIP_KEYS } from "./ownership.js";
|
|
6
|
+
export { CATALOG, ENTITY_TYPES, SERVICE_TYPE_OF, catalogEntry, isServiceEntityType } from "./catalog.js";
|
|
7
|
+
export type { CatalogEntry, EntityType } from "./catalog.js";
|
|
8
|
+
export { renderDeploy, renderApplyStep, renderDeleteStep } from "./composites/render-deploy.js";
|
|
9
|
+
export type { RenderDeployOpts, RenderApplyStepOpts } from "./composites/render-deploy.js";
|
|
10
|
+
export * from "./generated/index.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1F,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIlG,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAGxD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACtG,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAK1D,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC7F,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAOxF,cAAc,mBAAmB,CAAC"}
|