@solid-stack/builder 1.0.7 → 1.1.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/bin.js +182 -56
- package/dist/bin.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/core/buildSchema.d.ts +138 -0
- package/dist/core/buildSchema.d.ts.map +1 -0
- package/dist/core/compileEnvironment.d.ts.map +1 -1
- package/dist/core/mesh/compileMeshEnvironment.d.ts.map +1 -1
- package/dist/core/mesh/meshSchema.d.ts +21 -0
- package/dist/core/mesh/meshSchema.d.ts.map +1 -1
- package/dist/core/mesh/types.d.ts +3 -0
- package/dist/core/mesh/types.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +217 -57
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +8 -4
- package/schemas/build-schema.json +136 -0
- package/schemas/mesh-schema.json +190 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -14,8 +14,10 @@ export interface BuildPolicyConfig {
|
|
|
14
14
|
compose?: string | undefined;
|
|
15
15
|
}
|
|
16
16
|
export type BuildJson = {
|
|
17
|
+
$schema?: string | undefined;
|
|
17
18
|
name?: string | undefined;
|
|
18
19
|
dockerfile?: string | undefined;
|
|
20
|
+
port?: number | string | undefined;
|
|
19
21
|
policy?: BuildPolicyConfig | undefined;
|
|
20
22
|
policies?: BuildPolicyConfig | undefined;
|
|
21
23
|
composeFiles?: string[] | undefined;
|
|
@@ -27,6 +29,9 @@ export type BuildJson = {
|
|
|
27
29
|
path: string;
|
|
28
30
|
}> | undefined;
|
|
29
31
|
services?: Record<string, any> | undefined;
|
|
32
|
+
tester?: {
|
|
33
|
+
envOverrides?: Record<string, string> | undefined;
|
|
34
|
+
} | undefined;
|
|
30
35
|
};
|
|
31
36
|
export interface ServiceUpOptions {
|
|
32
37
|
projectDir?: string | und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E,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC1F,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAAC;IAC3C,MAAM,CAAC,EACH;QACE,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;KACnD,GACD,SAAS,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid-stack/builder",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "CLI build tool and orchestrator for Solid Stack services.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
|
-
"templates"
|
|
20
|
+
"templates",
|
|
21
|
+
"schemas"
|
|
21
22
|
],
|
|
22
23
|
"keywords": [
|
|
23
24
|
"solid-stack",
|
|
@@ -51,15 +52,18 @@
|
|
|
51
52
|
"zod": "^3.24.1"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
55
|
+
"@changesets/cli": "^3.0.3",
|
|
54
56
|
"@types/node": "^26.1.2",
|
|
55
57
|
"tsc-alias": "^1.9.5",
|
|
56
58
|
"tsup": "^8.5.1",
|
|
57
59
|
"tsx": "^4.23.1",
|
|
58
60
|
"typescript": "^7.0.2",
|
|
59
|
-
"vitest": "^4.1.10"
|
|
61
|
+
"vitest": "^4.1.10",
|
|
62
|
+
"zod-to-json-schema": "^3.25.2"
|
|
60
63
|
},
|
|
61
64
|
"scripts": {
|
|
62
|
-
"build": "tsx scripts/
|
|
65
|
+
"build:schemas": "tsx scripts/generate-schemas.ts",
|
|
66
|
+
"build": "pnpm build:schemas && tsx scripts/build.ts",
|
|
63
67
|
"dev": "tsup --watch",
|
|
64
68
|
"test": "vitest run",
|
|
65
69
|
"test:watch": "vitest",
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/BuildJson",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"BuildJson": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "JSON Schema URL or relative path"
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Service project name"
|
|
14
|
+
},
|
|
15
|
+
"dockerfile": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Relative path to the Dockerfile (defaults to 'Dockerfile')"
|
|
18
|
+
},
|
|
19
|
+
"port": {
|
|
20
|
+
"type": [
|
|
21
|
+
"number",
|
|
22
|
+
"string"
|
|
23
|
+
],
|
|
24
|
+
"description": "Host port exposed by this service when listening publicly"
|
|
25
|
+
},
|
|
26
|
+
"policy": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"dockerfile": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Relative path to policy directory for Dockerfile checks"
|
|
32
|
+
},
|
|
33
|
+
"compose": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Relative path to policy directory for Compose contract checks"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"description": "Policy configurations for infra/contract verification"
|
|
40
|
+
},
|
|
41
|
+
"policies": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"dockerfile": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Relative path to policy directory for Dockerfile checks"
|
|
47
|
+
},
|
|
48
|
+
"compose": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Relative path to policy directory for Compose contract checks"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"description": "Policy configurations for infra/contract verification"
|
|
55
|
+
},
|
|
56
|
+
"composeFiles": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"description": "Additional compose files to merge"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"properties": {
|
|
68
|
+
"path": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "Relative path to mock Docker Compose file"
|
|
71
|
+
},
|
|
72
|
+
"service": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Target service name in the mock compose file"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"path"
|
|
79
|
+
],
|
|
80
|
+
"additionalProperties": false,
|
|
81
|
+
"description": "Service dependency specification"
|
|
82
|
+
},
|
|
83
|
+
"description": "Service dependencies and mocks"
|
|
84
|
+
},
|
|
85
|
+
"overrides": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"properties": {
|
|
90
|
+
"path": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "Relative path to the environment stage override file"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": [
|
|
96
|
+
"path"
|
|
97
|
+
],
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"description": "Environment override specification"
|
|
100
|
+
},
|
|
101
|
+
"propertyNames": {
|
|
102
|
+
"enum": [
|
|
103
|
+
"dev",
|
|
104
|
+
"prod",
|
|
105
|
+
"test",
|
|
106
|
+
"e2e"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"description": "Stage overrides (dev, prod, test, e2e)"
|
|
110
|
+
},
|
|
111
|
+
"services": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": {},
|
|
114
|
+
"description": "Additional Docker Compose service overrides"
|
|
115
|
+
},
|
|
116
|
+
"tester": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"properties": {
|
|
119
|
+
"envOverrides": {
|
|
120
|
+
"type": "object",
|
|
121
|
+
"additionalProperties": {
|
|
122
|
+
"type": "string"
|
|
123
|
+
},
|
|
124
|
+
"description": "Environment variable overrides for the individual E2E tester with URL templating"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"additionalProperties": false,
|
|
128
|
+
"description": "E2E tester configuration"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"description": "Solid Stack service build and deployment configuration"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
136
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/MeshConfig",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"MeshConfig": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"services": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"path": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Relative path to service directory containing build.json"
|
|
21
|
+
},
|
|
22
|
+
"port": {
|
|
23
|
+
"type": [
|
|
24
|
+
"number",
|
|
25
|
+
"string"
|
|
26
|
+
],
|
|
27
|
+
"description": "Public host port mapped to internal port 3000"
|
|
28
|
+
},
|
|
29
|
+
"preservePort": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"description": "If true, use the port declared in build.json"
|
|
32
|
+
},
|
|
33
|
+
"provideDependency": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"description": "Map consumer dependency key to fellow mesh service provider"
|
|
39
|
+
},
|
|
40
|
+
"replaceMocks": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
},
|
|
45
|
+
"description": "Alias for provideDependency"
|
|
46
|
+
},
|
|
47
|
+
"envOverrides": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"additionalProperties": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"description": "Environment variable overrides with URL templating"
|
|
53
|
+
},
|
|
54
|
+
"healthcheck": {
|
|
55
|
+
"anyOf": [
|
|
56
|
+
{
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"type": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"const": "tcp"
|
|
62
|
+
},
|
|
63
|
+
"port": {
|
|
64
|
+
"type": [
|
|
65
|
+
"number",
|
|
66
|
+
"string"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"type"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "object",
|
|
77
|
+
"properties": {
|
|
78
|
+
"test": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"type": "string"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"interval": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"timeout": {
|
|
95
|
+
"type": "string"
|
|
96
|
+
},
|
|
97
|
+
"retries": {
|
|
98
|
+
"type": "number"
|
|
99
|
+
},
|
|
100
|
+
"start_period": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
},
|
|
103
|
+
"disable": {
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"test"
|
|
109
|
+
],
|
|
110
|
+
"additionalProperties": true
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": [
|
|
116
|
+
"path"
|
|
117
|
+
],
|
|
118
|
+
"additionalProperties": false
|
|
119
|
+
},
|
|
120
|
+
"propertyNames": {
|
|
121
|
+
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.-]*$"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"dependencies": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": {
|
|
127
|
+
"type": "object",
|
|
128
|
+
"properties": {
|
|
129
|
+
"path": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
},
|
|
132
|
+
"service": {
|
|
133
|
+
"type": "string"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": [
|
|
137
|
+
"path"
|
|
138
|
+
],
|
|
139
|
+
"additionalProperties": false
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"tester": {
|
|
143
|
+
"type": "object",
|
|
144
|
+
"properties": {
|
|
145
|
+
"path": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Relative path to E2E tester directory"
|
|
148
|
+
},
|
|
149
|
+
"compose": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Tester compose file (defaults to 'docker-compose.yml')"
|
|
152
|
+
},
|
|
153
|
+
"dockerfile": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"description": "Tester Dockerfile (defaults to 'Dockerfile')"
|
|
156
|
+
},
|
|
157
|
+
"envOverrides": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
"description": "Environment variable overrides for global tester with URL templating"
|
|
163
|
+
},
|
|
164
|
+
"policy": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"properties": {
|
|
167
|
+
"dockerfile": {
|
|
168
|
+
"type": "string"
|
|
169
|
+
},
|
|
170
|
+
"compose": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"additionalProperties": false
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"path"
|
|
179
|
+
],
|
|
180
|
+
"additionalProperties": false
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": [
|
|
184
|
+
"services"
|
|
185
|
+
],
|
|
186
|
+
"additionalProperties": false
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
190
|
+
}
|