@intentius/chant-lexicon-fly 0.41.20 → 0.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "34570d6936a41f0fdb3d31fcd20b83843b1774d9e86b53947e66fcd638c4c283",
4
+ "manifest.json": "69ff9c586050363edf93f976e21fae5ae6b1b101d669cd8b88bca1716e548b65",
5
5
  "meta.json": "e46e65ba7544fafc6dbb3fd48b841904b5ae6f7cb4d517a940ed68b01626c097",
6
6
  "types/index.d.ts": "07f5d04d0d3831cae053b1f0f5dd661c58e9708f45067a0fc85dd94079ac144b",
7
7
  "rules/guest-sizing.ts": "bc749d218df8f3cc3d8fbe388205ae96e6b204ae0d6d77e8bf82cb936cc53ff6",
@@ -15,5 +15,5 @@
15
15
  "skills/chant-fly-ops.md": "b8eef6504e203133e6a35c83aabb08404eec95060705395515a0046d42269cf1",
16
16
  "skills/chant-fly-sprites.md": "89ba52db63a71a17eab483d99233a4ae67f5d34920445010e750f81c95200b4e"
17
17
  },
18
- "composite": "af0a8b75849382e5ec3aa310c36b40dcc2d62f398d058d883249242af7777cf6"
18
+ "composite": "384ff22ab801273fdd306c3ecf0981bd5018ca936916826766575f9519f69232"
19
19
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fly",
3
- "version": "0.41.20",
3
+ "version": "0.42.1",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Fly"
6
6
  }
