@junobuild/config 2.9.0 → 2.10.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/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/console/console.config.d.ts +27 -0
- package/dist/types/satellite/configs/satellite.config.d.ts +14 -0
- package/dist/types/satellite/juno.config.d.ts +24 -0
- package/dist/types/shared/api.config.d.ts +19 -0
- package/dist/types/shared/authentication.config.d.ts +44 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type PrincipalText } from '@dfinity/zod-schemas';
|
|
2
2
|
import * as z from 'zod';
|
|
3
|
+
import { type ApiConfig } from '../shared/api.config';
|
|
3
4
|
import { type AuthenticationConfig } from '../shared/authentication.config';
|
|
4
5
|
import { type StorageConfig } from '../shared/storage.config';
|
|
5
6
|
import { type CliConfig } from '../types/cli.config';
|
|
@@ -83,11 +84,21 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
83
84
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
84
85
|
}, z.core.$strict>>;
|
|
85
86
|
}, z.core.$strict>>;
|
|
87
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
clientId: z.ZodString;
|
|
89
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
91
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
92
|
+
}, z.core.$strict>>;
|
|
93
|
+
}, z.core.$strict>>;
|
|
86
94
|
rules: z.ZodOptional<z.ZodObject<{
|
|
87
95
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
88
96
|
}, z.core.$strict>>;
|
|
89
97
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
90
98
|
}, z.core.$strict>>;
|
|
99
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
url: z.ZodURL;
|
|
101
|
+
}, z.core.$strict>>;
|
|
91
102
|
source: z.ZodOptional<z.ZodString>;
|
|
92
103
|
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
104
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -160,11 +171,21 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
160
171
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
161
172
|
}, z.core.$strict>>;
|
|
162
173
|
}, z.core.$strict>>;
|
|
174
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
clientId: z.ZodString;
|
|
176
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
177
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
178
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
179
|
+
}, z.core.$strict>>;
|
|
180
|
+
}, z.core.$strict>>;
|
|
163
181
|
rules: z.ZodOptional<z.ZodObject<{
|
|
164
182
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
165
183
|
}, z.core.$strict>>;
|
|
166
184
|
version: z.ZodOptional<z.ZodBigInt>;
|
|
167
185
|
}, z.core.$strict>>;
|
|
186
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
url: z.ZodURL;
|
|
188
|
+
}, z.core.$strict>>;
|
|
168
189
|
source: z.ZodOptional<z.ZodString>;
|
|
169
190
|
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
170
191
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -216,4 +237,10 @@ export type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> & CliConfig & {
|
|
|
216
237
|
* @optional
|
|
217
238
|
*/
|
|
218
239
|
authentication?: AuthenticationConfig;
|
|
240
|
+
/**
|
|
241
|
+
* Optional configuration for the Juno API.
|
|
242
|
+
* @type {ApiConfig}
|
|
243
|
+
* @optional
|
|
244
|
+
*/
|
|
245
|
+
api?: ApiConfig;
|
|
219
246
|
};
|
|
@@ -100,6 +100,13 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
100
100
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
101
101
|
}, z.core.$strict>>;
|
|
102
102
|
}, z.core.$strict>>;
|
|
103
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
clientId: z.ZodString;
|
|
105
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
107
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
108
|
+
}, z.core.$strict>>;
|
|
109
|
+
}, z.core.$strict>>;
|
|
103
110
|
rules: z.ZodOptional<z.ZodObject<{
|
|
104
111
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
105
112
|
}, z.core.$strict>>;
|
|
@@ -216,6 +223,13 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
216
223
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
217
224
|
}, z.core.$strict>>;
|
|
218
225
|
}, z.core.$strict>>;
|
|
226
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
227
|
+
clientId: z.ZodString;
|
|
228
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
229
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
230
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
231
|
+
}, z.core.$strict>>;
|
|
232
|
+
}, z.core.$strict>>;
|
|
219
233
|
rules: z.ZodOptional<z.ZodObject<{
|
|
220
234
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
221
235
|
}, z.core.$strict>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
+
import { type ApiConfig } from '../shared/api.config';
|
|
2
3
|
import { type EmulatorConfig } from './configs/emulator.config';
|
|
3
4
|
import { type OrbiterConfig } from './configs/orbiter.config';
|
|
4
5
|
import { type SatelliteConfig } from './configs/satellite.config';
|
|
@@ -52,6 +53,13 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
52
53
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
53
54
|
}, z.core.$strict>>;
|
|
54
55
|
}, z.core.$strict>>;
|
|
56
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
clientId: z.ZodString;
|
|
58
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
60
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
61
|
+
}, z.core.$strict>>;
|
|
62
|
+
}, z.core.$strict>>;
|
|
55
63
|
rules: z.ZodOptional<z.ZodObject<{
|
|
56
64
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
57
65
|
}, z.core.$strict>>;
|
|
@@ -168,6 +176,13 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
168
176
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
169
177
|
}, z.core.$strict>>;
|
|
170
178
|
}, z.core.$strict>>;
|
|
179
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
clientId: z.ZodString;
|
|
181
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
183
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
184
|
+
}, z.core.$strict>>;
|
|
185
|
+
}, z.core.$strict>>;
|
|
171
186
|
rules: z.ZodOptional<z.ZodObject<{
|
|
172
187
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
173
188
|
}, z.core.$strict>>;
|
|
@@ -348,6 +363,9 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
348
363
|
}, z.core.$strict>>;
|
|
349
364
|
}, z.core.$strict>;
|
|
350
365
|
}, z.core.$strict>]>>;
|
|
366
|
+
api: z.ZodOptional<z.ZodObject<{
|
|
367
|
+
url: z.ZodURL;
|
|
368
|
+
}, z.core.$strict>>;
|
|
351
369
|
}, z.core.$strict>;
|
|
352
370
|
/**
|
|
353
371
|
* Represents the overall configuration for Juno.
|
|
@@ -369,4 +387,10 @@ export interface JunoConfig {
|
|
|
369
387
|
* Your options for the emulator.
|
|
370
388
|
*/
|
|
371
389
|
emulator?: EmulatorConfig;
|
|
390
|
+
/**
|
|
391
|
+
* Optional configuration for the Juno API.
|
|
392
|
+
* @type {ApiConfig}
|
|
393
|
+
* @optional
|
|
394
|
+
*/
|
|
395
|
+
api?: ApiConfig;
|
|
372
396
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* @see ApiConfig
|
|
4
|
+
*/
|
|
5
|
+
export declare const ApiConfigSchema: z.ZodObject<{
|
|
6
|
+
url: z.ZodURL;
|
|
7
|
+
}, z.core.$strict>;
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for the Juno API endpoints. Useful for local development or self-hosting.
|
|
10
|
+
* @interface ApiConfig
|
|
11
|
+
*/
|
|
12
|
+
export interface ApiConfig {
|
|
13
|
+
/**
|
|
14
|
+
* The base URL for the Juno API.
|
|
15
|
+
* @default https://api.juno.build
|
|
16
|
+
* @type {string}
|
|
17
|
+
*/
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
@@ -91,6 +91,37 @@ export interface AuthenticationConfigGoogle {
|
|
|
91
91
|
*/
|
|
92
92
|
delegation?: AuthenticationConfigDelegation;
|
|
93
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* @see AuthenticationConfigGitHub
|
|
96
|
+
*/
|
|
97
|
+
export declare const AuthenticationConfigGitHubSchema: z.ZodObject<{
|
|
98
|
+
clientId: z.ZodString;
|
|
99
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
101
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
102
|
+
}, z.core.$strict>>;
|
|
103
|
+
}, z.core.$strict>;
|
|
104
|
+
/**
|
|
105
|
+
* Configure the sign-in with GitHub.
|
|
106
|
+
*
|
|
107
|
+
* @interface AuthenticationConfigGitHub
|
|
108
|
+
*/
|
|
109
|
+
export interface AuthenticationConfigGitHub {
|
|
110
|
+
/**
|
|
111
|
+
* The OAuth client ID from your
|
|
112
|
+
* [GitHub OAuth apps](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps).
|
|
113
|
+
*
|
|
114
|
+
* Example: `"Ov99aa88ijrrJJfwXsqW"`
|
|
115
|
+
*
|
|
116
|
+
* @type {string}
|
|
117
|
+
*/
|
|
118
|
+
clientId: string;
|
|
119
|
+
/**
|
|
120
|
+
* Optional delegation settings for authentication.
|
|
121
|
+
* If omitted, the default delegation behavior applies.
|
|
122
|
+
*/
|
|
123
|
+
delegation?: AuthenticationConfigDelegation;
|
|
124
|
+
}
|
|
94
125
|
/**
|
|
95
126
|
* @see AuthenticationConfigRules
|
|
96
127
|
*/
|
|
@@ -127,6 +158,13 @@ export declare const AuthenticationConfigSchema: z.ZodObject<{
|
|
|
127
158
|
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
128
159
|
}, z.core.$strict>>;
|
|
129
160
|
}, z.core.$strict>>;
|
|
161
|
+
github: z.ZodOptional<z.ZodObject<{
|
|
162
|
+
clientId: z.ZodString;
|
|
163
|
+
delegation: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
allowedTargets: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
165
|
+
sessionDuration: z.ZodOptional<z.ZodBigInt>;
|
|
166
|
+
}, z.core.$strict>>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
130
168
|
rules: z.ZodOptional<z.ZodObject<{
|
|
131
169
|
allowedCallers: z.ZodArray<z.ZodString>;
|
|
132
170
|
}, z.core.$strict>>;
|
|
@@ -149,6 +187,12 @@ export interface AuthenticationConfig {
|
|
|
149
187
|
* @optional
|
|
150
188
|
*/
|
|
151
189
|
google?: AuthenticationConfigGoogle;
|
|
190
|
+
/**
|
|
191
|
+
* Optional configuration for enabling GitHub authentication method.
|
|
192
|
+
* @type {AuthenticationConfigGitHub}
|
|
193
|
+
* @optional
|
|
194
|
+
*/
|
|
195
|
+
github?: AuthenticationConfigGitHub;
|
|
152
196
|
/**
|
|
153
197
|
* Optional configuration for the rules of the authentication.
|
|
154
198
|
* @type {AuthenticationConfigRules}
|