@homemadedev/config 1.3.0 → 2.0.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/configuration_schema.json +38 -21
- package/dist/index.d.ts +15 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://homemade.dev/schemas/
|
|
2
|
+
"$id": "https://homemade.dev/schemas/2.0.0/config.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
@@ -208,26 +208,6 @@
|
|
|
208
208
|
]
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
|
-
"resources": {
|
|
212
|
-
"default": {
|
|
213
|
-
"ram": "4gb",
|
|
214
|
-
"vcpu": 2
|
|
215
|
-
},
|
|
216
|
-
"type": "object",
|
|
217
|
-
"properties": {
|
|
218
|
-
"ram": {
|
|
219
|
-
"default": "4gb",
|
|
220
|
-
"type": "string",
|
|
221
|
-
"pattern": "^\\d+(?:mb|gb)$"
|
|
222
|
-
},
|
|
223
|
-
"vcpu": {
|
|
224
|
-
"default": 2,
|
|
225
|
-
"type": "integer",
|
|
226
|
-
"minimum": 1,
|
|
227
|
-
"maximum": 16
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
},
|
|
231
211
|
"services": {
|
|
232
212
|
"type": "object",
|
|
233
213
|
"propertyNames": {
|
|
@@ -324,6 +304,43 @@
|
|
|
324
304
|
"type": "string"
|
|
325
305
|
}
|
|
326
306
|
},
|
|
307
|
+
"size": {
|
|
308
|
+
"anyOf": [
|
|
309
|
+
{
|
|
310
|
+
"type": "string",
|
|
311
|
+
"enum": [
|
|
312
|
+
"nano",
|
|
313
|
+
"tiny",
|
|
314
|
+
"small",
|
|
315
|
+
"medium",
|
|
316
|
+
"large"
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"type": "object",
|
|
321
|
+
"properties": {
|
|
322
|
+
"disk": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"pattern": "^\\d+(?:mb|gb)$"
|
|
325
|
+
},
|
|
326
|
+
"ram": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"pattern": "^\\d+(?:mb|gb)$"
|
|
329
|
+
},
|
|
330
|
+
"vcpu": {
|
|
331
|
+
"type": "integer",
|
|
332
|
+
"minimum": 1,
|
|
333
|
+
"maximum": 64
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"required": [
|
|
337
|
+
"disk",
|
|
338
|
+
"ram",
|
|
339
|
+
"vcpu"
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
},
|
|
327
344
|
"sleep_after": {
|
|
328
345
|
"anyOf": [
|
|
329
346
|
{
|
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,17 @@ export interface HomemadeEnvSchemaEntry {
|
|
|
63
63
|
warmup?: boolean;
|
|
64
64
|
}
|
|
65
65
|
/** The homemade.dev project config (`.homemade/config.*`). */
|
|
66
|
+
/** A named machine size (HM-770). Prices per running hour are on homemade.dev/pricing. */
|
|
67
|
+
export type HomemadeMachineSize = "large" | "medium" | "nano" | "small" | "tiny";
|
|
68
|
+
/** A custom machine shape, Enterprise only. */
|
|
69
|
+
export interface HomemadeCustomMachineSize {
|
|
70
|
+
/** Like "200gb", up to 1000 GB. */
|
|
71
|
+
disk: string;
|
|
72
|
+
/** Like "64gb", up to 256 GB. */
|
|
73
|
+
ram: string;
|
|
74
|
+
/** 1–64. */
|
|
75
|
+
vcpu: number;
|
|
76
|
+
}
|
|
66
77
|
export interface HomemadeConfig {
|
|
67
78
|
/** Editor tooling pointer; ignored by the platform. */
|
|
68
79
|
$schema?: string;
|
|
@@ -80,14 +91,12 @@ export interface HomemadeConfig {
|
|
|
80
91
|
network?: HomemadeNetworkConfig;
|
|
81
92
|
/** Create-time knobs rendered in the New VM dialog, delivered as `HOMEMADE_PARAM_<NAME>` env vars. Not for secrets. */
|
|
82
93
|
parameters?: HomemadeParameterConfig[];
|
|
83
|
-
resources?: {
|
|
84
|
-
/** Like "4gb" (default). */
|
|
85
|
-
ram?: string;
|
|
86
|
-
/** 1–16, default 2. */
|
|
87
|
-
vcpu?: number;
|
|
88
|
-
};
|
|
89
94
|
/** Services supervised at runtime. Mutually exclusive with `compose`. */
|
|
90
95
|
services?: Record<string, HomemadeServiceConfig>;
|
|
96
|
+
/** The machine size new VMs start on: "nano" | "tiny" | "small" | "medium" | "large", or a custom
|
|
97
|
+
* `{ vcpu, ram, disk }` shape (Enterprise only). Omitted = medium (Hobby: tiny). The New VM sheet can
|
|
98
|
+
* still pick another named size. */
|
|
99
|
+
size?: HomemadeMachineSize | HomemadeCustomMachineSize;
|
|
91
100
|
/** Build-time commands, baked into the template. Runs before repo code is copied in (only dependency
|
|
92
101
|
* manifests exist yet) — commands needing source files belong in `install`. */
|
|
93
102
|
setup?: string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homemadedev/config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Typed config() helper and JSON schema for homemade.dev project configs (.homemade/config.ts, config.js, config.jsonc or config.json)",
|
|
5
5
|
"homepage": "https://homemade.dev",
|
|
6
6
|
"license": "MIT",
|