@intentius/chant-lexicon-gitlab 0.6.0 → 0.8.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.
Files changed (228) hide show
  1. package/dist/codegen/docs-cli.d.ts +2 -0
  2. package/dist/codegen/docs-cli.d.ts.map +1 -0
  3. package/dist/codegen/docs.d.ts +12 -0
  4. package/dist/codegen/docs.d.ts.map +1 -0
  5. package/dist/codegen/fetch.d.ts +40 -0
  6. package/dist/codegen/fetch.d.ts.map +1 -0
  7. package/dist/codegen/generate-cli.d.ts +6 -0
  8. package/dist/codegen/generate-cli.d.ts.map +1 -0
  9. package/dist/codegen/generate-lexicon.d.ts +19 -0
  10. package/dist/codegen/generate-lexicon.d.ts.map +1 -0
  11. package/dist/codegen/generate-typescript.d.ts +11 -0
  12. package/dist/codegen/generate-typescript.d.ts.map +1 -0
  13. package/dist/codegen/generate.d.ts +19 -0
  14. package/dist/codegen/generate.d.ts.map +1 -0
  15. package/dist/codegen/naming.d.ts +15 -0
  16. package/dist/codegen/naming.d.ts.map +1 -0
  17. package/dist/codegen/package.d.ts +11 -0
  18. package/dist/codegen/package.d.ts.map +1 -0
  19. package/dist/codegen/parse.d.ts +60 -0
  20. package/dist/codegen/parse.d.ts.map +1 -0
  21. package/dist/codegen/patches.d.ts +31 -0
  22. package/dist/codegen/patches.d.ts.map +1 -0
  23. package/dist/codegen/typecheck.d.ts +5 -0
  24. package/dist/codegen/typecheck.d.ts.map +1 -0
  25. package/dist/composites/docker-build.d.ts +29 -0
  26. package/dist/composites/docker-build.d.ts.map +1 -0
  27. package/dist/composites/index.d.ts +11 -0
  28. package/dist/composites/index.d.ts.map +1 -0
  29. package/dist/composites/mr-plan-report.d.ts +43 -0
  30. package/dist/composites/mr-plan-report.d.ts.map +1 -0
  31. package/dist/composites/node-pipeline.d.ts +55 -0
  32. package/dist/composites/node-pipeline.d.ts.map +1 -0
  33. package/dist/composites/python-pipeline.d.ts +21 -0
  34. package/dist/composites/python-pipeline.d.ts.map +1 -0
  35. package/dist/composites/review-app.d.ts +24 -0
  36. package/dist/composites/review-app.d.ts.map +1 -0
  37. package/dist/coverage.d.ts +18 -0
  38. package/dist/coverage.d.ts.map +1 -0
  39. package/dist/generated/index.d.ts +22 -0
  40. package/dist/generated/index.d.ts.map +1 -0
  41. package/dist/generated/runtime.d.ts +5 -0
  42. package/dist/generated/runtime.d.ts.map +1 -0
  43. package/dist/import/generator.d.ts +19 -0
  44. package/dist/import/generator.d.ts.map +1 -0
  45. package/dist/import/parser.d.ts +14 -0
  46. package/dist/import/parser.d.ts.map +1 -0
  47. package/dist/index.d.ts +14 -0
  48. package/dist/index.d.ts.map +1 -0
  49. package/dist/integrity.json +12 -12
  50. package/dist/intrinsics.d.ts +30 -0
  51. package/dist/intrinsics.d.ts.map +1 -0
  52. package/dist/lint/post-synth/index.d.ts +3 -0
  53. package/dist/lint/post-synth/index.d.ts.map +1 -0
  54. package/dist/lint/post-synth/wgl010.d.ts +9 -0
  55. package/dist/lint/post-synth/wgl010.d.ts.map +1 -0
  56. package/dist/lint/post-synth/wgl011.d.ts +13 -0
  57. package/dist/lint/post-synth/wgl011.d.ts.map +1 -0
  58. package/dist/lint/post-synth/wgl012.d.ts +13 -0
  59. package/dist/lint/post-synth/wgl012.d.ts.map +1 -0
  60. package/dist/lint/post-synth/wgl013.d.ts +16 -0
  61. package/dist/lint/post-synth/wgl013.d.ts.map +1 -0
  62. package/dist/lint/post-synth/wgl014.d.ts +13 -0
  63. package/dist/lint/post-synth/wgl014.d.ts.map +1 -0
  64. package/dist/lint/post-synth/wgl015.d.ts +12 -0
  65. package/dist/lint/post-synth/wgl015.d.ts.map +1 -0
  66. package/dist/lint/post-synth/wgl016.d.ts +10 -0
  67. package/dist/lint/post-synth/wgl016.d.ts.map +1 -0
  68. package/dist/lint/post-synth/wgl017.d.ts +10 -0
  69. package/dist/lint/post-synth/wgl017.d.ts.map +1 -0
  70. package/dist/lint/post-synth/wgl018.d.ts +9 -0
  71. package/dist/lint/post-synth/wgl018.d.ts.map +1 -0
  72. package/dist/lint/post-synth/wgl019.d.ts +9 -0
  73. package/dist/lint/post-synth/wgl019.d.ts.map +1 -0
  74. package/dist/lint/post-synth/wgl020.d.ts +11 -0
  75. package/dist/lint/post-synth/wgl020.d.ts.map +1 -0
  76. package/dist/lint/post-synth/wgl021.d.ts +10 -0
  77. package/dist/lint/post-synth/wgl021.d.ts.map +1 -0
  78. package/dist/lint/post-synth/wgl022.d.ts +10 -0
  79. package/dist/lint/post-synth/wgl022.d.ts.map +1 -0
  80. package/dist/lint/post-synth/wgl023.d.ts +10 -0
  81. package/dist/lint/post-synth/wgl023.d.ts.map +1 -0
  82. package/dist/lint/post-synth/wgl024.d.ts +10 -0
  83. package/dist/lint/post-synth/wgl024.d.ts.map +1 -0
  84. package/dist/lint/post-synth/wgl025.d.ts +10 -0
  85. package/dist/lint/post-synth/wgl025.d.ts.map +1 -0
  86. package/dist/lint/post-synth/wgl026.d.ts +10 -0
  87. package/dist/lint/post-synth/wgl026.d.ts.map +1 -0
  88. package/dist/lint/post-synth/wgl027.d.ts +9 -0
  89. package/dist/lint/post-synth/wgl027.d.ts.map +1 -0
  90. package/dist/lint/post-synth/wgl028.d.ts +11 -0
  91. package/dist/lint/post-synth/wgl028.d.ts.map +1 -0
  92. package/dist/lint/post-synth/wgl029.d.ts +11 -0
  93. package/dist/lint/post-synth/wgl029.d.ts.map +1 -0
  94. package/dist/lint/post-synth/wgl030.d.ts +11 -0
  95. package/dist/lint/post-synth/wgl030.d.ts.map +1 -0
  96. package/dist/lint/post-synth/wgl031.d.ts +11 -0
  97. package/dist/lint/post-synth/wgl031.d.ts.map +1 -0
  98. package/dist/lint/post-synth/wgl032.d.ts +12 -0
  99. package/dist/lint/post-synth/wgl032.d.ts.map +1 -0
  100. package/dist/lint/post-synth/wgl033.d.ts +11 -0
  101. package/dist/lint/post-synth/wgl033.d.ts.map +1 -0
  102. package/dist/lint/post-synth/wgl034.d.ts +12 -0
  103. package/dist/lint/post-synth/wgl034.d.ts.map +1 -0
  104. package/dist/lint/post-synth/wgl035.d.ts +12 -0
  105. package/dist/lint/post-synth/wgl035.d.ts.map +1 -0
  106. package/dist/lint/post-synth/wgl036.d.ts +14 -0
  107. package/dist/lint/post-synth/wgl036.d.ts.map +1 -0
  108. package/dist/lint/post-synth/wgl037.d.ts +12 -0
  109. package/dist/lint/post-synth/wgl037.d.ts.map +1 -0
  110. package/dist/lint/post-synth/wgl038.d.ts +14 -0
  111. package/dist/lint/post-synth/wgl038.d.ts.map +1 -0
  112. package/dist/lint/post-synth/wgl039.d.ts +11 -0
  113. package/dist/lint/post-synth/wgl039.d.ts.map +1 -0
  114. package/dist/lint/post-synth/wgl040.d.ts +11 -0
  115. package/dist/lint/post-synth/wgl040.d.ts.map +1 -0
  116. package/dist/lint/post-synth/wgl041.d.ts +13 -0
  117. package/dist/lint/post-synth/wgl041.d.ts.map +1 -0
  118. package/dist/lint/post-synth/wgl042.d.ts +12 -0
  119. package/dist/lint/post-synth/wgl042.d.ts.map +1 -0
  120. package/dist/lint/post-synth/wgl043.d.ts +12 -0
  121. package/dist/lint/post-synth/wgl043.d.ts.map +1 -0
  122. package/dist/lint/post-synth/wgl044.d.ts +11 -0
  123. package/dist/lint/post-synth/wgl044.d.ts.map +1 -0
  124. package/dist/lint/post-synth/wgl045.d.ts +12 -0
  125. package/dist/lint/post-synth/wgl045.d.ts.map +1 -0
  126. package/dist/lint/post-synth/wgl046.d.ts +12 -0
  127. package/dist/lint/post-synth/wgl046.d.ts.map +1 -0
  128. package/dist/lint/post-synth/wgl047.d.ts +11 -0
  129. package/dist/lint/post-synth/wgl047.d.ts.map +1 -0
  130. package/dist/lint/post-synth/wgl048.d.ts +11 -0
  131. package/dist/lint/post-synth/wgl048.d.ts.map +1 -0
  132. package/dist/lint/post-synth/yaml-helpers.d.ts +107 -0
  133. package/dist/lint/post-synth/yaml-helpers.d.ts.map +1 -0
  134. package/dist/lint/rules/artifact-no-expiry.d.ts +9 -0
  135. package/dist/lint/rules/artifact-no-expiry.d.ts.map +1 -0
  136. package/dist/lint/rules/data/known-include-sources.d.ts +14 -0
  137. package/dist/lint/rules/data/known-include-sources.d.ts.map +1 -0
  138. package/dist/lint/rules/data/untrusted-variables.d.ts +14 -0
  139. package/dist/lint/rules/data/untrusted-variables.d.ts.map +1 -0
  140. package/dist/lint/rules/deprecated-only-except.d.ts +10 -0
  141. package/dist/lint/rules/deprecated-only-except.d.ts.map +1 -0
  142. package/dist/lint/rules/index.d.ts +8 -0
  143. package/dist/lint/rules/index.d.ts.map +1 -0
  144. package/dist/lint/rules/missing-script.d.ts +9 -0
  145. package/dist/lint/rules/missing-script.d.ts.map +1 -0
  146. package/dist/lint/rules/missing-stage.d.ts +9 -0
  147. package/dist/lint/rules/missing-stage.d.ts.map +1 -0
  148. package/dist/lsp/completions.d.ts +6 -0
  149. package/dist/lsp/completions.d.ts.map +1 -0
  150. package/dist/lsp/hover.d.ts +6 -0
  151. package/dist/lsp/hover.d.ts.map +1 -0
  152. package/dist/manifest.json +1 -1
  153. package/dist/mcp/context-tools.d.ts +20 -0
  154. package/dist/mcp/context-tools.d.ts.map +1 -0
  155. package/dist/migrate/from-github/actions/index.d.ts +13 -0
  156. package/dist/migrate/from-github/actions/index.d.ts.map +1 -0
  157. package/dist/migrate/from-github/actions/registry.d.ts +63 -0
  158. package/dist/migrate/from-github/actions/registry.d.ts.map +1 -0
  159. package/dist/migrate/from-github/actions/tier-1.d.ts +20 -0
  160. package/dist/migrate/from-github/actions/tier-1.d.ts.map +1 -0
  161. package/dist/migrate/from-github/actions/tier-2.d.ts +9 -0
  162. package/dist/migrate/from-github/actions/tier-2.d.ts.map +1 -0
  163. package/dist/migrate/from-github/actions/tier-3.d.ts +9 -0
  164. package/dist/migrate/from-github/actions/tier-3.d.ts.map +1 -0
  165. package/dist/migrate/from-github/composites/patterns.d.ts +27 -0
  166. package/dist/migrate/from-github/composites/patterns.d.ts.map +1 -0
  167. package/dist/migrate/from-github/composites/rewriter.d.ts +14 -0
  168. package/dist/migrate/from-github/composites/rewriter.d.ts.map +1 -0
  169. package/dist/migrate/from-github/diagnostics.d.ts +17 -0
  170. package/dist/migrate/from-github/diagnostics.d.ts.map +1 -0
  171. package/dist/migrate/from-github/emit-yaml.d.ts +16 -0
  172. package/dist/migrate/from-github/emit-yaml.d.ts.map +1 -0
  173. package/dist/migrate/from-github/expressions.d.ts +65 -0
  174. package/dist/migrate/from-github/expressions.d.ts.map +1 -0
  175. package/dist/migrate/from-github/index.d.ts +61 -0
  176. package/dist/migrate/from-github/index.d.ts.map +1 -0
  177. package/dist/migrate/from-github/provenance.d.ts +68 -0
  178. package/dist/migrate/from-github/provenance.d.ts.map +1 -0
  179. package/dist/migrate/from-github/rules.d.ts +12 -0
  180. package/dist/migrate/from-github/rules.d.ts.map +1 -0
  181. package/dist/migrate/from-github/security.d.ts +35 -0
  182. package/dist/migrate/from-github/security.d.ts.map +1 -0
  183. package/dist/migrate/from-github/stages.d.ts +34 -0
  184. package/dist/migrate/from-github/stages.d.ts.map +1 -0
  185. package/dist/migrate/from-github/transformer.d.ts +26 -0
  186. package/dist/migrate/from-github/transformer.d.ts.map +1 -0
  187. package/dist/package-cli.d.ts +3 -0
  188. package/dist/package-cli.d.ts.map +1 -0
  189. package/dist/plugin.d.ts +9 -0
  190. package/dist/plugin.d.ts.map +1 -0
  191. package/dist/rules/wgl011.ts +2 -2
  192. package/dist/rules/wgl012.ts +2 -2
  193. package/dist/rules/wgl018.ts +2 -2
  194. package/dist/rules/wgl019.ts +2 -2
  195. package/dist/rules/wgl022.ts +2 -2
  196. package/dist/rules/wgl023.ts +2 -2
  197. package/dist/rules/wgl024.ts +2 -2
  198. package/dist/rules/wgl025.ts +2 -2
  199. package/dist/rules/wgl026.ts +2 -2
  200. package/dist/rules/wgl027.ts +2 -2
  201. package/dist/serializer.d.ts +14 -0
  202. package/dist/serializer.d.ts.map +1 -0
  203. package/dist/testdata/create-fixture.d.ts +7 -0
  204. package/dist/testdata/create-fixture.d.ts.map +1 -0
  205. package/dist/testdata/load-fixtures.d.ts +12 -0
  206. package/dist/testdata/load-fixtures.d.ts.map +1 -0
  207. package/dist/validate-cli.d.ts +3 -0
  208. package/dist/validate-cli.d.ts.map +1 -0
  209. package/dist/validate.d.ts +17 -0
  210. package/dist/validate.d.ts.map +1 -0
  211. package/dist/variables.d.ts +31 -0
  212. package/dist/variables.d.ts.map +1 -0
  213. package/package.json +20 -6
  214. package/src/codegen/parse.ts +2 -2
  215. package/src/lint/post-synth/index.ts +83 -0
  216. package/src/lint/post-synth/wgl011.ts +2 -2
  217. package/src/lint/post-synth/wgl012.ts +2 -2
  218. package/src/lint/post-synth/wgl018.ts +2 -2
  219. package/src/lint/post-synth/wgl019.ts +2 -2
  220. package/src/lint/post-synth/wgl022.ts +2 -2
  221. package/src/lint/post-synth/wgl023.ts +2 -2
  222. package/src/lint/post-synth/wgl024.ts +2 -2
  223. package/src/lint/post-synth/wgl025.ts +2 -2
  224. package/src/lint/post-synth/wgl026.ts +2 -2
  225. package/src/lint/post-synth/wgl027.ts +2 -2
  226. package/src/mcp/context-tools.ts +3 -5
  227. package/src/plugin.ts +2 -3
  228. package/src/serializer.ts +5 -5
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Test fixture loader for the GitLab CI lexicon.
3
+ */
4
+ /**
5
+ * Load the minimal CI schema fixture for offline testing.
6
+ */
7
+ export declare function loadSchemaFixture(): Buffer;
8
+ /**
9
+ * Load the schema fixture as a Map compatible with generatePipeline.
10
+ */
11
+ export declare function loadSchemaFixtureMap(): Map<string, Buffer>;
12
+ //# sourceMappingURL=load-fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"load-fixtures.d.ts","sourceRoot":"","sources":["../../src/testdata/load-fixtures.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAG1C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAI1D"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env tsx
2
+ export {};
3
+ //# sourceMappingURL=validate-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-cli.d.ts","sourceRoot":"","sources":["../src/validate-cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Validate generated lexicon-gitlab artifacts.
3
+ *
4
+ * Thin wrapper around the core validation framework
5
+ * with GitLab-specific configuration.
6
+ */
7
+ import { type ValidateResult } from "@intentius/chant/codegen/validate";
8
+ export type { ValidateCheck, ValidateResult } from "@intentius/chant/codegen/validate";
9
+ /**
10
+ * Validate the generated lexicon-gitlab artifacts.
11
+ *
12
+ * @param opts.basePath - Override the package directory (defaults to lexicon-gitlab package root)
13
+ */
14
+ export declare function validate(opts?: {
15
+ basePath?: string;
16
+ }): Promise<ValidateResult>;
17
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAA4B,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAElG,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAUvF;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,IAAI,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CAQpF"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * GitLab CI/CD predefined variable references.
3
+ *
4
+ * These expand to $CI_* variable strings in the serialized YAML.
5
+ * Provided for type-safe access and autocompletion.
6
+ */
7
+ export declare const CI: {
8
+ readonly CommitBranch: "$CI_COMMIT_BRANCH";
9
+ readonly CommitRef: "$CI_COMMIT_REF_NAME";
10
+ readonly CommitRefSlug: "$CI_COMMIT_REF_SLUG";
11
+ readonly CommitSha: "$CI_COMMIT_SHA";
12
+ readonly CommitTag: "$CI_COMMIT_TAG";
13
+ readonly DefaultBranch: "$CI_DEFAULT_BRANCH";
14
+ readonly Environment: "$CI_ENVIRONMENT_NAME";
15
+ readonly EnvironmentSlug: "$CI_ENVIRONMENT_SLUG";
16
+ readonly JobId: "$CI_JOB_ID";
17
+ readonly JobName: "$CI_JOB_NAME";
18
+ readonly JobStage: "$CI_JOB_STAGE";
19
+ readonly MergeRequestIid: "$CI_MERGE_REQUEST_IID";
20
+ readonly PipelineId: "$CI_PIPELINE_ID";
21
+ readonly PipelineSource: "$CI_PIPELINE_SOURCE";
22
+ readonly ProjectDir: "$CI_PROJECT_DIR";
23
+ readonly ProjectId: "$CI_PROJECT_ID";
24
+ readonly ProjectName: "$CI_PROJECT_NAME";
25
+ readonly ProjectPath: "$CI_PROJECT_PATH";
26
+ readonly Registry: "$CI_REGISTRY";
27
+ readonly RegistryImage: "$CI_REGISTRY_IMAGE";
28
+ readonly RegistryUser: "$CI_REGISTRY_USER";
29
+ readonly RegistryPassword: "$CI_REGISTRY_PASSWORD";
30
+ };
31
+ //# sourceMappingURL=variables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.d.ts","sourceRoot":"","sources":["../src/variables.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;CAuBL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-gitlab",
3
- "version": "0.6.0",
3
+ "version": "0.8.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",
@@ -29,8 +29,21 @@
29
29
  "access": "public"
