@junobuild/config 2.15.0 → 2.15.1-next-2026-04-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 +22 -54
- 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 +75 -66
- package/dist/types/index.d.ts +1 -0
- package/dist/types/satellite/configs/satellite.config.d.ts +77 -3
- package/dist/types/satellite/juno.config.d.ts +68 -0
- package/dist/types/types/cli.config.d.ts +6 -110
- package/dist/types/types/hosting.config.d.ts +149 -0
- package/dist/types/types/utility.types.d.ts +3 -0
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import * as z from 'zod';
|
|
|
3
3
|
import { type ApiConfig } from '../shared/api.config';
|
|
4
4
|
import { type AuthenticationConfig } from '../shared/authentication.config';
|
|
5
5
|
import { type StorageConfig } from '../shared/storage.config';
|
|
6
|
-
import { type
|
|
6
|
+
import { type HostingConfig } from '../types/hosting.config';
|
|
7
7
|
import { type JunoConfigMode } from '../types/juno.env';
|
|
8
8
|
import type { Either } from '../types/utility.types';
|
|
9
9
|
/**
|
|
@@ -46,6 +46,40 @@ export interface ConsoleIds {
|
|
|
46
46
|
* @see JunoConsoleConfig
|
|
47
47
|
*/
|
|
48
48
|
export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
49
|
+
hosting: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
source: z.ZodString;
|
|
51
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
53
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
54
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
55
|
+
replace: "replace";
|
|
56
|
+
both: "both";
|
|
57
|
+
}>>;
|
|
58
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
gzip: "gzip";
|
|
60
|
+
brotli: "brotli";
|
|
61
|
+
}>>;
|
|
62
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
63
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
64
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
65
|
+
replace: "replace";
|
|
66
|
+
both: "both";
|
|
67
|
+
}>>;
|
|
68
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
gzip: "gzip";
|
|
70
|
+
brotli: "brotli";
|
|
71
|
+
}>>;
|
|
72
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
73
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
74
|
+
identity: "identity";
|
|
75
|
+
gzip: "gzip";
|
|
76
|
+
compress: "compress";
|
|
77
|
+
deflate: "deflate";
|
|
78
|
+
br: "br";
|
|
79
|
+
}>], null>>>;
|
|
80
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
82
|
+
}, z.core.$strict>>;
|
|
49
83
|
storage: z.ZodOptional<z.ZodObject<{
|
|
50
84
|
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
51
85
|
source: z.ZodString;
|
|
@@ -99,40 +133,42 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
99
133
|
api: z.ZodOptional<z.ZodObject<{
|
|
100
134
|
url: z.ZodURL;
|
|
101
135
|
}, z.core.$strict>>;
|
|
102
|
-
source: z.ZodOptional<z.ZodString>;
|
|
103
|
-
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
104
|
-
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
105
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
106
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
107
|
-
replace: "replace";
|
|
108
|
-
both: "both";
|
|
109
|
-
}>>;
|
|
110
|
-
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
111
|
-
gzip: "gzip";
|
|
112
|
-
brotli: "brotli";
|
|
113
|
-
}>>;
|
|
114
|
-
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
115
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
116
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
117
|
-
replace: "replace";
|
|
118
|
-
both: "both";
|
|
119
|
-
}>>;
|
|
120
|
-
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
121
|
-
gzip: "gzip";
|
|
122
|
-
brotli: "brotli";
|
|
123
|
-
}>>;
|
|
124
|
-
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
125
|
-
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
126
|
-
identity: "identity";
|
|
127
|
-
gzip: "gzip";
|
|
128
|
-
compress: "compress";
|
|
129
|
-
deflate: "deflate";
|
|
130
|
-
br: "br";
|
|
131
|
-
}>], null>>>;
|
|
132
|
-
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
133
|
-
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
136
|
id: z.ZodString;
|
|
135
137
|
}, z.core.$strict>, z.ZodObject<{
|
|
138
|
+
hosting: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
source: z.ZodString;
|
|
140
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
142
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
143
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
replace: "replace";
|
|
145
|
+
both: "both";
|
|
146
|
+
}>>;
|
|
147
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
gzip: "gzip";
|
|
149
|
+
brotli: "brotli";
|
|
150
|
+
}>>;
|
|
151
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
152
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
153
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
154
|
+
replace: "replace";
|
|
155
|
+
both: "both";
|
|
156
|
+
}>>;
|
|
157
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
158
|
+
gzip: "gzip";
|
|
159
|
+
brotli: "brotli";
|
|
160
|
+
}>>;
|
|
161
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
162
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
163
|
+
identity: "identity";
|
|
164
|
+
gzip: "gzip";
|
|
165
|
+
compress: "compress";
|
|
166
|
+
deflate: "deflate";
|
|
167
|
+
br: "br";
|
|
168
|
+
}>], null>>>;
|
|
169
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
170
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
}, z.core.$strict>>;
|
|
136
172
|
storage: z.ZodOptional<z.ZodObject<{
|
|
137
173
|
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
138
174
|
source: z.ZodString;
|
|
@@ -186,45 +222,18 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
186
222
|
api: z.ZodOptional<z.ZodObject<{
|
|
187
223
|
url: z.ZodURL;
|
|
188
224
|
}, z.core.$strict>>;
|
|
189
|
-
source: z.ZodOptional<z.ZodString>;
|
|
190
|
-
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
|
-
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
192
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
193
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
194
|
-
replace: "replace";
|
|
195
|
-
both: "both";
|
|
196
|
-
}>>;
|
|
197
|
-
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
198
|
-
gzip: "gzip";
|
|
199
|
-
brotli: "brotli";
|
|
200
|
-
}>>;
|
|
201
|
-
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
202
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
203
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
204
|
-
replace: "replace";
|
|
205
|
-
both: "both";
|
|
206
|
-
}>>;
|
|
207
|
-
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
208
|
-
gzip: "gzip";
|
|
209
|
-
brotli: "brotli";
|
|
210
|
-
}>>;
|
|
211
|
-
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
212
|
-
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
213
|
-
identity: "identity";
|
|
214
|
-
gzip: "gzip";
|
|
215
|
-
compress: "compress";
|
|
216
|
-
deflate: "deflate";
|
|
217
|
-
br: "br";
|
|
218
|
-
}>], null>>>;
|
|
219
|
-
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
220
|
-
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
221
225
|
ids: z.ZodRecord<z.ZodUnion<readonly [z.ZodLiteral<"production">, z.ZodString]>, z.ZodString>;
|
|
222
226
|
}, z.core.$strict>]>;
|
|
223
227
|
/**
|
|
224
228
|
* Represents the configuration for a console.
|
|
225
229
|
* @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig
|
|
226
230
|
*/
|
|
227
|
-
export type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> &
|
|
231
|
+
export type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> & {
|
|
232
|
+
/**
|
|
233
|
+
* The optional configuration used by the tooling to deploy the assets of the Console.
|
|
234
|
+
* @type {HostingConfig}
|
|
235
|
+
*/
|
|
236
|
+
hosting?: HostingConfig;
|
|
228
237
|
/**
|
|
229
238
|
* Optional configuration parameters for the console, affecting the operational behavior of its Storage.
|
|
230
239
|
* @type {StorageConfig}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export * from './shared/feature.config';
|
|
|
22
22
|
export * from './shared/storage.config';
|
|
23
23
|
export * from './types/cli.config';
|
|
24
24
|
export * from './types/encoding';
|
|
25
|
+
export * from './types/hosting.config';
|
|
25
26
|
export * from './types/juno.env';
|
|
26
27
|
export * from './types/juno.package';
|
|
27
28
|
export type * from './types/utility.types';
|
|
@@ -4,6 +4,7 @@ import { type AuthenticationConfig } from '../../shared/authentication.config';
|
|
|
4
4
|
import { type AutomationConfig } from '../../shared/automation.config';
|
|
5
5
|
import { type StorageConfig } from '../../shared/storage.config';
|
|
6
6
|
import type { CliConfig } from '../../types/cli.config';
|
|
7
|
+
import { type HostingConfig } from '../../types/hosting.config';
|
|
7
8
|
import { type JunoConfigMode } from '../../types/juno.env';
|
|
8
9
|
import type { Either } from '../../types/utility.types';
|
|
9
10
|
import { type SatelliteAssertions } from './assertions.config';
|
|
@@ -56,6 +57,40 @@ export interface SatelliteIds {
|
|
|
56
57
|
* @see JunoConsoleConfig
|
|
57
58
|
*/
|
|
58
59
|
export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
60
|
+
hosting: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
source: z.ZodString;
|
|
62
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
64
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
65
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
66
|
+
replace: "replace";
|
|
67
|
+
both: "both";
|
|
68
|
+
}>>;
|
|
69
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
70
|
+
gzip: "gzip";
|
|
71
|
+
brotli: "brotli";
|
|
72
|
+
}>>;
|
|
73
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
74
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
75
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
replace: "replace";
|
|
77
|
+
both: "both";
|
|
78
|
+
}>>;
|
|
79
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
gzip: "gzip";
|
|
81
|
+
brotli: "brotli";
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
84
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
85
|
+
identity: "identity";
|
|
86
|
+
gzip: "gzip";
|
|
87
|
+
compress: "compress";
|
|
88
|
+
deflate: "deflate";
|
|
89
|
+
br: "br";
|
|
90
|
+
}>], null>>>;
|
|
91
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
92
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
93
|
+
}, z.core.$strict>>;
|
|
59
94
|
storage: z.ZodOptional<z.ZodObject<{
|
|
60
95
|
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
61
96
|
source: z.ZodString;
|
|
@@ -196,6 +231,40 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
196
231
|
}, z.core.$strict>>;
|
|
197
232
|
id: z.ZodString;
|
|
198
233
|
}, z.core.$strict>, z.ZodObject<{
|
|
234
|
+
hosting: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
source: z.ZodString;
|
|
236
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
237
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
238
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
239
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
replace: "replace";
|
|
241
|
+
both: "both";
|
|
242
|
+
}>>;
|
|
243
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
244
|
+
gzip: "gzip";
|
|
245
|
+
brotli: "brotli";
|
|
246
|
+
}>>;
|
|
247
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
248
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
249
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
250
|
+
replace: "replace";
|
|
251
|
+
both: "both";
|
|
252
|
+
}>>;
|
|
253
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
254
|
+
gzip: "gzip";
|
|
255
|
+
brotli: "brotli";
|
|
256
|
+
}>>;
|
|
257
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
258
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
259
|
+
identity: "identity";
|
|
260
|
+
gzip: "gzip";
|
|
261
|
+
compress: "compress";
|
|
262
|
+
deflate: "deflate";
|
|
263
|
+
br: "br";
|
|
264
|
+
}>], null>>>;
|
|
265
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
266
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
+
}, z.core.$strict>>;
|
|
199
268
|
storage: z.ZodOptional<z.ZodObject<{
|
|
200
269
|
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
201
270
|
source: z.ZodString;
|
|
@@ -354,6 +423,12 @@ export declare const SatelliteConfigOptionsSchema: z.ZodUnion<readonly [z.ZodObj
|
|
|
354
423
|
* @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.
|
|
355
424
|
*/
|
|
356
425
|
export interface SatelliteConfigOptions {
|
|
426
|
+
/**
|
|
427
|
+
* Optional configuration for deploying the assets of a frontend application to a satellite.
|
|
428
|
+
* @type {HostingConfig}
|
|
429
|
+
* @optional
|
|
430
|
+
*/
|
|
431
|
+
hosting?: HostingConfig;
|
|
357
432
|
/**
|
|
358
433
|
* Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.
|
|
359
434
|
* Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
|
|
@@ -405,9 +480,8 @@ export interface SatelliteConfigOptions {
|
|
|
405
480
|
/**
|
|
406
481
|
* Represents the configuration for a satellite.
|
|
407
482
|
*
|
|
408
|
-
* @typedef {Either<SatelliteId, SatelliteIds> &
|
|
483
|
+
* @typedef {Either<SatelliteId, SatelliteIds> & SatelliteConfigOptions} SatelliteConfig
|
|
409
484
|
* @property {SatelliteId | SatelliteIds} SatelliteId or SatelliteIds - Defines a unique Satellite or a collection of Satellites.
|
|
410
|
-
* @property {
|
|
411
|
-
* @property {SatelliteConfigOptions} SatelliteConfigOptions - Additional configuration options for the Satellite.
|
|
485
|
+
* @property {SatelliteConfigOptions} SatelliteConfigOptions - The configuration options for the Satellite.
|
|
412
486
|
*/
|
|
413
487
|
export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions;
|
|
@@ -8,6 +8,40 @@ import { type SatelliteConfig } from './configs/satellite.config';
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const JunoConfigSchema: z.ZodObject<{
|
|
10
10
|
satellite: z.ZodUnion<readonly [z.ZodObject<{
|
|
11
|
+
hosting: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
source: z.ZodString;
|
|
13
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
15
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
16
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
replace: "replace";
|
|
18
|
+
both: "both";
|
|
19
|
+
}>>;
|
|
20
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
gzip: "gzip";
|
|
22
|
+
brotli: "brotli";
|
|
23
|
+
}>>;
|
|
24
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
25
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
26
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
replace: "replace";
|
|
28
|
+
both: "both";
|
|
29
|
+
}>>;
|
|
30
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
gzip: "gzip";
|
|
32
|
+
brotli: "brotli";
|
|
33
|
+
}>>;
|
|
34
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
35
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
36
|
+
identity: "identity";
|
|
37
|
+
gzip: "gzip";
|
|
38
|
+
compress: "compress";
|
|
39
|
+
deflate: "deflate";
|
|
40
|
+
br: "br";
|
|
41
|
+
}>], null>>>;
|
|
42
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
}, z.core.$strict>>;
|
|
11
45
|
storage: z.ZodOptional<z.ZodObject<{
|
|
12
46
|
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
47
|
source: z.ZodString;
|
|
@@ -148,6 +182,40 @@ export declare const JunoConfigSchema: z.ZodObject<{
|
|
|
148
182
|
}, z.core.$strict>>;
|
|
149
183
|
id: z.ZodString;
|
|
150
184
|
}, z.core.$strict>, z.ZodObject<{
|
|
185
|
+
hosting: z.ZodOptional<z.ZodObject<{
|
|
186
|
+
source: z.ZodString;
|
|
187
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
188
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
189
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
190
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
replace: "replace";
|
|
192
|
+
both: "both";
|
|
193
|
+
}>>;
|
|
194
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
gzip: "gzip";
|
|
196
|
+
brotli: "brotli";
|
|
197
|
+
}>>;
|
|
198
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
199
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
200
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
201
|
+
replace: "replace";
|
|
202
|
+
both: "both";
|
|
203
|
+
}>>;
|
|
204
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
gzip: "gzip";
|
|
206
|
+
brotli: "brotli";
|
|
207
|
+
}>>;
|
|
208
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
209
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
210
|
+
identity: "identity";
|
|
211
|
+
gzip: "gzip";
|
|
212
|
+
compress: "compress";
|
|
213
|
+
deflate: "deflate";
|
|
214
|
+
br: "br";
|
|
215
|
+
}>], null>>>;
|
|
216
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
217
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
218
|
+
}, z.core.$strict>>;
|
|
151
219
|
storage: z.ZodOptional<z.ZodObject<{
|
|
152
220
|
headers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
153
221
|
source: z.ZodString;
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
import { type
|
|
3
|
-
|
|
4
|
-
* @see Precompress
|
|
5
|
-
*/
|
|
6
|
-
export declare const PrecompressSchema: z.ZodObject<{
|
|
7
|
-
pattern: z.ZodOptional<z.ZodString>;
|
|
8
|
-
mode: z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
replace: "replace";
|
|
10
|
-
both: "both";
|
|
11
|
-
}>>;
|
|
12
|
-
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
13
|
-
gzip: "gzip";
|
|
14
|
-
brotli: "brotli";
|
|
15
|
-
}>>;
|
|
16
|
-
}, z.core.$strict>;
|
|
2
|
+
import { type HostingConfig } from './hosting.config';
|
|
3
|
+
import type { Deprecated } from './utility.types';
|
|
17
4
|
/**
|
|
18
5
|
* @see CliConfig
|
|
6
|
+
* @deprecated use HostingConfigSchema
|
|
19
7
|
*/
|
|
20
8
|
export declare const CliConfigSchema: z.ZodObject<{
|
|
21
|
-
source: z.ZodOptional<z.ZodString>;
|
|
22
9
|
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
10
|
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
24
11
|
pattern: z.ZodOptional<z.ZodString>;
|
|
@@ -50,100 +37,9 @@ export declare const CliConfigSchema: z.ZodObject<{
|
|
|
50
37
|
}>], null>>>;
|
|
51
38
|
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
39
|
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
40
|
+
source: z.ZodOptional<z.ZodString>;
|
|
53
41
|
}, z.core.$strict>;
|
|
54
42
|
/**
|
|
55
|
-
*
|
|
56
|
-
*/
|
|
57
|
-
export interface Precompress {
|
|
58
|
-
/**
|
|
59
|
-
* Glob pattern for files to precompress.
|
|
60
|
-
* @default any css|js|mjs|html
|
|
61
|
-
*/
|
|
62
|
-
pattern?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Determines what happens to the original files after compression:
|
|
65
|
-
* - `"both"` — upload both original and compressed versions.
|
|
66
|
-
* - `"replace"` — upload only the compressed version (served with `Content-Encoding`).
|
|
67
|
-
*
|
|
68
|
-
* @default "both"
|
|
69
|
-
*/
|
|
70
|
-
mode?: 'both' | 'replace';
|
|
71
|
-
/**
|
|
72
|
-
* Compression algorithm.
|
|
73
|
-
* @default "gzip"
|
|
74
|
-
*/
|
|
75
|
-
algorithm?: 'gzip' | 'brotli';
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* The configuration used by the CLI to resolve, prepare and deploy your app.
|
|
43
|
+
* @deprecated use HostingConfig
|
|
79
44
|
*/
|
|
80
|
-
export
|
|
81
|
-
/**
|
|
82
|
-
* Specifies the directory from which to deploy to Storage.
|
|
83
|
-
* For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.
|
|
84
|
-
*
|
|
85
|
-
* @default 'build'
|
|
86
|
-
* @type {string}
|
|
87
|
-
*/
|
|
88
|
-
source?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.
|
|
91
|
-
* @type {string[]}
|
|
92
|
-
* @optional
|
|
93
|
-
*/
|
|
94
|
-
ignore?: string[];
|
|
95
|
-
/**
|
|
96
|
-
* Controls compression optimization for files in the source folder.
|
|
97
|
-
*
|
|
98
|
-
* By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)
|
|
99
|
-
* are compressed, and both the original and compressed versions are uploaded.
|
|
100
|
-
*
|
|
101
|
-
* Set to `false` to disable, or provide one or more {@link Precompress} objects to customize.
|
|
102
|
-
*
|
|
103
|
-
* @type {Precompress | Precompress[] | false}
|
|
104
|
-
* @optional
|
|
105
|
-
*/
|
|
106
|
-
precompress?: Precompress | Precompress[] | false;
|
|
107
|
-
/**
|
|
108
|
-
* Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:
|
|
109
|
-
* - `.Z` for compress,
|
|
110
|
-
* - `.gz` for gzip,
|
|
111
|
-
* - `.br` for brotli,
|
|
112
|
-
* - `.zlib` for deflate,
|
|
113
|
-
* - anything else defaults to `identity`.
|
|
114
|
-
* The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types.
|
|
115
|
-
* @type {Array<[string, EncodingType]>}
|
|
116
|
-
* @optional
|
|
117
|
-
*/
|
|
118
|
-
encoding?: Array<[string, EncodingType]>;
|
|
119
|
-
/**
|
|
120
|
-
* Defines a list of scripts or commands to be run before the deployment process begins.
|
|
121
|
-
* This can be useful for tasks such as compiling assets, running tests, or building production-ready files.
|
|
122
|
-
*
|
|
123
|
-
* Example:
|
|
124
|
-
* ```json
|
|
125
|
-
* {
|
|
126
|
-
* "predeploy": ["npm run build", "npm run lint"]
|
|
127
|
-
* }
|
|
128
|
-
* ```
|
|
129
|
-
*
|
|
130
|
-
* @type {string[]}
|
|
131
|
-
* @optional
|
|
132
|
-
*/
|
|
133
|
-
predeploy?: string[];
|
|
134
|
-
/**
|
|
135
|
-
* Defines a list of scripts or commands to be run after the deployment process completes.
|
|
136
|
-
* This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.
|
|
137
|
-
*
|
|
138
|
-
* Example:
|
|
139
|
-
* ```json
|
|
140
|
-
* {
|
|
141
|
-
* "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"]
|
|
142
|
-
* }
|
|
143
|
-
* ```
|
|
144
|
-
*
|
|
145
|
-
* @type {string[]}
|
|
146
|
-
* @optional
|
|
147
|
-
*/
|
|
148
|
-
postdeploy?: string[];
|
|
149
|
-
}
|
|
45
|
+
export type CliConfig = Deprecated<HostingConfig>;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { type EncodingType } from './encoding';
|
|
3
|
+
/**
|
|
4
|
+
* @see Precompress
|
|
5
|
+
*/
|
|
6
|
+
export declare const PrecompressSchema: z.ZodObject<{
|
|
7
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
8
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
replace: "replace";
|
|
10
|
+
both: "both";
|
|
11
|
+
}>>;
|
|
12
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
gzip: "gzip";
|
|
14
|
+
brotli: "brotli";
|
|
15
|
+
}>>;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
/**
|
|
18
|
+
* @see HostingConfig
|
|
19
|
+
*/
|
|
20
|
+
export declare const HostingConfigSchema: z.ZodObject<{
|
|
21
|
+
source: z.ZodString;
|
|
22
|
+
ignore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
precompress: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
24
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
25
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
replace: "replace";
|
|
27
|
+
both: "both";
|
|
28
|
+
}>>;
|
|
29
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
30
|
+
gzip: "gzip";
|
|
31
|
+
brotli: "brotli";
|
|
32
|
+
}>>;
|
|
33
|
+
}, z.core.$strict>, z.ZodArray<z.ZodObject<{
|
|
34
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
35
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
replace: "replace";
|
|
37
|
+
both: "both";
|
|
38
|
+
}>>;
|
|
39
|
+
algorithm: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
gzip: "gzip";
|
|
41
|
+
brotli: "brotli";
|
|
42
|
+
}>>;
|
|
43
|
+
}, z.core.$strict>>, z.ZodLiteral<false>]>>;
|
|
44
|
+
encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
|
|
45
|
+
identity: "identity";
|
|
46
|
+
gzip: "gzip";
|
|
47
|
+
compress: "compress";
|
|
48
|
+
deflate: "deflate";
|
|
49
|
+
br: "br";
|
|
50
|
+
}>], null>>>;
|
|
51
|
+
predeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
52
|
+
postdeploy: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
/**
|
|
55
|
+
* Configuration for compressing files during deployment.
|
|
56
|
+
*/
|
|
57
|
+
export interface Precompress {
|
|
58
|
+
/**
|
|
59
|
+
* Glob pattern for files to precompress.
|
|
60
|
+
* @default any css|js|mjs|html
|
|
61
|
+
*/
|
|
62
|
+
pattern?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Determines what happens to the original files after compression:
|
|
65
|
+
* - `"both"` — upload both original and compressed versions.
|
|
66
|
+
* - `"replace"` — upload only the compressed version (served with `Content-Encoding`).
|
|
67
|
+
*
|
|
68
|
+
* @default "both"
|
|
69
|
+
*/
|
|
70
|
+
mode?: 'both' | 'replace';
|
|
71
|
+
/**
|
|
72
|
+
* Compression algorithm.
|
|
73
|
+
* @default "gzip"
|
|
74
|
+
*/
|
|
75
|
+
algorithm?: 'gzip' | 'brotli';
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The configuration used by the CLI to resolve, prepare and deploy your app to the hosting.
|
|
79
|
+
*/
|
|
80
|
+
export interface HostingConfig {
|
|
81
|
+
/**
|
|
82
|
+
* Specifies the directory from which to deploy to Storage.
|
|
83
|
+
* For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.
|
|
84
|
+
*
|
|
85
|
+
* @default 'build'
|
|
86
|
+
* @type {string}
|
|
87
|
+
*/
|
|
88
|
+
source: string;
|
|
89
|
+
/**
|
|
90
|
+
* Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.
|
|
91
|
+
* @type {string[]}
|
|
92
|
+
* @optional
|
|
93
|
+
*/
|
|
94
|
+
ignore?: string[];
|
|
95
|
+
/**
|
|
96
|
+
* Controls compression optimization for files in the source folder.
|
|
97
|
+
*
|
|
98
|
+
* By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)
|
|
99
|
+
* are compressed, and both the original and compressed versions are uploaded.
|
|
100
|
+
*
|
|
101
|
+
* Set to `false` to disable, or provide one or more {@link Precompress} objects to customize.
|
|
102
|
+
*
|
|
103
|
+
* @type {Precompress | Precompress[] | false}
|
|
104
|
+
* @optional
|
|
105
|
+
*/
|
|
106
|
+
precompress?: Precompress | Precompress[] | false;
|
|
107
|
+
/**
|
|
108
|
+
* Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:
|
|
109
|
+
* - `.Z` for compress,
|
|
110
|
+
* - `.gz` for gzip,
|
|
111
|
+
* - `.br` for brotli,
|
|
112
|
+
* - `.zlib` for deflate,
|
|
113
|
+
* - anything else defaults to `identity`.
|
|
114
|
+
* The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types.
|
|
115
|
+
* @type {Array<[string, EncodingType]>}
|
|
116
|
+
* @optional
|
|
117
|
+
*/
|
|
118
|
+
encoding?: Array<[string, EncodingType]>;
|
|
119
|
+
/**
|
|
120
|
+
* Defines a list of scripts or commands to be run before the deployment process begins.
|
|
121
|
+
* This can be useful for tasks such as compiling assets, running tests, or building production-ready files.
|
|
122
|
+
*
|
|
123
|
+
* Example:
|
|
124
|
+
* ```json
|
|
125
|
+
* {
|
|
126
|
+
* "predeploy": ["npm run build", "npm run lint"]
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
130
|
+
* @type {string[]}
|
|
131
|
+
* @optional
|
|
132
|
+
*/
|
|
133
|
+
predeploy?: string[];
|
|
134
|
+
/**
|
|
135
|
+
* Defines a list of scripts or commands to be run after the deployment process completes.
|
|
136
|
+
* This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.
|
|
137
|
+
*
|
|
138
|
+
* Example:
|
|
139
|
+
* ```json
|
|
140
|
+
* {
|
|
141
|
+
* "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"]
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @type {string[]}
|
|
146
|
+
* @optional
|
|
147
|
+
*/
|
|
148
|
+
postdeploy?: string[];
|
|
149
|
+
}
|