@uns-kit/core 3.0.6 → 3.0.7
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/MIGRATIONS.md +26 -3
- package/dist/config/project.config.extension.d.ts +1 -1
- package/dist/config/project.config.extension.d.ts.map +1 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +29 -30
- package/dist/logger.js.map +1 -1
- package/dist/tools/generate-config-schema.js +67 -11
- package/dist/tools/generate-config-schema.js.map +1 -1
- package/dist/uns/uns-attributes.d.ts +2 -2
- package/dist/uns/uns-interfaces.d.ts +5 -1
- package/dist/uns/uns-interfaces.d.ts.map +1 -1
- package/dist/uns/uns-interfaces.js.map +1 -1
- package/dist/uns-config/config-schema.d.ts +405 -5
- package/dist/uns-config/config-schema.d.ts.map +1 -1
- package/dist/uns-config/host-placeholders.d.ts +14 -98
- package/dist/uns-config/host-placeholders.d.ts.map +1 -1
- package/dist/uns-config/schema-tolls.d.ts +1 -2
- package/dist/uns-config/schema-tolls.d.ts.map +1 -1
- package/dist/uns-config/schema-tolls.js +2 -4
- package/dist/uns-config/schema-tolls.js.map +1 -1
- package/dist/uns-config/schema-tools.d.ts +6 -1
- package/dist/uns-config/schema-tools.d.ts.map +1 -1
- package/dist/uns-config/schema-tools.js +7 -8
- package/dist/uns-config/schema-tools.js.map +1 -1
- package/dist/uns-config/secret-placeholders.d.ts +8 -86
- package/dist/uns-config/secret-placeholders.d.ts.map +1 -1
- package/dist/uns-config/uns-core-schema.d.ts +191 -3106
- package/dist/uns-config/uns-core-schema.d.ts.map +1 -1
- package/dist/uns-config/uns-core-schema.js +61 -68
- package/dist/uns-config/uns-core-schema.js.map +1 -1
- package/package.json +3 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-tools.js","sourceRoot":"","sources":["../../src/uns-config/schema-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema-tools.js","sourceRoot":"","sources":["../../src/uns-config/schema-tools.ts"],"names":[],"mappings":"AAaA,SAAS,SAAS,CAAC,MAA0B;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC;AAOD,MAAM,UAAU,mBAAmB,CAAC,IAAwB,EAAE,GAAG,MAA4B;IAC3F,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1C,IAAI,QAAQ,GAAG,IAAI,CAAC;IAEpB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,QAAQ,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,yCAAyC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAClF,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["import { z } from \"zod\";\n\nexport type ConfigObjectSchema = z.ZodObject<z.ZodRawShape>;\n\ntype SchemaShape<TSchema extends ConfigObjectSchema> = TSchema extends z.ZodObject<infer TShape> ? TShape : never;\n\ntype MergedExtraShapes<\n TSchemas extends readonly ConfigObjectSchema[],\n TShape extends z.ZodRawShape = Record<never, never>,\n> = TSchemas extends readonly [infer THead extends ConfigObjectSchema, ...infer TTail extends readonly ConfigObjectSchema[]]\n ? MergedExtraShapes<TTail, TShape & SchemaShape<THead>>\n : TShape;\n\nfunction shapeKeys(schema: ConfigObjectSchema): string[] {\n return Object.keys(schema.shape);\n}\n\nexport function composeConfigSchema(core: ConfigObjectSchema): ConfigObjectSchema;\nexport function composeConfigSchema<TCore extends ConfigObjectSchema, TExtras extends readonly ConfigObjectSchema[]>(\n core: TCore,\n ...extras: TExtras\n): z.ZodObject<SchemaShape<TCore> & MergedExtraShapes<TExtras>>;\nexport function composeConfigSchema(core: ConfigObjectSchema, ...extras: ConfigObjectSchema[]): ConfigObjectSchema {\n const coreKeys = new Set(shapeKeys(core));\n let composed = core;\n\n for (const ext of extras) {\n const keys = shapeKeys(ext);\n const overlaps = keys.filter((k) => coreKeys.has(k));\n if (overlaps.length) {\n throw new Error(`Project extras overlap UNS core keys: ${overlaps.join(\", \")}`);\n }\n keys.forEach((k) => coreKeys.add(k));\n composed = composed.extend(ext.shape);\n }\n\n return composed;\n}\n"]}
|
|
@@ -4,17 +4,7 @@ declare const envSecretSchema: z.ZodObject<{
|
|
|
4
4
|
key: z.ZodString;
|
|
5
5
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
default: z.ZodOptional<z.ZodString>;
|
|
7
|
-
},
|
|
8
|
-
provider?: "env";
|
|
9
|
-
key?: string;
|
|
10
|
-
optional?: boolean;
|
|
11
|
-
default?: string;
|
|
12
|
-
}, {
|
|
13
|
-
provider?: "env";
|
|
14
|
-
key?: string;
|
|
15
|
-
optional?: boolean;
|
|
16
|
-
default?: string;
|
|
17
|
-
}>;
|
|
7
|
+
}, z.core.$strict>;
|
|
18
8
|
declare const infisicalSecretSchema: z.ZodObject<{
|
|
19
9
|
provider: z.ZodLiteral<"infisical">;
|
|
20
10
|
path: z.ZodString;
|
|
@@ -23,39 +13,13 @@ declare const infisicalSecretSchema: z.ZodObject<{
|
|
|
23
13
|
environment: z.ZodOptional<z.ZodString>;
|
|
24
14
|
projectId: z.ZodOptional<z.ZodString>;
|
|
25
15
|
default: z.ZodOptional<z.ZodString>;
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
key?: string;
|
|
29
|
-
optional?: boolean;
|
|
30
|
-
default?: string;
|
|
31
|
-
path?: string;
|
|
32
|
-
environment?: string;
|
|
33
|
-
projectId?: string;
|
|
34
|
-
}, {
|
|
35
|
-
provider?: "infisical";
|
|
36
|
-
key?: string;
|
|
37
|
-
optional?: boolean;
|
|
38
|
-
default?: string;
|
|
39
|
-
path?: string;
|
|
40
|
-
environment?: string;
|
|
41
|
-
projectId?: string;
|
|
42
|
-
}>;
|
|
43
|
-
export declare const secretPlaceholderSchema: z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
export declare const secretPlaceholderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
44
18
|
provider: z.ZodLiteral<"env">;
|
|
45
19
|
key: z.ZodString;
|
|
46
20
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
47
21
|
default: z.ZodOptional<z.ZodString>;
|
|
48
|
-
},
|
|
49
|
-
provider?: "env";
|
|
50
|
-
key?: string;
|
|
51
|
-
optional?: boolean;
|
|
52
|
-
default?: string;
|
|
53
|
-
}, {
|
|
54
|
-
provider?: "env";
|
|
55
|
-
key?: string;
|
|
56
|
-
optional?: boolean;
|
|
57
|
-
default?: string;
|
|
58
|
-
}>, z.ZodObject<{
|
|
22
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
23
|
provider: z.ZodLiteral<"infisical">;
|
|
60
24
|
path: z.ZodString;
|
|
61
25
|
key: z.ZodString;
|
|
@@ -63,39 +27,13 @@ export declare const secretPlaceholderSchema: z.ZodDiscriminatedUnion<"provider"
|
|
|
63
27
|
environment: z.ZodOptional<z.ZodString>;
|
|
64
28
|
projectId: z.ZodOptional<z.ZodString>;
|
|
65
29
|
default: z.ZodOptional<z.ZodString>;
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
key?: string;
|
|
69
|
-
optional?: boolean;
|
|
70
|
-
default?: string;
|
|
71
|
-
path?: string;
|
|
72
|
-
environment?: string;
|
|
73
|
-
projectId?: string;
|
|
74
|
-
}, {
|
|
75
|
-
provider?: "infisical";
|
|
76
|
-
key?: string;
|
|
77
|
-
optional?: boolean;
|
|
78
|
-
default?: string;
|
|
79
|
-
path?: string;
|
|
80
|
-
environment?: string;
|
|
81
|
-
projectId?: string;
|
|
82
|
-
}>]>;
|
|
83
|
-
export declare const secretValueSchema: z.ZodUnion<[z.ZodString, z.ZodDiscriminatedUnion<"provider", [z.ZodObject<{
|
|
30
|
+
}, z.core.$strict>], "provider">;
|
|
31
|
+
export declare const secretValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
84
32
|
provider: z.ZodLiteral<"env">;
|
|
85
33
|
key: z.ZodString;
|
|
86
34
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
87
35
|
default: z.ZodOptional<z.ZodString>;
|
|
88
|
-
},
|
|
89
|
-
provider?: "env";
|
|
90
|
-
key?: string;
|
|
91
|
-
optional?: boolean;
|
|
92
|
-
default?: string;
|
|
93
|
-
}, {
|
|
94
|
-
provider?: "env";
|
|
95
|
-
key?: string;
|
|
96
|
-
optional?: boolean;
|
|
97
|
-
default?: string;
|
|
98
|
-
}>, z.ZodObject<{
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
99
37
|
provider: z.ZodLiteral<"infisical">;
|
|
100
38
|
path: z.ZodString;
|
|
101
39
|
key: z.ZodString;
|
|
@@ -103,23 +41,7 @@ export declare const secretValueSchema: z.ZodUnion<[z.ZodString, z.ZodDiscrimina
|
|
|
103
41
|
environment: z.ZodOptional<z.ZodString>;
|
|
104
42
|
projectId: z.ZodOptional<z.ZodString>;
|
|
105
43
|
default: z.ZodOptional<z.ZodString>;
|
|
106
|
-
},
|
|
107
|
-
provider?: "infisical";
|
|
108
|
-
key?: string;
|
|
109
|
-
optional?: boolean;
|
|
110
|
-
default?: string;
|
|
111
|
-
path?: string;
|
|
112
|
-
environment?: string;
|
|
113
|
-
projectId?: string;
|
|
114
|
-
}, {
|
|
115
|
-
provider?: "infisical";
|
|
116
|
-
key?: string;
|
|
117
|
-
optional?: boolean;
|
|
118
|
-
default?: string;
|
|
119
|
-
path?: string;
|
|
120
|
-
environment?: string;
|
|
121
|
-
projectId?: string;
|
|
122
|
-
}>]>]>;
|
|
44
|
+
}, z.core.$strict>], "provider">]>;
|
|
123
45
|
export type SecretPlaceholder = z.infer<typeof secretPlaceholderSchema>;
|
|
124
46
|
export type SecretValue = z.infer<typeof secretValueSchema>;
|
|
125
47
|
export type EnvSecretPlaceholder = z.infer<typeof envSecretSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-placeholders.d.ts","sourceRoot":"","sources":["../../src/uns-config/secret-placeholders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"secret-placeholders.d.ts","sourceRoot":"","sources":["../../src/uns-config/secret-placeholders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,eAAe;;;;;kBAiBuC,CAAC;AAE7D,QAAA,MAAM,qBAAqB;;;;;;;;kBA6B+B,CAAC;AAE3D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;gCAGlC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;kCAG5B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACnE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE/E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
|