@intentius/chant-lexicon-gitlab 0.20.0 → 0.21.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,22 +1,22 @@
1
1
  export declare const Default: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
2
2
  export declare const Job: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
3
3
  export declare const Workflow: new (props: Record<string, unknown>, attributes?: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, string>;
4
- export declare const AllowFailure: new (props: Record<string, unknown>) => Record<string, unknown>;
5
- export declare const Artifacts: new (props: Record<string, unknown>) => Record<string, unknown>;
6
- export declare const AutoCancel: new (props: Record<string, unknown>) => Record<string, unknown>;
7
- export declare const Cache: new (props: Record<string, unknown>) => Record<string, unknown>;
8
- export declare const Environment: new (props: Record<string, unknown>) => Record<string, unknown>;
9
- export declare const Image: new (props: Record<string, unknown>) => Record<string, unknown>;
10
- export declare const Include: new (props: Record<string, unknown>) => Record<string, unknown>;
11
- export declare const Inherit: new (props: Record<string, unknown>) => Record<string, unknown>;
12
- export declare const Need: new (props: Record<string, unknown>) => Record<string, unknown>;
13
- export declare const Parallel: new (props: Record<string, unknown>) => Record<string, unknown>;
14
- export declare const Release: new (props: Record<string, unknown>) => Record<string, unknown>;
15
- export declare const Retry: new (props: Record<string, unknown>) => Record<string, unknown>;
16
- export declare const Rule: new (props: Record<string, unknown>) => Record<string, unknown>;
17
- export declare const Service: new (props: Record<string, unknown>) => Record<string, unknown>;
18
- export declare const Trigger: new (props: Record<string, unknown>) => Record<string, unknown>;
19
- export declare const WorkflowRule: new (props: Record<string, unknown>) => Record<string, unknown>;
4
+ export declare const AllowFailure: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
5
+ export declare const Artifacts: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
6
+ export declare const AutoCancel: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
7
+ export declare const Cache: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
8
+ export declare const Environment: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
9
+ export declare const Image: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
10
+ export declare const Include: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
11
+ export declare const Inherit: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
12
+ export declare const Need: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
13
+ export declare const Parallel: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
14
+ export declare const Release: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
15
+ export declare const Retry: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
16
+ export declare const Rule: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
17
+ export declare const Service: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
18
+ export declare const Trigger: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
19
+ export declare const WorkflowRule: new (props: Record<string, unknown>) => import("packages/core/src").Declarable & Record<string, unknown>;
20
20
  export { reference } from "../intrinsics.js";
21
21
  export { CI } from "../variables.js";
22
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO,+IAAsD,CAAC;AAC3E,eAAO,MAAM,GAAG,+IAAkD,CAAC;AACnE,eAAO,MAAM,QAAQ,+IAAuD,CAAC;AAE7E,eAAO,MAAM,YAAY,iEAAuD,CAAC;AACjF,eAAO,MAAM,SAAS,iEAA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;AACzE,eAAO,MAAM,OAAO,0GAAkD,CAAC;AACvE,eAAO,MAAM,KAAK,0GAAgD,CAAC;AACnE,eAAO,MAAM,IAAI,0GAA+C,CAAC;AACjE,eAAO,MAAM,OAAO,0GAAkD,CAAC;AACvE,eAAO,MAAM,OAAO,0GAAkD,CAAC;AACvE,eAAO,MAAM,YAAY,0GAAuD,CAAC;AAGjF,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "3db621ca961d22beae382f9bdb854d0a7cfa39e70a6e8709ae937878eba4364e",
4
+ "manifest.json": "89e556afc19a0b88869af7f5691376181399d6ba9a1a8154cd288bd41ab3075a",
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": "c5454e5652d3d9d30b0ecd15053b50529baf1bc4902175d3e9341dee7cb5dbed"
55
+ "composite": "2998b4d0b1a747b421f961155f006f2b84b30a950d1b63cfcb13477a582aefda"
56
56
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitlab",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "GitLab",
6
6
  "intrinsics": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-gitlab",
3
- "version": "0.20.0",
3
+ "version": "0.21.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.20.0",
71
- "@intentius/chant-lexicon-github": "^0.20.0",
70
+ "@intentius/chant": "^0.21.0",
71
+ "@intentius/chant-lexicon-github": "^0.21.0",
72
72
  "typescript": "^5.9.3"
73
73
  },
74
74
  "peerDependenciesMeta": {
package/src/serializer.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  import type { Declarable } from "@intentius/chant/declarable";
11
- import { isPropertyDeclarable } from "@intentius/chant/declarable";
11
+ import { isPropertyDeclarable, isResourceDeclarable } from "@intentius/chant/declarable";
12
12
  import type { Serializer } from "@intentius/chant/serializer";
13
13
  import type { LexiconOutput } from "@intentius/chant/lexicon-output";
14
14
  import { walkValue, type SerializerVisitor } from "@intentius/chant/serializer-walker";
@@ -23,7 +23,7 @@ function gitlabVisitor(entityNames: Map<Declarable, string>): SerializerVisitor
23
23
  attrRef: (name, _attr) => name,
24
24
  resourceRef: (name) => name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(),
25
25
  propertyDeclarable: (entity, walk) => {
26
- if (!("props" in entity) || typeof entity.props !== "object" || entity.props === null) {
26
+ if (!isResourceDeclarable(entity) || typeof entity.props !== "object" || entity.props === null) {
27
27
  return undefined;
28
28
  }
29
29
  const props = entity.props as Record<string, unknown>;
@@ -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 unknown as Record<string, unknown>).props as Record<string, unknown> | undefined;
126
+ const props = isResourceDeclarable(entity) ? (entity.props as Record<string, unknown> | undefined) : 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 unknown as Record<string, unknown>).props,
138
+ (isResourceDeclarable(entity) ? entity.props : undefined),
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 unknown as Record<string, unknown>).props,
149
+ (isResourceDeclarable(entity) ? entity.props : undefined),
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 unknown as Record<string, unknown>).props,
160
+ (isResourceDeclarable(entity) ? entity.props : undefined),
161
161
  entityNames,
162
162
  ) as Record<string, unknown> | undefined;
163
163
  if (converted) {