@sleeyax/gitlab-ci-ts 1.0.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/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # gitlab-ci-ts
2
+
3
+ Write your GitLab CI/CD pipelines in TypeScript. Types are automatically generated from the official GitLab CI schema.
4
+
5
+ ## Installation
6
+
7
+ You can install the package via npm or yarn:
8
+
9
+ ```bash
10
+ npm install @sleeyax/gitlab-ci-ts
11
+ # or
12
+ pnpm add @sleeyax/gitlab-ci-ts
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ Here's an example of how to use the library to create a GitLab CI/CD pipeline:
18
+
19
+ ```typescript
20
+ import { Cache, GitLabCI, transformToFile } from "@sleeyax/gitlab-ci-ts";
21
+
22
+ // Reusable caches
23
+ const nodeCache: Cache = {
24
+ key: { files: ["package-lock.json"] },
25
+ paths: [".npm/"],
26
+ };
27
+
28
+ const distCache: Cache = {
29
+ key: "$CI_COMMIT_REF_SLUG-dist",
30
+ paths: ["dist/"],
31
+ };
32
+
33
+ // General-purpose pipeline
34
+ export const pipeline: GitLabCI = {
35
+ default: {
36
+ image: "node:20",
37
+ cache: [nodeCache],
38
+ },
39
+
40
+ variables: {
41
+ GIT_DEPTH: 0,
42
+ },
43
+
44
+ stages: ["verify", "test", "build", "deploy"],
45
+
46
+ jobs: {
47
+ // Hidden job to share install steps
48
+ ".install": {
49
+ stage: "verify",
50
+ before_script: ["npm ci --prefer-offline --no-audit --if-present"],
51
+ interruptible: true,
52
+ cache: [nodeCache],
53
+ },
54
+
55
+ lint: {
56
+ extends: ".install",
57
+ stage: "verify",
58
+ script: ["npm run lint --if-present"],
59
+ rules: [{ if: "$CI" }],
60
+ },
61
+
62
+ test: {
63
+ extends: ".install",
64
+ stage: "test",
65
+ script: ["npm test --if-present"],
66
+ artifacts: { reports: { junit: "reports/junit.xml" } },
67
+ },
68
+
69
+ build: {
70
+ extends: ".install",
71
+ stage: "build",
72
+ script: ["npm run build --if-present"],
73
+ cache: [distCache, nodeCache],
74
+ artifacts: { paths: ["dist/"] },
75
+ },
76
+
77
+ // Optional: containerize and push (works with GitLab Container Registry)
78
+ docker_push: {
79
+ image: "docker:28",
80
+ services: ["docker:28-dind"],
81
+ stage: "deploy",
82
+ before_script: [
83
+ 'echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin',
84
+ ],
85
+ script: [
86
+ "docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA .",
87
+ "docker push $CI_REGISTRY_IMAGE --all-tags",
88
+ ],
89
+ rules: [{ if: "$CI" }],
90
+ },
91
+ },
92
+ };
93
+
94
+ // Write .gitlab-ci.yml
95
+ await transformToFile(pipeline, ".gitlab-ci.yml");
96
+ ```
97
+
98
+ The above code defines a GitLab CI/CD pipeline with stages for verification, testing, building, and deployment. It includes reusable cache configurations and a hidden job for installation steps. The final step writes the generated pipeline configuration to a `.gitlab-ci.yml` file, which can be used directly by GitLab CI/CD.
99
+
100
+ ## Developers
101
+
102
+ Information for developers who (want to) contribute to the project.
103
+
104
+ ### Sync schema
105
+
106
+ You can regenerate the types from the latest GitLab CI schema with:
107
+
108
+ ```bash
109
+ pnpm run generate-types
110
+ ```
111
+
112
+ #### Schema sources
113
+
114
+ - https://gitlab.com/gitlab-org/gitlab-foss/-/blob/53b1d7b11d91266febc9fcfcdba80f98ab28ab29/app/assets/javascripts/editor/schema/ci.json
package/dist/ci.d.ts ADDED
@@ -0,0 +1,1118 @@
1
+ export type Services = (string | {
2
+ /**
3
+ * Full name of the image that should be used. It should contain the Registry part if needed.
4
+ */
5
+ name: string;
6
+ /**
7
+ * @minItems 1
8
+ */
9
+ entrypoint?: string[];
10
+ docker?: {
11
+ /**
12
+ * Image architecture to pull.
13
+ */
14
+ platform?: string;
15
+ /**
16
+ * Username or UID to use for the container.
17
+ */
18
+ user?: string;
19
+ };
20
+ kubernetes?: {
21
+ /**
22
+ * Username or UID to use for the container. It also supports the UID:GID format.
23
+ */
24
+ user?: string | number;
25
+ };
26
+ pull_policy?: ("always" | "never" | "if-not-present") | ("always" | "never" | "if-not-present")[];
27
+ command?: string | (string | string[])[];
28
+ alias?: string;
29
+ variables?: JobVariables;
30
+ })[];
31
+ export type Reference = string[];
32
+ export type Artifacts = {
33
+ /**
34
+ * @minItems 1
35
+ */
36
+ paths?: string[];
37
+ /**
38
+ * @minItems 1
39
+ */
40
+ exclude?: string[];
41
+ expose_as?: string;
42
+ name?: string;
43
+ untracked?: boolean;
44
+ when?: "on_success" | "on_failure" | "always";
45
+ access?: "none" | "developer" | "all";
46
+ expire_in?: string;
47
+ reports?: {
48
+ /**
49
+ * Path to JSON file with accessibility report.
50
+ */
51
+ accessibility?: string;
52
+ /**
53
+ * Path to JSON file with annotations report.
54
+ */
55
+ annotations?: string;
56
+ /**
57
+ * Path for file(s) that should be parsed as JUnit XML result
58
+ */
59
+ junit?: string | string[];
60
+ /**
61
+ * Path to a single file with browser performance metric report(s).
62
+ */
63
+ browser_performance?: string;
64
+ /**
65
+ * Used to collect coverage reports from the job.
66
+ */
67
+ coverage_report?: {
68
+ /**
69
+ * Code coverage format used by the test framework.
70
+ */
71
+ coverage_format?: "cobertura" | "jacoco";
72
+ /**
73
+ * Path to the coverage report file that should be parsed.
74
+ */
75
+ path?: string;
76
+ } | null;
77
+ /**
78
+ * Path to file or list of files with code quality report(s) (such as Code Climate).
79
+ */
80
+ codequality?: string | string[];
81
+ /**
82
+ * Path to file or list of files containing runtime-created variables for this job.
83
+ */
84
+ dotenv?: string | string[];
85
+ /**
86
+ * Path to file or list of files containing code intelligence (Language Server Index Format).
87
+ */
88
+ lsif?: string | string[];
89
+ /**
90
+ * Path to file or list of files with SAST vulnerabilities report(s).
91
+ */
92
+ sast?: string | string[];
93
+ /**
94
+ * Path to file or list of files with Dependency scanning vulnerabilities report(s).
95
+ */
96
+ dependency_scanning?: string | string[];
97
+ /**
98
+ * Path to file or list of files with Container scanning vulnerabilities report(s).
99
+ */
100
+ container_scanning?: string | string[];
101
+ /**
102
+ * Path to file or list of files with DAST vulnerabilities report(s).
103
+ */
104
+ dast?: string | string[];
105
+ /**
106
+ * Deprecated in 12.8: Path to file or list of files with license report(s).
107
+ */
108
+ license_management?: string | string[];
109
+ /**
110
+ * Path to file or list of files with license report(s).
111
+ */
112
+ license_scanning?: string | string[];
113
+ /**
114
+ * Path to file or list of files with requirements report(s).
115
+ */
116
+ requirements?: string | string[];
117
+ /**
118
+ * Path to file or list of files with secret detection report(s).
119
+ */
120
+ secret_detection?: string | string[];
121
+ /**
122
+ * Path to file or list of files with custom metrics report(s).
123
+ */
124
+ metrics?: string | string[];
125
+ /**
126
+ * Path to file or list of files with terraform plan(s).
127
+ */
128
+ terraform?: string | string[];
129
+ cyclonedx?: string | string[];
130
+ load_performance?: string | string[];
131
+ /**
132
+ * Path to file or list of files with Repository X-Ray report(s).
133
+ */
134
+ repository_xray?: string | string[];
135
+ };
136
+ } & Artifacts1;
137
+ export type Artifacts1 = {
138
+ /**
139
+ * @minItems 1
140
+ */
141
+ paths?: string[];
142
+ /**
143
+ * @minItems 1
144
+ */
145
+ exclude?: string[];
146
+ expose_as?: string;
147
+ name?: string;
148
+ untracked?: boolean;
149
+ when?: "on_success" | "on_failure" | "always";
150
+ access?: "none" | "developer" | "all";
151
+ expire_in?: string;
152
+ reports?: {
153
+ /**
154
+ * Path to JSON file with accessibility report.
155
+ */
156
+ accessibility?: string;
157
+ /**
158
+ * Path to JSON file with annotations report.
159
+ */
160
+ annotations?: string;
161
+ /**
162
+ * Path for file(s) that should be parsed as JUnit XML result
163
+ */
164
+ junit?: string | string[];
165
+ /**
166
+ * Path to a single file with browser performance metric report(s).
167
+ */
168
+ browser_performance?: string;
169
+ /**
170
+ * Used to collect coverage reports from the job.
171
+ */
172
+ coverage_report?: {
173
+ /**
174
+ * Code coverage format used by the test framework.
175
+ */
176
+ coverage_format?: "cobertura" | "jacoco";
177
+ /**
178
+ * Path to the coverage report file that should be parsed.
179
+ */
180
+ path?: string;
181
+ } | null;
182
+ /**
183
+ * Path to file or list of files with code quality report(s) (such as Code Climate).
184
+ */
185
+ codequality?: string | string[];
186
+ /**
187
+ * Path to file or list of files containing runtime-created variables for this job.
188
+ */
189
+ dotenv?: string | string[];
190
+ /**
191
+ * Path to file or list of files containing code intelligence (Language Server Index Format).
192
+ */
193
+ lsif?: string | string[];
194
+ /**
195
+ * Path to file or list of files with SAST vulnerabilities report(s).
196
+ */
197
+ sast?: string | string[];
198
+ /**
199
+ * Path to file or list of files with Dependency scanning vulnerabilities report(s).
200
+ */
201
+ dependency_scanning?: string | string[];
202
+ /**
203
+ * Path to file or list of files with Container scanning vulnerabilities report(s).
204
+ */
205
+ container_scanning?: string | string[];
206
+ /**
207
+ * Path to file or list of files with DAST vulnerabilities report(s).
208
+ */
209
+ dast?: string | string[];
210
+ /**
211
+ * Deprecated in 12.8: Path to file or list of files with license report(s).
212
+ */
213
+ license_management?: string | string[];
214
+ /**
215
+ * Path to file or list of files with license report(s).
216
+ */
217
+ license_scanning?: string | string[];
218
+ /**
219
+ * Path to file or list of files with requirements report(s).
220
+ */
221
+ requirements?: string | string[];
222
+ /**
223
+ * Path to file or list of files with secret detection report(s).
224
+ */
225
+ secret_detection?: string | string[];
226
+ /**
227
+ * Path to file or list of files with custom metrics report(s).
228
+ */
229
+ metrics?: string | string[];
230
+ /**
231
+ * Path to file or list of files with terraform plan(s).
232
+ */
233
+ terraform?: string | string[];
234
+ cyclonedx?: string | string[];
235
+ load_performance?: string | string[];
236
+ /**
237
+ * Path to file or list of files with Repository X-Ray report(s).
238
+ */
239
+ repository_xray?: string | string[];
240
+ };
241
+ } | null;
242
+ export type Cache = CacheItem | CacheItem[];
243
+ export type Image = string | {
244
+ /**
245
+ * Full name of the image that should be used. It should contain the Registry part if needed.
246
+ */
247
+ name: string;
248
+ /**
249
+ * Command or script that should be executed as the container's entrypoint. It will be translated to Docker's --entrypoint option while creating the container. The syntax is similar to Dockerfile's ENTRYPOINT directive, where each shell token is a separate string in the array.
250
+ *
251
+ * @minItems 1
252
+ */
253
+ entrypoint?: unknown[];
254
+ docker?: {
255
+ /**
256
+ * Image architecture to pull.
257
+ */
258
+ platform?: string;
259
+ /**
260
+ * Username or UID to use for the container.
261
+ */
262
+ user?: string;
263
+ };
264
+ kubernetes?: {
265
+ /**
266
+ * Username or UID to use for the container. It also supports the UID:GID format.
267
+ */
268
+ user?: string | number;
269
+ };
270
+ pull_policy?: ("always" | "never" | "if-not-present") | ("always" | "never" | "if-not-present")[];
271
+ };
272
+ export type Interruptible = boolean;
273
+ export type Identity = "google_cloud";
274
+ export type Retry = RetryMax | {
275
+ max?: RetryMax;
276
+ when?: RetryErrors | RetryErrors[];
277
+ exit_codes?: number[] | number;
278
+ };
279
+ /**
280
+ * The number of times the job will be retried if it fails. Defaults to 0 and can max be retried 2 times (3 times total).
281
+ */
282
+ export type RetryMax = number;
283
+ export type RetryErrors = "always" | "unknown_failure" | "script_failure" | "api_failure" | "stuck_or_timeout_failure" | "runner_system_failure" | "runner_unsupported" | "stale_schedule" | "job_execution_timeout" | "archived_failure" | "unmet_prerequisites" | "scheduler_failure" | "data_integrity_failure";
284
+ export type Services1 = (string | {
285
+ /**
286
+ * Full name of the image that should be used. It should contain the Registry part if needed.
287
+ */
288
+ name: string;
289
+ /**
290
+ * @minItems 1
291
+ */
292
+ entrypoint?: string[];
293
+ docker?: {
294
+ /**
295
+ * Image architecture to pull.
296
+ */
297
+ platform?: string;
298
+ /**
299
+ * Username or UID to use for the container.
300
+ */
301
+ user?: string;
302
+ };
303
+ kubernetes?: {
304
+ /**
305
+ * Username or UID to use for the container. It also supports the UID:GID format.
306
+ */
307
+ user?: string | number;
308
+ };
309
+ pull_policy?: ("always" | "never" | "if-not-present") | ("always" | "never" | "if-not-present")[];
310
+ command?: string | (string | string[])[];
311
+ alias?: string;
312
+ variables?: JobVariables;
313
+ })[];
314
+ /**
315
+ * @minItems 1
316
+ */
317
+ export type Tags = (string | string[])[];
318
+ export type Timeout = string;
319
+ export type IncludeItem = ({
320
+ [k: string]: unknown;
321
+ } & string) | {
322
+ /**
323
+ * Relative path from local repository root (`/`) to the `yaml`/`yml` file template. The file must be on the same branch, and does not work across git submodules.
324
+ */
325
+ local: string;
326
+ rules?: IncludeRules;
327
+ inputs?: Inputs;
328
+ } | {
329
+ /**
330
+ * Path to the project, e.g. `group/project`, or `group/sub-group/project` [Learn more](https://docs.gitlab.com/ci/yaml/#includeproject).
331
+ */
332
+ project: string;
333
+ /**
334
+ * Branch/Tag/Commit-hash for the target project.
335
+ */
336
+ ref?: string;
337
+ file: string | string[];
338
+ rules?: IncludeRules;
339
+ inputs?: Inputs;
340
+ } | {
341
+ /**
342
+ * Use a `.gitlab-ci.yml` template as a base, e.g. `Nodejs.gitlab-ci.yml`.
343
+ */
344
+ template: string;
345
+ rules?: IncludeRules;
346
+ inputs?: Inputs;
347
+ } | {
348
+ /**
349
+ * Local path to component directory or full path to external component directory.
350
+ */
351
+ component: string;
352
+ rules?: IncludeRules;
353
+ inputs?: Inputs;
354
+ } | {
355
+ /**
356
+ * URL to a `yaml`/`yml` template file using HTTP/HTTPS.
357
+ */
358
+ remote: string;
359
+ /**
360
+ * SHA256 integrity hash of the remote file content.
361
+ */
362
+ integrity?: string;
363
+ rules?: IncludeRules;
364
+ inputs?: Inputs;
365
+ };
366
+ export type IncludeRules = ({
367
+ if?: If;
368
+ changes?: Changes;
369
+ exists?: Exists;
370
+ when?: ("never" | "always") | null;
371
+ } | string | string[])[] | null;
372
+ export type If = string;
373
+ export type Changes = {
374
+ /**
375
+ * List of file paths.
376
+ */
377
+ paths: string[];
378
+ /**
379
+ * Ref for comparing changes.
380
+ */
381
+ compare_to?: string;
382
+ } | string[];
383
+ export type Exists = string[] | {
384
+ /**
385
+ * List of file paths.
386
+ */
387
+ paths: string[];
388
+ /**
389
+ * Path of the project to search in.
390
+ */
391
+ project?: string;
392
+ } | {
393
+ /**
394
+ * List of file paths.
395
+ */
396
+ paths: string[];
397
+ /**
398
+ * Path of the project to search in.
399
+ */
400
+ project: string;
401
+ /**
402
+ * Ref of the project to search in.
403
+ */
404
+ ref?: string;
405
+ };
406
+ export type JobTemplate = {
407
+ image?: Image;
408
+ services?: Services1;
409
+ before_script?: string | (string | string[])[];
410
+ after_script?: string | (string | string[])[];
411
+ hooks?: Hooks;
412
+ rules?: Rules;
413
+ variables?: JobVariables1;
414
+ cache?: Cache;
415
+ id_tokens?: IdTokens;
416
+ identity?: Identity;
417
+ inputs?: JobInputs;
418
+ secrets?: Secrets;
419
+ script?: string | (string | string[])[];
420
+ run?: Steps;
421
+ /**
422
+ * Define what stage the job will run in.
423
+ */
424
+ stage?: string | string[];
425
+ /**
426
+ * Job will run *only* when these filtering options match.
427
+ */
428
+ only?: null | FilterRefs | {
429
+ refs?: FilterRefs;
430
+ /**
431
+ * Filter job based on if Kubernetes integration is active.
432
+ */
433
+ kubernetes?: "active";
434
+ variables?: string[];
435
+ /**
436
+ * Filter job creation based on files that were modified in a git push.
437
+ */
438
+ changes?: string[];
439
+ };
440
+ /**
441
+ * The name of one or more jobs to inherit configuration from.
442
+ */
443
+ extends?: string | string[];
444
+ /**
445
+ * The list of jobs in previous stages whose sole completion is needed to start the current job.
446
+ */
447
+ needs?: (string | {
448
+ job: string;
449
+ artifacts?: boolean;
450
+ optional?: boolean;
451
+ parallel?: ParallelMatrix;
452
+ } | {
453
+ pipeline: string;
454
+ job: string;
455
+ artifacts?: boolean;
456
+ parallel?: ParallelMatrix;
457
+ } | {
458
+ job: string;
459
+ project: string;
460
+ ref: string;
461
+ artifacts?: boolean;
462
+ parallel?: ParallelMatrix;
463
+ } | Reference)[];
464
+ /**
465
+ * Job will run *except* for when these filtering options match.
466
+ */
467
+ except?: null | FilterRefs | {
468
+ refs?: FilterRefs;
469
+ /**
470
+ * Filter job based on if Kubernetes integration is active.
471
+ */
472
+ kubernetes?: "active";
473
+ variables?: string[];
474
+ /**
475
+ * Filter job creation based on files that were modified in a git push.
476
+ */
477
+ changes?: string[];
478
+ };
479
+ tags?: Tags;
480
+ allow_failure?: AllowFailure;
481
+ timeout?: Timeout;
482
+ when?: When;
483
+ start_in?: StartIn;
484
+ manual_confirmation?: string;
485
+ /**
486
+ * Specify a list of job names from earlier stages from which artifacts should be loaded. By default, all previous artifacts are passed. Use an empty array to skip downloading artifacts.
487
+ */
488
+ dependencies?: string[];
489
+ artifacts?: Artifacts;
490
+ /**
491
+ * Used to associate environment metadata with a deploy. Environment can have a name and URL attached to it, and will be displayed under /environments under the project.
492
+ */
493
+ environment?: string | {
494
+ /**
495
+ * The name of the environment, e.g. 'qa', 'staging', 'production'.
496
+ */
497
+ name: string;
498
+ /**
499
+ * When set, this will expose buttons in various places for the current environment in GitLab, that will take you to the defined URL.
500
+ */
501
+ url?: string;
502
+ /**
503
+ * The name of a job to execute when the environment is about to be stopped.
504
+ */
505
+ on_stop?: string;
506
+ /**
507
+ * Specifies what this job will do. 'start' (default) indicates the job will start the deployment. 'prepare'/'verify'/'access' indicates this will not affect the deployment. 'stop' indicates this will stop the deployment.
508
+ */
509
+ action?: "start" | "prepare" | "stop" | "verify" | "access";
510
+ /**
511
+ * The amount of time it should take before GitLab will automatically stop the environment. Supports a wide variety of formats, e.g. '1 week', '3 mins 4 sec', '2 hrs 20 min', '2h20min', '6 mos 1 day', '47 yrs 6 mos and 4d', '3 weeks and 2 days'.
512
+ */
513
+ auto_stop_in?: string;
514
+ /**
515
+ * Used to configure the kubernetes deployment for this environment. This is currently not supported for kubernetes clusters that are managed by GitLab.
516
+ */
517
+ kubernetes?: {
518
+ /**
519
+ * Specifies the GitLab Agent for Kubernetes. The format is `path/to/agent/project:agent-name`.
520
+ */
521
+ agent?: string;
522
+ /**
523
+ * Deprecated. Use `dashboard.namespace` instead. The kubernetes namespace where this environment's dashboard should be deployed to.
524
+ */
525
+ namespace?: string;
526
+ /**
527
+ * Deprecated. Use `dashboard.flux_resource_path` instead. The Flux resource path to associate with this environment. This must be the full resource path. For example, 'helm.toolkit.fluxcd.io/v2/namespaces/gitlab-agent/helmreleases/gitlab-agent'.
528
+ */
529
+ flux_resource_path?: string;
530
+ /**
531
+ * Used to configure the managed resources for this environment.
532
+ */
533
+ managed_resources?: {
534
+ /**
535
+ * Indicates whether the managed resources are enabled for this environment.
536
+ */
537
+ enabled?: boolean;
538
+ };
539
+ /**
540
+ * Used to configure the dashboard for this environment.
541
+ */
542
+ dashboard?: {
543
+ /**
544
+ * The kubernetes namespace where the dashboard for this environment should be deployed to.
545
+ */
546
+ namespace?: string;
547
+ /**
548
+ * The Flux resource path to associate with this environment. This must be the full resource path. For example, 'helm.toolkit.fluxcd.io/v2/namespaces/gitlab-agent/helmreleases/gitlab-agent'.
549
+ */
550
+ flux_resource_path?: string;
551
+ };
552
+ };
553
+ /**
554
+ * Explicitly specifies the tier of the deployment environment if non-standard environment name is used.
555
+ */
556
+ deployment_tier?: string;
557
+ };
558
+ /**
559
+ * Indicates that the job creates a Release.
560
+ */
561
+ release?: {
562
+ /**
563
+ * The tag_name must be specified. It can refer to an existing Git tag or can be specified by the user.
564
+ */
565
+ tag_name: string;
566
+ /**
567
+ * Message to use if creating a new annotated tag.
568
+ */
569
+ tag_message?: string;
570
+ /**
571
+ * Specifies the longer description of the Release.
572
+ */
573
+ description: string;
574
+ /**
575
+ * The Release name. If omitted, it is populated with the value of release: tag_name.
576
+ */
577
+ name?: string;
578
+ /**
579
+ * If the release: tag_name doesn’t exist yet, the release is created from ref. ref can be a commit SHA, another tag name, or a branch name.
580
+ */
581
+ ref?: string;
582
+ /**
583
+ * The title of each milestone the release is associated with.
584
+ */
585
+ milestones?: string[];
586
+ /**
587
+ * The date and time when the release is ready. Defaults to the current date and time if not defined. Should be enclosed in quotes and expressed in ISO 8601 format.
588
+ */
589
+ released_at?: string;
590
+ assets?: {
591
+ /**
592
+ * Include asset links in the release.
593
+ *
594
+ * @minItems 1
595
+ */
596
+ links: {
597
+ /**
598
+ * The name of the link.
599
+ */
600
+ name: string;
601
+ /**
602
+ * The URL to download a file.
603
+ */
604
+ url: string;
605
+ /**
606
+ * The redirect link to the url.
607
+ */
608
+ filepath?: string;
609
+ /**
610
+ * The content kind of what users can download via url.
611
+ */
612
+ link_type?: "runbook" | "package" | "image" | "other";
613
+ }[];
614
+ };
615
+ };
616
+ /**
617
+ * Must be a regular expression, optionally but recommended to be quoted, and must be surrounded with '/'. Example: '/Code coverage: \d+\.\d+/'
618
+ */
619
+ coverage?: string;
620
+ retry?: Retry;
621
+ parallel?: Parallel;
622
+ interruptible?: Interruptible;
623
+ /**
624
+ * Limit job concurrency. Can be used to ensure that the Runner will not run certain jobs simultaneously.
625
+ */
626
+ resource_group?: string;
627
+ trigger?: {
628
+ /**
629
+ * Path to the project, e.g. `group/project`, or `group/sub-group/project`.
630
+ */
631
+ project: string;
632
+ /**
633
+ * The branch name that a downstream pipeline will use
634
+ */
635
+ branch?: string;
636
+ /**
637
+ * You can mirror or depend on the pipeline status from the triggered pipeline to the source bridge job by using strategy: `depend` or `mirror`
638
+ */
639
+ strategy?: "depend" | "mirror";
640
+ inputs?: Inputs;
641
+ /**
642
+ * Specify what to forward to the downstream pipeline.
643
+ */
644
+ forward?: {
645
+ /**
646
+ * Variables defined in the trigger job are passed to downstream pipelines.
647
+ */
648
+ yaml_variables?: boolean;
649
+ /**
650
+ * Variables added for manual pipeline runs and scheduled pipelines are passed to downstream pipelines.
651
+ */
652
+ pipeline_variables?: boolean;
653
+ };
654
+ } | {
655
+ include?: string | ({
656
+ /**
657
+ * Relative path from local repository root (`/`) to the local YAML file to define the pipeline configuration.
658
+ */
659
+ local: string;
660
+ inputs?: Inputs;
661
+ } | {
662
+ /**
663
+ * Name of the template YAML file to use in the pipeline configuration.
664
+ */
665
+ template: string;
666
+ inputs?: Inputs;
667
+ } | {
668
+ /**
669
+ * Relative path to the generated YAML file which is extracted from the artifacts and used as the configuration for triggering the child pipeline.
670
+ */
671
+ artifact: string;
672
+ /**
673
+ * Job name which generates the artifact
674
+ */
675
+ job: string;
676
+ inputs?: Inputs;
677
+ } | {
678
+ /**
679
+ * Path to another private project under the same GitLab instance, like `group/project` or `group/sub-group/project`.
680
+ */
681
+ project: string;
682
+ /**
683
+ * Branch/Tag/Commit hash for the target project.
684
+ */
685
+ ref?: string;
686
+ /**
687
+ * Relative path from repository root (`/`) to the pipeline configuration YAML file.
688
+ */
689
+ file: string;
690
+ inputs?: Inputs;
691
+ } | {
692
+ /**
693
+ * Local path to component directory or full path to external component directory.
694
+ */
695
+ component: string;
696
+ inputs?: Inputs;
697
+ } | {
698
+ /**
699
+ * URL to a `yaml`/`yml` template file using HTTP/HTTPS.
700
+ */
701
+ remote: string;
702
+ inputs?: Inputs;
703
+ })[];
704
+ /**
705
+ * You can mirror or depend on the pipeline status from the triggered pipeline to the source bridge job by using strategy: `depend` or `mirror`
706
+ */
707
+ strategy?: "depend" | "mirror";
708
+ /**
709
+ * Specify what to forward to the downstream pipeline.
710
+ */
711
+ forward?: {
712
+ /**
713
+ * Variables defined in the trigger job are passed to downstream pipelines.
714
+ */
715
+ yaml_variables?: boolean;
716
+ /**
717
+ * Variables added for manual pipeline runs and scheduled pipelines are passed to downstream pipelines.
718
+ */
719
+ pipeline_variables?: boolean;
720
+ };
721
+ } | string;
722
+ inherit?: {
723
+ default?: boolean | ("after_script" | "artifacts" | "before_script" | "cache" | "image" | "interruptible" | "retry" | "services" | "tags" | "timeout")[];
724
+ variables?: boolean | string[];
725
+ };
726
+ /**
727
+ * Deprecated. Use `pages.publish` instead. A path to a directory that contains the files to be published with Pages.
728
+ */
729
+ publish?: string;
730
+ pages?: {
731
+ path_prefix?: string;
732
+ expire_in?: string;
733
+ publish?: string;
734
+ } | boolean;
735
+ } & JobTemplate1;
736
+ export type Rules = ({
737
+ if?: If;
738
+ changes?: Changes;
739
+ exists?: Exists;
740
+ variables?: RulesVariables;
741
+ when?: When;
742
+ start_in?: StartIn;
743
+ allow_failure?: AllowFailure;
744
+ needs?: RulesNeeds;
745
+ interruptible?: Interruptible;
746
+ } | string | string[])[] | null;
747
+ export type When = "on_success" | "on_failure" | "always" | "never" | "manual" | "delayed";
748
+ export type StartIn = string;
749
+ export type AllowFailure = boolean | {
750
+ exit_codes: number;
751
+ } | {
752
+ /**
753
+ * @minItems 1
754
+ */
755
+ exit_codes: number[];
756
+ };
757
+ export type RulesNeeds = (string | {
758
+ /**
759
+ * Name of a job that is defined in the pipeline.
760
+ */
761
+ job: string;
762
+ /**
763
+ * Download artifacts of the job in needs.
764
+ */
765
+ artifacts?: boolean;
766
+ /**
767
+ * Whether the job needs to be present in the pipeline to run ahead of the current job.
768
+ */
769
+ optional?: boolean;
770
+ })[];
771
+ /**
772
+ * Any of these step use cases are valid.
773
+ */
774
+ export type Step = {
775
+ name: StepName;
776
+ env?: StepNamedStrings;
777
+ inputs?: StepNamedValues;
778
+ step: string | StepGitReference | StepOciReference;
779
+ } | {
780
+ env?: StepNamedStrings;
781
+ run: Step[];
782
+ outputs?: StepNamedValues;
783
+ delegate?: string;
784
+ } | {
785
+ name: StepName;
786
+ env?: StepNamedStrings;
787
+ inputs?: StepNamedValues;
788
+ action: string;
789
+ } | {
790
+ name: StepName;
791
+ env?: StepNamedStrings;
792
+ script: string;
793
+ } | {
794
+ env?: StepNamedStrings;
795
+ exec: StepExec;
796
+ };
797
+ export type StepName = string;
798
+ export type Steps = Step[];
799
+ /**
800
+ * Filter job by different keywords that determine origin or state, or by supplying string/regex to check against branch/tag names.
801
+ */
802
+ export type FilterRefs = (("branches" | "tags" | "api" | "external" | "pipelines" | "pushes" | "schedules" | "triggers" | "web") | string)[];
803
+ /**
804
+ * Use the `needs:parallel:matrix` keyword to specify parallelized jobs needed to be completed for the job to run. [Learn More](https://docs.gitlab.com/ci/yaml/#needsparallelmatrix)
805
+ */
806
+ export type ParallelMatrix = {
807
+ /**
808
+ * Defines different variables for jobs that are running in parallel.
809
+ *
810
+ * @maxItems 200
811
+ */
812
+ matrix: {
813
+ [k: string]: string | number | unknown[];
814
+ }[];
815
+ };
816
+ /**
817
+ * Splits up a single job into multiple that run in parallel. Provides `CI_NODE_INDEX` and `CI_NODE_TOTAL` environment variables to the jobs.
818
+ */
819
+ export type Parallel = number | {
820
+ /**
821
+ * Defines different variables for jobs that are running in parallel.
822
+ *
823
+ * @maxItems 200
824
+ */
825
+ matrix: {
826
+ [k: string]: string | number | unknown[];
827
+ }[];
828
+ };
829
+ export type JobTemplate1 = {
830
+ when: "delayed";
831
+ } | {
832
+ when?: {
833
+ [k: string]: unknown;
834
+ };
835
+ };
836
+ export type WorkflowName = string;
837
+ export type Job = JobTemplate;
838
+ export interface GitLabCI {
839
+ $schema?: string;
840
+ spec?: {
841
+ inputs?: ConfigInputs;
842
+ };
843
+ image?: string | {
844
+ /**
845
+ * Full name of the image that should be used. It should contain the Registry part if needed.
846
+ */
847
+ name: string;
848
+ /**
849
+ * Command or script that should be executed as the container's entrypoint. It will be translated to Docker's --entrypoint option while creating the container. The syntax is similar to Dockerfile's ENTRYPOINT directive, where each shell token is a separate string in the array.
850
+ *
851
+ * @minItems 1
852
+ */
853
+ entrypoint?: unknown[];
854
+ docker?: {
855
+ /**
856
+ * Image architecture to pull.
857
+ */
858
+ platform?: string;
859
+ /**
860
+ * Username or UID to use for the container.
861
+ */
862
+ user?: string;
863
+ };
864
+ kubernetes?: {
865
+ /**
866
+ * Username or UID to use for the container. It also supports the UID:GID format.
867
+ */
868
+ user?: string | number;
869
+ };
870
+ pull_policy?: ("always" | "never" | "if-not-present") | ("always" | "never" | "if-not-present")[];
871
+ };
872
+ services?: Services;
873
+ before_script?: string | (string | string[])[];
874
+ after_script?: string | (string | string[])[];
875
+ variables?: GlobalVariables;
876
+ cache?: CacheItem | CacheItem[];
877
+ "!reference"?: Reference;
878
+ default?: {
879
+ after_script?: string | (string | string[])[];
880
+ artifacts?: Artifacts;
881
+ before_script?: string | (string | string[])[];
882
+ hooks?: Hooks;
883
+ cache?: Cache;
884
+ image?: Image;
885
+ interruptible?: Interruptible;
886
+ id_tokens?: IdTokens;
887
+ identity?: Identity;
888
+ retry?: Retry;
889
+ services?: Services1;
890
+ tags?: Tags;
891
+ timeout?: Timeout;
892
+ "!reference"?: Reference;
893
+ };
894
+ /**
895
+ * @minItems 1
896
+ */
897
+ stages?: (string | string[])[];
898
+ include?: IncludeItem | IncludeItem[];
899
+ pages?: JobTemplate;
900
+ workflow?: {
901
+ name?: WorkflowName;
902
+ auto_cancel?: WorkflowAutoCancel;
903
+ rules?: ({} | string[])[];
904
+ };
905
+ jobs: Record<string, Job>;
906
+ }
907
+ export interface ConfigInputs {
908
+ /**
909
+ * This interface was referenced by `ConfigInputs`'s JSON-Schema definition
910
+ * via the `patternProperty` ".*".
911
+ */
912
+ [k: string]: (BaseInput & {
913
+ rules?: {}[];
914
+ } & {
915
+ [k: string]: unknown;
916
+ }) | null;
917
+ }
918
+ export interface BaseInput {
919
+ type?: "array" | "boolean" | "number" | "string";
920
+ description?: string;
921
+ options?: (string | number | boolean)[];
922
+ regex?: string;
923
+ default?: {
924
+ [k: string]: unknown;
925
+ };
926
+ }
927
+ export interface JobVariables {
928
+ /**
929
+ * This interface was referenced by `JobVariables`'s JSON-Schema definition
930
+ * via the `patternProperty` ".*".
931
+ *
932
+ * This interface was referenced by `JobVariables1`'s JSON-Schema definition
933
+ * via the `patternProperty` ".*".
934
+ */
935
+ [k: string]: (boolean | number | string) | {
936
+ value?: string;
937
+ expand?: boolean;
938
+ };
939
+ }
940
+ export interface GlobalVariables {
941
+ /**
942
+ * This interface was referenced by `GlobalVariables`'s JSON-Schema definition
943
+ * via the `patternProperty` ".*".
944
+ */
945
+ [k: string]: (boolean | number | string) | {
946
+ value?: string;
947
+ /**
948
+ * @minItems 1
949
+ */
950
+ options?: string[];
951
+ description?: string;
952
+ expand?: boolean;
953
+ };
954
+ }
955
+ export interface CacheItem {
956
+ key?: string | {
957
+ /**
958
+ * @minItems 1
959
+ * @maxItems 2
960
+ */
961
+ files?: string[];
962
+ /**
963
+ * @minItems 1
964
+ * @maxItems 2
965
+ */
966
+ files_commits?: string[];
967
+ prefix?: string;
968
+ };
969
+ paths?: string[];
970
+ policy?: string;
971
+ unprotect?: boolean;
972
+ untracked?: boolean;
973
+ when?: "on_success" | "on_failure" | "always";
974
+ /**
975
+ * @maxItems 5
976
+ */
977
+ fallback_keys?: string[];
978
+ }
979
+ export interface Hooks {
980
+ pre_get_sources_script?: string | (string | string[])[];
981
+ }
982
+ export interface IdTokens {
983
+ /**
984
+ * This interface was referenced by `IdTokens`'s JSON-Schema definition
985
+ * via the `patternProperty` ".*".
986
+ */
987
+ [k: string]: {
988
+ aud: string | string[];
989
+ };
990
+ }
991
+ export interface Inputs {
992
+ /**
993
+ * Input parameter value that matches parameter names defined in spec:inputs of the included configuration.
994
+ *
995
+ * This interface was referenced by `Inputs`'s JSON-Schema definition
996
+ * via the `patternProperty` "^[a-zA-Z0-9_-]+$".
997
+ */
998
+ [k: string]: string | number | boolean | (string | number | boolean | {
999
+ [k: string]: unknown;
1000
+ } | {
1001
+ [k: string]: unknown;
1002
+ }[])[] | {
1003
+ [k: string]: unknown;
1004
+ } | null;
1005
+ }
1006
+ export interface RulesVariables {
1007
+ /**
1008
+ * This interface was referenced by `RulesVariables`'s JSON-Schema definition
1009
+ * via the `patternProperty` ".*".
1010
+ */
1011
+ [k: string]: boolean | number | string;
1012
+ }
1013
+ export interface JobVariables1 {
1014
+ /**
1015
+ * This interface was referenced by `JobVariables`'s JSON-Schema definition
1016
+ * via the `patternProperty` ".*".
1017
+ *
1018
+ * This interface was referenced by `JobVariables1`'s JSON-Schema definition
1019
+ * via the `patternProperty` ".*".
1020
+ */
1021
+ [k: string]: (boolean | number | string) | {
1022
+ value?: string;
1023
+ expand?: boolean;
1024
+ };
1025
+ }
1026
+ export interface JobInputs {
1027
+ /**
1028
+ * This interface was referenced by `JobInputs`'s JSON-Schema definition
1029
+ * via the `patternProperty` ".*".
1030
+ */
1031
+ [k: string]: BaseInput & {
1032
+ [k: string]: unknown;
1033
+ };
1034
+ }
1035
+ export interface Secrets {
1036
+ /**
1037
+ * This interface was referenced by `Secrets`'s JSON-Schema definition
1038
+ * via the `patternProperty` ".*".
1039
+ */
1040
+ [k: string]: {
1041
+ [k: string]: unknown;
1042
+ };
1043
+ }
1044
+ export interface StepNamedStrings {
1045
+ /**
1046
+ * This interface was referenced by `StepNamedStrings`'s JSON-Schema definition
1047
+ * via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
1048
+ */
1049
+ [k: string]: string;
1050
+ }
1051
+ export interface StepNamedValues {
1052
+ /**
1053
+ * This interface was referenced by `StepNamedValues`'s JSON-Schema definition
1054
+ * via the `patternProperty` "^[a-zA-Z_][a-zA-Z0-9_]*$".
1055
+ */
1056
+ [k: string]: string | number | boolean | null | unknown[] | {};
1057
+ }
1058
+ /**
1059
+ * GitReference is a reference to a step in a Git repository.
1060
+ */
1061
+ export interface StepGitReference {
1062
+ git: {
1063
+ url: string;
1064
+ dir?: string;
1065
+ rev: string;
1066
+ file?: string;
1067
+ };
1068
+ }
1069
+ /**
1070
+ * OCIReference is a reference to a step hosted in an OCI repository.
1071
+ */
1072
+ export interface StepOciReference {
1073
+ oci: {
1074
+ /**
1075
+ * The <host>[:<port>] of the container registry server.
1076
+ */
1077
+ registry: string;
1078
+ /**
1079
+ * A path within the registry containing related OCI images. Typically the namespace, project, and image name.
1080
+ */
1081
+ repository: string;
1082
+ /**
1083
+ * A pointer to the image manifest hosted in the OCI repository.
1084
+ */
1085
+ tag: string;
1086
+ /**
1087
+ * A directory inside the OCI image where the step can be found.
1088
+ */
1089
+ dir?: string;
1090
+ /**
1091
+ * The name of the file that defines the step, defaults to step.yml.
1092
+ */
1093
+ file?: string;
1094
+ };
1095
+ }
1096
+ /**
1097
+ * Exec is a command to run.
1098
+ */
1099
+ export interface StepExec {
1100
+ /**
1101
+ * Command are the parameters to the system exec API. It does not invoke a shell.
1102
+ *
1103
+ * @minItems 1
1104
+ */
1105
+ command: string[];
1106
+ /**
1107
+ * WorkDir is the working directly in which `command` will be exec'ed.
1108
+ */
1109
+ work_dir?: string;
1110
+ }
1111
+ /**
1112
+ * Define the rules for when pipeline should be automatically cancelled.
1113
+ */
1114
+ export interface WorkflowAutoCancel {
1115
+ on_job_failure?: "none" | "all";
1116
+ on_new_commit?: "conservative" | "interruptible" | "none";
1117
+ }
1118
+ //# sourceMappingURL=ci.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci.d.ts","sourceRoot":"","sources":["../src/ci.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,CACnB,MAAM,GACN;IACE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,CAAC,EAAE;QACX;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;IACF,WAAW,CAAC,EAAE,CAAC,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CAAC,EAAE,CAAC;IAClG,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B,CACJ,EAAE,CAAC;AACJ,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AACjC,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE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;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AACD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB;;;;OAIG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAChC,aAAa,CAAC,EAAE,cAAc,GAAG,eAAe,GAAG,MAAM,CAAC;CAC3D"}
package/dist/ci.js ADDED
@@ -0,0 +1,3 @@
1
+ /* This file was auto-generated from ci.json. Do not edit directly. */
2
+ export {};
3
+ //# sourceMappingURL=ci.js.map
package/dist/ci.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ci.js","sourceRoot":"","sources":["../src/ci.ts"],"names":[],"mappings":"AAAA,sEAAsE"}
@@ -0,0 +1,3 @@
1
+ export * from './ci.js';
2
+ export * from './utils.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export * from './ci.js';
2
+ export * from './utils.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { GitLabCI } from "./ci.js";
2
+ export declare function transform(pipeline: GitLabCI): string;
3
+ export declare function transformToFile(pipeline: GitLabCI, filePath: string): Promise<void>;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAWxC,wBAAgB,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEpD;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAGf"}
package/dist/utils.js ADDED
@@ -0,0 +1,18 @@
1
+ import { stringify } from "yaml";
2
+ import { writeFile } from "fs/promises";
3
+ function convert(pipeline) {
4
+ const { jobs, ...rest } = pipeline;
5
+ return {
6
+ ...rest,
7
+ // merge jobs into the root object
8
+ ...jobs,
9
+ };
10
+ }
11
+ export function transform(pipeline) {
12
+ return stringify(convert(pipeline), { lineWidth: 0 });
13
+ }
14
+ export function transformToFile(pipeline, filePath) {
15
+ const yaml = transform(pipeline);
16
+ return writeFile(filePath, yaml);
17
+ }
18
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,SAAS,OAAO,CAAC,QAAkB;IACjC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,QAAQ,CAAC;IACnC,OAAO;QACL,GAAG,IAAI;QACP,kCAAkC;QAClC,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,QAAkB;IAC1C,OAAO,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,QAAkB,EAClB,QAAgB;IAEhB,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AACnC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@sleeyax/gitlab-ci-ts",
3
+ "version": "1.0.0",
4
+ "description": "Write your GitLab CI/CD pipelines in TypeScript",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://gitlab.com/sleeyax/gitlab-ci-ts.git"
13
+ },
14
+ "keywords": [],
15
+ "author": "Sleeyax",
16
+ "license": "MIT",
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^25.0.2",
22
+ "json-schema-to-typescript": "^15.0.4",
23
+ "tsx": "^4.21.0",
24
+ "typescript": "^5.9.3"
25
+ },
26
+ "dependencies": {
27
+ "yaml": "^2.8.2"
28
+ },
29
+ "scripts": {
30
+ "test": "echo \"Error: no test specified\" && exit 1",
31
+ "generate-types": "tsx ./scripts/generate-types.ts",
32
+ "build": "tsc"
33
+ }
34
+ }