@structured-world/gitlab-mcp 6.1.0 → 6.2.1
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 +14 -13
- package/dist/src/entities/pipelines/registry.js +181 -229
- package/dist/src/entities/pipelines/registry.js.map +1 -1
- package/dist/src/entities/pipelines/schema-readonly.d.ts +25 -23
- package/dist/src/entities/pipelines/schema-readonly.js +90 -83
- package/dist/src/entities/pipelines/schema-readonly.js.map +1 -1
- package/dist/src/entities/pipelines/schema.d.ts +27 -30
- package/dist/src/entities/pipelines/schema.js +41 -27
- package/dist/src/entities/pipelines/schema.js.map +1 -1
- package/dist/src/entities/utils.d.ts +1 -0
- package/dist/src/entities/utils.js +2 -1
- package/dist/src/entities/utils.js.map +1 -1
- package/dist/src/entities/workitems/registry.js +240 -252
- package/dist/src/entities/workitems/registry.js.map +1 -1
- package/dist/src/entities/workitems/schema-readonly.d.ts +25 -1
- package/dist/src/entities/workitems/schema-readonly.js +33 -6
- package/dist/src/entities/workitems/schema-readonly.js.map +1 -1
- package/dist/src/entities/workitems/schema.d.ts +35 -0
- package/dist/src/entities/workitems/schema.js +32 -1
- package/dist/src/entities/workitems/schema.js.map +1 -1
- package/dist/structured-world-gitlab-mcp-6.2.1.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/dist/structured-world-gitlab-mcp-6.1.0.tgz +0 -0
|
@@ -124,8 +124,9 @@ export declare const GitLabPipelineTriggerJobSchema: z.ZodObject<{
|
|
|
124
124
|
web_url: z.ZodString;
|
|
125
125
|
}, z.core.$strip>>;
|
|
126
126
|
}, z.core.$strip>;
|
|
127
|
-
export declare const
|
|
128
|
-
project_id: z.ZodCoercedString<unknown
|
|
127
|
+
export declare const BrowsePipelinesSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
128
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
129
|
+
action: z.ZodLiteral<"list">;
|
|
129
130
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
130
131
|
pending: "pending";
|
|
131
132
|
running: "running";
|
|
@@ -181,14 +182,14 @@ export declare const ListPipelinesSchema: z.ZodObject<{
|
|
|
181
182
|
}>>;
|
|
182
183
|
page: z.ZodOptional<z.ZodNumber>;
|
|
183
184
|
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
184
|
-
}, z.core.$strip
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
pipeline_id: z.ZodCoercedString<unknown
|
|
188
|
-
}, z.core.$strip
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
pipeline_id: z.ZodCoercedString<unknown
|
|
185
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
186
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
187
|
+
action: z.ZodLiteral<"get">;
|
|
188
|
+
pipeline_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
191
|
+
action: z.ZodLiteral<"jobs">;
|
|
192
|
+
pipeline_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
192
193
|
scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
193
194
|
pending: "pending";
|
|
194
195
|
failed: "failed";
|
|
@@ -202,10 +203,10 @@ export declare const ListPipelineJobsSchema: z.ZodObject<{
|
|
|
202
203
|
include_retried: z.ZodOptional<z.ZodBoolean>;
|
|
203
204
|
page: z.ZodOptional<z.ZodNumber>;
|
|
204
205
|
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
205
|
-
}, z.core.$strip
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
pipeline_id: z.ZodCoercedString<unknown
|
|
206
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
208
|
+
action: z.ZodLiteral<"triggers">;
|
|
209
|
+
pipeline_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
209
210
|
scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
210
211
|
pending: "pending";
|
|
211
212
|
failed: "failed";
|
|
@@ -221,18 +222,19 @@ export declare const ListPipelineTriggerJobsSchema: z.ZodObject<{
|
|
|
221
222
|
include_retried: z.ZodOptional<z.ZodBoolean>;
|
|
222
223
|
page: z.ZodOptional<z.ZodNumber>;
|
|
223
224
|
per_page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
224
|
-
}, z.core.$strip
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
job_id: z.ZodCoercedString<unknown
|
|
225
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
226
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
227
|
+
action: z.ZodLiteral<"job">;
|
|
228
|
+
job_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
231
|
+
action: z.ZodLiteral<"logs">;
|
|
232
|
+
job_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
228
233
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
229
234
|
max_lines: z.ZodOptional<z.ZodNumber>;
|
|
230
235
|
start: z.ZodOptional<z.ZodNumber>;
|
|
231
|
-
}, z.core.$strip>;
|
|
236
|
+
}, z.core.$strip>], "action">;
|
|
237
|
+
export type BrowsePipelinesInput = z.infer<typeof BrowsePipelinesSchema>;
|
|
232
238
|
export type GitLabPipeline = z.infer<typeof GitLabPipelineSchema>;
|
|
233
239
|
export type GitLabPipelineJob = z.infer<typeof GitLabPipelineJobSchema>;
|
|
234
240
|
export type GitLabPipelineTriggerJob = z.infer<typeof GitLabPipelineTriggerJobSchema>;
|
|
235
|
-
export type ListPipelinesOptions = z.infer<typeof ListPipelinesSchema>;
|
|
236
|
-
export type GetPipelineOptions = z.infer<typeof GetPipelineSchema>;
|
|
237
|
-
export type ListPipelineJobsOptions = z.infer<typeof ListPipelineJobsSchema>;
|
|
238
|
-
export type ListPipelineTriggerJobsOptions = z.infer<typeof ListPipelineTriggerJobsSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BrowsePipelinesSchema = exports.GitLabPipelineTriggerJobSchema = exports.GitLabPipelineJobSchema = exports.GitLabPipelineSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const shared_1 = require("../shared");
|
|
6
6
|
const utils_1 = require("../utils");
|
|
@@ -150,47 +150,66 @@ exports.GitLabPipelineTriggerJobSchema = zod_1.z.object({
|
|
|
150
150
|
})
|
|
151
151
|
.optional(),
|
|
152
152
|
});
|
|
153
|
-
|
|
154
|
-
.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
153
|
+
const PipelineScopeSchema = zod_1.z
|
|
154
|
+
.enum(["running", "pending", "finished", "branches", "tags"])
|
|
155
|
+
.describe("The scope of pipelines to return");
|
|
156
|
+
const PipelineStatusSchema = zod_1.z
|
|
157
|
+
.enum([
|
|
158
|
+
"created",
|
|
159
|
+
"waiting_for_resource",
|
|
160
|
+
"preparing",
|
|
161
|
+
"pending",
|
|
162
|
+
"running",
|
|
163
|
+
"success",
|
|
164
|
+
"failed",
|
|
165
|
+
"canceled",
|
|
166
|
+
"skipped",
|
|
167
|
+
"manual",
|
|
168
|
+
"scheduled",
|
|
169
|
+
])
|
|
170
|
+
.describe("The status of pipelines to return");
|
|
171
|
+
const PipelineSourceSchema = zod_1.z
|
|
172
|
+
.enum([
|
|
173
|
+
"push",
|
|
174
|
+
"web",
|
|
175
|
+
"trigger",
|
|
176
|
+
"schedule",
|
|
177
|
+
"api",
|
|
178
|
+
"external",
|
|
179
|
+
"chat",
|
|
180
|
+
"webide",
|
|
181
|
+
"merge_request_event",
|
|
182
|
+
"external_pull_request_event",
|
|
183
|
+
"parent_pipeline",
|
|
184
|
+
"ondemand_dast_scan",
|
|
185
|
+
"ondemand_dast_validation",
|
|
186
|
+
])
|
|
187
|
+
.describe("The source of pipelines");
|
|
188
|
+
const JobScopeSchema = zod_1.z
|
|
189
|
+
.enum(["created", "pending", "running", "failed", "success", "canceled", "skipped", "manual"])
|
|
190
|
+
.describe("Scope of jobs to show");
|
|
191
|
+
const TriggerJobScopeSchema = zod_1.z
|
|
192
|
+
.enum([
|
|
193
|
+
"created",
|
|
194
|
+
"pending",
|
|
195
|
+
"running",
|
|
196
|
+
"failed",
|
|
197
|
+
"success",
|
|
198
|
+
"canceled",
|
|
199
|
+
"skipped",
|
|
200
|
+
"manual",
|
|
201
|
+
"waiting_for_resource",
|
|
202
|
+
"preparing",
|
|
203
|
+
])
|
|
204
|
+
.describe("Scope of trigger jobs to show");
|
|
205
|
+
const BrowsePipelinesBaseSchema = zod_1.z.object({
|
|
206
|
+
project_id: utils_1.requiredId.describe("Project ID or URL-encoded path"),
|
|
207
|
+
});
|
|
208
|
+
const BrowsePipelinesListSchema = BrowsePipelinesBaseSchema.extend({
|
|
209
|
+
action: zod_1.z.literal("list"),
|
|
210
|
+
scope: PipelineScopeSchema.optional(),
|
|
211
|
+
status: PipelineStatusSchema.optional(),
|
|
212
|
+
source: PipelineSourceSchema.optional(),
|
|
194
213
|
ref: zod_1.z.string().optional().describe("The ref to filter by"),
|
|
195
214
|
sha: zod_1.z.string().optional().describe("The SHA to filter by"),
|
|
196
215
|
yaml_errors: zod_1.z.boolean().optional().describe("Filter by YAML errors"),
|
|
@@ -203,50 +222,30 @@ exports.ListPipelinesSchema = zod_1.z
|
|
|
203
222
|
.optional()
|
|
204
223
|
.describe("Order pipelines by"),
|
|
205
224
|
sort: zod_1.z.enum(["asc", "desc"]).optional().describe("Sort order"),
|
|
206
|
-
})
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
pipeline_id: zod_1.z.coerce.string().describe("The ID of the pipeline"),
|
|
225
|
+
}).merge(shared_1.PaginationOptionsSchema);
|
|
226
|
+
const BrowsePipelinesGetSchema = BrowsePipelinesBaseSchema.extend({
|
|
227
|
+
action: zod_1.z.literal("get"),
|
|
228
|
+
pipeline_id: utils_1.requiredId.describe("The ID of the pipeline"),
|
|
211
229
|
});
|
|
212
|
-
|
|
213
|
-
.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
scope: zod_1.z
|
|
217
|
-
.enum(["created", "pending", "running", "failed", "success", "canceled", "skipped", "manual"])
|
|
218
|
-
.array()
|
|
219
|
-
.optional()
|
|
220
|
-
.describe("Scope of jobs to show"),
|
|
230
|
+
const BrowsePipelinesJobsSchema = BrowsePipelinesBaseSchema.extend({
|
|
231
|
+
action: zod_1.z.literal("jobs"),
|
|
232
|
+
pipeline_id: utils_1.requiredId.describe("The ID of the pipeline"),
|
|
233
|
+
scope: zod_1.z.array(JobScopeSchema).optional().describe("Scope of jobs to show"),
|
|
221
234
|
include_retried: zod_1.z.boolean().optional().describe("Include retried jobs in the response"),
|
|
222
|
-
})
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
.
|
|
226
|
-
|
|
227
|
-
pipeline_id: zod_1.z.coerce.string().describe("The ID of the pipeline"),
|
|
228
|
-
scope: zod_1.z
|
|
229
|
-
.enum([
|
|
230
|
-
"created",
|
|
231
|
-
"pending",
|
|
232
|
-
"running",
|
|
233
|
-
"failed",
|
|
234
|
-
"success",
|
|
235
|
-
"canceled",
|
|
236
|
-
"skipped",
|
|
237
|
-
"manual",
|
|
238
|
-
"waiting_for_resource",
|
|
239
|
-
"preparing",
|
|
240
|
-
])
|
|
241
|
-
.array()
|
|
242
|
-
.optional()
|
|
243
|
-
.describe("Scope of jobs to show"),
|
|
235
|
+
}).merge(shared_1.PaginationOptionsSchema);
|
|
236
|
+
const BrowsePipelinesTriggersSchema = BrowsePipelinesBaseSchema.extend({
|
|
237
|
+
action: zod_1.z.literal("triggers"),
|
|
238
|
+
pipeline_id: utils_1.requiredId.describe("The ID of the pipeline"),
|
|
239
|
+
scope: zod_1.z.array(TriggerJobScopeSchema).optional().describe("Scope of jobs to show"),
|
|
244
240
|
include_retried: zod_1.z.boolean().optional().describe("Include retried jobs in the response"),
|
|
245
|
-
})
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
241
|
+
}).merge(shared_1.PaginationOptionsSchema);
|
|
242
|
+
const BrowsePipelinesJobSchema = BrowsePipelinesBaseSchema.extend({
|
|
243
|
+
action: zod_1.z.literal("job"),
|
|
244
|
+
job_id: utils_1.requiredId.describe("The ID of the job"),
|
|
245
|
+
});
|
|
246
|
+
const BrowsePipelinesLogsSchema = BrowsePipelinesBaseSchema.extend({
|
|
247
|
+
action: zod_1.z.literal("logs"),
|
|
248
|
+
job_id: utils_1.requiredId.describe("The ID of the job"),
|
|
250
249
|
limit: zod_1.z
|
|
251
250
|
.number()
|
|
252
251
|
.optional()
|
|
@@ -260,4 +259,12 @@ exports.GetPipelineJobOutputSchema = zod_1.z.object({
|
|
|
260
259
|
.optional()
|
|
261
260
|
.describe("Start from specific line number (0-based). Positive values start from beginning, negative values start from end (e.g., -100 = last 100 lines)"),
|
|
262
261
|
});
|
|
262
|
+
exports.BrowsePipelinesSchema = zod_1.z.discriminatedUnion("action", [
|
|
263
|
+
BrowsePipelinesListSchema,
|
|
264
|
+
BrowsePipelinesGetSchema,
|
|
265
|
+
BrowsePipelinesJobsSchema,
|
|
266
|
+
BrowsePipelinesTriggersSchema,
|
|
267
|
+
BrowsePipelinesJobSchema,
|
|
268
|
+
BrowsePipelinesLogsSchema,
|
|
269
|
+
]);
|
|
263
270
|
//# sourceMappingURL=schema-readonly.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/pipelines/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"schema-readonly.js","sourceRoot":"","sources":["../../../../src/entities/pipelines/schema-readonly.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,sCAAoD;AACpD,oCAAuD;AAG1C,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC7B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,UAAU,EAAE,OA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B,yBAAyB;IACzB,6BAA6B;IAC7B,wBAAwB;IACxB,yBAAyB;CAC1B,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
3
|
-
project_id: z.ZodCoercedString<unknown
|
|
2
|
+
export declare const ManagePipelineSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
4
|
+
action: z.ZodLiteral<"create">;
|
|
4
5
|
ref: z.ZodString;
|
|
5
6
|
variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6
7
|
key: z.ZodString;
|
|
@@ -10,18 +11,19 @@ export declare const CreatePipelineSchema: z.ZodObject<{
|
|
|
10
11
|
env_var: "env_var";
|
|
11
12
|
}>>;
|
|
12
13
|
}, z.core.$strip>>>;
|
|
13
|
-
}, z.core.$strip
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pipeline_id: z.ZodCoercedString<unknown
|
|
17
|
-
}, z.core.$strip
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
pipeline_id: z.ZodCoercedString<unknown
|
|
21
|
-
}, z.core.$strip>;
|
|
22
|
-
export declare const
|
|
23
|
-
project_id: z.ZodCoercedString<unknown
|
|
24
|
-
job_id: z.ZodCoercedString<unknown
|
|
14
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
15
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
16
|
+
action: z.ZodLiteral<"retry">;
|
|
17
|
+
pipeline_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
18
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
20
|
+
action: z.ZodLiteral<"cancel">;
|
|
21
|
+
pipeline_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
22
|
+
}, z.core.$strip>], "action">;
|
|
23
|
+
export declare const ManagePipelineJobSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
25
|
+
job_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
26
|
+
action: z.ZodLiteral<"play">;
|
|
25
27
|
job_variables_attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
26
28
|
key: z.ZodString;
|
|
27
29
|
value: z.ZodString;
|
|
@@ -30,20 +32,15 @@ export declare const PlayPipelineJobSchema: z.ZodObject<{
|
|
|
30
32
|
env_var: "env_var";
|
|
31
33
|
}>>;
|
|
32
34
|
}, z.core.$strip>>>;
|
|
33
|
-
}, z.core.$strip
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, z.core.$strip
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, z.core.$strip>;
|
|
42
|
-
export declare const CancelPipelineJobSchema: z.ZodObject<{
|
|
43
|
-
project_id: z.ZodCoercedString<unknown>;
|
|
44
|
-
job_id: z.ZodCoercedString<unknown>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
37
|
+
job_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
38
|
+
action: z.ZodLiteral<"retry">;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
project_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
41
|
+
job_id: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
42
|
+
action: z.ZodLiteral<"cancel">;
|
|
45
43
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
-
}, z.core.$strip>;
|
|
47
|
-
export type
|
|
48
|
-
export type
|
|
49
|
-
export type CancelPipelineOptions = z.infer<typeof CancelPipelineSchema>;
|
|
44
|
+
}, z.core.$strip>], "action">;
|
|
45
|
+
export type ManagePipelineInput = z.infer<typeof ManagePipelineSchema>;
|
|
46
|
+
export type ManagePipelineJobInput = z.infer<typeof ManagePipelineJobSchema>;
|
|
@@ -1,44 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ManagePipelineJobSchema = exports.ManagePipelineSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const PipelineVariableSchema = zod_1.z.object({
|
|
7
|
+
key: zod_1.z.string(),
|
|
8
|
+
value: zod_1.z.string(),
|
|
9
|
+
variable_type: zod_1.z.enum(["env_var", "file"]).optional(),
|
|
10
|
+
});
|
|
11
|
+
const ManagePipelineBaseSchema = zod_1.z.object({
|
|
12
|
+
project_id: utils_1.requiredId.describe("Project ID or URL-encoded path"),
|
|
13
|
+
});
|
|
14
|
+
const ManagePipelineCreateSchema = ManagePipelineBaseSchema.extend({
|
|
15
|
+
action: zod_1.z.literal("create"),
|
|
7
16
|
ref: zod_1.z.string().describe("The branch or tag to run the pipeline on"),
|
|
8
17
|
variables: zod_1.z
|
|
9
|
-
.array(
|
|
10
|
-
key: zod_1.z.string(),
|
|
11
|
-
value: zod_1.z.string(),
|
|
12
|
-
variable_type: zod_1.z.enum(["env_var", "file"]).optional(),
|
|
13
|
-
}))
|
|
18
|
+
.array(PipelineVariableSchema)
|
|
14
19
|
.optional()
|
|
15
20
|
.describe("Variables to pass to the pipeline"),
|
|
16
21
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
pipeline_id:
|
|
22
|
+
const ManagePipelineRetrySchema = ManagePipelineBaseSchema.extend({
|
|
23
|
+
action: zod_1.z.literal("retry"),
|
|
24
|
+
pipeline_id: utils_1.requiredId.describe("The ID of the pipeline to retry"),
|
|
25
|
+
});
|
|
26
|
+
const ManagePipelineCancelSchema = ManagePipelineBaseSchema.extend({
|
|
27
|
+
action: zod_1.z.literal("cancel"),
|
|
28
|
+
pipeline_id: utils_1.requiredId.describe("The ID of the pipeline to cancel"),
|
|
29
|
+
});
|
|
30
|
+
exports.ManagePipelineSchema = zod_1.z.discriminatedUnion("action", [
|
|
31
|
+
ManagePipelineCreateSchema,
|
|
32
|
+
ManagePipelineRetrySchema,
|
|
33
|
+
ManagePipelineCancelSchema,
|
|
34
|
+
]);
|
|
35
|
+
const ManagePipelineJobBaseSchema = zod_1.z.object({
|
|
36
|
+
project_id: utils_1.requiredId.describe("Project ID or URL-encoded path"),
|
|
37
|
+
job_id: utils_1.requiredId.describe("The ID of the job"),
|
|
20
38
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
project_id: zod_1.z.coerce.string().describe("Project ID or URL-encoded path"),
|
|
24
|
-
job_id: zod_1.z.coerce.string().describe("The ID of the job"),
|
|
39
|
+
const ManagePipelineJobPlaySchema = ManagePipelineJobBaseSchema.extend({
|
|
40
|
+
action: zod_1.z.literal("play"),
|
|
25
41
|
job_variables_attributes: zod_1.z
|
|
26
|
-
.array(
|
|
27
|
-
key: zod_1.z.string(),
|
|
28
|
-
value: zod_1.z.string(),
|
|
29
|
-
variable_type: zod_1.z.enum(["env_var", "file"]).optional(),
|
|
30
|
-
}))
|
|
42
|
+
.array(PipelineVariableSchema)
|
|
31
43
|
.optional()
|
|
32
44
|
.describe("Variables to pass to the job"),
|
|
33
45
|
});
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
job_id: zod_1.z.coerce.string().describe("The ID of the job"),
|
|
46
|
+
const ManagePipelineJobRetrySchema = ManagePipelineJobBaseSchema.extend({
|
|
47
|
+
action: zod_1.z.literal("retry"),
|
|
37
48
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
project_id: zod_1.z.coerce.string().describe("Project ID or URL-encoded path"),
|
|
41
|
-
job_id: zod_1.z.coerce.string().describe("The ID of the job"),
|
|
49
|
+
const ManagePipelineJobCancelSchema = ManagePipelineJobBaseSchema.extend({
|
|
50
|
+
action: zod_1.z.literal("cancel"),
|
|
42
51
|
force: zod_1.z.boolean().optional().describe("Force cancellation of the job"),
|
|
43
52
|
});
|
|
53
|
+
exports.ManagePipelineJobSchema = zod_1.z.discriminatedUnion("action", [
|
|
54
|
+
ManagePipelineJobPlaySchema,
|
|
55
|
+
ManagePipelineJobRetrySchema,
|
|
56
|
+
ManagePipelineJobCancelSchema,
|
|
57
|
+
]);
|
|
44
58
|
//# sourceMappingURL=schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/entities/pipelines/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../src/entities/pipelines/schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oCAAsC;AAMtC,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,aAAa,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC;AAOH,MAAM,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,UAAU,EAAE,kBAAU,CAAC,QAAQ,CAAC,gCAAgC,CAAC;CAClE,CAAC,CAAC;AAGH,MAAM,0BAA0B,GAAG,wBAAwB,CAAC,MAAM,CAAC;IACjE,MAAM,EAAE,OAAC,CAAC,OAAO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C,OAAO,CAAC,OAAO,CAAC;CAC3B,CAAC,CAAC;AAGH,MAAM,6BAA6B,GAAG,2BAA2B,CAAC,MAAM,CAAC;IACvE,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC3B,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;CACxE,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACpE,2BAA2B;IAC3B,4BAA4B;IAC5B,6BAA6B;CAC9B,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const flexibleBoolean: z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>;
|
|
3
3
|
export declare const flexibleBooleanNullable: z.ZodNullable<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>> | z.ZodDefault<z.ZodNullable<z.ZodPipe<z.ZodTransform<boolean, unknown>, z.ZodBoolean>>>;
|
|
4
|
+
export declare const requiredId: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodCoercedString<unknown>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.flexibleBooleanNullable = exports.flexibleBoolean = void 0;
|
|
3
|
+
exports.requiredId = exports.flexibleBooleanNullable = exports.flexibleBoolean = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const DEFAULT_NULL = process.env.DEFAULT_NULL === "true";
|
|
6
6
|
exports.flexibleBoolean = zod_1.z.preprocess(val => {
|
|
@@ -19,4 +19,5 @@ exports.flexibleBoolean = zod_1.z.preprocess(val => {
|
|
|
19
19
|
exports.flexibleBooleanNullable = DEFAULT_NULL
|
|
20
20
|
? exports.flexibleBoolean.nullable().default(null)
|
|
21
21
|
: exports.flexibleBoolean.nullable();
|
|
22
|
+
exports.requiredId = zod_1.z.preprocess(val => val ?? "", zod_1.z.coerce.string().min(1));
|
|
22
23
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/entities/utils.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,MAAM,CAAC;AAE5C,QAAA,eAAe,GAAG,OAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;IAChD,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,GAAG,CAAC;IACb,CAAC;IACD,IAAI,MAAM,GAAG,OAAO,CAAC;IACrB,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEH,QAAA,uBAAuB,GAAG,YAAY;IACjD,CAAC,CAAC,uBAAe,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC1C,CAAC,CAAC,uBAAe,CAAC,QAAQ,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/entities/utils.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,MAAM,CAAC;AAE5C,QAAA,eAAe,GAAG,OAAC,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;IAChD,IAAI,OAAO,GAAG,KAAK,SAAS,EAAE,C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