@junobuild/config 1.1.0 → 1.1.1-next-2025-08-11
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 +666 -66
- 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 -1
- package/dist/types/satellite/configs/collections.d.ts +8 -8
- package/dist/types/satellite/configs/rules.d.ts +3 -3
- package/dist/types/satellite/configs/satellite.config.d.ts +11 -11
- package/dist/types/satellite/juno.config.d.ts +10 -10
- package/package.json +4 -4
- package/dist/types/{module → satellite/configs}/module.settings.d.ts +2 -2
package/README.md
CHANGED
|
@@ -14,18 +14,169 @@ Configuration options for [Juno] CLI.
|
|
|
14
14
|
|
|
15
15
|
### :wrench: Constants
|
|
16
16
|
|
|
17
|
+
- [SatelliteAssertionsSchema](#gear-satelliteassertionsschema)
|
|
18
|
+
- [AuthenticationConfigInternetIdentitySchema](#gear-authenticationconfiginternetidentityschema)
|
|
19
|
+
- [AuthenticationConfigRulesSchema](#gear-authenticationconfigrulesschema)
|
|
20
|
+
- [AuthenticationConfigSchema](#gear-authenticationconfigschema)
|
|
21
|
+
- [PermissionTextSchema](#gear-permissiontextschema)
|
|
22
|
+
- [MemoryTextSchema](#gear-memorytextschema)
|
|
23
|
+
- [RulesTypeSchema](#gear-rulestypeschema)
|
|
24
|
+
- [RuleSchema](#gear-ruleschema)
|
|
25
|
+
- [DatastoreCollectionSchema](#gear-datastorecollectionschema)
|
|
26
|
+
- [StorageCollectionSchema](#gear-storagecollectionschema)
|
|
27
|
+
- [CollectionsSchema](#gear-collectionsschema)
|
|
17
28
|
- [MaxMemorySizeConfigSchema](#gear-maxmemorysizeconfigschema)
|
|
29
|
+
- [DatastoreConfigSchema](#gear-datastoreconfigschema)
|
|
30
|
+
- [EmulatorConfigSchema](#gear-emulatorconfigschema)
|
|
31
|
+
- [ModuleLogVisibilitySchema](#gear-modulelogvisibilityschema)
|
|
32
|
+
- [ModuleSettingsSchema](#gear-modulesettingsschema)
|
|
33
|
+
- [JunoConfigModeSchema](#gear-junoconfigmodeschema)
|
|
34
|
+
- [JunoConfigEnvSchema](#gear-junoconfigenvschema)
|
|
35
|
+
- [OrbiterIdSchema](#gear-orbiteridschema)
|
|
36
|
+
- [OrbiterIdsSchema](#gear-orbiteridsschema)
|
|
37
|
+
- [OrbiterConfigSchema](#gear-orbiterconfigschema)
|
|
18
38
|
- [StorageConfigSourceGlobSchema](#gear-storageconfigsourceglobschema)
|
|
19
39
|
- [StorageConfigHeaderSchema](#gear-storageconfigheaderschema)
|
|
20
40
|
- [StorageConfigRewriteSchema](#gear-storageconfigrewriteschema)
|
|
21
41
|
- [StorageConfigRedirectSchema](#gear-storageconfigredirectschema)
|
|
22
42
|
- [StorageConfigSchema](#gear-storageconfigschema)
|
|
23
|
-
- [ModuleLogVisibilitySchema](#gear-modulelogvisibilityschema)
|
|
24
|
-
- [ModuleSettingsSchema](#gear-modulesettingsschema)
|
|
25
|
-
- [JunoConfigModeSchema](#gear-junoconfigmodeschema)
|
|
26
|
-
- [JunoConfigEnvSchema](#gear-junoconfigenvschema)
|
|
27
43
|
- [EncodingTypeSchema](#gear-encodingtypeschema)
|
|
28
44
|
- [CliConfigSchema](#gear-cliconfigschema)
|
|
45
|
+
- [SatelliteIdSchema](#gear-satelliteidschema)
|
|
46
|
+
- [SatelliteIdsSchema](#gear-satelliteidsschema)
|
|
47
|
+
- [SatelliteConfigOptionsSchema](#gear-satelliteconfigoptionsschema)
|
|
48
|
+
|
|
49
|
+
#### :gear: SatelliteAssertionsSchema
|
|
50
|
+
|
|
51
|
+
| Constant | Type |
|
|
52
|
+
| --------------------------- | ---------------------------------------------------------------------------------------------- |
|
|
53
|
+
| `SatelliteAssertionsSchema` | `ZodObject<{ heapMemory: ZodOptional<ZodUnion<readonly [ZodBigInt, ZodBoolean]>>; }, $strict>` |
|
|
54
|
+
|
|
55
|
+
References:
|
|
56
|
+
|
|
57
|
+
- SatelliteAssertions
|
|
58
|
+
|
|
59
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/assertions.config.ts#L6)
|
|
60
|
+
|
|
61
|
+
#### :gear: AuthenticationConfigInternetIdentitySchema
|
|
62
|
+
|
|
63
|
+
| Constant | Type |
|
|
64
|
+
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `AuthenticationConfigInternetIdentitySchema` | `ZodObject<{ derivationOrigin: ZodOptional<ZodURL>; externalAlternativeOrigins: ZodOptional<ZodArray<ZodURL>>; }, $strict>` |
|
|
66
|
+
|
|
67
|
+
References:
|
|
68
|
+
|
|
69
|
+
- AuthenticationConfigInternetIdentity
|
|
70
|
+
|
|
71
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/authentication.config.ts#L7)
|
|
72
|
+
|
|
73
|
+
#### :gear: AuthenticationConfigRulesSchema
|
|
74
|
+
|
|
75
|
+
| Constant | Type |
|
|
76
|
+
| --------------------------------- | -------------------------------------------------------------- |
|
|
77
|
+
| `AuthenticationConfigRulesSchema` | `ZodObject<{ allowedCallers: ZodArray<ZodString>; }, $strict>` |
|
|
78
|
+
|
|
79
|
+
References:
|
|
80
|
+
|
|
81
|
+
- AuthenticationConfigRules
|
|
82
|
+
|
|
83
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/authentication.config.ts#L36)
|
|
84
|
+
|
|
85
|
+
#### :gear: AuthenticationConfigSchema
|
|
86
|
+
|
|
87
|
+
| Constant | Type |
|
|
88
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
89
|
+
| `AuthenticationConfigSchema` | `ZodObject<{ internetIdentity: ZodOptional<ZodObject<{ derivationOrigin: ZodOptional<ZodURL>; externalAlternativeOrigins: ZodOptional<ZodArray<ZodURL>>; }, $strict>>; rules: ZodOptional<...>; version: ZodOptional<...>; }, $strict>` |
|
|
90
|
+
|
|
91
|
+
References:
|
|
92
|
+
|
|
93
|
+
- AuthenticationConfig
|
|
94
|
+
|
|
95
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/authentication.config.ts#L59)
|
|
96
|
+
|
|
97
|
+
#### :gear: PermissionTextSchema
|
|
98
|
+
|
|
99
|
+
| Constant | Type |
|
|
100
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
101
|
+
| `PermissionTextSchema` | `ZodEnum<{ public: "public"; private: "private"; managed: "managed"; controllers: "controllers"; }>` |
|
|
102
|
+
|
|
103
|
+
References:
|
|
104
|
+
|
|
105
|
+
- PermissionText
|
|
106
|
+
|
|
107
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L6)
|
|
108
|
+
|
|
109
|
+
#### :gear: MemoryTextSchema
|
|
110
|
+
|
|
111
|
+
| Constant | Type |
|
|
112
|
+
| ------------------ | ---------------------------------------------- |
|
|
113
|
+
| `MemoryTextSchema` | `ZodEnum<{ heap: "heap"; stable: "stable"; }>` |
|
|
114
|
+
|
|
115
|
+
References:
|
|
116
|
+
|
|
117
|
+
- MemoryText
|
|
118
|
+
|
|
119
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L17)
|
|
120
|
+
|
|
121
|
+
#### :gear: RulesTypeSchema
|
|
122
|
+
|
|
123
|
+
| Constant | Type |
|
|
124
|
+
| ----------------- | -------------------------------------------- |
|
|
125
|
+
| `RulesTypeSchema` | `ZodEnum<{ db: "db"; storage: "storage"; }>` |
|
|
126
|
+
|
|
127
|
+
References:
|
|
128
|
+
|
|
129
|
+
- RulesType
|
|
130
|
+
|
|
131
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L28)
|
|
132
|
+
|
|
133
|
+
#### :gear: RuleSchema
|
|
134
|
+
|
|
135
|
+
| Constant | Type |
|
|
136
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
137
|
+
| `RuleSchema` | `ZodObject<{ collection: ZodString; read: ZodEnum<{ public: "public"; private: "private"; managed: "managed"; controllers: "controllers"; }>; write: ZodEnum<{ public: "public"; private: "private"; managed: "managed"; controllers: "controllers"; }>; ... 8 more ...; maxTokens: ZodOptional<...>; }, $strict>` |
|
|
138
|
+
|
|
139
|
+
References:
|
|
140
|
+
|
|
141
|
+
- Rule
|
|
142
|
+
|
|
143
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L39)
|
|
144
|
+
|
|
145
|
+
#### :gear: DatastoreCollectionSchema
|
|
146
|
+
|
|
147
|
+
| Constant | Type |
|
|
148
|
+
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
149
|
+
| `DatastoreCollectionSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; collection: ZodString; read: ZodEnum<{ public: "public"; private: "private"; managed: "managed"; controllers: "controllers"; }>; ... 5 more ...; maxTokens: ZodOptional<...>; }, $strict>` |
|
|
150
|
+
|
|
151
|
+
References:
|
|
152
|
+
|
|
153
|
+
- DatastoreCollection
|
|
154
|
+
|
|
155
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/collections.ts#L7)
|
|
156
|
+
|
|
157
|
+
#### :gear: StorageCollectionSchema
|
|
158
|
+
|
|
159
|
+
| Constant | Type |
|
|
160
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
161
|
+
| `StorageCollectionSchema` | `ZodObject<{ version: ZodOptional<ZodBigInt>; collection: ZodString; read: ZodEnum<{ public: "public"; private: "private"; managed: "managed"; controllers: "controllers"; }>; ... 5 more ...; maxTokens: ZodOptional<...>; }, $strict>` |
|
|
162
|
+
|
|
163
|
+
References:
|
|
164
|
+
|
|
165
|
+
- StorageCollection
|
|
166
|
+
|
|
167
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/collections.ts#L22)
|
|
168
|
+
|
|
169
|
+
#### :gear: CollectionsSchema
|
|
170
|
+
|
|
171
|
+
| Constant | Type |
|
|
172
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
173
|
+
| `CollectionsSchema` | `ZodObject<{ datastore: ZodOptional<ZodArray<ZodObject<{ version: ZodOptional<ZodBigInt>; collection: ZodString; read: ZodEnum<{ public: "public"; private: "private"; managed: "managed"; controllers: "controllers"; }>; ... 5 more ...; maxTokens: ZodOptional<...>; }, $strict>>>; storage: ZodOptional<...>; }, $strict>` |
|
|
174
|
+
|
|
175
|
+
References:
|
|
176
|
+
|
|
177
|
+
- Collections
|
|
178
|
+
|
|
179
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/collections.ts#L37)
|
|
29
180
|
|
|
30
181
|
#### :gear: MaxMemorySizeConfigSchema
|
|
31
182
|
|
|
@@ -33,14 +184,130 @@ Configuration options for [Juno] CLI.
|
|
|
33
184
|
| --------------------------- | --------------------------------------------------------------------------------------- |
|
|
34
185
|
| `MaxMemorySizeConfigSchema` | `ZodObject<{ heap: ZodOptional<ZodBigInt>; stable: ZodOptional<ZodBigInt>; }, $strict>` |
|
|
35
186
|
|
|
187
|
+
References:
|
|
188
|
+
|
|
189
|
+
- MaxMemorySizeConfig
|
|
190
|
+
|
|
36
191
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/feature.config.ts#L6)
|
|
37
192
|
|
|
193
|
+
#### :gear: DatastoreConfigSchema
|
|
194
|
+
|
|
195
|
+
| Constant | Type |
|
|
196
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
197
|
+
| `DatastoreConfigSchema` | `ZodObject<{ maxMemorySize: ZodOptional<ZodObject<{ heap: ZodOptional<ZodBigInt>; stable: ZodOptional<ZodBigInt>; }, $strict>>; version: ZodOptional<...>; }, $strict>` |
|
|
198
|
+
|
|
199
|
+
References:
|
|
200
|
+
|
|
201
|
+
- DatastoreConfig
|
|
202
|
+
|
|
203
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/datastore.config.ts#L7)
|
|
204
|
+
|
|
205
|
+
#### :gear: EmulatorConfigSchema
|
|
206
|
+
|
|
207
|
+
| Constant | Type |
|
|
208
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
209
|
+
| `EmulatorConfigSchema` | `ZodUnion<readonly [ZodObject<{ runner: ZodOptional<ZodObject<{ type: ZodEnum<{ docker: "docker"; podman: "podman"; }>; image: ZodOptional<ZodString>; name: ZodOptional<ZodString>; volume: ZodOptional<...>; target: ZodOptional<...>; platform: ZodOptional<...>; }, $strict>>; skylab: ZodObject<...>; }, $strict>, ZodObj...` |
|
|
210
|
+
|
|
211
|
+
References:
|
|
212
|
+
|
|
213
|
+
- EmulatorConfig
|
|
214
|
+
|
|
215
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L151)
|
|
216
|
+
|
|
217
|
+
#### :gear: ModuleLogVisibilitySchema
|
|
218
|
+
|
|
219
|
+
| Constant | Type |
|
|
220
|
+
| --------------------------- | ------------------------------------------------------------ |
|
|
221
|
+
| `ModuleLogVisibilitySchema` | `ZodEnum<{ public: "public"; controllers: "controllers"; }>` |
|
|
222
|
+
|
|
223
|
+
References:
|
|
224
|
+
|
|
225
|
+
- ModuleLogVisibility
|
|
226
|
+
|
|
227
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/module.settings.ts#L6)
|
|
228
|
+
|
|
229
|
+
#### :gear: ModuleSettingsSchema
|
|
230
|
+
|
|
231
|
+
| Constant | Type |
|
|
232
|
+
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
233
|
+
| `ModuleSettingsSchema` | `ZodObject<{ freezingThreshold: ZodOptional<ZodBigInt>; reservedCyclesLimit: ZodOptional<ZodBigInt>; logVisibility: ZodOptional<ZodEnum<{ public: "public"; controllers: "controllers"; }>>; heapMemoryLimit: ZodOptional<...>; memoryAllocation: ZodOptional<...>; computeAllocation: ZodOptional<...>; }, $strict>` |
|
|
234
|
+
|
|
235
|
+
References:
|
|
236
|
+
|
|
237
|
+
- ModuleSettings
|
|
238
|
+
|
|
239
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/module.settings.ts#L21)
|
|
240
|
+
|
|
241
|
+
#### :gear: JunoConfigModeSchema
|
|
242
|
+
|
|
243
|
+
| Constant | Type |
|
|
244
|
+
| ---------------------- | ---------------------------------------------------------- |
|
|
245
|
+
| `JunoConfigModeSchema` | `ZodUnion<readonly [ZodLiteral<"production">, ZodString]>` |
|
|
246
|
+
|
|
247
|
+
References:
|
|
248
|
+
|
|
249
|
+
- JunoConfigMode
|
|
250
|
+
|
|
251
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L6)
|
|
252
|
+
|
|
253
|
+
#### :gear: JunoConfigEnvSchema
|
|
254
|
+
|
|
255
|
+
| Constant | Type |
|
|
256
|
+
| --------------------- | ---------------------------------------------------------------------------------------- |
|
|
257
|
+
| `JunoConfigEnvSchema` | `ZodObject<{ mode: ZodUnion<readonly [ZodLiteral<"production">, ZodString]>; }, $strip>` |
|
|
258
|
+
|
|
259
|
+
References:
|
|
260
|
+
|
|
261
|
+
- JunoConfigEnv
|
|
262
|
+
|
|
263
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L17)
|
|
264
|
+
|
|
265
|
+
#### :gear: OrbiterIdSchema
|
|
266
|
+
|
|
267
|
+
| Constant | Type |
|
|
268
|
+
| ----------------- | --------------------------------------- |
|
|
269
|
+
| `OrbiterIdSchema` | `ZodObject<{ id: ZodString; }, $strip>` |
|
|
270
|
+
|
|
271
|
+
References:
|
|
272
|
+
|
|
273
|
+
- OrbiterId
|
|
274
|
+
|
|
275
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/orbiter.config.ts#L10)
|
|
276
|
+
|
|
277
|
+
#### :gear: OrbiterIdsSchema
|
|
278
|
+
|
|
279
|
+
| Constant | Type |
|
|
280
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------- |
|
|
281
|
+
| `OrbiterIdsSchema` | `ZodObject<{ ids: ZodRecord<ZodUnion<readonly [ZodLiteral<"production">, ZodString]>, ZodString>; }, $strip>` |
|
|
282
|
+
|
|
283
|
+
References:
|
|
284
|
+
|
|
285
|
+
- OrbiterIds
|
|
286
|
+
|
|
287
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/orbiter.config.ts#L29)
|
|
288
|
+
|
|
289
|
+
#### :gear: OrbiterConfigSchema
|
|
290
|
+
|
|
291
|
+
| Constant | Type |
|
|
292
|
+
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
293
|
+
| `OrbiterConfigSchema` | `ZodUnion<readonly [ZodObject<{ id: ZodString; }, $strict>, ZodObject<{ ids: ZodRecord<ZodUnion<readonly [ZodLiteral<"production">, ZodString]>, ZodString>; }, $strict>]>` |
|
|
294
|
+
|
|
295
|
+
References:
|
|
296
|
+
|
|
297
|
+
- OrbiterConfig
|
|
298
|
+
|
|
299
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/orbiter.config.ts#L56)
|
|
300
|
+
|
|
38
301
|
#### :gear: StorageConfigSourceGlobSchema
|
|
39
302
|
|
|
40
303
|
| Constant | Type |
|
|
41
304
|
| ------------------------------- | ----------- |
|
|
42
305
|
| `StorageConfigSourceGlobSchema` | `ZodString` |
|
|
43
306
|
|
|
307
|
+
References:
|
|
308
|
+
|
|
309
|
+
- StorageConfigSourceGlob
|
|
310
|
+
|
|
44
311
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L7)
|
|
45
312
|
|
|
46
313
|
#### :gear: StorageConfigHeaderSchema
|
|
@@ -49,6 +316,10 @@ Configuration options for [Juno] CLI.
|
|
|
49
316
|
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
50
317
|
| `StorageConfigHeaderSchema` | `ZodObject<{ source: ZodString; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>>; }, $strict>` |
|
|
51
318
|
|
|
319
|
+
References:
|
|
320
|
+
|
|
321
|
+
- StorageConfigHeader
|
|
322
|
+
|
|
52
323
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L18)
|
|
53
324
|
|
|
54
325
|
#### :gear: StorageConfigRewriteSchema
|
|
@@ -57,6 +328,10 @@ Configuration options for [Juno] CLI.
|
|
|
57
328
|
| ---------------------------- | -------------------------------------------------------------------- |
|
|
58
329
|
| `StorageConfigRewriteSchema` | `ZodObject<{ source: ZodString; destination: ZodString; }, $strict>` |
|
|
59
330
|
|
|
331
|
+
References:
|
|
332
|
+
|
|
333
|
+
- StorageConfigRewrite
|
|
334
|
+
|
|
60
335
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L49)
|
|
61
336
|
|
|
62
337
|
#### :gear: StorageConfigRedirectSchema
|
|
@@ -65,6 +340,10 @@ Configuration options for [Juno] CLI.
|
|
|
65
340
|
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
66
341
|
| `StorageConfigRedirectSchema` | `ZodObject<{ source: ZodString; location: ZodString; code: ZodUnion<readonly [ZodLiteral<301>, ZodLiteral<302>]>; }, $strict>` |
|
|
67
342
|
|
|
343
|
+
References:
|
|
344
|
+
|
|
345
|
+
- StorageConfigRedirect
|
|
346
|
+
|
|
68
347
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L79)
|
|
69
348
|
|
|
70
349
|
#### :gear: StorageConfigSchema
|
|
@@ -73,39 +352,11 @@ Configuration options for [Juno] CLI.
|
|
|
73
352
|
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
74
353
|
| `StorageConfigSchema` | `ZodObject<{ headers: ZodOptional<ZodArray<ZodObject<{ source: ZodString; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>>; }, $strict>>>; ... 5 more ...; version: ZodOptional<...>; }, $strip>` |
|
|
75
354
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
#### :gear: ModuleLogVisibilitySchema
|
|
79
|
-
|
|
80
|
-
| Constant | Type |
|
|
81
|
-
| --------------------------- | ------------------------------------------------------------ |
|
|
82
|
-
| `ModuleLogVisibilitySchema` | `ZodEnum<{ controllers: "controllers"; public: "public"; }>` |
|
|
83
|
-
|
|
84
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/module/module.settings.ts#L6)
|
|
85
|
-
|
|
86
|
-
#### :gear: ModuleSettingsSchema
|
|
87
|
-
|
|
88
|
-
| Constant | Type |
|
|
89
|
-
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
90
|
-
| `ModuleSettingsSchema` | `ZodObject<{ freezingThreshold: ZodOptional<ZodBigInt>; reservedCyclesLimit: ZodOptional<ZodBigInt>; logVisibility: ZodOptional<ZodEnum<{ controllers: "controllers"; public: "public"; }>>; heapMemoryLimit: ZodOptional<...>; memoryAllocation: ZodOptional<...>; computeAllocation: ZodOptional<...>; }, $strict>` |
|
|
91
|
-
|
|
92
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/module/module.settings.ts#L21)
|
|
93
|
-
|
|
94
|
-
#### :gear: JunoConfigModeSchema
|
|
95
|
-
|
|
96
|
-
| Constant | Type |
|
|
97
|
-
| ---------------------- | ---------------------------------------------------------- |
|
|
98
|
-
| `JunoConfigModeSchema` | `ZodUnion<readonly [ZodLiteral<"production">, ZodString]>` |
|
|
355
|
+
References:
|
|
99
356
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
#### :gear: JunoConfigEnvSchema
|
|
357
|
+
- StorageConfig
|
|
103
358
|
|
|
104
|
-
|
|
105
|
-
| --------------------- | ---------------------------------------------------------------------------------------- |
|
|
106
|
-
| `JunoConfigEnvSchema` | `ZodObject<{ mode: ZodUnion<readonly [ZodLiteral<"production">, ZodString]>; }, $strip>` |
|
|
107
|
-
|
|
108
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L17)
|
|
359
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L114)
|
|
109
360
|
|
|
110
361
|
#### :gear: EncodingTypeSchema
|
|
111
362
|
|
|
@@ -123,18 +374,150 @@ see EncodingType
|
|
|
123
374
|
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
124
375
|
| `CliConfigSchema` | `ZodObject<{ source: ZodOptional<ZodString>; ignore: ZodOptional<ZodArray<ZodString>>; gzip: ZodOptional<ZodUnion<readonly [ZodString, ZodLiteral<...>]>>; encoding: ZodOptional<...>; predeploy: ZodOptional<...>; postdeploy: ZodOptional<...>; }, $strict>` |
|
|
125
376
|
|
|
377
|
+
References:
|
|
378
|
+
|
|
379
|
+
- CliConfig
|
|
380
|
+
|
|
126
381
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/cli.config.ts#L7)
|
|
127
382
|
|
|
383
|
+
#### :gear: SatelliteIdSchema
|
|
384
|
+
|
|
385
|
+
| Constant | Type |
|
|
386
|
+
| ------------------- | --------------------------------------- |
|
|
387
|
+
| `SatelliteIdSchema` | `ZodObject<{ id: ZodString; }, $strip>` |
|
|
388
|
+
|
|
389
|
+
References:
|
|
390
|
+
|
|
391
|
+
- SatelliteId
|
|
392
|
+
|
|
393
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L17)
|
|
394
|
+
|
|
395
|
+
#### :gear: SatelliteIdsSchema
|
|
396
|
+
|
|
397
|
+
| Constant | Type |
|
|
398
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
399
|
+
| `SatelliteIdsSchema` | `ZodObject<{ ids: ZodRecord<ZodUnion<readonly [ZodLiteral<"production">, ZodString]>, ZodString>; }, $strip>` |
|
|
400
|
+
|
|
401
|
+
References:
|
|
402
|
+
|
|
403
|
+
- SatelliteIds
|
|
404
|
+
|
|
405
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L36)
|
|
406
|
+
|
|
407
|
+
#### :gear: SatelliteConfigOptionsSchema
|
|
408
|
+
|
|
409
|
+
| Constant | Type |
|
|
410
|
+
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
411
|
+
| `SatelliteConfigOptionsSchema` | `ZodUnion<readonly [ZodObject<{ storage: ZodOptional<ZodObject<{ headers: ZodOptional<ZodArray<ZodObject<{ source: ZodString; headers: ZodArray<ZodTuple<[ZodString, ZodString], null>>; }, $strict>>>; ... 5 more ...; version: ZodOptional<...>; }, $strip>>; ... 5 more ...; id: ZodString; }, $strict>, ZodObject<...>]>` |
|
|
412
|
+
|
|
413
|
+
References:
|
|
414
|
+
|
|
415
|
+
- JunoConsoleConfig
|
|
416
|
+
|
|
417
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L75)
|
|
418
|
+
|
|
128
419
|
### :tropical_drink: Interfaces
|
|
129
420
|
|
|
421
|
+
- [SatelliteAssertions](#gear-satelliteassertions)
|
|
422
|
+
- [AuthenticationConfigInternetIdentity](#gear-authenticationconfiginternetidentity)
|
|
423
|
+
- [AuthenticationConfigRules](#gear-authenticationconfigrules)
|
|
424
|
+
- [AuthenticationConfig](#gear-authenticationconfig)
|
|
425
|
+
- [Rule](#gear-rule)
|
|
426
|
+
- [Collections](#gear-collections)
|
|
130
427
|
- [MaxMemorySizeConfig](#gear-maxmemorysizeconfig)
|
|
428
|
+
- [DatastoreConfig](#gear-datastoreconfig)
|
|
429
|
+
- [EmulatorPorts](#gear-emulatorports)
|
|
430
|
+
- [EmulatorSkylab](#gear-emulatorskylab)
|
|
431
|
+
- [EmulatorConsole](#gear-emulatorconsole)
|
|
432
|
+
- [EmulatorSatellite](#gear-emulatorsatellite)
|
|
433
|
+
- [EmulatorRunner](#gear-emulatorrunner)
|
|
434
|
+
- [ModuleSettings](#gear-modulesettings)
|
|
435
|
+
- [JunoConfigEnv](#gear-junoconfigenv)
|
|
436
|
+
- [OrbiterId](#gear-orbiterid)
|
|
437
|
+
- [OrbiterIds](#gear-orbiterids)
|
|
131
438
|
- [StorageConfigHeader](#gear-storageconfigheader)
|
|
132
439
|
- [StorageConfigRewrite](#gear-storageconfigrewrite)
|
|
133
440
|
- [StorageConfigRedirect](#gear-storageconfigredirect)
|
|
134
441
|
- [StorageConfig](#gear-storageconfig)
|
|
135
|
-
- [ModuleSettings](#gear-modulesettings)
|
|
136
|
-
- [JunoConfigEnv](#gear-junoconfigenv)
|
|
137
442
|
- [CliConfig](#gear-cliconfig)
|
|
443
|
+
- [SatelliteId](#gear-satelliteid)
|
|
444
|
+
- [SatelliteIds](#gear-satelliteids)
|
|
445
|
+
- [SatelliteConfigOptions](#gear-satelliteconfigoptions)
|
|
446
|
+
|
|
447
|
+
#### :gear: SatelliteAssertions
|
|
448
|
+
|
|
449
|
+
Configuration for satellite assertions.
|
|
450
|
+
|
|
451
|
+
| Property | Type | Description |
|
|
452
|
+
| ------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
453
|
+
| `heapMemory` | `bigint or boolean or undefined` | Configuration for the heap memory size check, which can be: - `true` to enable the check with a default threshold of 900MB, - `false` to disable the heap memory size check, - A `bigint` to specify a custom threshold in MB (megabytes) for the heap memory size check. If not specified, then `true` is used as the default value. type: {bigint or boolean} |
|
|
454
|
+
|
|
455
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/assertions.config.ts#L14)
|
|
456
|
+
|
|
457
|
+
#### :gear: AuthenticationConfigInternetIdentity
|
|
458
|
+
|
|
459
|
+
Configure the behavior of Internet Identity.
|
|
460
|
+
|
|
461
|
+
| Property | Type | Description |
|
|
462
|
+
| ---------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
463
|
+
| `derivationOrigin` | `string or undefined` | This setting ensures that users are recognized on your app, regardless of whether they use the default URL or any other custom domain. For example, if set to hello.com, a user signing on at https://hello.com will receive the same identifier (principal) as when signing on at https://www.hello.com. type: {string}optional |
|
|
464
|
+
| `externalAlternativeOrigins` | `string[] or undefined` | An optional list of external alternative origins allowed for authentication, which can be useful if you want to reuse the same derivation origin across multiple Satellites. type: {string[]}optional |
|
|
465
|
+
|
|
466
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/authentication.config.ts#L16)
|
|
467
|
+
|
|
468
|
+
#### :gear: AuthenticationConfigRules
|
|
469
|
+
|
|
470
|
+
Configure the rules of the authentication.
|
|
471
|
+
|
|
472
|
+
| Property | Type | Description |
|
|
473
|
+
| ---------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
474
|
+
| `allowedCallers` | `string[]` | This option defines who's allowed to use your app. If you enable this, only the identities you list (in user key, format, like `bj4r4-5cdop-...`) will be allowed to sign in or use any features like Datastore or Storage. type: {PrincipalText[]}optional |
|
|
475
|
+
|
|
476
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/authentication.config.ts#L44)
|
|
477
|
+
|
|
478
|
+
#### :gear: AuthenticationConfig
|
|
479
|
+
|
|
480
|
+
Configures the Authentication options of a Satellite.
|
|
481
|
+
|
|
482
|
+
| Property | Type | Description |
|
|
483
|
+
| ------------------ | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
484
|
+
| `internetIdentity` | `AuthenticationConfigInternetIdentity or undefined` | Optional configuration of Internet Identity authentication method. type: {AuthenticationConfigInternetIdentity}optional |
|
|
485
|
+
| `rules` | `AuthenticationConfigRules or undefined` | Optional configuration for the rules of the authentication. type: {AuthenticationConfigRules}optional |
|
|
486
|
+
| `version` | `bigint or undefined` | The current version of the config. Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite. You can provide it if you want to manage versioning manually within your config file. type: {bigint}optional |
|
|
487
|
+
|
|
488
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/authentication.config.ts#L69)
|
|
489
|
+
|
|
490
|
+
#### :gear: Rule
|
|
491
|
+
|
|
492
|
+
Represents a rule configuration for a collection.
|
|
493
|
+
|
|
494
|
+
| Property | Type | Description |
|
|
495
|
+
| -------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
496
|
+
| `collection` | `string` | The name of the collection the rule applies to. type: {string} |
|
|
497
|
+
| `read` | `PermissionText` | The permission level for read access. type: {PermissionText} |
|
|
498
|
+
| `write` | `PermissionText` | The permission level for write access. type: {PermissionText} |
|
|
499
|
+
| `memory` | `MemoryText` | The type of memory allocated for the collection. type: {MemoryText} |
|
|
500
|
+
| `createdAt` | `bigint or undefined` | The timestamp when the rule was created. type: {bigint}optional |
|
|
501
|
+
| `updatedAt` | `bigint or undefined` | The timestamp when the rule was last updated. type: {bigint}optional |
|
|
502
|
+
| `version` | `bigint or undefined` | The version of the rule. type: {bigint}optionaldescription: Must be provided when updating the rule to ensure the correct version is being updated. |
|
|
503
|
+
| `maxSize` | `bigint or undefined` | The maximum size of the collection in bytes. type: {number}optional |
|
|
504
|
+
| `maxChangesPerUser` | `number or undefined` | The maximum number of changes (create, update or delete) per user for the collection. type: {number}optional |
|
|
505
|
+
| `maxCapacity` | `number or undefined` | The maximum capacity of the collection. type: {number}optional |
|
|
506
|
+
| `mutablePermissions` | `boolean or undefined` | Indicates whether the permissions are mutable. default: truetype: {boolean} |
|
|
507
|
+
| `maxTokens` | `bigint or undefined` | The maximum number of writes and deletes per minute. |
|
|
508
|
+
|
|
509
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L58)
|
|
510
|
+
|
|
511
|
+
#### :gear: Collections
|
|
512
|
+
|
|
513
|
+
Represents the configuration for all the collections of a Satellite.
|
|
514
|
+
|
|
515
|
+
| Property | Type | Description |
|
|
516
|
+
| ----------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------ |
|
|
517
|
+
| `datastore` | `DatastoreCollection[] or undefined` | An optional array that defines the collections of the Datastore. type: {DatastoreCollection[]}optional |
|
|
518
|
+
| `storage` | `StorageCollection[] or undefined` | An optional array that defines the collections of the Storage. type: {StorageCollection[]}optional |
|
|
519
|
+
|
|
520
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/collections.ts#L46)
|
|
138
521
|
|
|
139
522
|
#### :gear: MaxMemorySizeConfig
|
|
140
523
|
|
|
@@ -147,6 +530,122 @@ The maximum size corresponds to the overall heap or stable memory of the smart c
|
|
|
147
530
|
| `heap` | `bigint or undefined` | Maximum allowed heap memory size in bytes. This field is optional. If not specified, no limit is enforced on the heap memory size. type: {bigint} |
|
|
148
531
|
| `stable` | `bigint or undefined` | Maximum allowed stable memory size in bytes. This field is optional. If not specified, no limit is enforced on the stable memory size. type: {bigint} |
|
|
149
532
|
|
|
533
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/feature.config.ts#L18)
|
|
534
|
+
|
|
535
|
+
#### :gear: DatastoreConfig
|
|
536
|
+
|
|
537
|
+
Configures the behavior of the Datastore.
|
|
538
|
+
|
|
539
|
+
| Property | Type | Description |
|
|
540
|
+
| --------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
541
|
+
| `maxMemorySize` | `MaxMemorySizeConfig or undefined` | Configuration for maximum memory size limits for the Datastore. This is used to specify optional limits on heap and stable memory for the smart contract. When the limit is reached, the Datastore and smart contract continue to operate normally but reject the creation or updates of documents. If not specified, no memory limits are enforced. type: {MaxMemorySizeConfig}optional |
|
|
542
|
+
| `version` | `bigint or undefined` | The current version of the config. Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite. You can provide it if you want to manage versioning manually within your config file. type: {bigint}optional |
|
|
543
|
+
|
|
544
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/datastore.config.ts#L16)
|
|
545
|
+
|
|
546
|
+
#### :gear: EmulatorPorts
|
|
547
|
+
|
|
548
|
+
Represents the ports exposed by an emulator container.
|
|
549
|
+
|
|
550
|
+
| Property | Type | Description |
|
|
551
|
+
| -------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
552
|
+
| `server` | `number or undefined` | The port of the server used to simulate execution. This is the port your app connects to. Also known as the "local Internet Computer replica" or the "Pocket-IC port". default: 5987 |
|
|
553
|
+
| `admin` | `number or undefined` | The port of the admin server used for tasks like transferring ICP from the ledger. default: 5999 |
|
|
554
|
+
|
|
555
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L26)
|
|
556
|
+
|
|
557
|
+
#### :gear: EmulatorSkylab
|
|
558
|
+
|
|
559
|
+
Configuration for the Skylab emulator.
|
|
560
|
+
|
|
561
|
+
| Property | Type | Description |
|
|
562
|
+
| -------- | ------------------------------------------------------- | -------------------------------------- |
|
|
563
|
+
| `ports` | `(EmulatorPorts and { console: number; }) or undefined` | Ports exposed by the Skylab container. |
|
|
564
|
+
|
|
565
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L51)
|
|
566
|
+
|
|
567
|
+
#### :gear: EmulatorConsole
|
|
568
|
+
|
|
569
|
+
Configuration for the Console emulator.
|
|
570
|
+
|
|
571
|
+
| Property | Type | Description |
|
|
572
|
+
| -------- | ---------------------------- | --------------------------------------- |
|
|
573
|
+
| `ports` | `EmulatorPorts or undefined` | Ports exposed by the Console container. |
|
|
574
|
+
|
|
575
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L74)
|
|
576
|
+
|
|
577
|
+
#### :gear: EmulatorSatellite
|
|
578
|
+
|
|
579
|
+
Configuration for the Satellite emulator.
|
|
580
|
+
|
|
581
|
+
| Property | Type | Description |
|
|
582
|
+
| -------- | ---------------------------- | ----------------------------------------- |
|
|
583
|
+
| `ports` | `EmulatorPorts or undefined` | Ports exposed by the Satellite container. |
|
|
584
|
+
|
|
585
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L91)
|
|
586
|
+
|
|
587
|
+
#### :gear: EmulatorRunner
|
|
588
|
+
|
|
589
|
+
Shared options for all runner variants.
|
|
590
|
+
|
|
591
|
+
| Property | Type | Description |
|
|
592
|
+
| ---------- | --------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
593
|
+
| `type` | `"docker" or "podman"` | The containerization tool to run the emulator. |
|
|
594
|
+
| `image` | `string or undefined` | Image reference. default: depends on emulator type, e.g. "junobuild/skylab:latest" |
|
|
595
|
+
| `name` | `string or undefined` | Optional container name to use for the emulator. Useful for reusing or managing a specific container. |
|
|
596
|
+
| `volume` | `string or undefined` | Persistent volume to store internal state. default: "juno" |
|
|
597
|
+
| `target` | `string or undefined` | Shared folder for deploying and hot-reloading serverless functions. |
|
|
598
|
+
| `platform` | `"linux/amd64" or "linux/arm64" or undefined` | The platform to use when running the emulator container. |
|
|
599
|
+
|
|
600
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L113)
|
|
601
|
+
|
|
602
|
+
#### :gear: ModuleSettings
|
|
603
|
+
|
|
604
|
+
Settings for a module - Satellite, Mission Control or Orbiter.
|
|
605
|
+
|
|
606
|
+
These settings control various aspects of the module's behavior and resource usage.
|
|
607
|
+
|
|
608
|
+
| Property | Type | Description |
|
|
609
|
+
| --------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
610
|
+
| `freezingThreshold` | `bigint or undefined` | The cycle threshold below which the module will automatically stop to avoid running out of cycles. For example, if set to `BigInt(1000000)`, the module will stop when it has fewer than 1,000,000 cycles remaining. type: {bigint} |
|
|
611
|
+
| `reservedCyclesLimit` | `bigint or undefined` | The number of cycles reserved for the module's operations to ensure it has enough cycles to function. For example, setting it to `BigInt(5000000)` reserves 5,000,000 cycles for the module. type: {bigint} |
|
|
612
|
+
| `logVisibility` | `ModuleLogVisibility or undefined` | Controls who can see the module's logs. type: {ModuleLogVisibility} |
|
|
613
|
+
| `heapMemoryLimit` | `bigint or undefined` | The maximum amount of WebAssembly (Wasm) memory the module can use on the heap. For example, setting it to `BigInt(1024 * 1024 * 64)` allows the module to use up to 64 MB of Wasm memory. type: {bigint} |
|
|
614
|
+
| `memoryAllocation` | `bigint or undefined` | The amount of memory explicitly allocated to the module. For example, setting it to `BigInt(1024 * 1024 * 128)` allocates 128 MB of memory to the module. type: {bigint} |
|
|
615
|
+
| `computeAllocation` | `bigint or undefined` | The proportion of compute capacity allocated to the module. This is a fraction of the total compute capacity of the subnet. For example, setting it to `BigInt(10)` allocates 10% of the compute capacity to the module. type: {bigint} |
|
|
616
|
+
|
|
617
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/module.settings.ts#L37)
|
|
618
|
+
|
|
619
|
+
#### :gear: JunoConfigEnv
|
|
620
|
+
|
|
621
|
+
Represents the environment configuration for Juno.
|
|
622
|
+
|
|
623
|
+
| Property | Type | Description |
|
|
624
|
+
| -------- | -------- | ---------------------------------------------------------- |
|
|
625
|
+
| `mode` | `string` | The mode of the Juno configuration. type: {JunoConfigMode} |
|
|
626
|
+
|
|
627
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L25)
|
|
628
|
+
|
|
629
|
+
#### :gear: OrbiterId
|
|
630
|
+
|
|
631
|
+
Represents the configuration for an orbiter.
|
|
632
|
+
|
|
633
|
+
| Property | Type | Description |
|
|
634
|
+
| -------- | -------- | -------------------------------------------------------------- |
|
|
635
|
+
| `id` | `string` | The identifier of the orbiter used in the dApp. type: {string} |
|
|
636
|
+
|
|
637
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/orbiter.config.ts#L18)
|
|
638
|
+
|
|
639
|
+
#### :gear: OrbiterIds
|
|
640
|
+
|
|
641
|
+
Represents a mapping of orbiter identitifiers to different configurations based on the mode of the application.
|
|
642
|
+
|
|
643
|
+
| Property | Type | Description |
|
|
644
|
+
| -------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
645
|
+
| `ids` | `Record<string, string>` | A mapping of orbiter identifiers (IDs) to different configurations based on the mode of the application. This allows the application to use different orbiter IDs, such as production, development, etc. Example: { "production": "xo2hm-lqaaa-aaaal-ab3oa-cai", "development": "gl6nx-5maaa-aaaaa-qaaqq-cai" } type: {Record<JunoConfigMode, string>} |
|
|
646
|
+
|
|
647
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/orbiter.config.ts#L37)
|
|
648
|
+
|
|
150
649
|
#### :gear: StorageConfigHeader
|
|
151
650
|
|
|
152
651
|
Headers allow the client and the Storage to pass additional information along with a request or a response.
|
|
@@ -157,6 +656,8 @@ Some sets of headers can affect how the browser handles the page and its content
|
|
|
157
656
|
| `source` | `string` | The glob pattern used to match files within the Storage that these headers will apply to. type: {StorageConfigSourceGlob} |
|
|
158
657
|
| `headers` | `[string, string][]` | An array of key-value pairs representing the headers to apply. Each pair includes the header name and its value. Example: `[["Cache-Control", "max-age=3600"], ["X-Custom-Header", "value"]]` type: {Array<[string, string]>} |
|
|
159
658
|
|
|
659
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L30)
|
|
660
|
+
|
|
160
661
|
#### :gear: StorageConfigRewrite
|
|
161
662
|
|
|
162
663
|
You can utilize optional rewrites to display the same content for multiple URLs.
|
|
@@ -167,6 +668,8 @@ Rewrites are especially useful when combined with pattern matching, allowing acc
|
|
|
167
668
|
| `source` | `string` | The glob pattern or specific path to match for incoming requests. Matches are rewritten to the specified destination. type: {StorageConfigSourceGlob} |
|
|
168
669
|
| `destination` | `string` | The destination path or file to which matching requests should be rewritten. type: {string} |
|
|
169
670
|
|
|
671
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L61)
|
|
672
|
+
|
|
170
673
|
#### :gear: StorageConfigRedirect
|
|
171
674
|
|
|
172
675
|
Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.
|
|
@@ -177,6 +680,8 @@ Use a URL redirect to prevent broken links if you've moved a page or to shorten
|
|
|
177
680
|
| `location` | `string` | The URL or path to which the request should be redirected. type: {string} |
|
|
178
681
|
| `code` | `301 or 302` | The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect). type: {301 or 302} |
|
|
179
682
|
|
|
683
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L91)
|
|
684
|
+
|
|
180
685
|
#### :gear: StorageConfig
|
|
181
686
|
|
|
182
687
|
Configures the hosting behavior of the Storage.
|
|
@@ -191,28 +696,7 @@ Configures the hosting behavior of the Storage.
|
|
|
191
696
|
| `maxMemorySize` | `MaxMemorySizeConfig or undefined` | Configuration for maximum memory size limits for the Storage. This is used to specify optional limits on heap and stable memory for the smart contract. When the limit is reached, the Storage and smart contract continue to operate normally but reject the upload of new assets. If not specified, no memory limits are enforced. type: {MaxMemorySizeConfig}optional |
|
|
192
697
|
| `version` | `bigint or undefined` | The current version of the config. Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite. You can provide it if you want to manage versioning manually within your config file. type: {bigint}optional |
|
|
193
698
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Settings for a module - Satellite, Mission Control or Orbiter.
|
|
197
|
-
|
|
198
|
-
These settings control various aspects of the module's behavior and resource usage.
|
|
199
|
-
|
|
200
|
-
| Property | Type | Description |
|
|
201
|
-
| --------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
202
|
-
| `freezingThreshold` | `bigint or undefined` | The cycle threshold below which the module will automatically stop to avoid running out of cycles. For example, if set to `BigInt(1000000)`, the module will stop when it has fewer than 1,000,000 cycles remaining. type: {bigint} |
|
|
203
|
-
| `reservedCyclesLimit` | `bigint or undefined` | The number of cycles reserved for the module's operations to ensure it has enough cycles to function. For example, setting it to `BigInt(5000000)` reserves 5,000,000 cycles for the module. type: {bigint} |
|
|
204
|
-
| `logVisibility` | `ModuleLogVisibility or undefined` | Controls who can see the module's logs. type: {ModuleLogVisibility} |
|
|
205
|
-
| `heapMemoryLimit` | `bigint or undefined` | The maximum amount of WebAssembly (Wasm) memory the module can use on the heap. For example, setting it to `BigInt(1024 * 1024 * 64)` allows the module to use up to 64 MB of Wasm memory. type: {bigint} |
|
|
206
|
-
| `memoryAllocation` | `bigint or undefined` | The amount of memory explicitly allocated to the module. For example, setting it to `BigInt(1024 * 1024 * 128)` allocates 128 MB of memory to the module. type: {bigint} |
|
|
207
|
-
| `computeAllocation` | `bigint or undefined` | The proportion of compute capacity allocated to the module. This is a fraction of the total compute capacity of the subnet. For example, setting it to `BigInt(10)` allocates 10% of the compute capacity to the module. type: {bigint} |
|
|
208
|
-
|
|
209
|
-
#### :gear: JunoConfigEnv
|
|
210
|
-
|
|
211
|
-
Represents the environment configuration for Juno.
|
|
212
|
-
|
|
213
|
-
| Property | Type | Description |
|
|
214
|
-
| -------- | -------- | ---------------------------------------------------------- |
|
|
215
|
-
| `mode` | `string` | The mode of the Juno configuration. type: {JunoConfigMode} |
|
|
699
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L128)
|
|
216
700
|
|
|
217
701
|
#### :gear: CliConfig
|
|
218
702
|
|
|
@@ -225,20 +709,112 @@ Represents the environment configuration for Juno.
|
|
|
225
709
|
| `predeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run before the deployment process begins. This can be useful for tasks such as compiling assets, running tests, or building production-ready files. Example: `json { "predeploy": ["npm run build", "npm run lint"] } ` type: {string[]}optional |
|
|
226
710
|
| `postdeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run after the deployment process completes. This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members. Example: `json { "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] } ` type: {string[]}optional |
|
|
227
711
|
|
|
712
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/cli.config.ts#L18)
|
|
713
|
+
|
|
714
|
+
#### :gear: SatelliteId
|
|
715
|
+
|
|
716
|
+
Represents the unique identifier for a satellite.
|
|
717
|
+
|
|
718
|
+
| Property | Type | Description |
|
|
719
|
+
| -------- | -------- | -------------------------------------------------------------------------------- |
|
|
720
|
+
| `id` | `string` | The unique identifier (ID) of the satellite for this application. type: {string} |
|
|
721
|
+
|
|
722
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L25)
|
|
723
|
+
|
|
724
|
+
#### :gear: SatelliteIds
|
|
725
|
+
|
|
726
|
+
Represents a mapping of satellite identifiers to different configurations based on the mode of the application.
|
|
727
|
+
|
|
728
|
+
| Property | Type | Description |
|
|
729
|
+
| -------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
730
|
+
| `ids` | `Record<string, string>` | A mapping of satellite identifiers (IDs) to different configurations based on the mode of the application. This allows the application to use different satellite IDs, such as production, staging, etc. Example: { "production": "xo2hm-lqaaa-aaaal-ab3oa-cai", "staging": "gl6nx-5maaa-aaaaa-qaaqq-cai" } type: {Record<JunoConfigMode, string>} |
|
|
731
|
+
|
|
732
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L44)
|
|
733
|
+
|
|
734
|
+
#### :gear: SatelliteConfigOptions
|
|
735
|
+
|
|
736
|
+
SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning
|
|
737
|
+
the operational behavior of various aspects of a Satellite, such as storage, datastore,
|
|
738
|
+
authentication, and deployment assertions.
|
|
739
|
+
|
|
740
|
+
These options affect specific modules of the Satellite and may require manual application of
|
|
741
|
+
changes, typically through CLI commands (e.g., `juno config`).
|
|
742
|
+
|
|
743
|
+
| Property | Type | Description |
|
|
744
|
+
| ---------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
745
|
+
| `storage` | `StorageConfig or undefined` | Optional configuration parameters for the satellite, affecting the operational behavior of its Storage. Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands. type: {StorageConfig}optional |
|
|
746
|
+
| `datastore` | `DatastoreConfig or undefined` | Optional configuration parameters for the satellite, affecting the operational behavior of its Datastore. Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands. type: {DatastoreConfig}optional |
|
|
747
|
+
| `authentication` | `AuthenticationConfig or undefined` | Optional configuration parameters for the satellite, affecting the operational behavior of its Authentication. Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands. type: {AuthenticationConfig}optional |
|
|
748
|
+
| `assertions` | `SatelliteAssertions or undefined` | Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions. type: {SatelliteAssertions}optional |
|
|
749
|
+
| `settings` | `ModuleSettings or undefined` | Optional configuration parameters for the Satellite. These settings control various aspects of the module's behavior and resource usage. type: {ModuleSettings}optional |
|
|
750
|
+
| `collections` | `Collections or undefined` | Optional configuration for the Datastore and Storage collections. type: {Collections}optional |
|
|
751
|
+
|
|
752
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L106)
|
|
753
|
+
|
|
228
754
|
### :cocktail: Types
|
|
229
755
|
|
|
230
|
-
- [
|
|
756
|
+
- [PermissionText](#gear-permissiontext)
|
|
757
|
+
- [MemoryText](#gear-memorytext)
|
|
758
|
+
- [RulesType](#gear-rulestype)
|
|
759
|
+
- [DatastoreCollection](#gear-datastorecollection)
|
|
760
|
+
- [StorageCollection](#gear-storagecollection)
|
|
761
|
+
- [EmulatorConfig](#gear-emulatorconfig)
|
|
231
762
|
- [ModuleLogVisibility](#gear-modulelogvisibility)
|
|
232
763
|
- [JunoConfigMode](#gear-junoconfigmode)
|
|
764
|
+
- [OrbiterConfig](#gear-orbiterconfig)
|
|
765
|
+
- [StorageConfigSourceGlob](#gear-storageconfigsourceglob)
|
|
233
766
|
- [EncodingType](#gear-encodingtype)
|
|
767
|
+
- [SatelliteConfig](#gear-satelliteconfig)
|
|
234
768
|
|
|
235
|
-
#### :gear:
|
|
769
|
+
#### :gear: PermissionText
|
|
236
770
|
|
|
237
|
-
| Type
|
|
238
|
-
|
|
|
239
|
-
| `
|
|
771
|
+
| Type | Type |
|
|
772
|
+
| ---------------- | ----------------------------------------------------- |
|
|
773
|
+
| `PermissionText` | `'public' or 'private' or 'managed' or 'controllers'` |
|
|
240
774
|
|
|
241
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/
|
|
775
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L12)
|
|
776
|
+
|
|
777
|
+
#### :gear: MemoryText
|
|
778
|
+
|
|
779
|
+
| Type | Type |
|
|
780
|
+
| ------------ | -------------------- |
|
|
781
|
+
| `MemoryText` | `'heap' or 'stable'` |
|
|
782
|
+
|
|
783
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L23)
|
|
784
|
+
|
|
785
|
+
#### :gear: RulesType
|
|
786
|
+
|
|
787
|
+
| Type | Type |
|
|
788
|
+
| ----------- | ------------------- |
|
|
789
|
+
| `RulesType` | `'db' or 'storage'` |
|
|
790
|
+
|
|
791
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/rules.ts#L34)
|
|
792
|
+
|
|
793
|
+
#### :gear: DatastoreCollection
|
|
794
|
+
|
|
795
|
+
| Type | Type |
|
|
796
|
+
| --------------------- | ----------------------------------------------------- |
|
|
797
|
+
| `DatastoreCollection` | `Omit<Rule, 'createdAt' or 'updatedAt' or 'maxSize'>` |
|
|
798
|
+
|
|
799
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/collections.ts#L17)
|
|
800
|
+
|
|
801
|
+
#### :gear: StorageCollection
|
|
802
|
+
|
|
803
|
+
| Type | Type |
|
|
804
|
+
| ------------------- | --------------------------------------------------------- |
|
|
805
|
+
| `StorageCollection` | `Omit<Rule, 'createdAt' or 'updatedAt' or 'maxCapacity'>` |
|
|
806
|
+
|
|
807
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/collections.ts#L32)
|
|
808
|
+
|
|
809
|
+
#### :gear: EmulatorConfig
|
|
810
|
+
|
|
811
|
+
The configuration for running the Juno emulator.
|
|
812
|
+
|
|
813
|
+
| Type | Type |
|
|
814
|
+
| ---------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
815
|
+
| `EmulatorConfig` | ` | {runner?: EmulatorRunner; skylab: EmulatorSkylab} or {runner?: EmulatorRunner; console: EmulatorConsole} or {runner?: EmulatorRunner; satellite: EmulatorSatellite}` |
|
|
816
|
+
|
|
817
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/emulator.config.ts#L169)
|
|
242
818
|
|
|
243
819
|
#### :gear: ModuleLogVisibility
|
|
244
820
|
|
|
@@ -246,7 +822,7 @@ Represents the environment configuration for Juno.
|
|
|
246
822
|
| --------------------- | --------------------------- |
|
|
247
823
|
| `ModuleLogVisibility` | `'controllers' or 'public'` |
|
|
248
824
|
|
|
249
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/
|
|
825
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/module.settings.ts#L16)
|
|
250
826
|
|
|
251
827
|
#### :gear: JunoConfigMode
|
|
252
828
|
|
|
@@ -256,6 +832,22 @@ Represents the environment configuration for Juno.
|
|
|
256
832
|
|
|
257
833
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L12)
|
|
258
834
|
|
|
835
|
+
#### :gear: OrbiterConfig
|
|
836
|
+
|
|
837
|
+
| Type | Type |
|
|
838
|
+
| --------------- | ------------------------------- |
|
|
839
|
+
| `OrbiterConfig` | `Either<OrbiterId, OrbiterIds>` |
|
|
840
|
+
|
|
841
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/orbiter.config.ts#L64)
|
|
842
|
+
|
|
843
|
+
#### :gear: StorageConfigSourceGlob
|
|
844
|
+
|
|
845
|
+
| Type | Type |
|
|
846
|
+
| ------------------------- | ---- |
|
|
847
|
+
| `StorageConfigSourceGlob` | |
|
|
848
|
+
|
|
849
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/shared/storage.config.ts#L13)
|
|
850
|
+
|
|
259
851
|
#### :gear: EncodingType
|
|
260
852
|
|
|
261
853
|
| Type | Type |
|
|
@@ -264,6 +856,14 @@ Represents the environment configuration for Juno.
|
|
|
264
856
|
|
|
265
857
|
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/encoding.ts#L12)
|
|
266
858
|
|
|
859
|
+
#### :gear: SatelliteConfig
|
|
860
|
+
|
|
861
|
+
| Type | Type |
|
|
862
|
+
| ----------------- | ---------------------------------------------------------------------------- |
|
|
863
|
+
| `SatelliteConfig` | `Either<SatelliteId, SatelliteIds> and CliConfig and SatelliteConfigOptions` |
|
|
864
|
+
|
|
865
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/configs/satellite.config.ts#L162)
|
|
866
|
+
|
|
267
867
|
<!-- TSDOC_END -->
|
|
268
868
|
|
|
269
869
|
## License
|