@powerlines/plugin-env 0.16.178 → 0.16.180

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.
Files changed (39) hide show
  1. package/dist/helpers/load.cjs +1 -1
  2. package/dist/helpers/load.d.cts +1 -0
  3. package/dist/helpers/load.d.cts.map +1 -1
  4. package/dist/helpers/load.d.mts +1 -0
  5. package/dist/helpers/load.d.mts.map +1 -1
  6. package/dist/helpers/load.mjs +1 -1
  7. package/dist/helpers/load.mjs.map +1 -1
  8. package/dist/helpers/persistence.cjs +1 -1
  9. package/dist/helpers/persistence.d.cts.map +1 -1
  10. package/dist/helpers/persistence.d.mts.map +1 -1
  11. package/dist/helpers/persistence.mjs +1 -1
  12. package/dist/helpers/persistence.mjs.map +1 -1
  13. package/dist/helpers/reflect.cjs +1 -1
  14. package/dist/helpers/reflect.d.cts +1 -1
  15. package/dist/helpers/reflect.d.mts +1 -1
  16. package/dist/helpers/reflect.mjs +1 -1
  17. package/dist/helpers/reflect.mjs.map +1 -1
  18. package/dist/index.d.cts +1 -1
  19. package/dist/index.d.mts +1 -1
  20. package/dist/types/env.cjs +1 -0
  21. package/dist/types/{runtime.d.cts → env.d.cts} +6 -2
  22. package/dist/types/env.d.cts.map +1 -0
  23. package/dist/types/{runtime.d.mts → env.d.mts} +6 -2
  24. package/dist/types/env.d.mts.map +1 -0
  25. package/dist/types/env.mjs +2 -0
  26. package/dist/types/env.mjs.map +1 -0
  27. package/dist/types/index.cjs +1 -1
  28. package/dist/types/index.d.cts +1 -1
  29. package/dist/types/index.d.mts +1 -1
  30. package/dist/types/index.mjs +1 -1
  31. package/dist/types/plugin.d.cts +1 -1
  32. package/dist/types/plugin.d.mts +1 -1
  33. package/dist/types/plugin.mjs.map +1 -1
  34. package/package.json +33 -33
  35. package/dist/types/runtime.cjs +0 -1
  36. package/dist/types/runtime.d.cts.map +0 -1
  37. package/dist/types/runtime.d.mts.map +0 -1
  38. package/dist/types/runtime.mjs +0 -2
  39. package/dist/types/runtime.mjs.map +0 -1
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../types/plugin.cjs`),n=require(`./source-file-env.cjs`);let r=require(`@stryke/path/join-paths`),i=require(`@storm-software/config-tools/get-config`),a=require(`@stryke/env/environment-checks`),o=require(`@stryke/env/load-env`),s=require(`@stryke/string-format/kebab-case`),c=require(`@stryke/type-checks/is-set-object`),l=require(`c12`),u=require(`defu`);u=e.__toESM(u,1);let d=require(`powerlines/constants`);function f(e,t){return e.__type=t,e}async function p(e,t,r){let i=await(0,o.loadEnv)(r,t);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(f(async e=>(0,o.loadEnvFile)(e,r),[`additionalEnvFile`,``,`P"2!"/"`])));for(let e of t)i=(0,u.default)(e,i)}return n.removeEnvPrefix(i)}p.__type=[()=>t.__ΩEnvPluginOptions,`options`,`mode`,`cwd`,`loadEnvFiles`,'Pn!2"&2#&2$"`/%'];async function m(e,t,n,i,a,o,s){let[c,d]=await Promise.all([(p.Ω=[[`!`]],p(t,i,n)),(0,l.loadConfig)({cwd:n,name:e.config.framework,envName:i,defaults:{NAME:s?.namespace&&o.name?o.name?.replace(`@${s.namespace}/`,``):e.config.name,MODE:i,ORG:e.config.organization||s?.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:(0,r.joinPaths)(a,`jiti`),moduleCache:!0}})]);return(0,u.default)(c,d.config,s)}m.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvPluginOptions,`options`,`directory`,`mode`,`cacheDir`,`packageJson`,`workspaceConfig`,`loadEnvDirectory`,`Pn!2"n#2$&2%&2&&2'!2(!2)8"\`/*`];function h(e,t,n){return(0,u.default)({APP_NAME:(0,s.kebabCase)(e.config.name),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${(0,s.kebabCase)(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:n?.locale,DEFAULT_TIMEZONE:n?.timezone,LOG_LEVEL:e.config.logLevel.general===`trace`?`debug`:e.config.logLevel.general,ERROR_URL:n?.error?.url,ORGANIZATION:e.config.organization||((0,c.isSetObject)(n?.organization)?n.organization.name:n?.organization),PLATFORM:e.config.platform,MODE:(0,a.toMode)(e.config.mode),TEST:(0,a.isTestMode)(e.config.mode),DEBUG:(0,a.isDevelopmentMode)(e.config.mode),STACKTRACE:e.config.mode!==`production`,ENVIRONMENT:!e.environment.name||e.environment.name===d.DEFAULT_ENVIRONMENT?e.config.mode:e.environment.name},(0,c.isSetObject)(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce(f((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),[`ret`,`prop`,``,`P"2!"2""/#`]),{}):{})}h.__type=[()=>t.__ΩEnvPluginContext,`context`,`parsed`,`workspaceConfig`,`loadEnvFromContext`,`Retrieves various dotenv configuration parameters from the context.`,`Pn!2"!2#!2$8"/%?&`];async function g(e,t){let n=await(0,i.tryGetWorkspaceConfig)(),[r,a,o]=await Promise.all([(m.Ω=[[`!`]],m(e,t,e.config.root,e.config.mode,e.cachePath,e.packageJson,n)),(m.Ω=[[`!`]],m(e,t,e.config.cwd,e.config.mode,e.cachePath,e.packageJson,n)),(m.Ω=[[`!`]],m(e,t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,n))]);return(0,u.default)(h(e,process.env,n),r,a,o)}g.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvPluginOptions,`options`,`loadEnv`,'Pn!2"n#2$"`/%'],exports.loadEnv=g,exports.loadEnvFromContext=h;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../types/plugin.cjs`),n=require(`./source-file-env.cjs`);let r=require(`@stryke/path/join-paths`),i=require(`@storm-software/config-tools/get-config`),a=require(`@stryke/env/environment-checks`),o=require(`@stryke/env/load-env`),s=require(`@stryke/string-format/kebab-case`),c=require(`@stryke/type-checks/is-set-object`),l=require(`c12`),u=require(`defu`);u=e.__toESM(u,1);let d=require(`powerlines/constants`);function f(e,t){return e.__type=t,e}async function p(e,t,r){let i=await(0,o.loadEnv)(r,t);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(f(async e=>(0,o.loadEnvFile)(e,r),[`additionalEnvFile`,``,`P"2!"/"`])));for(let e of t)i=(0,u.default)(e,i)}return n.removeEnvPrefix(i)}p.__type=[()=>t.__ΩEnvPluginOptions,`options`,`mode`,`cwd`,`loadEnvFiles`,'Pn!2"&2#&2$"`/%'];async function m(e,t,n,i,a,o,s){let[c,d]=await Promise.all([(p.Ω=[[`!`]],p(t,i,n)),(0,l.loadConfig)({cwd:n,name:e.config.framework,envName:i,defaults:{NAME:s?.namespace&&o.name?o.name?.replace(`@${s.namespace}/`,``):e.config.name,MODE:i,ORG:e.config.organization||s?.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:(0,r.joinPaths)(a,`jiti`),moduleCache:!0}})]);return(0,u.default)(c,d.config,s)}m.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvPluginOptions,`options`,`directory`,`mode`,`cacheDir`,`packageJson`,`workspaceConfig`,`loadEnvDirectory`,`Pn!2"n#2$&2%&2&&2'!2(!2)8"\`/*`];function h(e,t,n){return(0,u.default)({APP_NAME:(0,s.kebabCase)(e.config.name),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${(0,s.kebabCase)(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:n?.locale,DEFAULT_TIMEZONE:n?.timezone,LOG_LEVEL:e.config.logLevel.general===`trace`?`debug`:e.config.logLevel.general,ERROR_URL:n?.error?.url,ORGANIZATION:e.config.organization||((0,c.isSetObject)(n?.organization)?n.organization.name:n?.organization),PLATFORM:e.config.platform,MODE:(0,a.toMode)(e.config.mode),TEST:(0,a.isTestMode)(e.config.mode),DEBUG:(0,a.isDevelopmentMode)(e.config.mode),STACKTRACE:e.config.mode!==`production`,RUNTIME:e.config.environment.runtime,ENVIRONMENT:!e.config.environment.name||e.config.environment.name===d.DEFAULT_ENVIRONMENT?e.config.mode:e.config.environment.name},(0,c.isSetObject)(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce(f((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),[`ret`,`prop`,``,`P"2!"2""/#`]),{}):{})}h.__type=[()=>t.__ΩEnvPluginContext,`context`,`parsed`,`workspaceConfig`,`loadEnvFromContext`,`Retrieves various dotenv configuration parameters from the context.`,`Pn!2"!2#!2$8"/%?&`];async function g(e,t){let n=await(0,i.tryGetWorkspaceConfig)(),[r,a,o]=await Promise.all([(m.Ω=[[`!`]],m(e,t,e.config.root,e.config.mode,e.cachePath,e.packageJson,n)),(m.Ω=[[`!`]],m(e,t,e.config.cwd,e.config.mode,e.cachePath,e.packageJson,n)),(m.Ω=[[`!`]],m(e,t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,n))]);return(0,u.default)(h(e,process.env,n),r,a,o)}g.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvPluginOptions,`options`,`loadEnv`,'Pn!2"n#2$"`/%'],exports.loadEnv=g,exports.loadEnvFromContext=h;
@@ -28,6 +28,7 @@ declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvPar
28
28
  TEST: boolean;
29
29
  DEBUG: boolean;
30
30
  STACKTRACE: boolean;
31
+ RUNTIME: "edge" | "browser" | "nodejs" | "workerd" | undefined;
31
32
  ENVIRONMENT: string;
32
33
  };
33
34
  declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.cts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;;AA0GA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA,EACR,eAAA,GAAkB,eAAA;;;;;;;;;;;;;;;;;;;;iBA8CE,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