@@ -0,0 +1,20 @@
1
+ ---
2
+ okf_version: '0.2'
3
+ ---
4
+
5
+ # Resource types
6
+
7
+ * [App](/types/App.md) - Fly::Machines::App
8
+ * [Certificate](/types/Certificate.md) - Fly::Machines::Certificate
9
+ * [IPAddress](/types/IPAddress.md) - Fly::Machines::IPAddress
10
+ * [Machine](/types/Machine.md) - Fly::Machines::Machine
11
+ * [Secret](/types/Secret.md) - Fly::Machines::Secret
12
+ * [Volume](/types/Volume.md) - Fly::Machines::Volume
13
+
14
+ # Rules
15
+
16
+ * [FLY001](/rules/FLY001.md) - Valid Fly region
17
+ * [FLY002](/rules/FLY002.md) - Sane guest sizing
18
+ * [FLY004](/rules/FLY004.md) - No secret literals in machine config
19
+ * [FLY010](/rules/FLY010.md) - Machine config must specify an image — a Machine cannot boot without one
20
+ * [FLY011](/rules/FLY011.md) - A machine mount's volume must resolve to a Volume declared in the stack
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: lint-rule
3
+ title: FLY001
4
+ description: Valid Fly region
5
+ id: FLY001
6
+ severity: error
7
+ category: correctness
8
+ lexicon: fly
9
+ docs: https://intentius.io/chant/lexicons/fly/rules/
10
+ ---
11
+ Valid Fly region
@@ -0,0 +1,11 @@
1
+ ---
2
+ type: lint-rule
3
+ title: FLY002
4
+ description: Sane guest sizing
5
+ id: FLY002
6
+ severity: error
7
+ category: correctness
8
+ lexicon: fly
9
+ docs: https://intentius.io/chant/lexicons/fly/rules/
10
+ ---
11
+ Sane guest sizing
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: lint-rule
3
+ title: FLY004
4
+ description: No secret literals in machine config
5
+ id: FLY004
6
+ severity: warning
7
+ category: security
8
+ lexicon: fly
9
+ docs: https://intentius.io/chant/lexicons/fly/rules/
10
+ ---
11
+ No secret literals in machine config
12
+
13
+ ## Applies to
14
+
15
+ - [Secret](/types/Secret.md)
@@ -0,0 +1,15 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: FLY010
4
+ description: Machine config must specify an image — a Machine cannot boot without one
5
+ id: FLY010
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: fly
9
+ docs: https://intentius.io/chant/lexicons/fly/rules/
10
+ ---
11
+ Machine config must specify an image — a Machine cannot boot without one
12
+
13
+ ## Applies to
14
+
15
+ - [Machine](/types/Machine.md)
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: post-synth-check
3
+ title: FLY011
4
+ description: A machine mount's volume must resolve to a Volume declared in the stack
5
+ id: FLY011
6
+ severity: error
7
+ category: post-synth
8
+ lexicon: fly
9
+ docs: https://intentius.io/chant/lexicons/fly/rules/
10
+ ---
11
+ A machine mount's volume must resolve to a Volume declared in the stack
12
+
13
+ ## Applies to
14
+
15
+ - [Machine](/types/Machine.md)
16
+ - [Volume](/types/Volume.md)
@@ -0,0 +1,16 @@
1
+ ---
2
+ type: resource-type
3
+ title: App
4
+ description: fly resource type Fly::Machines::App
5
+ name: App
6
+ lexicon: fly
7
+ resource_type: Fly::Machines::App
8
+ ---
9
+ `Fly::Machines::App`, a resource type of the fly lexicon.
10
+
11
+ ## Properties
12
+
13
+ - `enable_subdomains` (`boolean`, optional)
14
+ - `name` (`string`, optional)
15
+ - `network` (`string`, optional)
16
+ - `org_slug` (`string`, optional)
@@ -0,0 +1,13 @@
1
+ ---
2
+ type: resource-type
3
+ title: Certificate
4
+ description: fly resource type Fly::Machines::Certificate
5
+ name: Certificate
6
+ lexicon: fly
7
+ resource_type: Fly::Machines::Certificate
8
+ ---
9
+ `Fly::Machines::Certificate`, a resource type of the fly lexicon.
10
+
11
+ ## Properties
12
+
13
+ - `hostname` (`string`, optional)
@@ -0,0 +1,17 @@
1
+ ---
2
+ type: resource-type
3
+ title: IPAddress
4
+ description: fly resource type Fly::Machines::IPAddress
5
+ name: IPAddress
6
+ lexicon: fly
7
+ resource_type: Fly::Machines::IPAddress
8
+ ---
9
+ `Fly::Machines::IPAddress`, a resource type of the fly lexicon.
10
+
11
+ ## Properties
12
+
13
+ - `network` (`string`, optional)
14
+ - `org_slug` (`string`, optional)
15
+ - `region` (`string`, optional)
16
+ - `service_name` (`string`, optional)
17
+ - `type` (`string`, optional)
@@ -0,0 +1,25 @@
1
+ ---
2
+ type: resource-type
3
+ title: Machine
4
+ description: fly resource type Fly::Machines::Machine
5
+ name: Machine
6
+ lexicon: fly
7
+ resource_type: Fly::Machines::Machine
8
+ ---
9
+ `Fly::Machines::Machine`, a resource type of the fly lexicon.
10
+
11
+ ## Properties
12
+
13
+ - `config` (`MachineConfig`, optional): An object defining the Machine configuration
14
+ - `lease_ttl` (`number`, optional)
15
+ - `min_secrets_version` (`number`, optional)
16
+ - `name` (`string`, optional): Unique name for this Machine. If omitted, one is generated for you
17
+ - `region` (`string`, optional): The target region. Omitting this param launches in the same region as your WireGuard peer connection (somewhere near you).
18
+ - `skip_launch` (`boolean`, optional)
19
+ - `skip_secrets` (`boolean`, optional)
20
+ - `skip_service_registration` (`boolean`, optional)
21
+
22
+ ## Governed by
23
+
24
+ - [FLY010](/rules/FLY010.md): Machine config must specify an image — a Machine cannot boot without one
25
+ - [FLY011](/rules/FLY011.md): A machine mount's volume must resolve to a Volume declared in the stack
@@ -0,0 +1,17 @@
1
+ ---
2
+ type: resource-type
3
+ title: Secret
4
+ description: fly resource type Fly::Machines::Secret
5
+ name: Secret
6
+ lexicon: fly
7
+ resource_type: Fly::Machines::Secret
8
+ ---
9
+ `Fly::Machines::Secret`, a resource type of the fly lexicon.
10
+
11
+ ## Properties
12
+
13
+ - `value` (`string`, optional)
14
+
15
+ ## Governed by
16
+
17
+ - [FLY004](/rules/FLY004.md): No secret literals in machine config
@@ -0,0 +1,29 @@
1
+ ---
2
+ type: resource-type
3
+ title: Volume
4
+ description: fly resource type Fly::Machines::Volume
5
+ name: Volume
6
+ lexicon: fly
7
+ resource_type: Fly::Machines::Volume
8
+ ---
9
+ `Fly::Machines::Volume`, a resource type of the fly lexicon.
10
+
11
+ ## Properties
12
+
13
+ - `auto_backup_enabled` (`boolean`, optional): enable scheduled automatic snapshots. Defaults to `true`
14
+ - `compute` (`MachineGuest`, optional)
15
+ - `compute_image` (`string`, optional)
16
+ - `encrypted` (`boolean`, optional)
17
+ - `fstype` (`string`, optional)
18
+ - `name` (`string`, optional)
19
+ - `region` (`string`, optional)
20
+ - `require_unique_zone` (`boolean`, optional)
21
+ - `size_gb` (`number`, optional)
22
+ - `snapshot_id` (`string`, optional): restore from snapshot
23
+ - `snapshot_retention` (`number`, optional)
24
+ - `source_volume_id` (`string`, optional): fork from remote volume
25
+ - `unique_zone_app_wide` (`boolean`, optional)
26
+
27
+ ## Governed by
28
+
29
+ - [FLY011](/rules/FLY011.md): A machine mount's volume must resolve to a Volume declared in the stack
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-fly",
3
- "version": "0.41.20",
3
+ "version": "0.42.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/",
@@ -57,7 +57,7 @@
57
57
  "typescript": "^5.9.3"
