@junobuild/config 0.3.1 → 0.4.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.
@@ -1,5 +1,5 @@
1
1
  import { type PrincipalText } from '@dfinity/zod-schemas';
2
- import * as z from 'zod';
2
+ import * as z from 'zod/v4';
3
3
  import { type StorageConfig } from '../shared/storage.config';
4
4
  import { type CliConfig } from '../types/cli.config';
5
5
  import { type JunoConfigMode } from '../types/juno.env';
@@ -8,12 +8,8 @@ import type { Either } from '../types/utility.types';
8
8
  * @see ConsoleId
9
9
  */
10
10
  export declare const ConsoleIdSchema: z.ZodObject<{
11
- id: z.ZodEffects<z.ZodString, string, string>;
12
- }, "strip", z.ZodTypeAny, {
13
- id: string;
14
- }, {
15
- id: string;
16
- }>;
11
+ id: z.ZodString;
12
+ }, z.core.$strip>;
17
13
  /**
18
14
  * Represents the unique identifier for a console.
19
15
  * @interface ConsoleId
@@ -29,12 +25,8 @@ export interface ConsoleId {
29
25
  * @see ConsoleIds
30
26
  */
31
27
  export declare const ConsoleIdsSchema: z.ZodObject<{
32
- ids: z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"production">, z.ZodString]>, z.ZodEffects<z.ZodString, string, string>>;
33
- }, "strip", z.ZodTypeAny, {
34
- ids: Record<string, string>;
35
- }, {
36
- ids: Record<string, string>;
37
- }>;
28
+ ids: z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"production">, z.ZodString]>, z.ZodString>;
29
+ }, z.core.$strip>;
38
30
  /**
39
31
  * Represents a mapping of console identifiers to different configurations based on the mode of the application.
40
32
  * @interface ConsoleIds
@@ -51,313 +43,85 @@ export interface ConsoleIds {
51
43
  /**
52
44
  * @see JunoConsoleConfig
53
45
  */
54
- export declare const JunoConsoleConfigSchema: z.ZodUnion<[z.ZodObject<{
46
+ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
55
47
  storage: z.ZodOptional<z.ZodObject<{
56
48
  headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
49
  source: z.ZodString;
58
- headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
59
- }, "strict", z.ZodTypeAny, {
60
- source: string;
61
- headers: [string, string][];
62
- }, {
63
- source: string;
64
- headers: [string, string][];
65
- }>, "many">>;
50
+ headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
51
+ }, z.core.$strict>>>;
66
52
  rewrites: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
53
  source: z.ZodString;
68
54
  destination: z.ZodString;
69
- }, "strict", z.ZodTypeAny, {
70
- source: string;
71
- destination: string;
72
- }, {
73
- source: string;
74
- destination: string;
75
- }>, "many">>;
55
+ }, z.core.$strict>>>;
76
56
  redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
77
57
  source: z.ZodString;
78
58
  location: z.ZodString;
79
- code: z.ZodUnion<[z.ZodLiteral<301>, z.ZodLiteral<302>]>;
80
- }, "strict", z.ZodTypeAny, {
81
- code: 301 | 302;
82
- source: string;
83
- location: string;
84
- }, {
85
- code: 301 | 302;
86
- source: string;
87
- location: string;
88
- }>, "many">>;
89
- iframe: z.ZodOptional<z.ZodEnum<["deny", "same-origin", "allow-any"]>>;
59
+ code: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>]>;
60
+ }, z.core.$strict>>>;
61
+ iframe: z.ZodOptional<z.ZodEnum<{
62
+ deny: "deny";
63
+ "same-origin": "same-origin";
64
+ "allow-any": "allow-any";
65
+ }>>;
90
66
  rawAccess: z.ZodOptional<z.ZodBoolean>;
