@junobuild/config 0.0.8 → 0.0.10
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 +49 -19
- 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/config.d.ts +7 -0
- package/dist/types/console/console.config.d.ts +40 -0
- package/dist/types/index.d.ts +12 -9
- package/dist/types/{dev → satellite/dev}/juno.dev.config.d.ts +20 -4
- package/dist/types/{mainnet → satellite/mainnet}/config.d.ts +1 -1
- package/dist/types/{mainnet → satellite/mainnet}/satellite.config.d.ts +4 -37
- package/dist/types/{mainnet → satellite/mainnet}/storage.config.d.ts +15 -1
- package/dist/types/types/cli.config.d.ts +36 -0
- package/package.json +1 -1
- /package/dist/types/{dev → satellite/dev}/config.d.ts +0 -0
- /package/dist/types/{mainnet → satellite/mainnet}/authentication.config.d.ts +0 -0
- /package/dist/types/{mainnet → satellite/mainnet}/juno.config.d.ts +0 -0
- /package/dist/types/{types → satellite/types}/rules.d.ts +0 -0
- /package/dist/types/{mainnet → types}/juno.env.d.ts +0 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ Configuration options for [Juno] CLI.
|
|
|
25
25
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
26
|
| `defineDevConfig` | `{ (config: JunoDevConfig): JunoDevConfig; (config: JunoDevConfigFn): JunoDevConfigFn; (config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject; }` |
|
|
27
27
|
|
|
28
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L7)
|
|
28
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L7)
|
|
29
29
|
|
|
30
30
|
#### :gear: defineDevConfig
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ Configuration options for [Juno] CLI.
|
|
|
33
33
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
34
|
| `defineDevConfig` | `{ (config: JunoDevConfig): JunoDevConfig; (config: JunoDevConfigFn): JunoDevConfigFn; (config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject; }` |
|
|
35
35
|
|
|
36
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L8)
|
|
36
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L8)
|
|
37
37
|
|
|
38
38
|
#### :gear: defineDevConfig
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ Configuration options for [Juno] CLI.
|
|
|
41
41
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
42
|
| `defineDevConfig` | `{ (config: JunoDevConfig): JunoDevConfig; (config: JunoDevConfigFn): JunoDevConfigFn; (config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject; }` |
|
|
43
43
|
|
|
44
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L9)
|
|
44
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L9)
|
|
45
45
|
|
|
46
46
|
#### :gear: defineDevConfig
|
|
47
47
|
|
|
@@ -49,10 +49,11 @@ Configuration options for [Juno] CLI.
|
|
|
49
49
|
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
50
|
| `defineDevConfig` | `{ (config: JunoDevConfig): JunoDevConfig; (config: JunoDevConfigFn): JunoDevConfigFn; (config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject; }` |
|
|
51
51
|
|
|
52
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L10)
|
|
52
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L10)
|
|
53
53
|
|
|
54
54
|
### :tropical_drink: Interfaces
|
|
55
55
|
|
|
56
|
+
- [CliConfig](#gear-cliconfig)
|
|
56
57
|
- [JunoConfigEnv](#gear-junoconfigenv)
|
|
57
58
|
- [OrbiterConfig](#gear-orbiterconfig)
|
|
58
59
|
- [JunoConfig](#gear-junoconfig)
|
|
@@ -61,6 +62,15 @@ Configuration options for [Juno] CLI.
|
|
|
61
62
|
- [SatelliteDevConfig](#gear-satellitedevconfig)
|
|
62
63
|
- [JunoDevConfig](#gear-junodevconfig)
|
|
63
64
|
|
|
65
|
+
#### :gear: CliConfig
|
|
66
|
+
|
|
67
|
+
| Property | Type | Description |
|
|
68
|
+
| ---------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
|
|
69
|
+
| `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} |
|
|
70
|
+
| `ignore` | `string[] or undefined` | Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore. type: {string[]}optional |
|
|
71
|
+
| `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 |
|
|
72
|
+
| `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 |
|
|
73
|
+
|
|
64
74
|
#### :gear: JunoConfigEnv
|
|
65
75
|
|
|
66
76
|
Represents the environment configuration for Juno.
|
|
@@ -91,10 +101,11 @@ Represents the overall configuration for Juno.
|
|
|
91
101
|
|
|
92
102
|
Represents the collections configuration for a satellite in a development environment.
|
|
93
103
|
|
|
94
|
-
| Property
|
|
95
|
-
|
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
104
|
+
| Property | Type | Description |
|
|
105
|
+
| ----------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
106
|
+
| `datastore` | `SatelliteDevDataStoreCollection[] or undefined` | The datastore collections configuration. type: {SatelliteDevDataStoreCollection[]}optional |
|
|
107
|
+
| `db` | `SatelliteDevDataStoreCollection[] or undefined` | The datastore collections configuration.This property is deprecated. Use {@link datastore} instead. deprecatedtype: {SatelliteDevDbCollection[]} |
|
|
108
|
+
| `storage` | `SatelliteDevStorageCollection[] or undefined` | The storage collections configuration. type: {SatelliteDevStorageCollection[]}optional |
|
|
98
109
|
|
|
99
110
|
#### :gear: SatelliteDevController
|
|
100
111
|
|
|
@@ -126,6 +137,7 @@ Represents the development configuration for Juno.
|
|
|
126
137
|
|
|
127
138
|
- [ENCODING_TYPE](#gear-encoding_type)
|
|
128
139
|
- [JunoConfigMode](#gear-junoconfigmode)
|
|
140
|
+
- [SatelliteDevDataStoreCollection](#gear-satellitedevdatastorecollection)
|
|
129
141
|
- [SatelliteDevDbCollection](#gear-satellitedevdbcollection)
|
|
130
142
|
- [SatelliteDevStorageCollection](#gear-satellitedevstoragecollection)
|
|
131
143
|
- [JunoDevConfigFn](#gear-junodevconfigfn)
|
|
@@ -145,23 +157,41 @@ Represents the development configuration for Juno.
|
|
|
145
157
|
| ---------------- | ------------------------ |
|
|
146
158
|
| `JunoConfigMode` | `'production' or string` |
|
|
147
159
|
|
|
148
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/
|
|
160
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L5)
|
|
161
|
+
|
|
162
|
+
#### :gear: SatelliteDevDataStoreCollection
|
|
163
|
+
|
|
164
|
+
| Type | Type |
|
|
165
|
+
| --------------------------------- | ------ |
|
|
166
|
+
| `SatelliteDevDataStoreCollection` | `Omit< |
|
|
167
|
+
|
|
168
|
+
Rule,
|
|
169
|
+
'createdAt' or 'updatedAt' or 'maxSize' or 'version'
|
|
170
|
+
|
|
171
|
+
> ` |
|
|
172
|
+
|
|
173
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L7)
|
|
149
174
|
|
|
150
175
|
#### :gear: SatelliteDevDbCollection
|
|
151
176
|
|
|
152
|
-
| Type | Type
|
|
153
|
-
| -------------------------- |
|
|
154
|
-
| `SatelliteDevDbCollection` | `
|
|
177
|
+
| Type | Type |
|
|
178
|
+
| -------------------------- | --------------------------------- |
|
|
179
|
+
| `SatelliteDevDbCollection` | `SatelliteDevDataStoreCollection` |
|
|
155
180
|
|
|
156
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/juno.dev.config.ts#
|
|
181
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L19)
|
|
157
182
|
|
|
158
183
|
#### :gear: SatelliteDevStorageCollection
|
|
159
184
|
|
|
160
|
-
| Type | Type
|
|
161
|
-
| ------------------------------- |
|
|
162
|
-
| `SatelliteDevStorageCollection` | `Omit<
|
|
185
|
+
| Type | Type |
|
|
186
|
+
| ------------------------------- | ------ |
|
|
187
|
+
| `SatelliteDevStorageCollection` | `Omit< |
|
|
188
|
+
|
|
189
|
+
Rule,
|
|
190
|
+
'createdAt' or 'updatedAt' or 'maxCapacity' or 'version'
|
|
191
|
+
|
|
192
|
+
> ` |
|
|
163
193
|
|
|
164
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/juno.dev.config.ts#
|
|
194
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L25)
|
|
165
195
|
|
|
166
196
|
#### :gear: JunoDevConfigFn
|
|
167
197
|
|
|
@@ -169,7 +199,7 @@ Represents the development configuration for Juno.
|
|
|
169
199
|
| ----------------- | --------------------- |
|
|
170
200
|
| `JunoDevConfigFn` | `() => JunoDevConfig` |
|
|
171
201
|
|
|
172
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L3)
|
|
202
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L3)
|
|
173
203
|
|
|
174
204
|
#### :gear: JunoDevConfigFnOrObject
|
|
175
205
|
|
|
@@ -177,7 +207,7 @@ Represents the development configuration for Juno.
|
|
|
177
207
|
| ------------------------- | ---------------------------------- |
|
|
178
208
|
| `JunoDevConfigFnOrObject` | `JunoDevConfig or JunoDevConfigFn` |
|
|
179
209
|
|
|
180
|
-
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L5)
|
|
210
|
+
[:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L5)
|
|
181
211
|
|
|
182
212
|
<!-- TSDOC_END -->
|
|
183
213
|
|
package/dist/browser/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function o(
|
|
1
|
+
function n(o){return o}function i(o){return o}function t(o){return o}export{t as defineConfig,n as defineConsoleConfig,i as defineDevConfig};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/dev/config.ts", "../../src/mainnet/config.ts"],
|
|
4
|
-
"sourcesContent": ["import type {JunoDevConfig} from './juno.dev.config';\n\nexport type JunoDevConfigFn = () => JunoDevConfig;\n\nexport type JunoDevConfigFnOrObject = JunoDevConfig | JunoDevConfigFn;\n\nexport function defineDevConfig(config: JunoDevConfig): JunoDevConfig;\nexport function defineDevConfig(config: JunoDevConfigFn): JunoDevConfigFn;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject {\n return config;\n}\n", "import type {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["defineDevConfig", "config", "defineConfig", "config"]
|
|
3
|
+
"sources": ["../../src/console/config.ts", "../../src/satellite/dev/config.ts", "../../src/satellite/mainnet/config.ts"],
|
|
4
|
+
"sourcesContent": ["import type {JunoConfigEnv} from '../types/juno.env';\nimport type {JunoConsoleConfig} from './console.config';\n\nexport type JunoConsoleConfigFn = (config: JunoConfigEnv) => JunoConsoleConfig;\n\nexport type JunoConsoleConfigFnOrObject = JunoConsoleConfig | JunoConsoleConfigFn;\n\nexport function defineConsoleConfig(config: JunoConsoleConfig): JunoConsoleConfig;\nexport function defineConsoleConfig(config: JunoConsoleConfigFn): JunoConsoleConfigFn;\nexport function defineConsoleConfig(\n config: JunoConsoleConfigFnOrObject\n): JunoConsoleConfigFnOrObject;\nexport function defineConsoleConfig(\n config: JunoConsoleConfigFnOrObject\n): JunoConsoleConfigFnOrObject {\n return config;\n}\n", "import type {JunoDevConfig} from './juno.dev.config';\n\nexport type JunoDevConfigFn = () => JunoDevConfig;\n\nexport type JunoDevConfigFnOrObject = JunoDevConfig | JunoDevConfigFn;\n\nexport function defineDevConfig(config: JunoDevConfig): JunoDevConfig;\nexport function defineDevConfig(config: JunoDevConfigFn): JunoDevConfigFn;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject {\n return config;\n}\n", "import type {JunoConfigEnv} from '../../types/juno.env';\nimport type {JunoConfig} from './juno.config';\n\nexport type JunoConfigFn = (config: JunoConfigEnv) => JunoConfig;\n\nexport type JunoConfigFnOrObject = JunoConfig | JunoConfigFn;\n\nexport function defineConfig(config: JunoConfig): JunoConfig;\nexport function defineConfig(config: JunoConfigFn): JunoConfigFn;\nexport function defineConfig(config: JunoConfigFnOrObject): JunoConfigFnOrObject;\nexport function defineConfig(config: JunoConfigFnOrObject): JunoConfigFnOrObject {\n return config;\n}\n"],
|
|
5
|
+
"mappings": "AAYO,SAASA,EACdC,EAC6B,CAC7B,OAAOA,CACT,CCPO,SAASC,EAAgBC,EAA0D,CACxF,OAAOA,CACT,CCDO,SAASC,EAAaC,EAAoD,CAC/E,OAAOA,CACT",
|
|
6
|
+
"names": ["defineConsoleConfig", "config", "defineDevConfig", "config", "defineConfig", "config"]
|
|
7
7
|
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire as topLevelCreateRequire } from 'module';
|
|
2
2
|
const require = topLevelCreateRequire(import.meta.url);
|
|
3
|
-
function o(
|
|
3
|
+
function n(o){return o}function i(o){return o}function t(o){return o}export{t as defineConfig,n as defineConsoleConfig,i as defineDevConfig};
|
|
4
4
|
//# sourceMappingURL=index.mjs.map
|
package/dist/node/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/dev/config.ts", "../../src/mainnet/config.ts"],
|
|
4
|
-
"sourcesContent": ["import type {JunoDevConfig} from './juno.dev.config';\n\nexport type JunoDevConfigFn = () => JunoDevConfig;\n\nexport type JunoDevConfigFnOrObject = JunoDevConfig | JunoDevConfigFn;\n\nexport function defineDevConfig(config: JunoDevConfig): JunoDevConfig;\nexport function defineDevConfig(config: JunoDevConfigFn): JunoDevConfigFn;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject {\n return config;\n}\n", "import type {
|
|
5
|
-
"mappings": ";;
|
|
6
|
-
"names": ["defineDevConfig", "config", "defineConfig", "config"]
|
|
3
|
+
"sources": ["../../src/console/config.ts", "../../src/satellite/dev/config.ts", "../../src/satellite/mainnet/config.ts"],
|
|
4
|
+
"sourcesContent": ["import type {JunoConfigEnv} from '../types/juno.env';\nimport type {JunoConsoleConfig} from './console.config';\n\nexport type JunoConsoleConfigFn = (config: JunoConfigEnv) => JunoConsoleConfig;\n\nexport type JunoConsoleConfigFnOrObject = JunoConsoleConfig | JunoConsoleConfigFn;\n\nexport function defineConsoleConfig(config: JunoConsoleConfig): JunoConsoleConfig;\nexport function defineConsoleConfig(config: JunoConsoleConfigFn): JunoConsoleConfigFn;\nexport function defineConsoleConfig(\n config: JunoConsoleConfigFnOrObject\n): JunoConsoleConfigFnOrObject;\nexport function defineConsoleConfig(\n config: JunoConsoleConfigFnOrObject\n): JunoConsoleConfigFnOrObject {\n return config;\n}\n", "import type {JunoDevConfig} from './juno.dev.config';\n\nexport type JunoDevConfigFn = () => JunoDevConfig;\n\nexport type JunoDevConfigFnOrObject = JunoDevConfig | JunoDevConfigFn;\n\nexport function defineDevConfig(config: JunoDevConfig): JunoDevConfig;\nexport function defineDevConfig(config: JunoDevConfigFn): JunoDevConfigFn;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject;\nexport function defineDevConfig(config: JunoDevConfigFnOrObject): JunoDevConfigFnOrObject {\n return config;\n}\n", "import type {JunoConfigEnv} from '../../types/juno.env';\nimport type {JunoConfig} from './juno.config';\n\nexport type JunoConfigFn = (config: JunoConfigEnv) => JunoConfig;\n\nexport type JunoConfigFnOrObject = JunoConfig | JunoConfigFn;\n\nexport function defineConfig(config: JunoConfig): JunoConfig;\nexport function defineConfig(config: JunoConfigFn): JunoConfigFn;\nexport function defineConfig(config: JunoConfigFnOrObject): JunoConfigFnOrObject;\nexport function defineConfig(config: JunoConfigFnOrObject): JunoConfigFnOrObject {\n return config;\n}\n"],
|
|
5
|
+
"mappings": ";;AAYO,SAASA,EACdC,EAC6B,CAC7B,OAAOA,CACT,CCPO,SAASC,EAAgBC,EAA0D,CACxF,OAAOA,CACT,CCDO,SAASC,EAAaC,EAAoD,CAC/E,OAAOA,CACT",
|
|
6
|
+
"names": ["defineConsoleConfig", "config", "defineDevConfig", "config", "defineConfig", "config"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { JunoConfigEnv } from '../types/juno.env';
|
|
2
|
+
import type { JunoConsoleConfig } from './console.config';
|
|
3
|
+
export type JunoConsoleConfigFn = (config: JunoConfigEnv) => JunoConsoleConfig;
|
|
4
|
+
export type JunoConsoleConfigFnOrObject = JunoConsoleConfig | JunoConsoleConfigFn;
|
|
5
|
+
export declare function defineConsoleConfig(config: JunoConsoleConfig): JunoConsoleConfig;
|
|
6
|
+
export declare function defineConsoleConfig(config: JunoConsoleConfigFn): JunoConsoleConfigFn;
|
|
7
|
+
export declare function defineConsoleConfig(config: JunoConsoleConfigFnOrObject): JunoConsoleConfigFnOrObject;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { StorageConfig } from '../satellite/mainnet/storage.config';
|
|
2
|
+
import type { CliConfig } from '../types/cli.config';
|
|
3
|
+
import type { JunoConfigMode } from '../types/juno.env';
|
|
4
|
+
import type { Either } from '../utils/ts.utils';
|
|
5
|
+
/**
|
|
6
|
+
* Represents the unique identifier for a console.
|
|
7
|
+
* @interface ConsoleId
|
|
8
|
+
*/
|
|
9
|
+
export interface ConsoleId {
|
|
10
|
+
/**
|
|
11
|
+
* The unique identifier (ID) of the console.
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Represents a mapping of console identifiers to different configurations based on the mode of the application.
|
|
18
|
+
* @interface ConsoleIds
|
|
19
|
+
*/
|
|
20
|
+
export interface ConsoleIds {
|
|
21
|
+
/**
|
|
22
|
+
* A mapping of console identifiers (IDs) to different configurations based on the mode of the application.
|
|
23
|
+
*
|
|
24
|
+
* This allows the application to use different console IDs, such as production, staging, etc.
|
|
25
|
+
* @type {Record<JunoConfigMode, string>}
|
|
26
|
+
*/
|
|
27
|
+
ids: Record<JunoConfigMode, string>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Represents the configuration for a console.
|
|
31
|
+
* @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig
|
|
32
|
+
*/
|
|
33
|
+
export type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> & CliConfig & {
|
|
34
|
+
/**
|
|
35
|
+
* Optional configuration parameters for the console, affecting the operational behavior of its Storage.
|
|
36
|
+
* @type {StorageConfig}
|
|
37
|
+
* @optional
|
|
38
|
+
*/
|
|
39
|
+
storage?: StorageConfig;
|
|
40
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export type * from './
|
|
2
|
-
export type * from './
|
|
3
|
-
export type * from './mainnet/
|
|
4
|
-
export type * from './mainnet/juno.
|
|
5
|
-
export type * from './mainnet/satellite.config';
|
|
6
|
-
export type * from './mainnet/storage.config';
|
|
1
|
+
export type * from './console/console.config';
|
|
2
|
+
export type * from './satellite/dev/juno.dev.config';
|
|
3
|
+
export type * from './satellite/mainnet/authentication.config';
|
|
4
|
+
export type * from './satellite/mainnet/juno.config';
|
|
5
|
+
export type * from './satellite/mainnet/satellite.config';
|
|
6
|
+
export type * from './satellite/mainnet/storage.config';
|
|
7
|
+
export type * from './satellite/types/rules';
|
|
8
|
+
export type * from './types/cli.config';
|
|
7
9
|
export type * from './types/encoding';
|
|
8
|
-
export type * from './types/
|
|
10
|
+
export type * from './types/juno.env';
|
|
9
11
|
export type * from './utils/ts.utils';
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
+
export * from './console/config';
|
|
13
|
+
export * from './satellite/dev/config';
|
|
14
|
+
export * from './satellite/mainnet/config';
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { Rule } from '../types/rules';
|
|
2
2
|
/**
|
|
3
3
|
* Represents a database collection configuration for a satellite in a development environment.
|
|
4
|
-
* @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize' | 'version'>}
|
|
4
|
+
* @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize' | 'version'>} SatelliteDevDataStoreCollection
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type SatelliteDevDataStoreCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize' | 'version'>;
|
|
7
|
+
/**
|
|
8
|
+
* This type is an alias for SatelliteDevDataStoreCollection and is now deprecated.
|
|
9
|
+
*
|
|
10
|
+
* @see SatelliteDevDataStoreCollection
|
|
11
|
+
* @deprecated Use {@link SatelliteDevDataStoreCollection} instead.
|
|
12
|
+
* @typedef {SatelliteDevDataStoreCollection} SatelliteDevDbCollection
|
|
13
|
+
*/
|
|
14
|
+
export type SatelliteDevDbCollection = SatelliteDevDataStoreCollection;
|
|
7
15
|
/**
|
|
8
16
|
* Represents a storage collection configuration for a satellite in a development environment.
|
|
9
17
|
* @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity' | 'version'>} SatelliteDevStorageCollection
|
|
@@ -15,10 +23,18 @@ export type SatelliteDevStorageCollection = Omit<Rule, 'createdAt' | 'updatedAt'
|
|
|
15
23
|
*/
|
|
16
24
|
export interface SatelliteDevCollections {
|
|
17
25
|
/**
|
|
18
|
-
* The
|
|
19
|
-
* @type {
|
|
26
|
+
* The datastore collections configuration.
|
|
27
|
+
* @type {SatelliteDevDataStoreCollection[]}
|
|
20
28
|
* @optional
|
|
21
29
|
*/
|
|
30
|
+
datastore?: SatelliteDevDataStoreCollection[];
|
|
31
|
+
/**
|
|
32
|
+
* The datastore collections configuration.
|
|
33
|
+
* This property is deprecated. Use {@link datastore} instead.
|
|
34
|
+
*
|
|
35
|
+
* @deprecated
|
|
36
|
+
* @type {SatelliteDevDbCollection[]}
|
|
37
|
+
*/
|
|
22
38
|
db?: SatelliteDevDbCollection[];
|
|
23
39
|
/**
|
|
24
40
|
* The storage collections configuration.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { JunoConfigEnv } from '../../types/juno.env';
|
|
1
2
|
import type { JunoConfig } from './juno.config';
|
|
2
|
-
import type { JunoConfigEnv } from './juno.env';
|
|
3
3
|
export type JunoConfigFn = (config: JunoConfigEnv) => JunoConfig;
|
|
4
4
|
export type JunoConfigFnOrObject = JunoConfig | JunoConfigFn;
|
|
5
5
|
export declare function defineConfig(config: JunoConfig): JunoConfig;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { CliConfig } from '../../types/cli.config';
|
|
2
|
+
import type { JunoConfigMode } from '../../types/juno.env';
|
|
3
|
+
import type { Either } from '../../utils/ts.utils';
|
|
3
4
|
import type { AuthenticationConfig } from './authentication.config';
|
|
4
|
-
import type { JunoConfigMode } from './juno.env';
|
|
5
5
|
import type { StorageConfig } from './storage.config';
|
|
6
6
|
/**
|
|
7
7
|
* Configuration for satellite assertions.
|
|
@@ -59,15 +59,7 @@ export interface SatelliteIds {
|
|
|
59
59
|
* Represents the configuration for a satellite.
|
|
60
60
|
* @typedef {Either<SatelliteId, SatelliteIds>} SatelliteConfig
|
|
61
61
|
*/
|
|
62
|
-
export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & {
|
|
63
|
-
/**
|
|
64
|
-
* Specifies the directory from which to deploy to storage.
|
|
65
|
-
* For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.
|
|
66
|
-
*
|
|
67
|
-
* @default 'build'
|
|
68
|
-
* @type {string}
|
|
69
|
-
*/
|
|
70
|
-
source?: string;
|
|
62
|
+
export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & CliConfig & {
|
|
71
63
|
/**
|
|
72
64
|
* Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.
|
|
73
65
|
* Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.
|
|
@@ -82,31 +74,6 @@ export type SatelliteConfig = Either<SatelliteId, SatelliteIds> & {
|
|
|
82
74
|
* @optional
|
|
83
75
|
*/
|
|
84
76
|
authentication?: AuthenticationConfig;
|
|
85
|
-
/**
|
|
86
|
-
* Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.
|
|
87
|
-
* @type {string[]}
|
|
88
|
-
* @optional
|
|
89
|
-
*/
|
|
90
|
-
ignore?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* Controls the Gzip compression optimization for files in the source folder. By default, it targets JavaScript (js), ES Module (mjs), and CSS (css) files.
|
|
93
|
-
* You can disable this by setting it to `false` or customize it with a different file matching pattern using glob syntax.
|
|
94
|
-
* @type {string | false}
|
|
95
|
-
* @optional
|
|
96
|
-
*/
|
|
97
|
-
gzip?: string | false;
|
|
98
|
-
/**
|
|
99
|
-
* Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:
|
|
100
|
-
* - `.Z` for compress,
|
|
101
|
-
* - `.gz` for gzip,
|
|
102
|
-
* - `.br` for brotli,
|
|
103
|
-
* - `.zlib` for deflate,
|
|
104
|
-
* - anything else defaults to `identity`.
|
|
105
|
-
* The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types.
|
|
106
|
-
* @type {Array<[string, ENCODING_TYPE]>}
|
|
107
|
-
* @optional
|
|
108
|
-
*/
|
|
109
|
-
encoding?: Array<[string, ENCODING_TYPE]>;
|
|
110
77
|
/**
|
|
111
78
|
* Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.
|
|
112
79
|
* @type {SatelliteAssertions}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type StorageConfigSourceGlob = string;
|
|
6
6
|
/**
|
|
7
|
-
* Headers allow the client and the
|
|
7
|
+
* Headers allow the client and the storage to pass additional information along with a request or a response.
|
|
8
8
|
* Some sets of headers can affect how the browser handles the page and its content.
|
|
9
9
|
* @interface StorageConfigHeader
|
|
10
10
|
*/
|
|
@@ -97,4 +97,18 @@ export interface StorageConfig {
|
|
|
97
97
|
* @optional
|
|
98
98
|
*/
|
|
99
99
|
iframe?: 'deny' | 'same-origin' | 'allow-any';
|
|
100
|
+
/**
|
|
101
|
+
* Optional flag to enable access for raw URLs.
|
|
102
|
+
*
|
|
103
|
+
* ⚠️ **WARNING: Enabling this option is highly discouraged due to security risks.**
|
|
104
|
+
*
|
|
105
|
+
* Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation.
|
|
106
|
+
* This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content.
|
|
107
|
+
* Since there is no validation on raw URLs, the client may receive and process harmful data.
|
|
108
|
+
*
|
|
109
|
+
* If not specified, the default value is `false`.
|
|
110
|
+
* @type {boolean}
|
|
111
|
+
* @optional
|
|
112
|
+
*/
|
|
113
|
+
rawAccess?: boolean;
|
|
100
114
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ENCODING_TYPE } from './encoding';
|
|
2
|
+
export interface CliConfig {
|
|
3
|
+
/**
|
|
4
|
+
* Specifies the directory from which to deploy to storage.
|
|
5
|
+
* For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.
|
|
6
|
+
*
|
|
7
|
+
* @default 'build'
|
|
8
|
+
* @type {string}
|
|
9
|
+
*/
|
|
10
|
+
source?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.
|
|
13
|
+
* @type {string[]}
|
|
14
|
+
* @optional
|
|
15
|
+
*/
|
|
16
|
+
ignore?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Controls the Gzip compression optimization for files in the source folder. By default, it targets JavaScript (js), ES Module (mjs), and CSS (css) files.
|
|
19
|
+
* You can disable this by setting it to `false` or customize it with a different file matching pattern using glob syntax.
|
|
20
|
+
* @type {string | false}
|
|
21
|
+
* @optional
|
|
22
|
+
*/
|
|
23
|
+
gzip?: string | false;
|
|
24
|
+
/**
|
|
25
|
+
* Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:
|
|
26
|
+
* - `.Z` for compress,
|
|
27
|
+
* - `.gz` for gzip,
|
|
28
|
+
* - `.br` for brotli,
|
|
29
|
+
* - `.zlib` for deflate,
|
|
30
|
+
* - anything else defaults to `identity`.
|
|
31
|
+
* The "encoding" attribute allows overriding default mappings with an array of glob patterns and encoding types.
|
|
32
|
+
* @type {Array<[string, ENCODING_TYPE]>}
|
|
33
|
+
* @optional
|
|
34
|
+
*/
|
|
35
|
+
encoding?: Array<[string, ENCODING_TYPE]>;
|
|
36
|
+
}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|