@junobuild/config 0.0.15 → 0.0.17

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 CHANGED
@@ -68,6 +68,7 @@ Configuration options for [Juno] CLI.
68
68
  - [DatastoreConfig](#gear-datastoreconfig)
69
69
  - [SatelliteId](#gear-satelliteid)
70
70
  - [SatelliteIds](#gear-satelliteids)
71
+ - [SatelliteConfigOptions](#gear-satelliteconfigoptions)
71
72
  - [JunoConfig](#gear-junoconfig)
72
73
  - [SatelliteDevCollections](#gear-satellitedevcollections)
73
74
  - [SatelliteDevController](#gear-satellitedevcontroller)
@@ -89,14 +90,14 @@ Settings for a module - Satellite, Mission Control or Orbiter.
89
90
 
90
91
  These settings control various aspects of the module's behavior and resource usage.
91
92
 
92
- | Property | Type | Description |
93
- | --------------------- | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
94
- | `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} |
95
- | `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} |
96
- | `logVisibility` | `ModuleLogVisibility or undefined` | Controls who can see the module's logs. type: {ModuleLogVisibility} |
97
- | `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} |
98
- | `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} |
99
- | `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} |
93
+ | Property | Type | Description |
94
+ | --------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
95
+ | `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} |
96
+ | `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} |
97
+ | `logVisibility` | `ModuleLogVisibility or undefined` | Controls who can see the module's logs. type: {ModuleLogVisibility} |
98
+ | `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} |
99
+ | `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} |
100
+ | `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} |
100
101
 
101
102
  #### :gear: MaxMemorySizeConfig
102
103
 
@@ -104,64 +105,64 @@ Configuration for granting access to features only if the maximum memory size li
104
105
 
105
106
  The maximum size corresponds to the overall heap or stable memory of the smart contract.
106
107
 
107
- | Property | Type | Description |
108
- | -------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
109
- | `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} |
110
- | `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} |
108
+ | Property | Type | Description |
109
+ | -------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
110
+ | `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} |
111
+ | `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} |
111
112
 
112
113
  #### :gear: StorageConfigHeader
113
114
 
114
115
  Headers allow the client and the Storage to pass additional information along with a request or a response.
115
116
  Some sets of headers can affect how the browser handles the page and its content.
116
117
 
117
- | Property | Type | Description |
118
- | --------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
119
- | `source` | `string` | The glob pattern used to match files within the Storage that these headers will apply to. type: {StorageConfigSourceGlob} |
120
- | `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]>} |
118
+ | Property | Type | Description |
119
+ | --------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
120
+ | `source` | `string` | The glob pattern used to match files within the Storage that these headers will apply to. type: {StorageConfigSourceGlob} |
121
+ | `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]>} |
121
122
 
122
123
  #### :gear: StorageConfigRewrite
123
124
 
124
125
  You can utilize optional rewrites to display the same content for multiple URLs.
125
126
  Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.
126
127
 
127
- | Property | Type | Description |
128
- | ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
129
- | `source` | `string` | The glob pattern or specific path to match for incoming requests.Matches are rewritten to the specified destination. type: {StorageConfigSourceGlob} |
130
- | `destination` | `string` | The destination path or file to which matching requests should be rewritten. type: {string} |
128
+ | Property | Type | Description |
129
+ | ------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
130
+ | `source` | `string` | The glob pattern or specific path to match for incoming requests. Matches are rewritten to the specified destination. type: {StorageConfigSourceGlob} |
131
+ | `destination` | `string` | The destination path or file to which matching requests should be rewritten. type: {string} |
131
132
 
132
133
  #### :gear: StorageConfigRedirect
133
134
 
134
135
  Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.
135
136
 
