@junobuild/config 0.0.8 → 0.0.9

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
@@ -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.
@@ -145,23 +155,33 @@ Represents the development configuration for Juno.
145
155
  | ---------------- | ------------------------ |
146
156
  | `JunoConfigMode` | `'production' or string` |
147
157
 
148
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/mainnet/juno.env.ts#L5)
158
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/juno.env.ts#L5)
149
159
 
150
160
  #### :gear: SatelliteDevDbCollection
151
161
 
152
- | Type | Type |
153
- | -------------------------- | ----------------------------------------------------- |
154
- | `SatelliteDevDbCollection` | `Omit<Rule, 'createdAt' or 'updatedAt' or 'maxSize'>` |
162
+ | Type | Type |
163
+ | -------------------------- | ------ |
164
+ | `SatelliteDevDbCollection` | `Omit< |
165
+
166
+ Rule,
167
+ 'createdAt' or 'updatedAt' or 'maxSize' or 'version'
155
168
 
156
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/juno.dev.config.ts#L7)
169
+ > ` |
170
+
171
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L7)
157
172
 
158
173
  #### :gear: SatelliteDevStorageCollection
159
174
 
160
- | Type | Type |
161
- | ------------------------------- | --------------------------------------------------------- |
162
- | `SatelliteDevStorageCollection` | `Omit<Rule, 'createdAt' or 'updatedAt' or 'maxCapacity'>` |
175
+ | Type | Type |
176
+ | ------------------------------- | ------ |
177
+ | `SatelliteDevStorageCollection` | `Omit< |
178
+
179
+ Rule,
180
+ 'createdAt' or 'updatedAt' or 'maxCapacity' or 'version'
181
+
182
+ > ` |
163
183
 
164
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/juno.dev.config.ts#L13)
184
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/juno.dev.config.ts#L16)
165
185
 
166
186
  #### :gear: JunoDevConfigFn
167
187
 
@@ -169,7 +189,7 @@ Represents the development configuration for Juno.
169
189
  | ----------------- | --------------------- |
170
190
  | `JunoDevConfigFn` | `() => JunoDevConfig` |
171
191
 
172
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L3)
192
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L3)
173
193
 
174
194
  #### :gear: JunoDevConfigFnOrObject
175
195
 
@@ -177,7 +197,7 @@ Represents the development configuration for Juno.
177
197
  | ------------------------- | ---------------------------------- |
178
198
  | `JunoDevConfigFnOrObject` | `JunoDevConfig or JunoDevConfigFn` |
179
199
 
180
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/dev/config.ts#L5)
200
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/satellite/dev/config.ts#L5)
181
201
 
182
202
  <!-- TSDOC_END -->
183
203
 
@@ -1,2 +1,2 @@
1
- function o(n){return n}function f(n){return n}export{f as defineConfig,o as defineDevConfig};
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 {JunoConfig} from './juno.config';\nimport type {JunoConfigEnv} from './juno.env';\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": "AASO,SAASA,EAAgBC,EAA0D,CACxF,OAAOA,CACT,CCDO,SAASC,EAAaC,EAAoD,CAC/E,OAAOA,CACT",
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
  }
@@ -1,4 +1,4 @@
1
1
  import { createRequire as topLevelCreateRequire } from 'module';
2
2
  const require = topLevelCreateRequire(import.meta.url);
3
- function o(n){return n}function f(n){return n}export{f as defineConfig,o as defineDevConfig};
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
@@ -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 {JunoConfig} from './juno.config';\nimport type {JunoConfigEnv} from './juno.env';\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": ";;AASO,SAASA,EAAgBC,EAA0D,CACxF,OAAOA,CACT,CCDO,SAASC,EAAaC,EAAoD,CAC/E,OAAOA,CACT",
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
+ };
@@ -1,11 +1,14 @@
1
- export type * from './dev/juno.dev.config';
2
- export type * from './mainnet/authentication.config';
3
- export type * from './mainnet/juno.config';
4
- export type * from './mainnet/juno.env';
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/rules';
10
+ export type * from './types/juno.env';
9
11
  export type * from './utils/ts.utils';
10
- export * from './dev/config';
11
- export * from './mainnet/config';
12
+ export * from './console/config';
13
+ export * from './satellite/dev/config';
14
+ export * from './satellite/mainnet/config';
@@ -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 { ENCODING_TYPE } from '../types/encoding';
2
- import type { Either } from '../utils/ts.utils';
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 satellite to pass additional information along with a request or a response.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/config",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Configuration options for Juno CLI",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
File without changes
File without changes