@lo1/sdk 0.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 +71 -0
- package/dist/config/hooks.d.ts +30 -0
- package/dist/config/hooks.d.ts.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/proxy.d.ts +53 -0
- package/dist/config/proxy.d.ts.map +1 -0
- package/dist/config/service.d.ts +98 -0
- package/dist/config/service.d.ts.map +1 -0
- package/dist/config/workspace.d.ts +282 -0
- package/dist/config/workspace.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4064 -0
- package/dist/plugin.d.ts +110 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/schema/generate.d.ts +2 -0
- package/dist/schema/generate.d.ts.map +1 -0
- package/package.json +36 -0
- package/schemas/lo1.v1.schema.json +224 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @lo1/sdk
|
|
2
|
+
|
|
3
|
+
Plugin SDK for [lo1](../../README.md) — types, configuration schemas, and utilities for plugin authors.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @lo1/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Plugin authoring
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { PluginFactory } from "@lo1/sdk";
|
|
17
|
+
|
|
18
|
+
const createPlugin: PluginFactory = (context) => {
|
|
19
|
+
return {
|
|
20
|
+
name: "my-plugin",
|
|
21
|
+
|
|
22
|
+
async contributeCompose(input) {
|
|
23
|
+
// Return Docker Compose service definitions for shared infrastructure
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async provisionInfra(input) {
|
|
27
|
+
// Create infrastructure resources (tables, buckets, schemas)
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
async seedData(input) {
|
|
31
|
+
// Apply seed data to provisioned infrastructure
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default createPlugin;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Configuration validation
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { workspaceSchema } from "@lo1/sdk";
|
|
43
|
+
|
|
44
|
+
const result = workspaceSchema.safeParse(rawConfig);
|
|
45
|
+
if (!result.success) {
|
|
46
|
+
console.error(result.error.issues);
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### JSON Schema
|
|
51
|
+
|
|
52
|
+
A generated JSON Schema is available for IDE autocompletion:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"$schema": "https://lo1.dev/schemas/lo1.v1.schema.json"
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or reference the published schema file:
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
import "@lo1/sdk/schemas/lo1.v1.schema.json";
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Exports
|
|
67
|
+
|
|
68
|
+
- **Plugin types** — `Plugin`, `PluginFactory`, `PluginContext`, `Logger`
|
|
69
|
+
- **Lifecycle types** — `ComposeInput`, `ComposeContribution`, `ProvisionInput`, `ProvisionResult`, `SeedInput`, `SeedResult`, `ContainerInput`, `ContainerConfig`, `WatchInput`, `RestartSignal`
|
|
70
|
+
- **Config schemas** (Zod) — `workspaceSchema`, `serviceConfigSchema`, `proxyConfigSchema`, `tlsConfigSchema`, `serviceHooksSchema`, `workspaceHooksSchema`
|
|
71
|
+
- **Config types** — `WorkspaceConfig`, `ServiceConfig`, `ProxyConfig`, `TlsConfig`, `ServiceHooks`, `WorkspaceHooks`
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const serviceHooksSchema: z.ZodObject<{
|
|
3
|
+
preStart: z.ZodOptional<z.ZodString>;
|
|
4
|
+
postStart: z.ZodOptional<z.ZodString>;
|
|
5
|
+
preStop: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
preStart?: string | undefined;
|
|
8
|
+
postStart?: string | undefined;
|
|
9
|
+
preStop?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
preStart?: string | undefined;
|
|
12
|
+
postStart?: string | undefined;
|
|
13
|
+
preStop?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type ServiceHooks = z.infer<typeof serviceHooksSchema>;
|
|
16
|
+
export declare const workspaceHooksSchema: z.ZodObject<{
|
|
17
|
+
postInfrastructure: z.ZodOptional<z.ZodString>;
|
|
18
|
+
postSetup: z.ZodOptional<z.ZodString>;
|
|
19
|
+
preStop: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
preStop?: string | undefined;
|
|
22
|
+
postInfrastructure?: string | undefined;
|
|
23
|
+
postSetup?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
preStop?: string | undefined;
|
|
26
|
+
postInfrastructure?: string | undefined;
|
|
27
|
+
postSetup?: string | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export type WorkspaceHooks = z.infer<typeof workspaceHooksSchema>;
|
|
30
|
+
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/config/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { workspaceSchema, repositorySchema, type WorkspaceConfig, type Repository, } from "./workspace";
|
|
2
|
+
export { serviceConfigSchema, serviceProxySchema, type ServiceConfig, type ServiceProxy, } from "./service";
|
|
3
|
+
export { proxyConfigSchema, tlsConfigSchema, type ProxyConfig, type TlsConfig } from "./proxy";
|
|
4
|
+
export { serviceHooksSchema, workspaceHooksSchema, type ServiceHooks, type WorkspaceHooks, } from "./hooks";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/F,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const tlsConfigSchema: z.ZodObject<{
|
|
3
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
certDir: z.ZodDefault<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
port: number;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
certDir: string;
|
|
10
|
+
}, {
|
|
11
|
+
port?: number | undefined;
|
|
12
|
+
enabled?: boolean | undefined;
|
|
13
|
+
certDir?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type TlsConfig = z.infer<typeof tlsConfigSchema>;
|
|
16
|
+
export declare const proxyConfigSchema: z.ZodObject<{
|
|
17
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
18
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
tld: z.ZodDefault<z.ZodString>;
|
|
20
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
23
|
+
certDir: z.ZodDefault<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
port: number;
|
|
26
|
+
enabled: boolean;
|
|
27
|
+
certDir: string;
|
|
28
|
+
}, {
|
|
29
|
+
port?: number | undefined;
|
|
30
|
+
enabled?: boolean | undefined;
|
|
31
|
+
certDir?: string | undefined;
|
|
32
|
+
}>>;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
port: number;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
tld: string;
|
|
37
|
+
tls?: {
|
|
38
|
+
port: number;
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
certDir: string;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
port?: number | undefined;
|
|
44
|
+
enabled?: boolean | undefined;
|
|
45
|
+
tld?: string | undefined;
|
|
46
|
+
tls?: {
|
|
47
|
+
port?: number | undefined;
|
|
48
|
+
enabled?: boolean | undefined;
|
|
49
|
+
certDir?: string | undefined;
|
|
50
|
+
} | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
export type ProxyConfig = z.infer<typeof proxyConfigSchema>;
|
|
53
|
+
//# sourceMappingURL=proxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proxy.d.ts","sourceRoot":"","sources":["../../src/config/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;;;;;;;;;EAI1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const serviceProxySchema: z.ZodObject<{
|
|
3
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
4
|
+
pathPrefix: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
domain?: string | undefined;
|
|
7
|
+
pathPrefix?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
domain?: string | undefined;
|
|
10
|
+
pathPrefix?: string | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type ServiceProxy = z.infer<typeof serviceProxySchema>;
|
|
13
|
+
export declare const serviceConfigSchema: z.ZodObject<{
|
|
14
|
+
type: z.ZodString;
|
|
15
|
+
path: z.ZodString;
|
|
16
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
hostPort: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
mode: z.ZodDefault<z.ZodEnum<["dev", "container", "skip"]>>;
|
|
19
|
+
command: z.ZodOptional<z.ZodString>;
|
|
20
|
+
containerImage: z.ZodOptional<z.ZodString>;
|
|
21
|
+
plugin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
22
|
+
compose: z.ZodOptional<z.ZodString>;
|
|
23
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
|
+
proxy: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
26
|
+
pathPrefix: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
domain?: string | undefined;
|
|
29
|
+
pathPrefix?: string | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
domain?: string | undefined;
|
|
32
|
+
pathPrefix?: string | undefined;
|
|
33
|
+
}>>;
|
|
34
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
preStart: z.ZodOptional<z.ZodString>;
|
|
36
|
+
postStart: z.ZodOptional<z.ZodString>;
|
|
37
|
+
preStop: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
preStart?: string | undefined;
|
|
40
|
+
postStart?: string | undefined;
|
|
41
|
+
preStop?: string | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
preStart?: string | undefined;
|
|
44
|
+
postStart?: string | undefined;
|
|
45
|
+
preStop?: string | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
48
|
+
initTask: z.ZodDefault<z.ZodBoolean>;
|
|
49
|
+
readinessProbe: z.ZodOptional<z.ZodString>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
path: string;
|
|
52
|
+
type: string;
|
|
53
|
+
mode: "dev" | "container" | "skip";
|
|
54
|
+
dependsOn: string[];
|
|
55
|
+
initTask: boolean;
|
|
56
|
+
port?: number | undefined;
|
|
57
|
+
hostPort?: number | undefined;
|
|
58
|
+
command?: string | undefined;
|
|
59
|
+
containerImage?: string | undefined;
|
|
60
|
+
plugin?: Record<string, unknown> | undefined;
|
|
61
|
+
compose?: string | undefined;
|
|
62
|
+
env?: Record<string, string> | undefined;
|
|
63
|
+
proxy?: {
|
|
64
|
+
domain?: string | undefined;
|
|
65
|
+
pathPrefix?: string | undefined;
|
|
66
|
+
} | undefined;
|
|
67
|
+
hooks?: {
|
|
68
|
+
preStart?: string | undefined;
|
|
69
|
+
postStart?: string | undefined;
|
|
70
|
+
preStop?: string | undefined;
|
|
71
|
+
} | undefined;
|
|
72
|
+
readinessProbe?: string | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
path: string;
|
|
75
|
+
type: string;
|
|
76
|
+
port?: number | undefined;
|
|
77
|
+
hostPort?: number | undefined;
|
|
78
|
+
mode?: "dev" | "container" | "skip" | undefined;
|
|
79
|
+
command?: string | undefined;
|
|
80
|
+
containerImage?: string | undefined;
|
|
81
|
+
plugin?: Record<string, unknown> | undefined;
|
|
82
|
+
compose?: string | undefined;
|
|
83
|
+
env?: Record<string, string> | undefined;
|
|
84
|
+
proxy?: {
|
|
85
|
+
domain?: string | undefined;
|
|
86
|
+
pathPrefix?: string | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
hooks?: {
|
|
89
|
+
preStart?: string | undefined;
|
|
90
|
+
postStart?: string | undefined;
|
|
91
|
+
preStop?: string | undefined;
|
|
92
|
+
} | undefined;
|
|
93
|
+
dependsOn?: string[] | undefined;
|
|
94
|
+
initTask?: boolean | undefined;
|
|
95
|
+
readinessProbe?: string | undefined;
|
|
96
|
+
}>;
|
|
97
|
+
export type ServiceConfig = z.infer<typeof serviceConfigSchema>;
|
|
98
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/config/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const repositorySchema: z.ZodObject<{
|
|
3
|
+
url: z.ZodString;
|
|
4
|
+
path: z.ZodString;
|
|
5
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
path: string;
|
|
8
|
+
url: string;
|
|
9
|
+
branch?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
path: string;
|
|
12
|
+
url: string;
|
|
13
|
+
branch?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export type Repository = z.infer<typeof repositorySchema>;
|
|
16
|
+
export declare const workspaceSchema: z.ZodObject<{
|
|
17
|
+
version: z.ZodLiteral<"1">;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
20
|
+
repositories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
21
|
+
url: z.ZodString;
|
|
22
|
+
path: z.ZodString;
|
|
23
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
path: string;
|
|
26
|
+
url: string;
|
|
27
|
+
branch?: string | undefined;
|
|
28
|
+
}, {
|
|
29
|
+
path: string;
|
|
30
|
+
url: string;
|
|
31
|
+
branch?: string | undefined;
|
|
32
|
+
}>>>;
|
|
33
|
+
proxy: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
tld: z.ZodDefault<z.ZodString>;
|
|
37
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
39
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
40
|
+
certDir: z.ZodDefault<z.ZodString>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
port: number;
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
certDir: string;
|
|
45
|
+
}, {
|
|
46
|
+
port?: number | undefined;
|
|
47
|
+
enabled?: boolean | undefined;
|
|
48
|
+
certDir?: string | undefined;
|
|
49
|
+
}>>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
port: number;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
tld: string;
|
|
54
|
+
tls?: {
|
|
55
|
+
port: number;
|
|
56
|
+
enabled: boolean;
|
|
57
|
+
certDir: string;
|
|
58
|
+
} | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
port?: number | undefined;
|
|
61
|
+
enabled?: boolean | undefined;
|
|
62
|
+
tld?: string | undefined;
|
|
63
|
+
tls?: {
|
|
64
|
+
port?: number | undefined;
|
|
65
|
+
enabled?: boolean | undefined;
|
|
66
|
+
certDir?: string | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
}>>;
|
|
69
|
+
services: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
70
|
+
type: z.ZodString;
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
hostPort: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
mode: z.ZodDefault<z.ZodEnum<["dev", "container", "skip"]>>;
|
|
75
|
+
command: z.ZodOptional<z.ZodString>;
|
|
76
|
+
containerImage: z.ZodOptional<z.ZodString>;
|
|
77
|
+
plugin: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
78
|
+
compose: z.ZodOptional<z.ZodString>;
|
|
79
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
80
|
+
proxy: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
82
|
+
pathPrefix: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
domain?: string | undefined;
|
|
85
|
+
pathPrefix?: string | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
domain?: string | undefined;
|
|
88
|
+
pathPrefix?: string | undefined;
|
|
89
|
+
}>>;
|
|
90
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
preStart: z.ZodOptional<z.ZodString>;
|
|
92
|
+
postStart: z.ZodOptional<z.ZodString>;
|
|
93
|
+
preStop: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
preStart?: string | undefined;
|
|
96
|
+
postStart?: string | undefined;
|
|
97
|
+
preStop?: string | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
preStart?: string | undefined;
|
|
100
|
+
postStart?: string | undefined;
|
|
101
|
+
preStop?: string | undefined;
|
|
102
|
+
}>>;
|
|
103
|
+
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
104
|
+
initTask: z.ZodDefault<z.ZodBoolean>;
|
|
105
|
+
readinessProbe: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
path: string;
|
|
108
|
+
type: string;
|
|
109
|
+
mode: "dev" | "container" | "skip";
|
|
110
|
+
dependsOn: string[];
|
|
111
|
+
initTask: boolean;
|
|
112
|
+
port?: number | undefined;
|
|
113
|
+
hostPort?: number | undefined;
|
|
114
|
+
command?: string | undefined;
|
|
115
|
+
containerImage?: string | undefined;
|
|
116
|
+
plugin?: Record<string, unknown> | undefined;
|
|
117
|
+
compose?: string | undefined;
|
|
118
|
+
env?: Record<string, string> | undefined;
|
|
119
|
+
proxy?: {
|
|
120
|
+
domain?: string | undefined;
|
|
121
|
+
pathPrefix?: string | undefined;
|
|
122
|
+
} | undefined;
|
|
123
|
+
hooks?: {
|
|
124
|
+
preStart?: string | undefined;
|
|
125
|
+
postStart?: string | undefined;
|
|
126
|
+
preStop?: string | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
readinessProbe?: string | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
path: string;
|
|
131
|
+
type: string;
|
|
132
|
+
port?: number | undefined;
|
|
133
|
+
hostPort?: number | undefined;
|
|
134
|
+
mode?: "dev" | "container" | "skip" | undefined;
|
|
135
|
+
command?: string | undefined;
|
|
136
|
+
containerImage?: string | undefined;
|
|
137
|
+
plugin?: Record<string, unknown> | undefined;
|
|
138
|
+
compose?: string | undefined;
|
|
139
|
+
env?: Record<string, string> | undefined;
|
|
140
|
+
proxy?: {
|
|
141
|
+
domain?: string | undefined;
|
|
142
|
+
pathPrefix?: string | undefined;
|
|
143
|
+
} | undefined;
|
|
144
|
+
hooks?: {
|
|
145
|
+
preStart?: string | undefined;
|
|
146
|
+
postStart?: string | undefined;
|
|
147
|
+
preStop?: string | undefined;
|
|
148
|
+
} | undefined;
|
|
149
|
+
dependsOn?: string[] | undefined;
|
|
150
|
+
initTask?: boolean | undefined;
|
|
151
|
+
readinessProbe?: string | undefined;
|
|
152
|
+
}>>;
|
|
153
|
+
extraCompose: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
154
|
+
file: z.ZodString;
|
|
155
|
+
initTaskServices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
file: string;
|
|
158
|
+
initTaskServices?: string[] | undefined;
|
|
159
|
+
}, {
|
|
160
|
+
file: string;
|
|
161
|
+
initTaskServices?: string[] | undefined;
|
|
162
|
+
}>]>>;
|
|
163
|
+
hooks: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
postInfrastructure: z.ZodOptional<z.ZodString>;
|
|
165
|
+
postSetup: z.ZodOptional<z.ZodString>;
|
|
166
|
+
preStop: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, "strip", z.ZodTypeAny, {
|
|
168
|
+
preStop?: string | undefined;
|
|
169
|
+
postInfrastructure?: string | undefined;
|
|
170
|
+
postSetup?: string | undefined;
|
|
171
|
+
}, {
|
|
172
|
+
preStop?: string | undefined;
|
|
173
|
+
postInfrastructure?: string | undefined;
|
|
174
|
+
postSetup?: string | undefined;
|
|
175
|
+
}>>;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
version: "1";
|
|
178
|
+
name: string;
|
|
179
|
+
services: Record<string, {
|
|
180
|
+
path: string;
|
|
181
|
+
type: string;
|
|
182
|
+
mode: "dev" | "container" | "skip";
|
|
183
|
+
dependsOn: string[];
|
|
184
|
+
initTask: boolean;
|
|
185
|
+
port?: number | undefined;
|
|
186
|
+
hostPort?: number | undefined;
|
|
187
|
+
command?: string | undefined;
|
|
188
|
+
containerImage?: string | undefined;
|
|
189
|
+
plugin?: Record<string, unknown> | undefined;
|
|
190
|
+
compose?: string | undefined;
|
|
191
|
+
env?: Record<string, string> | undefined;
|
|
192
|
+
proxy?: {
|
|
193
|
+
domain?: string | undefined;
|
|
194
|
+
pathPrefix?: string | undefined;
|
|
195
|
+
} | undefined;
|
|
196
|
+
hooks?: {
|
|
197
|
+
preStart?: string | undefined;
|
|
198
|
+
postStart?: string | undefined;
|
|
199
|
+
preStop?: string | undefined;
|
|
200
|
+
} | undefined;
|
|
201
|
+
readinessProbe?: string | undefined;
|
|
202
|
+
}>;
|
|
203
|
+
proxy?: {
|
|
204
|
+
port: number;
|
|
205
|
+
enabled: boolean;
|
|
206
|
+
tld: string;
|
|
207
|
+
tls?: {
|
|
208
|
+
port: number;
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
certDir: string;
|
|
211
|
+
} | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
hooks?: {
|
|
214
|
+
preStop?: string | undefined;
|
|
215
|
+
postInfrastructure?: string | undefined;
|
|
216
|
+
postSetup?: string | undefined;
|
|
217
|
+
} | undefined;
|
|
218
|
+
plugins?: Record<string, string> | undefined;
|
|
219
|
+
repositories?: Record<string, {
|
|
220
|
+
path: string;
|
|
221
|
+
url: string;
|
|
222
|
+
branch?: string | undefined;
|
|
223
|
+
}> | undefined;
|
|
224
|
+
extraCompose?: string | {
|
|
225
|
+
file: string;
|
|
226
|
+
initTaskServices?: string[] | undefined;
|
|
227
|
+
} | undefined;
|
|
228
|
+
}, {
|
|
229
|
+
version: "1";
|
|
230
|
+
name: string;
|
|
231
|
+
services: Record<string, {
|
|
232
|
+
path: string;
|
|
233
|
+
type: string;
|
|
234
|
+
port?: number | undefined;
|
|
235
|
+
hostPort?: number | undefined;
|
|
236
|
+
mode?: "dev" | "container" | "skip" | undefined;
|
|
237
|
+
command?: string | undefined;
|
|
238
|
+
containerImage?: string | undefined;
|
|
239
|
+
plugin?: Record<string, unknown> | undefined;
|
|
240
|
+
compose?: string | undefined;
|
|
241
|
+
env?: Record<string, string> | undefined;
|
|
242
|
+
proxy?: {
|
|
243
|
+
domain?: string | undefined;
|
|
244
|
+
pathPrefix?: string | undefined;
|
|
245
|
+
} | undefined;
|
|
246
|
+
hooks?: {
|
|
247
|
+
preStart?: string | undefined;
|
|
248
|
+
postStart?: string | undefined;
|
|
249
|
+
preStop?: string | undefined;
|
|
250
|
+
} | undefined;
|
|
251
|
+
dependsOn?: string[] | undefined;
|
|
252
|
+
initTask?: boolean | undefined;
|
|
253
|
+
readinessProbe?: string | undefined;
|
|
254
|
+
}>;
|
|
255
|
+
proxy?: {
|
|
256
|
+
port?: number | undefined;
|
|
257
|
+
enabled?: boolean | undefined;
|
|
258
|
+
tld?: string | undefined;
|
|
259
|
+
tls?: {
|
|
260
|
+
port?: number | undefined;
|
|
261
|
+
enabled?: boolean | undefined;
|
|
262
|
+
certDir?: string | undefined;
|
|
263
|
+
} | undefined;
|
|
264
|
+
} | undefined;
|
|
265
|
+
hooks?: {
|
|
266
|
+
preStop?: string | undefined;
|
|
267
|
+
postInfrastructure?: string | undefined;
|
|
268
|
+
postSetup?: string | undefined;
|
|
269
|
+
} | undefined;
|
|
270
|
+
plugins?: Record<string, string> | undefined;
|
|
271
|
+
repositories?: Record<string, {
|
|
272
|
+
path: string;
|
|
273
|
+
url: string;
|
|
274
|
+
branch?: string | undefined;
|
|
275
|
+
}> | undefined;
|
|
276
|
+
extraCompose?: string | {
|
|
277
|
+
file: string;
|
|
278
|
+
initTaskServices?: string[] | undefined;
|
|
279
|
+
} | undefined;
|
|
280
|
+
}>;
|
|
281
|
+
export type WorkspaceConfig = z.infer<typeof workspaceSchema>;
|
|
282
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/config/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB1B,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { Plugin, PluginFactory, PluginContext, Logger, ComposeInput, ComposeContribution, ComposeServiceDef, ProvisionInput, ProvisionResult, SeedInput, SeedResult, ContainerInput, ContainerConfig, WatchInput, RestartSignal, } from "./plugin";
|
|
2
|
+
export { workspaceSchema, repositorySchema, serviceConfigSchema, serviceProxySchema, proxyConfigSchema, tlsConfigSchema, serviceHooksSchema, workspaceHooksSchema, type WorkspaceConfig, type Repository, type ServiceConfig, type ServiceProxy, type ProxyConfig, type TlsConfig, type ServiceHooks, type WorkspaceHooks, } from "./config/index";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,MAAM,EACN,aAAa,EACb,aAAa,EACb,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,SAAS,EACT,UAAU,EACV,cAAc,EACd,eAAe,EACf,UAAU,EACV,aAAa,GACd,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACpB,MAAM,gBAAgB,CAAC"}
|