136
- | Property | Type | Description |
137
- | ---------- | ------------ | --------------------------------------------------------------------------------------------------------------------------- | ---- |
138
- | `source` | `string` | The glob pattern or specific path to match for incoming requests that should be redirected. type: {StorageConfigSourceGlob} |
139
- | `location` | `string` | The URL or path to which the request should be redirected. type: {string} |
140
- | `code` | `301 or 302` | The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect). type: {301 | 302} |
137
+ | Property | Type | Description |
138
+ | ---------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------- |
139
+ | `source` | `string` | The glob pattern or specific path to match for incoming requests that should be redirected. type: {StorageConfigSourceGlob} |
140
+ | `location` | `string` | The URL or path to which the request should be redirected. type: {string} |
141
+ | `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} |
141
142
 
142
143
  #### :gear: StorageConfig
143
144
 
144
145
  Configures the hosting behavior of the Storage.
145
146
 
146
- | Property | Type | Description |
147
- | --------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | -------------------- |
148
- | `headers` | `StorageConfigHeader[] or undefined` | Optional array of `StorageConfigHeader` objects to define custom HTTP headers for specific files or patterns. type: {StorageConfigHeader[]}optional |
149
- | `rewrites` | `StorageConfigRewrite[] or undefined` | Optional array of `StorageConfigRewrite` objects to define rewrite rules. type: {StorageConfigRewrite[]}optional |
150
- | `redirects` | `StorageConfigRedirect[] or undefined` | Optional array of `StorageConfigRedirect` objects to define HTTP redirects. type: {StorageConfigRedirect[]}optional |
151
- | `iframe` | `"deny" or "same-origin" or "allow-any" or undefined` | For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.Options are:- `deny`: Prevents any content from being displayed in an iframe.- `same-origin`: Allows iframe content from the same origin as the page.- `allow-any`: Allows iframe content from any origin.If not specified, then `deny` is used as default value. type: {'deny' | 'same-origin' | 'allow-any'}optional |
152
- | `rawAccess` | `boolean or undefined` | Optional flag to enable access for raw URLs.⚠️ **WARNING: Enabling this option is highly discouraged due to security risks.**Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation.This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content.Since there is no validation on raw URLs, the client may receive and process harmful data.If not specified, the default value is `false`. type: {boolean}optional |
153
- | `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 |
147
+ | Property | Type | Description |
148
+ | --------------- | ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
149
+ | `headers` | `StorageConfigHeader[] or undefined` | Optional array of `StorageConfigHeader` objects to define custom HTTP headers for specific files or patterns. type: {StorageConfigHeader[]}optional |
150
+ | `rewrites` | `StorageConfigRewrite[] or undefined` | Optional array of `StorageConfigRewrite` objects to define rewrite rules. type: {StorageConfigRewrite[]}optional |
151
+ | `redirects` | `StorageConfigRedirect[] or undefined` | Optional array of `StorageConfigRedirect` objects to define HTTP redirects. type: {StorageConfigRedirect[]}optional |
152
+ | `iframe` | `"deny" or "same-origin" or "allow-any" or undefined` | For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites. Options are: - `deny`: Prevents any content from being displayed in an iframe. - `same-origin`: Allows iframe content from the same origin as the page. - `allow-any`: Allows iframe content from any origin. If not specified, then `deny` is used as default value. type: {'deny' or 'same-origin' or 'allow-any'}optional |
153
+ | `rawAccess` | `boolean or undefined` | Optional flag to enable access for raw URLs. ⚠️ **WARNING: Enabling this option is highly discouraged due to security risks.** Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation. This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content. Since there is no validation on raw URLs, the client may receive and process harmful data. If not specified, the default value is `false`. type: {boolean}optional |
154
+ | `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 |
154
155
 
155
156
  #### :gear: CliConfig
156
157
 
157
- | Property | Type | Description |
158
- | ------------ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
159
- | `source` | `string or undefined` | Specifies the directory from which to deploy to Storage.For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`. default: 'build'type: {string} |
160
- | `ignore` | `string[] or undefined` | Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore. type: {string[]}optional |
161
- | `gzip` | `string or false or undefined` | Controls the Gzip compression optimization for files in the source folder. By default, it targets JavaScript (js), ES Module (mjs), and CSS (css) files.You can disable this by setting it to `false` or customize it with a different file matching pattern using glob syntax. type: {string | false}optional |
162
- | `encoding` | `[string, ENCODING_TYPE][] or undefined` | Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:- `.Z` for compress,- `.gz` for gzip,- `.br` for brotli,- `.zlib` for deflate,- anything else defaults to `identity`.The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types. type: {Array<[string, ENCODING_TYPE]>}optional |
163
- | `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 |
164
- | `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 |
158
+ | Property | Type | Description |
159
+ | ------------ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
160
+ | `source` | `string or undefined` | Specifies the directory from which to deploy to Storage. For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`. default: 'build'type: {string} |
161
+ | `ignore` | `string[] or undefined` | Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore. type: {string[]}optional |
162
+ | `gzip` | `string or false or undefined` | Controls the Gzip compression optimization for files in the source folder. By default, it targets JavaScript (js), ES Module (mjs), and CSS (css) files. You can disable this by setting it to `false` or customize it with a different file matching pattern using glob syntax. type: {string or false}optional |
163
+ | `encoding` | `[string, ENCODING_TYPE][] or undefined` | Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension: - `.Z` for compress, - `.gz` for gzip, - `.br` for brotli, - `.zlib` for deflate, - anything else defaults to `identity`. The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types. type: {Array<[string, ENCODING_TYPE]>}optional |
164
+ | `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 |
165
+ | `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 |
165
166
 
166
167
  #### :gear: JunoConfigEnv
167
168
 
@@ -175,17 +176,17 @@ Represents the environment configuration for Juno.
175
176
 
176
177
  Configuration for satellite assertions.
177
178
 
178
- | Property | Type | Description |
179
- | ------------ | -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
180
- | `heapMemory` | `number 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 `number` 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: {number | boolean} |
179
+ | Property | Type | Description |
180
+ | ------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
181
+ | `heapMemory` | `number 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 `number` 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: {number or boolean} |
181
182
 
182
183
  #### :gear: AuthenticationConfigInternetIdentity
183
184
 
184
185
  Configure the behavior of Internet Identity.
185
186
 
186
- | Property | Type | Description |
187
- | ------------------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
188
- | `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 |
187
+ | Property | Type | Description |
188
+ | ------------------ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
189
+ | `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 |
189
190
 
190
191
  #### :gear: AuthenticationConfig
191
192
 
@@ -199,9 +200,9 @@ Configures the Authentication options of a Satellite.
199
200
 
200
201
  Configures the behavior of the Datastore.
201
202
 
202
- | Property | Type | Description |
203
- | --------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
204
- | `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 |
203
+ | Property | Type | Description |
204
+ | --------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
205
+ | `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 |
205
206
 
206
207
  #### :gear: SatelliteId
207
208
 
@@ -216,9 +217,26 @@ Represents the unique identifier for a satellite.
216
217
 
217
218
  Represents a mapping of satellite identifiers to different configurations based on the mode of the application.
218
219
 
219
- | Property | Type | Description |
220
- | -------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
221
- | `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>} |
220
+ | Property | Type | Description |
221
+ | -------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
222
+ | `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>} |
223
+
224
+ #### :gear: SatelliteConfigOptions
225
+
226
+ SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning
227
+ the operational behavior of various aspects of a Satellite, such as storage, datastore,
228
+ authentication, and deployment assertions.
229
+
230
+ These options affect specific modules of the Satellite and may require manual application of
231
+ changes, typically through CLI commands (e.g., `juno config`).
232
+
233
+ | Property | Type | Description |
234
+ | ---------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
235
+ | `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 |
236
+ | `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 |
237
+ | `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 |
238
+ | `assertions` | `SatelliteAssertions or undefined` | Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions. type: {SatelliteAssertions}optional |
239
+ | `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 |
222
240
 
223
241
  #### :gear: JunoConfig
224
242
 
@@ -233,20 +251,20 @@ Represents the overall configuration for Juno.
233
251
 
234
252
  Represents the collections configuration for a satellite in a development environment.
235
253
 
236
- | Property | Type | Description |
237
- | ----------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
238
- | `datastore` | `SatelliteDevDataStoreCollection[] or undefined` | The Datastore collections configuration. type: {SatelliteDevDataStoreCollection[]}optional |
239
- | `db` | `SatelliteDevDataStoreCollection[] or undefined` | The Datastore collections configuration.This property is deprecated. Use {@link datastore} instead. deprecatedtype: {SatelliteDevDbCollection[]} |
240
- | `storage` | `SatelliteDevStorageCollection[] or undefined` | The Storage collections configuration. type: {SatelliteDevStorageCollection[]}optional |
254
+ | Property | Type | Description |
255
+ | ----------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
256
+ | `datastore` | `SatelliteDevDataStoreCollection[] or undefined` | The Datastore collections configuration. type: {SatelliteDevDataStoreCollection[]}optional |
257
+ | `db` | `SatelliteDevDataStoreCollection[] or undefined` | The Datastore collections configuration. This property is deprecated. Use {@link datastore} instead. deprecatedtype: {SatelliteDevDbCollection[]} |
258
+ | `storage` | `SatelliteDevStorageCollection[] or undefined` | The Storage collections configuration. type: {SatelliteDevStorageCollection[]}optional |
241
259
 
242
260
  #### :gear: SatelliteDevController
243
261
 
244
262
  Represents a controller configuration for a satellite in a development environment.
245
263
 
246
- | Property | Type | Description |
247
- | -------- | -------------------- | --------------------------------------------------------- | -------- |
248
- | `id` | `string` | The unique identifier of the controller. type: {string} |
249
- | `scope` | `"write" or "admin"` | The scope of the controller's permissions. type: {'write' | 'admin'} |
264
+ | Property | Type | Description |
265
+ | -------- | -------------------- | --------------------------------------------------------------------- |
266
+ | `id` | `string` | The unique identifier of the controller. type: {string} |
267
+ | `scope` | `"write" or "admin"` | The scope of the controller's permissions. type: {'write' or 'admin'} |
250
268
 
251
269
  #### :gear: SatelliteDevConfig
252
270
 
@@ -312,64 +330,17 @@ Represents the development configuration for Juno.
312
330
 
313
331
  #### :gear: SatelliteConfig
314
332
 
315
- | Type | Type |
316
- | ----------------- | ------------------------------------ |
317
- | `SatelliteConfig` | `Either<SatelliteId, SatelliteIds> & |
318
-
319
- CliConfig and {
320
- /\*\*
321
- _ Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.
322
- _ Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
323
- _ @type {StorageConfig}
324
- _ @optional
325
- \*/
326
- storage?: StorageConfig;
327
-
328
- /**
329
- * Optional configuration parameters for the satellite, affecting the operational behavior of its Datastore.
330
- * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
331
- * @type {DatastoreConfig}
332
- * @optional
333
- */
334
- datastore?: DatastoreConfig;
335
-
336
- /**
337
- * Optional configuration parameters for the satellite, affecting the operational behavior of its Authentication.
338
- * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
339
- * @type {AuthenticationConfig}
340
- * @optional
341
- */
342
- authentication?: AuthenticationConfig;
343
-
344
- /**
345
- * Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.
346
- * @type {SatelliteAssertions}
347
- * @optional
348
- */
349
- assertions?: SatelliteAssertions;
350
-
351
- /**
352
- * Optional configuration parameters for the Satellite.
353
- * These settings control various aspects of the module's behavior and resource usage.
354
- * @type {ModuleSettings}
355
- * @optional
356
- */
357
- settings?: ModuleSettings;
358
-
359
- }` |
360
-
361
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/mainnet/configs/satellite.config.ts#L53)
333
+ | Type | Type |
334
+ | ----------------- | ---------------------------------------------------------------------------- |
335
+ | `SatelliteConfig` | `Either<SatelliteId, SatelliteIds> and CliConfig and SatelliteConfigOptions` |
362
336
 
363
- #### :gear: SatelliteDevDataStoreCollection
337
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/mainnet/configs/satellite.config.ts#L114)
364
338
 
365
- | Type | Type |
366
- | --------------------------------- | ------ |
367
- | `SatelliteDevDataStoreCollection` | `Omit< |
368
-
369
- Rule,
370
- 'createdAt' or 'updatedAt' or 'maxSize' or 'version'
339
+ #### :gear: SatelliteDevDataStoreCollection
371
340
 
