@junobuild/config 2.3.0 → 2.4.1
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 +43 -10
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/satellite/configs/emulator.config.d.ts +95 -0
- package/dist/types/satellite/constants/emulator.constants.d.ts +3 -0
- package/dist/types/satellite/juno.config.d.ts +36 -0
- package/dist/types/satellite/validators/emulator.validators.d.ts +5 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './satellite/configs/module.settings';
|
|
|
15
15
|
export * from './satellite/configs/orbiter.config';
|
|
16
16
|
export * from './satellite/configs/rules';
|
|
17
17
|
export * from './satellite/configs/satellite.config';
|
|
18
|
+
export * from './satellite/constants/emulator.constants';
|
|
18
19
|
export * from './satellite/juno.config';
|
|
19
20
|
export * from './shared/feature.config';
|
|
20
21
|
export * from './shared/storage.config';
|
|
@@ -80,6 +80,62 @@ 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: Stores network configuration and topology (subnet membership, public keys, feature flags).
|
|
92
|
+
* Acts as the source of truth other system canisters read/write to.
|
|
93
|
+
*/
|
|
94
|
+
registry?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* CMC (Cycles Minting Canister): Converts ICP to cycles and distributes them; maintains subnet lists and conversion rate.
|
|
97
|
+
* Requires icp and nns to not be enabled.
|
|
98
|
+
*/
|
|
99
|
+
cmc?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* ICP token: Deploys the ICP ledger and index canisters.
|
|
102
|
+
*/
|
|
103
|
+
icp?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Cycles token: Deploys the cycles ledger and index canisters.
|
|
106
|
+
*/
|
|
107
|
+
cycles?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* NNS governance canisters: Deploys the governance and root canisters.
|
|
110
|
+
* Core governance system (neurons, proposals, voting) and related control logic.
|
|
111
|
+
* Enables managing network-level decisions in an emulated environment.
|
|
112
|
+
*/
|
|
113
|
+
nns?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* SNS canisters: Deploys the SNS-W and aggregator canisters.
|
|
116
|
+
* Service Nervous System stack used to govern individual dapps.
|
|
117
|
+
*/
|
|
118
|
+
sns?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Internet Identity: Deploys the II canister for authentication.
|
|
121
|
+
*/
|
|
122
|
+
internet_identity?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* NNS dapp: Deploys the NNS UI canister and frontend application
|
|
125
|
+
* Requires cmc, icp, nns, sns, internet_identity to be enabled.
|
|
126
|
+
*/
|
|
127
|
+
nns_dapp?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Configuration for customizing the Internet Computer network bootstrapped
|
|
131
|
+
* by the emulator.
|
|
132
|
+
*/
|
|
133
|
+
export interface Network {
|
|
134
|
+
/**
|
|
135
|
+
* System canisters and applications available in the network.
|
|
136
|
+
*/
|
|
137
|
+
services: NetworkServices;
|
|
138
|
+
}
|
|
83
139
|
/**
|
|
84
140
|
* @see EmulatorConfig
|
|
85
141
|
*/
|
|
@@ -98,6 +154,18 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
98
154
|
"linux/arm64": "linux/arm64";
|
|
99
155
|
}>>;
|
|
100
156
|
}, z.core.$strict>>;
|
|
157
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
158
|
+
services: z.ZodObject<{
|
|
159
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
162
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
163
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
164
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
+
internet_identity: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
nns_dapp: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
}, z.core.$strict>;
|
|
168
|
+
}, z.core.$strict>>;
|
|
101
169
|
skylab: z.ZodObject<{
|
|
102
170
|
ports: z.ZodOptional<z.ZodObject<{
|
|
103
171
|
server: z.ZodOptional<z.ZodNumber>;
|
|
@@ -120,6 +188,18 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
120
188
|
"linux/arm64": "linux/arm64";
|
|
121
189
|
}>>;
|
|
122
190
|
}, z.core.$strict>>;
|
|
191
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
services: z.ZodObject<{
|
|
193
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
195
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
196
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
internet_identity: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
nns_dapp: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
}, z.core.$strict>;
|
|
202
|
+
}, z.core.$strict>>;
|
|
123
203
|
console: z.ZodObject<{
|
|
124
204
|
ports: z.ZodOptional<z.ZodObject<{
|
|
125
205
|
/**
|
|
@@ -147,6 +227,18 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
147
227
|
"linux/arm64": "linux/arm64";
|
|
148
228
|
}>>;
|
|
149
229
|
}, z.core.$strict>>;
|
|
230
|
+
network: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
services: z.ZodObject<{
|
|
232
|
+
registry: z.ZodOptional<z.ZodBoolean>;
|
|
233
|
+
cmc: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
icp: z.ZodOptional<z.ZodBoolean>;
|
|
235
|
+
cycles: z.ZodOptional<z.ZodBoolean>;
|
|
236
|
+
nns: z.ZodOptional<z.ZodBoolean>;
|
|
237
|
+
sns: z.ZodOptional<z.ZodBoolean>;
|
|
238
|
+
internet_identity: z.ZodOptional<z.ZodBoolean>;
|
|
239
|
+
nns_dapp: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
}, z.core.$strict>;
|
|
241
|
+
}, z.core.$strict>>;
|
|
150
242
|
satellite: z.ZodObject<{
|
|
151
243
|
ports: z.ZodOptional<z.ZodObject<{
|
|
152
244
|
/**
|
|
@@ -165,11 +257,14 @@ export declare const EmulatorConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
165
257
|
*/
|
|
166
258
|
export type EmulatorConfig = {
|
|
167
259
|
runner?: EmulatorRunner;
|
|
260
|
+
network?: Network;
|
|
168
261
|
skylab: EmulatorSkylab;
|
|
169
262
|
} | {
|
|
170
263
|
runner?: EmulatorRunner;
|
|
264
|
+
network?: Network;
|
|
171
265
|
console: EmulatorConsole;
|
|
172
266
|
} | {
|
|
173
267
|
runner?: EmulatorRunner;
|
|
268
|
+
network?: Network;
|
|
174
269
|
satellite: EmulatorSatellite;
|
|
175
270
|
};
|
|
@@ -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
|
+
internet_identity: z.ZodOptional<z.ZodBoolean>;
|
|
257
|
+
nns_dapp: 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
|
+
internet_identity: z.ZodOptional<z.ZodBoolean>;
|
|
291
|
+
nns_dapp: 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
|
+
internet_identity: z.ZodOptional<z.ZodBoolean>;
|
|
324
|
+
nns_dapp: 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>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as z from 'zod';
|
|
2
|
+
import type { EmulatorConfigSchema } from '../configs/emulator.config';
|
|
3
|
+
type EmulatorConfigInput = z.input<typeof EmulatorConfigSchema>;
|
|
4
|
+
export declare const refineEmulatorConfig: (cfg: EmulatorConfigInput, ctx: z.RefinementCtx) => void;
|
|
5
|
+
export {};
|