@junobuild/config 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -385,7 +385,7 @@ References:
385
385
 
386
386
  | Constant | Type |
387
387
  | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
388
- | `CliConfigSchema` | `ZodObject<{ source: ZodOptional<ZodString>; ignore: ZodOptional<ZodArray<ZodString>>; precompress: ZodOptional<ZodUnion<readonly [ZodObject<{ pattern: ZodOptional<ZodString>; mode: ZodOptional<...>; algorithm: ZodOptional<...>; }, $strict>, ZodLiteral<...>]>>; encoding: ZodOptional<...>; predeploy: ZodOptional<...>;...` |
388
+ | `CliConfigSchema` | `ZodObject<{ source: ZodOptional<ZodString>; ignore: ZodOptional<ZodArray<ZodString>>; precompress: ZodOptional<ZodUnion<readonly [ZodObject<{ pattern: ZodOptional<ZodString>; mode: ZodOptional<...>; algorithm: ZodOptional<...>; }, $strict>, ZodArray<...>, ZodLiteral<...>]>>; encoding: ZodOptional<...>; predeploy: Zo...` |
389
389
 
390
390
  References:
391
391
 
@@ -722,22 +722,22 @@ Configuration for compressing files during deployment.
722
722
  | `mode` | `"both" or "replace" or undefined` | Determines what happens to the original files after compression: - `"both"` — upload both original and compressed versions. - `"replace"` — upload only the compressed version (served with `Content-Encoding`). default: "both" |
723
723
  | `algorithm` | `"gzip" or "brotli" or undefined` | Compression algorithm. default: "gzip" |
724
724
 
725
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/cli.config.ts#L28)
725
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/cli.config.ts#L30)
726
726
 
727
727
  #### :gear: CliConfig
728
728
 
729
729
  The configuration used by the CLI to resolve, prepare and deploy your app.
730
730
 