1
+ {"version":3,"file":"load.d.cts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;;AA0GA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA,EACR,eAAA,GAAkB,eAAA;;;;;;;;;;;;;;;;;;;;;iBA+CE,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
@@ -28,6 +28,7 @@ declare function loadEnvFromContext(context: EnvPluginContext, parsed: DotenvPar
28
28
  TEST: boolean;
29
29
  DEBUG: boolean;
30
30
  STACKTRACE: boolean;
31
+ RUNTIME: "edge" | "browser" | "nodejs" | "workerd" | undefined;
31
32
  ENVIRONMENT: string;
32
33
  };
33
34
  declare function loadEnv<TEnv extends DotenvParseOutput = DotenvParseOutput>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv>;
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.mts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;;AA0GA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA,EACR,eAAA,GAAkB,eAAA;;;;;;;;;;;;;;;;;;;;iBA8CE,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
1
+ {"version":3,"file":"load.d.mts","names":[],"sources":["../../src/helpers/load.ts"],"mappings":";;;;;;;AA0GA;;;;;iBAAgB,kBAAA,CACd,OAAA,EAAS,gBAAA,EACT,MAAA,EAAQ,iBAAA,EACR,eAAA,GAAkB,eAAA;;;;;;;;;;;;;;;;;;;;;iBA+CE,OAAA,cACP,iBAAA,GAAoB,iBAAA,CAAA,CACjC,OAAA,EAAS,gBAAA,EAAkB,OAAA,EAAS,gBAAA,GAAmB,OAAA,CAAQ,IAAA"}
@@ -1,2 +1,2 @@
1
- import{__ΩEnvPluginContext as e,__ΩEnvPluginOptions as t}from"../types/plugin.mjs";import{removeEnvPrefix as n}from"./source-file-env.mjs";import{joinPaths as r}from"@stryke/path/join-paths";import{tryGetWorkspaceConfig as i}from"@storm-software/config-tools/get-config";import{isDevelopmentMode as a,isTestMode as o,toMode as s}from"@stryke/env/environment-checks";import{loadEnv as c,loadEnvFile as l}from"@stryke/env/load-env";import{kebabCase as u}from"@stryke/string-format/kebab-case";import{isSetObject as d}from"@stryke/type-checks/is-set-object";import{loadConfig as f}from"c12";import p from"defu";import{DEFAULT_ENVIRONMENT as m}from"powerlines/constants";function h(e,t){return e.__type=t,e}async function g(e,t,r){let i=await c(r,t);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(h(async e=>l(e,r),[`additionalEnvFile`,``,`P"2!"/"`])));for(let e of t)i=p(e,i)}return n(i)}g.__type=[()=>t,`options`,`mode`,`cwd`,`loadEnvFiles`,'Pn!2"&2#&2$"`/%'];async function _(e,t,n,i,a,o,s){let[c,l]=await Promise.all([(g.Ω=[[`!`]],g(t,i,n)),f({cwd:n,name:e.config.framework,envName:i,defaults:{NAME:s?.namespace&&o.name?o.name?.replace(`@${s.namespace}/`,``):e.config.name,MODE:i,ORG:e.config.organization||s?.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:r(a,`jiti`),moduleCache:!0}})]);return p(c,l.config,s)}_.__type=[()=>e,`context`,()=>t,`options`,`directory`,`mode`,`cacheDir`,`packageJson`,`workspaceConfig`,`loadEnvDirectory`,`Pn!2"n#2$&2%&2&&2'!2(!2)8"\`/*`];function v(e,t,n){return p({APP_NAME:u(e.config.name),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${u(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:n?.locale,DEFAULT_TIMEZONE:n?.timezone,LOG_LEVEL:e.config.logLevel.general===`trace`?`debug`:e.config.logLevel.general,ERROR_URL:n?.error?.url,ORGANIZATION:e.config.organization||(d(n?.organization)?n.organization.name:n?.organization),PLATFORM:e.config.platform,MODE:s(e.config.mode),TEST:o(e.config.mode),DEBUG:a(e.config.mode),STACKTRACE:e.config.mode!==`production`,ENVIRONMENT:!e.environment.name||e.environment.name===m?e.config.mode:e.environment.name},d(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce(h((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),[`ret`,`prop`,``,`P"2!"2""/#`]),{}):{})}v.__type=[()=>e,`context`,`parsed`,`workspaceConfig`,`loadEnvFromContext`,`Retrieves various dotenv configuration parameters from the context.`,`Pn!2"!2#!2$8"/%?&`];async function y(e,t){let n=await i(),[r,a,o]=await Promise.all([(_.Ω=[[`!`]],_(e,t,e.config.root,e.config.mode,e.cachePath,e.packageJson,n)),(_.Ω=[[`!`]],_(e,t,e.config.cwd,e.config.mode,e.cachePath,e.packageJson,n)),(_.Ω=[[`!`]],_(e,t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,n))]);return p(v(e,process.env,n),r,a,o)}y.__type=[()=>e,`context`,()=>t,`options`,`loadEnv`,'Pn!2"n#2$"`/%'];export{y as loadEnv,v as loadEnvFromContext};
1
+ import{__ΩEnvPluginContext as e,__ΩEnvPluginOptions as t}from"../types/plugin.mjs";import{removeEnvPrefix as n}from"./source-file-env.mjs";import{joinPaths as r}from"@stryke/path/join-paths";import{tryGetWorkspaceConfig as i}from"@storm-software/config-tools/get-config";import{isDevelopmentMode as a,isTestMode as o,toMode as s}from"@stryke/env/environment-checks";import{loadEnv as c,loadEnvFile as l}from"@stryke/env/load-env";import{kebabCase as u}from"@stryke/string-format/kebab-case";import{isSetObject as d}from"@stryke/type-checks/is-set-object";import{loadConfig as f}from"c12";import p from"defu";import{DEFAULT_ENVIRONMENT as m}from"powerlines/constants";function h(e,t){return e.__type=t,e}async function g(e,t,r){let i=await c(r,t);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(h(async e=>l(e,r),[`additionalEnvFile`,``,`P"2!"/"`])));for(let e of t)i=p(e,i)}return n(i)}g.__type=[()=>t,`options`,`mode`,`cwd`,`loadEnvFiles`,'Pn!2"&2#&2$"`/%'];async function _(e,t,n,i,a,o,s){let[c,l]=await Promise.all([(g.Ω=[[`!`]],g(t,i,n)),f({cwd:n,name:e.config.framework,envName:i,defaults:{NAME:s?.namespace&&o.name?o.name?.replace(`@${s.namespace}/`,``):e.config.name,MODE:i,ORG:e.config.organization||s?.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:r(a,`jiti`),moduleCache:!0}})]);return p(c,l.config,s)}_.__type=[()=>e,`context`,()=>t,`options`,`directory`,`mode`,`cacheDir`,`packageJson`,`workspaceConfig`,`loadEnvDirectory`,`Pn!2"n#2$&2%&2&&2'!2(!2)8"\`/*`];function v(e,t,n){return p({APP_NAME:u(e.config.name),APP_VERSION:e.packageJson.version,BUILD_ID:e.meta.buildId,BUILD_TIMESTAMP:new Date(e.meta.timestamp).toISOString(),BUILD_CHECKSUM:e.meta.checksum,RELEASE_ID:e.meta.releaseId,RELEASE_TAG:`${u(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:n?.locale,DEFAULT_TIMEZONE:n?.timezone,LOG_LEVEL:e.config.logLevel.general===`trace`?`debug`:e.config.logLevel.general,ERROR_URL:n?.error?.url,ORGANIZATION:e.config.organization||(d(n?.organization)?n.organization.name:n?.organization),PLATFORM:e.config.platform,MODE:s(e.config.mode),TEST:o(e.config.mode),DEBUG:a(e.config.mode),STACKTRACE:e.config.mode!==`production`,RUNTIME:e.config.environment.runtime,ENVIRONMENT:!e.config.environment.name||e.config.environment.name===m?e.config.mode:e.config.environment.name},d(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce(h((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),[`ret`,`prop`,``,`P"2!"2""/#`]),{}):{})}v.__type=[()=>e,`context`,`parsed`,`workspaceConfig`,`loadEnvFromContext`,`Retrieves various dotenv configuration parameters from the context.`,`Pn!2"!2#!2$8"/%?&`];async function y(e,t){let n=await i(),[r,a,o]=await Promise.all([(_.Ω=[[`!`]],_(e,t,e.config.root,e.config.mode,e.cachePath,e.packageJson,n)),(_.Ω=[[`!`]],_(e,t,e.config.cwd,e.config.mode,e.cachePath,e.packageJson,n)),(_.Ω=[[`!`]],_(e,t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,n))]);return p(v(e,process.env,n),r,a,o)}y.__type=[()=>e,`context`,()=>t,`options`,`loadEnv`,'Pn!2"n#2$"`/%'];export{y as loadEnv,v as loadEnvFromContext};
2
2
  //# sourceMappingURL=load.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"load.mjs","names":[],"sources":["../../src/helpers/load.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport {\n isDevelopmentMode,\n isTestMode,\n toMode\n} from \"@stryke/env/environment-checks\";\nimport {\n loadEnv as loadEnvBase,\n loadEnvFile as loadEnvFileBase\n} from \"@stryke/env/load-env\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig } from \"c12\";\nimport defu from \"defu\";\nimport { WorkspaceConfig } from \"powerlines\";\nimport { DEFAULT_ENVIRONMENT } from \"powerlines/constants\";\nimport { EnvPluginContext, EnvPluginOptions } from \"../types/plugin\";\nimport { removeEnvPrefix } from \"./source-file-env\";\n\nasync function loadEnvFiles<TEnv extends DotenvParseOutput = DotenvParseOutput>(\n options: EnvPluginOptions,\n mode: string,\n cwd: string\n): Promise<TEnv> {\n let env = await loadEnvBase(cwd, mode);\n if (options.additionalFiles && options.additionalFiles?.length > 0) {\n const additionalEnvFiles = await Promise.all(\n options.additionalFiles.map(async additionalEnvFile =>\n loadEnvFileBase(additionalEnvFile, cwd)\n )\n );\n\n for (const additionalEnvFile of additionalEnvFiles) {\n env = defu(additionalEnvFile, env);\n }\n }\n\n return removeEnvPrefix(env) as TEnv;\n}\n\nasync function loadEnvDirectory<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(\n context: EnvPluginContext,\n options: EnvPluginOptions,\n directory: string,\n mode: string,\n cacheDir: string,\n packageJson: PackageJson,\n workspaceConfig?: WorkspaceConfig\n): Promise<TEnv> {\n const [envResult, c12Result] = await Promise.all([\n loadEnvFiles<TEnv>(options, mode, directory),\n loadConfig({\n cwd: directory,\n name: context.config.framework,\n envName: mode,\n defaults: {\n NAME:\n workspaceConfig?.namespace && packageJson.name\n ? packageJson.name?.replace(`@${workspaceConfig.namespace}/`, \"\")\n : context.config.name,\n MODE: mode,\n ORG: context.config.organization || workspaceConfig?.organization\n },\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jitiOptions: {\n fsCache: joinPaths(cacheDir, \"jiti\"),\n moduleCache: true\n }\n })\n ]);\n\n return defu(envResult as any, c12Result.config, workspaceConfig) as TEnv;\n}\n\n/**\n * Retrieves various dotenv configuration parameters from the context.\n *\n * @param context - The context to retrieve the dotenv configuration from.\n * @param parsed - The parsed dotenv configuration.\n * @returns An object containing the dotenv configuration.\n */\nexport function loadEnvFromContext(\n context: EnvPluginContext,\n parsed: DotenvParseOutput,\n workspaceConfig?: WorkspaceConfig\n) {\n return defu(\n {\n APP_NAME: kebabCase(context.config.name),\n APP_VERSION: context.packageJson.version,\n BUILD_ID: context.meta.buildId,\n BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),\n BUILD_CHECKSUM: context.meta.checksum,\n RELEASE_ID: context.meta.releaseId,\n RELEASE_TAG: `${kebabCase(context.config.name)}@${context.packageJson.version}`,\n DEFAULT_LOCALE: workspaceConfig?.locale,\n DEFAULT_TIMEZONE: workspaceConfig?.timezone,\n LOG_LEVEL:\n context.config.logLevel.general === \"trace\"\n ? \"debug\"\n : context.config.logLevel.general,\n ERROR_URL: workspaceConfig?.error?.url,\n ORGANIZATION:\n context.config.organization ||\n (isSetObject(workspaceConfig?.organization)\n ? workspaceConfig.organization.name\n : workspaceConfig?.organization),\n PLATFORM: context.config.platform,\n MODE: toMode(context.config.mode),\n TEST: isTestMode(context.config.mode),\n DEBUG: isDevelopmentMode(context.config.mode),\n STACKTRACE: context.config.mode !== \"production\",\n ENVIRONMENT:\n !context.environment.name ||\n context.environment.name === DEFAULT_ENVIRONMENT\n ? context.config.mode\n : context.environment.name\n },\n isSetObject(context?.env?.types?.env)\n ? context.env.types.env?.getProperties().reduce(\n (ret, prop) => {\n ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();\n return ret;\n },\n {} as Record<string, any>\n )\n : {}\n );\n}\n\nexport async function loadEnv<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv> {\n const workspaceConfig = await tryGetWorkspaceConfig();\n\n const [project, workspace, config] = await Promise.all([\n loadEnvDirectory<TEnv>(\n context,\n options,\n context.config.root,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n context,\n options,\n context.config.cwd,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n context,\n options,\n context.envPaths.config,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n workspaceConfig\n )\n ]);\n\n return defu(\n loadEnvFromContext(context, process.env, workspaceConfig),\n project,\n workspace,\n config\n ) as TEnv;\n}\n"],"mappings":"2pBAIA,SAAM,EAAS,EAAW,EAAM,CAE/B,MADA,GAAG,OAAU,EACL,EA6BT,eAAS,EAAkB,EAAM,EAAU,EAAC,CAC5C,IAAM,EAAG,MAAA,EAAqB,EAAK,EAAE,CACrC,GAAM,EAAG,iBAAkB,EAAA,iBAA4B,OAAY,EAAC,CACpE,IAAS,EAAsB,MAAI,QAAO,IAAK,EAAI,gBAAA,IAAA,EAAA,KAAA,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,oBAAA,GAAA,UAAA,CAAA,CAAA,CAAA,gBAE7C,EAAA,EAAS,EAAkB,EAAO,CAGtC,OAAK,EAAA,EAAA,CAEP,EAAY,OAAM,KAAW,EAAW,UAAA,OAAA,MAAA,eAAA,kBAAA,CACxC,eAAc,EAAkB,EAAS,EAAA,EAAiB,EAAS,EAAG,EAAA,EAAA,CACpE,GAAE,CAAK,EAAC,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AAA,IAAA,CAAA,EAAA,IAAA,MAAA,KAAA,eAAA,CAAA,OAAA,GAAA,EAAA,8CAEK,GACT,CAAA,MAAA,OAAA,GAAA,aAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAEA,EAAE,OAAA,KAAA,EAAA,UAAA,SAAA,kBAAA,qBAAA,sEAAA,oBAAA,CACF,eAAqB,EAAO,EAAA,EAAc,CACzC,IAAA,EAAA,MAAA,GAAA,CACG,CAAK,EAAS,EAAM,GAAW,MAAS,QAAI,IAAO,EAAA,EAAkB,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,OAAA,KAAA,EAAA,OAAA,KAAA,EAAA,UAAA,EAAA,YAAA,EAAA,GAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,EAAA,OAAA,KAAA,EAAA,UAAA,EAAA,YAAA,EAAA,GAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,SAAA,OAAA,EAAA,OAAA,KAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,CAAA,CACvE,OAAO,EAAC,EAAoB,EAAO,QAAa,IAAA,EAAA,CAAA,EAAA,EAAA,EAAA,CAElD,EAAE,OAAA,KAAA,EAAA,cAAA,EAAA,UAAA,UAAA,gBAAA"}
1
+ {"version":3,"file":"load.mjs","names":[],"sources":["../../src/helpers/load.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { tryGetWorkspaceConfig } from \"@storm-software/config-tools/get-config\";\nimport {\n isDevelopmentMode,\n isTestMode,\n toMode\n} from \"@stryke/env/environment-checks\";\nimport {\n loadEnv as loadEnvBase,\n loadEnvFile as loadEnvFileBase\n} from \"@stryke/env/load-env\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { kebabCase } from \"@stryke/string-format/kebab-case\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type { PackageJson } from \"@stryke/types/package-json\";\nimport { loadConfig } from \"c12\";\nimport defu from \"defu\";\nimport { WorkspaceConfig } from \"powerlines\";\nimport { DEFAULT_ENVIRONMENT } from \"powerlines/constants\";\nimport { EnvPluginContext, EnvPluginOptions } from \"../types/plugin\";\nimport { removeEnvPrefix } from \"./source-file-env\";\n\nasync function loadEnvFiles<TEnv extends DotenvParseOutput = DotenvParseOutput>(\n options: EnvPluginOptions,\n mode: string,\n cwd: string\n): Promise<TEnv> {\n let env = await loadEnvBase(cwd, mode);\n if (options.additionalFiles && options.additionalFiles?.length > 0) {\n const additionalEnvFiles = await Promise.all(\n options.additionalFiles.map(async additionalEnvFile =>\n loadEnvFileBase(additionalEnvFile, cwd)\n )\n );\n\n for (const additionalEnvFile of additionalEnvFiles) {\n env = defu(additionalEnvFile, env);\n }\n }\n\n return removeEnvPrefix(env) as TEnv;\n}\n\nasync function loadEnvDirectory<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(\n context: EnvPluginContext,\n options: EnvPluginOptions,\n directory: string,\n mode: string,\n cacheDir: string,\n packageJson: PackageJson,\n workspaceConfig?: WorkspaceConfig\n): Promise<TEnv> {\n const [envResult, c12Result] = await Promise.all([\n loadEnvFiles<TEnv>(options, mode, directory),\n loadConfig({\n cwd: directory,\n name: context.config.framework,\n envName: mode,\n defaults: {\n NAME:\n workspaceConfig?.namespace && packageJson.name\n ? packageJson.name?.replace(`@${workspaceConfig.namespace}/`, \"\")\n : context.config.name,\n MODE: mode,\n ORG: context.config.organization || workspaceConfig?.organization\n },\n globalRc: true,\n packageJson: true,\n dotenv: true,\n jitiOptions: {\n fsCache: joinPaths(cacheDir, \"jiti\"),\n moduleCache: true\n }\n })\n ]);\n\n return defu(envResult as any, c12Result.config, workspaceConfig) as TEnv;\n}\n\n/**\n * Retrieves various dotenv configuration parameters from the context.\n *\n * @param context - The context to retrieve the dotenv configuration from.\n * @param parsed - The parsed dotenv configuration.\n * @returns An object containing the dotenv configuration.\n */\nexport function loadEnvFromContext(\n context: EnvPluginContext,\n parsed: DotenvParseOutput,\n workspaceConfig?: WorkspaceConfig\n) {\n return defu(\n {\n APP_NAME: kebabCase(context.config.name),\n APP_VERSION: context.packageJson.version,\n BUILD_ID: context.meta.buildId,\n BUILD_TIMESTAMP: new Date(context.meta.timestamp).toISOString(),\n BUILD_CHECKSUM: context.meta.checksum,\n RELEASE_ID: context.meta.releaseId,\n RELEASE_TAG: `${kebabCase(context.config.name)}@${context.packageJson.version}`,\n DEFAULT_LOCALE: workspaceConfig?.locale,\n DEFAULT_TIMEZONE: workspaceConfig?.timezone,\n LOG_LEVEL:\n context.config.logLevel.general === \"trace\"\n ? \"debug\"\n : context.config.logLevel.general,\n ERROR_URL: workspaceConfig?.error?.url,\n ORGANIZATION:\n context.config.organization ||\n (isSetObject(workspaceConfig?.organization)\n ? workspaceConfig.organization.name\n : workspaceConfig?.organization),\n PLATFORM: context.config.platform,\n MODE: toMode(context.config.mode),\n TEST: isTestMode(context.config.mode),\n DEBUG: isDevelopmentMode(context.config.mode),\n STACKTRACE: context.config.mode !== \"production\",\n RUNTIME: context.config.environment.runtime,\n ENVIRONMENT:\n !context.config.environment.name ||\n context.config.environment.name === DEFAULT_ENVIRONMENT\n ? context.config.mode\n : context.config.environment.name\n },\n isSetObject(context?.env?.types?.env)\n ? context.env.types.env?.getProperties().reduce(\n (ret, prop) => {\n ret[prop.name] = parsed[prop.name] ?? prop.getDefaultValue();\n return ret;\n },\n {} as Record<string, any>\n )\n : {}\n );\n}\n\nexport async function loadEnv<\n TEnv extends DotenvParseOutput = DotenvParseOutput\n>(context: EnvPluginContext, options: EnvPluginOptions): Promise<TEnv> {\n const workspaceConfig = await tryGetWorkspaceConfig();\n\n const [project, workspace, config] = await Promise.all([\n loadEnvDirectory<TEnv>(\n context,\n options,\n context.config.root,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n context,\n options,\n context.config.cwd,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n workspaceConfig\n ),\n loadEnvDirectory<TEnv>(\n context,\n options,\n context.envPaths.config,\n context.config.mode,\n context.cachePath,\n context.packageJson,\n workspaceConfig\n )\n ]);\n\n return defu(\n loadEnvFromContext(context, process.env, workspaceConfig),\n project,\n workspace,\n config\n ) as TEnv;\n}\n"],"mappings":"2pBAIA,SAAM,EAAS,EAAW,EAAM,CAE/B,MADA,GAAG,OAAU,EACL,EA6BT,eAAS,EAAkB,EAAM,EAAU,EAAC,CAC5C,IAAM,EAAG,MAAA,EAAqB,EAAK,EAAE,CACrC,GAAM,EAAG,iBAAkB,EAAA,iBAA4B,OAAY,EAAC,CACpE,IAAS,EAAsB,MAAI,QAAO,IAAK,EAAI,gBAAA,IAAA,EAAA,KAAA,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,oBAAA,GAAA,UAAA,CAAA,CAAA,CAAA,gBAE7C,EAAA,EAAS,EAAkB,EAAO,CAGtC,OAAK,EAAA,EAAA,CAEP,EAAY,OAAM,KAAW,EAAW,UAAA,OAAA,MAAA,eAAA,kBAAA,CACxC,eAAc,EAAkB,EAAS,EAAA,EAAiB,EAAS,EAAG,EAAA,EAAA,CACpE,GAAE,CAAK,EAAC,GAAqB,MAAM,QAAQ,IAAG,EAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAC5C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S,SAAO,kBAAA,qBAAA,sEAAA,oBAAA,CACrE,eAAC,EAAA,EAAA,EAAA,CACC,IAAE,EAAoB,MAAQ,GAAuB,CACnD,CAAK,EAAS,EAAW,GAAQ,MAAA,QAAa,IAAA,EAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,OAAA,KAAA,EAAA,OAAA,KAAA,EAAA,UAAA,EAAA,YAAA,EAAA,GAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,OAAA,IAAA,EAAA,OAAA,KAAA,EAAA,UAAA,EAAA,YAAA,EAAA,GAAA,EAAA,EAAA,CAAA,CAAA,IAAA,CAAA,CAAA,EAAA,EAAA,EAAA,EAAA,SAAA,OAAA,EAAA,OAAA,KAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,CAAA,CAChD,OAAE,EAAU,EAAmB,EAAI,QAAO,IAAA,EAAa,CAAA,EAAA,EAAA,EAAA,CAEzD,EAAO,OAAS,KAAA,EAAkB,cAAA,EAAA,UAAA,UAAA,gBAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../types/plugin.cjs`),n=require(`./reflect.cjs`);let r=require(`@powerlines/deepkit/capnp`),i=require(`@powerlines/deepkit/resolve-reflections`),a=require(`@powerlines/deepkit/schemas/reflection`),o=require(`@powerlines/deepkit/vendor/type`),s=require(`@stryke/capnp`);s=e.__toESM(s,1);let c=require(`@stryke/fs/buffer`),l=require(`@stryke/path/join-paths`),u=require(`@stryke/type-checks/is-empty-object`),d=require(`node:fs`);async function f(e){let t=await e.fs.resolve(`@powerlines/plugin-env/types/runtime`);if(!t)throw Error(`Failed to resolve the runtime type definition file for the environment variables. Please ensure that the "@powerlines/plugin-env" package is installed.`);return t}f.__type=[`context`,`resolveRuntimeTypeFile`,`Resolves the runtime type definition file for the environment variables.`,'P!2!&`/"?#'];async function p(e){return{file:await f(e),name:`EnvInterface`}}p.__type=[`context`,`getEnvDefaultTypeDefinition`,`Gets the default type definition for the environment variables.`,'P!2!!`/"?#'];async function m(e){return{file:await f(e),name:`SecretsInterface`}}m.__type=[`context`,`getSecretsDefaultTypeDefinition`,'P!2!!`/"'];function h(e,t=`env`){return(0,l.joinPaths)((0,i.getReflectionsPath)(e),`env`,`${t}-types.bin`)}h.__type=[`context`,()=>t.__ΩEnvType,`name`,()=>`env`,`getEnvTypeReflectionsPath`,`Gets the path to the environment type reflections.`,`P!2!n"2#>$&/%?&`];async function g(e,t=`env`){let i=h(e,t);if(!(0,d.existsSync)(i)){if(!e.env.types.env||(0,u.isEmptyObject)(e.env.types.env)){let r=n.createEnvReflection(e),i=new s.Message;r.messageRoot=i.initRoot(a.SerializedTypes),r.dataBuffer=i.toArrayBuffer(),e.env.types.env=r,await _(e,e.env.types.env,t)}return e.env.types.env}let l=await(0,c.readFileBuffer)(i),f=new s.Message(l,!1).getRoot(a.SerializedTypes),p=(0,o.resolveClassType)((0,o.deserializeType)((0,r.convertFromCapnp)(f.types)));return e.env.types[t]=p,e.env.types[t].messageRoot=f,e.env.types[t].dataBuffer=l,p}g.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvType,`name`,()=>`env`,`readEnvTypeReflection`,`Reads the environment type reflection from the file system.`,`Pn!2"n#2$>%!\`/&?'`];async function _(e,t,n=`env`){let i=t.serializeType(),o=new s.Message;(0,r.convertToCapnp)(i,o.initRoot(a.SerializedTypes)._initTypes(i.length)),await(0,c.writeFileBuffer)(h(e,n),o.toArrayBuffer())}_.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflection`,()=>t.__ΩEnvType,`name`,()=>`env`,`writeEnvTypeReflection`,`Writes the environment type reflection to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function v(e,t){return(0,l.joinPaths)((0,i.getReflectionsPath)(e),`env`,`${t}.bin`)}v.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvType,`name`,`getEnvReflectionsPath`,`Pn!2"n#2$&/%`];async function y(e){let t=v(e,`env`);if(!(0,d.existsSync)(t)){if(e.env.types.env||(e.env.types.env=await g(e,`env`)),!e.env.used.env||(0,u.isEmptyObject)(e.env.used.env)){let t=n.createEnvReflection(e,{type:{kind:o.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.env});t.name=`Env`;let r=new s.Message;t.messageRoot=r.initRoot(a.SerializedTypes),t.dataBuffer=r.toArrayBuffer(),e.env.used.env=t,await x(e,e.env.used.env,`env`)}return e.env.used.env}let i=await(0,c.readFileBuffer)(t),l=new s.Message(i,!1).getRoot(a.SerializedTypes),f=(0,o.resolveClassType)((0,o.deserializeType)((0,r.convertFromCapnp)(l.types)));return e.env.used.env=f,e.env.used.env.messageRoot=l,e.env.used.env.dataBuffer=i,f}y.__type=[()=>t.__ΩEnvPluginContext,`context`,`readEnvReflection`,`Reads the environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function b(e){let t=v(e,`secrets`);if(!(0,d.existsSync)(t)){if(e.env.types.secrets||(e.env.types.secrets=await g(e,`secrets`)),!e.env.used.secrets||(0,u.isEmptyObject)(e.env.used.secrets)){let t=n.createEnvReflection(e,{type:{kind:o.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.secrets});t.name=`Secrets`;let r=new s.Message;t.messageRoot=r.initRoot(a.SerializedTypes),t.dataBuffer=r.toArrayBuffer(),e.env.used.secrets=t,await x(e,e.env.used.secrets,`secrets`)}return e.env.used.secrets}let i=await(0,c.readFileBuffer)(t),l=new s.Message(i,!1).getRoot(a.SerializedTypes),f=(0,o.resolveClassType)((0,o.deserializeType)((0,r.convertFromCapnp)(l.types)));return e.env.used.secrets=f,e.env.used.secrets.messageRoot=l,e.env.used.secrets.dataBuffer=i,f}b.__type=[()=>t.__ΩEnvPluginContext,`context`,`readSecretsReflection`,`Reads the secret environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function x(e,t,n=`env`){let i=t.serializeType(),o=new s.Message;(0,r.convertToCapnp)(i,o.initRoot(a.SerializedTypes)._initTypes(i.length)),await(0,c.writeFileBuffer)(v(e,n),o.toArrayBuffer())}x.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflection`,()=>t.__ΩEnvType,`name`,()=>`env`,`writeEnvReflection`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function S(e,t,n=`env`){let i=t.serializeType(),o=new s.Message;(0,r.convertToCapnp)(i,o.initRoot(a.SerializedTypes)._initTypes(i.length)),(0,c.writeFileBufferSync)(v(e,n),o.toArrayBuffer())}S.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflection`,()=>t.__ΩEnvType,`name`,()=>`env`,`writeEnvReflectionSync`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`],exports.getEnvDefaultTypeDefinition=p,exports.getEnvReflectionsPath=v,exports.getEnvTypeReflectionsPath=h,exports.getSecretsDefaultTypeDefinition=m,exports.readEnvReflection=y,exports.readEnvTypeReflection=g,exports.readSecretsReflection=b,exports.resolveRuntimeTypeFile=f,exports.writeEnvReflection=x,exports.writeEnvReflectionSync=S,exports.writeEnvTypeReflection=_;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/_rolldown/runtime.cjs`),t=require(`../types/plugin.cjs`),n=require(`./reflect.cjs`);let r=require(`@powerlines/deepkit/capnp`),i=require(`@powerlines/deepkit/resolve-reflections`),a=require(`@powerlines/deepkit/schemas/reflection`),o=require(`@powerlines/deepkit/vendor/type`),s=require(`@stryke/capnp`);s=e.__toESM(s,1);let c=require(`@stryke/fs/buffer`),l=require(`@stryke/path/join-paths`),u=require(`@stryke/type-checks/is-empty-object`),d=require(`node:fs`);async function f(e){let t=await e.fs.resolve(`@powerlines/plugin-env/types/env`);if(!t)throw Error(`Failed to resolve the runtime type definition file for the environment variables. Please ensure that the "@powerlines/plugin-env" package is installed.`);return t}f.__type=[`context`,`resolveRuntimeTypeFile`,`Resolves the runtime type definition file for the environment variables.`,'P!2!&`/"?#'];async function p(e){return{file:await f(e),name:`EnvInterface`}}p.__type=[`context`,`getEnvDefaultTypeDefinition`,`Gets the default type definition for the environment variables.`,'P!2!!`/"?#'];async function m(e){return{file:await f(e),name:`SecretsInterface`}}m.__type=[`context`,`getSecretsDefaultTypeDefinition`,'P!2!!`/"'];function h(e,t=`env`){return(0,l.joinPaths)((0,i.getReflectionsPath)(e),`env`,`${t}-types.bin`)}h.__type=[`context`,()=>t.__ΩEnvType,`name`,()=>`env`,`getEnvTypeReflectionsPath`,`Gets the path to the environment type reflections.`,`P!2!n"2#>$&/%?&`];async function g(e,t=`env`){let i=h(e,t);if(!(0,d.existsSync)(i)){if(!e.env.types.env||(0,u.isEmptyObject)(e.env.types.env)){let r=n.createEnvReflection(e),i=new s.Message;r.messageRoot=i.initRoot(a.SerializedTypes),r.dataBuffer=i.toArrayBuffer(),e.env.types.env=r,await _(e,e.env.types.env,t)}return e.env.types.env}let l=await(0,c.readFileBuffer)(i),f=new s.Message(l,!1).getRoot(a.SerializedTypes),p=(0,o.resolveClassType)((0,o.deserializeType)((0,r.convertFromCapnp)(f.types)));return e.env.types[t]=p,e.env.types[t].messageRoot=f,e.env.types[t].dataBuffer=l,p}g.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvType,`name`,()=>`env`,`readEnvTypeReflection`,`Reads the environment type reflection from the file system.`,`Pn!2"n#2$>%!\`/&?'`];async function _(e,t,n=`env`){let i=t.serializeType(),o=new s.Message;(0,r.convertToCapnp)(i,o.initRoot(a.SerializedTypes)._initTypes(i.length)),await(0,c.writeFileBuffer)(h(e,n),o.toArrayBuffer())}_.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflection`,()=>t.__ΩEnvType,`name`,()=>`env`,`writeEnvTypeReflection`,`Writes the environment type reflection to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function v(e,t){return(0,l.joinPaths)((0,i.getReflectionsPath)(e),`env`,`${t}.bin`)}v.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>t.__ΩEnvType,`name`,`getEnvReflectionsPath`,`Pn!2"n#2$&/%`];async function y(e){let t=v(e,`env`);if(!(0,d.existsSync)(t)){if(e.env.types.env||(e.env.types.env=await g(e,`env`)),!e.env.used.env||(0,u.isEmptyObject)(e.env.used.env)){let t=n.createEnvReflection(e,{type:{kind:o.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.env});t.name=`Env`;let r=new s.Message;t.messageRoot=r.initRoot(a.SerializedTypes),t.dataBuffer=r.toArrayBuffer(),e.env.used.env=t,await x(e,e.env.used.env,`env`)}return e.env.used.env}let i=await(0,c.readFileBuffer)(t),l=new s.Message(i,!1).getRoot(a.SerializedTypes),f=(0,o.resolveClassType)((0,o.deserializeType)((0,r.convertFromCapnp)(l.types)));return e.env.used.env=f,e.env.used.env.messageRoot=l,e.env.used.env.dataBuffer=i,f}y.__type=[()=>t.__ΩEnvPluginContext,`context`,`readEnvReflection`,`Reads the environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function b(e){let t=v(e,`secrets`);if(!(0,d.existsSync)(t)){if(e.env.types.secrets||(e.env.types.secrets=await g(e,`secrets`)),!e.env.used.secrets||(0,u.isEmptyObject)(e.env.used.secrets)){let t=n.createEnvReflection(e,{type:{kind:o.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.secrets});t.name=`Secrets`;let r=new s.Message;t.messageRoot=r.initRoot(a.SerializedTypes),t.dataBuffer=r.toArrayBuffer(),e.env.used.secrets=t,await x(e,e.env.used.secrets,`secrets`)}return e.env.used.secrets}let i=await(0,c.readFileBuffer)(t),l=new s.Message(i,!1).getRoot(a.SerializedTypes),f=(0,o.resolveClassType)((0,o.deserializeType)((0,r.convertFromCapnp)(l.types)));return e.env.used.secrets=f,e.env.used.secrets.messageRoot=l,e.env.used.secrets.dataBuffer=i,f}b.__type=[()=>t.__ΩEnvPluginContext,`context`,`readSecretsReflection`,`Reads the secret environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function x(e,t,n=`env`){let i=t.serializeType(),o=new s.Message;(0,r.convertToCapnp)(i,o.initRoot(a.SerializedTypes)._initTypes(i.length)),await(0,c.writeFileBuffer)(v(e,n),o.toArrayBuffer())}x.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflection`,()=>t.__ΩEnvType,`name`,()=>`env`,`writeEnvReflection`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function S(e,t,n=`env`){let i=t.serializeType(),o=new s.Message;(0,r.convertToCapnp)(i,o.initRoot(a.SerializedTypes)._initTypes(i.length)),(0,c.writeFileBufferSync)(v(e,n),o.toArrayBuffer())}S.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflection`,()=>t.__ΩEnvType,`name`,()=>`env`,`writeEnvReflectionSync`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`],exports.getEnvDefaultTypeDefinition=p,exports.getEnvReflectionsPath=v,exports.getEnvTypeReflectionsPath=h,exports.getSecretsDefaultTypeDefinition=m,exports.readEnvReflection=y,exports.readEnvTypeReflection=g,exports.readSecretsReflection=b,exports.resolveRuntimeTypeFile=f,exports.writeEnvReflection=x,exports.writeEnvReflectionSync=S,exports.writeEnvTypeReflection=_;
@@ -1 +1 @@
1
- {"version":3,"file":"persistence.d.cts","names":[],"sources":["../../src/helpers/persistence.ts"],"mappings":";;;;;;;;AAoDA;;;;iBAAsB,sBAAA,CACp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,IAAA,GAAM,OAAA,GAAe,OAAA;AAAA,iBAeP,qBAAA,CACd,OAAA,EAAS,gBAAA,EACT,IAAA,EAAM,OAAA;;;;AA5ER;;;iBAuFsB,iBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;;;iBAuDW,qBAAA,CACpB,OAAA,EAAS,gBAAA,GACR,OAAA,CAAQ,eAAA;;;;;AApIX;;;iBA+LsB,kBAAA,CACpB,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA,GAAe,OAAA;;;;;;;;iBAsBP,sBAAA,CACd,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,eAAA,OACZ,IAAA,GAAM,OAAA"}
@@ -1,2 +1,2 @@
1
- import{__ΩEnvPluginContext as e,__ΩEnvType as t}from"../types/plugin.mjs";import{createEnvReflection as n}from"./reflect.mjs";import{convertFromCapnp as r,convertToCapnp as i}from"@powerlines/deepkit/capnp";import{getReflectionsPath as a}from"@powerlines/deepkit/resolve-reflections";import{SerializedTypes as o}from"@powerlines/deepkit/schemas/reflection";import{ReflectionKind as s,deserializeType as c,resolveClassType as l}from"@powerlines/deepkit/vendor/type";import*as u from"@stryke/capnp";import{readFileBuffer as d,writeFileBuffer as f,writeFileBufferSync as p}from"@stryke/fs/buffer";import{joinPaths as m}from"@stryke/path/join-paths";import{isEmptyObject as h}from"@stryke/type-checks/is-empty-object";import{existsSync as g}from"node:fs";async function _(e){let t=await e.fs.resolve(`@powerlines/plugin-env/types/runtime`);if(!t)throw Error(`Failed to resolve the runtime type definition file for the environment variables. Please ensure that the "@powerlines/plugin-env" package is installed.`);return t}_.__type=[`context`,`resolveRuntimeTypeFile`,`Resolves the runtime type definition file for the environment variables.`,'P!2!&`/"?#'];async function v(e){return{file:await _(e),name:`EnvInterface`}}v.__type=[`context`,`getEnvDefaultTypeDefinition`,`Gets the default type definition for the environment variables.`,'P!2!!`/"?#'];async function y(e){return{file:await _(e),name:`SecretsInterface`}}y.__type=[`context`,`getSecretsDefaultTypeDefinition`,'P!2!!`/"'];function b(e,t=`env`){return m(a(e),`env`,`${t}-types.bin`)}b.__type=[`context`,()=>t,`name`,()=>`env`,`getEnvTypeReflectionsPath`,`Gets the path to the environment type reflections.`,`P!2!n"2#>$&/%?&`];async function x(e,t=`env`){let i=b(e,t);if(!g(i)){if(!e.env.types.env||h(e.env.types.env)){let r=n(e),i=new u.Message;r.messageRoot=i.initRoot(o),r.dataBuffer=i.toArrayBuffer(),e.env.types.env=r,await S(e,e.env.types.env,t)}return e.env.types.env}let a=await d(i),s=new u.Message(a,!1).getRoot(o),f=l(c(r(s.types)));return e.env.types[t]=f,e.env.types[t].messageRoot=s,e.env.types[t].dataBuffer=a,f}x.__type=[()=>e,`context`,()=>t,`name`,()=>`env`,`readEnvTypeReflection`,`Reads the environment type reflection from the file system.`,`Pn!2"n#2$>%!\`/&?'`];async function S(e,t,n=`env`){let r=t.serializeType(),a=new u.Message;i(r,a.initRoot(o)._initTypes(r.length)),await f(b(e,n),a.toArrayBuffer())}S.__type=[()=>e,`context`,`reflection`,()=>t,`name`,()=>`env`,`writeEnvTypeReflection`,`Writes the environment type reflection to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function C(e,t){return m(a(e),`env`,`${t}.bin`)}C.__type=[()=>e,`context`,()=>t,`name`,`getEnvReflectionsPath`,`Pn!2"n#2$&/%`];async function w(e){let t=C(e,`env`);if(!g(t)){if(e.env.types.env||(e.env.types.env=await x(e,`env`)),!e.env.used.env||h(e.env.used.env)){let t=n(e,{type:{kind:s.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.env});t.name=`Env`;let r=new u.Message;t.messageRoot=r.initRoot(o),t.dataBuffer=r.toArrayBuffer(),e.env.used.env=t,await E(e,e.env.used.env,`env`)}return e.env.used.env}let i=await d(t),a=new u.Message(i,!1).getRoot(o),f=l(c(r(a.types)));return e.env.used.env=f,e.env.used.env.messageRoot=a,e.env.used.env.dataBuffer=i,f}w.__type=[()=>e,`context`,`readEnvReflection`,`Reads the environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function T(e){let t=C(e,`secrets`);if(!g(t)){if(e.env.types.secrets||(e.env.types.secrets=await x(e,`secrets`)),!e.env.used.secrets||h(e.env.used.secrets)){let t=n(e,{type:{kind:s.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.secrets});t.name=`Secrets`;let r=new u.Message;t.messageRoot=r.initRoot(o),t.dataBuffer=r.toArrayBuffer(),e.env.used.secrets=t,await E(e,e.env.used.secrets,`secrets`)}return e.env.used.secrets}let i=await d(t),a=new u.Message(i,!1).getRoot(o),f=l(c(r(a.types)));return e.env.used.secrets=f,e.env.used.secrets.messageRoot=a,e.env.used.secrets.dataBuffer=i,f}T.__type=[()=>e,`context`,`readSecretsReflection`,`Reads the secret environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function E(e,t,n=`env`){let r=t.serializeType(),a=new u.Message;i(r,a.initRoot(o)._initTypes(r.length)),await f(C(e,n),a.toArrayBuffer())}E.__type=[()=>e,`context`,`reflection`,()=>t,`name`,()=>`env`,`writeEnvReflection`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function D(e,t,n=`env`){let r=t.serializeType(),a=new u.Message;i(r,a.initRoot(o)._initTypes(r.length)),p(C(e,n),a.toArrayBuffer())}D.__type=[()=>e,`context`,`reflection`,()=>t,`name`,()=>`env`,`writeEnvReflectionSync`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];export{v as getEnvDefaultTypeDefinition,C as getEnvReflectionsPath,b as getEnvTypeReflectionsPath,y as getSecretsDefaultTypeDefinition,w as readEnvReflection,x as readEnvTypeReflection,T as readSecretsReflection,_ as resolveRuntimeTypeFile,E as writeEnvReflection,D as writeEnvReflectionSync,S as writeEnvTypeReflection};
1
+ import{__ΩEnvPluginContext as e,__ΩEnvType as t}from"../types/plugin.mjs";import{createEnvReflection as n}from"./reflect.mjs";import{convertFromCapnp as r,convertToCapnp as i}from"@powerlines/deepkit/capnp";import{getReflectionsPath as a}from"@powerlines/deepkit/resolve-reflections";import{SerializedTypes as o}from"@powerlines/deepkit/schemas/reflection";import{ReflectionKind as s,deserializeType as c,resolveClassType as l}from"@powerlines/deepkit/vendor/type";import*as u from"@stryke/capnp";import{readFileBuffer as d,writeFileBuffer as f,writeFileBufferSync as p}from"@stryke/fs/buffer";import{joinPaths as m}from"@stryke/path/join-paths";import{isEmptyObject as h}from"@stryke/type-checks/is-empty-object";import{existsSync as g}from"node:fs";async function _(e){let t=await e.fs.resolve(`@powerlines/plugin-env/types/env`);if(!t)throw Error(`Failed to resolve the runtime type definition file for the environment variables. Please ensure that the "@powerlines/plugin-env" package is installed.`);return t}_.__type=[`context`,`resolveRuntimeTypeFile`,`Resolves the runtime type definition file for the environment variables.`,'P!2!&`/"?#'];async function v(e){return{file:await _(e),name:`EnvInterface`}}v.__type=[`context`,`getEnvDefaultTypeDefinition`,`Gets the default type definition for the environment variables.`,'P!2!!`/"?#'];async function y(e){return{file:await _(e),name:`SecretsInterface`}}y.__type=[`context`,`getSecretsDefaultTypeDefinition`,'P!2!!`/"'];function b(e,t=`env`){return m(a(e),`env`,`${t}-types.bin`)}b.__type=[`context`,()=>t,`name`,()=>`env`,`getEnvTypeReflectionsPath`,`Gets the path to the environment type reflections.`,`P!2!n"2#>$&/%?&`];async function x(e,t=`env`){let i=b(e,t);if(!g(i)){if(!e.env.types.env||h(e.env.types.env)){let r=n(e),i=new u.Message;r.messageRoot=i.initRoot(o),r.dataBuffer=i.toArrayBuffer(),e.env.types.env=r,await S(e,e.env.types.env,t)}return e.env.types.env}let a=await d(i),s=new u.Message(a,!1).getRoot(o),f=l(c(r(s.types)));return e.env.types[t]=f,e.env.types[t].messageRoot=s,e.env.types[t].dataBuffer=a,f}x.__type=[()=>e,`context`,()=>t,`name`,()=>`env`,`readEnvTypeReflection`,`Reads the environment type reflection from the file system.`,`Pn!2"n#2$>%!\`/&?'`];async function S(e,t,n=`env`){let r=t.serializeType(),a=new u.Message;i(r,a.initRoot(o)._initTypes(r.length)),await f(b(e,n),a.toArrayBuffer())}S.__type=[()=>e,`context`,`reflection`,()=>t,`name`,()=>`env`,`writeEnvTypeReflection`,`Writes the environment type reflection to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function C(e,t){return m(a(e),`env`,`${t}.bin`)}C.__type=[()=>e,`context`,()=>t,`name`,`getEnvReflectionsPath`,`Pn!2"n#2$&/%`];async function w(e){let t=C(e,`env`);if(!g(t)){if(e.env.types.env||(e.env.types.env=await x(e,`env`)),!e.env.used.env||h(e.env.used.env)){let t=n(e,{type:{kind:s.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.env});t.name=`Env`;let r=new u.Message;t.messageRoot=r.initRoot(o),t.dataBuffer=r.toArrayBuffer(),e.env.used.env=t,await E(e,e.env.used.env,`env`)}return e.env.used.env}let i=await d(t),a=new u.Message(i,!1).getRoot(o),f=l(c(r(a.types)));return e.env.used.env=f,e.env.used.env.messageRoot=a,e.env.used.env.dataBuffer=i,f}w.__type=[()=>e,`context`,`readEnvReflection`,`Reads the environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function T(e){let t=C(e,`secrets`);if(!g(t)){if(e.env.types.secrets||(e.env.types.secrets=await x(e,`secrets`)),!e.env.used.secrets||h(e.env.used.secrets)){let t=n(e,{type:{kind:s.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters that are used (at least once) by the ${e.config.name?`${e.config.name} application`:`application`}.`,types:[]},superReflection:e.env.types.secrets});t.name=`Secrets`;let r=new u.Message;t.messageRoot=r.initRoot(o),t.dataBuffer=r.toArrayBuffer(),e.env.used.secrets=t,await E(e,e.env.used.secrets,`secrets`)}return e.env.used.secrets}let i=await d(t),a=new u.Message(i,!1).getRoot(o),f=l(c(r(a.types)));return e.env.used.secrets=f,e.env.used.secrets.messageRoot=a,e.env.used.secrets.dataBuffer=i,f}T.__type=[()=>e,`context`,`readSecretsReflection`,`Reads the secret environment reflection data from the file system.`,'Pn!2"!`/#?$'];async function E(e,t,n=`env`){let r=t.serializeType(),a=new u.Message;i(r,a.initRoot(o)._initTypes(r.length)),await f(C(e,n),a.toArrayBuffer())}E.__type=[()=>e,`context`,`reflection`,()=>t,`name`,()=>`env`,`writeEnvReflection`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];function D(e,t,n=`env`){let r=t.serializeType(),a=new u.Message;i(r,a.initRoot(o)._initTypes(r.length)),p(C(e,n),a.toArrayBuffer())}D.__type=[()=>e,`context`,`reflection`,()=>t,`name`,()=>`env`,`writeEnvReflectionSync`,`Writes the environment reflection data to the file system.`,`Pn!2"!2#n$2%>&"/'?(`];export{v as getEnvDefaultTypeDefinition,C as getEnvReflectionsPath,b as getEnvTypeReflectionsPath,y as getSecretsDefaultTypeDefinition,w as readEnvReflection,x as readEnvTypeReflection,T as readSecretsReflection,_ as resolveRuntimeTypeFile,E as writeEnvReflection,D as writeEnvReflectionSync,S as writeEnvTypeReflection};
2
2
  //# sourceMappingURL=persistence.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"persistence.mjs","names":[],"sources":["../../src/helpers/persistence.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { convertFromCapnp, convertToCapnp } from \"@powerlines/deepkit/capnp\";\nimport { getReflectionsPath } from \"@powerlines/deepkit/resolve-reflections\";\nimport { SerializedTypes } from \"@powerlines/deepkit/schemas/reflection\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n deserializeType,\n ReflectionClass,\n ReflectionKind,\n resolveClassType\n} from \"@powerlines/deepkit/vendor/type\";\nimport * as capnp from \"@stryke/capnp\";\nimport {\n readFileBuffer,\n writeFileBuffer,\n writeFileBufferSync\n} from \"@stryke/fs/buffer\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isEmptyObject } from \"@stryke/type-checks/is-empty-object\";\nimport type { TypeDefinition } from \"@stryke/types/configuration\";\nimport { existsSync } from \"node:fs\";\nimport { Context, UnresolvedContext } from \"powerlines\";\nimport {\n EnvPluginContext,\n EnvPluginResolvedConfig,\n EnvType\n} from \"../types/plugin\";\nimport { createEnvReflection } from \"./reflect\";\n\n/**\n * Resolves the runtime type definition file for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The runtime type definition file for the environment variables.\n */\nexport async function resolveRuntimeTypeFile(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<string> {\n const resolved = await context.fs.resolve(\n \"@powerlines/plugin-env/types/runtime\"\n );\n if (!resolved) {\n throw new Error(\n `Failed to resolve the runtime type definition file for the environment variables. Please ensure that the \"@powerlines/plugin-env\" package is installed.`\n );\n }\n\n return resolved;\n}\n\n/**\n * Gets the default type definition for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment variables.\n */\nexport async function getEnvDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"EnvInterface\"\n };\n}\n\n/** Gets the default type definition for the environment secrets.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment secrets.\n */\nexport async function getSecretsDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"SecretsInterface\"\n };\n}\n\n/**\n * Gets the path to the environment type reflections.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The path to the environment type reflections.\n */\nexport function getEnvTypeReflectionsPath(\n context: Context<EnvPluginResolvedConfig>,\n name: EnvType = \"env\"\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}-types.bin`);\n}\n\n/**\n * Reads the environment type reflection from the file system.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The environment type reflection.\n */\nexport async function readEnvTypeReflection(\n context: EnvPluginContext,\n name: EnvType = \"env\"\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvTypeReflectionsPath(context, name);\n if (!existsSync(filePath)) {\n if (!context.env.types.env || isEmptyObject(context.env.types.env)) {\n const reflection = createEnvReflection(context) as Reflection;\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.types.env = reflection;\n await writeEnvTypeReflection(context, context.env.types.env, name);\n }\n\n return context.env.types.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.types[name] = reflection;\n context.env.types[name].messageRoot = messageRoot;\n context.env.types[name].dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment type reflection to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The environment type reflection to write.\n * @param name - The name of the type reflections.\n */\nexport async function writeEnvTypeReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvTypeReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\nexport function getEnvReflectionsPath(\n context: EnvPluginContext,\n name: EnvType\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}.bin`);\n}\n\n/**\n * Reads the environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readEnvReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"env\");\n if (!existsSync(filePath)) {\n if (!context.env.types.env) {\n context.env.types.env = await readEnvTypeReflection(context, \"env\");\n }\n\n if (!context.env.used.env || isEmptyObject(context.env.used.env)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.env\n }) as Reflection;\n reflection.name = \"Env\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.env = reflection;\n await writeEnvReflection(context, context.env.used.env, \"env\");\n }\n\n return context.env.used.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.env = reflection;\n context.env.used.env.messageRoot = messageRoot;\n context.env.used.env.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Reads the secret environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readSecretsReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"secrets\");\n if (!existsSync(filePath)) {\n if (!context.env.types.secrets) {\n context.env.types.secrets = await readEnvTypeReflection(\n context,\n \"secrets\"\n );\n }\n\n if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.secrets\n }) as Reflection;\n reflection.name = \"Secrets\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.secrets = reflection;\n await writeEnvReflection(context, context.env.used.secrets, \"secrets\");\n }\n\n return context.env.used.secrets;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.secrets = reflection;\n context.env.used.secrets.messageRoot = messageRoot;\n context.env.used.secrets.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport async function writeEnvReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport function writeEnvReflectionSync(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n writeFileBufferSync(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n"],"mappings":"+uBAqCA,eAAsB,EAAc,EAAA,CACpC,IAAQ,EAAU,MAAA,EAAA,GAAkB,QAAQ,uCAAW,CACvD,GAAM,CAAC,EACL,MAAA,MAAgB,0JAAA,CAEhB,OAAA,EAEF,EAAS,OAAsB,CAAA,UAAQ,yBAAQ,2EAAA,aAAA,CAO/C,eAAE,EAAA,EAAA,CACF,MAAO,CACL,KAAQ,MAAC,EAAkB,EAAA,CAC1B,KAAO,eACR,CAEF,EAAG,OAAA,CAAA,UAAA,8BAAA,kEAAA,aAAA,qBAOD,MAAO,CACT,KAAA,MAAA,EAAA,EAAA,yBAEE,CAEF,EAAC,OAAA,CAAA,UAAA,kCAAA,WAAA,CAQD,SAAgB,EAAuB,EAAQ,EAAA,MAAA,CAC7C,OAAO,EAAE,EAAY,EAAA,CAAA,MAAA,GAAA,EAAA,YAAA,CAEvB,EAAA,OAAA,CAAA,cAAA,EAAA,WAAA,MAAA,4BAAA,qDAAA,kBAAA,CAQA,eAAW,EAAkB,EAAuB,EAAA,MAAA,CAClD,IAAC,EAAQ,EAAgB,EAAA,EAAA,CACzB,GAAA,CAAA,EAAO,EAAA,CAAA,CACL,GAAI,CAAC,EAAO,IAAA,MAAA,KAAA,EAA+B,EAAA,IAAA,MAAA,IAAA,CAAA,CAC3C,IAAO,EAAA,EAAgB,EAAA,CACxB,EAAA,IAAA,EAAA,QACH,EAAA,YAAA,EAAA,SAAA,EAAA,gCAEE,EAAA,IAAA,MAAA,IAAA,EACC,MAAS,EAAuB,EAAM,EAAW,IAAA,MAAA,IAAA,EAAA,CAEhD,OAAM,EAAS,IAAI,MAAC,IAEtB,IAAE,EAAY,MAAO,EAAK,EAAiB,CAEtC,EAAS,IADd,EAAA,QAAA,EAAA,GACc,CAAA,QAAA,EAAyB,CACvC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AAA,EAAoB,CAAA,WAAA,EAAA,OAAA,CAAA,CAC7B,MAAA,EAAA,EAAA,EAAA,EAAA,CAAA,EAAA,eAAA,CAAA,CAEF,EAAiB,OAAM,KAAA,EAAwB,UAAA,iBAAA,EAAA,WAAA,MAAA,qBAAA,6DAAA,sBAAA,CAQ/C,SAAc,EAAqB,EAAA,EAAA,EAAA,MAAA,CACjC,IAAA,EAAiB,EAAI,eAAc,CACnC,EAAgB,IAAI,EAAC,QAErB,EAAO,EAAA,EAAA,SAAA,EAAU,CAAA,WAAA,EAAA,OAAA,CAAA,CACnB,EAAA,EAAA,EAAA,EAAA,CAAA,EAAA,eAAA,CAAA,CAEA,EAAE,OAAA,KAAA,EAAA,UAAA,iBAAA,EAAA,WAAA,MAAA,yBAAA,6DAAA,sBAAA"}
1
+ {"version":3,"file":"persistence.mjs","names":[],"sources":["../../src/helpers/persistence.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { convertFromCapnp, convertToCapnp } from \"@powerlines/deepkit/capnp\";\nimport { getReflectionsPath } from \"@powerlines/deepkit/resolve-reflections\";\nimport { SerializedTypes } from \"@powerlines/deepkit/schemas/reflection\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport {\n deserializeType,\n ReflectionClass,\n ReflectionKind,\n resolveClassType\n} from \"@powerlines/deepkit/vendor/type\";\nimport * as capnp from \"@stryke/capnp\";\nimport {\n readFileBuffer,\n writeFileBuffer,\n writeFileBufferSync\n} from \"@stryke/fs/buffer\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { isEmptyObject } from \"@stryke/type-checks/is-empty-object\";\nimport type { TypeDefinition } from \"@stryke/types/configuration\";\nimport { existsSync } from \"node:fs\";\nimport { Context, UnresolvedContext } from \"powerlines\";\nimport {\n EnvPluginContext,\n EnvPluginResolvedConfig,\n EnvType\n} from \"../types/plugin\";\nimport { createEnvReflection } from \"./reflect\";\n\n/**\n * Resolves the runtime type definition file for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The runtime type definition file for the environment variables.\n */\nexport async function resolveRuntimeTypeFile(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<string> {\n const resolved = await context.fs.resolve(\"@powerlines/plugin-env/types/env\");\n if (!resolved) {\n throw new Error(\n `Failed to resolve the runtime type definition file for the environment variables. Please ensure that the \"@powerlines/plugin-env\" package is installed.`\n );\n }\n\n return resolved;\n}\n\n/**\n * Gets the default type definition for the environment variables.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment variables.\n */\nexport async function getEnvDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"EnvInterface\"\n };\n}\n\n/** Gets the default type definition for the environment secrets.\n *\n * @param context - The plugin context.\n * @returns The default type definition for the environment secrets.\n */\nexport async function getSecretsDefaultTypeDefinition(\n context: UnresolvedContext<EnvPluginResolvedConfig>\n): Promise<TypeDefinition> {\n return {\n file: await resolveRuntimeTypeFile(context),\n name: \"SecretsInterface\"\n };\n}\n\n/**\n * Gets the path to the environment type reflections.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The path to the environment type reflections.\n */\nexport function getEnvTypeReflectionsPath(\n context: Context<EnvPluginResolvedConfig>,\n name: EnvType = \"env\"\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}-types.bin`);\n}\n\n/**\n * Reads the environment type reflection from the file system.\n *\n * @param context - The plugin context.\n * @param name - The name of the type reflections.\n * @returns The environment type reflection.\n */\nexport async function readEnvTypeReflection(\n context: EnvPluginContext,\n name: EnvType = \"env\"\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvTypeReflectionsPath(context, name);\n if (!existsSync(filePath)) {\n if (!context.env.types.env || isEmptyObject(context.env.types.env)) {\n const reflection = createEnvReflection(context) as Reflection;\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.types.env = reflection;\n await writeEnvTypeReflection(context, context.env.types.env, name);\n }\n\n return context.env.types.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.types[name] = reflection;\n context.env.types[name].messageRoot = messageRoot;\n context.env.types[name].dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment type reflection to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The environment type reflection to write.\n * @param name - The name of the type reflections.\n */\nexport async function writeEnvTypeReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvTypeReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\nexport function getEnvReflectionsPath(\n context: EnvPluginContext,\n name: EnvType\n): string {\n return joinPaths(getReflectionsPath(context), \"env\", `${name}.bin`);\n}\n\n/**\n * Reads the environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readEnvReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"env\");\n if (!existsSync(filePath)) {\n if (!context.env.types.env) {\n context.env.types.env = await readEnvTypeReflection(context, \"env\");\n }\n\n if (!context.env.used.env || isEmptyObject(context.env.used.env)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `An object containing the environment configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.env\n }) as Reflection;\n reflection.name = \"Env\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.env = reflection;\n await writeEnvReflection(context, context.env.used.env, \"env\");\n }\n\n return context.env.used.env;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.env = reflection;\n context.env.used.env.messageRoot = messageRoot;\n context.env.used.env.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Reads the secret environment reflection data from the file system.\n *\n * @param context - The plugin context.\n * @returns The environment reflection data.\n */\nexport async function readSecretsReflection(\n context: EnvPluginContext\n): Promise<ReflectionClass<any>> {\n const filePath = getEnvReflectionsPath(context, \"secrets\");\n if (!existsSync(filePath)) {\n if (!context.env.types.secrets) {\n context.env.types.secrets = await readEnvTypeReflection(\n context,\n \"secrets\"\n );\n }\n\n if (!context.env.used.secrets || isEmptyObject(context.env.used.secrets)) {\n const reflection = createEnvReflection(context, {\n type: {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `An object containing the secret configuration parameters that are used (at least once) by the ${\n context.config.name\n ? `${context.config.name} application`\n : \"application\"\n }.`,\n types: []\n },\n superReflection: context.env.types.secrets\n }) as Reflection;\n reflection.name = \"Secrets\";\n\n const message = new capnp.Message();\n reflection.messageRoot = message.initRoot(SerializedTypes);\n reflection.dataBuffer = message.toArrayBuffer();\n\n context.env.used.secrets = reflection;\n await writeEnvReflection(context, context.env.used.secrets, \"secrets\");\n }\n\n return context.env.used.secrets;\n }\n\n const buffer = await readFileBuffer(filePath);\n const message = new capnp.Message(buffer, false);\n const messageRoot = message.getRoot(SerializedTypes);\n\n const reflection = resolveClassType(\n deserializeType(convertFromCapnp(messageRoot.types))\n );\n\n context.env.used.secrets = reflection;\n context.env.used.secrets.messageRoot = messageRoot;\n context.env.used.secrets.dataBuffer = buffer;\n\n return reflection;\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport async function writeEnvReflection(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n await writeFileBuffer(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n\n/**\n * Writes the environment reflection data to the file system.\n *\n * @param context - The plugin context.\n * @param reflection - The reflection data to write.\n * @param name - The name of the reflection (either \"env\" or \"secrets\").\n */\nexport function writeEnvReflectionSync(\n context: EnvPluginContext,\n reflection: ReflectionClass<any>,\n name: EnvType = \"env\"\n) {\n const serialized = reflection.serializeType();\n\n const message = new capnp.Message();\n const root = message.initRoot(SerializedTypes);\n\n convertToCapnp(serialized, root._initTypes(serialized.length));\n\n writeFileBufferSync(\n getEnvReflectionsPath(context, name),\n message.toArrayBuffer()\n );\n}\n"],"mappings":"+uBAqCA,eAAsB,EAAc,EAAA,CACpC,IAAQ,EAAU,MAAA,EAAA,GAAkB,QAAQ,mCAAW,CACvD,GAAM,CAAC,EACL,MAAA,MAAgB,0JAAA,CAEhB,OAAA,EAEF,EAAS,OAAsB,CAAA,UAAQ,yBAAQ,2EAAA,aAAA,CAO/C,eAAE,EAAA,EAAA,CACF,MAAO,CACL,KAAQ,MAAC,EAAkB,EAA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AA,CAAA,EAAA,eAAA,CAAA,CAEF,EAAC,OAAA,KAAA,EAAA,UAAA,iBAAA,EAAA,WAAA,MAAA,yBAAA,6DAAA,sBAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../types/runtime.cjs`),t=require(`../types/plugin.cjs`),n=require(`./persistence.cjs`);let r=require(`@stryke/string-format/title-case`),i=require(`@powerlines/deepkit/vendor/type`),a=require(`@stryke/path/join-paths`),o=require(`@powerlines/deepkit/reflect-type`),s=require(`@stryke/path/is-parent-path`);function c(e,t){return e.__type=t,e}function l(e,t){return m(e,{type:(0,i.merge)(t.map(c(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}l.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflections`,`mergeEnvReflections`,`Pn!2"!F2#!/$`];function u(e,t){return h(e,{type:(0,i.merge)(t.map(c(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}u.__type=[()=>t.__ΩEnvPluginContext,`context`,`reflections`,`mergeSecretsReflections`,`Pn!2"!F2#!/$`];const d=[`type`,`superReflection`,`CreateEnvReflectionOptions`,`PP!!J4!8!4"8Mw#y`];var f=class{APP_NAME;APP_VERSION;BUILD_ID;BUILD_TIMESTAMP;BUILD_CHECKSUM;RELEASE_ID;RELEASE_TAG;ORGANIZATION;PLATFORM=`neutral`;MODE=`production`;ENVIRONMENT;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;ERROR_URL;DEFAULT_TIMEZONE;DEFAULT_LOCALE;CI=!1;static __type=[`APP_NAME`,`APP_VERSION`,`BUILD_ID`,`BUILD_TIMESTAMP`,`BUILD_CHECKSUM`,`RELEASE_ID`,`RELEASE_TAG`,`ORGANIZATION`,`node`,`browser`,`neutral`,`PLATFORM`,function(){return`neutral`},`development`,`test`,`production`,`MODE`,function(){return`production`},`ENVIRONMENT`,`DEBUG`,function(){return!1},`TEST`,function(){return!1},`MINIMAL`,function(){return!1},`NO_COLOR`,function(){return!1},`FORCE_COLOR`,function(){return!1},`FORCE_HYPERLINK`,function(){return!1},`STACKTRACE`,function(){return!1},`INCLUDE_ERROR_DATA`,function(){return!1},`ERROR_URL`,`DEFAULT_TIMEZONE`,`DEFAULT_LOCALE`,`CI`,function(){return!1},()=>e.__ΩEnvInterface,`BaseEnv`,`&3!&3"&3#&3$&3%&3&&3'&3(P.).*.+J3,>-P.../.0J31>2&33)34>5)36>7)38>9)3:>;P')J3<>=P')J3>>?)3@>A)3B>C&3D&3E&3F)3G>H5nIx"wJ`]},p=class{ENCRYPTION_KEY;static __type=[`ENCRYPTION_KEY`,()=>e.__ΩSecretsInterface,`BaseSecrets`,`&3!5n"x"w#`]};function m(e,t={}){let n=t.superReflection??new i.ReflectionClass({kind:i.ReflectionKind.class,description:`The base environment configuration definition for the ${(0,r.titleCase)(e.config.name)} project.`,classType:f,types:[],implements:[{kind:i.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${(0,r.titleCase)(e.config.name)} project.`,types:[]}]});n.name=`Env`;let a=new i.ReflectionClass(t.type??{kind:i.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${(0,r.titleCase)(e.config.name)} application`:`application`}.`,types:[]},n);return a.name=`Env`,a}m.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>d,`options`,()=>({}),`createEnvReflection`,`Pn!2"n#2$>%!/&`];function h(e,t={}){let n=t.superReflection??new i.ReflectionClass({kind:i.ReflectionKind.class,description:`The base secrets configuration definition for the ${(0,r.titleCase)(e.config.name)} project.`,classType:p,types:[],implements:[{kind:i.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${(0,r.titleCase)(e.config.name)} project.`,types:[]}]});n.name=`Secrets`;let a=new i.ReflectionClass(t.type??{kind:i.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${(0,r.titleCase)(e.config.name)} application`:`application`}.`,types:[]},n);return a.name=`Secrets`,a}h.__type=[()=>t.__ΩEnvPluginContext,`context`,()=>d,`options`,()=>({}),`createSecretsReflection`,`Pn!2"n#2$>%!/&`];async function g(e,t,r){let c;return t&&(c=(0,i.resolveClassType)(await(0,o.reflectType)(e,{file:(0,s.isParentPath)(t,e.config.cwd)?t:(0,a.joinPaths)(e.config.cwd,t),name:r}))),l(e,[await n.readEnvTypeReflection(e,`env`),c,(0,i.resolveClassType)(await(0,o.reflectType)(e,await n.getEnvDefaultTypeDefinition(e)))].filter(Boolean))}g.__type=[()=>t.__ΩEnvPluginContext,`context`,`file`,`name`,`reflectEnv`,`Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`];async function _(e,t,r){let c;return t&&(c=(0,i.resolveClassType)(await(0,o.reflectType)(e,{file:(0,s.isParentPath)(t,e.config.cwd)?t:(0,a.joinPaths)(e.config.cwd,t),name:r}))),u(e,[await n.readSecretsReflection(e),c,(0,i.resolveClassType)(await(0,o.reflectType)(e,await n.getSecretsDefaultTypeDefinition(e)))].filter(Boolean))}_.__type=[()=>t.__ΩEnvPluginContext,`context`,`file`,`name`,`reflectSecrets`,`Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`],exports.BaseEnv=f,exports.BaseSecrets=p,exports.__ΩCreateEnvReflectionOptions=d,exports.createEnvReflection=m,exports.createSecretsReflection=h,exports.mergeEnvReflections=l,exports.mergeSecretsReflections=u,exports.reflectEnv=g,exports.reflectSecrets=_;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../types/plugin.cjs`),t=require(`../types/env.cjs`),n=require(`./persistence.cjs`);let r=require(`@stryke/string-format/title-case`),i=require(`@powerlines/deepkit/vendor/type`),a=require(`@stryke/path/join-paths`),o=require(`@powerlines/deepkit/reflect-type`),s=require(`@stryke/path/is-parent-path`);function c(e,t){return e.__type=t,e}function l(e,t){return m(e,{type:(0,i.merge)(t.map(c(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}l.__type=[()=>e.__ΩEnvPluginContext,`context`,`reflections`,`mergeEnvReflections`,`Pn!2"!F2#!/$`];function u(e,t){return h(e,{type:(0,i.merge)(t.map(c(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}u.__type=[()=>e.__ΩEnvPluginContext,`context`,`reflections`,`mergeSecretsReflections`,`Pn!2"!F2#!/$`];const d=[`type`,`superReflection`,`CreateEnvReflectionOptions`,`PP!!J4!8!4"8Mw#y`];var f=class{APP_NAME;APP_VERSION;BUILD_ID;BUILD_TIMESTAMP;BUILD_CHECKSUM;RELEASE_ID;RELEASE_TAG;ORGANIZATION;PLATFORM=`neutral`;MODE=`production`;ENVIRONMENT;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;ERROR_URL;DEFAULT_TIMEZONE;DEFAULT_LOCALE;CI=!1;static __type=[`APP_NAME`,`APP_VERSION`,`BUILD_ID`,`BUILD_TIMESTAMP`,`BUILD_CHECKSUM`,`RELEASE_ID`,`RELEASE_TAG`,`ORGANIZATION`,`node`,`browser`,`neutral`,`PLATFORM`,function(){return`neutral`},`development`,`test`,`production`,`MODE`,function(){return`production`},`ENVIRONMENT`,`DEBUG`,function(){return!1},`TEST`,function(){return!1},`MINIMAL`,function(){return!1},`NO_COLOR`,function(){return!1},`FORCE_COLOR`,function(){return!1},`FORCE_HYPERLINK`,function(){return!1},`STACKTRACE`,function(){return!1},`INCLUDE_ERROR_DATA`,function(){return!1},`ERROR_URL`,`DEFAULT_TIMEZONE`,`DEFAULT_LOCALE`,`CI`,function(){return!1},()=>t.__ΩEnvInterface,`BaseEnv`,`&3!&3"&3#&3$&3%&3&&3'&3(P.).*.+J3,>-P.../.0J31>2&33)34>5)36>7)38>9)3:>;P')J3<>=P')J3>>?)3@>A)3B>C&3D&3E&3F)3G>H5nIx"wJ`]},p=class{ENCRYPTION_KEY;static __type=[`ENCRYPTION_KEY`,()=>t.__ΩSecretsInterface,`BaseSecrets`,`&3!5n"x"w#`]};function m(e,t={}){let n=t.superReflection??new i.ReflectionClass({kind:i.ReflectionKind.class,description:`The base environment configuration definition for the ${(0,r.titleCase)(e.config.name)} project.`,classType:f,types:[],implements:[{kind:i.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${(0,r.titleCase)(e.config.name)} project.`,types:[]}]});n.name=`Env`;let a=new i.ReflectionClass(t.type??{kind:i.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${(0,r.titleCase)(e.config.name)} application`:`application`}.`,types:[]},n);return a.name=`Env`,a}m.__type=[()=>e.__ΩEnvPluginContext,`context`,()=>d,`options`,()=>({}),`createEnvReflection`,`Pn!2"n#2$>%!/&`];function h(e,t={}){let n=t.superReflection??new i.ReflectionClass({kind:i.ReflectionKind.class,description:`The base secrets configuration definition for the ${(0,r.titleCase)(e.config.name)} project.`,classType:p,types:[],implements:[{kind:i.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${(0,r.titleCase)(e.config.name)} project.`,types:[]}]});n.name=`Secrets`;let a=new i.ReflectionClass(t.type??{kind:i.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${(0,r.titleCase)(e.config.name)} application`:`application`}.`,types:[]},n);return a.name=`Secrets`,a}h.__type=[()=>e.__ΩEnvPluginContext,`context`,()=>d,`options`,()=>({}),`createSecretsReflection`,`Pn!2"n#2$>%!/&`];async function g(e,t,r){let c;return t&&(c=(0,i.resolveClassType)(await(0,o.reflectType)(e,{file:(0,s.isParentPath)(t,e.config.cwd)?t:(0,a.joinPaths)(e.config.cwd,t),name:r}))),l(e,[await n.readEnvTypeReflection(e,`env`),c,(0,i.resolveClassType)(await(0,o.reflectType)(e,await n.getEnvDefaultTypeDefinition(e)))].filter(Boolean))}g.__type=[()=>e.__ΩEnvPluginContext,`context`,`file`,`name`,`reflectEnv`,`Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`];async function _(e,t,r){let c;return t&&(c=(0,i.resolveClassType)(await(0,o.reflectType)(e,{file:(0,s.isParentPath)(t,e.config.cwd)?t:(0,a.joinPaths)(e.config.cwd,t),name:r}))),u(e,[await n.readSecretsReflection(e),c,(0,i.resolveClassType)(await(0,o.reflectType)(e,await n.getSecretsDefaultTypeDefinition(e)))].filter(Boolean))}_.__type=[()=>e.__ΩEnvPluginContext,`context`,`file`,`name`,`reflectSecrets`,`Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`],exports.BaseEnv=f,exports.BaseSecrets=p,exports.__ΩCreateEnvReflectionOptions=d,exports.createEnvReflection=m,exports.createSecretsReflection=h,exports.mergeEnvReflections=l,exports.mergeSecretsReflections=u,exports.reflectEnv=g,exports.reflectSecrets=_;
@@ -1,4 +1,4 @@
1
- import { EnvInterface, SecretsInterface } from "../types/runtime.cjs";
1
+ import { EnvInterface, SecretsInterface } from "../types/env.cjs";
2
2
  import { EnvPluginContext } from "../types/plugin.cjs";
3
3
  import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
4
4
 
@@ -1,4 +1,4 @@
1
- import { EnvInterface, SecretsInterface } from "../types/runtime.mjs";
1
+ import { EnvInterface, SecretsInterface } from "../types/env.mjs";
2
2
  import { EnvPluginContext } from "../types/plugin.mjs";
3
3
  import { ReflectionClass, TypeClass, TypeObjectLiteral } from "@powerlines/deepkit/vendor/type";
4
4
 
@@ -1,2 +1,2 @@
1
- import{__ΩEnvInterface as e,__ΩSecretsInterface as t}from"../types/runtime.mjs";import{__ΩEnvPluginContext as n}from"../types/plugin.mjs";import{getEnvDefaultTypeDefinition as r,getSecretsDefaultTypeDefinition as i,readEnvTypeReflection as a,readSecretsReflection as o}from"./persistence.mjs";import{titleCase as s}from"@stryke/string-format/title-case";import{ReflectionClass as c,ReflectionKind as l,merge as u,resolveClassType as d}from"@powerlines/deepkit/vendor/type";import{joinPaths as f}from"@stryke/path/join-paths";import{reflectType as p}from"@powerlines/deepkit/reflect-type";import{isParentPath as m}from"@stryke/path/is-parent-path";function h(e,t){return e.__type=t,e}function g(e,t){return x(e,{type:u(t.map(h(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}g.__type=[()=>n,`context`,`reflections`,`mergeEnvReflections`,`Pn!2"!F2#!/$`];function _(e,t){return S(e,{type:u(t.map(h(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}_.__type=[()=>n,`context`,`reflections`,`mergeSecretsReflections`,`Pn!2"!F2#!/$`];const v=[`type`,`superReflection`,`CreateEnvReflectionOptions`,`PP!!J4!8!4"8Mw#y`];var y=class{APP_NAME;APP_VERSION;BUILD_ID;BUILD_TIMESTAMP;BUILD_CHECKSUM;RELEASE_ID;RELEASE_TAG;ORGANIZATION;PLATFORM=`neutral`;MODE=`production`;ENVIRONMENT;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;ERROR_URL;DEFAULT_TIMEZONE;DEFAULT_LOCALE;CI=!1;static __type=[`APP_NAME`,`APP_VERSION`,`BUILD_ID`,`BUILD_TIMESTAMP`,`BUILD_CHECKSUM`,`RELEASE_ID`,`RELEASE_TAG`,`ORGANIZATION`,`node`,`browser`,`neutral`,`PLATFORM`,function(){return`neutral`},`development`,`test`,`production`,`MODE`,function(){return`production`},`ENVIRONMENT`,`DEBUG`,function(){return!1},`TEST`,function(){return!1},`MINIMAL`,function(){return!1},`NO_COLOR`,function(){return!1},`FORCE_COLOR`,function(){return!1},`FORCE_HYPERLINK`,function(){return!1},`STACKTRACE`,function(){return!1},`INCLUDE_ERROR_DATA`,function(){return!1},`ERROR_URL`,`DEFAULT_TIMEZONE`,`DEFAULT_LOCALE`,`CI`,function(){return!1},()=>e,`BaseEnv`,`&3!&3"&3#&3$&3%&3&&3'&3(P.).*.+J3,>-P.../.0J31>2&33)34>5)36>7)38>9)3:>;P')J3<>=P')J3>>?)3@>A)3B>C&3D&3E&3F)3G>H5nIx"wJ`]},b=class{ENCRYPTION_KEY;static __type=[`ENCRYPTION_KEY`,()=>t,`BaseSecrets`,`&3!5n"x"w#`]};function x(e,t={}){let n=t.superReflection??new c({kind:l.class,description:`The base environment configuration definition for the ${s(e.config.name)} project.`,classType:y,types:[],implements:[{kind:l.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${s(e.config.name)} project.`,types:[]}]});n.name=`Env`;let r=new c(t.type??{kind:l.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${s(e.config.name)} application`:`application`}.`,types:[]},n);return r.name=`Env`,r}x.__type=[()=>n,`context`,()=>v,`options`,()=>({}),`createEnvReflection`,`Pn!2"n#2$>%!/&`];function S(e,t={}){let n=t.superReflection??new c({kind:l.class,description:`The base secrets configuration definition for the ${s(e.config.name)} project.`,classType:b,types:[],implements:[{kind:l.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${s(e.config.name)} project.`,types:[]}]});n.name=`Secrets`;let r=new c(t.type??{kind:l.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${s(e.config.name)} application`:`application`}.`,types:[]},n);return r.name=`Secrets`,r}S.__type=[()=>n,`context`,()=>v,`options`,()=>({}),`createSecretsReflection`,`Pn!2"n#2$>%!/&`];async function C(e,t,n){let i;return t&&(i=d(await p(e,{file:m(t,e.config.cwd)?t:f(e.config.cwd,t),name:n}))),g(e,[await a(e,`env`),i,d(await p(e,await r(e)))].filter(Boolean))}C.__type=[()=>n,`context`,`file`,`name`,`reflectEnv`,`Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`];async function w(e,t,n){let r;return t&&(r=d(await p(e,{file:m(t,e.config.cwd)?t:f(e.config.cwd,t),name:n}))),_(e,[await o(e),r,d(await p(e,await i(e)))].filter(Boolean))}w.__type=[()=>n,`context`,`file`,`name`,`reflectSecrets`,`Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`];export{y as BaseEnv,b as BaseSecrets,v as __ΩCreateEnvReflectionOptions,x as createEnvReflection,S as createSecretsReflection,g as mergeEnvReflections,_ as mergeSecretsReflections,C as reflectEnv,w as reflectSecrets};
1
+ import{__ΩEnvPluginContext as e}from"../types/plugin.mjs";import{__ΩEnvInterface as t,__ΩSecretsInterface as n}from"../types/env.mjs";import{getEnvDefaultTypeDefinition as r,getSecretsDefaultTypeDefinition as i,readEnvTypeReflection as a,readSecretsReflection as o}from"./persistence.mjs";import{titleCase as s}from"@stryke/string-format/title-case";import{ReflectionClass as c,ReflectionKind as l,merge as u,resolveClassType as d}from"@powerlines/deepkit/vendor/type";import{joinPaths as f}from"@stryke/path/join-paths";import{reflectType as p}from"@powerlines/deepkit/reflect-type";import{isParentPath as m}from"@stryke/path/is-parent-path";function h(e,t){return e.__type=t,e}function g(e,t){return x(e,{type:u(t.map(h(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}g.__type=[()=>e,`context`,`reflections`,`mergeEnvReflections`,`Pn!2"!F2#!/$`];function _(e,t){return S(e,{type:u(t.map(h(e=>e.type,[`reflection`,``,`P"2!"/"`])))})}_.__type=[()=>e,`context`,`reflections`,`mergeSecretsReflections`,`Pn!2"!F2#!/$`];const v=[`type`,`superReflection`,`CreateEnvReflectionOptions`,`PP!!J4!8!4"8Mw#y`];var y=class{APP_NAME;APP_VERSION;BUILD_ID;BUILD_TIMESTAMP;BUILD_CHECKSUM;RELEASE_ID;RELEASE_TAG;ORGANIZATION;PLATFORM=`neutral`;MODE=`production`;ENVIRONMENT;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;ERROR_URL;DEFAULT_TIMEZONE;DEFAULT_LOCALE;CI=!1;static __type=[`APP_NAME`,`APP_VERSION`,`BUILD_ID`,`BUILD_TIMESTAMP`,`BUILD_CHECKSUM`,`RELEASE_ID`,`RELEASE_TAG`,`ORGANIZATION`,`node`,`browser`,`neutral`,`PLATFORM`,function(){return`neutral`},`development`,`test`,`production`,`MODE`,function(){return`production`},`ENVIRONMENT`,`DEBUG`,function(){return!1},`TEST`,function(){return!1},`MINIMAL`,function(){return!1},`NO_COLOR`,function(){return!1},`FORCE_COLOR`,function(){return!1},`FORCE_HYPERLINK`,function(){return!1},`STACKTRACE`,function(){return!1},`INCLUDE_ERROR_DATA`,function(){return!1},`ERROR_URL`,`DEFAULT_TIMEZONE`,`DEFAULT_LOCALE`,`CI`,function(){return!1},()=>t,`BaseEnv`,`&3!&3"&3#&3$&3%&3&&3'&3(P.).*.+J3,>-P.../.0J31>2&33)34>5)36>7)38>9)3:>;P')J3<>=P')J3>>?)3@>A)3B>C&3D&3E&3F)3G>H5nIx"wJ`]},b=class{ENCRYPTION_KEY;static __type=[`ENCRYPTION_KEY`,()=>n,`BaseSecrets`,`&3!5n"x"w#`]};function x(e,t={}){let n=t.superReflection??new c({kind:l.class,description:`The base environment configuration definition for the ${s(e.config.name)} project.`,classType:y,types:[],implements:[{kind:l.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${s(e.config.name)} project.`,types:[]}]});n.name=`Env`;let r=new c(t.type??{kind:l.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${s(e.config.name)} application`:`application`}.`,types:[]},n);return r.name=`Env`,r}x.__type=[()=>e,`context`,()=>v,`options`,()=>({}),`createEnvReflection`,`Pn!2"n#2$>%!/&`];function S(e,t={}){let n=t.superReflection??new c({kind:l.class,description:`The base secrets configuration definition for the ${s(e.config.name)} project.`,classType:b,types:[],implements:[{kind:l.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${s(e.config.name)} project.`,types:[]}]});n.name=`Secrets`;let r=new c(t.type??{kind:l.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${s(e.config.name)} application`:`application`}.`,types:[]},n);return r.name=`Secrets`,r}S.__type=[()=>e,`context`,()=>v,`options`,()=>({}),`createSecretsReflection`,`Pn!2"n#2$>%!/&`];async function C(e,t,n){let i;return t&&(i=d(await p(e,{file:m(t,e.config.cwd)?t:f(e.config.cwd,t),name:n}))),g(e,[await a(e,`env`),i,d(await p(e,await r(e)))].filter(Boolean))}C.__type=[()=>e,`context`,`file`,`name`,`reflectEnv`,`Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`];async function w(e,t,n){let r;return t&&(r=d(await p(e,{file:m(t,e.config.cwd)?t:f(e.config.cwd,t),name:n}))),_(e,[await o(e),r,d(await p(e,await i(e)))].filter(Boolean))}w.__type=[()=>e,`context`,`file`,`name`,`reflectSecrets`,`Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.`,`Pn!2"&2#8&2$8"/%?&`];export{y as BaseEnv,b as BaseSecrets,v as __ΩCreateEnvReflectionOptions,x as createEnvReflection,S as createSecretsReflection,g as mergeEnvReflections,_ as mergeSecretsReflections,C as reflectEnv,w as reflectSecrets};
2
2
  //# sourceMappingURL=reflect.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { reflectType } from \"@powerlines/deepkit/reflect-type\";\nimport {\n merge,\n ReflectionClass,\n ReflectionKind,\n resolveClassType,\n TypeClass,\n TypeObjectLiteral\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvPluginContext } from \"../types/plugin\";\nimport { EnvInterface, SecretsInterface } from \"../types/runtime\";\nimport {\n getEnvDefaultTypeDefinition,\n getSecretsDefaultTypeDefinition,\n readEnvTypeReflection,\n readSecretsReflection\n} from \"./persistence\";\n\nexport function mergeEnvReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createEnvReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport function mergeSecretsReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createSecretsReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport interface CreateEnvReflectionOptions {\n type?: TypeObjectLiteral | TypeClass;\n superReflection?: ReflectionClass<any>;\n}\n\nexport class BaseEnv implements EnvInterface {\n APP_NAME!: string;\n\n APP_VERSION!: string;\n\n BUILD_ID!: string;\n\n BUILD_TIMESTAMP!: string;\n\n BUILD_CHECKSUM!: string;\n\n RELEASE_ID!: string;\n\n RELEASE_TAG!: string;\n\n ORGANIZATION!: string;\n\n PLATFORM: \"node\" | \"browser\" | \"neutral\" = \"neutral\";\n\n MODE: \"development\" | \"test\" | \"production\" = \"production\";\n\n ENVIRONMENT!: string;\n\n DEBUG: boolean = false;\n\n TEST: boolean = false;\n\n MINIMAL: boolean = false;\n\n NO_COLOR: boolean = false;\n\n FORCE_COLOR: number | boolean = false;\n\n FORCE_HYPERLINK: number | boolean = false;\n\n STACKTRACE: boolean = false;\n\n INCLUDE_ERROR_DATA: boolean = false;\n\n ERROR_URL!: string;\n\n DEFAULT_TIMEZONE!: string;\n\n DEFAULT_LOCALE!: string;\n\n CI: boolean = false;\n}\n\nexport class BaseSecrets implements SecretsInterface {\n ENCRYPTION_KEY!: string;\n}\n\nexport function createEnvReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base environment configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseEnv,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"EnvInterface\",\n description: `The environment configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Env\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `A schema describing the list of available environment variables that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Env\";\n\n return result;\n}\n\nexport function createSecretsReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base secrets configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseSecrets,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"SecretsInterface\",\n description: `The secrets configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Secrets\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `A schema describing the list of available environment secrets that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Secrets\";\n\n return result;\n}\n\n/**\n * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the environment configuration type definition from\n * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n */\nexport async function reflectEnv(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.config.cwd)\n ? joinPaths(context.config.cwd, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeEnvReflections(\n context,\n [\n await readEnvTypeReflection(context, \"env\"),\n config,\n resolveClassType(\n await reflectType(context, await getEnvDefaultTypeDefinition(context))\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n\n/**\n * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the secrets configuration type definition from\n * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n */\nexport async function reflectSecrets(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.config.cwd)\n ? joinPaths(context.config.cwd, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeSecretsReflections(\n context,\n [\n await readSecretsReflection(context),\n config,\n resolveClassType(\n await reflectType(\n context,\n await getSecretsDefaultTypeDefinition(context)\n )\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n"],"mappings":"uoBAMA,SAAS,EAAY,EAAI,EAAO,OAC/B,GAAI,OAAS,IA0Bd,SAAE,EAA2B,EAAA,EAAA,CAI3B,OAHA,EAA+B,EAAA,CAC/B,KAAA,EAAA,EAAqB,IAAA,EAAA,GAAA,EAAA,KAAA,CAAA,aAAA,GAAA,UAAA,CAAA,CAAA,CAAA,CACrB,CACQ,CAEV,EAAgB,OAAA,KAAmB,EAAA,UAAA,cAAA,sBAAA,eAAA,CACnC,SAAW,EAAgB,EAAA,EAAA,CAIzB,OAHa,EAAqB,EAAA,CACjC,KAAA,EAAA,EAAqB,IAAA,EAAA,GAAA,EAAA,KAAA,CAAA,aAAA,GAAA,UAAA,CAAA,CAAA,CAAA,CACtB,CAC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AA,qBAAA"}
1
+ {"version":3,"file":"reflect.mjs","names":[],"sources":["../../src/helpers/reflect.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { reflectType } from \"@powerlines/deepkit/reflect-type\";\nimport {\n merge,\n ReflectionClass,\n ReflectionKind,\n resolveClassType,\n TypeClass,\n TypeObjectLiteral\n} from \"@powerlines/deepkit/vendor/type\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { titleCase } from \"@stryke/string-format/title-case\";\nimport { EnvInterface, SecretsInterface } from \"../types/env\";\nimport { EnvPluginContext } from \"../types/plugin\";\nimport {\n getEnvDefaultTypeDefinition,\n getSecretsDefaultTypeDefinition,\n readEnvTypeReflection,\n readSecretsReflection\n} from \"./persistence\";\n\nexport function mergeEnvReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createEnvReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport function mergeSecretsReflections(\n context: EnvPluginContext,\n reflections: ReflectionClass<any>[]\n): ReflectionClass<any> {\n const reflection = createSecretsReflection(context, {\n type: merge(reflections.map(reflection => reflection.type))\n });\n\n return reflection;\n}\n\nexport interface CreateEnvReflectionOptions {\n type?: TypeObjectLiteral | TypeClass;\n superReflection?: ReflectionClass<any>;\n}\n\nexport class BaseEnv implements EnvInterface {\n APP_NAME!: string;\n\n APP_VERSION!: string;\n\n BUILD_ID!: string;\n\n BUILD_TIMESTAMP!: string;\n\n BUILD_CHECKSUM!: string;\n\n RELEASE_ID!: string;\n\n RELEASE_TAG!: string;\n\n ORGANIZATION!: string;\n\n PLATFORM: \"node\" | \"browser\" | \"neutral\" = \"neutral\";\n\n MODE: \"development\" | \"test\" | \"production\" = \"production\";\n\n ENVIRONMENT!: string;\n\n DEBUG: boolean = false;\n\n TEST: boolean = false;\n\n MINIMAL: boolean = false;\n\n NO_COLOR: boolean = false;\n\n FORCE_COLOR: number | boolean = false;\n\n FORCE_HYPERLINK: number | boolean = false;\n\n STACKTRACE: boolean = false;\n\n INCLUDE_ERROR_DATA: boolean = false;\n\n ERROR_URL!: string;\n\n DEFAULT_TIMEZONE!: string;\n\n DEFAULT_LOCALE!: string;\n\n CI: boolean = false;\n}\n\nexport class BaseSecrets implements SecretsInterface {\n ENCRYPTION_KEY!: string;\n}\n\nexport function createEnvReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base environment configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseEnv,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"EnvInterface\",\n description: `The environment configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Env\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Env\",\n description: `A schema describing the list of available environment variables that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Env\";\n\n return result;\n}\n\nexport function createSecretsReflection(\n context: EnvPluginContext,\n options: CreateEnvReflectionOptions = {}\n): ReflectionClass<any> {\n const parent =\n options.superReflection ??\n new ReflectionClass({\n kind: ReflectionKind.class,\n description: `The base secrets configuration definition for the ${titleCase(\n context.config.name\n )} project.`,\n classType: BaseSecrets,\n types: [],\n implements: [\n {\n kind: ReflectionKind.objectLiteral,\n typeName: \"SecretsInterface\",\n description: `The secrets configuration interface definition for the ${titleCase(\n context.config.name\n )} project.`,\n types: []\n }\n ]\n });\n parent.name = \"Secrets\";\n\n const result = new ReflectionClass(\n options.type ?? {\n kind: ReflectionKind.objectLiteral,\n typeName: \"Secrets\",\n description: `A schema describing the list of available environment secrets that can be used by the ${\n context.config.name\n ? `${titleCase(context.config.name)} application`\n : \"application\"\n }.`,\n types: []\n },\n parent\n );\n result.name = \"Secrets\";\n\n return result;\n}\n\n/**\n * Reflects the environment configuration type definition from the provided file and name, and merges it with the default environment configuration reflection and the currently used environment configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the environment configuration type definition from\n * @param name - The name of the type definition to reflect the environment configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the environment configuration type definition, merged with the default environment configuration reflection and the currently used environment configuration reflection. The resulting reflection will contain the structure of the expected environment variables as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default environment configuration reflection.\n */\nexport async function reflectEnv(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.config.cwd)\n ? joinPaths(context.config.cwd, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeEnvReflections(\n context,\n [\n await readEnvTypeReflection(context, \"env\"),\n config,\n resolveClassType(\n await reflectType(context, await getEnvDefaultTypeDefinition(context))\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n\n/**\n * Reflects the secrets configuration type definition from the provided file and name, and merges it with the default secrets configuration reflection and the currently used secrets configuration reflection.\n *\n * @remarks\n * The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n *\n * @param context - The plugin context\n * @param file - The file path to reflect the secrets configuration type definition from\n * @param name - The name of the type definition to reflect the secrets configuration from, if the file contains multiple type definitions. If not provided, the first type definition found in the file will be used.\n * @returns A reflection of the secrets configuration type definition, merged with the default secrets configuration reflection and the currently used secrets configuration reflection. The resulting reflection will contain the structure of the expected environment secrets as defined by the type definitions provided in the plugin configuration, as well as any additional properties that are currently used in the source code and defined in the default secrets configuration reflection.\n */\nexport async function reflectSecrets(\n context: EnvPluginContext,\n file?: string,\n name?: string\n) {\n let config: ReflectionClass<any> | undefined;\n if (file) {\n const configType = await reflectType(context, {\n file: !isParentPath(file, context.config.cwd)\n ? joinPaths(context.config.cwd, file)\n : file,\n name\n });\n\n config = resolveClassType(configType);\n }\n\n return mergeSecretsReflections(\n context,\n [\n await readSecretsReflection(context),\n config,\n resolveClassType(\n await reflectType(\n context,\n await getSecretsDefaultTypeDefinition(context)\n )\n )\n ].filter(Boolean) as ReflectionClass<any>[]\n );\n}\n"],"mappings":"moBAMA,SAAS,EAAY,EAAI,EAAO,OAC/B,GAAI,OAAS,IA0Bd,SAAE,EAA2B,EAAA,EAAA,CAI3B,OAHA,EAA+B,EAAA,CAC/B,KAAA,EAAA,EAAqB,IAAA,EAAA,GAAA,EAAA,KAAA,CAAA,aAAA,GAAA,UAAA,CAAA,CAAA,CAAA,CACrB,CACQ,CAEV,EAAgB,OAAA,KAAmB,EAAA,UAAA,cAAA,sBAAA,eAAA,CACnC,SAAW,EAAgB,EAAA,EAAA,CAIzB,OAHa,EAAqB,EAAA,CACjC,KAAA,EAAA,EAAqB,IAAA,EAAA,GAAA,EAAA,KAAA,CAAA,aAAA,GAAA,UAAA,CAAA,CAAA,CAAA,CACtB,CACc,mFAGhB,MAAE,EAAiB,CAAA,OAAA,kBAAA,6BAAA,mBAAA,aAGnB,SACE,YACA,SACA,gBAC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runtime.cjs";
1
+ import { EnvInterface, SecretsInterface } from "./types/env.cjs";
2
2
  import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType } from "./types/plugin.cjs";
3
3
  import { Plugin } from "powerlines";
4
4
 
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { EnvInterface, SecretsInterface } from "./types/runtime.mjs";
1
+ import { EnvInterface, SecretsInterface } from "./types/env.mjs";
2
2
  import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType } from "./types/plugin.mjs";
3
3
  import { Plugin } from "powerlines";
4
4
 
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=[`APP_NAME`,`The name of the application.`,`APP_VERSION`,`1.0.0`,`The version of the application.`,`BUILD_ID`,`The unique identifier for the build.`,`BUILD_TIMESTAMP`,`The timestamp the build was ran at.`,`BUILD_CHECKSUM`,`A checksum hash created during the build.`,`RELEASE_ID`,`The unique identifier for the release.`,`RELEASE_TAG`,`The tag for the release. This is generally in the format of "\\<APP_NAME\\>\\@\\<APP_VERSION\\>".`,`ORGANIZATION`,`The name of the organization that maintains the application.`,{alias:[`ORG`]},`nodejs`,`deno`,`workerd`,`browser`,`RUNTIME`,`The runtime that the application is running in.`,`node`,`neutral`,`browser`,`PLATFORM`,`neutral`,`The platform for which the application was built.`,`development`,`test`,`production`,`MODE`,`production`,`The mode in which the application is running.`,{alias:[`NODE_ENV`,`VERCEL_ENV`]},`ENVIRONMENT`,"The environment the application is running in. This value will be populated with the value of `MODE` if not provided.",`DEBUG`,`Indicates if the application is running in debug mode.`,`TEST`,`An indicator that specifies the current runtime is a test environment.`,`MINIMAL`,`An indicator that specifies the current runtime is a minimal environment.`,`NO_COLOR`,`An indicator that specifies the current runtime is a no color environment.`,`FORCE_COLOR`,`An indicator that specifies the current runtime is a force color environment.`,`FORCE_HYPERLINK`,`An indicator that specifies the current runtime should force hyperlinks in terminal output.`,`AGENT_NAME`,`The name of the agent running the application. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`COLORTERM`,`The color terminal type. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM`,`The terminal type. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TERM_PROGRAM`,`The terminal program name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM_PROGRAM_VERSION`,`The terminal program version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINAL_EMULATOR`,`The terminal emulator name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`WT_SESSION`,`The terminal emulator session ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINUS_SUBLIME`,`An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`ConEmuTask`,`The ConEmu task name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`CURSOR_TRACE_ID`,`The cursor trace ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`VTE_VERSION`,`The VTE version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`STACKTRACE`,`Indicates if error stack traces should be captured.`,`INCLUDE_ERROR_DATA`,`Indicates if error data should be included.`,`ERROR_URL`,`A web page to lookup error messages and display additional information given an error code.`,{title:`Error Details URL`},`DEFAULT_TIMEZONE`,`America/New_York`,`The default timezone for the application.`,`DEFAULT_LOCALE`,`en_US`,`The default locale to be used in the application.`,`error`,`warn`,`info`,`debug`,`LOG_LEVEL`,`info`,"The default lowest log level to accept. If `null`, the logger will reject all records.",`CI`,`An indicator that specifies the current runtime is a continuous integration environment.`,{alias:[`CONTINUOUS_INTEGRATION`],title:`Continuous Integration`},`RUN_ID`,`The unique identifier for the current run. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AGOLA_GIT_REF`,`The agola git reference. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AC_APPCIRCLE`,`The appcircle build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPVEYOR`,`The appveyor build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CODEBUILD`,`The codebuild build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TF_BUILD`,`The task force build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`bamboo_planKey`,`The bamboo plan key. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITBUCKET_COMMIT`,`The bitbucket commit. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITRISE_IO`,`The bitrise build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUDDY_WORKSPACE_ID`,`The buddy workspace ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDKITE`,`The buildkite build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRCLECI`,`The circleci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRRUS_CI`,`The cirrus-ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CF_BUILD_ID`,`The cf build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CM_BUILD_ID`,`The cm build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_NAME`,`The ci name. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DRONE`,`The drone build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DSARI`,`The dsari build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EARTHLY_CI`,`The earthly build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EAS_BUILD`,`The eas build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GERRIT_PROJECT`,`The gerrit project. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITEA_ACTIONS`,`The gitea actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITHUB_ACTIONS`,`The github actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITLAB_CI`,`The gitlab ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GOCD`,`The go cd build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDER_OUTPUT`,`The builder output build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HARNESS_BUILD_ID`,`The harness build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`JENKINS_URL`,`The jenkins url. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`LAYERCI`,`The layerci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`MAGNUM`,`The magnum build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NETLIFY`,`The netlify build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NEVERCODE`,`The nevercode build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`PROW_JOB_ID`,`The prow job ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RELEASE_BUILD_ID`,`The release build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RENDER`,`The render build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SAILCI`,`The sailci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HUDSON`,`The hudson build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SCREWDRIVER`,`The screwdriver build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SEMAPHORE`,`The semaphore build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SOURCEHUT`,`The sourcehut build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SPACESHIP_CI`,`The spaceship build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`STRIDER`,`The strider build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TASK_ID`,`The task ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TEAMCITY_VERSION`,`The teamcity version. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TRAVIS`,`The travis build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`VELA`,`The vela build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NOW_BUILDER`,`The now builder build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPCENTER_BUILD_ID`,`The appcenter build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_XCODE_PROJECT`,`The xcode project build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`XCS`,`The xcode server build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DATA_DIR`,`The application's runtime data directory.`,{runtime:!0,title:`Data Directory`},`CONFIG_DIR`,`The application's configuration data directory.`,{runtime:!0,title:`Configuration Directory`},`CACHE_DIR`,`The application's cached data directory.`,{runtime:!0,title:`Cache Directory`},`LOG_DIR`,`The application's logging directory.`,{runtime:!0,title:`Log Directory`},`TEMP_DIR`,`The application's temporary data directory.`,{runtime:!0,title:`Temporary Directory`},`LOCALAPPDATA`,`A variable that specifies the current user's local application data directory on Windows.`,{hidden:!0,runtime:!0},`APPDATA`,`A variable that specifies the application data directory on Windows.`,{hidden:!0,runtime:!0},`XDG_DATA_HOME`,`A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CONFIG_HOME`,`A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CACHE_HOME`,`A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_STATE_HOME`,`A variable that specifies the state directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_RUNTIME_DIR`,`A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`DEVENV_RUNTIME`,`A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.`,{hidden:!0,runtime:!0},`The base environment configuration used by Powerlines applications`,`EnvInterface`,`P&4!9?"&4#9>$?%&4&9?'&4(9?)&4*9?+&4,9?-&4.9?/&40?1z2P.3.4.5.6J478?8P.9.:.;J4<>=?>P.?.@.AJ4B>C?DzE&4F>C?G)4H?I)4J?K)4L?M)4N?OP)'J4P?QP)'J4R?S&4T89?UzV&4W89?XzY&4Z89?[z\\&4]89?^z_&4\`89?azb&4c89?dze&4f89?gzh)4i89?jzk&4l89?mzn&4o89?pzq&4r89?szt)4u?v)4w?x&4y?zz{&4|>}?~&4>€?P.‚.ƒ.„.…,J4†8>‡?ˆ)4‰?Šz‹&4Œ89?zŽ&489?z‘&4’89?“z”&4•89?–z—&4˜89?™zš&4›89?œz&4ž89?Ÿz\xA0&4¡89?¢z£&4¤89?¥z¦&4§89?¨z©&4ª89?«z¬&4­89?®z¯&4°89?±z²&4³89?´zµ&4¶89?·z¸&4¹89?ºz»&4¼89?½z¾&4¿89?ÀzÁ&4Â89?ÃzÄ&4Å89?ÆzÇ&4È89?ÉzÊ&4Ë89?ÌzÍ&4Î89?ÏzÐ&4Ñ89?ÒzÓ&4Ô89?ÕzÖ&4×89?ØzÙ&4Ú89?ÛzÜ&4Ý89?Þzß&4à89?ázâ&4ã89?äzå&4æ89?çzè&4é89?êzë&4ì89?ízî&4ï89?ðzñ&4ò89?ózô&4õ89?öz÷&4ø89?ùzú&4û89?üzý&4þ89?ÿzĀ&4ā89?Ăză&4Ą89?ązĆ&4ć89?Ĉzĉ&4Ċ89?ċzČ&4č89?Ďzď&4Đ89?đzĒ&4ē89?Ĕzĕ&4Ė89?ėzĘ&4ę89?Ězě&4Ĝ89?ĝzĞ&4ğ89?Ġzġ&4Ģ8?ģzĤ&4ĥ8?Ħzħ&4Ĩ8?ĩzĪ&4ī8?Ĭzĭ&4Į8?įzİ&4ı89?IJzij&4Ĵ89?ĵzĶ&4ķ89?ĸzĹ&4ĺ89?Ļzļ&4Ľ89?ľzĿ&4ŀ89?Łzł&4Ń89?ńzŅ&4ņ89?ŇzňM?ʼnwŊy`],t=[`ENCRYPTION_KEY`,`The secret key used for encryption and decryption.`,{title:`Encryption Key`},`The base secrets configuration used by Powerlines applications`,`SecretsInterface`,`P&4!?"z#M?$w%y`];exports.__ΩEnvInterface=e,exports.__ΩSecretsInterface=t;
@@ -1,4 +1,4 @@
1
- //#region src/types/runtime.d.ts
1
+ //#region src/types/env.d.ts
2
2
  /**
3
3
  * The base environment configuration used by Powerlines applications
4
4
  *
@@ -73,6 +73,10 @@ interface EnvInterface {
73
73
  * @category neutral
74
74
  */
75
75
  ORGANIZATION: string;
76
+ /**
77
+ * The runtime that the application is running in.
78
+ */
79
+ RUNTIME?: "nodejs" | "deno" | "workerd" | "browser";
76
80
  /**
77
81
  * The platform for which the application was built.
78
82
  *
@@ -931,4 +935,4 @@ interface SecretsInterface {
931
935
  }
932
936
  //#endregion
933
937
  export { EnvInterface, SecretsInterface };
934
- //# sourceMappingURL=runtime.d.cts.map
938
+ //# sourceMappingURL=env.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.cts","names":[],"sources":["../../src/types/env.ts"],"mappings":";;AA6BA;;;;;;;;;;UAAiB,YAAA;EAqEf;;;;;;EAAA,SA9DS,QAAA;EAuHT;;;;;;;;EAAA,SA7GS,WAAA;EAoMA;;;;;;EAAA,SA5LA,QAAA;EA4PT;;;;;;EAAA,SApPS,eAAA;EAqTA;;;;;;EAAA,SA7SA,cAAA;EAmXA;;;;;;EAAA,SA3WA,UAAA;EAibA;;;;;;EAAA,SAzaA,WAAA;EA+eA;;;;;;;;;;EAneT,YAAA;EAilBS;;;EA5kBT,OAAA;EAonBS;;;;;;;EA3mBT,QAAA;EA0rBS;;;;;;;;;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;;WAUA,SAAA;;;;;;;;;WAUA,WAAA;;;;;;;;;WAUA,gBAAA;;;;;;;;;WAUA,MAAA;;;;;;;;;WAUA,MAAA;;;;;;;;;WAUA,MAAA;;;;;;;;;WAUA,WAAA;;;;;;;;;WAUA,SAAA;;;;;;;;;WAUA,SAAA;;;;;;;;;WASA,YAAA;;;;;;;;;WAUA,OAAA;;;;;;;;;WAUA,OAAA;;;;;;;;;WAUA,gBAAA;;;;;;;;;WAUA,MAAA;;;;;;;;;WAUA,IAAA;;;;;;;;;WAUA,WAAA;;;;;;;;;WAUA,kBAAA;;;;;;;;;WAUA,gBAAA;;;;;;;;;WAUA,GAAA;;;;;;;;;;;EAYT,QAAA;;;;;;;;;;;EAYA,UAAA;;;;;;;;;;;EAYA,SAAA;;;;;;;;;;;EAYA,OAAA;;;;;;;;;;;EAYA,QAAA;;;;;;;;;;;;;;WAeS,YAAA;;;;;;;;;;;;;;WAeA,OAAA;;;;;;;;;;;;;;WAeA,aAAA;;;;;;;;;;;;;;WAeA,eAAA;;;;;;;;;;;;;;WAeA,cAAA;;;;;;;;;;;;;;WAeA,cAAA;;;;;;;;;;;;;;WAeA,eAAA;;;;;;;;;;;;;;;EAgBT,cAAA;AAAA;;;;;;;UASe,gBAAA;;;;;;;;;EASf,cAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- //#region src/types/runtime.d.ts
1
+ //#region src/types/env.d.ts
2
2
  /**
3
3
  * The base environment configuration used by Powerlines applications
4
4
  *
@@ -73,6 +73,10 @@ interface EnvInterface {
73
73
  * @category neutral
74
74
  */
75
75
  ORGANIZATION: string;
76
+ /**
77
+ * The runtime that the application is running in.
78
+ */
79
+ RUNTIME?: "nodejs" | "deno" | "workerd" | "browser";
76
80
  /**
77
81
  * The platform for which the application was built.
78
82
  *
@@ -931,4 +935,4 @@ interface SecretsInterface {
931
935
  }
932
936
  //#endregion
933
937
  export { EnvInterface, SecretsInterface };
934
- //# sourceMappingURL=runtime.d.mts.map
938
+ //# sourceMapp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;;;;;EASf,cAAA;AAAA"}
@@ -0,0 +1,2 @@
1
+ const e=[`APP_NAME`,`The name of the application.`,`APP_VERSION`,`1.0.0`,`The version of the application.`,`BUILD_ID`,`The unique identifier for the build.`,`BUILD_TIMESTAMP`,`The timestamp the build was ran at.`,`BUILD_CHECKSUM`,`A checksum hash created during the build.`,`RELEASE_ID`,`The unique identifier for the release.`,`RELEASE_TAG`,`The tag for the release. This is generally in the format of "\\<APP_NAME\\>\\@\\<APP_VERSION\\>".`,`ORGANIZATION`,`The name of the organization that maintains the application.`,{alias:[`ORG`]},`nodejs`,`deno`,`workerd`,`browser`,`RUNTIME`,`The runtime that the application is running in.`,`node`,`neutral`,`browser`,`PLATFORM`,`neutral`,`The platform for which the application was built.`,`development`,`test`,`production`,`MODE`,`production`,`The mode in which the application is running.`,{alias:[`NODE_ENV`,`VERCEL_ENV`]},`ENVIRONMENT`,"The environment the application is running in. This value will be populated with the value of `MODE` if not provided.",`DEBUG`,`Indicates if the application is running in debug mode.`,`TEST`,`An indicator that specifies the current runtime is a test environment.`,`MINIMAL`,`An indicator that specifies the current runtime is a minimal environment.`,`NO_COLOR`,`An indicator that specifies the current runtime is a no color environment.`,`FORCE_COLOR`,`An indicator that specifies the current runtime is a force color environment.`,`FORCE_HYPERLINK`,`An indicator that specifies the current runtime should force hyperlinks in terminal output.`,`AGENT_NAME`,`The name of the agent running the application. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`COLORTERM`,`The color terminal type. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM`,`The terminal type. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TERM_PROGRAM`,`The terminal program name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM_PROGRAM_VERSION`,`The terminal program version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINAL_EMULATOR`,`The terminal emulator name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`WT_SESSION`,`The terminal emulator session ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINUS_SUBLIME`,`An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`ConEmuTask`,`The ConEmu task name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`CURSOR_TRACE_ID`,`The cursor trace ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`VTE_VERSION`,`The VTE version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`STACKTRACE`,`Indicates if error stack traces should be captured.`,`INCLUDE_ERROR_DATA`,`Indicates if error data should be included.`,`ERROR_URL`,`A web page to lookup error messages and display additional information given an error code.`,{title:`Error Details URL`},`DEFAULT_TIMEZONE`,`America/New_York`,`The default timezone for the application.`,`DEFAULT_LOCALE`,`en_US`,`The default locale to be used in the application.`,`error`,`warn`,`info`,`debug`,`LOG_LEVEL`,`info`,"The default lowest log level to accept. If `null`, the logger will reject all records.",`CI`,`An indicator that specifies the current runtime is a continuous integration environment.`,{alias:[`CONTINUOUS_INTEGRATION`],title:`Continuous Integration`},`RUN_ID`,`The unique identifier for the current run. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AGOLA_GIT_REF`,`The agola git reference. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AC_APPCIRCLE`,`The appcircle build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPVEYOR`,`The appveyor build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CODEBUILD`,`The codebuild build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TF_BUILD`,`The task force build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`bamboo_planKey`,`The bamboo plan key. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITBUCKET_COMMIT`,`The bitbucket commit. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITRISE_IO`,`The bitrise build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUDDY_WORKSPACE_ID`,`The buddy workspace ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDKITE`,`The buildkite build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRCLECI`,`The circleci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRRUS_CI`,`The cirrus-ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CF_BUILD_ID`,`The cf build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CM_BUILD_ID`,`The cm build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_NAME`,`The ci name. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DRONE`,`The drone build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DSARI`,`The dsari build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EARTHLY_CI`,`The earthly build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EAS_BUILD`,`The eas build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GERRIT_PROJECT`,`The gerrit project. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITEA_ACTIONS`,`The gitea actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITHUB_ACTIONS`,`The github actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITLAB_CI`,`The gitlab ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GOCD`,`The go cd build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDER_OUTPUT`,`The builder output build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HARNESS_BUILD_ID`,`The harness build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`JENKINS_URL`,`The jenkins url. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`LAYERCI`,`The layerci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`MAGNUM`,`The magnum build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NETLIFY`,`The netlify build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NEVERCODE`,`The nevercode build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`PROW_JOB_ID`,`The prow job ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RELEASE_BUILD_ID`,`The release build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RENDER`,`The render build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SAILCI`,`The sailci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HUDSON`,`The hudson build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SCREWDRIVER`,`The screwdriver build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SEMAPHORE`,`The semaphore build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SOURCEHUT`,`The sourcehut build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SPACESHIP_CI`,`The spaceship build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`STRIDER`,`The strider build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TASK_ID`,`The task ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TEAMCITY_VERSION`,`The teamcity version. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TRAVIS`,`The travis build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`VELA`,`The vela build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NOW_BUILDER`,`The now builder build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPCENTER_BUILD_ID`,`The appcenter build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_XCODE_PROJECT`,`The xcode project build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`XCS`,`The xcode server build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DATA_DIR`,`The application's runtime data directory.`,{runtime:!0,title:`Data Directory`},`CONFIG_DIR`,`The application's configuration data directory.`,{runtime:!0,title:`Configuration Directory`},`CACHE_DIR`,`The application's cached data directory.`,{runtime:!0,title:`Cache Directory`},`LOG_DIR`,`The application's logging directory.`,{runtime:!0,title:`Log Directory`},`TEMP_DIR`,`The application's temporary data directory.`,{runtime:!0,title:`Temporary Directory`},`LOCALAPPDATA`,`A variable that specifies the current user's local application data directory on Windows.`,{hidden:!0,runtime:!0},`APPDATA`,`A variable that specifies the application data directory on Windows.`,{hidden:!0,runtime:!0},`XDG_DATA_HOME`,`A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CONFIG_HOME`,`A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CACHE_HOME`,`A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_STATE_HOME`,`A variable that specifies the state directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_RUNTIME_DIR`,`A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`DEVENV_RUNTIME`,`A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.`,{hidden:!0,runtime:!0},`The base environment configuration used by Powerlines applications`,`EnvInterface`,`P&4!9?"&4#9>$?%&4&9?'&4(9?)&4*9?+&4,9?-&4.9?/&40?1z2P.3.4.5.6J478?8P.9.:.;J4<>=?>P.?.@.AJ4B>C?DzE&4F>C?G)4H?I)4J?K)4L?M)4N?OP)'J4P?QP)'J4R?S&4T89?UzV&4W89?XzY&4Z89?[z\\&4]89?^z_&4\`89?azb&4c89?dze&4f89?gzh)4i89?jzk&4l89?mzn&4o89?pzq&4r89?szt)4u?v)4w?x&4y?zz{&4|>}?~&4>€?P.‚.ƒ.„.…,J4†8>‡?ˆ)4‰?Šz‹&4Œ89?zŽ&489?z‘&4’89?“z”&4•89?–z—&4˜89?™zš&4›89?œz&4ž89?Ÿz\xA0&4¡89?¢z£&4¤89?¥z¦&4§89?¨z©&4ª89?«z¬&4­89?®z¯&4°89?±z²&4³89?´zµ&4¶89?·z¸&4¹89?ºz»&4¼89?½z¾&4¿89?ÀzÁ&4Â89?ÃzÄ&4Å89?ÆzÇ&4È89?ÉzÊ&4Ë89?ÌzÍ&4Î89?ÏzÐ&4Ñ89?ÒzÓ&4Ô89?ÕzÖ&4×89?ØzÙ&4Ú89?ÛzÜ&4Ý89?Þzß&4à89?ázâ&4ã89?äzå&4æ89?çzè&4é89?êzë&4ì89?ízî&4ï89?ðzñ&4ò89?ózô&4õ89?öz÷&4ø89?ùzú&4û89?üzý&4þ89?ÿzĀ&4ā89?Ăză&4Ą89?ązĆ&4ć89?Ĉzĉ&4Ċ89?ċzČ&4č89?Ďzď&4Đ89?đzĒ&4ē89?Ĕzĕ&4Ė89?ėzĘ&4ę89?Ězě&4Ĝ89?ĝzĞ&4ğ89?Ġzġ&4Ģ8?ģzĤ&4ĥ8?Ħzħ&4Ĩ8?ĩzĪ&4ī8?Ĭzĭ&4Į8?įzİ&4ı89?IJzij&4Ĵ89?ĵzĶ&4ķ89?ĸzĹ&4ĺ89?Ļzļ&4Ľ89?ľzĿ&4ŀ89?Łzł&4Ń89?ńzŅ&4ņ89?ŇzňM?ʼnwŊy`],t=[`ENCRYPTION_KEY`,`The secret key used for encryption and decryption.`,{title:`Encryption Key`},`The base secrets configuration used by Powerlines applications`,`SecretsInterface`,`P&4!?"z#M?$w%y`];export{e as __ΩEnvInterface,t as __ΩSecretsInterface};
2
+ //# sourceMappingURL=env.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.mjs","names":[],"sources":["../../src/types/env.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * The base environment configuration used by Powerlines applications\n *\n * @remarks\n * This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \\`powerlines docs\\` command.\n *\n * @categoryDescription Platform\n * The name of the platform the configuration parameter is intended for use in.\n *\n * @showCategories\n */\nexport interface EnvInterface {\n /**\n * The name of the application.\n *\n * @readonly\n * @category neutral\n */\n readonly APP_NAME: string;\n\n /**\n * The version of the application.\n *\n * @defaultValue \"1.0.0\"\n *\n * @readonly\n * @category neutral\n */\n readonly APP_VERSION: string;\n\n /**\n * The unique identifier for the build.\n *\n * @readonly\n * @category neutral\n */\n readonly BUILD_ID: string;\n\n /**\n * The timestamp the build was ran at.\n *\n * @readonly\n * @category neutral\n */\n readonly BUILD_TIMESTAMP: string;\n\n /**\n * A checksum hash created during the build.\n *\n * @readonly\n * @category neutral\n */\n readonly BUILD_CHECKSUM: string;\n\n /**\n * The unique identifier for the release.\n *\n * @readonly\n * @category neutral\n */\n readonly RELEASE_ID: string;\n\n /**\n * The tag for the release. This is generally in the format of \"\\<APP_NAME\\>\\@\\<APP_VERSION\\>\".\n *\n * @readonly\n * @category neutral\n */\n readonly RELEASE_TAG: string;\n\n /**\n * The name of the organization that maintains the application.\n *\n * @remarks\n * This variable is used to specify the name of the organization that maintains the application. If not provided in an environment, it will try to use the value in {@link @storm-software/config-tools/StormWorkspaceConfig#organization}.\n *\n * @alias ORG\n * @alias ORG_ID\n * @category neutral\n */\n ORGANIZATION: string;\n\n /**\n * The runtime that the application is running in.\n */\n RUNTIME?: \"nodejs\" | \"deno\" | \"workerd\" | \"browser\";\n\n /**\n * The platform for which the application was built.\n *\n * @defaultValue \"neutral\"\n *\n * @category neutral\n */\n PLATFORM: \"node\" | \"neutral\" | \"browser\";\n\n /**\n * The mode in which the application is running.\n *\n * @defaultValue \"production\"\n *\n * @alias NODE_ENV\n * @alias ENV\n * @alias VERCEL_ENV\n *\n * @category neutral\n */\n MODE: \"development\" | \"test\" | \"production\";\n\n /**\n * The environment the application is running in. This value will be populated with the value of `MODE` if not provided.\n *\n * @defaultValue \"production\"\n *\n * @category neutral\n */\n ENVIRONMENT: string;\n\n /**\n * Indicates if the application is running in debug mode.\n *\n * @category neutral\n */\n DEBUG: boolean;\n\n /**\n * An indicator that specifies the current runtime is a test environment.\n *\n * @category neutral\n */\n TEST: boolean;\n\n /**\n * An indicator that specifies the current runtime is a minimal environment.\n *\n * @category node\n */\n MINIMAL: boolean;\n\n /**\n * An indicator that specifies the current runtime is a no color environment.\n *\n * @category node\n */\n NO_COLOR: boolean;\n\n /**\n * An indicator that specifies the current runtime is a force color environment.\n *\n * @category node\n */\n FORCE_COLOR: boolean | number;\n\n /**\n * An indicator that specifies the current runtime should force hyperlinks in terminal output.\n *\n * @remarks\n * This variable is used to force hyperlinks in terminal output, even if the terminal does not support them. This is useful for debugging and development purposes.\n\n * @category node\n */\n FORCE_HYPERLINK: boolean | number;\n\n /**\n * The name of the agent running the application. This variable is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category neutral\n */\n readonly AGENT_NAME?: string;\n\n /**\n * The color terminal type. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly COLORTERM?: string;\n\n /**\n * The terminal type. This variable is set by certain CI/CD systems.\n *\n * @remarks\n * This variable is used to specify the terminal type that the application is running in. It can be used to determine how to format output for the terminal.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERM?: string;\n\n /**\n * The terminal program name. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERM_PROGRAM?: string;\n\n /**\n * The terminal program version. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERM_PROGRAM_VERSION?: string;\n\n /**\n * The terminal emulator name. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERMINAL_EMULATOR?: string;\n\n /**\n * The terminal emulator session ID. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly WT_SESSION?: string;\n\n /**\n * An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERMINUS_SUBLIME?: boolean;\n\n /**\n * The ConEmu task name. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly ConEmuTask?: string;\n\n /**\n * The cursor trace ID. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CURSOR_TRACE_ID?: string;\n\n /**\n * The VTE version. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly VTE_VERSION?: string;\n\n /**\n * Indicates if error stack traces should be captured.\n *\n * @category neutral\n */\n STACKTRACE: boolean;\n\n /**\n * Indicates if error data should be included.\n *\n * @category neutral\n */\n INCLUDE_ERROR_DATA: boolean;\n\n /**\n * A web page to lookup error messages and display additional information given an error code.\n *\n * @remarks\n * This variable is used to provide a URL to a page that can be used to look up error messages given an error code. This is used to provide a more user-friendly error message to the user.\n *\n * @title Error Details URL\n * @category neutral\n */\n ERROR_URL: string;\n\n /**\n * The default timezone for the application.\n *\n * @defaultValue \"America/New_York\"\n * @category neutral\n */\n DEFAULT_TIMEZONE: string;\n\n /**\n * The default locale to be used in the application.\n *\n * @defaultValue \"en_US\"\n * @category neutral\n */\n DEFAULT_LOCALE: string;\n\n /**\n * The default lowest log level to accept. If `null`, the logger will reject all records.\n *\n * @defaultValue \"info\"\n *\n * @category neutral\n */\n LOG_LEVEL?: \"error\" | \"warn\" | \"info\" | \"debug\" | null;\n\n /**\n * An indicator that specifies the current runtime is a continuous integration environment.\n *\n * @title Continuous Integration\n * @alias CONTINUOUS_INTEGRATION\n * @category neutral\n */\n CI: boolean;\n\n /**\n * The unique identifier for the current run. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly RUN_ID?: string;\n\n /**\n * The agola git reference. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly AGOLA_GIT_REF?: string;\n\n /**\n * The appcircle build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly AC_APPCIRCLE?: string;\n\n /**\n * The appveyor build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly APPVEYOR?: string;\n\n /**\n * The codebuild build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CODEBUILD?: string;\n\n /**\n * The task force build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TF_BUILD?: string;\n\n /**\n * The bamboo plan key. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly bamboo_planKey?: string;\n\n /**\n * The bitbucket commit. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BITBUCKET_COMMIT?: string;\n\n /**\n * The bitrise build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BITRISE_IO?: string;\n\n /**\n * The buddy workspace ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BUDDY_WORKSPACE_ID?: string;\n\n /**\n * The buildkite build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BUILDKITE?: string;\n\n /**\n * The circleci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CIRCLECI?: string;\n\n /**\n * The cirrus-ci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CIRRUS_CI?: string;\n\n /**\n * The cf build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CF_BUILD_ID?: string;\n\n /**\n * The cm build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CM_BUILD_ID?: string;\n\n /**\n * The ci name. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CI_NAME?: string;\n\n /**\n * The drone build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly DRONE?: string;\n\n /**\n * The dsari build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly DSARI?: string;\n\n /**\n * The earthly build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly EARTHLY_CI?: string;\n\n /**\n * The eas build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly EAS_BUILD?: string;\n\n /**\n * The gerrit project. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GERRIT_PROJECT?: string;\n\n /**\n * The gitea actions build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GITEA_ACTIONS?: string;\n\n /**\n * The github actions build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GITHUB_ACTIONS?: string;\n\n /**\n * The gitlab ci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GITLAB_CI?: string;\n\n /**\n * The go cd build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GOCD?: string;\n\n /**\n * The builder output build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BUILDER_OUTPUT?: string;\n\n /**\n * The harness build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly HARNESS_BUILD_ID?: string;\n\n /**\n * The jenkins url. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly JENKINS_URL?: string;\n\n /**\n * The layerci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly LAYERCI?: string;\n\n /**\n * The magnum build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly MAGNUM?: string;\n\n /**\n * The netlify build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly NETLIFY?: string;\n\n /**\n * The nevercode build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly NEVERCODE?: string;\n\n /**\n * The prow job ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly PROW_JOB_ID?: string;\n\n /**\n * The release build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly RELEASE_BUILD_ID?: string;\n\n /**\n * The render build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly RENDER?: string;\n\n /**\n * The sailci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SAILCI?: string;\n\n /**\n * The hudson build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly HUDSON?: string;\n\n /**\n * The screwdriver build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SCREWDRIVER?: string;\n\n /**\n * The semaphore build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SEMAPHORE?: string;\n\n /**\n * The sourcehut build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SOURCEHUT?: string;\n /**\n * The spaceship build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SPACESHIP_CI?: string;\n\n /**\n * The strider build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly STRIDER?: string;\n\n /**\n * The task ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TASK_ID?: string;\n\n /**\n * The teamcity version. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TEAMCITY_VERSION?: string;\n\n /**\n * The travis build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TRAVIS?: string;\n\n /**\n * The vela build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly VELA?: string;\n\n /**\n * The now builder build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly NOW_BUILDER?: string;\n\n /**\n * The appcenter build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly APPCENTER_BUILD_ID?: string;\n\n /**\n * The xcode project build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CI_XCODE_PROJECT?: string;\n\n /**\n * The xcode server build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XCS?: string;\n\n /**\n * The application's runtime data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local application data directory. This variable is used to set the \\`$storm.paths.data\\` property.\n *\n * @title Data Directory\n * @runtime\n * @category node\n */\n DATA_DIR?: string;\n\n /**\n * The application's configuration data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local application configuration directory. This variable is used to set the \\`$storm.paths.config\\` property.\n *\n * @title Configuration Directory\n * @runtime\n * @category node\n */\n CONFIG_DIR?: string;\n\n /**\n * The application's cached data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local cache data directory. This variable is used to set the \\`$storm.paths.cache\\` property.\n *\n * @title Cache Directory\n * @runtime\n * @category node\n */\n CACHE_DIR?: string;\n\n /**\n * The application's logging directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local application log directory. This variable is used to set the \\`$storm.paths.log\\` property.\n *\n * @title Log Directory\n * @runtime\n * @category node\n */\n LOG_DIR?: string;\n\n /**\n * The application's temporary data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local temporary data directory. This variable is used to set the \\`$storm.paths.temp\\` property.\n *\n * @title Temporary Directory\n * @runtime\n * @category node\n */\n TEMP_DIR?: string;\n\n /**\n * A variable that specifies the current user's local application data directory on Windows.\n *\n * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \\`$storm.paths.data\\`, \\`$storm.paths.cache\\`, and \\`$storm.paths.log\\` properties.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly LOCALAPPDATA?: string;\n\n /**\n * A variable that specifies the application data directory on Windows.\n *\n * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \\`$storm.paths.config\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly APPDATA?: string;\n\n /**\n * A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \\`$storm.paths.data\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_DATA_HOME?: string;\n\n /**\n * A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to configuration data that is specific to the current user. This variable can be used to set the \\`$storm.paths.config\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_CONFIG_HOME?: string;\n\n /**\n * A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to cache data that is specific to the current user. This variable can be used to set the \\`$storm.paths.cache\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_CACHE_HOME?: string;\n\n /**\n * A variable that specifies the state directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to application state data that is specific to the current user. This variable can be used to set the \\`$storm.paths.state\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_STATE_HOME?: string;\n\n /**\n * A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to runtime data that is specific to the current user. This variable can be used to set the \\`$storm.paths.temp\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_RUNTIME_DIR?: string;\n\n /**\n * A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.\n *\n * @see https://devenv.sh/files-and-variables/#devenv_dotfile\n * @see https://nixos.org/\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \\`$storm.paths.temp\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n DEVENV_RUNTIME?: string;\n}\n\n/**\n * The base secrets configuration used by Powerlines applications\n *\n * @remarks\n * This interface is used to define the secret configuration options used by Powerlines applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \\`storm docs\\` command. Since these are secrets, no default values should be provided and the values should be kept confidential (excluded from the client).\n */\nexport interface SecretsInterface {\n /**\n * The secret key used for encryption and decryption.\n *\n * @remarks\n * This variable is used to provide a secret key for encryption and decryption of sensitive data. It is important that this value is kept confidential and not exposed in client-side code or public repositories.\n *\n * @title Encryption Key\n */\n ENCRYPTION_KEY: string;\n}\n"],"mappings":"ygBAkBE,MAAA,CAAA,MAAA,CACD,CAAE,SAAS,OAAA,UAAY,UAAmB,UAAG,kDAAW,OAAA,UAAA,UAAA,WAAA,UAAA,oDAAA,cAAA,OAAA,aAAA,OAAA,aAAA,gDAAA,CACxD,MAAA,CAAA,WAAA,aAAA,CACA,CAAE,cAAC,wHAAA,QAAA,yDAAA,OAAA,yEAAA,UAAA,4EAAA,WAAA,6EAAA,cAAA,gFAAA,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jF,OAAC,GACD,QAAI,GACL,CAAE,UAAG,2DAAA,CACJ,OAAI,GACJ,QAAI,GACL,CAAE,mBAAC,oEAAA,CACF,OAAQ,cAET,CAAE,SAAC,mEAAA,CACF,OAAO,GACP,QAAC,GACF,CAAE,OAAG,iEAAA,CACJ,OAAI,GACJ,QAAI,GACL,CAAE,cAAY,wEAAA,CACb,OAAE,GACF,QAAS,gGAET,OAAE,GACF,QAAO,GACR,CAAE,mBAAA,0EAAA,CACD,OAAI,GACJ,QAAQ,GACT,CAAE,MAAA,yEAAA,CACD,OAAI,GACJ,QAAI,GACL,CAAE,WAAG,4CAAA,CACJ,QAAI,GACJ,MAAE,iBACH,CAAC,aAAe,kDAAO,YAEtB,MAAE,0BACH,CAAE,YAAM,2CAA+C,CACtD,QAAC,GACD,MAAI,kBACL,CAAE,UAAG,uCAAA,CACJ,QAAI,GACJ,MAAI,gBACL,CAAE,WAAC,8CAAA,CACF,QAAS,+BAEV,CAAE,eAAC,4FAAA,CACF,OAAO,GACP,QAAC,GACF,CAAE,UAAG,uEAAA,CACJ,OAAI,GACJ,QAAI,GACL,CAAE,gBAAY,6HAAA,CACb,OAAE,GACF,QAAS,6JAET,OAAE,GACF,QAAO,GACR,CAAE,iBAAA,8HAAA,CACD,OAAI,GACJ,QAAI,GACL,CAAE,iBAAG,6GAAA,CACJ,OAAI,GACJ,QAAE,GACH,CAAC,kBAAS,+GAA0B,WAEnC,QAAE,GACH,CAAE,iBAAe,gFAAuE,CACvF,OAAC,GACD,QAAI,GACL,CAAE,qEAAG,eAAA,u2BAAA,CAEA,EAAS,CAAA,iBAAA,qDAAA,CACb,MAAE,iBACH,CAAC,iEAA4B,mBAAA,iBAAA"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./runtime.cjs`),t=require(`./plugin.cjs`);exports.__ΩEnvInterface=e.__ΩEnvInterface,exports.__ΩEnvPluginContext=t.__ΩEnvPluginContext,exports.__ΩEnvPluginOptions=t.__ΩEnvPluginOptions,exports.__ΩEnvPluginResolvedConfig=t.__ΩEnvPluginResolvedConfig,exports.__ΩEnvPluginUserConfig=t.__ΩEnvPluginUserConfig,exports.__ΩEnvType=t.__ΩEnvType,exports.__ΩSecretsInterface=e.__ΩSecretsInterface;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./plugin.cjs`),t=require(`./env.cjs`);exports.__ΩEnvInterface=t.__ΩEnvInterface,exports.__ΩEnvPluginContext=e.__ΩEnvPluginContext,exports.__ΩEnvPluginOptions=e.__ΩEnvPluginOptions,exports.__ΩEnvPluginResolvedConfig=e.__ΩEnvPluginResolvedConfig,exports.__ΩEnvPluginUserConfig=e.__ΩEnvPluginUserConfig,exports.__ΩEnvType=e.__ΩEnvType,exports.__ΩSecretsInterface=t.__ΩSecretsInterface;
@@ -1,3 +1,3 @@
1
- import { EnvInterface, SecretsInterface } from "./runtime.cjs";
1
+ import { EnvInterface, SecretsInterface } from "./env.cjs";
2
2
  import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType } from "./plugin.cjs";
3
3
  export { EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, SecretsInterface };
@@ -1,3 +1,3 @@
1
- import { EnvInterface, SecretsInterface } from "./runtime.mjs";
1
+ import { EnvInterface, SecretsInterface } from "./env.mjs";
2
2
  import { EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType } from "./plugin.mjs";
3
3
  export { EnvInterface, EnvPluginContext, EnvPluginOptions, EnvPluginResolvedConfig, EnvPluginUserConfig, EnvType, SecretsInterface };
@@ -1 +1 @@
1
- import{__ΩEnvInterface as e,__ΩSecretsInterface as t}from"./runtime.mjs";import{__ΩEnvPluginContext as n,__ΩEnvPluginOptions as r,__ΩEnvPluginResolvedConfig as i,__ΩEnvPluginUserConfig as a,__ΩEnvType as o}from"./plugin.mjs";export{e as __ΩEnvInterface,n as __ΩEnvPluginContext,r as __ΩEnvPluginOptions,i as __ΩEnvPluginResolvedConfig,a as __ΩEnvPluginUserConfig,o as __ΩEnvType,t as __ΩSecretsInterface};
1
+ import{__ΩEnvPluginContext as e,__ΩEnvPluginOptions as t,__ΩEnvPluginResolvedConfig as n,__ΩEnvPluginUserConfig as r,__ΩEnvType as i}from"./plugin.mjs";import{__ΩEnvInterface as a,__ΩSecretsInterface as o}from"./env.mjs";export{a as __ΩEnvInterface,e as __ΩEnvPluginContext,t as __ΩEnvPluginOptions,n as __ΩEnvPluginResolvedConfig,r as __ΩEnvPluginUserConfig,i as __ΩEnvType,o as __ΩSecretsInterface};
@@ -1,4 +1,4 @@
1
- import { EnvInterface, SecretsInterface } from "./runtime.cjs";
1
+ import { EnvInterface, SecretsInterface } from "./env.cjs";
2
2
  import { Children } from "@alloy-js/core";
3
3
  import { Reflection } from "@powerlines/deepkit/types";
4
4
  import { AutoMDPluginOptions } from "@powerlines/plugin-automd/types/plugin";
@@ -1,4 +1,4 @@
1
- import { EnvInterface, SecretsInterface } from "./runtime.mjs";
1
+ import { EnvInterface, SecretsInterface } from "./env.mjs";
2
2
  import { DotenvParseOutput } from "@stryke/env/types";
3
3
  import { Children } from "@alloy-js/core";
4
4
  import { Reflection } from "@powerlines/deepkit/types";
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children } from \"@alloy-js/core\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginOptions,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\nimport {\n DeepkitPluginContext,\n DeepkitPluginOptions,\n DeepkitPluginResolvedConfig,\n DeepkitPluginUserConfig\n} from \"@powerlines/plugin-deepkit/types/plugin\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport {\n DotenvConfiguration,\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { EnvInterface, SecretsInterface } from \"./runtime\";\n\nexport type EnvType = \"env\" | \"secrets\";\n\nexport type EnvPluginOptions = Omit<DotenvConfiguration, \"types\"> & {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n types?: TypeDefinitionParameter;\n\n /**\n * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigSecrets\"`.\n */\n secrets?: TypeDefinitionParameter;\n\n /**\n * An additional prefix (or list of additional prefixes) to apply to the environment variables\n *\n * @remarks\n * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.\n */\n prefix?: string | string[];\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @defaultValue false\n */\n inject?: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @defaultValue false\n */\n validate?: boolean;\n\n /**\n * The default configuration to use when loading environment variables.\n *\n * @remarks\n * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.\n */\n defaultConfig?: Children;\n\n /**\n * Babel configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.\n */\n babel?: BabelPluginOptions;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n\n /**\n * Alloy configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Deepkit transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Deepkit settings.\n */\n deepkit?: DeepkitPluginOptions;\n};\n\nexport type EnvPluginUserConfig = BabelPluginUserConfig &\n DeepkitPluginUserConfig & {\n env: EnvPluginOptions;\n };\n\nexport type EnvPluginResolvedConfig = BabelPluginResolvedConfig &\n DeepkitPluginResolvedConfig & {\n env: Required<Pick<DotenvConfiguration, \"additionalFiles\">> &\n Required<Pick<EnvPluginOptions, \"defaultConfig\">> & {\n /**\n * The type definition for the expected env variable parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.types} option.\n */\n types: TypeDefinition;\n\n /**\n * The type definition for the expected env secret parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.secrets} option.\n */\n secrets: TypeDefinition;\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.\n */\n inject: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.validate} option.\n */\n validate: boolean;\n\n /**\n * The prefix used for environment variables\n *\n * @remarks\n * This value is used to filter environment variables that are loaded from the .env file and the process environment.\n */\n prefix: string[];\n };\n };\n\nexport interface EnvPluginContext<\n TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig\n>\n extends\n BabelPluginContext<TResolvedConfig>,\n DeepkitPluginContext<TResolvedConfig> {\n env: {\n /**\n * The type definitions reflection for the env variables and secrets\n *\n * @remarks\n * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.\n */\n types: {\n /**\n * The type definitions for the expected env variables\n */\n env: Reflection;\n\n /**\n * The type definitions for the expected env secrets\n */\n secrets: Reflection;\n };\n\n /**\n * The current **used** environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.\n */\n used: {\n /**\n * The current env variables reflection\n */\n env: Reflection<EnvInterface>;\n\n /**\n * The current env secrets reflection\n */\n secrets: Reflection<SecretsInterface>;\n };\n\n /**\n * The parsed .env configuration object\n *\n * @remarks\n * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}\n */\n parsed: DotenvParseOutput;\n\n /**\n * The injected environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.\n */\n injected: Reflection;\n };\n}\n"],"mappings":"AAAA,MAAM,EAAU,CAAC,IAAK,QAAW,MAAe,EAAY,OAAQ,0BAAC,+CAE/D,EAAU,CAAC,IAAI,IAAM,OAAQ,4BAAG,6DAEhC,EAAS,CAAA,MAAY,UAAW,UAAW,YAAU,CAErD,EAAmB,KAAQ,EAAS,QAAK,QAAa,sRAAO,UAAA,yQAAA,SAAA,8FAAA,SAAA,GAAA,mFAAA,WAAA,qGAAA,WAAA,gBAAA,uEAAA,QAAA,gGAAA,SAAA,gIAAA,UAAA,gGAAA,mBAAA,gFAAA,uDAIlE,EAAkC,KAAO,MAAmB,EAAA,sBAAA,MAAA,MAAA,EAAA,gBAAA,QAAA,+DAAA,UAAA,6DAAA,SAAA,mFAAA,WAAA,qGAAA,SAAA,4CAAA,MAAA,0BAAA,+DAAA,CAE5D,EAA0B,KAAQ,EAAkB,kBAAA,MAAA,sDAAA,UAAA,oDAAA,oEAAA,QAAA,uCAAA,qCAAA,oEAAA,OAAA,SAAA,uCAAA,WAAA,4DAAA,mBAAA,gEAAA"}
1
+ {"version":3,"file":"plugin.mjs","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Children } from \"@alloy-js/core\";\nimport { Reflection } from \"@powerlines/deepkit/types\";\nimport { AutoMDPluginOptions } from \"@powerlines/plugin-automd/types/plugin\";\nimport {\n BabelPluginContext,\n BabelPluginOptions,\n BabelPluginResolvedConfig,\n BabelPluginUserConfig\n} from \"@powerlines/plugin-babel/types\";\nimport {\n DeepkitPluginContext,\n DeepkitPluginOptions,\n DeepkitPluginResolvedConfig,\n DeepkitPluginUserConfig\n} from \"@powerlines/plugin-deepkit/types/plugin\";\nimport type { DotenvParseOutput } from \"@stryke/env/types\";\nimport {\n DotenvConfiguration,\n TypeDefinition,\n TypeDefinitionParameter\n} from \"@stryke/types/configuration\";\nimport { EnvInterface, SecretsInterface } from \"./env\";\n\nexport type EnvType = \"env\" | \"secrets\";\n\nexport type EnvPluginOptions = Omit<DotenvConfiguration, \"types\"> & {\n /**\n * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigConfiguration\"`.\n */\n types?: TypeDefinitionParameter;\n\n /**\n * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `\":\"` or `\"#\"` character. For example: `\"./src/types/env.ts#ConfigSecrets\"`.\n */\n secrets?: TypeDefinitionParameter;\n\n /**\n * An additional prefix (or list of additional prefixes) to apply to the environment variables\n *\n * @remarks\n * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.\n */\n prefix?: string | string[];\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @defaultValue false\n */\n inject?: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @defaultValue false\n */\n validate?: boolean;\n\n /**\n * The default configuration to use when loading environment variables.\n *\n * @remarks\n * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.\n */\n defaultConfig?: Children;\n\n /**\n * Babel configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.\n */\n babel?: BabelPluginOptions;\n\n /**\n * AutoMD configuration options to allow injecting environment variables documentation into a markdown file such as a README.md.\n *\n * @remarks\n * The README.md file should contain the `<!-- automd:env --><!-- /automd -->` comment block where the documentation will be injected.\n */\n automd?: AutoMDPluginOptions;\n\n /**\n * Alloy configuration options to use when injecting environment variables into the source code.\n *\n * @remarks\n * This option allows you to customize the Deepkit transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Deepkit settings.\n */\n deepkit?: DeepkitPluginOptions;\n};\n\nexport type EnvPluginUserConfig = BabelPluginUserConfig &\n DeepkitPluginUserConfig & {\n env: EnvPluginOptions;\n };\n\nexport type EnvPluginResolvedConfig = BabelPluginResolvedConfig &\n DeepkitPluginResolvedConfig & {\n env: Required<Pick<DotenvConfiguration, \"additionalFiles\">> &\n Required<Pick<EnvPluginOptions, \"defaultConfig\">> & {\n /**\n * The type definition for the expected env variable parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.types} option.\n */\n types: TypeDefinition;\n\n /**\n * The type definition for the expected env secret parameters\n *\n * @remarks\n * This value is parsed from the {@link EnvPluginOptions.secrets} option.\n */\n secrets: TypeDefinition;\n\n /**\n * Should the plugin inject the env variables in the source code with their values?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.\n */\n inject: boolean;\n\n /**\n * Should the plugin validate the loaded environment variables against the provided type definitions?\n *\n * @remarks\n * This value is the result of reflecting the {@link EnvPluginOptions.validate} option.\n */\n validate: boolean;\n\n /**\n * The prefix used for environment variables\n *\n * @remarks\n * This value is used to filter environment variables that are loaded from the .env file and the process environment.\n */\n prefix: string[];\n };\n };\n\nexport interface EnvPluginContext<\n TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig\n>\n extends\n BabelPluginContext<TResolvedConfig>,\n DeepkitPluginContext<TResolvedConfig> {\n env: {\n /**\n * The type definitions reflection for the env variables and secrets\n *\n * @remarks\n * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.\n */\n types: {\n /**\n * The type definitions for the expected env variables\n */\n env: Reflection;\n\n /**\n * The type definitions for the expected env secrets\n */\n secrets: Reflection;\n };\n\n /**\n * The current **used** environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.\n */\n used: {\n /**\n * The current env variables reflection\n */\n env: Reflection<EnvInterface>;\n\n /**\n * The current env secrets reflection\n */\n secrets: Reflection<SecretsInterface>;\n };\n\n /**\n * The parsed .env configuration object\n *\n * @remarks\n * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}\n */\n parsed: DotenvParseOutput;\n\n /**\n * The injected environment variables and secrets reflection\n *\n * @remarks\n * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.\n */\n injected: Reflection;\n };\n}\n"],"mappings":"AAAA,MAAM,EAAU,CAAC,IAAK,QAAW,MAAe,EAAY,OAAQ,0BAAC,+CAE/D,EAAU,CAAC,IAAI,IAAM,OAAQ,4BAAG,6DAEhC,EAAS,CAAA,MAAY,UAAW,UAAW,YAAU,CAErD,EAAmB,KAAQ,EAAS,QAAK,QAAa,sRAAO,UAAA,yQAAA,SAAA,8FAAA,SAAA,GAAA,mFAAA,WAAA,qGAAA,WAAA,gBAAA,uEAAA,QAAA,gGAAA,SAAA,gIAAA,UAAA,gGAAA,mBAAA,gFAAA,uDAIlE,EAAkC,KAAO,MAAmB,EAAA,sBAAA,MAAA,MAAA,EAAA,gBAAA,QAAA,+DAAA,UAAA,6DAAA,SAAA,mFAAA,WAAA,qGAAA,SAAA,4CAAA,MAAA,0BAAA,+DAAA,CAE5D,EAA0B,KAAQ,EAAkB,kBAAA,MAAA,sDAAA,UAAA,oDAAA,oEAAA,QAAA,uCAAA,qCAAA,oEAAA,OAAA,SAAA,uCAAA,WAAA,4DAAA,mBAAA,gEAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.16.178",
3
+ "version": "0.16.180",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
6
6
  "keywords": ["dotenv", "powerlines", "storm-software", "powerlines-plugin"],
@@ -251,32 +251,32 @@
251
251
  "default": "./dist/types/index.mjs"
252
252
  }
253
253
  },
254
- "./types/plugin": {
254
+ "./types/env": {
255
255
  "require": {
256
- "types": "./dist/types/plugin.d.cts",
257
- "default": "./dist/types/plugin.cjs"
256
+ "types": "./dist/types/env.d.cts",
257
+ "default": "./dist/types/env.cjs"
258
258
  },
259
259
  "import": {
260
- "types": "./dist/types/plugin.d.mts",
261
- "default": "./dist/types/plugin.mjs"
260
+ "types": "./dist/types/env.d.mts",
261
+ "default": "./dist/types/env.mjs"
262
262
  },
263
263
  "default": {
264
- "types": "./dist/types/plugin.d.mts",
265
- "default": "./dist/types/plugin.mjs"
264
+ "types": "./dist/types/env.d.mts",
265
+ "default": "./dist/types/env.mjs"
266
266
  }
267
267
  },
268
- "./types/runtime": {
268
+ "./types/plugin": {
269
269
  "require": {
270
- "types": "./dist/types/runtime.d.cts",
271
- "default": "./dist/types/runtime.cjs"
270
+ "types": "./dist/types/plugin.d.cts",
271
+ "default": "./dist/types/plugin.cjs"
272
272
  },
273
273
  "import": {
274
- "types": "./dist/types/runtime.d.mts",
275
- "default": "./dist/types/runtime.mjs"
274
+ "types": "./dist/types/plugin.d.mts",
275
+ "default": "./dist/types/plugin.mjs"
276
276
  },
277
277
  "default": {
278
- "types": "./dist/types/runtime.d.mts",
279
- "default": "./dist/types/runtime.mjs"
278
+ "types": "./dist/types/plugin.d.mts",
279
+ "default": "./dist/types/plugin.mjs"
280
280
  }
281
281
  }
282
282
  },
@@ -292,29 +292,29 @@
292
292
  "@alloy-js/typescript": "0.23.0-dev.4",
293
293
  "@babel/core": "8.0.0-rc.4",
294
294
  "@babel/types": "8.0.0-rc.4",
295
- "@powerlines/plugin-alloy": "^0.26.71",
296
- "@powerlines/plugin-automd": "^0.1.452",
297
- "@powerlines/plugin-babel": "^0.12.445",
298
- "@powerlines/plugin-plugin": "^0.12.403",
299
- "@powerlines/deepkit": "^0.8.53",
300
- "@powerlines/plugin-deepkit": "^0.11.334",
295
+ "@powerlines/plugin-alloy": "^0.26.73",
296
+ "@powerlines/plugin-automd": "^0.1.454",
297
+ "@powerlines/plugin-babel": "^0.12.447",
298
+ "@powerlines/plugin-plugin": "^0.12.405",
299
+ "@powerlines/deepkit": "^0.8.55",
300
+ "@powerlines/plugin-deepkit": "^0.11.336",
301
301
  "@storm-software/config-tools": "^1.190.1",
302
- "@stryke/capnp": "^0.12.95",
303
- "@stryke/convert": "^0.7.2",
304
- "@stryke/env": "^0.20.86",
305
- "@stryke/helpers": "^0.10.11",
306
- "@stryke/fs": "^0.33.69",
307
- "@stryke/json": "^0.14.15",
308
- "@stryke/path": "^0.28.1",
309
- "@stryke/string-format": "^0.17.12",
310
- "@stryke/type-checks": "^0.6.4",
311
- "@stryke/types": "^0.11.6",
302
+ "@stryke/capnp": "^0.12.96",
303
+ "@stryke/convert": "^0.7.3",
304
+ "@stryke/env": "^0.20.87",
305
+ "@stryke/helpers": "^0.10.12",
306
+ "@stryke/fs": "^0.33.70",
307
+ "@stryke/json": "^0.14.16",
308
+ "@stryke/path": "^0.28.2",
309
+ "@stryke/string-format": "^0.17.13",
310
+ "@stryke/type-checks": "^0.6.5",
311
+ "@stryke/types": "^0.12.0",
312
312
  "automd": "^0.4.3",
313
313
  "defu": "^6.1.7",
314
- "powerlines": "^0.45.3",
314
+ "powerlines": "^0.46.1",
315
315
  "c12": "^3.3.4"
316
316
  },
317
317
  "devDependencies": { "@types/node": "^25.6.0", "vite": "^8.0.10" },
318
318
  "publishConfig": { "access": "public" },
319
- "gitHead": "8bd8d3c0e34fa7d04dafa0f05d740e5246a713cb"
319
+ "gitHead": "de70be13e6fd973ea0b1c56b8915223dcfb4a708"
320
320
  }
@@ -1 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=[`APP_NAME`,`The name of the application.`,`APP_VERSION`,`1.0.0`,`The version of the application.`,`BUILD_ID`,`The unique identifier for the build.`,`BUILD_TIMESTAMP`,`The timestamp the build was ran at.`,`BUILD_CHECKSUM`,`A checksum hash created during the build.`,`RELEASE_ID`,`The unique identifier for the release.`,`RELEASE_TAG`,`The tag for the release. This is generally in the format of "\\<APP_NAME\\>\\@\\<APP_VERSION\\>".`,`ORGANIZATION`,`The name of the organization that maintains the application.`,{alias:[`ORG`]},`node`,`neutral`,`browser`,`PLATFORM`,`neutral`,`The platform for which the application was built.`,`development`,`test`,`production`,`MODE`,`production`,`The mode in which the application is running.`,{alias:[`NODE_ENV`,`VERCEL_ENV`]},`ENVIRONMENT`,"The environment the application is running in. This value will be populated with the value of `MODE` if not provided.",`DEBUG`,`Indicates if the application is running in debug mode.`,`TEST`,`An indicator that specifies the current runtime is a test environment.`,`MINIMAL`,`An indicator that specifies the current runtime is a minimal environment.`,`NO_COLOR`,`An indicator that specifies the current runtime is a no color environment.`,`FORCE_COLOR`,`An indicator that specifies the current runtime is a force color environment.`,`FORCE_HYPERLINK`,`An indicator that specifies the current runtime should force hyperlinks in terminal output.`,`AGENT_NAME`,`The name of the agent running the application. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`COLORTERM`,`The color terminal type. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM`,`The terminal type. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TERM_PROGRAM`,`The terminal program name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM_PROGRAM_VERSION`,`The terminal program version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINAL_EMULATOR`,`The terminal emulator name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`WT_SESSION`,`The terminal emulator session ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINUS_SUBLIME`,`An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`ConEmuTask`,`The ConEmu task name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`CURSOR_TRACE_ID`,`The cursor trace ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`VTE_VERSION`,`The VTE version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`STACKTRACE`,`Indicates if error stack traces should be captured.`,`INCLUDE_ERROR_DATA`,`Indicates if error data should be included.`,`ERROR_URL`,`A web page to lookup error messages and display additional information given an error code.`,{title:`Error Details URL`},`DEFAULT_TIMEZONE`,`America/New_York`,`The default timezone for the application.`,`DEFAULT_LOCALE`,`en_US`,`The default locale to be used in the application.`,`error`,`warn`,`info`,`debug`,`LOG_LEVEL`,`info`,"The default lowest log level to accept. If `null`, the logger will reject all records.",`CI`,`An indicator that specifies the current runtime is a continuous integration environment.`,{alias:[`CONTINUOUS_INTEGRATION`],title:`Continuous Integration`},`RUN_ID`,`The unique identifier for the current run. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AGOLA_GIT_REF`,`The agola git reference. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AC_APPCIRCLE`,`The appcircle build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPVEYOR`,`The appveyor build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CODEBUILD`,`The codebuild build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TF_BUILD`,`The task force build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`bamboo_planKey`,`The bamboo plan key. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITBUCKET_COMMIT`,`The bitbucket commit. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITRISE_IO`,`The bitrise build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUDDY_WORKSPACE_ID`,`The buddy workspace ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDKITE`,`The buildkite build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRCLECI`,`The circleci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRRUS_CI`,`The cirrus-ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CF_BUILD_ID`,`The cf build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CM_BUILD_ID`,`The cm build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_NAME`,`The ci name. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DRONE`,`The drone build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DSARI`,`The dsari build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EARTHLY_CI`,`The earthly build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EAS_BUILD`,`The eas build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GERRIT_PROJECT`,`The gerrit project. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITEA_ACTIONS`,`The gitea actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITHUB_ACTIONS`,`The github actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITLAB_CI`,`The gitlab ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GOCD`,`The go cd build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDER_OUTPUT`,`The builder output build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HARNESS_BUILD_ID`,`The harness build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`JENKINS_URL`,`The jenkins url. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`LAYERCI`,`The layerci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`MAGNUM`,`The magnum build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NETLIFY`,`The netlify build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NEVERCODE`,`The nevercode build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`PROW_JOB_ID`,`The prow job ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RELEASE_BUILD_ID`,`The release build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RENDER`,`The render build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SAILCI`,`The sailci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HUDSON`,`The hudson build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SCREWDRIVER`,`The screwdriver build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SEMAPHORE`,`The semaphore build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SOURCEHUT`,`The sourcehut build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SPACESHIP_CI`,`The spaceship build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`STRIDER`,`The strider build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TASK_ID`,`The task ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TEAMCITY_VERSION`,`The teamcity version. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TRAVIS`,`The travis build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`VELA`,`The vela build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NOW_BUILDER`,`The now builder build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPCENTER_BUILD_ID`,`The appcenter build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_XCODE_PROJECT`,`The xcode project build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`XCS`,`The xcode server build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DATA_DIR`,`The application's runtime data directory.`,{runtime:!0,title:`Data Directory`},`CONFIG_DIR`,`The application's configuration data directory.`,{runtime:!0,title:`Configuration Directory`},`CACHE_DIR`,`The application's cached data directory.`,{runtime:!0,title:`Cache Directory`},`LOG_DIR`,`The application's logging directory.`,{runtime:!0,title:`Log Directory`},`TEMP_DIR`,`The application's temporary data directory.`,{runtime:!0,title:`Temporary Directory`},`LOCALAPPDATA`,`A variable that specifies the current user's local application data directory on Windows.`,{hidden:!0,runtime:!0},`APPDATA`,`A variable that specifies the application data directory on Windows.`,{hidden:!0,runtime:!0},`XDG_DATA_HOME`,`A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CONFIG_HOME`,`A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CACHE_HOME`,`A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_STATE_HOME`,`A variable that specifies the state directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_RUNTIME_DIR`,`A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`DEVENV_RUNTIME`,`A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.`,{hidden:!0,runtime:!0},`The base environment configuration used by Powerlines applications`,`EnvInterface`,`P&4!9?"&4#9>$?%&4&9?'&4(9?)&4*9?+&4,9?-&4.9?/&40?1z2P.3.4.5J46>7?8P.9.:.;J4<>=?>z?&4@>=?A)4B?C)4D?E)4F?G)4H?IP)'J4J?KP)'J4L?M&4N89?OzP&4Q89?RzS&4T89?UzV&4W89?XzY&4Z89?[z\\&4]89?^z_&4\`89?azb)4c89?dze&4f89?gzh&4i89?jzk&4l89?mzn)4o?p)4q?r&4s?tzu&4v>w?x&4y>z?{P.|.}.~.,J4€8>?‚)4ƒ?„z…&4†89?‡zˆ&4‰89?Šz‹&4Œ89?zŽ&489?z‘&4’89?“z”&4•89?–z—&4˜89?™zš&4›89?œz&4ž89?Ÿz\xA0&4¡89?¢z£&4¤89?¥z¦&4§89?¨z©&4ª89?«z¬&4­89?®z¯&4°89?±z²&4³89?´zµ&4¶89?·z¸&4¹89?ºz»&4¼89?½z¾&4¿89?ÀzÁ&4Â89?ÃzÄ&4Å89?ÆzÇ&4È89?ÉzÊ&4Ë89?ÌzÍ&4Î89?ÏzÐ&4Ñ89?ÒzÓ&4Ô89?ÕzÖ&4×89?ØzÙ&4Ú89?ÛzÜ&4Ý89?Þzß&4à89?ázâ&4ã89?äzå&4æ89?çzè&4é89?êzë&4ì89?ízî&4ï89?ðzñ&4ò89?ózô&4õ89?öz÷&4ø89?ùzú&4û89?üzý&4þ89?ÿzĀ&4ā89?Ăză&4Ą89?ązĆ&4ć89?Ĉzĉ&4Ċ89?ċzČ&4č89?Ďzď&4Đ89?đzĒ&4ē89?Ĕzĕ&4Ė89?ėzĘ&4ę89?Ězě&4Ĝ8?ĝzĞ&4ğ8?Ġzġ&4Ģ8?ģzĤ&4ĥ8?Ħzħ&4Ĩ8?ĩzĪ&4ī89?Ĭzĭ&4Į89?įzİ&4ı89?IJzij&4Ĵ89?ĵzĶ&4ķ89?ĸzĹ&4ĺ89?Ļzļ&4Ľ89?ľzĿ&4ŀ89?ŁzłM?Ńwńy`],t=[`ENCRYPTION_KEY`,`The secret key used for encryption and decryption.`,{title:`Encryption Key`},`The base secrets configuration used by Powerlines applications`,`SecretsInterface`,`P&4!?"z#M?$w%y`];exports.__ΩEnvInterface=e,exports.__ΩSecretsInterface=t;
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.d.cts","names":[],"sources":["../../src/types/runtime.ts"],"mappings":";;AA6BA;;;;;;;;;;UAAiB,YAAA;EAqEf;;;;;;EAAA,SA9DS,QAAA;EAyHT;;;;;;;;EAAA,SA/GS,WAAA;EAyMA;;;;;;EAAA,SAjMA,QAAA;EAkQT;;;;;;EAAA,SA1PS,eAAA;EA0TA;;;;;;EAAA,SAlTA,cAAA;EAwXA;;;;;;EAAA,SAhXA,UAAA;EAsbA;;;;;;EAAA,SA9aA,WAAA;EAofA;;;;;;;;;;EAxeT,YAAA;EAslBS;;;;;;;EA7kBT,QAAA;EA4pBS;;;;;;;;;;;EA/oBT,IAAA;EAixBA;;;;;;;EAxwBA,WAAA;EAi4BA;;;AASF;;EAn4BE,KAAA;EA44BA;;;;;EAr4BA,IAAA;;;;;;EAOA,OAAA;;;;;;EAOA,QAAA;;;;;;EAOA,WAAA;;;;;;;;EAUA,eAAA;;;;;;;;;WAUS,UAAA;;;;;;;;;WAUA,SAAA;;;;;;;;;;;;WAaA,IAAA;;;;;;;;;WAUA,YAAA;;;;;;;;;WAUA,oBAAA;;;;;;;;;WAUA,iBAAA;;;;;;;;;WAUA,UAAA;;;;;;;;;WAUA,gBAAA;;;;;;;;;WAUA,UAAA;;;;;;;;;WAUA,eAAA;;;;;;;;;WAUA,WAAA;;;;;;EAOT,UAAA;;;;;;EAOA,kBAAA;;;;;;;;;;EAWA,SAAA;;;;;;;EAQA,gBAA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;;;;;EAYA,OAAA;;;;;;;;;;;EAYA,QAAA;;;;;;;;;;;;;;WAeS,YAAA;;;;;;;;;;;;;;WAeA,OAAA;;;;;;;;;;;;;;WAeA,aAAA;;;;;;;;;;;;;;WAeA,eAAA;;;;;;;;;;;;;;WAeA,cAAA;;;;;;;;;;;;;;WAeA,cAAA;;;;;;;;;;;;;;WAeA,eAAA;;;;;;;;;;;;;;;EAgBT,cAAA;AAAA;;;;;;;UASe,gBAAA;;;;;;;;;EASf,cAAA;AAAA"}
@@ -1,2 +0,0 @@
1
- const e=[`APP_NAME`,`The name of the application.`,`APP_VERSION`,`1.0.0`,`The version of the application.`,`BUILD_ID`,`The unique identifier for the build.`,`BUILD_TIMESTAMP`,`The timestamp the build was ran at.`,`BUILD_CHECKSUM`,`A checksum hash created during the build.`,`RELEASE_ID`,`The unique identifier for the release.`,`RELEASE_TAG`,`The tag for the release. This is generally in the format of "\\<APP_NAME\\>\\@\\<APP_VERSION\\>".`,`ORGANIZATION`,`The name of the organization that maintains the application.`,{alias:[`ORG`]},`node`,`neutral`,`browser`,`PLATFORM`,`neutral`,`The platform for which the application was built.`,`development`,`test`,`production`,`MODE`,`production`,`The mode in which the application is running.`,{alias:[`NODE_ENV`,`VERCEL_ENV`]},`ENVIRONMENT`,"The environment the application is running in. This value will be populated with the value of `MODE` if not provided.",`DEBUG`,`Indicates if the application is running in debug mode.`,`TEST`,`An indicator that specifies the current runtime is a test environment.`,`MINIMAL`,`An indicator that specifies the current runtime is a minimal environment.`,`NO_COLOR`,`An indicator that specifies the current runtime is a no color environment.`,`FORCE_COLOR`,`An indicator that specifies the current runtime is a force color environment.`,`FORCE_HYPERLINK`,`An indicator that specifies the current runtime should force hyperlinks in terminal output.`,`AGENT_NAME`,`The name of the agent running the application. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`COLORTERM`,`The color terminal type. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM`,`The terminal type. This variable is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TERM_PROGRAM`,`The terminal program name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERM_PROGRAM_VERSION`,`The terminal program version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINAL_EMULATOR`,`The terminal emulator name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`WT_SESSION`,`The terminal emulator session ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`TERMINUS_SUBLIME`,`An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`ConEmuTask`,`The ConEmu task name. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`CURSOR_TRACE_ID`,`The cursor trace ID. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`VTE_VERSION`,`The VTE version. This variable is set by certain terminal emulators.`,{hidden:!0,runtime:!0},`STACKTRACE`,`Indicates if error stack traces should be captured.`,`INCLUDE_ERROR_DATA`,`Indicates if error data should be included.`,`ERROR_URL`,`A web page to lookup error messages and display additional information given an error code.`,{title:`Error Details URL`},`DEFAULT_TIMEZONE`,`America/New_York`,`The default timezone for the application.`,`DEFAULT_LOCALE`,`en_US`,`The default locale to be used in the application.`,`error`,`warn`,`info`,`debug`,`LOG_LEVEL`,`info`,"The default lowest log level to accept. If `null`, the logger will reject all records.",`CI`,`An indicator that specifies the current runtime is a continuous integration environment.`,{alias:[`CONTINUOUS_INTEGRATION`],title:`Continuous Integration`},`RUN_ID`,`The unique identifier for the current run. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AGOLA_GIT_REF`,`The agola git reference. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`AC_APPCIRCLE`,`The appcircle build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPVEYOR`,`The appveyor build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CODEBUILD`,`The codebuild build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TF_BUILD`,`The task force build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`bamboo_planKey`,`The bamboo plan key. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITBUCKET_COMMIT`,`The bitbucket commit. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BITRISE_IO`,`The bitrise build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUDDY_WORKSPACE_ID`,`The buddy workspace ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDKITE`,`The buildkite build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRCLECI`,`The circleci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CIRRUS_CI`,`The cirrus-ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CF_BUILD_ID`,`The cf build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CM_BUILD_ID`,`The cm build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_NAME`,`The ci name. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DRONE`,`The drone build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DSARI`,`The dsari build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EARTHLY_CI`,`The earthly build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`EAS_BUILD`,`The eas build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GERRIT_PROJECT`,`The gerrit project. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITEA_ACTIONS`,`The gitea actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITHUB_ACTIONS`,`The github actions build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GITLAB_CI`,`The gitlab ci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`GOCD`,`The go cd build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`BUILDER_OUTPUT`,`The builder output build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HARNESS_BUILD_ID`,`The harness build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`JENKINS_URL`,`The jenkins url. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`LAYERCI`,`The layerci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`MAGNUM`,`The magnum build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NETLIFY`,`The netlify build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NEVERCODE`,`The nevercode build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`PROW_JOB_ID`,`The prow job ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RELEASE_BUILD_ID`,`The release build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`RENDER`,`The render build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SAILCI`,`The sailci build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`HUDSON`,`The hudson build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SCREWDRIVER`,`The screwdriver build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SEMAPHORE`,`The semaphore build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SOURCEHUT`,`The sourcehut build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`SPACESHIP_CI`,`The spaceship build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`STRIDER`,`The strider build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TASK_ID`,`The task ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TEAMCITY_VERSION`,`The teamcity version. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`TRAVIS`,`The travis build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`VELA`,`The vela build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`NOW_BUILDER`,`The now builder build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`APPCENTER_BUILD_ID`,`The appcenter build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`CI_XCODE_PROJECT`,`The xcode project build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`XCS`,`The xcode server build ID. This value is set by certain CI/CD systems.`,{hidden:!0,runtime:!0},`DATA_DIR`,`The application's runtime data directory.`,{runtime:!0,title:`Data Directory`},`CONFIG_DIR`,`The application's configuration data directory.`,{runtime:!0,title:`Configuration Directory`},`CACHE_DIR`,`The application's cached data directory.`,{runtime:!0,title:`Cache Directory`},`LOG_DIR`,`The application's logging directory.`,{runtime:!0,title:`Log Directory`},`TEMP_DIR`,`The application's temporary data directory.`,{runtime:!0,title:`Temporary Directory`},`LOCALAPPDATA`,`A variable that specifies the current user's local application data directory on Windows.`,{hidden:!0,runtime:!0},`APPDATA`,`A variable that specifies the application data directory on Windows.`,{hidden:!0,runtime:!0},`XDG_DATA_HOME`,`A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CONFIG_HOME`,`A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_CACHE_HOME`,`A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_STATE_HOME`,`A variable that specifies the state directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`XDG_RUNTIME_DIR`,`A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.`,{hidden:!0,runtime:!0},`DEVENV_RUNTIME`,`A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.`,{hidden:!0,runtime:!0},`The base environment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`ENCRYPTION_KEY`,`The secret key used for encryption and decryption.`,{title:`Encryption Key`},`The base secrets configuration used by Powerlines applications`,`SecretsInterface`,`P&4!?"z#M?$w%y`];export{e as __ΩEnvInterface,t as __ΩSecretsInterface};
2
- //# sourceMappingURL=runtime.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime.mjs","names":[],"sources":["../../src/types/runtime.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * The base environment configuration used by Powerlines applications\n *\n * @remarks\n * This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \\`powerlines docs\\` command.\n *\n * @categoryDescription Platform\n * The name of the platform the configuration parameter is intended for use in.\n *\n * @showCategories\n */\nexport interface EnvInterface {\n /**\n * The name of the application.\n *\n * @readonly\n * @category neutral\n */\n readonly APP_NAME: string;\n\n /**\n * The version of the application.\n *\n * @defaultValue \"1.0.0\"\n *\n * @readonly\n * @category neutral\n */\n readonly APP_VERSION: string;\n\n /**\n * The unique identifier for the build.\n *\n * @readonly\n * @category neutral\n */\n readonly BUILD_ID: string;\n\n /**\n * The timestamp the build was ran at.\n *\n * @readonly\n * @category neutral\n */\n readonly BUILD_TIMESTAMP: string;\n\n /**\n * A checksum hash created during the build.\n *\n * @readonly\n * @category neutral\n */\n readonly BUILD_CHECKSUM: string;\n\n /**\n * The unique identifier for the release.\n *\n * @readonly\n * @category neutral\n */\n readonly RELEASE_ID: string;\n\n /**\n * The tag for the release. This is generally in the format of \"\\<APP_NAME\\>\\@\\<APP_VERSION\\>\".\n *\n * @readonly\n * @category neutral\n */\n readonly RELEASE_TAG: string;\n\n /**\n * The name of the organization that maintains the application.\n *\n * @remarks\n * This variable is used to specify the name of the organization that maintains the application. If not provided in an environment, it will try to use the value in {@link @storm-software/config-tools/StormWorkspaceConfig#organization}.\n *\n * @alias ORG\n * @alias ORG_ID\n * @category neutral\n */\n ORGANIZATION: string;\n\n /**\n * The platform for which the application was built.\n *\n * @defaultValue \"neutral\"\n *\n * @category neutral\n */\n PLATFORM: \"node\" | \"neutral\" | \"browser\";\n\n /**\n * The mode in which the application is running.\n *\n * @defaultValue \"production\"\n *\n * @alias NODE_ENV\n * @alias ENV\n * @alias VERCEL_ENV\n *\n * @category neutral\n */\n MODE: \"development\" | \"test\" | \"production\";\n\n /**\n * The environment the application is running in. This value will be populated with the value of `MODE` if not provided.\n *\n * @defaultValue \"production\"\n *\n * @category neutral\n */\n ENVIRONMENT: string;\n\n /**\n * Indicates if the application is running in debug mode.\n *\n * @category neutral\n */\n DEBUG: boolean;\n\n /**\n * An indicator that specifies the current runtime is a test environment.\n *\n * @category neutral\n */\n TEST: boolean;\n\n /**\n * An indicator that specifies the current runtime is a minimal environment.\n *\n * @category node\n */\n MINIMAL: boolean;\n\n /**\n * An indicator that specifies the current runtime is a no color environment.\n *\n * @category node\n */\n NO_COLOR: boolean;\n\n /**\n * An indicator that specifies the current runtime is a force color environment.\n *\n * @category node\n */\n FORCE_COLOR: boolean | number;\n\n /**\n * An indicator that specifies the current runtime should force hyperlinks in terminal output.\n *\n * @remarks\n * This variable is used to force hyperlinks in terminal output, even if the terminal does not support them. This is useful for debugging and development purposes.\n\n * @category node\n */\n FORCE_HYPERLINK: boolean | number;\n\n /**\n * The name of the agent running the application. This variable is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category neutral\n */\n readonly AGENT_NAME?: string;\n\n /**\n * The color terminal type. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly COLORTERM?: string;\n\n /**\n * The terminal type. This variable is set by certain CI/CD systems.\n *\n * @remarks\n * This variable is used to specify the terminal type that the application is running in. It can be used to determine how to format output for the terminal.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERM?: string;\n\n /**\n * The terminal program name. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERM_PROGRAM?: string;\n\n /**\n * The terminal program version. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERM_PROGRAM_VERSION?: string;\n\n /**\n * The terminal emulator name. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERMINAL_EMULATOR?: string;\n\n /**\n * The terminal emulator session ID. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly WT_SESSION?: string;\n\n /**\n * An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TERMINUS_SUBLIME?: boolean;\n\n /**\n * The ConEmu task name. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly ConEmuTask?: string;\n\n /**\n * The cursor trace ID. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CURSOR_TRACE_ID?: string;\n\n /**\n * The VTE version. This variable is set by certain terminal emulators.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly VTE_VERSION?: string;\n\n /**\n * Indicates if error stack traces should be captured.\n *\n * @category neutral\n */\n STACKTRACE: boolean;\n\n /**\n * Indicates if error data should be included.\n *\n * @category neutral\n */\n INCLUDE_ERROR_DATA: boolean;\n\n /**\n * A web page to lookup error messages and display additional information given an error code.\n *\n * @remarks\n * This variable is used to provide a URL to a page that can be used to look up error messages given an error code. This is used to provide a more user-friendly error message to the user.\n *\n * @title Error Details URL\n * @category neutral\n */\n ERROR_URL: string;\n\n /**\n * The default timezone for the application.\n *\n * @defaultValue \"America/New_York\"\n * @category neutral\n */\n DEFAULT_TIMEZONE: string;\n\n /**\n * The default locale to be used in the application.\n *\n * @defaultValue \"en_US\"\n * @category neutral\n */\n DEFAULT_LOCALE: string;\n\n /**\n * The default lowest log level to accept. If `null`, the logger will reject all records.\n *\n * @defaultValue \"info\"\n *\n * @category neutral\n */\n LOG_LEVEL?: \"error\" | \"warn\" | \"info\" | \"debug\" | null;\n\n /**\n * An indicator that specifies the current runtime is a continuous integration environment.\n *\n * @title Continuous Integration\n * @alias CONTINUOUS_INTEGRATION\n * @category neutral\n */\n CI: boolean;\n\n /**\n * The unique identifier for the current run. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly RUN_ID?: string;\n\n /**\n * The agola git reference. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly AGOLA_GIT_REF?: string;\n\n /**\n * The appcircle build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly AC_APPCIRCLE?: string;\n\n /**\n * The appveyor build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly APPVEYOR?: string;\n\n /**\n * The codebuild build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CODEBUILD?: string;\n\n /**\n * The task force build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TF_BUILD?: string;\n\n /**\n * The bamboo plan key. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly bamboo_planKey?: string;\n\n /**\n * The bitbucket commit. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BITBUCKET_COMMIT?: string;\n\n /**\n * The bitrise build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BITRISE_IO?: string;\n\n /**\n * The buddy workspace ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BUDDY_WORKSPACE_ID?: string;\n\n /**\n * The buildkite build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BUILDKITE?: string;\n\n /**\n * The circleci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CIRCLECI?: string;\n\n /**\n * The cirrus-ci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CIRRUS_CI?: string;\n\n /**\n * The cf build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CF_BUILD_ID?: string;\n\n /**\n * The cm build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CM_BUILD_ID?: string;\n\n /**\n * The ci name. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CI_NAME?: string;\n\n /**\n * The drone build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly DRONE?: string;\n\n /**\n * The dsari build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly DSARI?: string;\n\n /**\n * The earthly build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly EARTHLY_CI?: string;\n\n /**\n * The eas build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly EAS_BUILD?: string;\n\n /**\n * The gerrit project. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GERRIT_PROJECT?: string;\n\n /**\n * The gitea actions build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GITEA_ACTIONS?: string;\n\n /**\n * The github actions build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GITHUB_ACTIONS?: string;\n\n /**\n * The gitlab ci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GITLAB_CI?: string;\n\n /**\n * The go cd build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly GOCD?: string;\n\n /**\n * The builder output build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly BUILDER_OUTPUT?: string;\n\n /**\n * The harness build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly HARNESS_BUILD_ID?: string;\n\n /**\n * The jenkins url. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly JENKINS_URL?: string;\n\n /**\n * The layerci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly LAYERCI?: string;\n\n /**\n * The magnum build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly MAGNUM?: string;\n\n /**\n * The netlify build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly NETLIFY?: string;\n\n /**\n * The nevercode build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly NEVERCODE?: string;\n\n /**\n * The prow job ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly PROW_JOB_ID?: string;\n\n /**\n * The release build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly RELEASE_BUILD_ID?: string;\n\n /**\n * The render build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly RENDER?: string;\n\n /**\n * The sailci build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SAILCI?: string;\n\n /**\n * The hudson build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly HUDSON?: string;\n\n /**\n * The screwdriver build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SCREWDRIVER?: string;\n\n /**\n * The semaphore build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SEMAPHORE?: string;\n\n /**\n * The sourcehut build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SOURCEHUT?: string;\n /**\n * The spaceship build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly SPACESHIP_CI?: string;\n\n /**\n * The strider build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly STRIDER?: string;\n\n /**\n * The task ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TASK_ID?: string;\n\n /**\n * The teamcity version. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TEAMCITY_VERSION?: string;\n\n /**\n * The travis build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly TRAVIS?: string;\n\n /**\n * The vela build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly VELA?: string;\n\n /**\n * The now builder build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly NOW_BUILDER?: string;\n\n /**\n * The appcenter build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly APPCENTER_BUILD_ID?: string;\n\n /**\n * The xcode project build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly CI_XCODE_PROJECT?: string;\n\n /**\n * The xcode server build ID. This value is set by certain CI/CD systems.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XCS?: string;\n\n /**\n * The application's runtime data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local application data directory. This variable is used to set the \\`$storm.paths.data\\` property.\n *\n * @title Data Directory\n * @runtime\n * @category node\n */\n DATA_DIR?: string;\n\n /**\n * The application's configuration data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local application configuration directory. This variable is used to set the \\`$storm.paths.config\\` property.\n *\n * @title Configuration Directory\n * @runtime\n * @category node\n */\n CONFIG_DIR?: string;\n\n /**\n * The application's cached data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local cache data directory. This variable is used to set the \\`$storm.paths.cache\\` property.\n *\n * @title Cache Directory\n * @runtime\n * @category node\n */\n CACHE_DIR?: string;\n\n /**\n * The application's logging directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local application log directory. This variable is used to set the \\`$storm.paths.log\\` property.\n *\n * @title Log Directory\n * @runtime\n * @category node\n */\n LOG_DIR?: string;\n\n /**\n * The application's temporary data directory.\n *\n * @remarks\n * This variable is used to override the base path of the system's local temporary data directory. This variable is used to set the \\`$storm.paths.temp\\` property.\n *\n * @title Temporary Directory\n * @runtime\n * @category node\n */\n TEMP_DIR?: string;\n\n /**\n * A variable that specifies the current user's local application data directory on Windows.\n *\n * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \\`$storm.paths.data\\`, \\`$storm.paths.cache\\`, and \\`$storm.paths.log\\` properties.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly LOCALAPPDATA?: string;\n\n /**\n * A variable that specifies the application data directory on Windows.\n *\n * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \\`$storm.paths.config\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly APPDATA?: string;\n\n /**\n * A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \\`$storm.paths.data\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_DATA_HOME?: string;\n\n /**\n * A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to configuration data that is specific to the current user. This variable can be used to set the \\`$storm.paths.config\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_CONFIG_HOME?: string;\n\n /**\n * A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to cache data that is specific to the current user. This variable can be used to set the \\`$storm.paths.cache\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_CACHE_HOME?: string;\n\n /**\n * A variable that specifies the state directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to application state data that is specific to the current user. This variable can be used to set the \\`$storm.paths.state\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_STATE_HOME?: string;\n\n /**\n * A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.\n *\n * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c\n *\n * @remarks\n * This variable is used to specify a path to runtime data that is specific to the current user. This variable can be used to set the \\`$storm.paths.temp\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n readonly XDG_RUNTIME_DIR?: string;\n\n /**\n * A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.\n *\n * @see https://devenv.sh/files-and-variables/#devenv_dotfile\n * @see https://nixos.org/\n *\n * @remarks\n * This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \\`$storm.paths.temp\\` property.\n *\n * @readonly\n * @runtime\n * @hidden\n * @category node\n */\n DEVENV_RUNTIME?: string;\n}\n\n/**\n * The base secrets configuration used by Powerlines applications\n *\n * @remarks\n * This interface is used to define the secret configuration options used by Powerlines applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \\`storm docs\\` command. Since these are secrets, no default values should be provided and the values should be kept confidential (excluded from the client).\n */\nexport interface SecretsInterface {\n /**\n * The secret key used for encryption and decryption.\n *\n * @remarks\n * This variable is used to provide a secret key for encryption and decryption of sensitive data. It is important that this value is kept confidential and not exposed in client-side code or public repositories.\n *\n * @title Encryption Key\n */\n ENCRYPTION_KEY: string;\n}\n"],"mappings":"ygBAkBE,MAAA,CAAA,MAAA,CACD,CAAE,OAAQ,UAAC,UAAY,WAAqB,UAAW,oDAAC,cAAA,OAAA,aAAA,OAAA,aAAA,gDAAA,CACxD,MAAA,CAAA,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