@intentius/chant-lexicon-gitlab 0.19.0 → 0.20.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.
@@ -1 +1 @@
1
- {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiFH;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA41B9E"}
1
+ {"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/codegen/docs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiFH;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAw2B9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/codegen/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;AAI9C;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAqCtF"}
1
+ {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/codegen/package.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;AAI9C;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC,CAkCtF"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "599cfec6c8c7ef62b93b33cda80d6d518eb4c2a50bfe40e5e98daa0e8c09400c",
4
+ "manifest.json": "3db621ca961d22beae382f9bdb854d0a7cfa39e70a6e8709ae937878eba4364e",
5
5
  "meta.json": "931fc3246a55645b1493080bbeb160e5d205e42349e8bdca96ca243adb5f0da3",
6
6
  "types/index.d.ts": "5cd2e99f135a929b72bdd822d00d780d39b1cd407ba0cfb3d511c7ac9d667b58",
7
7
  "rules/artifact-no-expiry.ts": "3f3cabf9792cbf8207e53a25f506715466b19ec25e9c3b4d0d77fed6b2eb4542",
@@ -52,5 +52,5 @@
52
52
  "skills/chant-gitlab-migrate.md": "4853d04980560b379e5b0f7267dcb0a1e5d5879cb9e9931681ce76b2a5fe69d8",
53
53
  "skills/chant-gitlab-patterns.md": "6d9a44e9e8de4c3820be9d65381b0d2ede4cb3626aaaf0011e21838a9fbf556e"
54
54
  },
55
- "composite": "a3564615b9f8c8a04fbfec598da8dc345132895267c61a1c39686fce277575d9"
55
+ "composite": "c5454e5652d3d9d30b0ecd15053b50529baf1bc4902175d3e9341dee7cb5dbed"
56
56
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitlab",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "GitLab",
6
6
  "intrinsics": [
@@ -8,7 +8,7 @@
8
8
  "name": "reference",
9
9
  "description": "!reference tag — reference another job's properties",
10
10
  "outputKey": "!reference",
11
- "isTag": true
11
+ "isTag": false
12
12
  }
13
13
  ],
14
14
  "pseudoParameters": {}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,0BAA0B,CAAC;AAmB7F,eAAO,MAAM,YAAY,EAAE,aAsgB1B,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAiC,MAAM,0BAA0B,CAAC;AAmB7F,eAAO,MAAM,YAAY,EAAE,aA4gB1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-gitlab",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "GitLab CI lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -67,8 +67,8 @@
67
67
  "typescript": "^5.9.3"
68
68
  },
69
69
  "peerDependencies": {
70
- "@intentius/chant": "^0.19.0",
71
- "@intentius/chant-lexicon-github": "^0.19.0",
70
+ "@intentius/chant": "^0.20.0",
71
+ "@intentius/chant-lexicon-github": "^0.20.0",
72
72
  "typescript": "^5.9.3"
73
73
  },
