@junobuild/config 2.2.0 → 2.3.0-next-2025-09-26
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 +38 -5
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +3 -3
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +3 -3
- package/dist/types/cli/run.context.d.ts +1 -1
- package/dist/types/cli/run.d.ts +2 -2
- package/dist/types/cli/run.env.d.ts +1 -1
- package/dist/types/console/console.config.d.ts +5 -5
- package/dist/types/pkg/juno.package.d.ts +1 -1
- package/dist/types/satellite/configs/assertions.config.d.ts +1 -1
- package/dist/types/satellite/configs/authentication.config.d.ts +1 -1
- package/dist/types/satellite/configs/collections.d.ts +1 -1
- package/dist/types/satellite/configs/datastore.config.d.ts +1 -1
- package/dist/types/satellite/configs/emulator.config.d.ts +102 -1
- package/dist/types/satellite/configs/module.settings.d.ts +1 -1
- package/dist/types/satellite/configs/orbiter.config.d.ts +1 -1
- package/dist/types/satellite/configs/rules.d.ts +1 -1
- package/dist/types/satellite/configs/satellite.config.d.ts +1 -1
- package/dist/types/satellite/juno.config.d.ts +37 -1
- package/dist/types/shared/feature.config.d.ts +1 -1
- package/dist/types/shared/storage.config.d.ts +1 -1
- package/dist/types/types/cli.config.d.ts +4 -4
- package/dist/types/types/encoding.d.ts +1 -1
- package/dist/types/types/juno.env.d.ts +1 -1
- package/dist/types/utils/identity.utils.d.ts +1 -1
- package/dist/types/utils/principal.utils.d.ts +1 -1
- package/dist/types/utils/zod.utils.d.ts +23 -2
- package/package.json +4 -4
package/dist/types/cli/run.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type OnRun } from './run.context';
|
|
3
3
|
import type { OnRunEnv } from './run.env';
|
|
4
|
-
export declare const RunFnSchema: z.
|
|
4
|
+
export declare const RunFnSchema: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
5
5
|
satelliteId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<import("@dfinity/principal").Principal, unknown>>;
|
|
6
6
|
identity: z.ZodUnknown;
|
|
7
7
|
container: z.ZodOptional<z.ZodString>;
|
|
@@ -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';
|
|
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';
|
|
@@ -75,8 +75,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
75
75
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
76
76
|
pattern: z.ZodOptional<z.ZodString>;
|
|
77
77
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
78
|
-
both: "both";
|
|
79
78
|
replace: "replace";
|
|
79
|
+
both: "both";
|
|
80
80
|
}>>;
|
|
81
81
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
82
82
|
gzip: "gzip";
|
|
@@ -85,8 +85,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
85
85
|
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
86
86
|
pattern: z.ZodOptional<z.ZodString>;
|
|
87
87
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
88
|
-
both: "both";
|
|
89
88
|
replace: "replace";
|
|
89
|
+
both: "both";
|
|
90
90
|
}>>;
|
|
91
91
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
92
92
|
gzip: "gzip";
|
|
@@ -135,8 +135,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
135
135
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
136
136
|
pattern: z.ZodOptional<z.ZodString>;
|
|
137
137
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
138
|
-
both: "both";
|
|
139
138
|
replace: "replace";
|
|
139
|
+
both: "both";
|
|
140
140
|
}>>;
|
|
141
141
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
142
142
|
gzip: "gzip";
|
|
@@ -145,8 +145,8 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
145
145
|
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
146
146
|
pattern: z.ZodOptional<z.ZodString>;
|
|
147
147
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
148
|
-
both: "both";
|
|
149
148
|
replace: "replace";
|
|
149
|
+
both: "both";
|
|
150
150
|
}>>;
|
|
151
151
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
152
152
|
gzip: "gzip";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
/**
|
|
3
3
|
* Represents the ports exposed by an emulator container.
|
|
4
4
|
*/
|
|
@@ -80,6 +80,68 @@ export interface EmulatorRunner {
|
|
|
80
80
|
*/
|
|
81
81
|
platform?: 'linux/amd64' | 'linux/arm64';
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Network services that can be enabled in the emulator.
|
|
85
|
+
*
|
|
86
|
+
* Each flag corresponds to a system canister or application that can be included
|
|
87
|
+
* in the local Internet Computer network when the emulator starts.
|
|
88
|
+
*/
|
|
89
|
+
export interface NetworkServices {
|
|
90
|
+
/**
|
|
91
|
+
* Registry canister:
|
|
92
|
+
* Stores network configuration and topology (subnet membership, public keys, feature flags).
|
|
93
|
+
* Acts as the source of truth other system canisters read/write to.
|
|
94
|
+
*/
|
|
95
|
+
registry?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* CMC (Cycles Minting Canister):
|
|
98
|
+
* Converts ICP to cycles and distributes them; maintains subnet lists and conversion rate.
|
|
99
|
+
*/
|
|
100
|
+
cmc?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* ICP token:
|
|
103
|
+
* Deploys the ICP ledger and index canisters.
|
|
104
|
+
*/
|
|
105
|
+
icp?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Cycles token:
|
|
108
|
+
* Deploys the cycles ledger and index canisters.
|
|
109
|
+
*/
|
|
110
|
+
cycles?: boolean;
|
|
111
|
+
/**
|
|
112
|
+
* NNS governance canisters:
|
|
113
|
+
* Deploys the governance and root canisters.
|
|
114
|
+
* Core governance system (neurons, proposals, voting) and related control logic.
|
|
115
|
+
* Enables managing network-level decisions in an emulated environment.
|
|
116
|
+
*/
|
|
117
|
+
nns?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* SNS canisters:
|
|
120
|
+
* Deploys the SNS-W and aggregator canisters.
|
|
121
|
+
* Service Nervous System stack used to govern individual dapps.
|
|
122
|
+
*/
|
|
123
|
+
sns?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Internet Identity (II):
|
|
126
|
+
* Deploys the II canister for authentication.
|
|
127
|
+
*/
|
|
128
|
+
ii?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* NNS dapp:
|
|
131
|
+
* Deploys the NNS UI canister and frontend application
|
|
132
|
+
*/
|
|
133
|
+
nnsDapp?: boolean;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Configuration for customizing the Internet Computer network bootstrapped
|
|
137
|
+
* by the emulator.
|
|
138
|
+
*/
|
|
139
|
+
export interface Network {
|
|
140
|
+
/**
|
|
141
|
+
* System canisters and applications available in the network.
|
|
142
|
+
*/
|
|
143
|
+
services: NetworkServices;
|
|
144
|
+
}
|
|
83
145
|
/**
|
|
84
146
|
* @see EmulatorConfig
|
|
85
147
|
*/
|
|
@@ -98,6 +160,18 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
98
160
|
"linux/arm64": "linux/arm64";
|
|
99
161
|
}>>;
|
|
100
162
|
}, z.core.$strict>>;
|
|
163
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
services: z.ZodObject<{
|
|
165
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
169
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
ii: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
nnsDapp: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
}, z.core.$strict>>;
|
|
101
175
|
skylab: z.ZodObject<{
|
|
102
176
|
ports: z.ZodOptional<z.ZodObject<{
|
|
103
177
|
server: z.ZodOptional<z.ZodNumber>;
|
|
@@ -120,6 +194,18 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
120
194
|
"linux/arm64": "linux/arm64";
|
|
121
195
|
}>>;
|
|
122
196
|
}, z.core.$strict>>;
|
|
197
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
198
|
+
services: z.ZodObject<{
|
|
199
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
202
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
203
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
204
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
205
|
+
ii: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
nnsDapp: z.ZodOptional<z.ZodBoolean>;
|
|
207
|
+
}, z.core.$strict>;
|
|
208
|
+
}, z.core.$strict>>;
|
|
123
209
|
console: z.ZodObject<{
|
|
124
210
|
ports: z.ZodOptional<z.ZodObject<{
|
|
125
211
|
/**
|
|
@@ -147,6 +233,18 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
147
233
|
"linux/arm64": "linux/arm64";
|
|
148
234
|
}>>;
|
|
149
235
|
}, z.core.$strict>>;
|
|
236
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
services: z.ZodObject<{
|
|
238
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
ii: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
nnsDapp: z.ZodOptional<z.ZodBoolean>;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
}, z.core.$strict>>;
|
|
150
248
|
satellite: z.ZodObject<{
|
|
151
249
|
ports: z.ZodOptional<z.ZodObject<{
|
|
152
250
|
/**
|
|
@@ -165,11 +263,14 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
165
263
|
*/
|
|
166
264
|
export type EmulatorConfig = {
|
|
167
265
|
runner?: EmulatorRunner;
|
|
266
|
+
network?: Network;
|
|
168
267
|
skylab: EmulatorSkylab;
|
|
169
268
|
} | {
|
|
170
269
|
runner?: EmulatorRunner;
|
|
270
|
+
network?: Network;
|
|
171
271
|
console: EmulatorConsole;
|
|
172
272
|
} | {
|
|
173
273
|
runner?: EmulatorRunner;
|
|
274
|
+
network?: Network;
|
|
174
275
|
satellite: EmulatorSatellite;
|
|
175
276
|
};
|
|
@@ -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';
|
|
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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type EmulatorConfig } from './configs/emulator.config';
|
|
3
3
|
import { type OrbiterConfig } from './configs/orbiter.config';
|
|
4
4
|
import { type SatelliteConfig } from './configs/satellite.config';
|
|
@@ -245,6 +245,18 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
245
245
|
"linux/arm64": "linux/arm64";
|
|
246
246
|
}>>;
|
|
247
247
|
}, z.core.$strict>>;
|
|
248
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
249
|
+
services: z.ZodObject<{
|
|
250
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
252
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
253
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
254
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
255
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
+
ii: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
nnsDapp: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
+
}, z.core.$strict>;
|
|
259
|
+
}, z.core.$strict>>;
|
|
248
260
|
skylab: z.ZodObject<{
|
|
249
261
|
ports: z.ZodOptional<z.ZodObject<{
|
|
250
262
|
server: z.ZodOptional<z.ZodNumber>;
|
|
@@ -267,6 +279,18 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
267
279
|
"linux/arm64": "linux/arm64";
|
|
268
280
|
}>>;
|
|
269
281
|
}, z.core.$strict>>;
|
|
282
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
283
|
+
services: z.ZodObject<{
|
|
284
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
286
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
287
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
288
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
ii: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
nnsDapp: z.ZodOptional<z.ZodBoolean>;
|
|
292
|
+
}, z.core.$strict>;
|
|
293
|
+
}, z.core.$strict>>;
|
|
270
294
|
console: z.ZodObject<{
|
|
271
295
|
ports: z.ZodOptional<z.ZodObject<{
|
|
272
296
|
server: z.ZodOptional<z.ZodNumber>;
|
|
@@ -288,6 +312,18 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
288
312
|
"linux/arm64": "linux/arm64";
|
|
289
313
|
}>>;
|
|
290
314
|
}, z.core.$strict>>;
|
|
315
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
316
|
+
services: z.ZodObject<{
|
|
317
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
318
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
319
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
320
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
321
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
322
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
323
|
+
ii: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
+
nnsDapp: z.ZodOptional<z.ZodBoolean>;
|
|
325
|
+
}, z.core.$strict>;
|
|
326
|
+
}, z.core.$strict>>;
|
|
291
327
|
satellite: z.ZodObject<{
|
|
292
328
|
ports: z.ZodOptional<z.ZodObject<{
|
|
293
329
|
server: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
import { type EncodingType } from './encoding';
|
|
3
3
|
/**
|
|
4
4
|
* @see Precompress
|
|
@@ -6,8 +6,8 @@ import { type EncodingType } from './encoding';
|
|
|
6
6
|
export declare const PrecompressSchema: z.ZodObject<{
|
|
7
7
|
pattern: z.ZodOptional<z.ZodString>;
|
|
8
8
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
both: "both";
|
|
10
9
|
replace: "replace";
|
|
10
|
+
both: "both";
|
|
11
11
|
}>>;
|
|
12
12
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
13
13
|
gzip: "gzip";
|
|
@@ -23,8 +23,8 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
23
23
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
24
24
|
pattern: z.ZodOptional<z.ZodString>;
|
|
25
25
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
26
|
-
both: "both";
|
|
27
26
|
replace: "replace";
|
|
27
|
+
both: "both";
|
|
28
28
|
}>>;
|
|
29
29
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
30
30
|
gzip: "gzip";
|
|
@@ -33,8 +33,8 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
33
33
|
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
34
34
|
pattern: z.ZodOptional<z.ZodString>;
|
|
35
35
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
36
|
-
both: "both";
|
|
37
36
|
replace: "replace";
|
|
37
|
+
both: "both";
|
|
38
38
|
}>>;
|
|
39
39
|
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
40
40
|
gzip: "gzip";
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
import * as z from 'zod
|
|
2
|
-
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Wraps a Zod function schema so that parsing returns the **original function**
|
|
4
|
+
* instead of Zod's wrapped validator.
|
|
5
|
+
*
|
|
6
|
+
* Why?
|
|
7
|
+
* ----
|
|
8
|
+
* In Zod v4, `z.function({...})` normally returns a wrapper that validates
|
|
9
|
+
* both arguments and the return value **every time the function is called**.
|
|
10
|
+
* If your function's return type is `void | Promise<void>`, Zod tries to
|
|
11
|
+
* validate it synchronously, which can throw
|
|
12
|
+
* "Encountered Promise during synchronous parse"
|
|
13
|
+
* when the implementation is async.
|
|
14
|
+
*
|
|
15
|
+
* By using `.implement`, we tell Zod: “this is the function that satisfies
|
|
16
|
+
* the schema.” That way the schema still validates the function shape at
|
|
17
|
+
* parse time, but the returned value is the **original function** you passed
|
|
18
|
+
* in — no runtime wrapper, no sync/async mismatch.
|
|
19
|
+
*
|
|
20
|
+
* Reference:
|
|
21
|
+
* https://github.com/colinhacks/zod/issues/4143#issuecomment-2845134912*
|
|
22
|
+
*/
|
|
23
|
+
export declare const createFunctionSchema: <T extends z.ZodFunction>(schema: T) => z.ZodCustom<Parameters<T["implement"]>[0], Parameters<T["implement"]>[0]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-next-2025-09-26",
|
|
4
4
|
"description": "Configuration options for Juno CLI",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://juno.build",
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@dfinity/zod-schemas": "
|
|
45
|
-
"zod": "
|
|
44
|
+
"@dfinity/zod-schemas": "*",
|
|
45
|
+
"zod": "*"
|
|
46
46
|
}
|
|
47
|
-
}
|
|
47
|
+
}
|