30
30
  },
31
31
  "exports": {
32
- ".": "./src/index.ts",
33
- "./*": "./src/*.ts",
32
+ ".": {
33
+ "development": "./src/index.ts",
34
+ "types": "./dist/index.d.ts",
35
+ "default": "./src/index.ts"
36
+ },
37
+ "./*": {
38
+ "development": "./src/*.ts",
39
+ "types": "./dist/*.d.ts",
40
+ "default": "./src/*.ts"
41
+ },
42
+ "./lint/post-synth": {
43
+ "development": "./src/lint/post-synth/index.ts",
44
+ "types": "./dist/lint/post-synth/index.d.ts",
45
+ "default": "./src/lint/post-synth/index.ts"
46
+ },
34
47
  "./manifest": "./dist/manifest.json",
35
48
  "./meta": "./dist/meta.json",
36
49
  "./types": "./dist/types/index.d.ts"
@@ -40,7 +53,8 @@
40
53
  "bundle": "tsx src/package-cli.ts",
41
54
  "validate": "tsx src/validate-cli.ts",
42
55
  "docs": "tsx src/codegen/docs-cli.ts",
43
- "prepack": "npm run generate && npm run bundle && npm run validate"
56
+ "prepack": "npm run generate && npm run bundle && npm run validate && npm run build",
57
+ "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json && find dist -type f \\( -name \"*.js\" -o -name \"*.js.map\" \\) -delete"
44
58
  },
