@intentius/chant-lexicon-gitlab 0.19.1 → 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.
- package/dist/codegen/docs.d.ts.map +1 -1
- package/dist/codegen/package.d.ts.map +1 -1
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +2 -2
- package/dist/plugin.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/codegen/docs.ts +17 -5
- package/src/codegen/package.ts +5 -8
- package/src/plugin.test.ts +5 -1
- package/src/plugin.ts +7 -1
|
@@ -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,
|
|
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,
|
|
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"}
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
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": "
|
|
55
|
+
"composite": "c5454e5652d3d9d30b0ecd15053b50529baf1bc4902175d3e9341dee7cb5dbed"
|
|
56
56
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gitlab",
|
|
3
|
-
"version": "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":
|
|
11
|
+
"isTag": false
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
14
|
"pseudoParameters": {}
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -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,
|
|
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.
|
|
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.
|
|
71
|
-
"@intentius/chant-lexicon-github": "^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": {
|
package/src/codegen/docs.ts
CHANGED
|
@@ -98,7 +98,15 @@ export async function generateDocs(opts?: { verbose?: boolean }): Promise<void>
|
|
|
98
98
|
overview,
|
|
99
99
|
outputFormat,
|
|
100
100
|
serviceFromType,
|
|
101
|
-
|
|
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: "
|
|
304
|
-
description: "GitLab
|
|
305
|
-
content: `
|
|
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
|
|
package/src/codegen/package.ts
CHANGED
|
@@ -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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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",
|
package/src/plugin.test.ts
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
62
|
+
isTag: false,
|
|
57
63
|
},
|
|
58
64
|
];
|
|
59
65
|
},
|