@junobuild/config 2.10.1 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -9
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/satellite/configs/satellite.config.d.ts +44 -1
- package/dist/types/satellite/juno.config.d.ts +34 -0
- package/dist/types/shared/automation.config.d.ts +162 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './satellite/configs/satellite.config';
|
|
|
17
17
|
export * from './satellite/constants/emulator.constants';
|
|
18
18
|
export * from './satellite/juno.config';
|
|
19
19
|
export * from './shared/authentication.config';
|
|
20
|
+
export * from './shared/automation.config';
|
|
20
21
|
export * from './shared/feature.config';
|
|
21
22
|
export * from './shared/storage.config';
|
|
22
23
|
export * from './types/cli.config';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type PrincipalText } from '@dfinity/zod-schemas';
|
|
2
2
|
import * as z from 'zod';
|
|
3
3
|
import { type AuthenticationConfig } from '../../shared/authentication.config';
|
|
4
|
+
import { type AutomationConfig } from '../../shared/automation.config';
|
|
4
5
|
import { type StorageConfig } from '../../shared/storage.config';
|
|
5
6
|
import type { CliConfig } from '../../types/cli.config';
|
|
6
7
|
import { type JunoConfigMode } from '../../types/juno.env';
|
|
@@ -112,6 +113,23 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
112
113
|
}, z.core.$strict>>;
|
|
113
114
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
114
115
|
}, z.core.$strict>>;
|
|
116
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
117
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
119
|
+
owner: z.ZodString;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
accessKeys: z.ZodOptional<z.ZodObject<{
|
|
124
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
125
|
+
Write: "Write";
|
|
126
|
+
Submit: "Submit";
|
|
127
|
+
}>>;
|
|
128
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
129
|
+
}, z.core.$strict>>;
|
|
130
|
+
}, z.core.$strict>>;
|
|
131
|
+
version: z.ZodOptional<z.ZodBigInt>;
|
|
132
|
+
}, z.core.$strict>>;
|
|
115
133
|
assertions: z.ZodOptional<z.ZodObject<{
|
|
116
134
|
heapMemory: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodBoolean]>>;
|
|
117
135
|
}, z.core.$strict>>;
|
|
@@ -235,6 +253,23 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
235
253
|
}, z.core.$strict>>;
|
|
236
254
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
237
255
|
}, z.core.$strict>>;
|
|
256
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
257
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
258
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
259
|
+
owner: z.ZodString;
|
|
260
|
+
name: z.ZodString;
|
|
261
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
262
|
+
}, z.core.$strict>>;
|
|
263
|
+
accessKeys: z.ZodOptional<z.ZodObject<{
|
|
264
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
265
|
+
Write: "Write";
|
|
266
|
+
Submit: "Submit";
|
|
267
|
+
}>>;
|
|
268
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
269
|
+
}, z.core.$strict>>;
|
|
270
|
+
}, z.core.$strict>>;
|
|
271
|
+
version: z.ZodOptional<z.ZodBigInt>;
|
|
272
|
+
}, z.core.$strict>>;
|
|
238
273
|
assertions: z.ZodOptional<z.ZodObject<{
|
|
239
274
|
heapMemory: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodBoolean]>>;
|
|
240
275
|
}, z.core.$strict>>;
|
|
@@ -304,7 +339,7 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
304
339
|
/**
|
|
305
340
|
* SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning
|
|
306
341
|
* the operational behavior of various aspects of a Satellite, such as storage, datastore,
|
|
307
|
-
* authentication, and deployment assertions.
|
|
342
|
+
* authentication, automation, and deployment assertions.
|
|
308
343
|
*
|
|
309
344
|
* These options affect specific modules of the Satellite and may require manual application of
|
|
310
345
|
* changes, typically through CLI commands (e.g., `juno config`).
|
|
@@ -314,6 +349,7 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
314
349
|
* @property {StorageConfig} [storage] - Configuration settings for storage management in the Satellite.
|
|
315
350
|
* @property {DatastoreConfig} [datastore] - Configuration settings for datastore management.
|
|
316
351
|
* @property {AuthenticationConfig} [authentication] - Authentication-specific configurations.
|
|
352
|
+
* @property {AutomationConfig} [automation] - Automation-specific configurations for CI/CD.
|
|
317
353
|
* @property {SatelliteAssertions} [assertions] - Conditions and assertions for deployment or operational checks.
|
|
318
354
|
* @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.
|
|
319
355
|
*/
|
|
@@ -339,6 +375,13 @@ export interface SatelliteConfigOptions {
|
|
|
339
375
|
* @optional
|
|
340
376
|
*/
|
|
341
377
|
authentication?: AuthenticationConfig;
|
|
378
|
+
/**
|
|
379
|
+
* Optional configuration parameters for the behavior of the automation.
|
|
380
|
+
* Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
|
|
381
|
+
* @type {AutomationConfig}
|
|
382
|
+
* @optional
|
|
383
|
+
*/
|
|
384
|
+
automation?: AutomationConfig;
|
|
342
385
|
/**
|
|
343
386
|
* Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.
|
|
344
387
|
* @type {SatelliteAssertions}
|
|
@@ -65,6 +65,23 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
65
65
|
}, z.core.$strict>>;
|
|
66
66
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
67
67
|
}, z.core.$strict>>;
|
|
68
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
71
|
+
owner: z.ZodString;
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
74
|
+
}, z.core.$strict>>;
|
|
75
|
+
accessKeys: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
77
|
+
Write: "Write";
|
|
78
|
+
Submit: "Submit";
|
|
79
|
+
}>>;
|
|
80
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
81
|
+
}, z.core.$strict>>;
|
|
82
|
+
}, z.core.$strict>>;
|
|
83
|
+
version: z.ZodOptional<z.ZodBigInt>;
|
|
84
|
+
}, z.core.$strict>>;
|
|
68
85
|
assertions: z.ZodOptional<z.ZodObject<{
|
|
69
86
|
heapMemory: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodBoolean]>>;
|
|
70
87
|
}, z.core.$strict>>;
|
|
@@ -188,6 +205,23 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
188
205
|
}, z.core.$strict>>;
|
|
189
206
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
190
207
|
}, z.core.$strict>>;
|
|
208
|
+
automation: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
211
|
+
owner: z.ZodString;
|
|
212
|
+
name: z.ZodString;
|
|
213
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
}, z.core.$strict>>;
|
|
215
|
+
accessKeys: z.ZodOptional<z.ZodObject<{
|
|
216
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
217
|
+
Write: "Write";
|
|
218
|
+
Submit: "Submit";
|
|
219
|
+
}>>;
|
|
220
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
221
|
+
}, z.core.$strict>>;
|
|
222
|
+
}, z.core.$strict>>;
|
|
223
|
+
version: z.ZodOptional<z.ZodBigInt>;
|
|
224
|
+
}, z.core.$strict>>;
|
|
191
225
|
assertions: z.ZodOptional<z.ZodObject<{
|
|
192
226
|
heapMemory: z.ZodOptional<z.ZodUnion<readonly [z.ZodBigInt, z.ZodBoolean]>>;
|
|
193
227
|
}, z.core.$strict>>;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @see AutomationScope
|
|
4
|
+
*/
|
|
5
|
+
export declare const AutomationScopeSchema: z.ZodEnum<{
|
|
6
|
+
Write: "Write";
|
|
7
|
+
Submit: "Submit";
|
|
8
|
+
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Defines the scope of permissions for automation access keys (editor or submitter).
|
|
11
|
+
* @type AutomationScope
|
|
12
|
+
*/
|
|
13
|
+
export type AutomationScope = z.infer<typeof AutomationScopeSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* @see AutomationAccessKeysConfig
|
|
16
|
+
*/
|
|
17
|
+
export declare const AutomationAccessKeysConfigSchema: z.ZodObject<{
|
|
18
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
19
|
+
Write: "Write";
|
|
20
|
+
Submit: "Submit";
|
|
21
|
+
}>>;
|
|
22
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
/**
|
|
25
|
+
* Configure the controller behavior for automation.
|
|
26
|
+
*
|
|
27
|
+
* @interface AutomationAccessKeysConfig
|
|
28
|
+
*/
|
|
29
|
+
export interface AutomationAccessKeysConfig {
|
|
30
|
+
/**
|
|
31
|
+
* The scope of permissions granted to the automation access keys.
|
|
32
|
+
*
|
|
33
|
+
* If omitted, defaults to `Write`.
|
|
34
|
+
*/
|
|
35
|
+
scope?: AutomationScope;
|
|
36
|
+
/**
|
|
37
|
+
* Duration for which an automation access key remains valid, expressed in nanoseconds.
|
|
38
|
+
*
|
|
39
|
+
* Defaults to 10 minutes. Cannot exceed 1 hour.
|
|
40
|
+
*/
|
|
41
|
+
timeToLive?: bigint;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @see AutomationConfigRepository
|
|
45
|
+
*/
|
|
46
|
+
export declare const AutomationConfigRepositorySchema: z.ZodObject<{
|
|
47
|
+
owner: z.ZodString;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
/**
|
|
52
|
+
* Configure repository access for automation.
|
|
53
|
+
*
|
|
54
|
+
* @interface AutomationConfigRepository
|
|
55
|
+
*/
|
|
56
|
+
export interface AutomationConfigRepository {
|
|
57
|
+
/**
|
|
58
|
+
* Repository owner (e.g. "octo-org" or "peterpeterparker" for GitHub).
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
*/
|
|
62
|
+
owner: string;
|
|
63
|
+
/**
|
|
64
|
+
* Repository name (e.g, "octo-repo" or "daviddalbusco.com" for GitHub).
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
*/
|
|
68
|
+
name: string;
|
|
69
|
+
/**
|
|
70
|
+
* Optional list of allowed refs (e.g., ["refs/heads/main", "refs/pull/74/merge"]).
|
|
71
|
+
*
|
|
72
|
+
* If omitted, all refs are allowed.
|
|
73
|
+
*
|
|
74
|
+
* @type {string[]}
|
|
75
|
+
* @optional
|
|
76
|
+
*/
|
|
77
|
+
refs?: string[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @see AutomationConfigGitHub
|
|
81
|
+
*/
|
|
82
|
+
export declare const AutomationConfigGitHubSchema: z.ZodObject<{
|
|
83
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
84
|
+
owner: z.ZodString;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
}, z.core.$strict>>;
|
|
88
|
+
accessKeys: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
90
|
+
Write: "Write";
|
|
91
|
+
Submit: "Submit";
|
|
92
|
+
}>>;
|
|
93
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
94
|
+
}, z.core.$strict>>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
/**
|
|
97
|
+
* Configure automation via GitHub Actions.
|
|
98
|
+
*
|
|
99
|
+
* @interface AutomationConfigGitHub
|
|
100
|
+
*/
|
|
101
|
+
export interface AutomationConfigGitHub {
|
|
102
|
+
/**
|
|
103
|
+
* List of GitHub repositories authorized to authenticate with this Satellite.
|
|
104
|
+
*
|
|
105
|
+
* Each repository must specify owner and name.
|
|
106
|
+
* Optionally restrict to specific refs.
|
|
107
|
+
*
|
|
108
|
+
* @type {AutomationConfigRepository[]}
|
|
109
|
+
*/
|
|
110
|
+
repositories: AutomationConfigRepository[];
|
|
111
|
+
/**
|
|
112
|
+
* Optional configuration for the access keys generated by the automation.
|
|
113
|
+
* If omitted, default behavior applies.
|
|
114
|
+
*
|
|
115
|
+
* @type {AutomationAccessKeysConfig}
|
|
116
|
+
* @optional
|
|
117
|
+
*/
|
|
118
|
+
accessKeys?: AutomationAccessKeysConfig;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @see AutomationConfig
|
|
122
|
+
*/
|
|
123
|
+
export declare const AutomationConfigSchema: z.ZodObject<{
|
|
124
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
repositories: z.ZodArray<z.ZodObject<{
|
|
126
|
+
owner: z.ZodString;
|
|
127
|
+
name: z.ZodString;
|
|
128
|
+
refs: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
129
|
+
}, z.core.$strict>>;
|
|
130
|
+
accessKeys: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
Write: "Write";
|
|
133
|
+
Submit: "Submit";
|
|
134
|
+
}>>;
|
|
135
|
+
timeToLive: z.ZodOptional<z.ZodBigInt>;
|
|
136
|
+
}, z.core.$strict>>;
|
|
137
|
+
}, z.core.$strict>>;
|
|
138
|
+
version: z.ZodOptional<z.ZodBigInt>;
|
|
139
|
+
}, z.core.$strict>;
|
|
140
|
+
/**
|
|
141
|
+
* Configures the Automation options of a Satellite.
|
|
142
|
+
* @interface AutomationConfig
|
|
143
|
+
*/
|
|
144
|
+
export interface AutomationConfig {
|
|
145
|
+
/**
|
|
146
|
+
* Optional configuration for enabling automation through GitHub Actions.
|
|
147
|
+
*
|
|
148
|
+
* @type {AutomationConfigGitHub}
|
|
149
|
+
* @optional
|
|
150
|
+
*/
|
|
151
|
+
github?: AutomationConfigGitHub;
|
|
152
|
+
/**
|
|
153
|
+
* The current version of the config.
|
|
154
|
+
*
|
|
155
|
+
* Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.
|
|
156
|
+
* You can provide it if you want to manage versioning manually within your config file.
|
|
157
|
+
*
|
|
158
|
+
* @type {bigint}
|
|
159
|
+
* @optional
|
|
160
|
+
*/
|
|
161
|
+
version?: bigint;
|
|
162
|
+
}
|