@intentius/chant-lexicon-cpln 0.72.4 → 0.72.5
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/dist/entity-props.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +2 -2
- package/src/entity-props.ts +18 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-props.d.ts","sourceRoot":"","sources":["../src/entity-props.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAK9D,gEAAgE;AAChE,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYhE;AAED,sEAAsE;AACtE,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAI9D;AAED,6FAA6F;AAC7F,wBAAgB,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAOpE;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAIvE;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAGjF;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAGjF;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,CAGnF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
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "88a12f07c2238b563dfd053644decf8fffedbb607b27e7b2584791235c06cd3d",
|
|
5
5
|
"meta.json": "7296ab2c2608fb4275bc7911f528876f25969d5fae945bdbc34717f013d55b7c",
|
|
6
6
|
"types/index.d.ts": "b681bb9105083ba20ec34583318020a1c114d68d4fc25ab7fbd02199a5416ca4",
|
|
7
7
|
"rules/cpl001-no-secret-literals.ts": "c79b537f78dbd26893bd801b3e5c5f30d7326c8c6816a6fd82fb885796f86c61",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"skills/chant-cpln-workloads.md": "8353909ff18f244f4d4389e74b8d95b04359e97a46ddacb18d669d41d62b6080",
|
|
32
32
|
"skills/chant-cpln-secrets.md": "8628c2286a7e8e14aa78224fe22ff266dc54b996f4fdb64002fa433213de13a0"
|
|
33
33
|
},
|
|
34
|
-
"composite": "
|
|
34
|
+
"composite": "46feb6c1b3f932b7b69c2f27d33b68dcf3172befb5f3273148b99ce6e390b4db"
|
|
35
35
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-cpln",
|
|
3
|
-
"version": "0.72.
|
|
3
|
+
"version": "0.72.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"typescript": "^5.9.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@intentius/chant": "^0.72.
|
|
52
|
+
"@intentius/chant": "^0.72.5",
|
|
53
53
|
"typescript": "^5.9.3"
|
|
54
54
|
},
|
|
55
55
|
"description": "Control Plane (cpln) lexicon for chant — declarative IaC in TypeScript",
|
package/src/entity-props.ts
CHANGED
|
@@ -39,7 +39,7 @@ export function propsOf(entity: unknown): Record<string, unknown> {
|
|
|
39
39
|
export function readProp(source: unknown, key: string): unknown {
|
|
40
40
|
const props = propsOf(source);
|
|
41
41
|
const value = props[key];
|
|
42
|
-
return
|
|
42
|
+
return wrapsProps(value) ? propsOf(value) : value;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/** Read a nested path, unwrapping declarables at each step. `readPath(w, "spec", "job")`. */
|
|
@@ -56,7 +56,7 @@ export function readPath(source: unknown, ...keys: string[]): unknown {
|
|
|
56
56
|
export function readArray(source: unknown, ...keys: string[]): unknown[] {
|
|
57
57
|
const value = readPath(source, ...keys);
|
|
58
58
|
if (!Array.isArray(value)) return [];
|
|
59
|
-
return value.map((item) => (
|
|
59
|
+
return value.map((item) => (wrapsProps(item) ? propsOf(item) : item));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/** Read a property expected to be a string. */
|
|
@@ -77,8 +77,22 @@ export function readBoolean(source: unknown, ...keys: string[]): boolean | undef
|
|
|
77
77
|
return typeof value === "boolean" ? value : undefined;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
/**
|
|
81
|
-
|
|
80
|
+
/**
|
|
81
|
+
* A value that carries authored props under `.props`.
|
|
82
|
+
*
|
|
83
|
+
* chant#2444 — deliberately NOT `isDeclarable`, and deliberately not named as
|
|
84
|
+
* though it were. This answers "does this wrap props that should be unwrapped",
|
|
85
|
+
* which is a different question from "is this an entity", and it has to match
|
|
86
|
+
* markerless objects: swapping it for core's marker test fails 85 of this
|
|
87
|
+
* lexicon's tests, because cpln's nested property shapes carry `.props` without
|
|
88
|
+
* carrying an entity marker.
|
|
89
|
+
*
|
|
90
|
+
* The old name invited exactly that swap. It is one of three readings of
|
|
91
|
+
* "declarable" chant#2444 found in the tree, and the only one that was never a
|
|
92
|
+
* divergent copy of the entity test — the other, in `forgejo/src/dialect.ts`,
|
|
93
|
+
* was and is now core's.
|
|
94
|
+
*/
|
|
95
|
+
function wrapsProps(value: unknown): boolean {
|
|
82
96
|
return (
|
|
83
97
|
!!value &&
|
|
84
98
|
typeof value === "object" &&
|