@solid-stack/builder 1.1.8 → 1.2.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 +33 -0
- package/dist/bin.js +133 -25
- package/dist/bin.js.map +1 -1
- package/dist/core/buildSchema.d.ts +9 -0
- package/dist/core/buildSchema.d.ts.map +1 -1
- package/dist/core/compileEnvironment.d.ts.map +1 -1
- package/dist/core/mesh/compileMeshEnvironment.d.ts.map +1 -1
- package/dist/index.js +133 -61
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/assertUniqueHostPortMappings.d.ts +3 -0
- package/dist/utils/assertUniqueHostPortMappings.d.ts.map +1 -0
- package/dist/utils/dependencyPorts.d.ts +10 -0
- package/dist/utils/dependencyPorts.d.ts.map +1 -0
- package/dist/utils/extractBuildDeps.d.ts.map +1 -1
- package/package.json +1 -1
- package/schemas/build-schema.json +8 -0
|
@@ -9,18 +9,22 @@ export declare const buildPolicyConfigSchema: z.ZodObject<{
|
|
|
9
9
|
dockerfile?: string | undefined;
|
|
10
10
|
compose?: string | undefined;
|
|
11
11
|
}>;
|
|
12
|
+
export declare const auxiliaryPortMappingSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
12
13
|
export declare const buildDependencySchema: z.ZodObject<{
|
|
13
14
|
path: z.ZodString;
|
|
14
15
|
service: z.ZodOptional<z.ZodString>;
|
|
15
16
|
port: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
17
|
+
ports: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
16
18
|
}, "strict", z.ZodTypeAny, {
|
|
17
19
|
path: string;
|
|
18
20
|
service?: string | undefined;
|
|
19
21
|
port?: string | number | undefined;
|
|
22
|
+
ports?: string[] | undefined;
|
|
20
23
|
}, {
|
|
21
24
|
path: string;
|
|
22
25
|
service?: string | undefined;
|
|
23
26
|
port?: string | number | undefined;
|
|
27
|
+
ports?: string[] | undefined;
|
|
24
28
|
}>;
|
|
25
29
|
export declare const buildOverrideSchema: z.ZodObject<{
|
|
26
30
|
path: z.ZodString;
|
|
@@ -66,14 +70,17 @@ export declare const buildJsonSchema: z.ZodObject<{
|
|
|
66
70
|
path: z.ZodString;
|
|
67
71
|
service: z.ZodOptional<z.ZodString>;
|
|
68
72
|
port: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
73
|
+
ports: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
|
|
69
74
|
}, "strict", z.ZodTypeAny, {
|
|
70
75
|
path: string;
|
|
71
76
|
service?: string | undefined;
|
|
72
77
|
port?: string | number | undefined;
|
|
78
|
+
ports?: string[] | undefined;
|
|
73
79
|
}, {
|
|
74
80
|
path: string;
|
|
75
81
|
service?: string | undefined;
|
|
76
82
|
port?: string | number | undefined;
|
|
83
|
+
ports?: string[] | undefined;
|
|
77
84
|
}>>>;
|
|
78
85
|
envOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
79
86
|
overrides: z.ZodOptional<z.ZodRecord<z.ZodEnum<["dev", "prod", "test", "e2e"]>, z.ZodObject<{
|
|
@@ -109,6 +116,7 @@ export declare const buildJsonSchema: z.ZodObject<{
|
|
|
109
116
|
path: string;
|
|
110
117
|
service?: string | undefined;
|
|
111
118
|
port?: string | number | undefined;
|
|
119
|
+
ports?: string[] | undefined;
|
|
112
120
|
}> | undefined;
|
|
113
121
|
envOverrides?: Record<string, string> | undefined;
|
|
114
122
|
overrides?: Partial<Record<"dev" | "e2e" | "prod" | "test", {
|
|
@@ -136,6 +144,7 @@ export declare const buildJsonSchema: z.ZodObject<{
|
|
|
136
144
|
path: string;
|
|
137
145
|
service?: string | undefined;
|
|
138
146
|
port?: string | number | undefined;
|
|
147
|
+
ports?: string[] | undefined;
|
|
139
148
|
}> | undefined;
|
|
140
149
|
envOverrides?: Record<string, string> | undefined;
|
|
141
150
|
overrides?: Partial<Record<"dev" | "e2e" | "prod" | "test", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildSchema.d.ts","sourceRoot":"","sources":["../../src/core/buildSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;;;;EAYgC,CAAC;AAErE,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"buildSchema.d.ts","sourceRoot":"","sources":["../../src/core/buildSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;;;;;;;;EAYgC,CAAC;AAErE,eAAO,MAAM,0BAA0B,2CAKnC,CAAC;AAEL,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAiBa,CAAC;AAEhD,eAAO,MAAM,mBAAmB;;;;;;EAOiB,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;;;;EAUS,CAAC;AAExC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileEnvironment.d.ts","sourceRoot":"","sources":["../../src/core/compileEnvironment.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"compileEnvironment.d.ts","sourceRoot":"","sources":["../../src/core/compileEnvironment.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAerD,MAAM,WAAW,yBAAyB;IACxC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,gBAChB,WAAW,eACZ,MAAM,YACT,yBAAyB,KACjC,MAiXF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileMeshEnvironment.d.ts","sourceRoot":"","sources":["../../../src/core/mesh/compileMeshEnvironment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compileMeshEnvironment.d.ts","sourceRoot":"","sources":["../../../src/core/mesh/compileMeshEnvironment.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACpC,kBAAkB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACzC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACxC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,KAAK,GAAG,MAAM,EACpB,UAAU,GAAE,MAAsB,EAClC,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAk2BnB"}
|
package/dist/index.js
CHANGED
|
@@ -840,6 +840,114 @@ Examples:
|
|
|
840
840
|
}
|
|
841
841
|
});
|
|
842
842
|
};
|
|
843
|
+
function assertUniqueHostPortMappings(yamlConfig) {
|
|
844
|
+
const parsed = parse(yamlConfig);
|
|
845
|
+
const owners = /* @__PURE__ */ new Map();
|
|
846
|
+
for (const [serviceName, service] of Object.entries(parsed?.services ?? {})) {
|
|
847
|
+
for (const port of service?.ports ?? []) {
|
|
848
|
+
let hostPort = null;
|
|
849
|
+
if (typeof port === "string") {
|
|
850
|
+
const parts = port.split(":");
|
|
851
|
+
if (parts.length === 2) hostPort = Number(parts[0]);
|
|
852
|
+
if (parts.length === 3) hostPort = Number(parts[1]);
|
|
853
|
+
} else if (port && typeof port === "object" && "published" in port) {
|
|
854
|
+
hostPort = Number(port.published);
|
|
855
|
+
}
|
|
856
|
+
if (!hostPort || !Number.isInteger(hostPort)) continue;
|
|
857
|
+
const existing = owners.get(hostPort);
|
|
858
|
+
if (existing) {
|
|
859
|
+
throw new ScriptError(
|
|
860
|
+
`Port Collision Detected: Host port ${hostPort} is requested by both "${existing}" and "${serviceName}".`
|
|
861
|
+
);
|
|
862
|
+
}
|
|
863
|
+
owners.set(hostPort, serviceName);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
// src/utils/dependencyPorts.ts
|
|
869
|
+
var EXPLICIT_PORT_MAPPING = /^([1-9]\d{0,4}):([1-9]\d{0,4})$/;
|
|
870
|
+
function assertValidPort(port, label) {
|
|
871
|
+
if (!Number.isInteger(port) || port < 1 || port > 65535) {
|
|
872
|
+
throw new ScriptError(`${label} must be between 1 and 65535.`);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
function parseExplicitPortMapping(value, context = "Dependency port") {
|
|
876
|
+
const match = EXPLICIT_PORT_MAPPING.exec(value.trim());
|
|
877
|
+
if (!match) {
|
|
878
|
+
throw new ScriptError(`${context} "${value}" must use "HOST_PORT:CONTAINER_PORT".`);
|
|
879
|
+
}
|
|
880
|
+
const hostPort = Number(match[1]);
|
|
881
|
+
const containerPort = Number(match[2]);
|
|
882
|
+
assertValidPort(hostPort, `${context} host port`);
|
|
883
|
+
assertValidPort(containerPort, `${context} container port`);
|
|
884
|
+
return { raw: `${hostPort}:${containerPort}`, hostPort, containerPort };
|
|
885
|
+
}
|
|
886
|
+
function normalizePrimaryDependencyPort(value, context = "Dependency port") {
|
|
887
|
+
if (typeof value === "number") {
|
|
888
|
+
assertValidPort(value, `${context} host port`);
|
|
889
|
+
return { raw: `${value}:3000`, hostPort: value, containerPort: 3e3 };
|
|
890
|
+
}
|
|
891
|
+
const trimmed = value.trim();
|
|
892
|
+
if (/^[1-9]\d{0,4}$/.test(trimmed)) {
|
|
893
|
+
const hostPort = Number(trimmed);
|
|
894
|
+
assertValidPort(hostPort, `${context} host port`);
|
|
895
|
+
return { raw: `${hostPort}:3000`, hostPort, containerPort: 3e3 };
|
|
896
|
+
}
|
|
897
|
+
return parseExplicitPortMapping(trimmed, context);
|
|
898
|
+
}
|
|
899
|
+
function getDependencyPortMappings(dependency, context = "Dependency") {
|
|
900
|
+
const mappings = [];
|
|
901
|
+
if (dependency.port !== void 0) {
|
|
902
|
+
mappings.push(normalizePrimaryDependencyPort(dependency.port, `${context} primary port`));
|
|
903
|
+
}
|
|
904
|
+
for (const value of dependency.ports ?? []) {
|
|
905
|
+
mappings.push(parseExplicitPortMapping(value, `${context} auxiliary port`));
|
|
906
|
+
}
|
|
907
|
+
return [...new Map(mappings.map((mapping) => [mapping.raw, mapping])).values()];
|
|
908
|
+
}
|
|
909
|
+
var buildPolicyConfigSchema = z.object({
|
|
910
|
+
dockerfile: z.string().optional().describe("Relative path to policy directory for Dockerfile checks"),
|
|
911
|
+
compose: z.string().optional().describe("Relative path to policy directory for Compose contract checks")
|
|
912
|
+
}).strict().describe("Policy configurations for infra/contract verification");
|
|
913
|
+
var auxiliaryPortMappingSchema = z.string().regex(/^([1-9]\d{0,4}):([1-9]\d{0,4})$/, 'Must use "HOST_PORT:CONTAINER_PORT"').refine((value) => value.split(":").every((part) => Number(part) <= 65535), {
|
|
914
|
+
message: "Host and container ports must be between 1 and 65535"
|
|
915
|
+
});
|
|
916
|
+
var buildDependencySchema = z.object({
|
|
917
|
+
path: z.string({ required_error: 'Dependency "path" is required' }).describe("Relative path to mock Docker Compose file"),
|
|
918
|
+
service: z.string().optional().describe("Target service name in the mock compose file"),
|
|
919
|
+
port: z.union([z.number(), z.string()]).optional().describe("Host port to map to this dependency locally"),
|
|
920
|
+
ports: z.array(auxiliaryPortMappingSchema).optional().describe("Additional explicit HOST_PORT:CONTAINER_PORT mappings for local dependency tooling")
|
|
921
|
+
}).strict().describe("Service dependency specification");
|
|
922
|
+
var buildOverrideSchema = z.object({
|
|
923
|
+
path: z.string({ required_error: 'Override "path" is required' }).describe("Relative path to the environment stage override file")
|
|
924
|
+
}).strict().describe("Environment override specification");
|
|
925
|
+
var buildTesterSchema = z.object({
|
|
926
|
+
envOverrides: z.record(z.string(), z.string()).optional().describe(
|
|
927
|
+
"Environment variable overrides for the individual E2E tester with URL templating"
|
|
928
|
+
)
|
|
929
|
+
}).strict().describe("E2E tester configuration");
|
|
930
|
+
var buildJsonSchema = z.object({
|
|
931
|
+
$schema: z.string().optional().describe("JSON Schema URL or relative path"),
|
|
932
|
+
name: z.string().optional().describe("Service project name"),
|
|
933
|
+
dockerfile: z.string().optional().describe("Relative path to the Dockerfile (defaults to 'Dockerfile')"),
|
|
934
|
+
port: z.union([z.number(), z.string()]).optional().describe(
|
|
935
|
+
"Host port exposed by this service when listening publicly"
|
|
936
|
+
),
|
|
937
|
+
policy: buildPolicyConfigSchema.optional(),
|
|
938
|
+
policies: buildPolicyConfigSchema.optional(),
|
|
939
|
+
composeFiles: z.array(z.string()).optional().describe("Additional compose files to merge"),
|
|
940
|
+
dependencies: z.record(z.string(), buildDependencySchema).optional().describe("Service dependencies and mocks"),
|
|
941
|
+
envOverrides: z.record(z.string(), z.string()).optional().describe("Environment variable overrides for the app service with URL templating"),
|
|
942
|
+
overrides: z.record(
|
|
943
|
+
z.enum(["dev", "prod", "test", "e2e"]),
|
|
944
|
+
buildOverrideSchema
|
|
945
|
+
).optional().describe("Stage overrides (dev, prod, test, e2e)"),
|
|
946
|
+
services: z.record(z.string(), z.any()).optional().describe("Additional Docker Compose service overrides"),
|
|
947
|
+
tester: buildTesterSchema.optional()
|
|
948
|
+
}).strict().describe("Solid Stack service build and deployment configuration");
|
|
949
|
+
|
|
950
|
+
// src/utils/extractBuildDeps.ts
|
|
843
951
|
var extractBuildDeps = (buildJson, projectDir = process.cwd()) => {
|
|
844
952
|
if (!buildJson || typeof buildJson !== "object") {
|
|
845
953
|
return [];
|
|
@@ -848,14 +956,7 @@ var extractBuildDeps = (buildJson, projectDir = process.cwd()) => {
|
|
|
848
956
|
return [];
|
|
849
957
|
}
|
|
850
958
|
const schema = z.object({
|
|
851
|
-
dependencies: z.record(
|
|
852
|
-
z.string(),
|
|
853
|
-
z.object({
|
|
854
|
-
path: z.string(),
|
|
855
|
-
service: z.string().optional(),
|
|
856
|
-
port: z.union([z.number(), z.string()]).optional()
|
|
857
|
-
})
|
|
858
|
-
)
|
|
959
|
+
dependencies: z.record(z.string(), buildDependencySchema)
|
|
859
960
|
});
|
|
860
961
|
const result = schema.safeParse(buildJson);
|
|
861
962
|
if (!result.success) {
|
|
@@ -871,7 +972,8 @@ var extractBuildDeps = (buildJson, projectDir = process.cwd()) => {
|
|
|
871
972
|
path: path13.resolve(projectDir, service.path),
|
|
872
973
|
name,
|
|
873
974
|
serviceName: service.service,
|
|
874
|
-
port: service.port
|
|
975
|
+
port: service.port,
|
|
976
|
+
ports: service.ports
|
|
875
977
|
};
|
|
876
978
|
}
|
|
877
979
|
);
|
|
@@ -1174,8 +1276,9 @@ function compileMeshEnvironment(mode, rawMeshDir = process.cwd(), options = {})
|
|
|
1174
1276
|
...serviceConfig.provideDependency || {}
|
|
1175
1277
|
};
|
|
1176
1278
|
for (const dep of serviceDeps) {
|
|
1177
|
-
if (
|
|
1178
|
-
|
|
1279
|
+
if (provideMap[dep.name] || mesh.dependencies?.[dep.name]) continue;
|
|
1280
|
+
for (const mapping of getDependencyPortMappings(dep, `Local dependency "${dep.name}" of service "${serviceName}"`)) {
|
|
1281
|
+
claimPort(mapping.raw, `local dependency "${dep.name}" of service "${serviceName}"`);
|
|
1179
1282
|
}
|
|
1180
1283
|
}
|
|
1181
1284
|
const hostPort = publicPort ? String(publicPort).includes(":") ? String(publicPort).split(":")[0] : String(publicPort) : null;
|
|
@@ -1309,7 +1412,9 @@ function compileMeshEnvironment(mode, rawMeshDir = process.cwd(), options = {})
|
|
|
1309
1412
|
}
|
|
1310
1413
|
if (serviceBuildJson.envOverrides) {
|
|
1311
1414
|
for (const [k, v] of Object.entries(serviceBuildJson.envOverrides)) {
|
|
1312
|
-
|
|
1415
|
+
const interpolated = interpolateEnvTemplates(v, `Service build.json: ${serviceName}`);
|
|
1416
|
+
environment[k] = interpolated;
|
|
1417
|
+
buildArgs[k] = interpolated;
|
|
1313
1418
|
}
|
|
1314
1419
|
}
|
|
1315
1420
|
if (serviceConfig.envOverrides) {
|
|
@@ -1491,9 +1596,9 @@ function compileMeshEnvironment(mode, rawMeshDir = process.cwd(), options = {})
|
|
|
1491
1596
|
delete resolvedMock.container_name;
|
|
1492
1597
|
normalizeDependsOn(resolvedMock);
|
|
1493
1598
|
applyInternalMockDependsOnMapping(resolvedMock, sidecarMapping);
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
resolvedMock.ports =
|
|
1599
|
+
const portMappings = getDependencyPortMappings(dep, `Local dependency "${depKey}" of service "${serviceName}"`);
|
|
1600
|
+
if (portMappings.length > 0) {
|
|
1601
|
+
resolvedMock.ports = portMappings.map((mapping) => mapping.raw);
|
|
1497
1602
|
}
|
|
1498
1603
|
resolvedMock.networks = {
|
|
1499
1604
|
[`${serviceName}_net`]: {
|
|
@@ -1606,6 +1711,7 @@ function compileMeshEnvironment(mode, rawMeshDir = process.cwd(), options = {})
|
|
|
1606
1711
|
}
|
|
1607
1712
|
}
|
|
1608
1713
|
const generatedYaml = stringify(composeConfig);
|
|
1714
|
+
assertUniqueHostPortMappings(generatedYaml);
|
|
1609
1715
|
if (options.validateWithDocker === false) {
|
|
1610
1716
|
return { yaml: generatedYaml, testerServiceName };
|
|
1611
1717
|
}
|
|
@@ -2879,18 +2985,19 @@ ${explanation}`);
|
|
|
2879
2985
|
}
|
|
2880
2986
|
}
|
|
2881
2987
|
}
|
|
2882
|
-
if (yml.services) {
|
|
2988
|
+
if (yml.services && (environment === "prod" || environment === "e2e" || environment === "dev" && options.full)) {
|
|
2883
2989
|
for (const dep of dependencies) {
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
}
|
|
2889
|
-
if (yml.services[targetSvc]) {
|
|
2890
|
-
const portMapping = String(dep.port).includes(":") ? String(dep.port) : `${dep.port}:3000`;
|
|
2891
|
-
yml.services[targetSvc].ports = [...yml.services[targetSvc].ports || [], portMapping];
|
|
2892
|
-
}
|
|
2990
|
+
const mappings = getDependencyPortMappings(dep, `Dependency "${dep.name}"`);
|
|
2991
|
+
let targetSvc = dep.serviceName && yml.services[dep.serviceName] ? dep.serviceName : dep.name;
|
|
2992
|
+
if (!yml.services[targetSvc]) {
|
|
2993
|
+
targetSvc = Object.keys(yml.services).find((key) => key !== "app" && key !== "tester") ?? targetSvc;
|
|
2893
2994
|
}
|
|
2995
|
+
const service = yml.services[targetSvc];
|
|
2996
|
+
if (!service) {
|
|
2997
|
+
throw new ScriptError(`Dependency "${dep.name}" target service could not be resolved for port injection.`);
|
|
2998
|
+
}
|
|
2999
|
+
delete service.ports;
|
|
3000
|
+
if (mappings.length > 0) service.ports = mappings.map((mapping) => mapping.raw);
|
|
2894
3001
|
}
|
|
2895
3002
|
}
|
|
2896
3003
|
if (environment === "dev" && options.full && yml.services?.app) {
|
|
@@ -2899,6 +3006,7 @@ ${explanation}`);
|
|
|
2899
3006
|
}
|
|
2900
3007
|
attachName(yml, projectName);
|
|
2901
3008
|
const finalYamlConfig = stringify(yml);
|
|
3009
|
+
assertUniqueHostPortMappings(finalYamlConfig);
|
|
2902
3010
|
return finalYamlConfig;
|
|
2903
3011
|
};
|
|
2904
3012
|
|
|
@@ -3841,42 +3949,6 @@ ${formatted}
|
|
|
3841
3949
|
process.exit(exitCode);
|
|
3842
3950
|
}
|
|
3843
3951
|
}
|
|
3844
|
-
var buildPolicyConfigSchema = z.object({
|
|
3845
|
-
dockerfile: z.string().optional().describe("Relative path to policy directory for Dockerfile checks"),
|
|
3846
|
-
compose: z.string().optional().describe("Relative path to policy directory for Compose contract checks")
|
|
3847
|
-
}).strict().describe("Policy configurations for infra/contract verification");
|
|
3848
|
-
var buildDependencySchema = z.object({
|
|
3849
|
-
path: z.string({ required_error: 'Dependency "path" is required' }).describe("Relative path to mock Docker Compose file"),
|
|
3850
|
-
service: z.string().optional().describe("Target service name in the mock compose file"),
|
|
3851
|
-
port: z.union([z.number(), z.string()]).optional().describe("Host port to map to this dependency locally")
|
|
3852
|
-
}).strict().describe("Service dependency specification");
|
|
3853
|
-
var buildOverrideSchema = z.object({
|
|
3854
|
-
path: z.string({ required_error: 'Override "path" is required' }).describe("Relative path to the environment stage override file")
|
|
3855
|
-
}).strict().describe("Environment override specification");
|
|
3856
|
-
var buildTesterSchema = z.object({
|
|
3857
|
-
envOverrides: z.record(z.string(), z.string()).optional().describe(
|
|
3858
|
-
"Environment variable overrides for the individual E2E tester with URL templating"
|
|
3859
|
-
)
|
|
3860
|
-
}).strict().describe("E2E tester configuration");
|
|
3861
|
-
var buildJsonSchema = z.object({
|
|
3862
|
-
$schema: z.string().optional().describe("JSON Schema URL or relative path"),
|
|
3863
|
-
name: z.string().optional().describe("Service project name"),
|
|
3864
|
-
dockerfile: z.string().optional().describe("Relative path to the Dockerfile (defaults to 'Dockerfile')"),
|
|
3865
|
-
port: z.union([z.number(), z.string()]).optional().describe(
|
|
3866
|
-
"Host port exposed by this service when listening publicly"
|
|
3867
|
-
),
|
|
3868
|
-
policy: buildPolicyConfigSchema.optional(),
|
|
3869
|
-
policies: buildPolicyConfigSchema.optional(),
|
|
3870
|
-
composeFiles: z.array(z.string()).optional().describe("Additional compose files to merge"),
|
|
3871
|
-
dependencies: z.record(z.string(), buildDependencySchema).optional().describe("Service dependencies and mocks"),
|
|
3872
|
-
envOverrides: z.record(z.string(), z.string()).optional().describe("Environment variable overrides for the app service with URL templating"),
|
|
3873
|
-
overrides: z.record(
|
|
3874
|
-
z.enum(["dev", "prod", "test", "e2e"]),
|
|
3875
|
-
buildOverrideSchema
|
|
3876
|
-
).optional().describe("Stage overrides (dev, prod, test, e2e)"),
|
|
3877
|
-
services: z.record(z.string(), z.any()).optional().describe("Additional Docker Compose service overrides"),
|
|
3878
|
-
tester: buildTesterSchema.optional()
|
|
3879
|
-
}).strict().describe("Solid Stack service build and deployment configuration");
|
|
3880
3952
|
|
|
3881
3953
|
export { NotFoundError, SERVICE_STAGES, ScriptError, buildJsonSchema, compileApplicationEnv, compileEnvironment, compileMeshEnvironment, createCli, meshSchema, runCli, runCompose, serializeApplicationEnv, teardownCompose, version };
|
|
3882
3954
|
//# sourceMappingURL=index.js.map
|