731
- | Property | Type | Description |
732
- | ------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
733
- | `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} |
734
- | `ignore` | `string[] or undefined` | Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore. type: {string[]}optional |
735
- | `precompress` | `false or Precompress or undefined` | Controls compression optimization for files in the source folder. By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html) are compressed, and both the original and compressed versions are uploaded. Set to `false` to disable, or provide a {@link Precompress} object to customize. type: {Precompress or false}optional |
736
- | `encoding` | `[string, EncodingType][] 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, EncodingType]>}optional |
737
- | `predeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run before the deployment process begins. This can be useful for tasks such as compiling assets, running tests, or building production-ready files. Example: `json { "predeploy": ["npm run build", "npm run lint"] } ` type: {string[]}optional |
738
- | `postdeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run after the deployment process completes. This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members. Example: `json { "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] } ` type: {string[]}optional |
731
+ | Property | Type | Description |
732
+ | ------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
733
+ | `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} |
734
+ | `ignore` | `string[] or undefined` | Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore. type: {string[]}optional |
735
+ | `precompress` | `false or Precompress or Precompress[] or undefined` | Controls compression optimization for files in the source folder. By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html) are compressed, and both the original and compressed versions are uploaded. Set to `false` to disable, or provide one or more {@link Precompress} objects to customize. type: {Precompress or Precompress[] or false}optional |
736
+ | `encoding` | `[string, EncodingType][] 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, EncodingType]>}optional |
737
+ | `predeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run before the deployment process begins. This can be useful for tasks such as compiling assets, running tests, or building production-ready files. Example: `json { "predeploy": ["npm run build", "npm run lint"] } ` type: {string[]}optional |
738
+ | `postdeploy` | `string[] or undefined` | Defines a list of scripts or commands to be run after the deployment process completes. This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members. Example: `json { "postdeploy": ["./scripts/notify-admins.sh", "echo 'Deployment complete'"] } ` type: {string[]}optional |
739
739
 
740
- [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/cli.config.ts#L54)
740
+ [:link: Source](https://github.com/junobuild/juno-js/tree/main/packages/config/src/types/cli.config.ts#L56)
741
741
 
742
742
  #### :gear: SatelliteId
743
743
 
@@ -1,2 +1,2 @@
1
- function go(u){return u}import{PrincipalTextSchema as B}from"@dfinity/zod-schemas";import*as r from"zod/v4";import*as o from"zod/v4";import*as C from"zod/v4";var z=C.object({heap:C.bigint().optional(),stable:C.bigint().optional()}).strict();var b=o.string(),G=o.object({source:b,headers:o.array(o.tuple([o.string(),o.string()]))}).strict(),N=o.object({source:b,destination:o.string()}).strict(),U=o.object({source:b,location:o.string(),code:o.union([o.literal(301),o.literal(302)])}).strict(),d=o.object({headers:o.array(G).optional(),rewrites:o.array(N).optional(),redirects:o.array(U).optional(),iframe:o.enum(["deny","same-origin","allow-any"]).optional(),rawAccess:o.boolean().optional(),maxMemorySize:z.optional(),version:o.bigint().optional()});import*as t from"zod/v4";import*as J from"zod/v4";var j=J.enum(["identity","gzip","compress","deflate","br"]);var K=t.strictObject({pattern:t.string().optional(),mode:t.enum(["both","replace"]).optional(),algorithm:t.enum(["gzip","brotli"]).optional()}),E=t.strictObject({source:t.string().optional(),ignore:t.array(t.string()).optional(),precompress:t.union([K,t.literal(!1)]).optional(),encoding:t.array(t.tuple([t.string(),j])).optional(),predeploy:t.array(t.string()).optional(),postdeploy:t.array(t.string()).optional()});import*as c from"zod/v4";var m=c.union([c.literal("production"),c.string()]),yo=c.object({mode:m});import{PrincipalTextSchema as V}from"@dfinity/zod-schemas";import*as M from"zod/v4";var f=M.string().refine(u=>V.safeParse(u).success,{message:"Invalid textual representation of a Principal."});var H=r.object({id:B}),q=r.object({ids:r.record(m,f)}),A=r.object({...E.shape,storage:d.optional()}),To=r.union([r.object({...H.shape,...A.shape}).strict(),r.object({...q.shape,...A.shape}).strict()]);import*as s from"zod/v4";var Q=s.record(s.string(),s.string()),vo=s.object({name:s.string(),version:s.string(),dependencies:Q.optional()});var Fo="@junobuild/satellite",wo="@junobuild/sputnik",Do="@junobuild/mission-control",_o="@junobuild/orbiter";function Lo(u){return u}import*as l from"zod/v4";var P=l.strictObject({heapMemory:l.union([l.bigint(),l.boolean()]).optional()});import{PrincipalTextSchema as W}from"@dfinity/zod-schemas";import*as n from"zod/v4";var X=n.strictObject({derivationOrigin:n.url().optional(),externalAlternativeOrigins:n.array(n.url()).optional()}),Y=n.strictObject({allowedCallers:n.array(W)}),T=n.strictObject({internetIdentity:X.optional(),rules:Y.optional(),version:n.bigint().optional()});import*as x from"zod/v4";import*as i from"zod/v4";var I=i.enum(["public","private","managed","controllers"]),Z=i.enum(["heap","stable"]),Vo=i.enum(["db","storage"]),y=i.strictObject({collection:i.string(),read:I,write:I,memory:Z,createdAt:i.bigint().optional(),updatedAt:i.bigint().optional(),version:i.bigint().optional(),maxSize:i.bigint().optional(),maxChangesPerUser:i.number().optional(),maxCapacity:i.number().optional(),mutablePermissions:i.boolean().optional().default(!0),maxTokens:i.bigint().optional()});var $=y.omit({createdAt:!0,updatedAt:!0,maxSize:!0}),oo=y.omit({createdAt:!0,updatedAt:!0,maxCapacity:!0}),v=x.strictObject({datastore:x.array($).optional(),storage:x.array(oo).optional()});import*as S from"zod/v4";var R=S.strictObject({maxMemorySize:z.optional(),version:S.bigint().optional()});import*as e from"zod/v4";var O=e.strictObject({server:e.number().optional(),admin:e.number().optional()}),to=e.strictObject({console:e.number().optional()}),eo=e.strictObject({ports:O.extend(to.shape).optional()}),io=e.strictObject({ports:O.optional()}),no=e.strictObject({ports:O.optional()}),h=e.strictObject({type:e.enum(["docker","podman"]),image:e.string().optional(),name:e.string().optional(),volume:e.string().optional(),target:e.string().optional(),platform:e.enum(["linux/amd64","linux/arm64"]).optional()}),F=e.union([e.strictObject({runner:h.optional(),skylab:eo}),e.strictObject({runner:h.optional(),console:io}),e.strictObject({runner:h.optional(),satellite:no})]);import*as a from"zod/v4";var ro=a.enum(["controllers","public"]),w=a.strictObject({freezingThreshold:a.bigint().optional(),reservedCyclesLimit:a.bigint().optional(),logVisibility:ro.optional(),heapMemoryLimit:a.bigint().optional(),memoryAllocation:a.bigint().optional(),computeAllocation:a.bigint().optional()});import{PrincipalTextSchema as ao}from"@dfinity/zod-schemas";import*as g from"zod/v4";var po=g.object({id:ao}),so=g.object({ids:g.record(m,f)}),D=g.union([po.strict(),so.strict()]);import{PrincipalTextSchema as co}from"@dfinity/zod-schemas";import*as p from"zod/v4";var lo=p.object({id:co}),mo=p.object({ids:p.record(m,f)}),_=p.object({storage:d.optional(),datastore:R.optional(),authentication:T.optional(),assertions:P.optional(),settings:w.optional(),collections:v.optional()}),k=p.union([p.object({...lo.shape,..._.shape}).strict(),p.object({...mo.shape,..._.shape}).strict()]);import*as L from"zod/v4";var Ct=L.strictObject({satellite:k,orbiter:D.optional(),emulator:F.optional()});export{X as AuthenticationConfigInternetIdentitySchema,Y as AuthenticationConfigRulesSchema,T as AuthenticationConfigSchema,E as CliConfigSchema,v as CollectionsSchema,H as ConsoleIdSchema,q as ConsoleIdsSchema,$ as DatastoreCollectionSchema,R as DatastoreConfigSchema,F as EmulatorConfigSchema,j as EncodingTypeSchema,Do as JUNO_PACKAGE_MISSION_CONTROL_ID,_o as JUNO_PACKAGE_ORBITER_ID,Fo as JUNO_PACKAGE_SATELLITE_ID,wo as JUNO_PACKAGE_SPUTNIK_ID,yo as JunoConfigEnvSchema,m as JunoConfigModeSchema,Ct as JunoConfigSchema,To as JunoConsoleConfigSchema,Q as JunoPackageDependenciesSchema,vo as JunoPackageSchema,z as MaxMemorySizeConfigSchema,Z as MemoryTextSchema,ro as ModuleLogVisibilitySchema,w as ModuleSettingsSchema,D as OrbiterConfigSchema,po as OrbiterIdSchema,so as OrbiterIdsSchema,I as PermissionTextSchema,K as PrecompressSchema,y as RuleSchema,Vo as RulesTypeSchema,P as SatelliteAssertionsSchema,k as SatelliteConfigOptionsSchema,lo as SatelliteIdSchema,mo as SatelliteIdsSchema,oo as StorageCollectionSchema,G as StorageConfigHeaderSchema,U as StorageConfigRedirectSchema,N as StorageConfigRewriteSchema,d as StorageConfigSchema,b as StorageConfigSourceGlobSchema,Lo as defineConfig,go as defineConsoleConfig};
1
+ function go(u){return u}import{PrincipalTextSchema as B}from"@dfinity/zod-schemas";import*as r from"zod/v4";import*as o from"zod/v4";import*as C from"zod/v4";var z=C.object({heap:C.bigint().optional(),stable:C.bigint().optional()}).strict();var b=o.string(),N=o.object({source:b,headers:o.array(o.tuple([o.string(),o.string()]))}).strict(),U=o.object({source:b,destination:o.string()}).strict(),K=o.object({source:b,location:o.string(),code:o.union([o.literal(301),o.literal(302)])}).strict(),d=o.object({headers:o.array(N).optional(),rewrites:o.array(U).optional(),redirects:o.array(K).optional(),iframe:o.enum(["deny","same-origin","allow-any"]).optional(),rawAccess:o.boolean().optional(),maxMemorySize:z.optional(),version:o.bigint().optional()});import*as t from"zod/v4";import*as J from"zod/v4";var j=J.enum(["identity","gzip","compress","deflate","br"]);var E=t.strictObject({pattern:t.string().optional(),mode:t.enum(["both","replace"]).optional(),algorithm:t.enum(["gzip","brotli"]).optional()}),M=t.strictObject({source:t.string().optional(),ignore:t.array(t.string()).optional(),precompress:t.union([E,t.array(E),t.literal(!1)]).optional(),encoding:t.array(t.tuple([t.string(),j])).optional(),predeploy:t.array(t.string()).optional(),postdeploy:t.array(t.string()).optional()});import*as c from"zod/v4";var m=c.union([c.literal("production"),c.string()]),yo=c.object({mode:m});import{PrincipalTextSchema as V}from"@dfinity/zod-schemas";import*as P from"zod/v4";var f=P.string().refine(u=>V.safeParse(u).success,{message:"Invalid textual representation of a Principal."});var H=r.object({id:B}),q=r.object({ids:r.record(m,f)}),A=r.object({...M.shape,storage:d.optional()}),To=r.union([r.object({...H.shape,...A.shape}).strict(),r.object({...q.shape,...A.shape}).strict()]);import*as p from"zod/v4";var Q=p.record(p.string(),p.string()),vo=p.object({name:p.string(),version:p.string(),dependencies:Q.optional()});var Fo="@junobuild/satellite",wo="@junobuild/sputnik",Do="@junobuild/mission-control",_o="@junobuild/orbiter";function Lo(u){return u}import*as l from"zod/v4";var T=l.strictObject({heapMemory:l.union([l.bigint(),l.boolean()]).optional()});import{PrincipalTextSchema as W}from"@dfinity/zod-schemas";import*as n from"zod/v4";var X=n.strictObject({derivationOrigin:n.url().optional(),externalAlternativeOrigins:n.array(n.url()).optional()}),Y=n.strictObject({allowedCallers:n.array(W)}),I=n.strictObject({internetIdentity:X.optional(),rules:Y.optional(),version:n.bigint().optional()});import*as x from"zod/v4";import*as i from"zod/v4";var v=i.enum(["public","private","managed","controllers"]),Z=i.enum(["heap","stable"]),Vo=i.enum(["db","storage"]),y=i.strictObject({collection:i.string(),read:v,write:v,memory:Z,createdAt:i.bigint().optional(),updatedAt:i.bigint().optional(),version:i.bigint().optional(),maxSize:i.bigint().optional(),maxChangesPerUser:i.number().optional(),maxCapacity:i.number().optional(),mutablePermissions:i.boolean().optional().default(!0),maxTokens:i.bigint().optional()});var $=y.omit({createdAt:!0,updatedAt:!0,maxSize:!0}),oo=y.omit({createdAt:!0,updatedAt:!0,maxCapacity:!0}),R=x.strictObject({datastore:x.array($).optional(),storage:x.array(oo).optional()});import*as S from"zod/v4";var F=S.strictObject({maxMemorySize:z.optional(),version:S.bigint().optional()});import*as e from"zod/v4";var O=e.strictObject({server:e.number().optional(),admin:e.number().optional()}),to=e.strictObject({console:e.number().optional()}),eo=e.strictObject({ports:O.extend(to.shape).optional()}),io=e.strictObject({ports:O.optional()}),no=e.strictObject({ports:O.optional()}),h=e.strictObject({type:e.enum(["docker","podman"]),image:e.string().optional(),name:e.string().optional(),volume:e.string().optional(),target:e.string().optional(),platform:e.enum(["linux/amd64","linux/arm64"]).optional()}),w=e.union([e.strictObject({runner:h.optional(),skylab:eo}),e.strictObject({runner:h.optional(),console:io}),e.strictObject({runner:h.optional(),satellite:no})]);import*as a from"zod/v4";var ro=a.enum(["controllers","public"]),D=a.strictObject({freezingThreshold:a.bigint().optional(),reservedCyclesLimit:a.bigint().optional(),logVisibility:ro.optional(),heapMemoryLimit:a.bigint().optional(),memoryAllocation:a.bigint().optional(),computeAllocation:a.bigint().optional()});import{PrincipalTextSchema as ao}from"@dfinity/zod-schemas";import*as g from"zod/v4";var so=g.object({id:ao}),po=g.object({ids:g.record(m,f)}),_=g.union([so.strict(),po.strict()]);import{PrincipalTextSchema as co}from"@dfinity/zod-schemas";import*as s from"zod/v4";var lo=s.object({id:co}),mo=s.object({ids:s.record(m,f)}),k=s.object({storage:d.optional(),datastore:F.optional(),authentication:I.optional(),assertions:T.optional(),settings:D.optional(),collections:R.optional()}),L=s.union([s.object({...lo.shape,...k.shape}).strict(),s.object({...mo.shape,...k.shape}).strict()]);import*as G from"zod/v4";var Ct=G.strictObject({satellite:L,orbiter:_.optional(),emulator:w.optional()});export{X as AuthenticationConfigInternetIdentitySchema,Y as AuthenticationConfigRulesSchema,I as AuthenticationConfigSchema,M as CliConfigSchema,R as CollectionsSchema,H as ConsoleIdSchema,q as ConsoleIdsSchema,$ as DatastoreCollectionSchema,F as DatastoreConfigSchema,w as EmulatorConfigSchema,j as EncodingTypeSchema,Do as JUNO_PACKAGE_MISSION_CONTROL_ID,_o as JUNO_PACKAGE_ORBITER_ID,Fo as JUNO_PACKAGE_SATELLITE_ID,wo as JUNO_PACKAGE_SPUTNIK_ID,yo as JunoConfigEnvSchema,m as JunoConfigModeSchema,Ct as JunoConfigSchema,To as JunoConsoleConfigSchema,Q as JunoPackageDependenciesSchema,vo as JunoPackageSchema,z as MaxMemorySizeConfigSchema,Z as MemoryTextSchema,ro as ModuleLogVisibilitySchema,D as ModuleSettingsSchema,_ as OrbiterConfigSchema,so as OrbiterIdSchema,po as OrbiterIdsSchema,v as PermissionTextSchema,E as PrecompressSchema,y as RuleSchema,Vo as RulesTypeSchema,T as SatelliteAssertionsSchema,L as SatelliteConfigOptionsSchema,lo as SatelliteIdSchema,mo as SatelliteIdsSchema,oo as StorageCollectionSchema,N as StorageConfigHeaderSchema,K as StorageConfigRedirectSchema,U as StorageConfigRewriteSchema,d as StorageConfigSchema,b as StorageConfigSourceGlobSchema,Lo as defineConfig,go as defineConsoleConfig};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/console/config.ts", "../../src/console/console.config.ts", "../../src/shared/storage.config.ts", "../../src/shared/feature.config.ts", "../../src/types/cli.config.ts", "../../src/types/encoding.ts", "../../src/types/juno.env.ts", "../../src/utils/principal.utils.ts", "../../src/pkg/juno.package.ts", "../../src/pkg/juno.package.constants.ts", "../../src/satellite/config.ts", "../../src/satellite/configs/assertions.config.ts", "../../src/satellite/configs/authentication.config.ts", "../../src/satellite/configs/collections.ts", "../../src/satellite/configs/rules.ts", "../../src/satellite/configs/datastore.config.ts", "../../src/satellite/configs/emulator.config.ts", "../../src/satellite/configs/module.settings.ts", "../../src/satellite/configs/orbiter.config.ts", "../../src/satellite/configs/satellite.config.ts", "../../src/satellite/juno.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 PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../shared/storage.config';\nimport {type CliConfig, CliConfigSchema} from '../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../types/juno.env';\nimport type {Either} from '../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../utils/principal.utils';\n\n/**\n * @see ConsoleId\n */\nexport const ConsoleIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a console.\n * @interface ConsoleId\n */\nexport interface ConsoleId {\n /**\n * The unique identifier (ID) of the console.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see ConsoleIds\n */\nexport const ConsoleIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of console identifiers to different configurations based on the mode of the application.\n * @interface ConsoleIds\n */\nexport interface ConsoleIds {\n /**\n * A mapping of console identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different console IDs, such as production, staging, etc.\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\nconst JunoConsoleConfigBaseSchema = z.object({\n ...CliConfigSchema.shape,\n storage: StorageConfigSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const JunoConsoleConfigSchema = z.union([\n z\n .object({\n ...ConsoleIdSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...ConsoleIdsSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * Represents the configuration for a console.\n * @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig\n */\nexport type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> &\n CliConfig & {\n /**\n * Optional configuration parameters for the console, affecting the operational behavior of its Storage.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n };\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from './feature.config';\n\n/**\n * @see StorageConfigSourceGlob\n */\nexport const StorageConfigSourceGlobSchema = z.string();\n\n/**\n * Represents a glob pattern for matching files in the Storage configuration.\n * @typedef {string} StorageConfigSourceGlob\n */\nexport type StorageConfigSourceGlob = string;\n\n/**\n * @see StorageConfigHeader\n */\nexport const StorageConfigHeaderSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n headers: z.array(z.tuple([z.string(), z.string()]))\n })\n .strict();\n\n/**\n * Headers allow the client and the Storage to pass additional information along with a request or a response.\n * Some sets of headers can affect how the browser handles the page and its content.\n * @interface StorageConfigHeader\n */\nexport interface StorageConfigHeader {\n /**\n * The glob pattern used to match files within the Storage that these headers will apply to.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * An array of key-value pairs representing the headers to apply.\n * Each pair includes the header name and its value.\n * Example: `[[\"Cache-Control\", \"max-age=3600\"], [\"X-Custom-Header\", \"value\"]]`\n * @type {Array<[string, string]>}\n */\n headers: [string, string][];\n}\n\n/**\n * @see StorageConfigRewrite\n */\nexport const StorageConfigRewriteSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n destination: z.string()\n })\n .strict();\n\n/**\n * You can utilize optional rewrites to display the same content for multiple URLs.\n * Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.\n * @interface StorageConfigRewrite\n */\nexport interface StorageConfigRewrite {\n /**\n * The glob pattern or specific path to match for incoming requests.\n * Matches are rewritten to the specified destination.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The destination path or file to which matching requests should be rewritten.\n * @type {string}\n */\n destination: string;\n}\n\n/**\n * @see StorageConfigRedirect\n */\nexport const StorageConfigRedirectSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n location: z.string(),\n code: z.union([z.literal(301), z.literal(302)])\n })\n .strict();\n\n/**\n * Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.\n * @interface StorageConfigRedirect\n */\nexport interface StorageConfigRedirect {\n /**\n * The glob pattern or specific path to match for incoming requests that should be redirected.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The URL or path to which the request should be redirected.\n * @type {string}\n */\n location: string;\n\n /**\n * The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect).\n * @type {301 | 302}\n */\n code: 301 | 302;\n}\n\n/**\n * @see StorageConfig\n */\nexport const StorageConfigSchema = z.object({\n headers: z.array(StorageConfigHeaderSchema).optional(),\n rewrites: z.array(StorageConfigRewriteSchema).optional(),\n redirects: z.array(StorageConfigRedirectSchema).optional(),\n iframe: z.enum(['deny', 'same-origin', 'allow-any']).optional(),\n rawAccess: z.boolean().optional(),\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the hosting behavior of the Storage.\n * @interface StorageConfig\n */\nexport interface StorageConfig {\n /**\n * Optional array of `StorageConfigHeader` objects to define custom HTTP headers for specific files or patterns.\n * @type {StorageConfigHeader[]}\n * @optional\n */\n headers?: StorageConfigHeader[];\n\n /**\n * Optional array of `StorageConfigRewrite` objects to define rewrite rules.\n * @type {StorageConfigRewrite[]}\n * @optional\n */\n rewrites?: StorageConfigRewrite[];\n\n /**\n * Optional array of `StorageConfigRedirect` objects to define HTTP redirects.\n * @type {StorageConfigRedirect[]}\n * @optional\n */\n redirects?: StorageConfigRedirect[];\n\n /**\n * For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.\n *\n * Options are:\n * - `deny`: Prevents any content from being displayed in an iframe.\n * - `same-origin`: Allows iframe content from the same origin as the page.\n * - `allow-any`: Allows iframe content from any origin.\n *\n * If not specified, then `deny` is used as default value.\n * @type {'deny' | 'same-origin' | 'allow-any'}\n * @optional\n */\n iframe?: 'deny' | 'same-origin' | 'allow-any';\n\n /**\n * Optional flag to enable access for raw URLs.\n *\n * \u26A0\uFE0F **WARNING: Enabling this option is highly discouraged due to security risks.**\n *\n * Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation.\n * This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content.\n * Since there is no validation on raw URLs, the client may receive and process harmful data.\n *\n * If not specified, the default value is `false`.\n * @type {boolean}\n * @optional\n */\n rawAccess?: boolean;\n\n /**\n * Configuration for maximum memory size limits for the Storage.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Storage and smart contract continue to operate normally but reject the upload of new assets.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see MaxMemorySizeConfig\n */\nexport const MaxMemorySizeConfigSchema = z\n .object({\n heap: z.bigint().optional(),\n stable: z.bigint().optional()\n })\n .strict();\n\n/**\n * Configuration for granting access to features only if the maximum memory size limits are not reached.\n *\n * The maximum size corresponds to the overall heap or stable memory of the smart contract.\n */\nexport interface MaxMemorySizeConfig {\n /**\n * Maximum allowed heap memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the heap memory size.\n *\n * @type {bigint}\n */\n heap?: bigint;\n\n /**\n * Maximum allowed stable memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the stable memory size.\n *\n * @type {bigint}\n */\n stable?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type EncodingType, EncodingTypeSchema} from './encoding';\n\n/**\n * @see Precompress\n */\nexport const PrecompressSchema = z.strictObject({\n pattern: z.string().optional(),\n mode: z.enum(['both', 'replace']).optional(),\n algorithm: z.enum(['gzip', 'brotli']).optional()\n});\n\n/**\n * @see CliConfig\n */\nexport const CliConfigSchema = z.strictObject({\n source: z.string().optional(),\n ignore: z.array(z.string()).optional(),\n precompress: z.union([PrecompressSchema, z.literal(false)]).optional(),\n encoding: z.array(z.tuple([z.string(), EncodingTypeSchema])).optional(),\n predeploy: z.array(z.string()).optional(),\n postdeploy: z.array(z.string()).optional()\n});\n\n/**\n * Configuration for compressing files during deployment.\n */\nexport interface Precompress {\n /**\n * Glob pattern for files to precompress.\n * @default any css|js|mjs|html\n */\n pattern?: string;\n\n /**\n * Determines what happens to the original files after compression:\n * - `\"both\"` \u2014 upload both original and compressed versions.\n * - `\"replace\"` \u2014 upload only the compressed version (served with `Content-Encoding`).\n *\n * @default \"both\"\n */\n mode?: 'both' | 'replace';\n\n /**\n * Compression algorithm.\n * @default \"gzip\"\n */\n algorithm?: 'gzip' | 'brotli';\n}\n\n/**\n * The configuration used by the CLI to resolve, prepare and deploy your app.\n */\nexport interface CliConfig {\n /**\n * Specifies the directory from which to deploy to Storage.\n * For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.\n *\n * @default 'build'\n * @type {string}\n */\n source?: string;\n\n /**\n * Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.\n * @type {string[]}\n * @optional\n */\n ignore?: string[];\n\n /**\n * Controls compression optimization for files in the source folder.\n *\n * By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)\n * are compressed, and both the original and compressed versions are uploaded.\n *\n * Set to `false` to disable, or provide a {@link Precompress} object to customize.\n *\n * @type {Precompress | false}\n * @optional\n */\n precompress?: Precompress | false;\n\n /**\n * Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:\n * - `.Z` for compress,\n * - `.gz` for gzip,\n * - `.br` for brotli,\n * - `.zlib` for deflate,\n * - anything else defaults to `identity`.\n * The \"encoding\" attribute allows overriding default mappings with an array of glob patterns and encoding types.\n * @type {Array<[string, EncodingType]>}\n * @optional\n */\n encoding?: Array<[string, EncodingType]>;\n\n /**\n * Defines a list of scripts or commands to be run before the deployment process begins.\n * This can be useful for tasks such as compiling assets, running tests, or building production-ready files.\n *\n * Example:\n * ```json\n * {\n * \"predeploy\": [\"npm run build\", \"npm run lint\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n predeploy?: string[];\n\n /**\n * Defines a list of scripts or commands to be run after the deployment process completes.\n * This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.\n *\n * Example:\n * ```json\n * {\n * \"postdeploy\": [\"./scripts/notify-admins.sh\", \"echo 'Deployment complete'\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n postdeploy?: string[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * see EncodingType\n */\nexport const EncodingTypeSchema = z.enum(['identity', 'gzip', 'compress', 'deflate', 'br']);\n\n/**\n * Represents the encoding types for assets.\n * @typedef {'identity' | 'gzip' | 'compress' | 'deflate' | 'br'} EncodingType\n */\nexport type EncodingType = 'identity' | 'gzip' | 'compress' | 'deflate' | 'br';\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoConfigMode\n */\nexport const JunoConfigModeSchema = z.union([z.literal('production'), z.string()]);\n\n/**\n * Represents the mode of the Juno configuration.\n * @typedef {'production' | string} JunoConfigMode\n */\nexport type JunoConfigMode = 'production' | string;\n\n/**\n * @see JunoConfigEnv\n */\nexport const JunoConfigEnvSchema = z.object({\n mode: JunoConfigModeSchema\n});\n\n/**\n * Represents the environment configuration for Juno.\n * @interface JunoConfigEnv\n */\nexport interface JunoConfigEnv {\n /**\n * The mode of the Juno configuration.\n * @type {JunoConfigMode}\n */\n mode: JunoConfigMode;\n}\n", "import {PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * Ensures reliable validation of PrincipalTextSchema inside z.record.\n */\nexport const StrictPrincipalTextSchema = z\n .string()\n .refine((val) => PrincipalTextSchema.safeParse(val).success, {\n message: 'Invalid textual representation of a Principal.'\n });\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoPackageDependencies\n */\nexport const JunoPackageDependenciesSchema = z.record(z.string(), z.string());\n\n/**\n * @see JunoPackage\n */\nexport const JunoPackageSchema = z.object({\n name: z.string(),\n version: z.string(),\n dependencies: JunoPackageDependenciesSchema.optional()\n});\n", "/**\n * The ID used to identify a Juno Satellite.\n *\n * It is either the name of a (stock) package or\n * used when checking if a canister includes `@junobuild/satellite` as a dependency.\n */\nexport const JUNO_PACKAGE_SATELLITE_ID = '@junobuild/satellite';\n\n/**\n * The ID used to identify a Juno Sputnik crate.\n *\n * Used when checking if a canister includes `@junobuild/sputnik` as a dependency.\n */\nexport const JUNO_PACKAGE_SPUTNIK_ID = '@junobuild/sputnik';\n\n/**\n * The ID used to identify a Juno Mission Control package.\n */\nexport const JUNO_PACKAGE_MISSION_CONTROL_ID = '@junobuild/mission-control';\n\n/**\n * The ID used to identify a Juno Orbiter package.\n */\nexport const JUNO_PACKAGE_ORBITER_ID = '@junobuild/orbiter';\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", "import * as z from 'zod/v4';\n\n/**\n * @see SatelliteAssertions\n */\nexport const SatelliteAssertionsSchema = z.strictObject({\n heapMemory: z.union([z.bigint(), z.boolean()]).optional()\n});\n\n/**\n * Configuration for satellite assertions.\n * @interface SatelliteAssertions\n */\nexport interface SatelliteAssertions {\n /**\n * Configuration for the heap memory size check, which can be:\n * - `true` to enable the check with a default threshold of 900MB,\n * - `false` to disable the heap memory size check,\n * - A `bigint` to specify a custom threshold in MB (megabytes) for the heap memory size check.\n *\n * If not specified, then `true` is used as the default value.\n * @type {bigint | boolean}\n */\n heapMemory?: bigint | boolean;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * @see AuthenticationConfigInternetIdentity\n */\nexport const AuthenticationConfigInternetIdentitySchema = z.strictObject({\n derivationOrigin: z.url().optional(),\n externalAlternativeOrigins: z.array(z.url()).optional()\n});\n\n/**\n * Configure the behavior of Internet Identity.\n * @interface AuthenticationConfigInternetIdentity\n */\nexport interface AuthenticationConfigInternetIdentity {\n /**\n * This setting ensures that users are recognized on your app, regardless of whether they use the default URL or any other custom domain.\n * For example, if set to hello.com, a user signing on at https://hello.com will receive the same identifier (principal) as when signing on at https://www.hello.com.\n * @type {string}\n * @optional\n */\n derivationOrigin?: string;\n\n /**\n * An optional list of external alternative origins allowed for authentication, which can be useful if you want to reuse the same derivation origin across multiple Satellites.\n * @type {string[]}\n * @optional\n */\n externalAlternativeOrigins?: string[];\n}\n\n/**\n * @see AuthenticationConfigRules\n */\nexport const AuthenticationConfigRulesSchema = z.strictObject({\n allowedCallers: z.array(PrincipalTextSchema)\n});\n\n/**\n * Configure the rules of the authentication.\n * @interface AuthenticationConfigRules\n */\nexport interface AuthenticationConfigRules {\n /**\n * This option defines who's allowed to use your app.\n *\n * If you enable this, only the identities you list (in user key, format, like `bj4r4-5cdop-...`) will be allowed to sign in or use any features like Datastore or Storage.\n *\n * @type {PrincipalText[]}\n * @optional\n */\n allowedCallers: PrincipalText[];\n}\n\n/**\n * @see AuthenticationConfig\n */\nexport const AuthenticationConfigSchema = z.strictObject({\n internetIdentity: AuthenticationConfigInternetIdentitySchema.optional(),\n rules: AuthenticationConfigRulesSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the Authentication options of a Satellite.\n * @interface AuthenticationConfig\n */\nexport interface AuthenticationConfig {\n /**\n * Optional configuration of Internet Identity authentication method.\n * @type {AuthenticationConfigInternetIdentity}\n * @optional\n */\n internetIdentity?: AuthenticationConfigInternetIdentity;\n\n /**\n * Optional configuration for the rules of the authentication.\n * @type {AuthenticationConfigRules}\n * @optional\n */\n rules?: AuthenticationConfigRules;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type Rule, RuleSchema} from './rules';\n\n/**\n * @see DatastoreCollection\n */\nexport const DatastoreCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxSize: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Datastore.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>} DatastoreCollection\n */\nexport type DatastoreCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>;\n\n/**\n * @see StorageCollection\n */\nexport const StorageCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxCapacity: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Storage.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>} StorageCollection\n */\nexport type StorageCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>;\n\n/**\n * @see Collections\n */\nexport const CollectionsSchema = z.strictObject({\n datastore: z.array(DatastoreCollectionSchema).optional(),\n storage: z.array(StorageCollectionSchema).optional()\n});\n\n/**\n * Represents the configuration for all the collections of a Satellite.\n * @interface Collections\n */\nexport interface Collections {\n /**\n * An optional array that defines the collections of the Datastore.\n * @type {DatastoreCollection[]}\n * @optional\n */\n datastore?: DatastoreCollection[];\n\n /**\n * An optional array that defines the collections of the Storage.\n * @type {StorageCollection[]}\n * @optional\n */\n storage?: StorageCollection[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see PermissionText\n */\nexport const PermissionTextSchema = z.enum(['public', 'private', 'managed', 'controllers']);\n\n/**\n * Represents the permission levels for read and write access.\n * @typedef {'public' | 'private' | 'managed' | 'controllers'} PermissionText\n */\nexport type PermissionText = 'public' | 'private' | 'managed' | 'controllers';\n\n/**\n * @see MemoryText\n */\nexport const MemoryTextSchema = z.enum(['heap', 'stable']);\n\n/**\n * Represents the memory types.\n * @typedef {'heap' | 'stable'} MemoryText\n */\nexport type MemoryText = 'heap' | 'stable';\n\n/**\n * @see RulesType\n */\nexport const RulesTypeSchema = z.enum(['db', 'storage']);\n\n/**\n * Represents the types of rules.\n * @typedef {'db' | 'storage'} RulesType\n */\nexport type RulesType = 'db' | 'storage';\n\n/**\n * @see Rule\n */\nexport const RuleSchema = z.strictObject({\n collection: z.string(),\n read: PermissionTextSchema,\n write: PermissionTextSchema,\n memory: MemoryTextSchema,\n createdAt: z.bigint().optional(),\n updatedAt: z.bigint().optional(),\n version: z.bigint().optional(),\n maxSize: z.bigint().optional(),\n maxChangesPerUser: z.number().optional(),\n maxCapacity: z.number().optional(),\n mutablePermissions: z.boolean().optional().default(true),\n maxTokens: z.bigint().optional()\n});\n\n/**\n * Represents a rule configuration for a collection.\n * @interface Rule\n */\nexport interface Rule {\n /**\n * The name of the collection the rule applies to.\n * @type {string}\n */\n collection: string;\n\n /**\n * The permission level for read access.\n * @type {PermissionText}\n */\n read: PermissionText;\n\n /**\n * The permission level for write access.\n * @type {PermissionText}\n */\n write: PermissionText;\n\n /**\n * The type of memory allocated for the collection.\n * @type {MemoryText}\n */\n memory: MemoryText;\n\n /**\n * The timestamp when the rule was created.\n * @type {bigint}\n * @optional\n */\n createdAt?: bigint;\n\n /**\n * The timestamp when the rule was last updated.\n * @type {bigint}\n * @optional\n */\n updatedAt?: bigint;\n\n /**\n * The version of the rule.\n * @type {bigint}\n * @optional\n * @description Must be provided when updating the rule to ensure the correct version is being updated.\n */\n version?: bigint;\n\n /**\n * The maximum size of the collection in bytes.\n * @type {number}\n * @optional\n */\n maxSize?: bigint;\n\n /**\n * The maximum number of changes (create, update or delete) per user for the collection.\n * @type {number}\n * @optional\n */\n maxChangesPerUser?: number;\n\n /**\n * The maximum capacity of the collection.\n * @type {number}\n * @optional\n */\n maxCapacity?: number;\n\n /**\n * Indicates whether the permissions are mutable.\n * @default true\n * @type {boolean}\n */\n mutablePermissions?: boolean;\n\n /**\n * The maximum number of writes and deletes per minute.\n */\n maxTokens?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from '../../shared/feature.config';\n\n/**\n * @see DatastoreConfig\n */\nexport const DatastoreConfigSchema = z.strictObject({\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the behavior of the Datastore.\n * @interface DatastoreConfig\n */\nexport interface DatastoreConfig {\n /**\n * Configuration for maximum memory size limits for the Datastore.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Datastore and smart contract continue to operate normally but reject the creation or updates of documents.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\nconst EmulatorPortsSchema = z.strictObject({\n /**\n * @default 5987\n */\n server: z.number().optional(),\n\n /**\n * @default 5999\n */\n admin: z.number().optional()\n});\n\nconst ConsolePortSchema = z.strictObject({\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: z.number().optional()\n});\n\n/**\n * Represents the ports exposed by an emulator container.\n */\nexport interface EmulatorPorts {\n /**\n * The port of the server used to simulate execution. This is the port your app connects to.\n * Also known as the \"local Internet Computer replica\" or the \"Pocket-IC port\".\n * @default 5987\n */\n server?: number;\n\n /**\n * The port of the admin server used for tasks like transferring ICP from the ledger.\n * @default 5999\n */\n admin?: number;\n}\n\n/**\n * @see EmulatorSkylab\n */\nconst EmulatorSkylabSchema = z.strictObject({\n ports: EmulatorPortsSchema.extend(ConsolePortSchema.shape).optional()\n});\n\n/**\n * Configuration for the Skylab emulator.\n */\nexport interface EmulatorSkylab {\n /**\n * Ports exposed by the Skylab container.\n */\n ports?: EmulatorPorts & {\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: number;\n };\n}\n\n/**\n * @see EmulatorConsole\n */\nconst EmulatorConsoleSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Console emulator.\n */\nexport interface EmulatorConsole {\n /**\n * Ports exposed by the Console container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorSatellite\n */\nconst EmulatorSatelliteSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Satellite emulator.\n */\nexport interface EmulatorSatellite {\n /**\n * Ports exposed by the Satellite container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorRunner\n */\nconst EmulatorRunnerSchema = z.strictObject({\n type: z.enum(['docker', 'podman']),\n image: z.string().optional(),\n name: z.string().optional(),\n volume: z.string().optional(),\n target: z.string().optional(),\n platform: z.enum(['linux/amd64', 'linux/arm64']).optional()\n});\n\n/**\n * Shared options for all runner variants.\n */\nexport interface EmulatorRunner {\n /**\n * The containerization tool to run the emulator.\n */\n type: 'docker' | 'podman';\n\n /**\n * Image reference.\n * @default depends on emulator type, e.g. \"junobuild/skylab:latest\"\n */\n image?: string;\n\n /**\n * Optional container name to use for the emulator.\n * Useful for reusing or managing a specific container.\n */\n name?: string;\n\n /**\n * Persistent volume to store internal state.\n * @default \"juno\"\n */\n volume?: string;\n\n /**\n * Shared folder for deploying and hot-reloading serverless functions.\n */\n target?: string;\n\n /**\n * The platform to use when running the emulator container.\n */\n platform?: 'linux/amd64' | 'linux/arm64';\n}\n\n/**\n * @see EmulatorConfig\n */\nexport const EmulatorConfigSchema = z.union([\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n skylab: EmulatorSkylabSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n console: EmulatorConsoleSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n satellite: EmulatorSatelliteSchema\n })\n]);\n\n/**\n * The configuration for running the Juno emulator.\n */\nexport type EmulatorConfig =\n | {runner?: EmulatorRunner; skylab: EmulatorSkylab}\n | {runner?: EmulatorRunner; console: EmulatorConsole}\n | {runner?: EmulatorRunner; satellite: EmulatorSatellite};\n", "import * as z from 'zod/v4';\n\n/**\n * @see ModuleLogVisibility\n */\nexport const ModuleLogVisibilitySchema = z.enum(['controllers', 'public']);\n\n/**\n * Specifies who can see the logs of the module.\n *\n * - 'controllers': Only the controllers of the module can see the logs.\n * - 'public': Everyone can see the logs.\n *\n * @typedef {'controllers' | 'public'} ModuleLogVisibility\n */\nexport type ModuleLogVisibility = 'controllers' | 'public';\n\n/**\n * @see ModuleSettings\n */\nexport const ModuleSettingsSchema = z.strictObject({\n freezingThreshold: z.bigint().optional(),\n reservedCyclesLimit: z.bigint().optional(),\n logVisibility: ModuleLogVisibilitySchema.optional(),\n heapMemoryLimit: z.bigint().optional(),\n memoryAllocation: z.bigint().optional(),\n computeAllocation: z.bigint().optional()\n});\n\n/**\n * Settings for a module - Satellite, Mission Control or Orbiter.\n *\n * These settings control various aspects of the module's behavior and resource usage.\n *\n * @interface ModuleSettings\n */\nexport interface ModuleSettings {\n /**\n * The cycle threshold below which the module will automatically stop to avoid running out of cycles.\n *\n * For example, if set to `BigInt(1000000)`, the module will stop when it has fewer than 1,000,000 cycles remaining.\n *\n * @type {bigint}\n */\n freezingThreshold?: bigint;\n\n /**\n * The number of cycles reserved for the module's operations to ensure it has enough cycles to function.\n *\n * For example, setting it to `BigInt(5000000)` reserves 5,000,000 cycles for the module.\n *\n * @type {bigint}\n */\n reservedCyclesLimit?: bigint;\n\n /**\n * Controls who can see the module's logs.\n *\n * @type {ModuleLogVisibility}\n */\n logVisibility?: ModuleLogVisibility;\n\n /**\n * The maximum amount of WebAssembly (Wasm) memory the module can use on the heap.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 64)` allows the module to use up to 64 MB of Wasm memory.\n *\n * @type {bigint}\n */\n heapMemoryLimit?: bigint;\n\n /**\n * The amount of memory explicitly allocated to the module.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 128)` allocates 128 MB of memory to the module.\n *\n * @type {bigint}\n */\n memoryAllocation?: bigint;\n\n /**\n * The proportion of compute capacity allocated to the module.\n *\n * This is a fraction of the total compute capacity of the subnet. For example, setting it to `BigInt(10)` allocates 10% of the compute capacity to the module.\n *\n * @type {bigint}\n */\n computeAllocation?: bigint;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\n\n/**\n * @see OrbiterId\n */\nexport const OrbiterIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the configuration for an orbiter.\n * @interface OrbiterId\n */\nexport interface OrbiterId {\n /**\n * The identifier of the orbiter used in the dApp.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see OrbiterIds\n */\nexport const OrbiterIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of orbiter identitifiers to different configurations based on the mode of the application.\n * @interface OrbiterIds\n */\nexport interface OrbiterIds {\n /**\n * A mapping of orbiter identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different orbiter IDs, such as production, development, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"development\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see OrbiterConfig\n */\nexport const OrbiterConfigSchema = z.union([OrbiterIdSchema.strict(), OrbiterIdsSchema.strict()]);\n\n/**\n * Represents the configuration for an orbiter (analytics).\n *\n * @typedef {Either<OrbiterId, OrbiterIds>} OrbiterConfig\n * @property {OrbiterId | OrbiterIds} OrbiterId or OrbiterIds - Defines a unique Orbiter or a collection of Orbiters.\n */\nexport type OrbiterConfig = Either<OrbiterId, OrbiterIds>;\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../../shared/storage.config';\nimport type {CliConfig} from '../../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\nimport {type SatelliteAssertions, SatelliteAssertionsSchema} from './assertions.config';\nimport {type AuthenticationConfig, AuthenticationConfigSchema} from './authentication.config';\nimport {type Collections, CollectionsSchema} from './collections';\nimport {type DatastoreConfig, DatastoreConfigSchema} from './datastore.config';\nimport {type ModuleSettings, ModuleSettingsSchema} from './module.settings';\n\n/**\n * @see SatelliteId\n */\nexport const SatelliteIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a satellite.\n * @interface SatelliteId\n */\nexport interface SatelliteId {\n /**\n * The unique identifier (ID) of the satellite for this application.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see SatelliteIds\n */\nexport const SatelliteIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of satellite identifiers to different configurations based on the mode of the application.\n * @interface SatelliteIds\n */\nexport interface SatelliteIds {\n /**\n * A mapping of satellite identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different satellite IDs, such as production, staging, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"staging\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see SatelliteConfigOptions\n */\nconst SatelliteConfigOptionsBaseSchema = z.object({\n storage: StorageConfigSchema.optional(),\n datastore: DatastoreConfigSchema.optional(),\n authentication: AuthenticationConfigSchema.optional(),\n assertions: SatelliteAssertionsSchema.optional(),\n settings: ModuleSettingsSchema.optional(),\n collections: CollectionsSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const SatelliteConfigOptionsSchema = z.union([\n z\n .object({\n ...SatelliteIdSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...SatelliteIdsSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning\n * the operational behavior of various aspects of a Satellite, such as storage, datastore,\n * authentication, and deployment assertions.\n *\n * These options affect specific modules of the Satellite and may require manual application of\n * changes, typically through CLI commands (e.g., `juno config`).\n *\n * @interface SatelliteConfigOptions\n *\n * @property {StorageConfig} [storage] - Configuration settings for storage management in the Satellite.\n * @property {DatastoreConfig} [datastore] - Configuration settings for datastore management.\n * @property {AuthenticationConfig} [authentication] - Authentication-specific configurations.\n * @property {SatelliteAssertions} [assertions] - Conditions and assertions for deployment or operational checks.\n * @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.\n */\nexport interface SatelliteConfigOptions {\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Datastore.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {DatastoreConfig}\n * @optional\n */\n datastore?: DatastoreConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Authentication.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {AuthenticationConfig}\n * @optional\n */\n authentication?: AuthenticationConfig;\n\n /**\n * Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.\n * @type {SatelliteAssertions}\n * @optional\n */\n assertions?: SatelliteAssertions;\n\n /**\n * Optional configuration parameters for the Satellite.\n * These settings control various aspects of the module's behavior and resource usage.\n * @type {ModuleSettings}\n * @optional\n */\n settings?: ModuleSettings;\n\n /**\n * Optional configuration for the Datastore and Storage collections.\n * @type {Collections}\n * @optional\n */\n collections?: Collections;\n}\n\n/**\n * Represents the configuration for a satellite.\n *\n * @typedef {Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions} SatelliteConfig\n * @property {SatelliteId | SatelliteIds} SatelliteId or SatelliteIds - Defines a unique Satellite or a collection of Satellites.\n * @property {CliConfig} CliConfig - Configuration specific to the CLI interface.\n * @property {SatelliteConfigOptions} SatelliteConfigOptions - Additional configuration options for the Satellite.\n */\nexport type SatelliteConfig = Either<SatelliteId, SatelliteIds> &\n CliConfig &\n SatelliteConfigOptions;\n", "import * as z from 'zod/v4';\nimport {type EmulatorConfig, EmulatorConfigSchema} from './configs/emulator.config';\nimport {type OrbiterConfig, OrbiterConfigSchema} from './configs/orbiter.config';\nimport {type SatelliteConfig, SatelliteConfigOptionsSchema} from './configs/satellite.config';\n\n/**\n * @see JunoConfig\n */\nexport const JunoConfigSchema = z.strictObject({\n satellite: SatelliteConfigOptionsSchema,\n orbiter: OrbiterConfigSchema.optional(),\n emulator: EmulatorConfigSchema.optional()\n});\n\n/**\n * Represents the overall configuration for Juno.\n * @interface JunoConfig\n */\nexport interface JunoConfig {\n /**\n * The configuration for the satellite.\n * @type {SatelliteConfig}\n */\n satellite: SatelliteConfig;\n\n /**\n * The optional configuration for the orbiter.\n * @type {OrbiterConfig}\n * @optional\n */\n orbiter?: OrbiterConfig;\n\n /**\n * Your options for the emulator.\n */\n emulator?: EmulatorConfig;\n}\n"],
5
- "mappings": "AAYO,SAASA,GACdC,EAC6B,CAC7B,OAAOA,CACT,CChBA,OAA4B,uBAAAC,MAA0B,uBACtD,UAAYC,MAAO,SCDnB,UAAYC,MAAO,SCAnB,UAAYC,MAAO,SAKZ,IAAMC,EACV,SAAO,CACN,KAAQ,SAAO,EAAE,SAAS,EAC1B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EACA,OAAO,EDJH,IAAMC,EAAkC,SAAO,EAWzCC,EACV,SAAO,CACN,OAAQD,EACR,QAAW,QAAQ,QAAM,CAAG,SAAO,EAAK,SAAO,CAAC,CAAC,CAAC,CACpD,CAAC,EACA,OAAO,EA0BGE,EACV,SAAO,CACN,OAAQF,EACR,YAAe,SAAO,CACxB,CAAC,EACA,OAAO,EAyBGG,EACV,SAAO,CACN,OAAQH,EACR,SAAY,SAAO,EACnB,KAAQ,QAAM,C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,IAAO,SAAOC,EAAsBC,CAAyB,CAC/D,CAAC,EAyBKC,EAAqC,SAAO,CAChD,QAASC,EAAoB,SAAS,EACtC,UAAWC,EAAsB,SAAS,EAC1C,eAAgBC,EAA2B,SAAS,EACpD,WAAYC,EAA0B,SAAS,EAC/C,SAAUC,EAAqB,SAAS,EACxC,YAAaC,EAAkB,SAAS,CAC1C,CAAC,EAKYC,EAAiC,QAAM,CAE/C,SAAO,CACN,GAAGZ,GAAkB,MACrB,GAAGK,EAAiC,KACtC,CAAC,EACA,OAAO,EAEP,SAAO,CACN,GAAGH,GAAmB,MACtB,GAAGG,EAAiC,KACtC,CAAC,EACA,OAAO,CACZ,CAAC,ECvFD,UAAYQ,MAAO,SAQZ,IAAMC,GAAqB,eAAa,CAC7C,UAAWC,EACX,QAASC,EAAoB,SAAS,EACtC,SAAUC,EAAqB,SAAS,CAC1C,CAAC",
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 PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../shared/storage.config';\nimport {type CliConfig, CliConfigSchema} from '../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../types/juno.env';\nimport type {Either} from '../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../utils/principal.utils';\n\n/**\n * @see ConsoleId\n */\nexport const ConsoleIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a console.\n * @interface ConsoleId\n */\nexport interface ConsoleId {\n /**\n * The unique identifier (ID) of the console.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see ConsoleIds\n */\nexport const ConsoleIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of console identifiers to different configurations based on the mode of the application.\n * @interface ConsoleIds\n */\nexport interface ConsoleIds {\n /**\n * A mapping of console identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different console IDs, such as production, staging, etc.\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\nconst JunoConsoleConfigBaseSchema = z.object({\n ...CliConfigSchema.shape,\n storage: StorageConfigSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const JunoConsoleConfigSchema = z.union([\n z\n .object({\n ...ConsoleIdSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...ConsoleIdsSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * Represents the configuration for a console.\n * @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig\n */\nexport type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> &\n CliConfig & {\n /**\n * Optional configuration parameters for the console, affecting the operational behavior of its Storage.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n };\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from './feature.config';\n\n/**\n * @see StorageConfigSourceGlob\n */\nexport const StorageConfigSourceGlobSchema = z.string();\n\n/**\n * Represents a glob pattern for matching files in the Storage configuration.\n * @typedef {string} StorageConfigSourceGlob\n */\nexport type StorageConfigSourceGlob = string;\n\n/**\n * @see StorageConfigHeader\n */\nexport const StorageConfigHeaderSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n headers: z.array(z.tuple([z.string(), z.string()]))\n })\n .strict();\n\n/**\n * Headers allow the client and the Storage to pass additional information along with a request or a response.\n * Some sets of headers can affect how the browser handles the page and its content.\n * @interface StorageConfigHeader\n */\nexport interface StorageConfigHeader {\n /**\n * The glob pattern used to match files within the Storage that these headers will apply to.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * An array of key-value pairs representing the headers to apply.\n * Each pair includes the header name and its value.\n * Example: `[[\"Cache-Control\", \"max-age=3600\"], [\"X-Custom-Header\", \"value\"]]`\n * @type {Array<[string, string]>}\n */\n headers: [string, string][];\n}\n\n/**\n * @see StorageConfigRewrite\n */\nexport const StorageConfigRewriteSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n destination: z.string()\n })\n .strict();\n\n/**\n * You can utilize optional rewrites to display the same content for multiple URLs.\n * Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.\n * @interface StorageConfigRewrite\n */\nexport interface StorageConfigRewrite {\n /**\n * The glob pattern or specific path to match for incoming requests.\n * Matches are rewritten to the specified destination.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The destination path or file to which matching requests should be rewritten.\n * @type {string}\n */\n destination: string;\n}\n\n/**\n * @see StorageConfigRedirect\n */\nexport const StorageConfigRedirectSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n location: z.string(),\n code: z.union([z.literal(301), z.literal(302)])\n })\n .strict();\n\n/**\n * Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.\n * @interface StorageConfigRedirect\n */\nexport interface StorageConfigRedirect {\n /**\n * The glob pattern or specific path to match for incoming requests that should be redirected.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The URL or path to which the request should be redirected.\n * @type {string}\n */\n location: string;\n\n /**\n * The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect).\n * @type {301 | 302}\n */\n code: 301 | 302;\n}\n\n/**\n * @see StorageConfig\n */\nexport const StorageConfigSchema = z.object({\n headers: z.array(StorageConfigHeaderSchema).optional(),\n rewrites: z.array(StorageConfigRewriteSchema).optional(),\n redirects: z.array(StorageConfigRedirectSchema).optional(),\n iframe: z.enum(['deny', 'same-origin', 'allow-any']).optional(),\n rawAccess: z.boolean().optional(),\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the hosting behavior of the Storage.\n * @interface StorageConfig\n */\nexport interface StorageConfig {\n /**\n * Optional array of `StorageConfigHeader` objects to define custom HTTP headers for specific files or patterns.\n * @type {StorageConfigHeader[]}\n * @optional\n */\n headers?: StorageConfigHeader[];\n\n /**\n * Optional array of `StorageConfigRewrite` objects to define rewrite rules.\n * @type {StorageConfigRewrite[]}\n * @optional\n */\n rewrites?: StorageConfigRewrite[];\n\n /**\n * Optional array of `StorageConfigRedirect` objects to define HTTP redirects.\n * @type {StorageConfigRedirect[]}\n * @optional\n */\n redirects?: StorageConfigRedirect[];\n\n /**\n * For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.\n *\n * Options are:\n * - `deny`: Prevents any content from being displayed in an iframe.\n * - `same-origin`: Allows iframe content from the same origin as the page.\n * - `allow-any`: Allows iframe content from any origin.\n *\n * If not specified, then `deny` is used as default value.\n * @type {'deny' | 'same-origin' | 'allow-any'}\n * @optional\n */\n iframe?: 'deny' | 'same-origin' | 'allow-any';\n\n /**\n * Optional flag to enable access for raw URLs.\n *\n * \u26A0\uFE0F **WARNING: Enabling this option is highly discouraged due to security risks.**\n *\n * Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation.\n * This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content.\n * Since there is no validation on raw URLs, the client may receive and process harmful data.\n *\n * If not specified, the default value is `false`.\n * @type {boolean}\n * @optional\n */\n rawAccess?: boolean;\n\n /**\n * Configuration for maximum memory size limits for the Storage.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Storage and smart contract continue to operate normally but reject the upload of new assets.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see MaxMemorySizeConfig\n */\nexport const MaxMemorySizeConfigSchema = z\n .object({\n heap: z.bigint().optional(),\n stable: z.bigint().optional()\n })\n .strict();\n\n/**\n * Configuration for granting access to features only if the maximum memory size limits are not reached.\n *\n * The maximum size corresponds to the overall heap or stable memory of the smart contract.\n */\nexport interface MaxMemorySizeConfig {\n /**\n * Maximum allowed heap memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the heap memory size.\n *\n * @type {bigint}\n */\n heap?: bigint;\n\n /**\n * Maximum allowed stable memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the stable memory size.\n *\n * @type {bigint}\n */\n stable?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type EncodingType, EncodingTypeSchema} from './encoding';\n\n/**\n * @see Precompress\n */\nexport const PrecompressSchema = z.strictObject({\n pattern: z.string().optional(),\n mode: z.enum(['both', 'replace']).optional(),\n algorithm: z.enum(['gzip', 'brotli']).optional()\n});\n\n/**\n * @see CliConfig\n */\nexport const CliConfigSchema = z.strictObject({\n source: z.string().optional(),\n ignore: z.array(z.string()).optional(),\n precompress: z\n .union([PrecompressSchema, z.array(PrecompressSchema), z.literal(false)])\n .optional(),\n encoding: z.array(z.tuple([z.string(), EncodingTypeSchema])).optional(),\n predeploy: z.array(z.string()).optional(),\n postdeploy: z.array(z.string()).optional()\n});\n\n/**\n * Configuration for compressing files during deployment.\n */\nexport interface Precompress {\n /**\n * Glob pattern for files to precompress.\n * @default any css|js|mjs|html\n */\n pattern?: string;\n\n /**\n * Determines what happens to the original files after compression:\n * - `\"both\"` \u2014 upload both original and compressed versions.\n * - `\"replace\"` \u2014 upload only the compressed version (served with `Content-Encoding`).\n *\n * @default \"both\"\n */\n mode?: 'both' | 'replace';\n\n /**\n * Compression algorithm.\n * @default \"gzip\"\n */\n algorithm?: 'gzip' | 'brotli';\n}\n\n/**\n * The configuration used by the CLI to resolve, prepare and deploy your app.\n */\nexport interface CliConfig {\n /**\n * Specifies the directory from which to deploy to Storage.\n * For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.\n *\n * @default 'build'\n * @type {string}\n */\n source?: string;\n\n /**\n * Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.\n * @type {string[]}\n * @optional\n */\n ignore?: string[];\n\n /**\n * Controls compression optimization for files in the source folder.\n *\n * By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)\n * are compressed, and both the original and compressed versions are uploaded.\n *\n * Set to `false` to disable, or provide one or more {@link Precompress} objects to customize.\n *\n * @type {Precompress | Precompress[] | false}\n * @optional\n */\n precompress?: Precompress | Precompress[] | false;\n\n /**\n * Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:\n * - `.Z` for compress,\n * - `.gz` for gzip,\n * - `.br` for brotli,\n * - `.zlib` for deflate,\n * - anything else defaults to `identity`.\n * The \"encoding\" attribute allows overriding default mappings with an array of glob patterns and encoding types.\n * @type {Array<[string, EncodingType]>}\n * @optional\n */\n encoding?: Array<[string, EncodingType]>;\n\n /**\n * Defines a list of scripts or commands to be run before the deployment process begins.\n * This can be useful for tasks such as compiling assets, running tests, or building production-ready files.\n *\n * Example:\n * ```json\n * {\n * \"predeploy\": [\"npm run build\", \"npm run lint\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n predeploy?: string[];\n\n /**\n * Defines a list of scripts or commands to be run after the deployment process completes.\n * This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.\n *\n * Example:\n * ```json\n * {\n * \"postdeploy\": [\"./scripts/notify-admins.sh\", \"echo 'Deployment complete'\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n postdeploy?: string[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * see EncodingType\n */\nexport const EncodingTypeSchema = z.enum(['identity', 'gzip', 'compress', 'deflate', 'br']);\n\n/**\n * Represents the encoding types for assets.\n * @typedef {'identity' | 'gzip' | 'compress' | 'deflate' | 'br'} EncodingType\n */\nexport type EncodingType = 'identity' | 'gzip' | 'compress' | 'deflate' | 'br';\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoConfigMode\n */\nexport const JunoConfigModeSchema = z.union([z.literal('production'), z.string()]);\n\n/**\n * Represents the mode of the Juno configuration.\n * @typedef {'production' | string} JunoConfigMode\n */\nexport type JunoConfigMode = 'production' | string;\n\n/**\n * @see JunoConfigEnv\n */\nexport const JunoConfigEnvSchema = z.object({\n mode: JunoConfigModeSchema\n});\n\n/**\n * Represents the environment configuration for Juno.\n * @interface JunoConfigEnv\n */\nexport interface JunoConfigEnv {\n /**\n * The mode of the Juno configuration.\n * @type {JunoConfigMode}\n */\n mode: JunoConfigMode;\n}\n", "import {PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * Ensures reliable validation of PrincipalTextSchema inside z.record.\n */\nexport const StrictPrincipalTextSchema = z\n .string()\n .refine((val) => PrincipalTextSchema.safeParse(val).success, {\n message: 'Invalid textual representation of a Principal.'\n });\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoPackageDependencies\n */\nexport const JunoPackageDependenciesSchema = z.record(z.string(), z.string());\n\n/**\n * @see JunoPackage\n */\nexport const JunoPackageSchema = z.object({\n name: z.string(),\n version: z.string(),\n dependencies: JunoPackageDependenciesSchema.optional()\n});\n", "/**\n * The ID used to identify a Juno Satellite.\n *\n * It is either the name of a (stock) package or\n * used when checking if a canister includes `@junobuild/satellite` as a dependency.\n */\nexport const JUNO_PACKAGE_SATELLITE_ID = '@junobuild/satellite';\n\n/**\n * The ID used to identify a Juno Sputnik crate.\n *\n * Used when checking if a canister includes `@junobuild/sputnik` as a dependency.\n */\nexport const JUNO_PACKAGE_SPUTNIK_ID = '@junobuild/sputnik';\n\n/**\n * The ID used to identify a Juno Mission Control package.\n */\nexport const JUNO_PACKAGE_MISSION_CONTROL_ID = '@junobuild/mission-control';\n\n/**\n * The ID used to identify a Juno Orbiter package.\n */\nexport const JUNO_PACKAGE_ORBITER_ID = '@junobuild/orbiter';\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", "import * as z from 'zod/v4';\n\n/**\n * @see SatelliteAssertions\n */\nexport const SatelliteAssertionsSchema = z.strictObject({\n heapMemory: z.union([z.bigint(), z.boolean()]).optional()\n});\n\n/**\n * Configuration for satellite assertions.\n * @interface SatelliteAssertions\n */\nexport interface SatelliteAssertions {\n /**\n * Configuration for the heap memory size check, which can be:\n * - `true` to enable the check with a default threshold of 900MB,\n * - `false` to disable the heap memory size check,\n * - A `bigint` to specify a custom threshold in MB (megabytes) for the heap memory size check.\n *\n * If not specified, then `true` is used as the default value.\n * @type {bigint | boolean}\n */\n heapMemory?: bigint | boolean;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * @see AuthenticationConfigInternetIdentity\n */\nexport const AuthenticationConfigInternetIdentitySchema = z.strictObject({\n derivationOrigin: z.url().optional(),\n externalAlternativeOrigins: z.array(z.url()).optional()\n});\n\n/**\n * Configure the behavior of Internet Identity.\n * @interface AuthenticationConfigInternetIdentity\n */\nexport interface AuthenticationConfigInternetIdentity {\n /**\n * This setting ensures that users are recognized on your app, regardless of whether they use the default URL or any other custom domain.\n * For example, if set to hello.com, a user signing on at https://hello.com will receive the same identifier (principal) as when signing on at https://www.hello.com.\n * @type {string}\n * @optional\n */\n derivationOrigin?: string;\n\n /**\n * An optional list of external alternative origins allowed for authentication, which can be useful if you want to reuse the same derivation origin across multiple Satellites.\n * @type {string[]}\n * @optional\n */\n externalAlternativeOrigins?: string[];\n}\n\n/**\n * @see AuthenticationConfigRules\n */\nexport const AuthenticationConfigRulesSchema = z.strictObject({\n allowedCallers: z.array(PrincipalTextSchema)\n});\n\n/**\n * Configure the rules of the authentication.\n * @interface AuthenticationConfigRules\n */\nexport interface AuthenticationConfigRules {\n /**\n * This option defines who's allowed to use your app.\n *\n * If you enable this, only the identities you list (in user key, format, like `bj4r4-5cdop-...`) will be allowed to sign in or use any features like Datastore or Storage.\n *\n * @type {PrincipalText[]}\n * @optional\n */\n allowedCallers: PrincipalText[];\n}\n\n/**\n * @see AuthenticationConfig\n */\nexport const AuthenticationConfigSchema = z.strictObject({\n internetIdentity: AuthenticationConfigInternetIdentitySchema.optional(),\n rules: AuthenticationConfigRulesSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the Authentication options of a Satellite.\n * @interface AuthenticationConfig\n */\nexport interface AuthenticationConfig {\n /**\n * Optional configuration of Internet Identity authentication method.\n * @type {AuthenticationConfigInternetIdentity}\n * @optional\n */\n internetIdentity?: AuthenticationConfigInternetIdentity;\n\n /**\n * Optional configuration for the rules of the authentication.\n * @type {AuthenticationConfigRules}\n * @optional\n */\n rules?: AuthenticationConfigRules;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type Rule, RuleSchema} from './rules';\n\n/**\n * @see DatastoreCollection\n */\nexport const DatastoreCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxSize: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Datastore.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>} DatastoreCollection\n */\nexport type DatastoreCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>;\n\n/**\n * @see StorageCollection\n */\nexport const StorageCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxCapacity: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Storage.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>} StorageCollection\n */\nexport type StorageCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>;\n\n/**\n * @see Collections\n */\nexport const CollectionsSchema = z.strictObject({\n datastore: z.array(DatastoreCollectionSchema).optional(),\n storage: z.array(StorageCollectionSchema).optional()\n});\n\n/**\n * Represents the configuration for all the collections of a Satellite.\n * @interface Collections\n */\nexport interface Collections {\n /**\n * An optional array that defines the collections of the Datastore.\n * @type {DatastoreCollection[]}\n * @optional\n */\n datastore?: DatastoreCollection[];\n\n /**\n * An optional array that defines the collections of the Storage.\n * @type {StorageCollection[]}\n * @optional\n */\n storage?: StorageCollection[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see PermissionText\n */\nexport const PermissionTextSchema = z.enum(['public', 'private', 'managed', 'controllers']);\n\n/**\n * Represents the permission levels for read and write access.\n * @typedef {'public' | 'private' | 'managed' | 'controllers'} PermissionText\n */\nexport type PermissionText = 'public' | 'private' | 'managed' | 'controllers';\n\n/**\n * @see MemoryText\n */\nexport const MemoryTextSchema = z.enum(['heap', 'stable']);\n\n/**\n * Represents the memory types.\n * @typedef {'heap' | 'stable'} MemoryText\n */\nexport type MemoryText = 'heap' | 'stable';\n\n/**\n * @see RulesType\n */\nexport const RulesTypeSchema = z.enum(['db', 'storage']);\n\n/**\n * Represents the types of rules.\n * @typedef {'db' | 'storage'} RulesType\n */\nexport type RulesType = 'db' | 'storage';\n\n/**\n * @see Rule\n */\nexport const RuleSchema = z.strictObject({\n collection: z.string(),\n read: PermissionTextSchema,\n write: PermissionTextSchema,\n memory: MemoryTextSchema,\n createdAt: z.bigint().optional(),\n updatedAt: z.bigint().optional(),\n version: z.bigint().optional(),\n maxSize: z.bigint().optional(),\n maxChangesPerUser: z.number().optional(),\n maxCapacity: z.number().optional(),\n mutablePermissions: z.boolean().optional().default(true),\n maxTokens: z.bigint().optional()\n});\n\n/**\n * Represents a rule configuration for a collection.\n * @interface Rule\n */\nexport interface Rule {\n /**\n * The name of the collection the rule applies to.\n * @type {string}\n */\n collection: string;\n\n /**\n * The permission level for read access.\n * @type {PermissionText}\n */\n read: PermissionText;\n\n /**\n * The permission level for write access.\n * @type {PermissionText}\n */\n write: PermissionText;\n\n /**\n * The type of memory allocated for the collection.\n * @type {MemoryText}\n */\n memory: MemoryText;\n\n /**\n * The timestamp when the rule was created.\n * @type {bigint}\n * @optional\n */\n createdAt?: bigint;\n\n /**\n * The timestamp when the rule was last updated.\n * @type {bigint}\n * @optional\n */\n updatedAt?: bigint;\n\n /**\n * The version of the rule.\n * @type {bigint}\n * @optional\n * @description Must be provided when updating the rule to ensure the correct version is being updated.\n */\n version?: bigint;\n\n /**\n * The maximum size of the collection in bytes.\n * @type {number}\n * @optional\n */\n maxSize?: bigint;\n\n /**\n * The maximum number of changes (create, update or delete) per user for the collection.\n * @type {number}\n * @optional\n */\n maxChangesPerUser?: number;\n\n /**\n * The maximum capacity of the collection.\n * @type {number}\n * @optional\n */\n maxCapacity?: number;\n\n /**\n * Indicates whether the permissions are mutable.\n * @default true\n * @type {boolean}\n */\n mutablePermissions?: boolean;\n\n /**\n * The maximum number of writes and deletes per minute.\n */\n maxTokens?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from '../../shared/feature.config';\n\n/**\n * @see DatastoreConfig\n */\nexport const DatastoreConfigSchema = z.strictObject({\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the behavior of the Datastore.\n * @interface DatastoreConfig\n */\nexport interface DatastoreConfig {\n /**\n * Configuration for maximum memory size limits for the Datastore.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Datastore and smart contract continue to operate normally but reject the creation or updates of documents.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\nconst EmulatorPortsSchema = z.strictObject({\n /**\n * @default 5987\n */\n server: z.number().optional(),\n\n /**\n * @default 5999\n */\n admin: z.number().optional()\n});\n\nconst ConsolePortSchema = z.strictObject({\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: z.number().optional()\n});\n\n/**\n * Represents the ports exposed by an emulator container.\n */\nexport interface EmulatorPorts {\n /**\n * The port of the server used to simulate execution. This is the port your app connects to.\n * Also known as the \"local Internet Computer replica\" or the \"Pocket-IC port\".\n * @default 5987\n */\n server?: number;\n\n /**\n * The port of the admin server used for tasks like transferring ICP from the ledger.\n * @default 5999\n */\n admin?: number;\n}\n\n/**\n * @see EmulatorSkylab\n */\nconst EmulatorSkylabSchema = z.strictObject({\n ports: EmulatorPortsSchema.extend(ConsolePortSchema.shape).optional()\n});\n\n/**\n * Configuration for the Skylab emulator.\n */\nexport interface EmulatorSkylab {\n /**\n * Ports exposed by the Skylab container.\n */\n ports?: EmulatorPorts & {\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: number;\n };\n}\n\n/**\n * @see EmulatorConsole\n */\nconst EmulatorConsoleSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Console emulator.\n */\nexport interface EmulatorConsole {\n /**\n * Ports exposed by the Console container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorSatellite\n */\nconst EmulatorSatelliteSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Satellite emulator.\n */\nexport interface EmulatorSatellite {\n /**\n * Ports exposed by the Satellite container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorRunner\n */\nconst EmulatorRunnerSchema = z.strictObject({\n type: z.enum(['docker', 'podman']),\n image: z.string().optional(),\n name: z.string().optional(),\n volume: z.string().optional(),\n target: z.string().optional(),\n platform: z.enum(['linux/amd64', 'linux/arm64']).optional()\n});\n\n/**\n * Shared options for all runner variants.\n */\nexport interface EmulatorRunner {\n /**\n * The containerization tool to run the emulator.\n */\n type: 'docker' | 'podman';\n\n /**\n * Image reference.\n * @default depends on emulator type, e.g. \"junobuild/skylab:latest\"\n */\n image?: string;\n\n /**\n * Optional container name to use for the emulator.\n * Useful for reusing or managing a specific container.\n */\n name?: string;\n\n /**\n * Persistent volume to store internal state.\n * @default \"juno\"\n */\n volume?: string;\n\n /**\n * Shared folder for deploying and hot-reloading serverless functions.\n */\n target?: string;\n\n /**\n * The platform to use when running the emulator container.\n */\n platform?: 'linux/amd64' | 'linux/arm64';\n}\n\n/**\n * @see EmulatorConfig\n */\nexport const EmulatorConfigSchema = z.union([\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n skylab: EmulatorSkylabSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n console: EmulatorConsoleSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n satellite: EmulatorSatelliteSchema\n })\n]);\n\n/**\n * The configuration for running the Juno emulator.\n */\nexport type EmulatorConfig =\n | {runner?: EmulatorRunner; skylab: EmulatorSkylab}\n | {runner?: EmulatorRunner; console: EmulatorConsole}\n | {runner?: EmulatorRunner; satellite: EmulatorSatellite};\n", "import * as z from 'zod/v4';\n\n/**\n * @see ModuleLogVisibility\n */\nexport const ModuleLogVisibilitySchema = z.enum(['controllers', 'public']);\n\n/**\n * Specifies who can see the logs of the module.\n *\n * - 'controllers': Only the controllers of the module can see the logs.\n * - 'public': Everyone can see the logs.\n *\n * @typedef {'controllers' | 'public'} ModuleLogVisibility\n */\nexport type ModuleLogVisibility = 'controllers' | 'public';\n\n/**\n * @see ModuleSettings\n */\nexport const ModuleSettingsSchema = z.strictObject({\n freezingThreshold: z.bigint().optional(),\n reservedCyclesLimit: z.bigint().optional(),\n logVisibility: ModuleLogVisibilitySchema.optional(),\n heapMemoryLimit: z.bigint().optional(),\n memoryAllocation: z.bigint().optional(),\n computeAllocation: z.bigint().optional()\n});\n\n/**\n * Settings for a module - Satellite, Mission Control or Orbiter.\n *\n * These settings control various aspects of the module's behavior and resource usage.\n *\n * @interface ModuleSettings\n */\nexport interface ModuleSettings {\n /**\n * The cycle threshold below which the module will automatically stop to avoid running out of cycles.\n *\n * For example, if set to `BigInt(1000000)`, the module will stop when it has fewer than 1,000,000 cycles remaining.\n *\n * @type {bigint}\n */\n freezingThreshold?: bigint;\n\n /**\n * The number of cycles reserved for the module's operations to ensure it has enough cycles to function.\n *\n * For example, setting it to `BigInt(5000000)` reserves 5,000,000 cycles for the module.\n *\n * @type {bigint}\n */\n reservedCyclesLimit?: bigint;\n\n /**\n * Controls who can see the module's logs.\n *\n * @type {ModuleLogVisibility}\n */\n logVisibility?: ModuleLogVisibility;\n\n /**\n * The maximum amount of WebAssembly (Wasm) memory the module can use on the heap.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 64)` allows the module to use up to 64 MB of Wasm memory.\n *\n * @type {bigint}\n */\n heapMemoryLimit?: bigint;\n\n /**\n * The amount of memory explicitly allocated to the module.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 128)` allocates 128 MB of memory to the module.\n *\n * @type {bigint}\n */\n memoryAllocation?: bigint;\n\n /**\n * The proportion of compute capacity allocated to the module.\n *\n * This is a fraction of the total compute capacity of the subnet. For example, setting it to `BigInt(10)` allocates 10% of the compute capacity to the module.\n *\n * @type {bigint}\n */\n computeAllocation?: bigint;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\n\n/**\n * @see OrbiterId\n */\nexport const OrbiterIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the configuration for an orbiter.\n * @interface OrbiterId\n */\nexport interface OrbiterId {\n /**\n * The identifier of the orbiter used in the dApp.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see OrbiterIds\n */\nexport const OrbiterIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of orbiter identitifiers to different configurations based on the mode of the application.\n * @interface OrbiterIds\n */\nexport interface OrbiterIds {\n /**\n * A mapping of orbiter identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different orbiter IDs, such as production, development, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"development\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see OrbiterConfig\n */\nexport const OrbiterConfigSchema = z.union([OrbiterIdSchema.strict(), OrbiterIdsSchema.strict()]);\n\n/**\n * Represents the configuration for an orbiter (analytics).\n *\n * @typedef {Either<OrbiterId, OrbiterIds>} OrbiterConfig\n * @property {OrbiterId | OrbiterIds} OrbiterId or OrbiterIds - Defines a unique Orbiter or a collection of Orbiters.\n */\nexport type OrbiterConfig = Either<OrbiterId, OrbiterIds>;\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../../shared/storage.config';\nimport type {CliConfig} from '../../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\nimport {type SatelliteAssertions, SatelliteAssertionsSchema} from './assertions.config';\nimport {type AuthenticationConfig, AuthenticationConfigSchema} from './authentication.config';\nimport {type Collections, CollectionsSchema} from './collections';\nimport {type DatastoreConfig, DatastoreConfigSchema} from './datastore.config';\nimport {type ModuleSettings, ModuleSettingsSchema} from './module.settings';\n\n/**\n * @see SatelliteId\n */\nexport const SatelliteIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a satellite.\n * @interface SatelliteId\n */\nexport interface SatelliteId {\n /**\n * The unique identifier (ID) of the satellite for this application.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see SatelliteIds\n */\nexport const SatelliteIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of satellite identifiers to different configurations based on the mode of the application.\n * @interface SatelliteIds\n */\nexport interface SatelliteIds {\n /**\n * A mapping of satellite identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different satellite IDs, such as production, staging, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"staging\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see SatelliteConfigOptions\n */\nconst SatelliteConfigOptionsBaseSchema = z.object({\n storage: StorageConfigSchema.optional(),\n datastore: DatastoreConfigSchema.optional(),\n authentication: AuthenticationConfigSchema.optional(),\n assertions: SatelliteAssertionsSchema.optional(),\n settings: ModuleSettingsSchema.optional(),\n collections: CollectionsSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const SatelliteConfigOptionsSchema = z.union([\n z\n .object({\n ...SatelliteIdSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...SatelliteIdsSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning\n * the operational behavior of various aspects of a Satellite, such as storage, datastore,\n * authentication, and deployment assertions.\n *\n * These options affect specific modules of the Satellite and may require manual application of\n * changes, typically through CLI commands (e.g., `juno config`).\n *\n * @interface SatelliteConfigOptions\n *\n * @property {StorageConfig} [storage] - Configuration settings for storage management in the Satellite.\n * @property {DatastoreConfig} [datastore] - Configuration settings for datastore management.\n * @property {AuthenticationConfig} [authentication] - Authentication-specific configurations.\n * @property {SatelliteAssertions} [assertions] - Conditions and assertions for deployment or operational checks.\n * @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.\n */\nexport interface SatelliteConfigOptions {\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Datastore.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {DatastoreConfig}\n * @optional\n */\n datastore?: DatastoreConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Authentication.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {AuthenticationConfig}\n * @optional\n */\n authentication?: AuthenticationConfig;\n\n /**\n * Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.\n * @type {SatelliteAssertions}\n * @optional\n */\n assertions?: SatelliteAssertions;\n\n /**\n * Optional configuration parameters for the Satellite.\n * These settings control various aspects of the module's behavior and resource usage.\n * @type {ModuleSettings}\n * @optional\n */\n settings?: ModuleSettings;\n\n /**\n * Optional configuration for the Datastore and Storage collections.\n * @type {Collections}\n * @optional\n */\n collections?: Collections;\n}\n\n/**\n * Represents the configuration for a satellite.\n *\n * @typedef {Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions} SatelliteConfig\n * @property {SatelliteId | SatelliteIds} SatelliteId or SatelliteIds - Defines a unique Satellite or a collection of Satellites.\n * @property {CliConfig} CliConfig - Configuration specific to the CLI interface.\n * @property {SatelliteConfigOptions} SatelliteConfigOptions - Additional configuration options for the Satellite.\n */\nexport type SatelliteConfig = Either<SatelliteId, SatelliteIds> &\n CliConfig &\n SatelliteConfigOptions;\n", "import * as z from 'zod/v4';\nimport {type EmulatorConfig, EmulatorConfigSchema} from './configs/emulator.config';\nimport {type OrbiterConfig, OrbiterConfigSchema} from './configs/orbiter.config';\nimport {type SatelliteConfig, SatelliteConfigOptionsSchema} from './configs/satellite.config';\n\n/**\n * @see JunoConfig\n */\nexport const JunoConfigSchema = z.strictObject({\n satellite: SatelliteConfigOptionsSchema,\n orbiter: OrbiterConfigSchema.optional(),\n emulator: EmulatorConfigSchema.optional()\n});\n\n/**\n * Represents the overall configuration for Juno.\n * @interface JunoConfig\n */\nexport interface JunoConfig {\n /**\n * The configuration for the satellite.\n * @type {SatelliteConfig}\n */\n satellite: SatelliteConfig;\n\n /**\n * The optional configuration for the orbiter.\n * @type {OrbiterConfig}\n * @optional\n */\n orbiter?: OrbiterConfig;\n\n /**\n * Your options for the emulator.\n */\n emulator?: EmulatorConfig;\n}\n"],
5
+ "mappings": "AAYO,SAASA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,oBAAuB,SAAO,EAAE,SAAS,EACzC,cAAeD,GAA0B,SAAS,EAClD,gBAAmB,SAAO,EAAE,SAAS,EACrC,iBAAoB,SAAO,EAAE,SAAS,EACtC,kBAAqB,SAAO,EAAE,SAAS,CACzC,CAAC,EC3BD,OAA4B,uBAAAE,OAA0B,uBACtD,UAAYC,MAAO,SAQZ,IAAMC,GAAoB,SAAO,CACtC,GAAIC,EACN,CAAC,EAiBYC,GAAqB,SAAO,CACvC,IAAO,SAAOC,EAAsBC,CAAyB,CAC/D,CAAC,EAyBYC,EAAwB,QAAM,CAACL,GAAgB,OAAO,EAAGE,GAAiB,OAAO,CAAC,CAAC,ECvDhG,OAA4B,uBAAAI,OAA0B,uBACtD,UAAYC,MAAO,SAeZ,IAAMC,GAAsB,SAAO,CACxC,GAAIC,EACN,CAAC,EAiBYC,GAAuB,SAAO,CACzC,IAAO,SAAOC,EAAsBC,CAAyB,CAC/D,CAAC,EAyBKC,EAAqC,SAAO,CAChD,QAASC,EAAoB,SAAS,EACtC,UAAWC,EAAsB,SAAS,EAC1C,eAAgBC,EAA2B,SAAS,EACpD,WAAYC,EAA0B,SAAS,EAC/C,SAAUC,EAAqB,SAAS,EACxC,YAAaC,EAAkB,SAAS,CAC1C,CAAC,EAKYC,EAAiC,QAAM,CAE/C,SAAO,CACN,GAAGZ,GAAkB,MACrB,GAAGK,EAAiC,KACtC,CAAC,EACA,OAAO,EAEP,SAAO,CACN,GAAGH,GAAmB,MACtB,GAAGG,EAAiC,KACtC,CAAC,EACA,OAAO,CACZ,CAAC,ECvFD,UAAYQ,MAAO,SAQZ,IAAMC,GAAqB,eAAa,CAC7C,UAAWC,EACX,QAASC,EAAoB,SAAS,EACtC,SAAUC,EAAqB,SAAS,CAC1C,CAAC",
6
6
  "names": ["defineConsoleConfig", "config", "PrincipalTextSchema", "z", "z", "z", "MaxMemorySizeConfigSchema", "StorageConfigSourceGlobSchema", "StorageConfigHeaderSchema", "StorageConfigRewriteSchema", "StorageConfigRedirectSchema", "StorageConfigSchema", "MaxMemorySizeConfigSchema", "z", "z", "EncodingTypeSchema", "PrecompressSchema", "CliConfigSchema", "EncodingTypeSchema", "z", "JunoConfigModeSchema", "JunoConfigEnvSchema", "PrincipalTextSchema", "z", "StrictPrincipalTextSchema", "val", "ConsoleIdSchema", "PrincipalTextSchema", "ConsoleIdsSchema", "JunoConfigModeSchema", "StrictPrincipalTextSchema", "JunoConsoleConfigBaseSchema", "CliConfigSchema", "StorageConfigSchema", "JunoConsoleConfigSchema", "z", "JunoPackageDependenciesSchema", "JunoPackageSchema", "JUNO_PACKAGE_SATELLITE_ID", "JUNO_PACKAGE_SPUTNIK_ID", "JUNO_PACKAGE_MISSION_CONTROL_ID", "JUNO_PACKAGE_ORBITER_ID", "defineConfig", "config", "z", "SatelliteAssertionsSchema", "PrincipalTextSchema", "z", "AuthenticationConfigInternetIdentitySchema", "AuthenticationConfigRulesSchema", "AuthenticationConfigSchema", "z", "z", "PermissionTextSchema", "MemoryTextSchema", "RulesTypeSchema", "RuleSchema", "DatastoreCollectionSchema", "RuleSchema", "StorageCollectionSchema", "CollectionsSchema", "z", "DatastoreConfigSchema", "MaxMemorySizeConfigSchema", "z", "EmulatorPortsSchema", "ConsolePortSchema", "EmulatorSkylabSchema", "EmulatorConsoleSchema", "EmulatorSatelliteSchema", "EmulatorRunnerSchema", "EmulatorConfigSchema", "z", "ModuleLogVisibilitySchema", "ModuleSettingsSchema", "PrincipalTextSchema", "z", "OrbiterIdSchema", "PrincipalTextSchema", "OrbiterIdsSchema", "JunoConfigModeSchema", "StrictPrincipalTextSchema", "OrbiterConfigSchema", "PrincipalTextSchema", "z", "SatelliteIdSchema", "PrincipalTextSchema", "SatelliteIdsSchema", "JunoConfigModeSchema", "StrictPrincipalTextSchema", "SatelliteConfigOptionsBaseSchema", "StorageConfigSchema", "DatastoreConfigSchema", "AuthenticationConfigSchema", "SatelliteAssertionsSchema", "ModuleSettingsSchema", "CollectionsSchema", "SatelliteConfigOptionsSchema", "z", "JunoConfigSchema", "SatelliteConfigOptionsSchema", "OrbiterConfigSchema", "EmulatorConfigSchema"]
7
7
  }
@@ -1,4 +1,4 @@
1
1
  import { createRequire as topLevelCreateRequire } from 'module';
2
2
  const require = topLevelCreateRequire(import.meta.url);
3
- function go(u){return u}import{PrincipalTextSchema as B}from"@dfinity/zod-schemas";import*as r from"zod/v4";import*as o from"zod/v4";import*as C from"zod/v4";var z=C.object({heap:C.bigint().optional(),stable:C.bigint().optional()}).strict();var b=o.string(),G=o.object({source:b,headers:o.array(o.tuple([o.string(),o.string()]))}).strict(),N=o.object({source:b,destination:o.string()}).strict(),U=o.object({source:b,location:o.string(),code:o.union([o.literal(301),o.literal(302)])}).strict(),d=o.object({headers:o.array(G).optional(),rewrites:o.array(N).optional(),redirects:o.array(U).optional(),iframe:o.enum(["deny","same-origin","allow-any"]).optional(),rawAccess:o.boolean().optional(),maxMemorySize:z.optional(),version:o.bigint().optional()});import*as t from"zod/v4";import*as J from"zod/v4";var j=J.enum(["identity","gzip","compress","deflate","br"]);var K=t.strictObject({pattern:t.string().optional(),mode:t.enum(["both","replace"]).optional(),algorithm:t.enum(["gzip","brotli"]).optional()}),E=t.strictObject({source:t.string().optional(),ignore:t.array(t.string()).optional(),precompress:t.union([K,t.literal(!1)]).optional(),encoding:t.array(t.tuple([t.string(),j])).optional(),predeploy:t.array(t.string()).optional(),postdeploy:t.array(t.string()).optional()});import*as c from"zod/v4";var m=c.union([c.literal("production"),c.string()]),yo=c.object({mode:m});import{PrincipalTextSchema as V}from"@dfinity/zod-schemas";import*as M from"zod/v4";var f=M.string().refine(u=>V.safeParse(u).success,{message:"Invalid textual representation of a Principal."});var H=r.object({id:B}),q=r.object({ids:r.record(m,f)}),A=r.object({...E.shape,storage:d.optional()}),To=r.union([r.object({...H.shape,...A.shape}).strict(),r.object({...q.shape,...A.shape}).strict()]);import*as s from"zod/v4";var Q=s.record(s.string(),s.string()),vo=s.object({name:s.string(),version:s.string(),dependencies:Q.optional()});var Fo="@junobuild/satellite",wo="@junobuild/sputnik",Do="@junobuild/mission-control",_o="@junobuild/orbiter";function Lo(u){return u}import*as l from"zod/v4";var P=l.strictObject({heapMemory:l.union([l.bigint(),l.boolean()]).optional()});import{PrincipalTextSchema as W}from"@dfinity/zod-schemas";import*as n from"zod/v4";var X=n.strictObject({derivationOrigin:n.url().optional(),externalAlternativeOrigins:n.array(n.url()).optional()}),Y=n.strictObject({allowedCallers:n.array(W)}),T=n.strictObject({internetIdentity:X.optional(),rules:Y.optional(),version:n.bigint().optional()});import*as x from"zod/v4";import*as i from"zod/v4";var I=i.enum(["public","private","managed","controllers"]),Z=i.enum(["heap","stable"]),Vo=i.enum(["db","storage"]),y=i.strictObject({collection:i.string(),read:I,write:I,memory:Z,createdAt:i.bigint().optional(),updatedAt:i.bigint().optional(),version:i.bigint().optional(),maxSize:i.bigint().optional(),maxChangesPerUser:i.number().optional(),maxCapacity:i.number().optional(),mutablePermissions:i.boolean().optional().default(!0),maxTokens:i.bigint().optional()});var $=y.omit({createdAt:!0,updatedAt:!0,maxSize:!0}),oo=y.omit({createdAt:!0,updatedAt:!0,maxCapacity:!0}),v=x.strictObject({datastore:x.array($).optional(),storage:x.array(oo).optional()});import*as S from"zod/v4";var R=S.strictObject({maxMemorySize:z.optional(),version:S.bigint().optional()});import*as e from"zod/v4";var O=e.strictObject({server:e.number().optional(),admin:e.number().optional()}),to=e.strictObject({console:e.number().optional()}),eo=e.strictObject({ports:O.extend(to.shape).optional()}),io=e.strictObject({ports:O.optional()}),no=e.strictObject({ports:O.optional()}),h=e.strictObject({type:e.enum(["docker","podman"]),image:e.string().optional(),name:e.string().optional(),volume:e.string().optional(),target:e.string().optional(),platform:e.enum(["linux/amd64","linux/arm64"]).optional()}),F=e.union([e.strictObject({runner:h.optional(),skylab:eo}),e.strictObject({runner:h.optional(),console:io}),e.strictObject({runner:h.optional(),satellite:no})]);import*as a from"zod/v4";var ro=a.enum(["controllers","public"]),w=a.strictObject({freezingThreshold:a.bigint().optional(),reservedCyclesLimit:a.bigint().optional(),logVisibility:ro.optional(),heapMemoryLimit:a.bigint().optional(),memoryAllocation:a.bigint().optional(),computeAllocation:a.bigint().optional()});import{PrincipalTextSchema as ao}from"@dfinity/zod-schemas";import*as g from"zod/v4";var po=g.object({id:ao}),so=g.object({ids:g.record(m,f)}),D=g.union([po.strict(),so.strict()]);import{PrincipalTextSchema as co}from"@dfinity/zod-schemas";import*as p from"zod/v4";var lo=p.object({id:co}),mo=p.object({ids:p.record(m,f)}),_=p.object({storage:d.optional(),datastore:R.optional(),authentication:T.optional(),assertions:P.optional(),settings:w.optional(),collections:v.optional()}),k=p.union([p.object({...lo.shape,..._.shape}).strict(),p.object({...mo.shape,..._.shape}).strict()]);import*as L from"zod/v4";var Ct=L.strictObject({satellite:k,orbiter:D.optional(),emulator:F.optional()});export{X as AuthenticationConfigInternetIdentitySchema,Y as AuthenticationConfigRulesSchema,T as AuthenticationConfigSchema,E as CliConfigSchema,v as CollectionsSchema,H as ConsoleIdSchema,q as ConsoleIdsSchema,$ as DatastoreCollectionSchema,R as DatastoreConfigSchema,F as EmulatorConfigSchema,j as EncodingTypeSchema,Do as JUNO_PACKAGE_MISSION_CONTROL_ID,_o as JUNO_PACKAGE_ORBITER_ID,Fo as JUNO_PACKAGE_SATELLITE_ID,wo as JUNO_PACKAGE_SPUTNIK_ID,yo as JunoConfigEnvSchema,m as JunoConfigModeSchema,Ct as JunoConfigSchema,To as JunoConsoleConfigSchema,Q as JunoPackageDependenciesSchema,vo as JunoPackageSchema,z as MaxMemorySizeConfigSchema,Z as MemoryTextSchema,ro as ModuleLogVisibilitySchema,w as ModuleSettingsSchema,D as OrbiterConfigSchema,po as OrbiterIdSchema,so as OrbiterIdsSchema,I as PermissionTextSchema,K as PrecompressSchema,y as RuleSchema,Vo as RulesTypeSchema,P as SatelliteAssertionsSchema,k as SatelliteConfigOptionsSchema,lo as SatelliteIdSchema,mo as SatelliteIdsSchema,oo as StorageCollectionSchema,G as StorageConfigHeaderSchema,U as StorageConfigRedirectSchema,N as StorageConfigRewriteSchema,d as StorageConfigSchema,b as StorageConfigSourceGlobSchema,Lo as defineConfig,go as defineConsoleConfig};
3
+ function go(u){return u}import{PrincipalTextSchema as B}from"@dfinity/zod-schemas";import*as r from"zod/v4";import*as o from"zod/v4";import*as C from"zod/v4";var z=C.object({heap:C.bigint().optional(),stable:C.bigint().optional()}).strict();var b=o.string(),N=o.object({source:b,headers:o.array(o.tuple([o.string(),o.string()]))}).strict(),U=o.object({source:b,destination:o.string()}).strict(),K=o.object({source:b,location:o.string(),code:o.union([o.literal(301),o.literal(302)])}).strict(),d=o.object({headers:o.array(N).optional(),rewrites:o.array(U).optional(),redirects:o.array(K).optional(),iframe:o.enum(["deny","same-origin","allow-any"]).optional(),rawAccess:o.boolean().optional(),maxMemorySize:z.optional(),version:o.bigint().optional()});import*as t from"zod/v4";import*as J from"zod/v4";var j=J.enum(["identity","gzip","compress","deflate","br"]);var E=t.strictObject({pattern:t.string().optional(),mode:t.enum(["both","replace"]).optional(),algorithm:t.enum(["gzip","brotli"]).optional()}),M=t.strictObject({source:t.string().optional(),ignore:t.array(t.string()).optional(),precompress:t.union([E,t.array(E),t.literal(!1)]).optional(),encoding:t.array(t.tuple([t.string(),j])).optional(),predeploy:t.array(t.string()).optional(),postdeploy:t.array(t.string()).optional()});import*as c from"zod/v4";var m=c.union([c.literal("production"),c.string()]),yo=c.object({mode:m});import{PrincipalTextSchema as V}from"@dfinity/zod-schemas";import*as P from"zod/v4";var f=P.string().refine(u=>V.safeParse(u).success,{message:"Invalid textual representation of a Principal."});var H=r.object({id:B}),q=r.object({ids:r.record(m,f)}),A=r.object({...M.shape,storage:d.optional()}),To=r.union([r.object({...H.shape,...A.shape}).strict(),r.object({...q.shape,...A.shape}).strict()]);import*as p from"zod/v4";var Q=p.record(p.string(),p.string()),vo=p.object({name:p.string(),version:p.string(),dependencies:Q.optional()});var Fo="@junobuild/satellite",wo="@junobuild/sputnik",Do="@junobuild/mission-control",_o="@junobuild/orbiter";function Lo(u){return u}import*as l from"zod/v4";var T=l.strictObject({heapMemory:l.union([l.bigint(),l.boolean()]).optional()});import{PrincipalTextSchema as W}from"@dfinity/zod-schemas";import*as n from"zod/v4";var X=n.strictObject({derivationOrigin:n.url().optional(),externalAlternativeOrigins:n.array(n.url()).optional()}),Y=n.strictObject({allowedCallers:n.array(W)}),I=n.strictObject({internetIdentity:X.optional(),rules:Y.optional(),version:n.bigint().optional()});import*as x from"zod/v4";import*as i from"zod/v4";var v=i.enum(["public","private","managed","controllers"]),Z=i.enum(["heap","stable"]),Vo=i.enum(["db","storage"]),y=i.strictObject({collection:i.string(),read:v,write:v,memory:Z,createdAt:i.bigint().optional(),updatedAt:i.bigint().optional(),version:i.bigint().optional(),maxSize:i.bigint().optional(),maxChangesPerUser:i.number().optional(),maxCapacity:i.number().optional(),mutablePermissions:i.boolean().optional().default(!0),maxTokens:i.bigint().optional()});var $=y.omit({createdAt:!0,updatedAt:!0,maxSize:!0}),oo=y.omit({createdAt:!0,updatedAt:!0,maxCapacity:!0}),R=x.strictObject({datastore:x.array($).optional(),storage:x.array(oo).optional()});import*as S from"zod/v4";var F=S.strictObject({maxMemorySize:z.optional(),version:S.bigint().optional()});import*as e from"zod/v4";var O=e.strictObject({server:e.number().optional(),admin:e.number().optional()}),to=e.strictObject({console:e.number().optional()}),eo=e.strictObject({ports:O.extend(to.shape).optional()}),io=e.strictObject({ports:O.optional()}),no=e.strictObject({ports:O.optional()}),h=e.strictObject({type:e.enum(["docker","podman"]),image:e.string().optional(),name:e.string().optional(),volume:e.string().optional(),target:e.string().optional(),platform:e.enum(["linux/amd64","linux/arm64"]).optional()}),w=e.union([e.strictObject({runner:h.optional(),skylab:eo}),e.strictObject({runner:h.optional(),console:io}),e.strictObject({runner:h.optional(),satellite:no})]);import*as a from"zod/v4";var ro=a.enum(["controllers","public"]),D=a.strictObject({freezingThreshold:a.bigint().optional(),reservedCyclesLimit:a.bigint().optional(),logVisibility:ro.optional(),heapMemoryLimit:a.bigint().optional(),memoryAllocation:a.bigint().optional(),computeAllocation:a.bigint().optional()});import{PrincipalTextSchema as ao}from"@dfinity/zod-schemas";import*as g from"zod/v4";var so=g.object({id:ao}),po=g.object({ids:g.record(m,f)}),_=g.union([so.strict(),po.strict()]);import{PrincipalTextSchema as co}from"@dfinity/zod-schemas";import*as s from"zod/v4";var lo=s.object({id:co}),mo=s.object({ids:s.record(m,f)}),k=s.object({storage:d.optional(),datastore:F.optional(),authentication:I.optional(),assertions:T.optional(),settings:D.optional(),collections:R.optional()}),L=s.union([s.object({...lo.shape,...k.shape}).strict(),s.object({...mo.shape,...k.shape}).strict()]);import*as G from"zod/v4";var Ct=G.strictObject({satellite:L,orbiter:_.optional(),emulator:w.optional()});export{X as AuthenticationConfigInternetIdentitySchema,Y as AuthenticationConfigRulesSchema,I as AuthenticationConfigSchema,M as CliConfigSchema,R as CollectionsSchema,H as ConsoleIdSchema,q as ConsoleIdsSchema,$ as DatastoreCollectionSchema,F as DatastoreConfigSchema,w as EmulatorConfigSchema,j as EncodingTypeSchema,Do as JUNO_PACKAGE_MISSION_CONTROL_ID,_o as JUNO_PACKAGE_ORBITER_ID,Fo as JUNO_PACKAGE_SATELLITE_ID,wo as JUNO_PACKAGE_SPUTNIK_ID,yo as JunoConfigEnvSchema,m as JunoConfigModeSchema,Ct as JunoConfigSchema,To as JunoConsoleConfigSchema,Q as JunoPackageDependenciesSchema,vo as JunoPackageSchema,z as MaxMemorySizeConfigSchema,Z as MemoryTextSchema,ro as ModuleLogVisibilitySchema,D as ModuleSettingsSchema,_ as OrbiterConfigSchema,so as OrbiterIdSchema,po as OrbiterIdsSchema,v as PermissionTextSchema,E as PrecompressSchema,y as RuleSchema,Vo as RulesTypeSchema,T as SatelliteAssertionsSchema,L as SatelliteConfigOptionsSchema,lo as SatelliteIdSchema,mo as SatelliteIdsSchema,oo as StorageCollectionSchema,N as StorageConfigHeaderSchema,K as StorageConfigRedirectSchema,U as StorageConfigRewriteSchema,d as StorageConfigSchema,b as StorageConfigSourceGlobSchema,Lo as defineConfig,go as defineConsoleConfig};
4
4
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/console/config.ts", "../../src/console/console.config.ts", "../../src/shared/storage.config.ts", "../../src/shared/feature.config.ts", "../../src/types/cli.config.ts", "../../src/types/encoding.ts", "../../src/types/juno.env.ts", "../../src/utils/principal.utils.ts", "../../src/pkg/juno.package.ts", "../../src/pkg/juno.package.constants.ts", "../../src/satellite/config.ts", "../../src/satellite/configs/assertions.config.ts", "../../src/satellite/configs/authentication.config.ts", "../../src/satellite/configs/collections.ts", "../../src/satellite/configs/rules.ts", "../../src/satellite/configs/datastore.config.ts", "../../src/satellite/configs/emulator.config.ts", "../../src/satellite/configs/module.settings.ts", "../../src/satellite/configs/orbiter.config.ts", "../../src/satellite/configs/satellite.config.ts", "../../src/satellite/juno.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 PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../shared/storage.config';\nimport {type CliConfig, CliConfigSchema} from '../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../types/juno.env';\nimport type {Either} from '../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../utils/principal.utils';\n\n/**\n * @see ConsoleId\n */\nexport const ConsoleIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a console.\n * @interface ConsoleId\n */\nexport interface ConsoleId {\n /**\n * The unique identifier (ID) of the console.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see ConsoleIds\n */\nexport const ConsoleIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of console identifiers to different configurations based on the mode of the application.\n * @interface ConsoleIds\n */\nexport interface ConsoleIds {\n /**\n * A mapping of console identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different console IDs, such as production, staging, etc.\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\nconst JunoConsoleConfigBaseSchema = z.object({\n ...CliConfigSchema.shape,\n storage: StorageConfigSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const JunoConsoleConfigSchema = z.union([\n z\n .object({\n ...ConsoleIdSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...ConsoleIdsSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * Represents the configuration for a console.\n * @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig\n */\nexport type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> &\n CliConfig & {\n /**\n * Optional configuration parameters for the console, affecting the operational behavior of its Storage.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n };\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from './feature.config';\n\n/**\n * @see StorageConfigSourceGlob\n */\nexport const StorageConfigSourceGlobSchema = z.string();\n\n/**\n * Represents a glob pattern for matching files in the Storage configuration.\n * @typedef {string} StorageConfigSourceGlob\n */\nexport type StorageConfigSourceGlob = string;\n\n/**\n * @see StorageConfigHeader\n */\nexport const StorageConfigHeaderSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n headers: z.array(z.tuple([z.string(), z.string()]))\n })\n .strict();\n\n/**\n * Headers allow the client and the Storage to pass additional information along with a request or a response.\n * Some sets of headers can affect how the browser handles the page and its content.\n * @interface StorageConfigHeader\n */\nexport interface StorageConfigHeader {\n /**\n * The glob pattern used to match files within the Storage that these headers will apply to.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * An array of key-value pairs representing the headers to apply.\n * Each pair includes the header name and its value.\n * Example: `[[\"Cache-Control\", \"max-age=3600\"], [\"X-Custom-Header\", \"value\"]]`\n * @type {Array<[string, string]>}\n */\n headers: [string, string][];\n}\n\n/**\n * @see StorageConfigRewrite\n */\nexport const StorageConfigRewriteSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n destination: z.string()\n })\n .strict();\n\n/**\n * You can utilize optional rewrites to display the same content for multiple URLs.\n * Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.\n * @interface StorageConfigRewrite\n */\nexport interface StorageConfigRewrite {\n /**\n * The glob pattern or specific path to match for incoming requests.\n * Matches are rewritten to the specified destination.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The destination path or file to which matching requests should be rewritten.\n * @type {string}\n */\n destination: string;\n}\n\n/**\n * @see StorageConfigRedirect\n */\nexport const StorageConfigRedirectSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n location: z.string(),\n code: z.union([z.literal(301), z.literal(302)])\n })\n .strict();\n\n/**\n * Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.\n * @interface StorageConfigRedirect\n */\nexport interface StorageConfigRedirect {\n /**\n * The glob pattern or specific path to match for incoming requests that should be redirected.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The URL or path to which the request should be redirected.\n * @type {string}\n */\n location: string;\n\n /**\n * The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect).\n * @type {301 | 302}\n */\n code: 301 | 302;\n}\n\n/**\n * @see StorageConfig\n */\nexport const StorageConfigSchema = z.object({\n headers: z.array(StorageConfigHeaderSchema).optional(),\n rewrites: z.array(StorageConfigRewriteSchema).optional(),\n redirects: z.array(StorageConfigRedirectSchema).optional(),\n iframe: z.enum(['deny', 'same-origin', 'allow-any']).optional(),\n rawAccess: z.boolean().optional(),\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the hosting behavior of the Storage.\n * @interface StorageConfig\n */\nexport interface StorageConfig {\n /**\n * Optional array of `StorageConfigHeader` objects to define custom HTTP headers for specific files or patterns.\n * @type {StorageConfigHeader[]}\n * @optional\n */\n headers?: StorageConfigHeader[];\n\n /**\n * Optional array of `StorageConfigRewrite` objects to define rewrite rules.\n * @type {StorageConfigRewrite[]}\n * @optional\n */\n rewrites?: StorageConfigRewrite[];\n\n /**\n * Optional array of `StorageConfigRedirect` objects to define HTTP redirects.\n * @type {StorageConfigRedirect[]}\n * @optional\n */\n redirects?: StorageConfigRedirect[];\n\n /**\n * For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.\n *\n * Options are:\n * - `deny`: Prevents any content from being displayed in an iframe.\n * - `same-origin`: Allows iframe content from the same origin as the page.\n * - `allow-any`: Allows iframe content from any origin.\n *\n * If not specified, then `deny` is used as default value.\n * @type {'deny' | 'same-origin' | 'allow-any'}\n * @optional\n */\n iframe?: 'deny' | 'same-origin' | 'allow-any';\n\n /**\n * Optional flag to enable access for raw URLs.\n *\n * \u26A0\uFE0F **WARNING: Enabling this option is highly discouraged due to security risks.**\n *\n * Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation.\n * This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content.\n * Since there is no validation on raw URLs, the client may receive and process harmful data.\n *\n * If not specified, the default value is `false`.\n * @type {boolean}\n * @optional\n */\n rawAccess?: boolean;\n\n /**\n * Configuration for maximum memory size limits for the Storage.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Storage and smart contract continue to operate normally but reject the upload of new assets.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see MaxMemorySizeConfig\n */\nexport const MaxMemorySizeConfigSchema = z\n .object({\n heap: z.bigint().optional(),\n stable: z.bigint().optional()\n })\n .strict();\n\n/**\n * Configuration for granting access to features only if the maximum memory size limits are not reached.\n *\n * The maximum size corresponds to the overall heap or stable memory of the smart contract.\n */\nexport interface MaxMemorySizeConfig {\n /**\n * Maximum allowed heap memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the heap memory size.\n *\n * @type {bigint}\n */\n heap?: bigint;\n\n /**\n * Maximum allowed stable memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the stable memory size.\n *\n * @type {bigint}\n */\n stable?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type EncodingType, EncodingTypeSchema} from './encoding';\n\n/**\n * @see Precompress\n */\nexport const PrecompressSchema = z.strictObject({\n pattern: z.string().optional(),\n mode: z.enum(['both', 'replace']).optional(),\n algorithm: z.enum(['gzip', 'brotli']).optional()\n});\n\n/**\n * @see CliConfig\n */\nexport const CliConfigSchema = z.strictObject({\n source: z.string().optional(),\n ignore: z.array(z.string()).optional(),\n precompress: z.union([PrecompressSchema, z.literal(false)]).optional(),\n encoding: z.array(z.tuple([z.string(), EncodingTypeSchema])).optional(),\n predeploy: z.array(z.string()).optional(),\n postdeploy: z.array(z.string()).optional()\n});\n\n/**\n * Configuration for compressing files during deployment.\n */\nexport interface Precompress {\n /**\n * Glob pattern for files to precompress.\n * @default any css|js|mjs|html\n */\n pattern?: string;\n\n /**\n * Determines what happens to the original files after compression:\n * - `\"both\"` \u2014 upload both original and compressed versions.\n * - `\"replace\"` \u2014 upload only the compressed version (served with `Content-Encoding`).\n *\n * @default \"both\"\n */\n mode?: 'both' | 'replace';\n\n /**\n * Compression algorithm.\n * @default \"gzip\"\n */\n algorithm?: 'gzip' | 'brotli';\n}\n\n/**\n * The configuration used by the CLI to resolve, prepare and deploy your app.\n */\nexport interface CliConfig {\n /**\n * Specifies the directory from which to deploy to Storage.\n * For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.\n *\n * @default 'build'\n * @type {string}\n */\n source?: string;\n\n /**\n * Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.\n * @type {string[]}\n * @optional\n */\n ignore?: string[];\n\n /**\n * Controls compression optimization for files in the source folder.\n *\n * By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)\n * are compressed, and both the original and compressed versions are uploaded.\n *\n * Set to `false` to disable, or provide a {@link Precompress} object to customize.\n *\n * @type {Precompress | false}\n * @optional\n */\n precompress?: Precompress | false;\n\n /**\n * Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:\n * - `.Z` for compress,\n * - `.gz` for gzip,\n * - `.br` for brotli,\n * - `.zlib` for deflate,\n * - anything else defaults to `identity`.\n * The \"encoding\" attribute allows overriding default mappings with an array of glob patterns and encoding types.\n * @type {Array<[string, EncodingType]>}\n * @optional\n */\n encoding?: Array<[string, EncodingType]>;\n\n /**\n * Defines a list of scripts or commands to be run before the deployment process begins.\n * This can be useful for tasks such as compiling assets, running tests, or building production-ready files.\n *\n * Example:\n * ```json\n * {\n * \"predeploy\": [\"npm run build\", \"npm run lint\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n predeploy?: string[];\n\n /**\n * Defines a list of scripts or commands to be run after the deployment process completes.\n * This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.\n *\n * Example:\n * ```json\n * {\n * \"postdeploy\": [\"./scripts/notify-admins.sh\", \"echo 'Deployment complete'\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n postdeploy?: string[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * see EncodingType\n */\nexport const EncodingTypeSchema = z.enum(['identity', 'gzip', 'compress', 'deflate', 'br']);\n\n/**\n * Represents the encoding types for assets.\n * @typedef {'identity' | 'gzip' | 'compress' | 'deflate' | 'br'} EncodingType\n */\nexport type EncodingType = 'identity' | 'gzip' | 'compress' | 'deflate' | 'br';\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoConfigMode\n */\nexport const JunoConfigModeSchema = z.union([z.literal('production'), z.string()]);\n\n/**\n * Represents the mode of the Juno configuration.\n * @typedef {'production' | string} JunoConfigMode\n */\nexport type JunoConfigMode = 'production' | string;\n\n/**\n * @see JunoConfigEnv\n */\nexport const JunoConfigEnvSchema = z.object({\n mode: JunoConfigModeSchema\n});\n\n/**\n * Represents the environment configuration for Juno.\n * @interface JunoConfigEnv\n */\nexport interface JunoConfigEnv {\n /**\n * The mode of the Juno configuration.\n * @type {JunoConfigMode}\n */\n mode: JunoConfigMode;\n}\n", "import {PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * Ensures reliable validation of PrincipalTextSchema inside z.record.\n */\nexport const StrictPrincipalTextSchema = z\n .string()\n .refine((val) => PrincipalTextSchema.safeParse(val).success, {\n message: 'Invalid textual representation of a Principal.'\n });\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoPackageDependencies\n */\nexport const JunoPackageDependenciesSchema = z.record(z.string(), z.string());\n\n/**\n * @see JunoPackage\n */\nexport const JunoPackageSchema = z.object({\n name: z.string(),\n version: z.string(),\n dependencies: JunoPackageDependenciesSchema.optional()\n});\n", "/**\n * The ID used to identify a Juno Satellite.\n *\n * It is either the name of a (stock) package or\n * used when checking if a canister includes `@junobuild/satellite` as a dependency.\n */\nexport const JUNO_PACKAGE_SATELLITE_ID = '@junobuild/satellite';\n\n/**\n * The ID used to identify a Juno Sputnik crate.\n *\n * Used when checking if a canister includes `@junobuild/sputnik` as a dependency.\n */\nexport const JUNO_PACKAGE_SPUTNIK_ID = '@junobuild/sputnik';\n\n/**\n * The ID used to identify a Juno Mission Control package.\n */\nexport const JUNO_PACKAGE_MISSION_CONTROL_ID = '@junobuild/mission-control';\n\n/**\n * The ID used to identify a Juno Orbiter package.\n */\nexport const JUNO_PACKAGE_ORBITER_ID = '@junobuild/orbiter';\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", "import * as z from 'zod/v4';\n\n/**\n * @see SatelliteAssertions\n */\nexport const SatelliteAssertionsSchema = z.strictObject({\n heapMemory: z.union([z.bigint(), z.boolean()]).optional()\n});\n\n/**\n * Configuration for satellite assertions.\n * @interface SatelliteAssertions\n */\nexport interface SatelliteAssertions {\n /**\n * Configuration for the heap memory size check, which can be:\n * - `true` to enable the check with a default threshold of 900MB,\n * - `false` to disable the heap memory size check,\n * - A `bigint` to specify a custom threshold in MB (megabytes) for the heap memory size check.\n *\n * If not specified, then `true` is used as the default value.\n * @type {bigint | boolean}\n */\n heapMemory?: bigint | boolean;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * @see AuthenticationConfigInternetIdentity\n */\nexport const AuthenticationConfigInternetIdentitySchema = z.strictObject({\n derivationOrigin: z.url().optional(),\n externalAlternativeOrigins: z.array(z.url()).optional()\n});\n\n/**\n * Configure the behavior of Internet Identity.\n * @interface AuthenticationConfigInternetIdentity\n */\nexport interface AuthenticationConfigInternetIdentity {\n /**\n * This setting ensures that users are recognized on your app, regardless of whether they use the default URL or any other custom domain.\n * For example, if set to hello.com, a user signing on at https://hello.com will receive the same identifier (principal) as when signing on at https://www.hello.com.\n * @type {string}\n * @optional\n */\n derivationOrigin?: string;\n\n /**\n * An optional list of external alternative origins allowed for authentication, which can be useful if you want to reuse the same derivation origin across multiple Satellites.\n * @type {string[]}\n * @optional\n */\n externalAlternativeOrigins?: string[];\n}\n\n/**\n * @see AuthenticationConfigRules\n */\nexport const AuthenticationConfigRulesSchema = z.strictObject({\n allowedCallers: z.array(PrincipalTextSchema)\n});\n\n/**\n * Configure the rules of the authentication.\n * @interface AuthenticationConfigRules\n */\nexport interface AuthenticationConfigRules {\n /**\n * This option defines who's allowed to use your app.\n *\n * If you enable this, only the identities you list (in user key, format, like `bj4r4-5cdop-...`) will be allowed to sign in or use any features like Datastore or Storage.\n *\n * @type {PrincipalText[]}\n * @optional\n */\n allowedCallers: PrincipalText[];\n}\n\n/**\n * @see AuthenticationConfig\n */\nexport const AuthenticationConfigSchema = z.strictObject({\n internetIdentity: AuthenticationConfigInternetIdentitySchema.optional(),\n rules: AuthenticationConfigRulesSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the Authentication options of a Satellite.\n * @interface AuthenticationConfig\n */\nexport interface AuthenticationConfig {\n /**\n * Optional configuration of Internet Identity authentication method.\n * @type {AuthenticationConfigInternetIdentity}\n * @optional\n */\n internetIdentity?: AuthenticationConfigInternetIdentity;\n\n /**\n * Optional configuration for the rules of the authentication.\n * @type {AuthenticationConfigRules}\n * @optional\n */\n rules?: AuthenticationConfigRules;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type Rule, RuleSchema} from './rules';\n\n/**\n * @see DatastoreCollection\n */\nexport const DatastoreCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxSize: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Datastore.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>} DatastoreCollection\n */\nexport type DatastoreCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>;\n\n/**\n * @see StorageCollection\n */\nexport const StorageCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxCapacity: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Storage.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>} StorageCollection\n */\nexport type StorageCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>;\n\n/**\n * @see Collections\n */\nexport const CollectionsSchema = z.strictObject({\n datastore: z.array(DatastoreCollectionSchema).optional(),\n storage: z.array(StorageCollectionSchema).optional()\n});\n\n/**\n * Represents the configuration for all the collections of a Satellite.\n * @interface Collections\n */\nexport interface Collections {\n /**\n * An optional array that defines the collections of the Datastore.\n * @type {DatastoreCollection[]}\n * @optional\n */\n datastore?: DatastoreCollection[];\n\n /**\n * An optional array that defines the collections of the Storage.\n * @type {StorageCollection[]}\n * @optional\n */\n storage?: StorageCollection[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see PermissionText\n */\nexport const PermissionTextSchema = z.enum(['public', 'private', 'managed', 'controllers']);\n\n/**\n * Represents the permission levels for read and write access.\n * @typedef {'public' | 'private' | 'managed' | 'controllers'} PermissionText\n */\nexport type PermissionText = 'public' | 'private' | 'managed' | 'controllers';\n\n/**\n * @see MemoryText\n */\nexport const MemoryTextSchema = z.enum(['heap', 'stable']);\n\n/**\n * Represents the memory types.\n * @typedef {'heap' | 'stable'} MemoryText\n */\nexport type MemoryText = 'heap' | 'stable';\n\n/**\n * @see RulesType\n */\nexport const RulesTypeSchema = z.enum(['db', 'storage']);\n\n/**\n * Represents the types of rules.\n * @typedef {'db' | 'storage'} RulesType\n */\nexport type RulesType = 'db' | 'storage';\n\n/**\n * @see Rule\n */\nexport const RuleSchema = z.strictObject({\n collection: z.string(),\n read: PermissionTextSchema,\n write: PermissionTextSchema,\n memory: MemoryTextSchema,\n createdAt: z.bigint().optional(),\n updatedAt: z.bigint().optional(),\n version: z.bigint().optional(),\n maxSize: z.bigint().optional(),\n maxChangesPerUser: z.number().optional(),\n maxCapacity: z.number().optional(),\n mutablePermissions: z.boolean().optional().default(true),\n maxTokens: z.bigint().optional()\n});\n\n/**\n * Represents a rule configuration for a collection.\n * @interface Rule\n */\nexport interface Rule {\n /**\n * The name of the collection the rule applies to.\n * @type {string}\n */\n collection: string;\n\n /**\n * The permission level for read access.\n * @type {PermissionText}\n */\n read: PermissionText;\n\n /**\n * The permission level for write access.\n * @type {PermissionText}\n */\n write: PermissionText;\n\n /**\n * The type of memory allocated for the collection.\n * @type {MemoryText}\n */\n memory: MemoryText;\n\n /**\n * The timestamp when the rule was created.\n * @type {bigint}\n * @optional\n */\n createdAt?: bigint;\n\n /**\n * The timestamp when the rule was last updated.\n * @type {bigint}\n * @optional\n */\n updatedAt?: bigint;\n\n /**\n * The version of the rule.\n * @type {bigint}\n * @optional\n * @description Must be provided when updating the rule to ensure the correct version is being updated.\n */\n version?: bigint;\n\n /**\n * The maximum size of the collection in bytes.\n * @type {number}\n * @optional\n */\n maxSize?: bigint;\n\n /**\n * The maximum number of changes (create, update or delete) per user for the collection.\n * @type {number}\n * @optional\n */\n maxChangesPerUser?: number;\n\n /**\n * The maximum capacity of the collection.\n * @type {number}\n * @optional\n */\n maxCapacity?: number;\n\n /**\n * Indicates whether the permissions are mutable.\n * @default true\n * @type {boolean}\n */\n mutablePermissions?: boolean;\n\n /**\n * The maximum number of writes and deletes per minute.\n */\n maxTokens?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from '../../shared/feature.config';\n\n/**\n * @see DatastoreConfig\n */\nexport const DatastoreConfigSchema = z.strictObject({\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the behavior of the Datastore.\n * @interface DatastoreConfig\n */\nexport interface DatastoreConfig {\n /**\n * Configuration for maximum memory size limits for the Datastore.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Datastore and smart contract continue to operate normally but reject the creation or updates of documents.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\nconst EmulatorPortsSchema = z.strictObject({\n /**\n * @default 5987\n */\n server: z.number().optional(),\n\n /**\n * @default 5999\n */\n admin: z.number().optional()\n});\n\nconst ConsolePortSchema = z.strictObject({\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: z.number().optional()\n});\n\n/**\n * Represents the ports exposed by an emulator container.\n */\nexport interface EmulatorPorts {\n /**\n * The port of the server used to simulate execution. This is the port your app connects to.\n * Also known as the \"local Internet Computer replica\" or the \"Pocket-IC port\".\n * @default 5987\n */\n server?: number;\n\n /**\n * The port of the admin server used for tasks like transferring ICP from the ledger.\n * @default 5999\n */\n admin?: number;\n}\n\n/**\n * @see EmulatorSkylab\n */\nconst EmulatorSkylabSchema = z.strictObject({\n ports: EmulatorPortsSchema.extend(ConsolePortSchema.shape).optional()\n});\n\n/**\n * Configuration for the Skylab emulator.\n */\nexport interface EmulatorSkylab {\n /**\n * Ports exposed by the Skylab container.\n */\n ports?: EmulatorPorts & {\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: number;\n };\n}\n\n/**\n * @see EmulatorConsole\n */\nconst EmulatorConsoleSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Console emulator.\n */\nexport interface EmulatorConsole {\n /**\n * Ports exposed by the Console container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorSatellite\n */\nconst EmulatorSatelliteSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Satellite emulator.\n */\nexport interface EmulatorSatellite {\n /**\n * Ports exposed by the Satellite container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorRunner\n */\nconst EmulatorRunnerSchema = z.strictObject({\n type: z.enum(['docker', 'podman']),\n image: z.string().optional(),\n name: z.string().optional(),\n volume: z.string().optional(),\n target: z.string().optional(),\n platform: z.enum(['linux/amd64', 'linux/arm64']).optional()\n});\n\n/**\n * Shared options for all runner variants.\n */\nexport interface EmulatorRunner {\n /**\n * The containerization tool to run the emulator.\n */\n type: 'docker' | 'podman';\n\n /**\n * Image reference.\n * @default depends on emulator type, e.g. \"junobuild/skylab:latest\"\n */\n image?: string;\n\n /**\n * Optional container name to use for the emulator.\n * Useful for reusing or managing a specific container.\n */\n name?: string;\n\n /**\n * Persistent volume to store internal state.\n * @default \"juno\"\n */\n volume?: string;\n\n /**\n * Shared folder for deploying and hot-reloading serverless functions.\n */\n target?: string;\n\n /**\n * The platform to use when running the emulator container.\n */\n platform?: 'linux/amd64' | 'linux/arm64';\n}\n\n/**\n * @see EmulatorConfig\n */\nexport const EmulatorConfigSchema = z.union([\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n skylab: EmulatorSkylabSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n console: EmulatorConsoleSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n satellite: EmulatorSatelliteSchema\n })\n]);\n\n/**\n * The configuration for running the Juno emulator.\n */\nexport type EmulatorConfig =\n | {runner?: EmulatorRunner; skylab: EmulatorSkylab}\n | {runner?: EmulatorRunner; console: EmulatorConsole}\n | {runner?: EmulatorRunner; satellite: EmulatorSatellite};\n", "import * as z from 'zod/v4';\n\n/**\n * @see ModuleLogVisibility\n */\nexport const ModuleLogVisibilitySchema = z.enum(['controllers', 'public']);\n\n/**\n * Specifies who can see the logs of the module.\n *\n * - 'controllers': Only the controllers of the module can see the logs.\n * - 'public': Everyone can see the logs.\n *\n * @typedef {'controllers' | 'public'} ModuleLogVisibility\n */\nexport type ModuleLogVisibility = 'controllers' | 'public';\n\n/**\n * @see ModuleSettings\n */\nexport const ModuleSettingsSchema = z.strictObject({\n freezingThreshold: z.bigint().optional(),\n reservedCyclesLimit: z.bigint().optional(),\n logVisibility: ModuleLogVisibilitySchema.optional(),\n heapMemoryLimit: z.bigint().optional(),\n memoryAllocation: z.bigint().optional(),\n computeAllocation: z.bigint().optional()\n});\n\n/**\n * Settings for a module - Satellite, Mission Control or Orbiter.\n *\n * These settings control various aspects of the module's behavior and resource usage.\n *\n * @interface ModuleSettings\n */\nexport interface ModuleSettings {\n /**\n * The cycle threshold below which the module will automatically stop to avoid running out of cycles.\n *\n * For example, if set to `BigInt(1000000)`, the module will stop when it has fewer than 1,000,000 cycles remaining.\n *\n * @type {bigint}\n */\n freezingThreshold?: bigint;\n\n /**\n * The number of cycles reserved for the module's operations to ensure it has enough cycles to function.\n *\n * For example, setting it to `BigInt(5000000)` reserves 5,000,000 cycles for the module.\n *\n * @type {bigint}\n */\n reservedCyclesLimit?: bigint;\n\n /**\n * Controls who can see the module's logs.\n *\n * @type {ModuleLogVisibility}\n */\n logVisibility?: ModuleLogVisibility;\n\n /**\n * The maximum amount of WebAssembly (Wasm) memory the module can use on the heap.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 64)` allows the module to use up to 64 MB of Wasm memory.\n *\n * @type {bigint}\n */\n heapMemoryLimit?: bigint;\n\n /**\n * The amount of memory explicitly allocated to the module.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 128)` allocates 128 MB of memory to the module.\n *\n * @type {bigint}\n */\n memoryAllocation?: bigint;\n\n /**\n * The proportion of compute capacity allocated to the module.\n *\n * This is a fraction of the total compute capacity of the subnet. For example, setting it to `BigInt(10)` allocates 10% of the compute capacity to the module.\n *\n * @type {bigint}\n */\n computeAllocation?: bigint;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\n\n/**\n * @see OrbiterId\n */\nexport const OrbiterIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the configuration for an orbiter.\n * @interface OrbiterId\n */\nexport interface OrbiterId {\n /**\n * The identifier of the orbiter used in the dApp.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see OrbiterIds\n */\nexport const OrbiterIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of orbiter identitifiers to different configurations based on the mode of the application.\n * @interface OrbiterIds\n */\nexport interface OrbiterIds {\n /**\n * A mapping of orbiter identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different orbiter IDs, such as production, development, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"development\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see OrbiterConfig\n */\nexport const OrbiterConfigSchema = z.union([OrbiterIdSchema.strict(), OrbiterIdsSchema.strict()]);\n\n/**\n * Represents the configuration for an orbiter (analytics).\n *\n * @typedef {Either<OrbiterId, OrbiterIds>} OrbiterConfig\n * @property {OrbiterId | OrbiterIds} OrbiterId or OrbiterIds - Defines a unique Orbiter or a collection of Orbiters.\n */\nexport type OrbiterConfig = Either<OrbiterId, OrbiterIds>;\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../../shared/storage.config';\nimport type {CliConfig} from '../../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\nimport {type SatelliteAssertions, SatelliteAssertionsSchema} from './assertions.config';\nimport {type AuthenticationConfig, AuthenticationConfigSchema} from './authentication.config';\nimport {type Collections, CollectionsSchema} from './collections';\nimport {type DatastoreConfig, DatastoreConfigSchema} from './datastore.config';\nimport {type ModuleSettings, ModuleSettingsSchema} from './module.settings';\n\n/**\n * @see SatelliteId\n */\nexport const SatelliteIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a satellite.\n * @interface SatelliteId\n */\nexport interface SatelliteId {\n /**\n * The unique identifier (ID) of the satellite for this application.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see SatelliteIds\n */\nexport const SatelliteIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of satellite identifiers to different configurations based on the mode of the application.\n * @interface SatelliteIds\n */\nexport interface SatelliteIds {\n /**\n * A mapping of satellite identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different satellite IDs, such as production, staging, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"staging\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see SatelliteConfigOptions\n */\nconst SatelliteConfigOptionsBaseSchema = z.object({\n storage: StorageConfigSchema.optional(),\n datastore: DatastoreConfigSchema.optional(),\n authentication: AuthenticationConfigSchema.optional(),\n assertions: SatelliteAssertionsSchema.optional(),\n settings: ModuleSettingsSchema.optional(),\n collections: CollectionsSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const SatelliteConfigOptionsSchema = z.union([\n z\n .object({\n ...SatelliteIdSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...SatelliteIdsSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning\n * the operational behavior of various aspects of a Satellite, such as storage, datastore,\n * authentication, and deployment assertions.\n *\n * These options affect specific modules of the Satellite and may require manual application of\n * changes, typically through CLI commands (e.g., `juno config`).\n *\n * @interface SatelliteConfigOptions\n *\n * @property {StorageConfig} [storage] - Configuration settings for storage management in the Satellite.\n * @property {DatastoreConfig} [datastore] - Configuration settings for datastore management.\n * @property {AuthenticationConfig} [authentication] - Authentication-specific configurations.\n * @property {SatelliteAssertions} [assertions] - Conditions and assertions for deployment or operational checks.\n * @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.\n */\nexport interface SatelliteConfigOptions {\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Datastore.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {DatastoreConfig}\n * @optional\n */\n datastore?: DatastoreConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Authentication.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {AuthenticationConfig}\n * @optional\n */\n authentication?: AuthenticationConfig;\n\n /**\n * Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.\n * @type {SatelliteAssertions}\n * @optional\n */\n assertions?: SatelliteAssertions;\n\n /**\n * Optional configuration parameters for the Satellite.\n * These settings control various aspects of the module's behavior and resource usage.\n * @type {ModuleSettings}\n * @optional\n */\n settings?: ModuleSettings;\n\n /**\n * Optional configuration for the Datastore and Storage collections.\n * @type {Collections}\n * @optional\n */\n collections?: Collections;\n}\n\n/**\n * Represents the configuration for a satellite.\n *\n * @typedef {Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions} SatelliteConfig\n * @property {SatelliteId | SatelliteIds} SatelliteId or SatelliteIds - Defines a unique Satellite or a collection of Satellites.\n * @property {CliConfig} CliConfig - Configuration specific to the CLI interface.\n * @property {SatelliteConfigOptions} SatelliteConfigOptions - Additional configuration options for the Satellite.\n */\nexport type SatelliteConfig = Either<SatelliteId, SatelliteIds> &\n CliConfig &\n SatelliteConfigOptions;\n", "import * as z from 'zod/v4';\nimport {type EmulatorConfig, EmulatorConfigSchema} from './configs/emulator.config';\nimport {type OrbiterConfig, OrbiterConfigSchema} from './configs/orbiter.config';\nimport {type SatelliteConfig, SatelliteConfigOptionsSchema} from './configs/satellite.config';\n\n/**\n * @see JunoConfig\n */\nexport const JunoConfigSchema = z.strictObject({\n satellite: SatelliteConfigOptionsSchema,\n orbiter: OrbiterConfigSchema.optional(),\n emulator: EmulatorConfigSchema.optional()\n});\n\n/**\n * Represents the overall configuration for Juno.\n * @interface JunoConfig\n */\nexport interface JunoConfig {\n /**\n * The configuration for the satellite.\n * @type {SatelliteConfig}\n */\n satellite: SatelliteConfig;\n\n /**\n * The optional configuration for the orbiter.\n * @type {OrbiterConfig}\n * @optional\n */\n orbiter?: OrbiterConfig;\n\n /**\n * Your options for the emulator.\n */\n emulator?: EmulatorConfig;\n}\n"],
5
- "mappings":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AAuB,SAAO,EAAE,SAAS,EACzC,cAAeD,GAA0B,SAAS,EAClD,gBAAmB,SAAO,EAAE,SAAS,EACrC,iBAAoB,SAAO,EAAE,SAAS,EACtC,kBAAqB,SAAO,EAAE,SAAS,CACzC,CAAC,EC3BD,OAA4B,uBAAAE,OAA0B,uBACtD,UAAYC,MAAO,SAQZ,IAAMC,GAAoB,SAAO,CACtC,GAAIC,EACN,CAAC,EAiBYC,GAAqB,SAAO,CACvC,IAAO,SAAOC,EAAsBC,CAAyB,CAC/D,CAAC,EAyBYC,EAAwB,QAAM,CAACL,GAAgB,OAAO,EAAGE,GAAiB,OAAO,CAAC,CAAC,ECvDhG,OAA4B,uBAAAI,OAA0B,uBACtD,UAAYC,MAAO,SAeZ,IAAMC,GAAsB,SAAO,CACxC,GAAIC,EACN,CAAC,EAiBYC,GAAuB,SAAO,CACzC,IAAO,SAAOC,EAAsBC,CAAyB,CAC/D,CAAC,EAyBKC,EAAqC,SAAO,CAChD,QAASC,EAAoB,SAAS,EACtC,UAAWC,EAAsB,SAAS,EAC1C,eAAgBC,EAA2B,SAAS,EACpD,WAAYC,EAA0B,SAAS,EAC/C,SAAUC,EAAqB,SAAS,EACxC,YAAaC,EAAkB,SAAS,CAC1C,CAAC,EAKYC,EAAiC,QAAM,CAE/C,SAAO,CACN,GAAGZ,GAAkB,MACrB,GAAGK,EAAiC,KACtC,CAAC,EACA,OAAO,EAEP,SAAO,CACN,GAAGH,GAAmB,MACtB,GAAGG,EAAiC,KACtC,CAAC,EACA,OAAO,CACZ,CAAC,ECvFD,UAAYQ,MAAO,SAQZ,IAAMC,GAAqB,eAAa,CAC7C,UAAWC,EACX,QAASC,EAAoB,SAAS,EACtC,SAAUC,EAAqB,SAAS,CAC1C,CAAC",
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 PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../shared/storage.config';\nimport {type CliConfig, CliConfigSchema} from '../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../types/juno.env';\nimport type {Either} from '../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../utils/principal.utils';\n\n/**\n * @see ConsoleId\n */\nexport const ConsoleIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a console.\n * @interface ConsoleId\n */\nexport interface ConsoleId {\n /**\n * The unique identifier (ID) of the console.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see ConsoleIds\n */\nexport const ConsoleIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of console identifiers to different configurations based on the mode of the application.\n * @interface ConsoleIds\n */\nexport interface ConsoleIds {\n /**\n * A mapping of console identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different console IDs, such as production, staging, etc.\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\nconst JunoConsoleConfigBaseSchema = z.object({\n ...CliConfigSchema.shape,\n storage: StorageConfigSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const JunoConsoleConfigSchema = z.union([\n z\n .object({\n ...ConsoleIdSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...ConsoleIdsSchema.shape,\n ...JunoConsoleConfigBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * Represents the configuration for a console.\n * @typedef {Either<ConsoleId, ConsoleIds>} ConsoleConfig\n */\nexport type JunoConsoleConfig = Either<ConsoleId, ConsoleIds> &\n CliConfig & {\n /**\n * Optional configuration parameters for the console, affecting the operational behavior of its Storage.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n };\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from './feature.config';\n\n/**\n * @see StorageConfigSourceGlob\n */\nexport const StorageConfigSourceGlobSchema = z.string();\n\n/**\n * Represents a glob pattern for matching files in the Storage configuration.\n * @typedef {string} StorageConfigSourceGlob\n */\nexport type StorageConfigSourceGlob = string;\n\n/**\n * @see StorageConfigHeader\n */\nexport const StorageConfigHeaderSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n headers: z.array(z.tuple([z.string(), z.string()]))\n })\n .strict();\n\n/**\n * Headers allow the client and the Storage to pass additional information along with a request or a response.\n * Some sets of headers can affect how the browser handles the page and its content.\n * @interface StorageConfigHeader\n */\nexport interface StorageConfigHeader {\n /**\n * The glob pattern used to match files within the Storage that these headers will apply to.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * An array of key-value pairs representing the headers to apply.\n * Each pair includes the header name and its value.\n * Example: `[[\"Cache-Control\", \"max-age=3600\"], [\"X-Custom-Header\", \"value\"]]`\n * @type {Array<[string, string]>}\n */\n headers: [string, string][];\n}\n\n/**\n * @see StorageConfigRewrite\n */\nexport const StorageConfigRewriteSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n destination: z.string()\n })\n .strict();\n\n/**\n * You can utilize optional rewrites to display the same content for multiple URLs.\n * Rewrites are especially useful when combined with pattern matching, allowing acceptance of any URL that matches the pattern.\n * @interface StorageConfigRewrite\n */\nexport interface StorageConfigRewrite {\n /**\n * The glob pattern or specific path to match for incoming requests.\n * Matches are rewritten to the specified destination.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The destination path or file to which matching requests should be rewritten.\n * @type {string}\n */\n destination: string;\n}\n\n/**\n * @see StorageConfigRedirect\n */\nexport const StorageConfigRedirectSchema = z\n .object({\n source: StorageConfigSourceGlobSchema,\n location: z.string(),\n code: z.union([z.literal(301), z.literal(302)])\n })\n .strict();\n\n/**\n * Use a URL redirect to prevent broken links if you've moved a page or to shorten URLs.\n * @interface StorageConfigRedirect\n */\nexport interface StorageConfigRedirect {\n /**\n * The glob pattern or specific path to match for incoming requests that should be redirected.\n * @type {StorageConfigSourceGlob}\n */\n source: StorageConfigSourceGlob;\n\n /**\n * The URL or path to which the request should be redirected.\n * @type {string}\n */\n location: string;\n\n /**\n * The HTTP status code to use for the redirect, typically 301 (permanent redirect) or 302 (temporary redirect).\n * @type {301 | 302}\n */\n code: 301 | 302;\n}\n\n/**\n * @see StorageConfig\n */\nexport const StorageConfigSchema = z.object({\n headers: z.array(StorageConfigHeaderSchema).optional(),\n rewrites: z.array(StorageConfigRewriteSchema).optional(),\n redirects: z.array(StorageConfigRedirectSchema).optional(),\n iframe: z.enum(['deny', 'same-origin', 'allow-any']).optional(),\n rawAccess: z.boolean().optional(),\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the hosting behavior of the Storage.\n * @interface StorageConfig\n */\nexport interface StorageConfig {\n /**\n * Optional array of `StorageConfigHeader` objects to define custom HTTP headers for specific files or patterns.\n * @type {StorageConfigHeader[]}\n * @optional\n */\n headers?: StorageConfigHeader[];\n\n /**\n * Optional array of `StorageConfigRewrite` objects to define rewrite rules.\n * @type {StorageConfigRewrite[]}\n * @optional\n */\n rewrites?: StorageConfigRewrite[];\n\n /**\n * Optional array of `StorageConfigRedirect` objects to define HTTP redirects.\n * @type {StorageConfigRedirect[]}\n * @optional\n */\n redirects?: StorageConfigRedirect[];\n\n /**\n * For security reasons and to prevent click-jacking attacks, dapps deployed with Juno are, by default, set to deny embedding in other sites.\n *\n * Options are:\n * - `deny`: Prevents any content from being displayed in an iframe.\n * - `same-origin`: Allows iframe content from the same origin as the page.\n * - `allow-any`: Allows iframe content from any origin.\n *\n * If not specified, then `deny` is used as default value.\n * @type {'deny' | 'same-origin' | 'allow-any'}\n * @optional\n */\n iframe?: 'deny' | 'same-origin' | 'allow-any';\n\n /**\n * Optional flag to enable access for raw URLs.\n *\n * \u26A0\uFE0F **WARNING: Enabling this option is highly discouraged due to security risks.**\n *\n * Enabling this option allows access to raw URLs (e.g., https://satellite-id.raw.icp0.io), bypassing certificate validation.\n * This creates a security vulnerability where a malicious node in the chain can respond to requests with malicious or invalid content.\n * Since there is no validation on raw URLs, the client may receive and process harmful data.\n *\n * If not specified, the default value is `false`.\n * @type {boolean}\n * @optional\n */\n rawAccess?: boolean;\n\n /**\n * Configuration for maximum memory size limits for the Storage.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Storage and smart contract continue to operate normally but reject the upload of new assets.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see MaxMemorySizeConfig\n */\nexport const MaxMemorySizeConfigSchema = z\n .object({\n heap: z.bigint().optional(),\n stable: z.bigint().optional()\n })\n .strict();\n\n/**\n * Configuration for granting access to features only if the maximum memory size limits are not reached.\n *\n * The maximum size corresponds to the overall heap or stable memory of the smart contract.\n */\nexport interface MaxMemorySizeConfig {\n /**\n * Maximum allowed heap memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the heap memory size.\n *\n * @type {bigint}\n */\n heap?: bigint;\n\n /**\n * Maximum allowed stable memory size in bytes.\n *\n * This field is optional. If not specified, no limit is enforced on the stable memory size.\n *\n * @type {bigint}\n */\n stable?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type EncodingType, EncodingTypeSchema} from './encoding';\n\n/**\n * @see Precompress\n */\nexport const PrecompressSchema = z.strictObject({\n pattern: z.string().optional(),\n mode: z.enum(['both', 'replace']).optional(),\n algorithm: z.enum(['gzip', 'brotli']).optional()\n});\n\n/**\n * @see CliConfig\n */\nexport const CliConfigSchema = z.strictObject({\n source: z.string().optional(),\n ignore: z.array(z.string()).optional(),\n precompress: z\n .union([PrecompressSchema, z.array(PrecompressSchema), z.literal(false)])\n .optional(),\n encoding: z.array(z.tuple([z.string(), EncodingTypeSchema])).optional(),\n predeploy: z.array(z.string()).optional(),\n postdeploy: z.array(z.string()).optional()\n});\n\n/**\n * Configuration for compressing files during deployment.\n */\nexport interface Precompress {\n /**\n * Glob pattern for files to precompress.\n * @default any css|js|mjs|html\n */\n pattern?: string;\n\n /**\n * Determines what happens to the original files after compression:\n * - `\"both\"` \u2014 upload both original and compressed versions.\n * - `\"replace\"` \u2014 upload only the compressed version (served with `Content-Encoding`).\n *\n * @default \"both\"\n */\n mode?: 'both' | 'replace';\n\n /**\n * Compression algorithm.\n * @default \"gzip\"\n */\n algorithm?: 'gzip' | 'brotli';\n}\n\n/**\n * The configuration used by the CLI to resolve, prepare and deploy your app.\n */\nexport interface CliConfig {\n /**\n * Specifies the directory from which to deploy to Storage.\n * For instance, if `npm run build` outputs files to a `dist` folder, use `source: 'dist'`.\n *\n * @default 'build'\n * @type {string}\n */\n source?: string;\n\n /**\n * Specifies files or patterns to ignore during deployment, using glob patterns similar to those in .gitignore.\n * @type {string[]}\n * @optional\n */\n ignore?: string[];\n\n /**\n * Controls compression optimization for files in the source folder.\n *\n * By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)\n * are compressed, and both the original and compressed versions are uploaded.\n *\n * Set to `false` to disable, or provide one or more {@link Precompress} objects to customize.\n *\n * @type {Precompress | Precompress[] | false}\n * @optional\n */\n precompress?: Precompress | Precompress[] | false;\n\n /**\n * Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:\n * - `.Z` for compress,\n * - `.gz` for gzip,\n * - `.br` for brotli,\n * - `.zlib` for deflate,\n * - anything else defaults to `identity`.\n * The \"encoding\" attribute allows overriding default mappings with an array of glob patterns and encoding types.\n * @type {Array<[string, EncodingType]>}\n * @optional\n */\n encoding?: Array<[string, EncodingType]>;\n\n /**\n * Defines a list of scripts or commands to be run before the deployment process begins.\n * This can be useful for tasks such as compiling assets, running tests, or building production-ready files.\n *\n * Example:\n * ```json\n * {\n * \"predeploy\": [\"npm run build\", \"npm run lint\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n predeploy?: string[];\n\n /**\n * Defines a list of scripts or commands to be run after the deployment process completes.\n * This can be used for tasks such as notifications, cleanup, or sending confirmation messages to services or team members.\n *\n * Example:\n * ```json\n * {\n * \"postdeploy\": [\"./scripts/notify-admins.sh\", \"echo 'Deployment complete'\"]\n * }\n * ```\n *\n * @type {string[]}\n * @optional\n */\n postdeploy?: string[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * see EncodingType\n */\nexport const EncodingTypeSchema = z.enum(['identity', 'gzip', 'compress', 'deflate', 'br']);\n\n/**\n * Represents the encoding types for assets.\n * @typedef {'identity' | 'gzip' | 'compress' | 'deflate' | 'br'} EncodingType\n */\nexport type EncodingType = 'identity' | 'gzip' | 'compress' | 'deflate' | 'br';\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoConfigMode\n */\nexport const JunoConfigModeSchema = z.union([z.literal('production'), z.string()]);\n\n/**\n * Represents the mode of the Juno configuration.\n * @typedef {'production' | string} JunoConfigMode\n */\nexport type JunoConfigMode = 'production' | string;\n\n/**\n * @see JunoConfigEnv\n */\nexport const JunoConfigEnvSchema = z.object({\n mode: JunoConfigModeSchema\n});\n\n/**\n * Represents the environment configuration for Juno.\n * @interface JunoConfigEnv\n */\nexport interface JunoConfigEnv {\n /**\n * The mode of the Juno configuration.\n * @type {JunoConfigMode}\n */\n mode: JunoConfigMode;\n}\n", "import {PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * Ensures reliable validation of PrincipalTextSchema inside z.record.\n */\nexport const StrictPrincipalTextSchema = z\n .string()\n .refine((val) => PrincipalTextSchema.safeParse(val).success, {\n message: 'Invalid textual representation of a Principal.'\n });\n", "import * as z from 'zod/v4';\n\n/**\n * @see JunoPackageDependencies\n */\nexport const JunoPackageDependenciesSchema = z.record(z.string(), z.string());\n\n/**\n * @see JunoPackage\n */\nexport const JunoPackageSchema = z.object({\n name: z.string(),\n version: z.string(),\n dependencies: JunoPackageDependenciesSchema.optional()\n});\n", "/**\n * The ID used to identify a Juno Satellite.\n *\n * It is either the name of a (stock) package or\n * used when checking if a canister includes `@junobuild/satellite` as a dependency.\n */\nexport const JUNO_PACKAGE_SATELLITE_ID = '@junobuild/satellite';\n\n/**\n * The ID used to identify a Juno Sputnik crate.\n *\n * Used when checking if a canister includes `@junobuild/sputnik` as a dependency.\n */\nexport const JUNO_PACKAGE_SPUTNIK_ID = '@junobuild/sputnik';\n\n/**\n * The ID used to identify a Juno Mission Control package.\n */\nexport const JUNO_PACKAGE_MISSION_CONTROL_ID = '@junobuild/mission-control';\n\n/**\n * The ID used to identify a Juno Orbiter package.\n */\nexport const JUNO_PACKAGE_ORBITER_ID = '@junobuild/orbiter';\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", "import * as z from 'zod/v4';\n\n/**\n * @see SatelliteAssertions\n */\nexport const SatelliteAssertionsSchema = z.strictObject({\n heapMemory: z.union([z.bigint(), z.boolean()]).optional()\n});\n\n/**\n * Configuration for satellite assertions.\n * @interface SatelliteAssertions\n */\nexport interface SatelliteAssertions {\n /**\n * Configuration for the heap memory size check, which can be:\n * - `true` to enable the check with a default threshold of 900MB,\n * - `false` to disable the heap memory size check,\n * - A `bigint` to specify a custom threshold in MB (megabytes) for the heap memory size check.\n *\n * If not specified, then `true` is used as the default value.\n * @type {bigint | boolean}\n */\n heapMemory?: bigint | boolean;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\n\n/**\n * @see AuthenticationConfigInternetIdentity\n */\nexport const AuthenticationConfigInternetIdentitySchema = z.strictObject({\n derivationOrigin: z.url().optional(),\n externalAlternativeOrigins: z.array(z.url()).optional()\n});\n\n/**\n * Configure the behavior of Internet Identity.\n * @interface AuthenticationConfigInternetIdentity\n */\nexport interface AuthenticationConfigInternetIdentity {\n /**\n * This setting ensures that users are recognized on your app, regardless of whether they use the default URL or any other custom domain.\n * For example, if set to hello.com, a user signing on at https://hello.com will receive the same identifier (principal) as when signing on at https://www.hello.com.\n * @type {string}\n * @optional\n */\n derivationOrigin?: string;\n\n /**\n * An optional list of external alternative origins allowed for authentication, which can be useful if you want to reuse the same derivation origin across multiple Satellites.\n * @type {string[]}\n * @optional\n */\n externalAlternativeOrigins?: string[];\n}\n\n/**\n * @see AuthenticationConfigRules\n */\nexport const AuthenticationConfigRulesSchema = z.strictObject({\n allowedCallers: z.array(PrincipalTextSchema)\n});\n\n/**\n * Configure the rules of the authentication.\n * @interface AuthenticationConfigRules\n */\nexport interface AuthenticationConfigRules {\n /**\n * This option defines who's allowed to use your app.\n *\n * If you enable this, only the identities you list (in user key, format, like `bj4r4-5cdop-...`) will be allowed to sign in or use any features like Datastore or Storage.\n *\n * @type {PrincipalText[]}\n * @optional\n */\n allowedCallers: PrincipalText[];\n}\n\n/**\n * @see AuthenticationConfig\n */\nexport const AuthenticationConfigSchema = z.strictObject({\n internetIdentity: AuthenticationConfigInternetIdentitySchema.optional(),\n rules: AuthenticationConfigRulesSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the Authentication options of a Satellite.\n * @interface AuthenticationConfig\n */\nexport interface AuthenticationConfig {\n /**\n * Optional configuration of Internet Identity authentication method.\n * @type {AuthenticationConfigInternetIdentity}\n * @optional\n */\n internetIdentity?: AuthenticationConfigInternetIdentity;\n\n /**\n * Optional configuration for the rules of the authentication.\n * @type {AuthenticationConfigRules}\n * @optional\n */\n rules?: AuthenticationConfigRules;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type Rule, RuleSchema} from './rules';\n\n/**\n * @see DatastoreCollection\n */\nexport const DatastoreCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxSize: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Datastore.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>} DatastoreCollection\n */\nexport type DatastoreCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxSize'>;\n\n/**\n * @see StorageCollection\n */\nexport const StorageCollectionSchema = RuleSchema.omit({\n createdAt: true,\n updatedAt: true,\n maxCapacity: true\n});\n\n/**\n * Represents a configuration for a collection of the Satellite Storage.\n * @typedef {Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>} StorageCollection\n */\nexport type StorageCollection = Omit<Rule, 'createdAt' | 'updatedAt' | 'maxCapacity'>;\n\n/**\n * @see Collections\n */\nexport const CollectionsSchema = z.strictObject({\n datastore: z.array(DatastoreCollectionSchema).optional(),\n storage: z.array(StorageCollectionSchema).optional()\n});\n\n/**\n * Represents the configuration for all the collections of a Satellite.\n * @interface Collections\n */\nexport interface Collections {\n /**\n * An optional array that defines the collections of the Datastore.\n * @type {DatastoreCollection[]}\n * @optional\n */\n datastore?: DatastoreCollection[];\n\n /**\n * An optional array that defines the collections of the Storage.\n * @type {StorageCollection[]}\n * @optional\n */\n storage?: StorageCollection[];\n}\n", "import * as z from 'zod/v4';\n\n/**\n * @see PermissionText\n */\nexport const PermissionTextSchema = z.enum(['public', 'private', 'managed', 'controllers']);\n\n/**\n * Represents the permission levels for read and write access.\n * @typedef {'public' | 'private' | 'managed' | 'controllers'} PermissionText\n */\nexport type PermissionText = 'public' | 'private' | 'managed' | 'controllers';\n\n/**\n * @see MemoryText\n */\nexport const MemoryTextSchema = z.enum(['heap', 'stable']);\n\n/**\n * Represents the memory types.\n * @typedef {'heap' | 'stable'} MemoryText\n */\nexport type MemoryText = 'heap' | 'stable';\n\n/**\n * @see RulesType\n */\nexport const RulesTypeSchema = z.enum(['db', 'storage']);\n\n/**\n * Represents the types of rules.\n * @typedef {'db' | 'storage'} RulesType\n */\nexport type RulesType = 'db' | 'storage';\n\n/**\n * @see Rule\n */\nexport const RuleSchema = z.strictObject({\n collection: z.string(),\n read: PermissionTextSchema,\n write: PermissionTextSchema,\n memory: MemoryTextSchema,\n createdAt: z.bigint().optional(),\n updatedAt: z.bigint().optional(),\n version: z.bigint().optional(),\n maxSize: z.bigint().optional(),\n maxChangesPerUser: z.number().optional(),\n maxCapacity: z.number().optional(),\n mutablePermissions: z.boolean().optional().default(true),\n maxTokens: z.bigint().optional()\n});\n\n/**\n * Represents a rule configuration for a collection.\n * @interface Rule\n */\nexport interface Rule {\n /**\n * The name of the collection the rule applies to.\n * @type {string}\n */\n collection: string;\n\n /**\n * The permission level for read access.\n * @type {PermissionText}\n */\n read: PermissionText;\n\n /**\n * The permission level for write access.\n * @type {PermissionText}\n */\n write: PermissionText;\n\n /**\n * The type of memory allocated for the collection.\n * @type {MemoryText}\n */\n memory: MemoryText;\n\n /**\n * The timestamp when the rule was created.\n * @type {bigint}\n * @optional\n */\n createdAt?: bigint;\n\n /**\n * The timestamp when the rule was last updated.\n * @type {bigint}\n * @optional\n */\n updatedAt?: bigint;\n\n /**\n * The version of the rule.\n * @type {bigint}\n * @optional\n * @description Must be provided when updating the rule to ensure the correct version is being updated.\n */\n version?: bigint;\n\n /**\n * The maximum size of the collection in bytes.\n * @type {number}\n * @optional\n */\n maxSize?: bigint;\n\n /**\n * The maximum number of changes (create, update or delete) per user for the collection.\n * @type {number}\n * @optional\n */\n maxChangesPerUser?: number;\n\n /**\n * The maximum capacity of the collection.\n * @type {number}\n * @optional\n */\n maxCapacity?: number;\n\n /**\n * Indicates whether the permissions are mutable.\n * @default true\n * @type {boolean}\n */\n mutablePermissions?: boolean;\n\n /**\n * The maximum number of writes and deletes per minute.\n */\n maxTokens?: bigint;\n}\n", "import * as z from 'zod/v4';\nimport {type MaxMemorySizeConfig, MaxMemorySizeConfigSchema} from '../../shared/feature.config';\n\n/**\n * @see DatastoreConfig\n */\nexport const DatastoreConfigSchema = z.strictObject({\n maxMemorySize: MaxMemorySizeConfigSchema.optional(),\n version: z.bigint().optional()\n});\n\n/**\n * Configures the behavior of the Datastore.\n * @interface DatastoreConfig\n */\nexport interface DatastoreConfig {\n /**\n * Configuration for maximum memory size limits for the Datastore.\n *\n * This is used to specify optional limits on heap and stable memory for the smart contract.\n * When the limit is reached, the Datastore and smart contract continue to operate normally but reject the creation or updates of documents.\n *\n * If not specified, no memory limits are enforced.\n *\n * @type {MaxMemorySizeConfig}\n * @optional\n */\n maxMemorySize?: MaxMemorySizeConfig;\n\n /**\n * The current version of the config.\n *\n * Optional. The CLI will automatically resolve the version and warn you if there's a potential overwrite.\n * You can provide it if you want to manage versioning manually within your config file.\n *\n * @type {bigint}\n * @optional\n */\n version?: bigint;\n}\n", "import * as z from 'zod/v4';\n\nconst EmulatorPortsSchema = z.strictObject({\n /**\n * @default 5987\n */\n server: z.number().optional(),\n\n /**\n * @default 5999\n */\n admin: z.number().optional()\n});\n\nconst ConsolePortSchema = z.strictObject({\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: z.number().optional()\n});\n\n/**\n * Represents the ports exposed by an emulator container.\n */\nexport interface EmulatorPorts {\n /**\n * The port of the server used to simulate execution. This is the port your app connects to.\n * Also known as the \"local Internet Computer replica\" or the \"Pocket-IC port\".\n * @default 5987\n */\n server?: number;\n\n /**\n * The port of the admin server used for tasks like transferring ICP from the ledger.\n * @default 5999\n */\n admin?: number;\n}\n\n/**\n * @see EmulatorSkylab\n */\nconst EmulatorSkylabSchema = z.strictObject({\n ports: EmulatorPortsSchema.extend(ConsolePortSchema.shape).optional()\n});\n\n/**\n * Configuration for the Skylab emulator.\n */\nexport interface EmulatorSkylab {\n /**\n * Ports exposed by the Skylab container.\n */\n ports?: EmulatorPorts & {\n /**\n * Console UI (like https://console.juno.build) running with the emulator.\n * @default 5866\n */\n console: number;\n };\n}\n\n/**\n * @see EmulatorConsole\n */\nconst EmulatorConsoleSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Console emulator.\n */\nexport interface EmulatorConsole {\n /**\n * Ports exposed by the Console container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorSatellite\n */\nconst EmulatorSatelliteSchema = z.strictObject({\n ports: EmulatorPortsSchema.optional()\n});\n\n/**\n * Configuration for the Satellite emulator.\n */\nexport interface EmulatorSatellite {\n /**\n * Ports exposed by the Satellite container.\n */\n ports?: EmulatorPorts;\n}\n\n/**\n * @see EmulatorRunner\n */\nconst EmulatorRunnerSchema = z.strictObject({\n type: z.enum(['docker', 'podman']),\n image: z.string().optional(),\n name: z.string().optional(),\n volume: z.string().optional(),\n target: z.string().optional(),\n platform: z.enum(['linux/amd64', 'linux/arm64']).optional()\n});\n\n/**\n * Shared options for all runner variants.\n */\nexport interface EmulatorRunner {\n /**\n * The containerization tool to run the emulator.\n */\n type: 'docker' | 'podman';\n\n /**\n * Image reference.\n * @default depends on emulator type, e.g. \"junobuild/skylab:latest\"\n */\n image?: string;\n\n /**\n * Optional container name to use for the emulator.\n * Useful for reusing or managing a specific container.\n */\n name?: string;\n\n /**\n * Persistent volume to store internal state.\n * @default \"juno\"\n */\n volume?: string;\n\n /**\n * Shared folder for deploying and hot-reloading serverless functions.\n */\n target?: string;\n\n /**\n * The platform to use when running the emulator container.\n */\n platform?: 'linux/amd64' | 'linux/arm64';\n}\n\n/**\n * @see EmulatorConfig\n */\nexport const EmulatorConfigSchema = z.union([\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n skylab: EmulatorSkylabSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n console: EmulatorConsoleSchema\n }),\n z.strictObject({\n runner: EmulatorRunnerSchema.optional(),\n satellite: EmulatorSatelliteSchema\n })\n]);\n\n/**\n * The configuration for running the Juno emulator.\n */\nexport type EmulatorConfig =\n | {runner?: EmulatorRunner; skylab: EmulatorSkylab}\n | {runner?: EmulatorRunner; console: EmulatorConsole}\n | {runner?: EmulatorRunner; satellite: EmulatorSatellite};\n", "import * as z from 'zod/v4';\n\n/**\n * @see ModuleLogVisibility\n */\nexport const ModuleLogVisibilitySchema = z.enum(['controllers', 'public']);\n\n/**\n * Specifies who can see the logs of the module.\n *\n * - 'controllers': Only the controllers of the module can see the logs.\n * - 'public': Everyone can see the logs.\n *\n * @typedef {'controllers' | 'public'} ModuleLogVisibility\n */\nexport type ModuleLogVisibility = 'controllers' | 'public';\n\n/**\n * @see ModuleSettings\n */\nexport const ModuleSettingsSchema = z.strictObject({\n freezingThreshold: z.bigint().optional(),\n reservedCyclesLimit: z.bigint().optional(),\n logVisibility: ModuleLogVisibilitySchema.optional(),\n heapMemoryLimit: z.bigint().optional(),\n memoryAllocation: z.bigint().optional(),\n computeAllocation: z.bigint().optional()\n});\n\n/**\n * Settings for a module - Satellite, Mission Control or Orbiter.\n *\n * These settings control various aspects of the module's behavior and resource usage.\n *\n * @interface ModuleSettings\n */\nexport interface ModuleSettings {\n /**\n * The cycle threshold below which the module will automatically stop to avoid running out of cycles.\n *\n * For example, if set to `BigInt(1000000)`, the module will stop when it has fewer than 1,000,000 cycles remaining.\n *\n * @type {bigint}\n */\n freezingThreshold?: bigint;\n\n /**\n * The number of cycles reserved for the module's operations to ensure it has enough cycles to function.\n *\n * For example, setting it to `BigInt(5000000)` reserves 5,000,000 cycles for the module.\n *\n * @type {bigint}\n */\n reservedCyclesLimit?: bigint;\n\n /**\n * Controls who can see the module's logs.\n *\n * @type {ModuleLogVisibility}\n */\n logVisibility?: ModuleLogVisibility;\n\n /**\n * The maximum amount of WebAssembly (Wasm) memory the module can use on the heap.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 64)` allows the module to use up to 64 MB of Wasm memory.\n *\n * @type {bigint}\n */\n heapMemoryLimit?: bigint;\n\n /**\n * The amount of memory explicitly allocated to the module.\n *\n * For example, setting it to `BigInt(1024 * 1024 * 128)` allocates 128 MB of memory to the module.\n *\n * @type {bigint}\n */\n memoryAllocation?: bigint;\n\n /**\n * The proportion of compute capacity allocated to the module.\n *\n * This is a fraction of the total compute capacity of the subnet. For example, setting it to `BigInt(10)` allocates 10% of the compute capacity to the module.\n *\n * @type {bigint}\n */\n computeAllocation?: bigint;\n}\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\n\n/**\n * @see OrbiterId\n */\nexport const OrbiterIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the configuration for an orbiter.\n * @interface OrbiterId\n */\nexport interface OrbiterId {\n /**\n * The identifier of the orbiter used in the dApp.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see OrbiterIds\n */\nexport const OrbiterIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of orbiter identitifiers to different configurations based on the mode of the application.\n * @interface OrbiterIds\n */\nexport interface OrbiterIds {\n /**\n * A mapping of orbiter identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different orbiter IDs, such as production, development, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"development\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see OrbiterConfig\n */\nexport const OrbiterConfigSchema = z.union([OrbiterIdSchema.strict(), OrbiterIdsSchema.strict()]);\n\n/**\n * Represents the configuration for an orbiter (analytics).\n *\n * @typedef {Either<OrbiterId, OrbiterIds>} OrbiterConfig\n * @property {OrbiterId | OrbiterIds} OrbiterId or OrbiterIds - Defines a unique Orbiter or a collection of Orbiters.\n */\nexport type OrbiterConfig = Either<OrbiterId, OrbiterIds>;\n", "import {type PrincipalText, PrincipalTextSchema} from '@dfinity/zod-schemas';\nimport * as z from 'zod/v4';\nimport {type StorageConfig, StorageConfigSchema} from '../../shared/storage.config';\nimport type {CliConfig} from '../../types/cli.config';\nimport {type JunoConfigMode, JunoConfigModeSchema} from '../../types/juno.env';\nimport type {Either} from '../../types/utility.types';\nimport {StrictPrincipalTextSchema} from '../../utils/principal.utils';\nimport {type SatelliteAssertions, SatelliteAssertionsSchema} from './assertions.config';\nimport {type AuthenticationConfig, AuthenticationConfigSchema} from './authentication.config';\nimport {type Collections, CollectionsSchema} from './collections';\nimport {type DatastoreConfig, DatastoreConfigSchema} from './datastore.config';\nimport {type ModuleSettings, ModuleSettingsSchema} from './module.settings';\n\n/**\n * @see SatelliteId\n */\nexport const SatelliteIdSchema = z.object({\n id: PrincipalTextSchema\n});\n\n/**\n * Represents the unique identifier for a satellite.\n * @interface SatelliteId\n */\nexport interface SatelliteId {\n /**\n * The unique identifier (ID) of the satellite for this application.\n * @type {string}\n */\n id: PrincipalText;\n}\n\n/**\n * @see SatelliteIds\n */\nexport const SatelliteIdsSchema = z.object({\n ids: z.record(JunoConfigModeSchema, StrictPrincipalTextSchema)\n});\n\n/**\n * Represents a mapping of satellite identifiers to different configurations based on the mode of the application.\n * @interface SatelliteIds\n */\nexport interface SatelliteIds {\n /**\n * A mapping of satellite identifiers (IDs) to different configurations based on the mode of the application.\n *\n * This allows the application to use different satellite IDs, such as production, staging, etc.\n *\n * Example:\n * {\n * \"production\": \"xo2hm-lqaaa-aaaal-ab3oa-cai\",\n * \"staging\": \"gl6nx-5maaa-aaaaa-qaaqq-cai\"\n * }\n * @type {Record<JunoConfigMode, string>}\n */\n ids: Record<JunoConfigMode, PrincipalText>;\n}\n\n/**\n * @see SatelliteConfigOptions\n */\nconst SatelliteConfigOptionsBaseSchema = z.object({\n storage: StorageConfigSchema.optional(),\n datastore: DatastoreConfigSchema.optional(),\n authentication: AuthenticationConfigSchema.optional(),\n assertions: SatelliteAssertionsSchema.optional(),\n settings: ModuleSettingsSchema.optional(),\n collections: CollectionsSchema.optional()\n});\n\n/**\n * @see JunoConsoleConfig\n */\nexport const SatelliteConfigOptionsSchema = z.union([\n z\n .object({\n ...SatelliteIdSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict(),\n z\n .object({\n ...SatelliteIdsSchema.shape,\n ...SatelliteConfigOptionsBaseSchema.shape\n })\n .strict()\n]);\n\n/**\n * SatelliteConfigOptions interface provides configuration settings that allow for fine-tuning\n * the operational behavior of various aspects of a Satellite, such as storage, datastore,\n * authentication, and deployment assertions.\n *\n * These options affect specific modules of the Satellite and may require manual application of\n * changes, typically through CLI commands (e.g., `juno config`).\n *\n * @interface SatelliteConfigOptions\n *\n * @property {StorageConfig} [storage] - Configuration settings for storage management in the Satellite.\n * @property {DatastoreConfig} [datastore] - Configuration settings for datastore management.\n * @property {AuthenticationConfig} [authentication] - Authentication-specific configurations.\n * @property {SatelliteAssertions} [assertions] - Conditions and assertions for deployment or operational checks.\n * @property {ModuleSettings} [settings] - General settings governing module behavior and resource management.\n */\nexport interface SatelliteConfigOptions {\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Storage.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {StorageConfig}\n * @optional\n */\n storage?: StorageConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Datastore.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {DatastoreConfig}\n * @optional\n */\n datastore?: DatastoreConfig;\n\n /**\n * Optional configuration parameters for the satellite, affecting the operational behavior of its Authentication.\n * Changes to these parameters must be applied manually afterwards, for example with the CLI using `juno config` commands.\n * @type {AuthenticationConfig}\n * @optional\n */\n authentication?: AuthenticationConfig;\n\n /**\n * Optional configurations to override default assertions made by the CLI regarding satellite deployment conditions.\n * @type {SatelliteAssertions}\n * @optional\n */\n assertions?: SatelliteAssertions;\n\n /**\n * Optional configuration parameters for the Satellite.\n * These settings control various aspects of the module's behavior and resource usage.\n * @type {ModuleSettings}\n * @optional\n */\n settings?: ModuleSettings;\n\n /**\n * Optional configuration for the Datastore and Storage collections.\n * @type {Collections}\n * @optional\n */\n collections?: Collections;\n}\n\n/**\n * Represents the configuration for a satellite.\n *\n * @typedef {Either<SatelliteId, SatelliteIds> & CliConfig & SatelliteConfigOptions} SatelliteConfig\n * @property {SatelliteId | SatelliteIds} SatelliteId or SatelliteIds - Defines a unique Satellite or a collection of Satellites.\n * @property {CliConfig} CliConfig - Configuration specific to the CLI interface.\n * @property {SatelliteConfigOptions} SatelliteConfigOptions - Additional configuration options for the Satellite.\n */\nexport type SatelliteConfig = Either<SatelliteId, SatelliteIds> &\n CliConfig &\n SatelliteConfigOptions;\n", "import * as z from 'zod/v4';\nimport {type EmulatorConfig, EmulatorConfigSchema} from './configs/emulator.config';\nimport {type OrbiterConfig, OrbiterConfigSchema} from './configs/orbiter.config';\nimport {type SatelliteConfig, SatelliteConfigOptionsSchema} from './configs/satellite.config';\n\n/**\n * @see JunoConfig\n */\nexport const JunoConfigSchema = z.strictObject({\n satellite: SatelliteConfigOptionsSchema,\n orbiter: OrbiterConfigSchema.optional(),\n emulator: EmulatorConfigSchema.optional()\n});\n\n/**\n * Represents the overall configuration for Juno.\n * @interface JunoConfig\n */\nexport interface JunoConfig {\n /**\n * The configuration for the satellite.\n * @type {SatelliteConfig}\n */\n satellite: SatelliteConfig;\n\n /**\n * The optional configuration for the orbiter.\n * @type {OrbiterConfig}\n * @optional\n */\n orbiter?: OrbiterConfig;\n\n /**\n * Your options for the emulator.\n */\n emulator?: EmulatorConfig;\n}\n"],
5
+ "mappings": ";;AAYO,SAASA,GACdC,EAC6B,CAC7B,OAAOA,CACT,CChBA,OAA4B,uBAAAC,MAA0B,uBACtD,UAAYC,MAAO,SCDnB,UAAYC,MAAO,SCAnB,UAAYC,MAAO,SAKZ,IAAMC,EACV,SAAO,CACN,KAAQ,SAAO,EAAE,SAAS,EAC1B,OAAU,SAAO,EAAE,SAAS,CAC9B,CAAC,EACA,OAAO,EDJH,IAAMC,EAAkC,SAAO,EAWzCC,EACV,SAAO,CACN,OAAQD,EACR,QAAW,QAAQ,QAAM,CAAG,SAAO,EAAK,SAAO,CAAC,CAAC,CAAC,CACpD,CAAC,EACA,OAAO,EA0BGE,EACV,SAAO,CACN,OAAQF,EACR,YAAe,SAAO,CACxB,CAAC,EACA,OAAO,EAyBGG,EACV,SAAO,CACN,OAAQH,EACR,SAAY,SAAO,EACnB,KAAQ,QAAM,CAAG,UAAQ,GAAG,EAAK,UAAQ,GAAG,CAAC,CAAC,CAChD,CAAC,EACA,OAAO,EA6BGI,EAAwB,SAAO,CAC1C,QAAW,QAAMH,CAAyB,EAAE,SAAS,EACrD,SAAY,QAAMC,CAA0B,EAAE,SAAS,E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YC,EAA0B,SAAS,EAC/C,SAAUC,EAAqB,SAAS,EACxC,YAAaC,EAAkB,SAAS,CAC1C,CAAC,EAKYC,EAAiC,QAAM,CAE/C,SAAO,CACN,GAAGZ,GAAkB,MACrB,GAAGK,EAAiC,KACtC,CAAC,EACA,OAAO,EAEP,SAAO,CACN,GAAGH,GAAmB,MACtB,GAAGG,EAAiC,KACtC,CAAC,EACA,OAAO,CACZ,CAAC,ECvFD,UAAYQ,MAAO,SAQZ,IAAMC,GAAqB,eAAa,CAC7C,UAAWC,EACX,QAASC,EAAoB,SAAS,EACtC,SAAUC,EAAqB,SAAS,CAC1C,CAAC",
6
6
  "names": ["defineConsoleConfig", "config", "PrincipalTextSchema", "z", "z", "z", "MaxMemorySizeConfigSchema", "StorageConfigSourceGlobSchema", "StorageConfigHeaderSchema", "StorageConfigRewriteSchema", "StorageConfigRedirectSchema", "StorageConfigSchema", "MaxMemorySizeConfigSchema", "z", "z", "EncodingTypeSchema", "PrecompressSchema", "CliConfigSchema", "EncodingTypeSchema", "z", "JunoConfigModeSchema", "JunoConfigEnvSchema", "PrincipalTextSchema", "z", "StrictPrincipalTextSchema", "val", "ConsoleIdSchema", "PrincipalTextSchema", "ConsoleIdsSchema", "JunoConfigModeSchema", "StrictPrincipalTextSchema", "JunoConsoleConfigBaseSchema", "CliConfigSchema", "StorageConfigSchema", "JunoConsoleConfigSchema", "z", "JunoPackageDependenciesSchema", "JunoPackageSchema", "JUNO_PACKAGE_SATELLITE_ID", "JUNO_PACKAGE_SPUTNIK_ID", "JUNO_PACKAGE_MISSION_CONTROL_ID", "JUNO_PACKAGE_ORBITER_ID", "defineConfig", "config", "z", "SatelliteAssertionsSchema", "PrincipalTextSchema", "z", "AuthenticationConfigInternetIdentitySchema", "AuthenticationConfigRulesSchema", "AuthenticationConfigSchema", "z", "z", "PermissionTextSchema", "MemoryTextSchema", "RulesTypeSchema", "RuleSchema", "DatastoreCollectionSchema", "RuleSchema", "StorageCollectionSchema", "CollectionsSchema", "z", "DatastoreConfigSchema", "MaxMemorySizeConfigSchema", "z", "EmulatorPortsSchema", "ConsolePortSchema", "EmulatorSkylabSchema", "EmulatorConsoleSchema", "EmulatorSatelliteSchema", "EmulatorRunnerSchema", "EmulatorConfigSchema", "z", "ModuleLogVisibilitySchema", "ModuleSettingsSchema", "PrincipalTextSchema", "z", "OrbiterIdSchema", "PrincipalTextSchema", "OrbiterIdsSchema", "JunoConfigModeSchema", "StrictPrincipalTextSchema", "OrbiterConfigSchema", "PrincipalTextSchema", "z", "SatelliteIdSchema", "PrincipalTextSchema", "SatelliteIdsSchema", "JunoConfigModeSchema", "StrictPrincipalTextSchema", "SatelliteConfigOptionsBaseSchema", "StorageConfigSchema", "DatastoreConfigSchema", "AuthenticationConfigSchema", "SatelliteAssertionsSchema", "ModuleSettingsSchema", "CollectionsSchema", "SatelliteConfigOptionsSchema", "z", "JunoConfigSchema", "SatelliteConfigOptionsSchema", "OrbiterConfigSchema", "EmulatorConfigSchema"]
7
7
  }
@@ -82,7 +82,17 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
82
82
  gzip: "gzip";
83
83
  brotli: "brotli";
84
84
  }>>;
85
- }, z.core.$strict>, z.ZodLiteral<false>]>>;
85
+ }, z.core.$strict>, z.ZodArray<z.ZodObject<{
86
+ pattern: z.ZodOptional<z.ZodString>;
87
+ mode: z.ZodOptional<z.ZodEnum<{
88
+ both: "both";
89
+ replace: "replace";
90
+ }>>;
91
+ algorithm: z.ZodOptional<z.ZodEnum<{
92
+ gzip: "gzip";
93
+ brotli: "brotli";
94
+ }>>;
95
+ }, z.core.$strict>>, z.ZodLiteral<false>]>>;
86
96
  encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
87
97
  identity: "identity";
88
98
  gzip: "gzip";
@@ -132,7 +142,17 @@ export declare const JunoConsoleConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
132
142
  gzip: "gzip";
133
143
  brotli: "brotli";
134
144
  }>>;
135
- }, z.core.$strict>, z.ZodLiteral<false>]>>;
145
+ }, z.core.$strict>, z.ZodArray<z.ZodObject<{
146
+ pattern: z.ZodOptional<z.ZodString>;
147
+ mode: z.ZodOptional<z.ZodEnum<{
148
+ both: "both";
149
+ replace: "replace";
150
+ }>>;
151
+ algorithm: z.ZodOptional<z.ZodEnum<{
152
+ gzip: "gzip";
153
+ brotli: "brotli";
154
+ }>>;
155
+ }, z.core.$strict>>, z.ZodLiteral<false>]>>;
136
156
  encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
137
157
  identity: "identity";
138
158
  gzip: "gzip";
@@ -30,7 +30,17 @@ export declare const CliConfigSchema: z.ZodObject<{
30
30
  gzip: "gzip";
31
31
  brotli: "brotli";
32
32
  }>>;
33
- }, z.core.$strict>, z.ZodLiteral<false>]>>;
33
+ }, z.core.$strict>, z.ZodArray<z.ZodObject<{
34
+ pattern: z.ZodOptional<z.ZodString>;
35
+ mode: z.ZodOptional<z.ZodEnum<{
36
+ both: "both";
37
+ replace: "replace";
38
+ }>>;
39
+ algorithm: z.ZodOptional<z.ZodEnum<{
40
+ gzip: "gzip";
41
+ brotli: "brotli";
42
+ }>>;
43
+ }, z.core.$strict>>, z.ZodLiteral<false>]>>;
34
44
  encoding: z.ZodOptional<z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodEnum<{
35
45
  identity: "identity";
36
46
  gzip: "gzip";
@@ -88,12 +98,12 @@ export interface CliConfig {
88
98
  * By default, JavaScript (.js), ES Modules (.mjs), CSS (.css), and HTML (.html)
89
99
  * are compressed, and both the original and compressed versions are uploaded.
90
100
  *
91
- * Set to `false` to disable, or provide a {@link Precompress} object to customize.
101
+ * Set to `false` to disable, or provide one or more {@link Precompress} objects to customize.
92
102
  *
93
- * @type {Precompress | false}
103
+ * @type {Precompress | Precompress[] | false}
94
104
  * @optional
95
105
  */
96
- precompress?: Precompress | false;
106
+ precompress?: Precompress | Precompress[] | false;
97
107
  /**
98
108
  * Customizes file encoding mapping for HTTP response headers `Content-Encoding` based on file extension:
99
109
  * - `.Z` for compress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/config",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Configuration options for Juno CLI",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",