45
59
  "devDependencies": {
46
60
  "@intentius/chant": "*",
@@ -48,8 +62,8 @@
48
62
  "typescript": "^5.9.3"
49
63
  },
50
64
  "peerDependencies": {
51
- "@intentius/chant": "^0.1.0",
52
- "@intentius/chant-lexicon-github": "^0.1.0"
65
+ "@intentius/chant": "^0.8.0",
66
+ "@intentius/chant-lexicon-github": "^0.8.0"
53
67
  },
54
68
  "peerDependenciesMeta": {
55
69
  "@intentius/chant-lexicon-github": {
@@ -300,7 +300,7 @@ function resolveSource(schema: CISchema, source: string): CISchemaDefinition | n
300
300
  return findObjectVariant(current.items, schema);
301
301
  }
302
302
  if (!current.properties) return null;
303
- const prop = current.properties[seg];
303
+ const prop: CISchemaProperty | undefined = current.properties[seg];
304
304
  if (!prop) return null;
305
305
  current = prop.$ref ? resolveRef(prop.$ref, schema) : prop;
306
306
  }
@@ -321,7 +321,7 @@ function resolveSource(schema: CISchema, source: string): CISchemaDefinition | n
321
321
  return findObjectVariant(current.items, schema);
322
322
  }
323
323
  if (!current.properties) return null;