372
- > ` |
341
+ | Type | Type |
342
+ | --------------------------------- | -------------------------------------------------------------------- |
343
+ | `SatelliteDevDataStoreCollection` | `Omit< Rule, 'createdAt' or 'updatedAt' or 'maxSize' or 'version' >` |
373
344
 
374
345
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L7)
375
346
 
@@ -383,14 +354,9 @@ Rule,
383
354
 
384
355
  #### :gear: SatelliteDevStorageCollection
385
356
 
386
- | Type | Type |
387
- | ------------------------------- | ------ |
388
- | `SatelliteDevStorageCollection` | `Omit< |
389
-
390
- Rule,
391
- 'createdAt' or 'updatedAt' or 'maxCapacity' or 'version'
392
-
393
- > ` |
357
+ | Type | Type |
358
+ | ------------------------------- | ------------------------------------------------------------------------ |
359
+ | `SatelliteDevStorageCollection` | `Omit< Rule, 'createdAt' or 'updatedAt' or 'maxCapacity' or 'version' >` |
394
360
 
395
361
  [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L25)
396
362
 
@@ -43,10 +43,22 @@ export interface SatelliteIds {
43
43
  ids: Record<JunoConfigMode, string>;
44
44
  }
45
45
  /**
46
- * Represents the configuration for a satellite.
47
- * @typedef {Either<SatelliteId, SatelliteIds>} SatelliteConfig
46
+ * SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning
47
+ * the operational behavior of various aspects of a Satellite, such as storage, datastore,
48
+ * authentication, and deployment assertions.
49
+ *
50
+ * These options affect specific modules of the Satellite and may require manual application of
51
+ * changes, typically through CLI commands (e.g., `juno config`).
52
+ *
53
+ * @interface SatelliteConfigOptions
54
+ *
55
+ * @property {StorageConfig} [storage] - Configuration settings for storage management in the Satellite.
56
+ * @property {DatastoreConfig} [datastore] - Configuration settings for datastore management.
57
+ * @property {AuthenticationConfig} [authentication] - Authentication-specific configurations.
58
+ * @property {SatelliteAssertions} [assertions] - Conditions and assertions for deployment or operational checks.
59
+ * @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.
48
60
  */
49
- export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & CliConfig & {
61
+ export interface SatelliteConfigOptions {
50
62
  /**
51
63
  * Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.
52
64
  * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
@@ -81,4 +93,13 @@ export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & CliConfig & {
81
93
  * @optional
82
94
  */
83
95
  settings?: ModuleSettings;
84
- };
96
+ }
97
+ /**
98
+ * Represents the configuration for a satellite.
99
+ *
100
+ * @typedef {Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions} SatelliteConfig
101
+ * @property {SatelliteId | SatelliteIds} SatelliteId or SatelliteIds - Defines a unique Satellite or a collection of Satellites.
102
+ * @property {CliConfig} CliConfig - Configuration specific to the CLI interface.
103
+ * @property {SatelliteConfigOptions} SatelliteConfigOptions - Additional configuration options for the Satellite.
104
+ */
105
+ export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions;
@@ -74,4 +74,8 @@ export interface Rule {
74
74
  * @type {boolean}
75
75
  */
76
76
  mutablePermissions: boolean;
77
+ /**
78
+ * The maximum number of writes and deletes per minute.
79
+ */
80
+ maxTokens?: number;
77
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/config",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "description": "Configuration options for Juno CLI",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",