91
67
  maxMemorySize: z.ZodOptional<z.ZodObject<{
92
68
  heap: z.ZodOptional<z.ZodBigInt>;
93
69
  stable: z.ZodOptional<z.ZodBigInt>;
94
- }, "strict", z.ZodTypeAny, {
95
- heap?: bigint | undefined;
96
- stable?: bigint | undefined;
97
- }, {
98
- heap?: bigint | undefined;
99
- stable?: bigint | undefined;
100
- }>>;
101
- }, "strip", z.ZodTypeAny, {
102
- headers?: {
103
- source: string;
104
- headers: [string, string][];
105
- }[] | undefined;
106
- rewrites?: {
107
- source: string;
108
- destination: string;
109
- }[] | undefined;
110
- redirects?: {
111
- code: 301 | 302;
112
- source: string;
113
- location: string;
114
- }[] | undefined;
115
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
116
- rawAccess?: boolean | undefined;
117
- maxMemorySize?: {
118
- heap?: bigint | undefined;
119
- stable?: bigint | undefined;
120
- } | undefined;
121
- }, {
122
- headers?: {
123
- source: string;
124
- headers: [string, string][];
125
- }[] | undefined;
126
- rewrites?: {
127
- source: string;
128
- destination: string;
129
- }[] | undefined;
130
- redirects?: {
131
- code: 301 | 302;
132
- source: string;
133
- location: string;
134
- }[] | undefined;
135
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
136
- rawAccess?: boolean | undefined;
137
- maxMemorySize?: {
138
- heap?: bigint | undefined;
139
- stable?: bigint | undefined;
140
- } | undefined;
141
- }>>;
70
+ }, z.core.$strict>>;
71
+ }, z.core.$strip>>;
142
72
  source: z.ZodOptional<z.ZodString>;
143
- ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
144
- gzip: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>>;
145
- encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>], null>, "many">>;
146
- predeploy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
147
- postdeploy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
148
- id: z.ZodEffects<z.ZodString, string, string>;
149
- }, "strict", z.ZodTypeAny, {
150
- id: string;
151
- source?: string | undefined;
152
- gzip?: string | false | undefined;
153
- ignore?: string[] | undefined;
154
- encoding?: [string, "identity" | "gzip" | "compress" | "deflate" | "br"][] | undefined;
155
- predeploy?: string[] | undefined;
156
- postdeploy?: string[] | undefined;
157
- storage?: {
158
- headers?: {
159
- source: string;
160
- headers: [string, string][];
161
- }[] | undefined;
162
- rewrites?: {
163
- source: string;
164
- destination: string;
165
- }[] | undefined;
166
- redirects?: {
167
- code: 301 | 302;
168
- source: string;
169
- location: string;
170
- }[] | undefined;
171
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
172
- rawAccess?: boolean | undefined;
173
- maxMemorySize?: {
174
- heap?: bigint | undefined;
175
- stable?: bigint | undefined;
176
- } | undefined;
177
- } | undefined;
178
- }, {
179
- id: string;
180
- source?: string | undefined;
181
- gzip?: string | false | undefined;
182
- ignore?: string[] | undefined;
183
- encoding?: [string, "identity" | "gzip" | "compress" | "deflate" | "br"][] | undefined;
184
- predeploy?: string[] | undefined;
185
- postdeploy?: string[] | undefined;
186
- storage?: {
187
- headers?: {
188
- source: string;
189
- headers: [string, string][];
190
- }[] | undefined;
191
- rewrites?: {
192
- source: string;
193
- destination: string;
194
- }[] | undefined;
195
- redirects?: {
196
- code: 301 | 302;
197
- source: string;
198
- location: string;
199
- }[] | undefined;
200
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
201
- rawAccess?: boolean | undefined;
202
- maxMemorySize?: {
203
- heap?: bigint | undefined;
204
- stable?: bigint | undefined;
205
- } | undefined;
206
- } | undefined;
207
- }>, z.ZodObject<{
73
+ ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
74
+ gzip: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
75
+ encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
76
+ identity: "identity";
77
+ gzip: "gzip";
78
+ compress: "compress";
79
+ deflate: "deflate";
80
+ br: "br";
81
+ }>], null>>>;
82
+ predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
84
+ id: z.ZodString;
85
+ }, z.core.$strict>, z.ZodObject<{
208
86
  storage: z.ZodOptional<z.ZodObject<{
209
87
  headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
210
88
  source: z.ZodString;
211
- headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
212
- }, "strict", z.ZodTypeAny, {
213
- source: string;
214
- headers: [string, string][];
215
- }, {
216
- source: string;
217
- headers: [string, string][];
218
- }>, "many">>;
89
+ headers: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
90
+ }, z.core.$strict>>>;
219
91
  rewrites: z.ZodOptional<z.ZodArray<z.ZodObject<{
220
92
  source: z.ZodString;
221
93
  destination: z.ZodString;
222
- }, "strict", z.ZodTypeAny, {
223
- source: string;
224
- destination: string;
225
- }, {
226
- source: string;
227
- destination: string;
228
- }>, "many">>;
94
+ }, z.core.$strict>>>;
229
95
  redirects: z.ZodOptional<z.ZodArray<z.ZodObject<{
230
96
  source: z.ZodString;
231
97
  location: z.ZodString;
232
- code: z.ZodUnion<[z.ZodLiteral<301>, z.ZodLiteral<302>]>;
233
- }, "strict", z.ZodTypeAny, {
234
- code: 301 | 302;
235
- source: string;
236
- location: string;
237
- }, {
238
- code: 301 | 302;
239
- source: string;
240
- location: string;
241
- }>, "many">>;
242
- iframe: z.ZodOptional<z.ZodEnum<["deny", "same-origin", "allow-any"]>>;
98
+ code: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>]>;
99
+ }, z.core.$strict>>>;
100
+ iframe: z.ZodOptional<z.ZodEnum<{
101
+ deny: "deny";
102
+ "same-origin": "same-origin";
103
+ "allow-any": "allow-any";
104
+ }>>;
243
105
  rawAccess: z.ZodOptional<z.ZodBoolean>;
