@sandblocks/cli 0.5.0-b.3 → 0.5.0-b.5
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 +5 -27
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -77,9 +77,9 @@ function compileProjectGraph(manifest) {
|
|
|
77
77
|
pipeline: environment.pipeline,
|
|
78
78
|
services: environment.services,
|
|
79
79
|
checks: environment.checks,
|
|
80
|
-
baseDomain:
|
|
81
|
-
domains:
|
|
82
|
-
stableDomains:
|
|
80
|
+
baseDomain: "sandblocks.dev",
|
|
81
|
+
domains: {},
|
|
82
|
+
stableDomains: {},
|
|
83
83
|
...environment.targetHost ? { targetHost: environment.targetHost } : {},
|
|
84
84
|
...typeof environment.routing.sso === "boolean" ? { ssoEnabled: environment.routing.sso } : {}
|
|
85
85
|
}))
|
|
@@ -4079,23 +4079,6 @@ function validateReferences(manifest, ctx) {
|
|
|
4079
4079
|
validateReferencesTo(ctx, environment.pipeline, taskIds, ["environments", index, "pipeline"], "task");
|
|
4080
4080
|
validateReferencesTo(ctx, environment.services, serviceIds, ["environments", index, "services"], "service");
|
|
4081
4081
|
validateReferencesTo(ctx, environment.checks, checkIds, ["environments", index, "checks"], "check");
|
|
4082
|
-
validateReferencesTo(ctx, Object.keys(environment.routing.domains), new Set(environment.services), ["environments", index, "routing", "domains"], "environment service");
|
|
4083
|
-
validateReferencesTo(ctx, Object.keys(environment.routing.stableDomains), new Set(environment.services), ["environments", index, "routing", "stableDomains"], "environment service");
|
|
4084
|
-
for (const [service, configured] of Object.entries({
|
|
4085
|
-
...environment.routing.domains,
|
|
4086
|
-
...environment.routing.stableDomains
|
|
4087
|
-
})) {
|
|
4088
|
-
for (const template of Array.isArray(configured) ? configured : [configured]) {
|
|
4089
|
-
const expanded = template.replaceAll(/\{(?:sandbox|revision|service)\}/g, "preview");
|
|
4090
|
-
if (expanded.includes("{") || !/^[a-z0-9.-]+$/.test(expanded.toLowerCase())) {
|
|
4091
|
-
ctx.addIssue({
|
|
4092
|
-
code: exports_external.ZodIssueCode.custom,
|
|
4093
|
-
path: ["environments", index, "routing", "domains", service],
|
|
4094
|
-
message: "domain template may use only {sandbox}, {revision}, and {service}"
|
|
4095
|
-
});
|
|
4096
|
-
}
|
|
4097
|
-
}
|
|
4098
|
-
}
|
|
4099
4082
|
}
|
|
4100
4083
|
}
|
|
4101
4084
|
function validateAcyclicServices(manifest, ctx) {
|
|
@@ -4269,12 +4252,7 @@ var init_schema = __esm(() => {
|
|
|
4269
4252
|
services: exports_external.array(id).min(1),
|
|
4270
4253
|
checks: exports_external.array(id).default([]),
|
|
4271
4254
|
targetHost: exports_external.string().min(1).max(255).optional(),
|
|
4272
|
-
routing: exports_external.object({
|
|
4273
|
-
baseDomain: exports_external.string().min(1).max(253).default("sandblocks.dev"),
|
|
4274
|
-
domains: exports_external.record(id, exports_external.string().min(1).max(253)).default({}),
|
|
4275
|
-
stableDomains: exports_external.record(id, exports_external.union([exports_external.string().min(1).max(253), exports_external.array(exports_external.string().min(1).max(253)).min(1)])).default({}),
|
|
4276
|
-
sso: exports_external.boolean().optional()
|
|
4277
|
-
}).strict().default({})
|
|
4255
|
+
routing: exports_external.object({ sso: exports_external.boolean().optional() }).strict().default({})
|
|
4278
4256
|
}).strict();
|
|
4279
4257
|
EnvironmentsV2Schema = keyedCollection(EnvironmentValueSchema);
|
|
4280
4258
|
HooksV2Schema = exports_external.object({
|
|
@@ -15452,4 +15430,4 @@ export {
|
|
|
15452
15430
|
parse2 as parse
|
|
15453
15431
|
};
|
|
15454
15432
|
|
|
15455
|
-
//# debugId=
|
|
15433
|
+
//# debugId=95A280B04AAC415F64756E2164756E21
|