74
74
  "peerDependenciesMeta": {
@@ -98,7 +98,15 @@ export async function generateDocs(opts?: { verbose?: boolean }): Promise<void>
98
98
  overview,
99
99
  outputFormat,
100
100
  serviceFromType,
101
- suppressPages: ["intrinsics", "rules"],
101
+ // "intrinsics" is no longer suppressed (chant #1067) — the reference
102
+ // table at that slug is now generated from the plugin's own
103
+ // `intrinsics()` registration (docsPipeline's generateIntrinsics, same
104
+ // mechanism azure/helm already use), so its "Folds?" column can never
105
+ // drift from the registration the way #1062's foldability matrix
106
+ // depends on. The hand-written `reference()` usage guide moves to a
107
+ // separate "intrinsics-guide" page below — content unchanged, just no
108
+ // longer sharing a slug with generated data.
109
+ suppressPages: ["rules"],
102
110
  examplesDir: join(pkgDir, "examples"),
103
111
  extraPages: [
104
112
  {
@@ -299,10 +307,14 @@ Jobs can override any default property individually.
299
307
  `,
300
308
  },
301
309
  {
302
- slug: "intrinsics",
303
- title: "Intrinsic Functions",
304
- description: "GitLab CI/CD intrinsic functions and their chant syntax",
305
- content: `The GitLab lexicon provides one intrinsic function: \`reference()\`, which maps to GitLab's \`!reference\` YAML tag.
310
+ slug: "intrinsics-guide",
311
+ title: "Intrinsics Guide",
312
+ description: "Worked examples for the GitLab reference() intrinsic and its chant syntax",
313
+ content: `See [Intrinsic Functions](../intrinsics/) for the generated reference table (name, description, output key, whether it's a tagged template, whether \`chant build --fold\` can fold it). This page is the worked-example companion.
314
+
315
+ The GitLab lexicon provides one intrinsic function: \`reference()\`, which maps to GitLab's \`!reference\` YAML tag.
316
+
317
+ \`reference()\` is a plain function call, not a TypeScript tagged template — like any function call used as a value, it's outside the subset [\`chant build --fold\`](/chant/concepts/typescript-as-data/#folded-vs-run) can reduce. A file that calls \`reference()\` anywhere in a resource's properties falls back to the normal run path under \`--fold\`.
306
318
 
307
319
  ## \`reference()\` — reuse job properties
308
320
 
@@ -31,14 +31,11 @@ export async function packageLexicon(opts: PackageOptions = {}): Promise<Package
31
31
  generate: (genOpts) => generate({ verbose: genOpts.verbose, force: genOpts.force }),
32
32
 
33
33
  buildManifest: (_genResult) => {
34
- const intrinsics: IntrinsicDef[] = [
35
- {
36
- name: "reference",
37
- description: "!reference tag reference another job's properties",
38
- outputKey: "!reference",
39
- isTag: true,
40
- },
41
- ];
34
+ // Derived from the plugin's own registration (chant #1067) — this
35
+ // used to be a hand-maintained array independent of ../plugin.ts
36
+ // (despite the comment claiming otherwise), free to drift from the
37
+ // real registration without anything noticing.
38
+ const intrinsics: IntrinsicDef[] = gitlabPlugin.intrinsics?.() ?? [];
42
39
 
43
40
  return {
44
41
  name: "gitlab",
@@ -26,7 +26,11 @@ describe("gitlabPlugin", () => {
26
26
  expect(intrinsics).toHaveLength(1);
27
27
  expect(intrinsics[0].name).toBe("reference");
28
28
  expect(intrinsics[0].outputKey).toBe("!reference");
29
- expect(intrinsics[0].isTag).toBe(true);
29
+ // #1039: `reference(...)` is authored as a plain call, not a JS tagged
30
+ // template — `isTag` must be false so the static folder doesn't mistake
31
+ // `reference`...`` for a registered tag. The `!reference` YAML tag still
32
+ // renders fine (via `ReferenceIntrinsic.toYAML()`, unrelated to `isTag`).
33
+ expect(intrinsics[0].isTag).toBe(false);
30
34
  });
31
35
 
32
36
  // -----------------------------------------------------------------------
package/src/plugin.ts CHANGED
@@ -51,9 +51,15 @@ export const gitlabPlugin: LexiconPlugin = {
51
51
  return [
52
52
  {
53
53
  name: "reference",
54
+ // Authored as a plain call — `reference("job", "script")` — not a JS
55
+ // tagged template, so `isTag` (chant #1039: "authored as a tagged
56
+ // template", consumed by the static folder to recognize `Tag`...``)
57
+ // must be false. The `!reference` YAML tag it produces is rendered
58
+ // via `ReferenceIntrinsic.toYAML()` (see ../serializer.ts's generic
59
+ // `toYAML` duck-typing) — independent of this flag.
54
60
  description: "!reference tag — reference another job's properties",
55
61
  outputKey: "!reference",
56
- isTag: true,
62
+ isTag: false,
57
63
  },
58
64
  ];
59
65
  },