58
58
  },
59
59
  "peerDependencies": {
60
- "@intentius/chant": "^0.41.20",
60
+ "@intentius/chant": "^0.42.1",
61
61
  "typescript": "^5.9.3"
62
62
  },
63
63
  "description": "Fly.io Machines lexicon for chant — declarative IaC in TypeScript",
@@ -0,0 +1,37 @@
1
+ import { describe, test, expect } from "vitest";
2
+ import { packageLexicon } from "./package";
3
+ import { okfConformanceProblems, splitFrontmatter } from "@intentius/chant/okf";
4
+ import { parseYAML } from "@intentius/chant/yaml";
5
+
6
+ /**
7
+ * The lexicon OKF bundle (#1060) over fly — the OpenAPI-derived generation
8
+ * path, where property descriptions come out of the generated declarations'
9
+ * JSDoc rather than the registry.
10
+ */
11
+ describe("fly OKF bundle", () => {
12
+ test("packaging emits a conformant bundle with spec-sourced property descriptions", async () => {
13
+ const { spec } = await packageLexicon();
14
+ expect(spec.okf).toBeDefined();
15
+ expect(okfConformanceProblems(spec.okf!)).toEqual([]);
16
+
17
+ const files = new Map(spec.okf!.map((f) => [f.path, f.content]));
18
+ const machine = splitFrontmatter(files.get("types/Machine.md")!)!;
19
+ const front = parseYAML(machine.frontmatter);
20
+ expect(front.type).toBe("resource-type");
21
+ expect(front.resource_type).toBe("Fly::Machines::Machine");
22
+ // Description carried over from the Machines OpenAPI spec via the d.ts JSDoc.
23
+ expect(machine.body).toContain("Unique name for this Machine");
24
+ }, 120_000);
25
+
26
+ test("rules cross-link with the types they govern, both directions", async () => {
27
+ const { spec } = await packageLexicon();
28
+ const files = new Map(spec.okf!.map((f) => [f.path, f.content]));
29
+
30
+ const machine = splitFrontmatter(files.get("types/Machine.md")!)!;
31
+ expect(machine.body).toContain("## Governed by");
32
+ const ruleLink = machine.body.match(/\[([A-Z0-9]+)\]\(\/rules\/([A-Z0-9]+)\.md\)/);
33
+ expect(ruleLink).not.toBeNull();
34
+ const rule = splitFrontmatter(files.get(`rules/${ruleLink![2]}.md`)!)!;
35
+ expect(rule.body).toContain("- [Machine](/types/Machine.md)");
36
+ }, 120_000);
37
+ });