244
106
  maxMemorySize: z.ZodOptional<z.ZodObject<{
245
107
  heap: z.ZodOptional<z.ZodBigInt>;
246
108
  stable: z.ZodOptional<z.ZodBigInt>;
247
- }, "strict", z.ZodTypeAny, {
248
- heap?: bigint | undefined;
249
- stable?: bigint | undefined;
250
- }, {
251
- heap?: bigint | undefined;
252
- stable?: bigint | undefined;
253
- }>>;
254
- }, "strip", z.ZodTypeAny, {
255
- headers?: {
256
- source: string;
257
- headers: [string, string][];
258
- }[] | undefined;
259
- rewrites?: {
260
- source: string;
261
- destination: string;
262
- }[] | undefined;
263
- redirects?: {
264
- code: 301 | 302;
265
- source: string;
266
- location: string;
267
- }[] | undefined;
268
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
269
- rawAccess?: boolean | undefined;
270
- maxMemorySize?: {
271
- heap?: bigint | undefined;
272
- stable?: bigint | undefined;
273
- } | undefined;
274
- }, {
275
- headers?: {
276
- source: string;
277
- headers: [string, string][];
278
- }[] | undefined;
279
- rewrites?: {
280
- source: string;
281
- destination: string;
282
- }[] | undefined;
283
- redirects?: {
284
- code: 301 | 302;
285
- source: string;
286
- location: string;
287
- }[] | undefined;
288
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
289
- rawAccess?: boolean | undefined;
290
- maxMemorySize?: {
291
- heap?: bigint | undefined;
292
- stable?: bigint | undefined;
293
- } | undefined;
294
- }>>;
109
+ }, z.core.$strict>>;
110
+ }, z.core.$strip>>;
295
111
  source: z.ZodOptional<z.ZodString>;
296
- ignore: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
297
- gzip: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<false>]>>;
298
- encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<["identity", "gzip", "compress", "deflate", "br"]>], null>, "many">>;
299
- predeploy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
300
- postdeploy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
301
- ids: z.ZodRecord<z.ZodUnion<[z.ZodLiteral<"production">, z.ZodString]>, z.ZodEffects<z.ZodString, string, string>>;
302
- }, "strict", z.ZodTypeAny, {
303
- ids: Record<string, string>;
304
- source?: string | undefined;
305
- gzip?: string | false | undefined;
306
- ignore?: string[] | undefined;
307
- encoding?: [string, "identity" | "gzip" | "compress" | "deflate" | "br"][] | undefined;
308
- predeploy?: string[] | undefined;
309
- postdeploy?: string[] | undefined;
310
- storage?: {
311
- headers?: {
312
- source: string;
313
- headers: [string, string][];
314
- }[] | undefined;
315
- rewrites?: {
316
- source: string;
317
- destination: string;
318
- }[] | undefined;
319
- redirects?: {
320
- code: 301 | 302;
321
- source: string;
322
- location: string;
323
- }[] | undefined;
324
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
325
- rawAccess?: boolean | undefined;
326
- maxMemorySize?: {
327
- heap?: bigint | undefined;
328
- stable?: bigint | undefined;
329
- } | undefined;
330
- } | undefined;
331
- }, {
332
- ids: Record<string, string>;
333
- source?: string | undefined;
334
- gzip?: string | false | undefined;
335
- ignore?: string[] | undefined;
336
- encoding?: [string, "identity" | "gzip" | "compress" | "deflate" | "br"][] | undefined;
337
- predeploy?: string[] | undefined;
338
- postdeploy?: string[] | undefined;
339
- storage?: {
340
- headers?: {
341
- source: string;
342
- headers: [string, string][];
343
- }[] | undefined;
344
- rewrites?: {
345
- source: string;
346
- destination: string;
347
- }[] | undefined;
348
- redirects?: {
349
- code: 301 | 302;
350
- source: string;
351
- location: string;
352
- }[] | undefined;
353
- iframe?: "deny" | "same-origin" | "allow-any" | undefined;
354
- rawAccess?: boolean | undefined;
355
- maxMemorySize?: {
356
- heap?: bigint | undefined;
357
- stable?: bigint | undefined;
358
- } | undefined;
359
- } | undefined;
360
- }>]>;
112
+ ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ gzip: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
114
+ encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
115
+ identity: "identity";
116
+ gzip: "gzip";
117
+ compress: "compress";
118
+ deflate: "deflate";
119
+ br: "br";
120
+ }>], null>>>;
121
+ predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
+ postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
123
+ ids: z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"production">, z.ZodString]>, z.ZodString>;
124
+ }, z.core.$strict>]>;
361
125
  /**
362
126
  * Represents the configuration for a console.
363
127
  * @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig
@@ -1,8 +1,11 @@
1
- import * as z from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  /**
3
3
  * @see ModuleLogVisibility
4
4
  */