324
- const prop = current.properties[seg];
324
+ const prop: CISchemaProperty | undefined = current.properties[seg];
325
325
  if (!prop) return null;
326
326
  current = prop.$ref ? resolveRef(prop.$ref, schema) : prop;
327
327
  }
@@ -0,0 +1,83 @@
1
+ // Code generated by chant generate. DO NOT EDIT.
2
+ import type { PostSynthCheck } from "@intentius/chant/lint/post-synth";
3
+ import { wgl010 } from "./wgl010";
4
+ import { wgl011 } from "./wgl011";
5
+ import { wgl012 } from "./wgl012";
6
+ import { wgl013 } from "./wgl013";
7
+ import { wgl014 } from "./wgl014";
8
+ import { wgl015 } from "./wgl015";
9
+ import { wgl016 } from "./wgl016";
10
+ import { wgl017 } from "./wgl017";
11
+ import { wgl018 } from "./wgl018";
12
+ import { wgl019 } from "./wgl019";
13
+ import { wgl020 } from "./wgl020";
14
+ import { wgl021 } from "./wgl021";
15
+ import { wgl022 } from "./wgl022";
16
+ import { wgl023 } from "./wgl023";
17
+ import { wgl024 } from "./wgl024";
18
+ import { wgl025 } from "./wgl025";
19
+ import { wgl026 } from "./wgl026";
20
+ import { wgl027 } from "./wgl027";
21
+ import { wgl028 } from "./wgl028";
22
+ import { wgl029 } from "./wgl029";
23
+ import { wgl030 } from "./wgl030";
24
+ import { wgl031 } from "./wgl031";
25
+ import { wgl032 } from "./wgl032";
26
+ import { wgl033 } from "./wgl033";
27
+ import { wgl034 } from "./wgl034";
28
+ import { wgl035 } from "./wgl035";
29
+ import { wgl036 } from "./wgl036";
30
+ import { wgl037 } from "./wgl037";
31
+ import { wgl038 } from "./wgl038";
32
+ import { wgl039 } from "./wgl039";
33
+ import { wgl040 } from "./wgl040";
34
+ import { wgl041 } from "./wgl041";
35
+ import { wgl042 } from "./wgl042";
36
+ import { wgl043 } from "./wgl043";
37
+ import { wgl044 } from "./wgl044";
38
+ import { wgl045 } from "./wgl045";
39
+ import { wgl046 } from "./wgl046";
40
+ import { wgl047 } from "./wgl047";
41
+ import { wgl048 } from "./wgl048";
42
+
43
+ export const postSynthChecks: PostSynthCheck[] = [
44
+ wgl010,
45
+ wgl011,
46
+ wgl012,
47
+ wgl013,
48
+ wgl014,
49
+ wgl015,
50
+ wgl016,
51
+ wgl017,
52
+ wgl018,
53
+ wgl019,
54
+ wgl020,
55
+ wgl021,
56
+ wgl022,
57
+ wgl023,
58
+ wgl024,
59
+ wgl025,
60
+ wgl026,
61
+ wgl027,
62
+ wgl028,
63
+ wgl029,
64
+ wgl030,
65
+ wgl031,
66
+ wgl032,
67
+ wgl033,
68
+ wgl034,
69
+ wgl035,
70
+ wgl036,
71
+ wgl037,
72
+ wgl038,
73
+ wgl039,
74
+ wgl040,
75
+ wgl041,
76
+ wgl042,
77
+ wgl043,
78
+ wgl044,
79
+ wgl045,
80
+ wgl046,
81
+ wgl047,
82
+ wgl048,
83
+ ];
@@ -21,10 +21,10 @@ export const wgl011: PostSynthCheck = {
21
21
 
22
22
  for (const [entityName, entity] of ctx.entities) {
23
23
  if (isPropertyDeclarable(entity)) continue;
24
- const entityType = (entity as Record<string, unknown>).entityType as string;
24
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
25
25
  if (entityType !== "GitLab::CI::Job") continue;
26
26
 
27
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
27
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
28
28
  if (!props?.rules || !Array.isArray(props.rules)) continue;
29
29
 
30
30
  const rules = props.rules as Array<Record<string, unknown>>;
@@ -53,11 +53,11 @@ export function checkDeprecatedProperties(
53
53
  for (const [entityName, entity] of ctx.entities) {
54
54
  if (isPropertyDeclarable(entity)) continue;
55
55
 
56
- const entityType = (entity as Record<string, unknown>).entityType as string;
56
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
57
57
  const deprProps = deprecated.get(entityType);
58
58
  if (!deprProps) continue;
59
59
 
60
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
60
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
61
61
  if (!props) continue;
62
62
 
63
63
  for (const propName of Object.keys(props)) {
@@ -17,10 +17,10 @@ export const wgl018: PostSynthCheck = {
17
17
 
18
18
  for (const [entityName, entity] of ctx.entities) {
19
19
  if (isPropertyDeclarable(entity)) continue;
20
- const entityType = (entity as Record<string, unknown>).entityType as string;
20
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
21
21
  if (entityType !== "GitLab::CI::Job") continue;
22
22
 
23
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
23
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
24
24
  if (!props) continue;
25
25
 
26
26
  if (!props.timeout) {
@@ -19,10 +19,10 @@ export const wgl019: PostSynthCheck = {
19
19
 
20
20
  for (const [entityName, entity] of ctx.entities) {
21
21
  if (isPropertyDeclarable(entity)) continue;
22
- const entityType = (entity as Record<string, unknown>).entityType as string;
22
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
23
23
  if (entityType !== "GitLab::CI::Job") continue;
24
24
 
25
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
25
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
26
26
  if (!props) continue;
27
27
 
28
28
  const stage = props.stage as string | undefined;
@@ -18,10 +18,10 @@ export const wgl022: PostSynthCheck = {
18
18
 
19
19
  for (const [entityName, entity] of ctx.entities) {
20
20
  if (isPropertyDeclarable(entity)) continue;
21
- const entityType = (entity as Record<string, unknown>).entityType as string;
21
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
22
22
  if (entityType !== "GitLab::CI::Job") continue;
23
23
 
24
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
24
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
25
25
  if (!props?.artifacts) continue;
26
26
 
27
27
  const artifacts = props.artifacts as Record<string, unknown>;
@@ -18,10 +18,10 @@ export const wgl023: PostSynthCheck = {
18
18
 
19
19
  for (const [entityName, entity] of ctx.entities) {
20
20
  if (isPropertyDeclarable(entity)) continue;
21
- const entityType = (entity as Record<string, unknown>).entityType as string;
21
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
22
22
  if (entityType !== "GitLab::CI::Job") continue;
23
23
 
24
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
24
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
25
25
  if (!props?.rules || !Array.isArray(props.rules)) continue;
26
26
 
27
27
  const rules = props.rules as Array<Record<string, unknown>>;
@@ -18,10 +18,10 @@ export const wgl024: PostSynthCheck = {
18
18
 
19
19
  for (const [entityName, entity] of ctx.entities) {
20
20
  if (isPropertyDeclarable(entity)) continue;
21
- const entityType = (entity as Record<string, unknown>).entityType as string;
21
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
22
22
  if (entityType !== "GitLab::CI::Job") continue;
23
23
 
24
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
24
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
25
25
  if (!props) continue;
26
26
 
27
27
  // Check top-level when: manual
@@ -18,10 +18,10 @@ export const wgl025: PostSynthCheck = {
18
18
 
19
19
  for (const [entityName, entity] of ctx.entities) {
20
20
  if (isPropertyDeclarable(entity)) continue;
21
- const entityType = (entity as Record<string, unknown>).entityType as string;
21
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
22
22
  if (entityType !== "GitLab::CI::Job") continue;
23
23
 
24
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
24
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
25
25
  if (!props?.cache) continue;
26
26
 
27
27
  // Cache can be a single object or an array
@@ -24,10 +24,10 @@ export const wgl026: PostSynthCheck = {
24
24
 
25
25
  for (const [entityName, entity] of ctx.entities) {
26
26
  if (isPropertyDeclarable(entity)) continue;
27
- const entityType = (entity as Record<string, unknown>).entityType as string;
27
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
28
28
  if (entityType !== "GitLab::CI::Job") continue;
29
29
 
30
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
30
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
31
31
  if (!props?.services || !Array.isArray(props.services)) continue;
32
32
 
33
33
  for (const service of props.services) {
@@ -17,10 +17,10 @@ export const wgl027: PostSynthCheck = {
17
17
 
18
18
  for (const [entityName, entity] of ctx.entities) {
19
19
  if (isPropertyDeclarable(entity)) continue;
20
- const entityType = (entity as Record<string, unknown>).entityType as string;
20
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
21
21
  if (entityType !== "GitLab::CI::Job") continue;
22
22
 
23
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
23
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
24
24
  if (!props) continue;
25
25
 
26
26
  const script = props.script;
@@ -11,12 +11,11 @@
11
11
 
12
12
  import { build, type BuildResult } from "@intentius/chant/build";
13
13
  import { runPostSynthChecks, getPrimaryOutput } from "@intentius/chant/lint/post-synth";
14
- import { discoverPostSynthChecks } from "@intentius/chant/lint/discover";
14
+ import { postSynthChecks } from "../lint/post-synth";
15
15
  import { getProvenance } from "@intentius/chant/provenance";
16
16
  import type { McpToolContribution } from "@intentius/chant/mcp/types";
17
- import { dirname, join, relative, isAbsolute, resolve } from "path";
17
+ import { relative, isAbsolute, resolve } from "path";
18
18
  import { readFile } from "fs/promises";
19
- import { fileURLToPath } from "url";
20
19
  import { gitlabSerializer } from "../serializer";
21
20
  import { transform, detectGitHubWorkflow } from "../migrate/from-github";
22
21
  import {
@@ -36,8 +35,7 @@ async function buildGitlab(path: string): Promise<{ yaml: string; result: BuildR
36
35
 
37
36
  /** Discover the lexicon's post-synth checks without depending on the plugin. */
38
37
  function gitlabPostSynthChecks() {
39
- const dir = join(dirname(fileURLToPath(import.meta.url)), "..", "lint", "post-synth");
40
- return discoverPostSynthChecks(dir, import.meta.url);
38
+ return postSynthChecks;
41
39
  }
42
40
 
43
41
  /** Is a component address (`host/group/comp@version`) pinned to a fixed version? */
package/src/plugin.ts CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  import type { LexiconPlugin, IntrinsicDef, InitTemplateSet } from "@intentius/chant/lexicon";
9
9
  import type { LintRule } from "@intentius/chant/lint/rule";
10
- import { discoverPostSynthChecks } from "@intentius/chant/lint/discover";
10
+ import { postSynthChecks as postSynthCheckList } from "./lint/post-synth";
11
11
  import { createSkillsLoader, createDiffTool, createCatalogResource } from "@intentius/chant/lexicon-plugin-helpers";
12
12
  import { join, dirname } from "path";
13
13
  import { fileURLToPath } from "url";
@@ -31,8 +31,7 @@ export const gitlabPlugin: LexiconPlugin = {
31
31
  },
32
32
 
33
33
  postSynthChecks() {
34
- const postSynthDir = join(dirname(fileURLToPath(import.meta.url)), "lint", "post-synth");
35
- return discoverPostSynthChecks(postSynthDir, import.meta.url);
34
+ return postSynthCheckList;
36
35
  },
37
36
 
38
37
  intrinsics(): IntrinsicDef[] {
package/src/serializer.ts CHANGED
@@ -108,7 +108,7 @@ export const gitlabSerializer: Serializer = {
108
108
  for (const [name, entity] of entities) {
109
109
  if (isPropertyDeclarable(entity)) continue; // Skip property-only entities
110
110
 
111
- const entityType = (entity as Record<string, unknown>).entityType as string;
111
+ const entityType = (entity as unknown as Record<string, unknown>).entityType as string;
112
112
  if (entityType === "GitLab::CI::Job") {
113
113
  jobs.push([name, entity]);
114
114
  } else if (entityType === "GitLab::CI::Default") {
@@ -123,7 +123,7 @@ export const gitlabSerializer: Serializer = {
123
123
  // Emit stages (collect from jobs)
124
124
  const stages = new Set<string>();
125
125
  for (const [, entity] of jobs) {
126
- const props = (entity as Record<string, unknown>).props as Record<string, unknown> | undefined;
126
+ const props = (entity as unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
127
127
  if (props?.stage && typeof props.stage === "string") {
128
128
  stages.add(props.stage);
129
129
  }
@@ -135,7 +135,7 @@ export const gitlabSerializer: Serializer = {
135
135
  // Emit defaults
136
136
  for (const [, entity] of defaults) {
137
137
  const converted = toYAMLValue(
138
- (entity as Record<string, unknown>).props,
138
+ (entity as unknown as Record<string, unknown>).props,
139
139
  entityNames,
140
140
  ) as Record<string, unknown> | undefined;
141
141
  if (converted) {
@@ -146,7 +146,7 @@ export const gitlabSerializer: Serializer = {
146
146
  // Emit workflow
147
147
  for (const [, entity] of workflows) {
148
148
  const converted = toYAMLValue(
149
- (entity as Record<string, unknown>).props,
149
+ (entity as unknown as Record<string, unknown>).props,
150
150
  entityNames,
151
151
  ) as Record<string, unknown> | undefined;
152
152
  if (converted) {
@@ -157,7 +157,7 @@ export const gitlabSerializer: Serializer = {
157
157
  // Emit jobs
158
158
  for (const [name, entity] of jobs) {
159
159
  const converted = toYAMLValue(
160
- (entity as Record<string, unknown>).props,
160
+ (entity as unknown as Record<string, unknown>).props,
161
161
  entityNames,
162
162
  ) as Record<string, unknown> | undefined;
163
163
  if (converted) {