@continuous-excellence/ze-great-dashboard-aws 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +23 -2
- package/dist/index.js +23 -2
- package/dist/lambda.mjs +6915 -2432
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -181,6 +181,26 @@ var azureDevOpsSourceSchema = z2.looseObject({
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
+
var gitlabInstanceUrlSchema = z2.url().superRefine((value2, ctx) => {
|
|
185
|
+
const url = new URL(value2);
|
|
186
|
+
if (url.protocol !== "https:")
|
|
187
|
+
ctx.addIssue({ code: "custom", message: "must be an HTTPS GitLab instance URL" });
|
|
188
|
+
if (url.username || url.password)
|
|
189
|
+
ctx.addIssue({ code: "custom", message: "must not include credentials" });
|
|
190
|
+
if (url.search) ctx.addIssue({ code: "custom", message: "must not include a query string" });
|
|
191
|
+
if (url.hash) ctx.addIssue({ code: "custom", message: "must not include a fragment" });
|
|
192
|
+
});
|
|
193
|
+
var gitlabCiSourceSchema = z2.looseObject({
|
|
194
|
+
type: z2.literal("gitlab-ci"),
|
|
195
|
+
/** GitLab project path, including any nested groups. */
|
|
196
|
+
project: z2.string().regex(/^[^/\s]+(?:\/[^/\s]+)+$/, "must be a namespace/project path"),
|
|
197
|
+
/** A GitLab personal, project, or group access-token environment variable. */
|
|
198
|
+
token_env: z2.string().min(1),
|
|
199
|
+
/** The branch or tag whose newest pipeline the dashboard represents. */
|
|
200
|
+
branch: z2.string().min(1).optional(),
|
|
201
|
+
/** HTTPS GitLab.com or a self-managed instance, optionally below a path prefix. */
|
|
202
|
+
url: gitlabInstanceUrlSchema.optional().default("https://gitlab.com")
|
|
203
|
+
});
|
|
184
204
|
var sourceSchema = z2.looseObject({ type: z2.string().min(1), ...sourceAuthenticationSchema }).superRefine(exactlyOneGithubAuthenticationMode);
|
|
185
205
|
var boardSchema = z2.object({
|
|
186
206
|
refresh: durationSchema.optional(),
|
|
@@ -218,8 +238,9 @@ var boardConfigSchema = z2.object({
|
|
|
218
238
|
auth: authSchema.optional()
|
|
219
239
|
}).superRefine((config, ctx) => {
|
|
220
240
|
for (const [sourceName, source] of Object.entries(config.sources)) {
|
|
221
|
-
|
|
222
|
-
|
|
241
|
+
const sourceSchema3 = source.type === "azure-devops" ? azureDevOpsSourceSchema : source.type === "gitlab-ci" ? gitlabCiSourceSchema : void 0;
|
|
242
|
+
if (!sourceSchema3) continue;
|
|
243
|
+
const parsedSource = sourceSchema3.safeParse(source);
|
|
223
244
|
if (!parsedSource.success) {
|
|
224
245
|
for (const issue of parsedSource.error.issues) {
|
|
225
246
|
ctx.addIssue({
|
package/dist/index.js
CHANGED
|
@@ -862,6 +862,26 @@ var azureDevOpsSourceSchema = z2.looseObject({
|
|
|
862
862
|
});
|
|
863
863
|
}
|
|
864
864
|
});
|
|
865
|
+
var gitlabInstanceUrlSchema = z2.url().superRefine((value2, ctx) => {
|
|
866
|
+
const url = new URL(value2);
|
|
867
|
+
if (url.protocol !== "https:")
|
|
868
|
+
ctx.addIssue({ code: "custom", message: "must be an HTTPS GitLab instance URL" });
|
|
869
|
+
if (url.username || url.password)
|
|
870
|
+
ctx.addIssue({ code: "custom", message: "must not include credentials" });
|
|
871
|
+
if (url.search) ctx.addIssue({ code: "custom", message: "must not include a query string" });
|
|
872
|
+
if (url.hash) ctx.addIssue({ code: "custom", message: "must not include a fragment" });
|
|
873
|
+
});
|
|
874
|
+
var gitlabCiSourceSchema = z2.looseObject({
|
|
875
|
+
type: z2.literal("gitlab-ci"),
|
|
876
|
+
/** GitLab project path, including any nested groups. */
|
|
877
|
+
project: z2.string().regex(/^[^/\s]+(?:\/[^/\s]+)+$/, "must be a namespace/project path"),
|
|
878
|
+
/** A GitLab personal, project, or group access-token environment variable. */
|
|
879
|
+
token_env: z2.string().min(1),
|
|
880
|
+
/** The branch or tag whose newest pipeline the dashboard represents. */
|
|
881
|
+
branch: z2.string().min(1).optional(),
|
|
882
|
+
/** HTTPS GitLab.com or a self-managed instance, optionally below a path prefix. */
|
|
883
|
+
url: gitlabInstanceUrlSchema.optional().default("https://gitlab.com")
|
|
884
|
+
});
|
|
865
885
|
var sourceSchema = z2.looseObject({ type: z2.string().min(1), ...sourceAuthenticationSchema }).superRefine(exactlyOneGithubAuthenticationMode);
|
|
866
886
|
var boardSchema = z2.object({
|
|
867
887
|
refresh: durationSchema.optional(),
|
|
@@ -899,8 +919,9 @@ var boardConfigSchema = z2.object({
|
|
|
899
919
|
auth: authSchema.optional()
|
|
900
920
|
}).superRefine((config, ctx) => {
|
|
901
921
|
for (const [sourceName, source] of Object.entries(config.sources)) {
|
|
902
|
-
|
|
903
|
-
|
|
922
|
+
const sourceSchema3 = source.type === "azure-devops" ? azureDevOpsSourceSchema : source.type === "gitlab-ci" ? gitlabCiSourceSchema : void 0;
|
|
923
|
+
if (!sourceSchema3) continue;
|
|
924
|
+
const parsedSource = sourceSchema3.safeParse(source);
|
|
904
925
|
if (!parsedSource.success) {
|
|
905
926
|
for (const issue of parsedSource.error.issues) {
|
|
906
927
|
ctx.addIssue({
|