5
- export declare const ModuleLogVisibilitySchema: z.ZodEnum<["controllers", "public"]>;
5
+ export declare const ModuleLogVisibilitySchema: z.ZodEnum<{
6
+ controllers: "controllers";
7
+ public: "public";
8
+ }>;
6
9
  /**
7
10
  * Specifies who can see the logs of the module.
8
11
  *
@@ -18,25 +21,14 @@ export type ModuleLogVisibility = 'controllers' | 'public';
18
21
  export declare const ModuleSettingsSchema: z.ZodObject<{
19
22
  freezingThreshold: z.ZodOptional<z.ZodBigInt>;
20
23
  reservedCyclesLimit: z.ZodOptional<z.ZodBigInt>;
21
- logVisibility: z.ZodOptional<z.ZodEnum<["controllers", "public"]>>;
24
+ logVisibility: z.ZodOptional<z.ZodEnum<{
25
+ controllers: "controllers";
26
+ public: "public";
27
+ }>>;
22
28
  heapMemoryLimit: z.ZodOptional<z.ZodBigInt>;
23
29
  memoryAllocation: z.ZodOptional<z.ZodBigInt>;
24
30
  computeAllocation: z.ZodOptional<z.ZodBigInt>;
25
- }, "strict", z.ZodTypeAny, {
26
- freezingThreshold?: bigint | undefined;
27
- reservedCyclesLimit?: bigint | undefined;
28
- logVisibility?: "controllers" | "public" | undefined;
29
- heapMemoryLimit?: bigint | undefined;
30
- memoryAllocation?: bigint | undefined;
31
- computeAllocation?: bigint | undefined;
32
- }, {
33
- freezingThreshold?: bigint | undefined;
34
- reservedCyclesLimit?: bigint | undefined;
35
- logVisibility?: "controllers" | "public" | undefined;
36
- heapMemoryLimit?: bigint | undefined;
37
- memoryAllocation?: bigint | undefined;
38
- computeAllocation?: bigint | undefined;
39
- }>;
31
+ }, z.core.$strict>;
40
32
  /**
41
33
  * Settings for a module - Satellite, Mission Control or Orbiter.
42
34
  *
@@ -1,4 +1,4 @@
1
- import * as z from 'zod';
1
+ import * as z from 'zod/v4';
2
2
  /**
3
3
  * @see JunoPackageDependencies
4
4
  */
@@ -10,12 +10,4 @@ export declare const JunoPackageSchema: z.ZodObject<{
10
10
  name: z.ZodString;
11
11
  version: z.ZodString;
12
12
  dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
13
- }, "strip", z.ZodTypeAny, {
14
- name: string;
15
- version: string;
16
- dependencies?: Record<string, string> | undefined;
17
- }, {
18
- name: string;
19
- version: string;
20
- dependencies?: Record<string, string> | undefined;
21
- }>;
13
+ }, z.core.$strip>;