@atomservice/core 0.1.13 → 0.1.14
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/package.json +1 -1
- package/src/core.config.ts +7 -0
- package/src/core.types.ts +7 -0
package/package.json
CHANGED
package/src/core.config.ts
CHANGED
|
@@ -6,6 +6,12 @@ import type { ResolvedAtomserviceConfig } from "./core.types.ts"
|
|
|
6
6
|
|
|
7
7
|
const UserConfigSchema = z.object({
|
|
8
8
|
services: z.array(z.any()),
|
|
9
|
+
mirrors: z
|
|
10
|
+
.object({
|
|
11
|
+
apt: z.string().optional(),
|
|
12
|
+
npm: z.string().optional(),
|
|
13
|
+
})
|
|
14
|
+
.optional(),
|
|
9
15
|
})
|
|
10
16
|
|
|
11
17
|
export async function loadConfig(): Promise<ResolvedAtomserviceConfig> {
|
|
@@ -21,5 +27,6 @@ export async function loadConfig(): Promise<ResolvedAtomserviceConfig> {
|
|
|
21
27
|
return {
|
|
22
28
|
root: ATOMSERVICE_DATA_DIR,
|
|
23
29
|
services: parsed.services,
|
|
30
|
+
mirrors: parsed.mirrors,
|
|
24
31
|
}
|
|
25
32
|
}
|
package/src/core.types.ts
CHANGED
|
@@ -11,13 +11,20 @@ export type HealthStatus =
|
|
|
11
11
|
| { status: "unhealthy"; message: string }
|
|
12
12
|
| { status: "unknown"; message?: string }
|
|
13
13
|
|
|
14
|
+
export interface MirrorsConfig {
|
|
15
|
+
apt?: string
|
|
16
|
+
npm?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
14
19
|
export interface ResolvedAtomserviceConfig {
|
|
15
20
|
root: string
|
|
16
21
|
services: AnyService[]
|
|
22
|
+
mirrors?: MirrorsConfig
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
export interface AtomserviceConfig {
|
|
20
26
|
services: AnyService[]
|
|
27
|
+
mirrors?: MirrorsConfig
|
|
21
28
|
}
|
|
22
29
|
|
|
23
30
|
export interface ServiceDefinition<ServiceInstance = void> {
|