@powerlines/plugin-env 0.14.19 → 0.14.21

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 (34) hide show
  1. package/dist/components/docs.d.cts +3 -1
  2. package/dist/components/env.d.cts +1 -0
  3. package/dist/helpers/create-reflection-resource.d.cts +2 -1
  4. package/dist/helpers/load.cjs +1 -1
  5. package/dist/helpers/load.mjs +1 -1
  6. package/dist/helpers/reflect.cjs +1 -1
  7. package/dist/helpers/reflect.mjs +1 -1
  8. package/dist/index.cjs +2 -2
  9. package/dist/index.mjs +2 -2
  10. package/dist/plugin-alloy/src/core/components/output.cjs +1 -1
  11. package/dist/plugin-alloy/src/core/components/output.mjs +1 -1
  12. package/dist/plugin-alloy/src/core/contexts/context.cjs +1 -1
  13. package/dist/plugin-alloy/src/core/contexts/context.mjs +1 -1
  14. package/dist/plugin-alloy/src/index.cjs +1 -2
  15. package/dist/plugin-alloy/src/index.mjs +1 -2
  16. package/dist/plugin-alloy/src/types/components.d.mts +1 -1
  17. package/dist/plugin-alloy/src/types/plugin.d.cts +1 -0
  18. package/dist/plugin-alloy/src/types/plugin.d.mts +3 -3
  19. package/dist/plugin-babel/src/helpers/filters.cjs +1 -1
  20. package/dist/plugin-babel/src/helpers/filters.mjs +1 -1
  21. package/dist/plugin-babel/src/index.cjs +1 -1
  22. package/dist/plugin-babel/src/index.mjs +1 -1
  23. package/dist/powerlines/src/lib/entry.cjs +1 -1
  24. package/dist/powerlines/src/lib/entry.mjs +1 -1
  25. package/dist/powerlines/src/types/config.d.mts +1 -1
  26. package/dist/powerlines/src/types/context.d.cts +17 -0
  27. package/dist/powerlines/src/types/context.d.mts +17 -0
  28. package/dist/powerlines/src/types/fs.d.cts +28 -0
  29. package/dist/powerlines/src/types/fs.d.mts +28 -0
  30. package/dist/types/plugin.d.cts +1 -0
  31. package/package.json +8 -8
  32. package/dist/plugin-alloy/src/vendor/index.cjs +0 -1
  33. package/dist/plugin-alloy/src/vendor/index.d.mts +0 -7
  34. package/dist/plugin-alloy/src/vendor/index.mjs +0 -1
@@ -1,7 +1,9 @@
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
+
1
3
  //#region src/components/docs.d.ts
2
4
  /**
3
5
  * Generates the environment configuration markdown documentation for the Powerlines project.
4
6
  */
5
- declare function EnvDocs(): void 0;
7
+ declare function EnvDocs(): _alloy_js_core0.Children;
6
8
  //#endregion
7
9
  export { EnvDocs };
@@ -1,3 +1,4 @@
1
+ import { Children } from "@alloy-js/core";
1
2
  import { BuiltinFileProps } from "@powerlines/alloy/typescript/components/builtin-file";
2
3
  import { TypeScriptInterfaceProps } from "@powerlines/alloy/typescript/components/typescript-interface";
3
4
 
@@ -1,5 +1,6 @@
1
1
  import { type_d_exports } from "../deepkit/src/vendor/type.cjs";
2
2
  import { EnvPluginContext } from "../types/plugin.cjs";
3
+ import * as _alloy_js_core0 from "@alloy-js/core";
3
4
 
4
5
  //#region src/helpers/create-reflection-resource.d.ts
5
6
 
@@ -9,6 +10,6 @@ import { EnvPluginContext } from "../types/plugin.cjs";
9
10
  * @param context - The environment plugin context.
10
11
  * @returns A resource that provides the reflection of the environment configuration.
11
12
  */
12
- declare function createReflectionResource(context?: EnvPluginContext): void 0<type_d_exports.ReflectionClass<Record<string, any>>>;
13
+ declare function createReflectionResource(context?: EnvPluginContext): _alloy_js_core0.Resource<type_d_exports.ReflectionClass<Record<string, any>>>;
13
14
  //#endregion
14
15
  export { createReflectionResource };
@@ -1 +1 @@
1
- const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./source-file-env.cjs`);let n=require(`@stryke/type-checks/is-set-string`),r=require(`@stryke/path/join-paths`),i=require(`c12`),a=require(`defu`);a=e.__toESM(a);let o=require(`@stryke/type-checks/is-set-object`),s=require(`@stryke/string-format/kebab-case`),c=require(`@stryke/env/load-env`);async function l(e,n,r){let i=await(0,c.loadEnv)(r,n);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(async e=>(0,c.loadEnvFile)(e,r)));for(let e of t)i=(0,a.default)(e,i)}return t.removeEnvPrefix(i)}async function u(e,t,n,o,s,c){let[u,d]=await Promise.all([l(e,n,t),(0,i.loadConfig)({cwd:t,name:`storm`,envName:n,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:n,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:(0,r.joinPaths)(o,`jiti`),moduleCache:!0}})]);return(0,a.default)(u,d.config,c)}function d(e,t){return(0,a.default)({APP_NAME:(0,s.kebabCase)(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),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:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:(0,n.isSetString)(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},(0,o.isSetObject)(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,r,i]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return(0,a.default)(d(e,process.env),n,r,i)}exports.loadEnv=f,exports.loadEnvFromContext=d;
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./source-file-env.cjs`);let n=require(`@stryke/path/join-paths`),r=require(`c12`),i=require(`defu`);i=e.__toESM(i);let a=require(`@stryke/type-checks/is-set-object`),o=require(`@stryke/type-checks/is-set-string`),s=require(`@stryke/string-format/kebab-case`),c=require(`@stryke/env/load-env`);async function l(e,n,r){let a=await(0,c.loadEnv)(r,n);if(e.additionalFiles&&e.additionalFiles?.length>0){let t=await Promise.all(e.additionalFiles.map(async e=>(0,c.loadEnvFile)(e,r)));for(let e of t)a=(0,i.default)(e,a)}return t.removeEnvPrefix(a)}async function u(e,t,a,o,s,c){let[u,d]=await Promise.all([l(e,a,t),(0,r.loadConfig)({cwd:t,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:(0,n.joinPaths)(o,`jiti`),moduleCache:!0}})]);return(0,i.default)(u,d.config,c)}function d(e,t){return(0,i.default)({APP_NAME:(0,s.kebabCase)(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),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:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:(0,o.isSetString)(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},(0,a.isSetObject)(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,r,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return(0,i.default)(d(e,process.env),n,r,a)}exports.loadEnv=f,exports.loadEnvFromContext=d;
@@ -1 +1 @@
1
- import{removeEnvPrefix as e}from"./source-file-env.mjs";import{isSetString as t}from"@stryke/type-checks/is-set-string";import{joinPaths as n}from"@stryke/path/join-paths";import{loadConfig as r}from"c12";import i from"defu";import{isSetObject as a}from"@stryke/type-checks/is-set-object";import{kebabCase as o}from"@stryke/string-format/kebab-case";import{loadEnv as s,loadEnvFile as c}from"@stryke/env/load-env";async function l(t,n,r){let a=await s(r,n);if(t.additionalFiles&&t.additionalFiles?.length>0){let e=await Promise.all(t.additionalFiles.map(async e=>c(e,r)));for(let t of e)a=i(t,a)}return e(a)}async function u(e,t,a,o,s,c){let[u,d]=await Promise.all([l(e,a,t),r({cwd:t,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:n(o,`jiti`),moduleCache:!0}})]);return i(u,d.config,c)}function d(e,n){return i({APP_NAME:o(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),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:`${o(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:t(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},a(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,t)=>(e[t.name]=n[t.name]??t.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,r,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return i(d(e,process.env),n,r,a)}export{f as loadEnv,d as loadEnvFromContext};
1
+ import{removeEnvPrefix as e}from"./source-file-env.mjs";import{joinPaths as t}from"@stryke/path/join-paths";import{loadConfig as n}from"c12";import r from"defu";import{isSetObject as i}from"@stryke/type-checks/is-set-object";import{isSetString as a}from"@stryke/type-checks/is-set-string";import{kebabCase as o}from"@stryke/string-format/kebab-case";import{loadEnv as s,loadEnvFile as c}from"@stryke/env/load-env";async function l(t,n,i){let a=await s(i,n);if(t.additionalFiles&&t.additionalFiles?.length>0){let e=await Promise.all(t.additionalFiles.map(async e=>c(e,i)));for(let t of e)a=r(t,a)}return e(a)}async function u(e,i,a,o,s,c){let[u,d]=await Promise.all([l(e,a,i),n({cwd:i,name:`storm`,envName:a,defaults:{NAME:s.name?.replace(`@${c.namespace}/`,``),MODE:a,ORG:c.organization},globalRc:!0,packageJson:!0,dotenv:!0,jitiOptions:{fsCache:t(o,`jiti`),moduleCache:!0}})]);return r(u,d.config,c)}function d(e,t){return r({APP_NAME:o(e.config.name||e.packageJson.name?.replace(`/${e.workspaceConfig.namespace}`,``)),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:`${o(e.config.name)}@${e.packageJson.version}`,DEFAULT_LOCALE:e.workspaceConfig.locale,DEFAULT_TIMEZONE:e.workspaceConfig.timezone,LOG_LEVEL:e.config.logLevel,ERROR_URL:e.workspaceConfig.error?.url,ORGANIZATION:a(e.workspaceConfig.organization)?e.workspaceConfig.organization:e.workspaceConfig.organization?.name,PLATFORM:e.config.build.platform,MODE:e.workspaceConfig.mode,DEBUG:e.workspaceConfig.mode===`development`,STACKTRACE:e.workspaceConfig.mode===`development`,ENVIRONMENT:e.environment},i(e?.env?.types?.env)?e.env.types.env?.getProperties().reduce((e,n)=>(e[n.name]=t[n.name]??n.getDefaultValue(),e),{}):{})}async function f(e,t){let[n,i,a]=await Promise.all([u(t,e.config.projectRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.workspaceConfig.workspaceRoot,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig),u(t,e.envPaths.config,e.config.mode,e.cachePath,e.packageJson,e.workspaceConfig)]);return r(d(e,process.env),n,i,a)}export{f as loadEnv,d as loadEnvFromContext};
@@ -1 +1 @@
1
- const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../deepkit/src/vendor/type.cjs`),n=require(`../deepkit/src/reflect-type.cjs`),r=require(`./persistence.cjs`);let i=require(`@stryke/path/is-parent-path`),a=require(`@stryke/path/join-paths`),o=require(`@stryke/string-format/title-case`);function s(e,n){return d(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}function c(e,n){return f(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}var l=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},u=class{};function d(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base environment configuration definition for the ${(0,o.titleCase)(e.config.name)} project.`,classType:l,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${(0,o.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${(0,o.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function f(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base secrets configuration definition for the ${(0,o.titleCase)(e.config.name)} project.`,classType:u,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${(0,o.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${(0,o.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function p(e,o,c){let l;o&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,i.isParentPath)(o,e.workspaceConfig.workspaceRoot)?o:(0,a.joinPaths)(e.workspaceConfig.workspaceRoot,o),name:c},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getEnvDefaultTypeDefinition(e));return s(e,[await r.readEnvTypeReflection(e,`env`),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}async function m(e,o,s){let l;o&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,i.isParentPath)(o,e.workspaceConfig.workspaceRoot)?o:(0,a.joinPaths)(e.workspaceConfig.workspaceRoot,o),name:s},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getSecretsDefaultTypeDefinition(e));return c(e,[await r.readSecretsReflection(e),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}exports.BaseEnv=l,exports.BaseSecrets=u,exports.createEnvReflection=d,exports.createSecretsReflection=f,exports.mergeEnvReflections=s,exports.mergeSecretsReflections=c,exports.reflectEnv=p,exports.reflectSecrets=m;
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../deepkit/src/vendor/type.cjs`),n=require(`../deepkit/src/reflect-type.cjs`),r=require(`./persistence.cjs`);let i=require(`@stryke/path/join-paths`),a=require(`@stryke/path/is-parent-path`),o=require(`@stryke/string-format/title-case`);function s(e,n){return d(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}function c(e,n){return f(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}var l=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},u=class{};function d(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base environment configuration definition for the ${(0,o.titleCase)(e.config.name)} project.`,classType:l,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${(0,o.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${(0,o.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function f(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base secrets configuration definition for the ${(0,o.titleCase)(e.config.name)} project.`,classType:u,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${(0,o.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${(0,o.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function p(e,o,c){let l;o&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,a.isParentPath)(o,e.workspaceConfig.workspaceRoot)?o:(0,i.joinPaths)(e.workspaceConfig.workspaceRoot,o),name:c},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getEnvDefaultTypeDefinition(e));return s(e,[await r.readEnvTypeReflection(e,`env`),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}async function m(e,o,s){let l;o&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,a.isParentPath)(o,e.workspaceConfig.workspaceRoot)?o:(0,i.joinPaths)(e.workspaceConfig.workspaceRoot,o),name:s},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getSecretsDefaultTypeDefinition(e));return c(e,[await r.readSecretsReflection(e),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}exports.BaseEnv=l,exports.BaseSecrets=u,exports.createEnvReflection=d,exports.createSecretsReflection=f,exports.mergeEnvReflections=s,exports.mergeSecretsReflections=c,exports.reflectEnv=p,exports.reflectSecrets=m;
@@ -1 +1 @@
1
- import{type_exports as e}from"../deepkit/src/vendor/type.mjs";import{reflectType as t}from"../deepkit/src/reflect-type.mjs";import{getEnvDefaultTypeDefinition as n,getSecretsDefaultTypeDefinition as r,readEnvTypeReflection as i,readSecretsReflection as a}from"./persistence.mjs";import{isParentPath as o}from"@stryke/path/is-parent-path";import{joinPaths as s}from"@stryke/path/join-paths";import{titleCase as c}from"@stryke/string-format/title-case";function l(t,n){return p(t,{type:(0,e.merge)(n.map(e=>e.type))})}function u(t,n){return m(t,{type:(0,e.merge)(n.map(e=>e.type))})}var d=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},f=class{};function p(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base environment configuration definition for the ${c(t.config.name)} project.`,classType:d,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${c(t.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${t.config.name?`${c(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function m(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base secrets configuration definition for the ${c(t.config.name)} project.`,classType:f,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${c(t.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${t.config.name?`${c(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function h(r,a,c){let u;a&&(u=(0,e.resolveClassType)(await t(r,{file:o(a,r.workspaceConfig.workspaceRoot)?a:s(r.workspaceConfig.workspaceRoot,a),name:c},{skipNodeModulesBundle:!0})));let d=await t(r,await n(r));return l(r,[await i(r,`env`),u,(0,e.resolveClassType)(d)].filter(Boolean))}async function g(n,i,c){let l;i&&(l=(0,e.resolveClassType)(await t(n,{file:o(i,n.workspaceConfig.workspaceRoot)?i:s(n.workspaceConfig.workspaceRoot,i),name:c},{skipNodeModulesBundle:!0})));let d=await t(n,await r(n));return u(n,[await a(n),l,(0,e.resolveClassType)(d)].filter(Boolean))}export{d as BaseEnv,f as BaseSecrets,p as createEnvReflection,m as createSecretsReflection,l as mergeEnvReflections,u as mergeSecretsReflections,h as reflectEnv,g as reflectSecrets};
1
+ import{type_exports as e}from"../deepkit/src/vendor/type.mjs";import{reflectType as t}from"../deepkit/src/reflect-type.mjs";import{getEnvDefaultTypeDefinition as n,getSecretsDefaultTypeDefinition as r,readEnvTypeReflection as i,readSecretsReflection as a}from"./persistence.mjs";import{joinPaths as o}from"@stryke/path/join-paths";import{isParentPath as s}from"@stryke/path/is-parent-path";import{titleCase as c}from"@stryke/string-format/title-case";function l(t,n){return p(t,{type:(0,e.merge)(n.map(e=>e.type))})}function u(t,n){return m(t,{type:(0,e.merge)(n.map(e=>e.type))})}var d=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},f=class{};function p(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base environment configuration definition for the ${c(t.config.name)} project.`,classType:d,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${c(t.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${t.config.name?`${c(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function m(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base secrets configuration definition for the ${c(t.config.name)} project.`,classType:f,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${c(t.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${t.config.name?`${c(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function h(r,a,c){let u;a&&(u=(0,e.resolveClassType)(await t(r,{file:s(a,r.workspaceConfig.workspaceRoot)?a:o(r.workspaceConfig.workspaceRoot,a),name:c},{skipNodeModulesBundle:!0})));let d=await t(r,await n(r));return l(r,[await i(r,`env`),u,(0,e.resolveClassType)(d)].filter(Boolean))}async function g(n,i,c){let l;i&&(l=(0,e.resolveClassType)(await t(n,{file:s(i,n.workspaceConfig.workspaceRoot)?i:o(n.workspaceConfig.workspaceRoot,i),name:c},{skipNodeModulesBundle:!0})));let d=await t(n,await r(n));return u(n,[await a(n),l,(0,e.resolveClassType)(d)].filter(Boolean))}export{d as BaseEnv,f as BaseSecrets,p as createEnvReflection,m as createSecretsReflection,l as mergeEnvReflections,u as mergeSecretsReflections,h as reflectEnv,g as reflectSecrets};
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./deepkit/src/vendor/type.cjs`),n=require(`./plugin-alloy/src/index.cjs`),r=require(`./plugin-automd/src/index.cjs`),i=require(`./plugin-babel/src/index.cjs`),a=require(`./helpers/reflect.cjs`),o=require(`./helpers/persistence.cjs`),s=require(`./babel/plugin.cjs`),c=require(`./helpers/source-file-env.cjs`),l=require(`./helpers/load.cjs`),u=require(`./helpers/create-reflection-resource.cjs`),d=require(`./components/env.cjs`),f=require(`./helpers/automd-generator.cjs`);require(`./babel/index.cjs`);const p=require(`./components/docs.cjs`);require(`./components/index.cjs`);const m=require(`./helpers/template-helpers.cjs`);require(`./helpers/index.cjs`);let h=require(`@alloy-js/core/jsx-runtime`),g=require(`@storm-software/config-tools/types`),_=require(`@stryke/path/is-parent-path`),v=require(`@stryke/convert/to-array`),y=require(`defu`);y=e.__toESM(y);let b=require(`@stryke/string-format/title-case`),x=require(`@stryke/convert/parse-type-definition`),S=require(`@stryke/env/types`),C=require(`@stryke/fs/exists`),w=require(`@stryke/fs/helpers`),T=require(`@stryke/path/join`),E=require(`@stryke/string-format/constant-case`);const D=(e={})=>[n.default(e.alloy),i.default(e.babel),{name:`env`,async config(){this.log(g.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");let t={env:(0,y.default)(e,{types:{},prefix:[]}),transform:{babel:{plugins:[s.envBabelPlugin]}}};if(t.env.types)t.env.types=(0,x.parseTypeDefinition)(t.env.types);else{this.log(g.LogLevelLabel.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected.");let e=await o.getEnvDefaultTypeDefinition(this);t.env.types=(0,x.parseTypeDefinition)(`${e.file}#${e.name}`)}if(t.env.secrets)t.env.secrets=(0,x.parseTypeDefinition)(t.env.secrets);else{let e=await o.getSecretsDefaultTypeDefinition(this);t.env.secrets=(0,x.parseTypeDefinition)(`${e.file}#${e.name}`)}return t.env.prefix=(0,v.toArray)(t.env.prefix??[]).reduce((e,t)=>{let n=(0,E.constantCase)(t);return e.includes(n)||e.push(n),e},[...S.ENV_PREFIXES,`POWERLINES_`]),t.env.prefix=t.env.prefix.reduce((e,t)=>(e.includes(t.replace(/_$/g,``))||e.push(t.replace(/_$/g,``)),e),[]),t},async configResolved(){if(this.log(g.LogLevelLabel.TRACE,`Environment plugin configuration has been resolved for the Powerlines project.`),this.config.env.inject??=this.config.projectType===`application`,this.env=(0,y.default)({parsed:await l.loadEnv(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!==`prepare`&&this.persistedMeta?.checksum===this.meta.checksum&&(0,C.existsSync)(o.getEnvTypeReflectionsPath(this,`env`)))this.log(g.LogLevelLabel.TRACE,`Skipping reflection initialization as the meta checksum has not changed.`),this.env.types.env=await o.readEnvTypeReflection(this,`env`),(0,C.existsSync)(o.getEnvReflectionsPath(this,`env`))&&(this.env.used.env=await o.readEnvReflection(this)),(0,C.existsSync)(o.getEnvTypeReflectionsPath(this,`secrets`))&&(this.env.types.secrets=await o.readEnvTypeReflection(this,`secrets`)),(0,C.existsSync)(o.getEnvReflectionsPath(this,`secrets`))&&(this.env.used.secrets=await o.readSecretsReflection(this));else{if(this.env.types.env=await a.reflectEnv(this,this.config.env.types?.file?(0,_.isParentPath)(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:(0,T.joinPaths)(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw Error(`Failed to find the environment configuration type reflection in the context.`);if(await o.writeEnvTypeReflection(this,this.env.types.env,`env`),this.env.types.secrets=await a.reflectSecrets(this,this.config.env.secrets?.file?(0,_.isParentPath)(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:(0,T.joinPaths)(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw Error(`Failed to find the secrets configuration type reflection in the context.`);await o.writeEnvTypeReflection(this,this.env.types.secrets,`secrets`),this.log(g.LogLevelLabel.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);let e=this.env.types.env.getProperties().filter(e=>e.getAlias().length>0);Object.entries(await l.loadEnv(this,this.config.env)).forEach(([t,n])=>{let r=this.config.env.prefix.reduce((e,n)=>t.replace(/_$/g,``).startsWith(n)?t.replace(/_$/g,``).slice(n.length):e,t),i=e.find(e=>e?.getAlias().reverse().includes(r));(this.env.types.env?.hasProperty(r)||i)&&this.env.types.env.getProperty(r).setDefaultValue(n)}),this.env.used.env=new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.env),await o.writeEnvReflection(this,this.env.used.env,`env`),this.env.types.secrets&&(await o.writeEnvTypeReflection(this,this.env.types.secrets,`secrets`),this.env.used.secrets=new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.secrets),await o.writeEnvReflection(this,this.env.used.secrets,`secrets`))}},async prepare(){let e=this;return this.log(g.LogLevelLabel.TRACE,`Preparing the Environment runtime artifacts for the Powerlines project.`),this.render((0,h.createComponent)(d.EnvBuiltin,{get defaultConfig(){return e.config.env.defaultConfig}}))},async docs(){this.log(g.LogLevelLabel.TRACE,`Writing Environment documentation for the Powerlines project artifacts.`);let e=(0,T.joinPaths)(this.config.projectRoot,`docs`,`generated`);(0,C.existsSync)(e)||await(0,w.createDirectory)(e);let n=await o.readEnvTypeReflection(this,`env`),r=(0,T.joinPaths)(e,`env.md`);this.log(g.LogLevelLabel.TRACE,`Documenting environment variables configuration in "${r}"`),await this.fs.write(r,`<!-- Generated by ${(0,b.titleCase)(this.config.framework)||`Powerlines`} -->
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./deepkit/src/vendor/type.cjs`),n=require(`./plugin-alloy/src/index.cjs`),r=require(`./plugin-automd/src/index.cjs`),i=require(`./plugin-babel/src/index.cjs`),a=require(`./helpers/reflect.cjs`),o=require(`./helpers/persistence.cjs`),s=require(`./babel/plugin.cjs`),c=require(`./helpers/source-file-env.cjs`),l=require(`./helpers/load.cjs`),u=require(`./helpers/create-reflection-resource.cjs`),d=require(`./components/env.cjs`),f=require(`./helpers/automd-generator.cjs`);require(`./babel/index.cjs`);const p=require(`./components/docs.cjs`);require(`./components/index.cjs`);const m=require(`./helpers/template-helpers.cjs`);require(`./helpers/index.cjs`);let h=require(`@alloy-js/core/jsx-runtime`),g=require(`@stryke/convert/to-array`),_=require(`defu`);_=e.__toESM(_);let v=require(`@storm-software/config-tools/types`),y=require(`@stryke/path/is-parent-path`),b=require(`@stryke/string-format/title-case`),x=require(`@stryke/convert/parse-type-definition`),S=require(`@stryke/env/types`),C=require(`@stryke/fs/exists`),w=require(`@stryke/fs/helpers`),T=require(`@stryke/path/join`),E=require(`@stryke/string-format/constant-case`);const D=(e={})=>[n.default(e.alloy),i.default(e.babel),{name:`env`,async config(){this.log(v.LogLevelLabel.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");let t={env:(0,_.default)(e,{types:{},prefix:[]}),transform:{babel:{plugins:[s.envBabelPlugin]}}};if(t.env.types)t.env.types=(0,x.parseTypeDefinition)(t.env.types);else{this.log(v.LogLevelLabel.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected.");let e=await o.getEnvDefaultTypeDefinition(this);t.env.types=(0,x.parseTypeDefinition)(`${e.file}#${e.name}`)}if(t.env.secrets)t.env.secrets=(0,x.parseTypeDefinition)(t.env.secrets);else{let e=await o.getSecretsDefaultTypeDefinition(this);t.env.secrets=(0,x.parseTypeDefinition)(`${e.file}#${e.name}`)}return t.env.prefix=(0,g.toArray)(t.env.prefix??[]).reduce((e,t)=>{let n=(0,E.constantCase)(t);return e.includes(n)||e.push(n),e},[...S.ENV_PREFIXES,`POWERLINES_`]),t.env.prefix=t.env.prefix.reduce((e,t)=>(e.includes(t.replace(/_$/g,``))||e.push(t.replace(/_$/g,``)),e),[]),t},async configResolved(){if(this.log(v.LogLevelLabel.TRACE,`Environment plugin configuration has been resolved for the Powerlines project.`),this.config.env.inject??=this.config.projectType===`application`,this.env=(0,_.default)({parsed:await l.loadEnv(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!==`prepare`&&this.persistedMeta?.checksum===this.meta.checksum&&(0,C.existsSync)(o.getEnvTypeReflectionsPath(this,`env`)))this.log(v.LogLevelLabel.TRACE,`Skipping reflection initialization as the meta checksum has not changed.`),this.env.types.env=await o.readEnvTypeReflection(this,`env`),(0,C.existsSync)(o.getEnvReflectionsPath(this,`env`))&&(this.env.used.env=await o.readEnvReflection(this)),(0,C.existsSync)(o.getEnvTypeReflectionsPath(this,`secrets`))&&(this.env.types.secrets=await o.readEnvTypeReflection(this,`secrets`)),(0,C.existsSync)(o.getEnvReflectionsPath(this,`secrets`))&&(this.env.used.secrets=await o.readSecretsReflection(this));else{if(this.env.types.env=await a.reflectEnv(this,this.config.env.types?.file?(0,y.isParentPath)(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:(0,T.joinPaths)(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw Error(`Failed to find the environment configuration type reflection in the context.`);if(await o.writeEnvTypeReflection(this,this.env.types.env,`env`),this.env.types.secrets=await a.reflectSecrets(this,this.config.env.secrets?.file?(0,y.isParentPath)(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:(0,T.joinPaths)(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw Error(`Failed to find the secrets configuration type reflection in the context.`);await o.writeEnvTypeReflection(this,this.env.types.secrets,`secrets`),this.log(v.LogLevelLabel.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);let e=this.env.types.env.getProperties().filter(e=>e.getAlias().length>0);Object.entries(await l.loadEnv(this,this.config.env)).forEach(([t,n])=>{let r=this.config.env.prefix.reduce((e,n)=>t.replace(/_$/g,``).startsWith(n)?t.replace(/_$/g,``).slice(n.length):e,t),i=e.find(e=>e?.getAlias().reverse().includes(r));(this.env.types.env?.hasProperty(r)||i)&&this.env.types.env.getProperty(r).setDefaultValue(n)}),this.env.used.env=new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.env),await o.writeEnvReflection(this,this.env.used.env,`env`),this.env.types.secrets&&(await o.writeEnvTypeReflection(this,this.env.types.secrets,`secrets`),this.env.used.secrets=new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.secrets),await o.writeEnvReflection(this,this.env.used.secrets,`secrets`))}},async prepare(){let e=this;return this.log(v.LogLevelLabel.TRACE,`Preparing the Environment runtime artifacts for the Powerlines project.`),this.render((0,h.createComponent)(d.EnvBuiltin,{get defaultConfig(){return e.config.env.defaultConfig}}))},async docs(){this.log(v.LogLevelLabel.TRACE,`Writing Environment documentation for the Powerlines project artifacts.`);let e=(0,T.joinPaths)(this.config.projectRoot,`docs`,`generated`);(0,C.existsSync)(e)||await(0,w.createDirectory)(e);let n=await o.readEnvTypeReflection(this,`env`),r=(0,T.joinPaths)(e,`env.md`);this.log(v.LogLevelLabel.TRACE,`Documenting environment variables configuration in "${r}"`),await this.fs.write(r,`<!-- Generated by ${(0,b.titleCase)(this.config.framework)||`Powerlines`} -->
2
2
 
3
3
  Below is a list of environment variables used by the [${this.packageJson.name}](https://www.npmjs.com/package/${this.packageJson.name}) package. These values can be updated in the \`.env\` file in the root of the project. The variables in the list below are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.
4
4
 
@@ -7,4 +7,4 @@ Below is a list of environment variables used by the [${this.packageJson.name}](
7
7
  ${n.getProperties().filter(e=>e.getNameAsString()!==`__POWERLINES_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(e=>`| ${e.getNameAsString().trim()} | ${(e.getDescription()?.replaceAll(`\r`,``)?.replaceAll(`
8
8
  `,``)??``).trim()} | ${(0,t.type_exports.stringifyType)(e.getType()).trim().replaceAll(` | `,`, or `)} | ${e.hasDefault()?String(e.getDefaultValue())?.includes(`"`)?e.getDefaultValue():`\`${e.getDefaultValue()}\``:``} | ${e.isValueRequired()?``:`✔`} |`).join(`
9
9
  `)}
10
- `)},async buildEnd(){let e=o.getEnvReflectionsPath(this,`env`);this.log(g.LogLevelLabel.TRACE,`Writing env reflection types to ${e}.`),await o.writeEnvReflection(this,this.env.used.env,`env`)}},{name:`env:automd-generator`,config(){return{automd:(0,y.default)(e.automd??{},{generators:{env:f.env(this)}})}}},{name:`env:vite`,vite:{configResolved(){return{envPrefix:this.config?.env?.prefix}}}},r.default(e.automd)];var O=D;exports.BaseEnv=a.BaseEnv,exports.BaseSecrets=a.BaseSecrets,exports.EnvBuiltin=d.EnvBuiltin,exports.EnvDocs=p.EnvDocs,exports.EnvTypeDefinition=d.EnvTypeDefinition,exports.createEnvReflection=a.createEnvReflection,exports.createReflectionResource=u.createReflectionResource,exports.createSecretsReflection=a.createSecretsReflection,exports.createTemplateReflection=m.createTemplateReflection,exports.default=O,exports.envBabelPlugin=s.envBabelPlugin,exports.formatEnvField=c.formatEnvField,exports.getEnvDefaultTypeDefinition=o.getEnvDefaultTypeDefinition,exports.getEnvReflectionsPath=o.getEnvReflectionsPath,exports.getEnvTypeReflectionsPath=o.getEnvTypeReflectionsPath,exports.getSecretsDefaultTypeDefinition=o.getSecretsDefaultTypeDefinition,exports.loadEnv=l.loadEnv,exports.loadEnvFromContext=l.loadEnvFromContext,exports.mergeEnvReflections=a.mergeEnvReflections,exports.mergeSecretsReflections=a.mergeSecretsReflections,exports.plugin=D,exports.readEnvReflection=o.readEnvReflection,exports.readEnvTypeReflection=o.readEnvTypeReflection,exports.readSecretsReflection=o.readSecretsReflection,exports.reflectEnv=a.reflectEnv,exports.reflectSecrets=a.reflectSecrets,exports.removeEnvPrefix=c.removeEnvPrefix,exports.resolveRuntimeTypeFile=o.resolveRuntimeTypeFile,exports.writeEnvReflection=o.writeEnvReflection,exports.writeEnvReflectionSync=o.writeEnvReflectionSync,exports.writeEnvTypeReflection=o.writeEnvTypeReflection;
10
+ `)},async buildEnd(){let e=o.getEnvReflectionsPath(this,`env`);this.log(v.LogLevelLabel.TRACE,`Writing env reflection types to ${e}.`),await o.writeEnvReflection(this,this.env.used.env,`env`)}},{name:`env:automd-generator`,config(){return{automd:(0,_.default)(e.automd??{},{generators:{env:f.env(this)}})}}},{name:`env:vite`,vite:{configResolved(){return{envPrefix:this.config?.env?.prefix}}}},r.default(e.automd)];var O=D;exports.BaseEnv=a.BaseEnv,exports.BaseSecrets=a.BaseSecrets,exports.EnvBuiltin=d.EnvBuiltin,exports.EnvDocs=p.EnvDocs,exports.EnvTypeDefinition=d.EnvTypeDefinition,exports.createEnvReflection=a.createEnvReflection,exports.createReflectionResource=u.createReflectionResource,exports.createSecretsReflection=a.createSecretsReflection,exports.createTemplateReflection=m.createTemplateReflection,exports.default=O,exports.envBabelPlugin=s.envBabelPlugin,exports.formatEnvField=c.formatEnvField,exports.getEnvDefaultTypeDefinition=o.getEnvDefaultTypeDefinition,exports.getEnvReflectionsPath=o.getEnvReflectionsPath,exports.getEnvTypeReflectionsPath=o.getEnvTypeReflectionsPath,exports.getSecretsDefaultTypeDefinition=o.getSecretsDefaultTypeDefinition,exports.loadEnv=l.loadEnv,exports.loadEnvFromContext=l.loadEnvFromContext,exports.mergeEnvReflections=a.mergeEnvReflections,exports.mergeSecretsReflections=a.mergeSecretsReflections,exports.plugin=D,exports.readEnvReflection=o.readEnvReflection,exports.readEnvTypeReflection=o.readEnvTypeReflection,exports.readSecretsReflection=o.readSecretsReflection,exports.reflectEnv=a.reflectEnv,exports.reflectSecrets=a.reflectSecrets,exports.removeEnvPrefix=c.removeEnvPrefix,exports.resolveRuntimeTypeFile=o.resolveRuntimeTypeFile,exports.writeEnvReflection=o.writeEnvReflection,exports.writeEnvReflectionSync=o.writeEnvReflectionSync,exports.writeEnvTypeReflection=o.writeEnvTypeReflection;
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{type_exports as e}from"./deepkit/src/vendor/type.mjs";import t from"./plugin-alloy/src/index.mjs";import n from"./plugin-automd/src/index.mjs";import r from"./plugin-babel/src/index.mjs";import{BaseEnv as i,BaseSecrets as a,createEnvReflection as o,createSecretsReflection as s,mergeEnvReflections as c,mergeSecretsReflections as l,reflectEnv as u,reflectSecrets as d}from"./helpers/reflect.mjs";import{getEnvDefaultTypeDefinition as f,getEnvReflectionsPath as p,getEnvTypeReflectionsPath as m,getSecretsDefaultTypeDefinition as h,readEnvReflection as g,readEnvTypeReflection as _,readSecretsReflection as v,resolveRuntimeTypeFile as y,writeEnvReflection as b,writeEnvReflectionSync as x,writeEnvTypeReflection as S}from"./helpers/persistence.mjs";import{envBabelPlugin as C}from"./babel/plugin.mjs";import{formatEnvField as w,removeEnvPrefix as T}from"./helpers/source-file-env.mjs";import{loadEnv as E,loadEnvFromContext as D}from"./helpers/load.mjs";import{createReflectionResource as O}from"./helpers/create-reflection-resource.mjs";import{EnvBuiltin as k,EnvTypeDefinition as A}from"./components/env.mjs";import{env as j}from"./helpers/automd-generator.mjs";import"./babel/index.mjs";import{EnvDocs as M}from"./components/docs.mjs";import"./components/index.mjs";import{createTemplateReflection as N}from"./helpers/template-helpers.mjs";import"./helpers/index.mjs";import{createComponent as P}from"@alloy-js/core/jsx-runtime";import{LogLevelLabel as F}from"@storm-software/config-tools/types";import{isParentPath as I}from"@stryke/path/is-parent-path";import{toArray as L}from"@stryke/convert/to-array";import R from"defu";import{titleCase as z}from"@stryke/string-format/title-case";import{parseTypeDefinition as B}from"@stryke/convert/parse-type-definition";import{ENV_PREFIXES as V}from"@stryke/env/types";import{existsSync as H}from"@stryke/fs/exists";import{createDirectory as U}from"@stryke/fs/helpers";import{joinPaths as W}from"@stryke/path/join";import{constantCase as G}from"@stryke/string-format/constant-case";const K=(i={})=>[t(i.alloy),r(i.babel),{name:`env`,async config(){this.log(F.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");let e={env:R(i,{types:{},prefix:[]}),transform:{babel:{plugins:[C]}}};if(e.env.types)e.env.types=B(e.env.types);else{this.log(F.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected.");let t=await f(this);e.env.types=B(`${t.file}#${t.name}`)}if(e.env.secrets)e.env.secrets=B(e.env.secrets);else{let t=await h(this);e.env.secrets=B(`${t.file}#${t.name}`)}return e.env.prefix=L(e.env.prefix??[]).reduce((e,t)=>{let n=G(t);return e.includes(n)||e.push(n),e},[...V,`POWERLINES_`]),e.env.prefix=e.env.prefix.reduce((e,t)=>(e.includes(t.replace(/_$/g,``))||e.push(t.replace(/_$/g,``)),e),[]),e},async configResolved(){if(this.log(F.TRACE,`Environment plugin configuration has been resolved for the Powerlines project.`),this.config.env.inject??=this.config.projectType===`application`,this.env=R({parsed:await E(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!==`prepare`&&this.persistedMeta?.checksum===this.meta.checksum&&H(m(this,`env`)))this.log(F.TRACE,`Skipping reflection initialization as the meta checksum has not changed.`),this.env.types.env=await _(this,`env`),H(p(this,`env`))&&(this.env.used.env=await g(this)),H(m(this,`secrets`))&&(this.env.types.secrets=await _(this,`secrets`)),H(p(this,`secrets`))&&(this.env.used.secrets=await v(this));else{if(this.env.types.env=await u(this,this.config.env.types?.file?I(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:W(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw Error(`Failed to find the environment configuration type reflection in the context.`);if(await S(this,this.env.types.env,`env`),this.env.types.secrets=await d(this,this.config.env.secrets?.file?I(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:W(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw Error(`Failed to find the secrets configuration type reflection in the context.`);await S(this,this.env.types.secrets,`secrets`),this.log(F.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);let t=this.env.types.env.getProperties().filter(e=>e.getAlias().length>0);Object.entries(await E(this,this.config.env)).forEach(([e,n])=>{let r=this.config.env.prefix.reduce((t,n)=>e.replace(/_$/g,``).startsWith(n)?e.replace(/_$/g,``).slice(n.length):t,e),i=t.find(e=>e?.getAlias().reverse().includes(r));(this.env.types.env?.hasProperty(r)||i)&&this.env.types.env.getProperty(r).setDefaultValue(n)}),this.env.used.env=new e.ReflectionClass({kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.env),await b(this,this.env.used.env,`env`),this.env.types.secrets&&(await S(this,this.env.types.secrets,`secrets`),this.env.used.secrets=new e.ReflectionClass({kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.secrets),await b(this,this.env.used.secrets,`secrets`))}},async prepare(){let e=this;return this.log(F.TRACE,`Preparing the Environment runtime artifacts for the Powerlines project.`),this.render(P(k,{get defaultConfig(){return e.config.env.defaultConfig}}))},async docs(){this.log(F.TRACE,`Writing Environment documentation for the Powerlines project artifacts.`);let t=W(this.config.projectRoot,`docs`,`generated`);H(t)||await U(t);let n=await _(this,`env`),r=W(t,`env.md`);this.log(F.TRACE,`Documenting environment variables configuration in "${r}"`),await this.fs.write(r,`<!-- Generated by ${z(this.config.framework)||`Powerlines`} -->
1
+ import{type_exports as e}from"./deepkit/src/vendor/type.mjs";import t from"./plugin-alloy/src/index.mjs";import n from"./plugin-automd/src/index.mjs";import r from"./plugin-babel/src/index.mjs";import{BaseEnv as i,BaseSecrets as a,createEnvReflection as o,createSecretsReflection as s,mergeEnvReflections as c,mergeSecretsReflections as l,reflectEnv as u,reflectSecrets as d}from"./helpers/reflect.mjs";import{getEnvDefaultTypeDefinition as f,getEnvReflectionsPath as p,getEnvTypeReflectionsPath as m,getSecretsDefaultTypeDefinition as h,readEnvReflection as g,readEnvTypeReflection as _,readSecretsReflection as v,resolveRuntimeTypeFile as y,writeEnvReflection as b,writeEnvReflectionSync as x,writeEnvTypeReflection as S}from"./helpers/persistence.mjs";import{envBabelPlugin as C}from"./babel/plugin.mjs";import{formatEnvField as w,removeEnvPrefix as T}from"./helpers/source-file-env.mjs";import{loadEnv as E,loadEnvFromContext as D}from"./helpers/load.mjs";import{createReflectionResource as O}from"./helpers/create-reflection-resource.mjs";import{EnvBuiltin as k,EnvTypeDefinition as A}from"./components/env.mjs";import{env as j}from"./helpers/automd-generator.mjs";import"./babel/index.mjs";import{EnvDocs as M}from"./components/docs.mjs";import"./components/index.mjs";import{createTemplateReflection as N}from"./helpers/template-helpers.mjs";import"./helpers/index.mjs";import{createComponent as P}from"@alloy-js/core/jsx-runtime";import{toArray as F}from"@stryke/convert/to-array";import I from"defu";import{LogLevelLabel as L}from"@storm-software/config-tools/types";import{isParentPath as R}from"@stryke/path/is-parent-path";import{titleCase as z}from"@stryke/string-format/title-case";import{parseTypeDefinition as B}from"@stryke/convert/parse-type-definition";import{ENV_PREFIXES as V}from"@stryke/env/types";import{existsSync as H}from"@stryke/fs/exists";import{createDirectory as U}from"@stryke/fs/helpers";import{joinPaths as W}from"@stryke/path/join";import{constantCase as G}from"@stryke/string-format/constant-case";const K=(i={})=>[t(i.alloy),r(i.babel),{name:`env`,async config(){this.log(L.TRACE,"Providing default configuration for the Powerlines `env` build plugin.");let e={env:I(i,{types:{},prefix:[]}),transform:{babel:{plugins:[C]}}};if(e.env.types)e.env.types=B(e.env.types);else{this.log(L.WARN,"The `env.types` configuration parameter was not provided. Please ensure this is expected.");let t=await f(this);e.env.types=B(`${t.file}#${t.name}`)}if(e.env.secrets)e.env.secrets=B(e.env.secrets);else{let t=await h(this);e.env.secrets=B(`${t.file}#${t.name}`)}return e.env.prefix=F(e.env.prefix??[]).reduce((e,t)=>{let n=G(t);return e.includes(n)||e.push(n),e},[...V,`POWERLINES_`]),e.env.prefix=e.env.prefix.reduce((e,t)=>(e.includes(t.replace(/_$/g,``))||e.push(t.replace(/_$/g,``)),e),[]),e},async configResolved(){if(this.log(L.TRACE,`Environment plugin configuration has been resolved for the Powerlines project.`),this.config.env.inject??=this.config.projectType===`application`,this.env=I({parsed:await E(this,this.config.env)},this.env??{},{types:{env:{}},used:{env:{},secrets:{}},parsed:{},injected:{}}),this.config.command!==`prepare`&&this.persistedMeta?.checksum===this.meta.checksum&&H(m(this,`env`)))this.log(L.TRACE,`Skipping reflection initialization as the meta checksum has not changed.`),this.env.types.env=await _(this,`env`),H(p(this,`env`))&&(this.env.used.env=await g(this)),H(m(this,`secrets`))&&(this.env.types.secrets=await _(this,`secrets`)),H(p(this,`secrets`))&&(this.env.used.secrets=await v(this));else{if(this.env.types.env=await u(this,this.config.env.types?.file?R(this.config.env.types?.file,this.workspaceConfig.workspaceRoot)?this.config.env.types?.file:W(this.config.projectRoot,this.config.env.types?.file):void 0,this.config.env.types?.name),!this.env.types.env)throw Error(`Failed to find the environment configuration type reflection in the context.`);if(await S(this,this.env.types.env,`env`),this.env.types.secrets=await d(this,this.config.env.secrets?.file?R(this.config.env.secrets?.file,this.workspaceConfig.workspaceRoot)?this.config.env.secrets?.file:W(this.config.projectRoot,this.config.env.secrets?.file):void 0,this.config.env.secrets?.name),!this.env.types.secrets)throw Error(`Failed to find the secrets configuration type reflection in the context.`);await S(this,this.env.types.secrets,`secrets`),this.log(L.TRACE,`Resolved ${this.env.types.env.getProperties().length??0} environment configuration parameters and ${this.env.types.secrets?.getProperties().length??0} secret configuration parameters`);let t=this.env.types.env.getProperties().filter(e=>e.getAlias().length>0);Object.entries(await E(this,this.config.env)).forEach(([e,n])=>{let r=this.config.env.prefix.reduce((t,n)=>e.replace(/_$/g,``).startsWith(n)?e.replace(/_$/g,``).slice(n.length):t,e),i=t.find(e=>e?.getAlias().reverse().includes(r));(this.env.types.env?.hasProperty(r)||i)&&this.env.types.env.getProperty(r).setDefaultValue(n)}),this.env.used.env=new e.ReflectionClass({kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`An object containing the environment configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.env),await b(this,this.env.used.env,`env`),this.env.types.secrets&&(await S(this,this.env.types.secrets,`secrets`),this.env.used.secrets=new e.ReflectionClass({kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`An object containing the secret configuration parameters used by the ${this.config.name?`${this.config.name} application`:`application`}.`,types:[]},this.env.types.secrets),await b(this,this.env.used.secrets,`secrets`))}},async prepare(){let e=this;return this.log(L.TRACE,`Preparing the Environment runtime artifacts for the Powerlines project.`),this.render(P(k,{get defaultConfig(){return e.config.env.defaultConfig}}))},async docs(){this.log(L.TRACE,`Writing Environment documentation for the Powerlines project artifacts.`);let t=W(this.config.projectRoot,`docs`,`generated`);H(t)||await U(t);let n=await _(this,`env`),r=W(t,`env.md`);this.log(L.TRACE,`Documenting environment variables configuration in "${r}"`),await this.fs.write(r,`<!-- Generated by ${z(this.config.framework)||`Powerlines`} -->
2
2
 
3
3
  Below is a list of environment variables used by the [${this.packageJson.name}](https://www.npmjs.com/package/${this.packageJson.name}) package. These values can be updated in the \`.env\` file in the root of the project. The variables in the list below are used as configuration parameters to drive the processing of the application. The data contained in these variables are **not** considered sensitive or confidential. Any values provided in these variables will be available in plain text to the public.
4
4
 
@@ -7,4 +7,4 @@ Below is a list of environment variables used by the [${this.packageJson.name}](
7
7
  ${n.getProperties().filter(e=>e.getNameAsString()!==`__POWERLINES_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(t=>`| ${t.getNameAsString().trim()} | ${(t.getDescription()?.replaceAll(`\r`,``)?.replaceAll(`
8
8
  `,``)??``).trim()} | ${(0,e.stringifyType)(t.getType()).trim().replaceAll(` | `,`, or `)} | ${t.hasDefault()?String(t.getDefaultValue())?.includes(`"`)?t.getDefaultValue():`\`${t.getDefaultValue()}\``:``} | ${t.isValueRequired()?``:`✔`} |`).join(`
9
9
  `)}
10
- `)},async buildEnd(){let e=p(this,`env`);this.log(F.TRACE,`Writing env reflection types to ${e}.`),await b(this,this.env.used.env,`env`)}},{name:`env:automd-generator`,config(){return{automd:R(i.automd??{},{generators:{env:j(this)}})}}},{name:`env:vite`,vite:{configResolved(){return{envPrefix:this.config?.env?.prefix}}}},n(i.automd)];var q=K;export{i as BaseEnv,a as BaseSecrets,k as EnvBuiltin,M as EnvDocs,A as EnvTypeDefinition,o as createEnvReflection,O as createReflectionResource,s as createSecretsReflection,N as createTemplateReflection,q as default,C as envBabelPlugin,w as formatEnvField,f as getEnvDefaultTypeDefinition,p as getEnvReflectionsPath,m as getEnvTypeReflectionsPath,h as getSecretsDefaultTypeDefinition,E as loadEnv,D as loadEnvFromContext,c as mergeEnvReflections,l as mergeSecretsReflections,K as plugin,g as readEnvReflection,_ as readEnvTypeReflection,v as readSecretsReflection,u as reflectEnv,d as reflectSecrets,T as removeEnvPrefix,y as resolveRuntimeTypeFile,b as writeEnvReflection,x as writeEnvReflectionSync,S as writeEnvTypeReflection};
10
+ `)},async buildEnd(){let e=p(this,`env`);this.log(L.TRACE,`Writing env reflection types to ${e}.`),await b(this,this.env.used.env,`env`)}},{name:`env:automd-generator`,config(){return{automd:I(i.automd??{},{generators:{env:j(this)}})}}},{name:`env:vite`,vite:{configResolved(){return{envPrefix:this.config?.env?.prefix}}}},n(i.automd)];var q=K;export{i as BaseEnv,a as BaseSecrets,k as EnvBuiltin,M as EnvDocs,A as EnvTypeDefinition,o as createEnvReflection,O as createReflectionResource,s as createSecretsReflection,N as createTemplateReflection,q as default,C as envBabelPlugin,w as formatEnvField,f as getEnvDefaultTypeDefinition,p as getEnvReflectionsPath,m as getEnvTypeReflectionsPath,h as getSecretsDefaultTypeDefinition,E as loadEnv,D as loadEnvFromContext,c as mergeEnvReflections,l as mergeSecretsReflections,K as plugin,g as readEnvReflection,_ as readEnvTypeReflection,v as readSecretsReflection,u as reflectEnv,d as reflectSecrets,T as removeEnvPrefix,y as resolveRuntimeTypeFile,b as writeEnvReflection,x as writeEnvReflectionSync,S as writeEnvTypeReflection};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../vendor/index.cjs`),n=require(`../contexts/context.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@stryke/path/replace`);function a(e){let[{children:a,context:o,basePath:s},c]=(0,t.vendor_exports.splitProps)(e,[`children`,`context`,`basePath`]),l=(0,t.vendor_exports.ref)(o),u=(0,t.vendor_exports.computed)(()=>s?(0,i.replacePath)(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return(0,r.createComponent)(t.vendor_exports.Output,(0,r.mergeProps)(c,{get basePath(){return u.value},get children(){return(0,r.createComponent)(n.PowerlinesContext.Provider,{value:{ref:l},get children(){return(0,r.createComponent)(t.vendor_exports.Show,{get when(){return!!l.value},children:a})}})}}))}exports.Output=a;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../contexts/context.cjs`);let n=require(`@alloy-js/core/jsx-runtime`),r=require(`@alloy-js/core`),i=require(`@stryke/path/replace`);function a(e){let[{children:a,context:o,meta:s,basePath:c},l]=(0,r.splitProps)(e,[`children`,`context`,`meta`,`basePath`]),u=(0,r.ref)(o),d=(0,r.ref)(s??{}),f=(0,r.computed)(()=>c?(0,i.replacePath)(c,u.value.workspaceConfig.workspaceRoot):u.value.workspaceConfig.workspaceRoot);return(0,n.createComponent)(r.Output,(0,n.mergeProps)(l,{get basePath(){return f.value},get children(){return(0,n.createComponent)(t.PowerlinesContext.Provider,{value:{ref:u,meta:d},get children(){return(0,n.createComponent)(r.Show,{get when(){return!!u.value},children:a})}})}}))}exports.Output=a;
@@ -1 +1 @@
1
- import{vendor_exports as e}from"../../vendor/index.mjs";import{PowerlinesContext as t}from"../contexts/context.mjs";import{createComponent as n,mergeProps as r}from"@alloy-js/core/jsx-runtime";import{replacePath as i}from"@stryke/path/replace";function a(a){let[{children:o,context:s,basePath:c},l]=(0,e.splitProps)(a,[`children`,`context`,`basePath`]),u=(0,e.ref)(s),d=(0,e.computed)(()=>c?i(c,u.value.workspaceConfig.workspaceRoot):u.value.workspaceConfig.workspaceRoot);return n(e.Output,r(l,{get basePath(){return d.value},get children(){return n(t.Provider,{value:{ref:u},get children(){return n(e.Show,{get when(){return!!u.value},children:o})}})}}))}export{a as Output};
1
+ import{PowerlinesContext as e}from"../contexts/context.mjs";import{createComponent as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{Output as r,Show as i,computed as a,ref as o,splitProps as s}from"@alloy-js/core";import{replacePath as c}from"@stryke/path/replace";function l(l){let[{children:u,context:d,meta:f,basePath:p},m]=s(l,[`children`,`context`,`meta`,`basePath`]),h=o(d),g=o(f??{}),_=a(()=>p?c(p,h.value.workspaceConfig.workspaceRoot):h.value.workspaceConfig.workspaceRoot);return t(r,n(m,{get basePath(){return _.value},get children(){return t(e.Provider,{value:{ref:h,meta:g},get children(){return t(i,{get when(){return!!h.value},children:u})}})}}))}export{l as Output};
@@ -1 +1 @@
1
- const e=require(`../../vendor/index.cjs`),t=(0,e.vendor_exports.createNamedContext)(`powerlines`);exports.PowerlinesContext=t;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core`);const n=(0,t.createNamedContext)(`powerlines`);exports.PowerlinesContext=n;
@@ -1 +1 @@
1
- import{vendor_exports as e}from"../../vendor/index.mjs";const t=(0,e.createNamedContext)(`powerlines`);export{t as PowerlinesContext};
1
+ import{createNamedContext as e}from"@alloy-js/core";const t=e(`powerlines`);export{t as PowerlinesContext};
@@ -1,2 +1 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./vendor/index.cjs`),n=require(`./core/components/output.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/rollup-plugin`);i=e.__toESM(i);let a=require(`@storm-software/config-tools/types`),o=require(`@stryke/json/storm-json`),s=require(`@stryke/path/is-parent-path`),c=require(`@stryke/path/replace`),l=require(`@stryke/type-checks/is-set-string`),u=require(`prettier/doc.js`),d=require(`rolldown/experimental`);const f=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@powerlines/plugin-alloy/vendor`}}},plugins:[(0,i.default)(),(0,d.viteAliasPlugin)({entries:[{find:`@alloy-js/core`,replacement:`@powerlines/plugin-alloy/vendor`},{find:`@alloy-js/core/jsx-runtime`,replacement:`@powerlines/plugin-alloy/vendor/jsx-runtime`}]})],alias:{"@alloy-js/core":`@powerlines/plugin-alloy/vendor`,"@alloy-js/core/jsx-runtime":`@powerlines/plugin-alloy/vendor/jsx-runtime`}}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@powerlines/plugin-alloy/vendor`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@powerlines/plugin-alloy/vendor`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@powerlines/plugin-alloy/vendor`),await this.fs.write(this.tsconfig.tsconfigFilePath,o.StormJSON.stringify(this.tsconfig.tsconfigJson))),this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)},resolveId(e){return e===`@alloy-js/core`?{id:`@powerlines/plugin-alloy/vendor`,external:!0}:e===`@alloy-js/core/jsx-runtime`?{id:`@powerlines/plugin-alloy/vendor/jsx-runtime`,external:!0}:null}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let i=this,a=(0,t.vendor_exports.renderTree)((0,r.createComponent)(n.Output,{context:i,get basePath(){return i.workspaceConfig.workspaceRoot},children:e}));await m(this,a,this.config.alloy)}}}}];var p=f;async function m(e,n,r={}){await(0,t.vendor_exports.flushJobsAsync)();let i,o=async(n,l)=>{if(!Array.isArray(l))return;let u=async e=>{for(let t of l)await o(e,t)},d=(0,t.vendor_exports.getContextForRenderNode)(l);if(!d)return u(n);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};n?n.contents.push(e):i=e,await u(e)}else if(d.meta?.sourceFile){if(!n)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let t;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(a.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),t={kind:`builtin`,id:d.meta.builtin.id,path:(0,c.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,r)}}else d.meta?.entry||(0,s.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(a.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),t={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,r)}):(e.log(a.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),t={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,r)});n.contents.push(t)}else if(d.meta?.copyFile){if(!n)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(a.LogLevelLabel.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");n.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(n)};await o(void 0,n);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!(0,l.isSetString)(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&(0,l.isSetString)(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(e,i)}async function h(e,n,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await(0,t.vendor_exports.flushJobsAsync)();let i=u.printer.printDocToString(g(n),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
2
- `)?`${i}\n`:i}function g(e){let n=[];for(let r of e)if(typeof r==`string`){let e=r.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));n.push(e)}else (0,t.vendor_exports.isPrintHook)(r)?n.push(r.print(r.subtree,g)):n.push(g(r));return n}exports.default=p;
1
+ const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./core/components/output.cjs`);let n=require(`@alloy-js/core/jsx-runtime`),r=require(`@alloy-js/core`),i=require(`@alloy-js/rollup-plugin`);i=e.__toESM(i);let a=require(`@stryke/json/storm-json`);const o=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[(0,i.default)()]}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@alloy-js/core`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@alloy-js/core`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@alloy-js/core`),await this.fs.write(this.tsconfig.tsconfigFilePath,a.StormJSON.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let i=this,a={};await(0,r.traverseOutput)(await(0,r.renderAsync)((0,n.createComponent)(t.Output,{context:i,meta:a,get basePath(){return i.workspaceConfig.workspaceRoot},children:e})),{visitDirectory:e=>{this.fs.existsSync(e.path)||this.fs.mkdirSync(e.path)},visitFile:e=>{if(`contents`in e){let t=a[e.path]??{};if(t.kind===`builtin`){if(!t.id)throw Error(`Built-in file "${e.path}" is missing its ID in the render metadata.`);this.emitBuiltinSync(e.contents,t.id,e.path,{skipFormat:t.skipFormat,storage:t.storage})}else t.kind===`entry`?this.emitEntrySync(e.contents,e.path,{skipFormat:t.skipFormat,storage:t.storage,...t.typeDefinition??{}}):this.fs.writeSync(e.path,e.contents)}else this.fs.copySync(e.sourcePath,e.path)}})}}}}];var s=o;exports.default=s;
@@ -1,2 +1 @@
1
- import{vendor_exports as e}from"./vendor/index.mjs";import{Output as t}from"./core/components/output.mjs";import{createComponent as n}from"@alloy-js/core/jsx-runtime";import r from"@alloy-js/rollup-plugin";import{LogLevelLabel as i}from"@storm-software/config-tools/types";import{StormJSON as a}from"@stryke/json/storm-json";import{isParentPath as o}from"@stryke/path/is-parent-path";import{replacePath as s}from"@stryke/path/replace";import{isSetString as c}from"@stryke/type-checks/is-set-string";import{printer as l}from"prettier/doc.js";import{viteAliasPlugin as u}from"rolldown/experimental";var d=(i={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...i},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@powerlines/plugin-alloy/vendor`}}},plugins:[r(),u({entries:[{find:`@alloy-js/core`,replacement:`@powerlines/plugin-alloy/vendor`},{find:`@alloy-js/core/jsx-runtime`,replacement:`@powerlines/plugin-alloy/vendor/jsx-runtime`}]})],alias:{"@alloy-js/core":`@powerlines/plugin-alloy/vendor`,"@alloy-js/core/jsx-runtime":`@powerlines/plugin-alloy/vendor/jsx-runtime`}}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@powerlines/plugin-alloy/vendor`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@powerlines/plugin-alloy/vendor`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@powerlines/plugin-alloy/vendor`),await this.fs.write(this.tsconfig.tsconfigFilePath,a.stringify(this.tsconfig.tsconfigJson))),this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)},resolveId(e){return e===`@alloy-js/core`?{id:`@powerlines/plugin-alloy/vendor`,external:!0}:e===`@alloy-js/core/jsx-runtime`?{id:`@powerlines/plugin-alloy/vendor/jsx-runtime`,external:!0}:null}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async r=>{let i=this,a=(0,e.renderTree)(n(t,{context:i,get basePath(){return i.workspaceConfig.workspaceRoot},children:r}));await f(this,a,this.config.alloy)}}}}];async function f(t,n,r={}){await(0,e.flushJobsAsync)();let a,l=async(n,c)=>{if(!Array.isArray(c))return;let u=async e=>{for(let t of c)await l(e,t)},d=(0,e.getContextForRenderNode)(c);if(!d)return u(n);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};n?n.contents.push(e):a=e,await u(e)}else if(d.meta?.sourceFile){if(!n)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let e;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");t.log(i.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),e={kind:`builtin`,id:d.meta.builtin.id,path:s(d.meta.sourceFile.path,t.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await p(t,c,r)}}else d.meta?.entry||o(t.entryPath,d.meta.sourceFile.path)?(t.log(i.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),e={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await p(t,c,r)}):(t.log(i.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),e={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await p(t,c,r)});n.contents.push(e)}else if(d.meta?.copyFile){if(!n)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(t.log(i.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");n.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(n)};await l(void 0,n);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!c(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&c(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(t,a)}async function p(t,n,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await(0,e.flushJobsAsync)();let i=l.printDocToString(m(n),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
2
- `)?`${i}\n`:i}function m(t){let n=[];for(let r of t)if(typeof r==`string`){let e=r.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));n.push(e)}else (0,e.isPrintHook)(r)?n.push(r.print(r.subtree,m)):n.push(m(r));return n}export{d as default};
1
+ import{Output as e}from"./core/components/output.mjs";import{createComponent as t}from"@alloy-js/core/jsx-runtime";import{renderAsync as n,traverseOutput as r}from"@alloy-js/core";import i from"@alloy-js/rollup-plugin";import{StormJSON as a}from"@stryke/json/storm-json";var o=(o={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...o},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[i()]}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@alloy-js/core`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@alloy-js/core`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@alloy-js/core`),await this.fs.write(this.tsconfig.tsconfigFilePath,a.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async i=>{let a=this,o={};await r(await n(t(e,{context:a,meta:o,get basePath(){return a.workspaceConfig.workspaceRoot},children:i})),{visitDirectory:e=>{this.fs.existsSync(e.path)||this.fs.mkdirSync(e.path)},visitFile:e=>{if(`contents`in e){let t=o[e.path]??{};if(t.kind===`builtin`){if(!t.id)throw Error(`Built-in file "${e.path}" is missing its ID in the render metadata.`);this.emitBuiltinSync(e.contents,t.id,e.path,{skipFormat:t.skipFormat,storage:t.storage})}else t.kind===`entry`?this.emitEntrySync(e.contents,e.path,{skipFormat:t.skipFormat,storage:t.storage,...t.typeDefinition??{}}):this.fs.writeSync(e.path,e.contents)}else this.fs.copySync(e.sourcePath,e.path)}})}}}}];export{o as default};
@@ -1,4 +1,4 @@
1
- import "../vendor/index.mjs";
2
1
  import "../../../powerlines/src/types/fs.mjs";
3
2
  import "../../../powerlines/src/types/resolved.mjs";
3
+ import { Children } from "@alloy-js/core";
4
4
  import "@alloy-js/typescript";
@@ -1,6 +1,7 @@
1
1
  import { PluginContext } from "../../../powerlines/src/types/context.cjs";
2
2
  import { UserConfig } from "../../../powerlines/src/types/config.cjs";
3
3
  import { ResolvedConfig } from "../../../powerlines/src/types/resolved.cjs";
4
+ import { Children, PrintTreeOptions } from "@alloy-js/core";
4
5
 
5
6
  //#region ../plugin-alloy/src/types/plugin.d.ts
6
7
  type AlloyPluginOptions = Partial<PrintTreeOptions> & {
@@ -1,10 +1,10 @@
1
- import { index_d_exports } from "../vendor/index.mjs";
2
1
  import { PluginContext } from "../../../powerlines/src/types/context.mjs";
3
2
  import { UserConfig } from "../../../powerlines/src/types/config.mjs";
4
3
  import { ResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
4
+ import { Children, PrintTreeOptions } from "@alloy-js/core";
5
5
 
6
6
  //#region ../plugin-alloy/src/types/plugin.d.ts
7
- type AlloyPluginOptions = Partial<index_d_exports.PrintTreeOptions> & {
7
+ type AlloyPluginOptions = Partial<PrintTreeOptions> & {
8
8
  /**
9
9
  * If true, the Alloy framework is used to generate Typescript output files.
10
10
  *
@@ -31,7 +31,7 @@ type AlloyPluginResolvedConfig = ResolvedConfig & {
31
31
  alloy: AlloyPluginOptions;
32
32
  };
33
33
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
34
- render: <TContext extends AlloyPluginContext>(this: TContext, children: index_d_exports.Children) => Promise<void>;
34
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: Children) => Promise<void>;
35
35
  };
36
36
  //#endregion
37
37
  export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
@@ -1 +1 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/type-checks/is-set-string`),n=require(`@stryke/type-checks/is-function`);require(`@stryke/type-checks/is-object`);function r(e){return(0,t.isSetString)(e)?e:Array.isArray(e)&&e.length>0?r(e[0]):e.$$name||e.name?e.$$name||e.name:void 0}function i(e,t){return!!(r(t)&&e.some(e=>Array.isArray(e)&&r(e[0])===r(t)))}exports.getPluginName=r,exports.isDuplicatePlugin=i;
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/type-checks/is-function`);require(`@stryke/type-checks/is-object`);let n=require(`@stryke/type-checks/is-set-string`);function r(e){return(0,n.isSetString)(e)?e:Array.isArray(e)&&e.length>0?r(e[0]):e.$$name||e.name?e.$$name||e.name:void 0}function i(e,t){return!!(r(t)&&e.some(e=>Array.isArray(e)&&r(e[0])===r(t)))}exports.getPluginName=r,exports.isDuplicatePlugin=i;
@@ -1 +1 @@
1
- import{isSetString as e}from"@stryke/type-checks/is-set-string";import{isFunction as t}from"@stryke/type-checks/is-function";import"@stryke/type-checks/is-object";function n(t){return e(t)?t:Array.isArray(t)&&t.length>0?n(t[0]):t.$$name||t.name?t.$$name||t.name:void 0}function r(e,t){return!!(n(t)&&e.some(e=>Array.isArray(e)&&n(e[0])===n(t)))}export{n as getPluginName,r as isDuplicatePlugin};
1
+ import{isFunction as e}from"@stryke/type-checks/is-function";import"@stryke/type-checks/is-object";import{isSetString as t}from"@stryke/type-checks/is-set-string";function n(e){return t(e)?e:Array.isArray(e)&&e.length>0?n(e[0]):e.$$name||e.name?e.$$name||e.name:void 0}function r(e,t){return!!(n(t)&&e.some(e=>Array.isArray(e)&&n(e[0])===n(t)))}export{n as getPluginName,r as isDuplicatePlugin};
@@ -1 +1 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./helpers/filters.cjs`),n=require(`./helpers/options.cjs`),r=require(`./helpers/create-plugin.cjs`),i=require(`./helpers/module-helpers.cjs`);require(`./helpers/index.cjs`);let a=require(`@storm-software/config-tools/types`),o=require(`@stryke/path/is-parent-path`),s=require(`defu`);s=e.__toESM(s);let c=require(`@babel/core`),l=require(`@stryke/path/file-path-fns`),u=require(`@stryke/type-checks/is-set-object`);const d=(e={})=>({name:`babel`,config(){if((0,u.isSetObject)(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=(0,s.default)(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(r,i){if((0,o.isParentPath)(i,this.powerlinesPath)||r.includes(`/* @storm-ignore */`)||r.includes(`/* @storm-disable */`))return this.log(a.LogLevelLabel.TRACE,`Skipping Babel transformation for: ${i}`),{code:r,id:i};this.log(a.LogLevelLabel.TRACE,`Babel transforming file: ${i}`);let u=this.config.transform.babel.plugins.map(e=>n.resolveBabelPlugin(this,r,i,e)).filter((e,n,r)=>e&&!t.isDuplicatePlugin(r,e)),d=this.config.transform.babel.presets.map(e=>n.resolveBabelPlugin(this,r,i,e)).filter((e,n,r)=>e&&!t.isDuplicatePlugin(r,e));if(Array.isArray(u)&&u.length===0&&Array.isArray(d)&&d.length===0)return{code:r,id:i};[`ts`,`cts`,`mts`,`tsx`].includes((0,l.findFileExtensionSafe)(i))&&!t.isDuplicatePlugin(u,`@babel/plugin-syntax-typescript`)&&!t.isDuplicatePlugin(d,`@babel/preset-typescript`)&&u.unshift([`@babel/plugin-syntax-typescript`,{isTSX:(0,l.findFileExtension)(i)===`.tsx`}]);let f=await(0,c.transformAsync)(r,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:i,plugins:u.map(t=>Array.isArray(t)&&t.length>=2?[t[0],(0,s.default)(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:d.map(t=>Array.isArray(t)&&t.length>=2?[t[0],(0,s.default)(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!f?.code)throw Error(`Powerlines - Babel plugin failed to compile ${i}`);return{code:f.code,id:i}}});var f=d;exports.default=f;
1
+ const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./helpers/filters.cjs`),n=require(`./helpers/options.cjs`),r=require(`./helpers/create-plugin.cjs`),i=require(`./helpers/module-helpers.cjs`);require(`./helpers/index.cjs`);let a=require(`defu`);a=e.__toESM(a);let o=require(`@babel/core`),s=require(`@storm-software/config-tools/types`),c=require(`@stryke/path/file-path-fns`),l=require(`@stryke/path/is-parent-path`),u=require(`@stryke/type-checks/is-set-object`);const d=(e={})=>({name:`babel`,config(){if((0,u.isSetObject)(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=(0,a.default)(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(r,i){if((0,l.isParentPath)(i,this.powerlinesPath)||r.includes(`/* @storm-ignore */`)||r.includes(`/* @storm-disable */`))return this.log(s.LogLevelLabel.TRACE,`Skipping Babel transformation for: ${i}`),{code:r,id:i};this.log(s.LogLevelLabel.TRACE,`Babel transforming file: ${i}`);let u=this.config.transform.babel.plugins.map(e=>n.resolveBabelPlugin(this,r,i,e)).filter((e,n,r)=>e&&!t.isDuplicatePlugin(r,e)),d=this.config.transform.babel.presets.map(e=>n.resolveBabelPlugin(this,r,i,e)).filter((e,n,r)=>e&&!t.isDuplicatePlugin(r,e));if(Array.isArray(u)&&u.length===0&&Array.isArray(d)&&d.length===0)return{code:r,id:i};[`ts`,`cts`,`mts`,`tsx`].includes((0,c.findFileExtensionSafe)(i))&&!t.isDuplicatePlugin(u,`@babel/plugin-syntax-typescript`)&&!t.isDuplicatePlugin(d,`@babel/preset-typescript`)&&u.unshift([`@babel/plugin-syntax-typescript`,{isTSX:(0,c.findFileExtension)(i)===`.tsx`}]);let f=await(0,o.transformAsync)(r,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:i,plugins:u.map(t=>Array.isArray(t)&&t.length>=2?[t[0],(0,a.default)(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:d.map(t=>Array.isArray(t)&&t.length>=2?[t[0],(0,a.default)(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!f?.code)throw Error(`Powerlines - Babel plugin failed to compile ${i}`);return{code:f.code,id:i}}});var f=d;exports.default=f;
@@ -1 +1 @@
1
- import{getPluginName as e,isDuplicatePlugin as t}from"./helpers/filters.mjs";import{resolveBabelPlugin as n,resolvePluginFunction as r}from"./helpers/options.mjs";import{createBabelPlugin as i}from"./helpers/create-plugin.mjs";import{addImport as a,addImportsToProgram as o}from"./helpers/module-helpers.mjs";import"./helpers/index.mjs";import{LogLevelLabel as s}from"@storm-software/config-tools/types";import{isParentPath as c}from"@stryke/path/is-parent-path";import l from"defu";import{transformAsync as u}from"@babel/core";import{findFileExtension as d,findFileExtensionSafe as f}from"@stryke/path/file-path-fns";import{isSetObject as p}from"@stryke/type-checks/is-set-object";var m=(e={})=>({name:`babel`,config(){if(p(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=l(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(r,i){if(c(i,this.powerlinesPath)||r.includes(`/* @storm-ignore */`)||r.includes(`/* @storm-disable */`))return this.log(s.TRACE,`Skipping Babel transformation for: ${i}`),{code:r,id:i};this.log(s.TRACE,`Babel transforming file: ${i}`);let a=this.config.transform.babel.plugins.map(e=>n(this,r,i,e)).filter((e,n,r)=>e&&!t(r,e)),o=this.config.transform.babel.presets.map(e=>n(this,r,i,e)).filter((e,n,r)=>e&&!t(r,e));if(Array.isArray(a)&&a.length===0&&Array.isArray(o)&&o.length===0)return{code:r,id:i};[`ts`,`cts`,`mts`,`tsx`].includes(f(i))&&!t(a,`@babel/plugin-syntax-typescript`)&&!t(o,`@babel/preset-typescript`)&&a.unshift([`@babel/plugin-syntax-typescript`,{isTSX:d(i)===`.tsx`}]);let p=await u(r,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:i,plugins:a.map(t=>Array.isArray(t)&&t.length>=2?[t[0],l(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:o.map(t=>Array.isArray(t)&&t.length>=2?[t[0],l(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!p?.code)throw Error(`Powerlines - Babel plugin failed to compile ${i}`);return{code:p.code,id:i}}});export{m as default};
1
+ import{getPluginName as e,isDuplicatePlugin as t}from"./helpers/filters.mjs";import{resolveBabelPlugin as n,resolvePluginFunction as r}from"./helpers/options.mjs";import{createBabelPlugin as i}from"./helpers/create-plugin.mjs";import{addImport as a,addImportsToProgram as o}from"./helpers/module-helpers.mjs";import"./helpers/index.mjs";import s from"defu";import{transformAsync as c}from"@babel/core";import{LogLevelLabel as l}from"@storm-software/config-tools/types";import{findFileExtension as u,findFileExtensionSafe as d}from"@stryke/path/file-path-fns";import{isParentPath as f}from"@stryke/path/is-parent-path";import{isSetObject as p}from"@stryke/type-checks/is-set-object";var m=(e={})=>({name:`babel`,config(){if(p(e))return{transform:{babel:e}}},configResolved:{order:`pre`,handler(){this.devDependencies[`@babel/core`]=`^7.28.4`,this.config.transform.babel=s(this.config.transform.babel??{},{plugins:[],presets:[]})}},async transform(r,i){if(f(i,this.powerlinesPath)||r.includes(`/* @storm-ignore */`)||r.includes(`/* @storm-disable */`))return this.log(l.TRACE,`Skipping Babel transformation for: ${i}`),{code:r,id:i};this.log(l.TRACE,`Babel transforming file: ${i}`);let a=this.config.transform.babel.plugins.map(e=>n(this,r,i,e)).filter((e,n,r)=>e&&!t(r,e)),o=this.config.transform.babel.presets.map(e=>n(this,r,i,e)).filter((e,n,r)=>e&&!t(r,e));if(Array.isArray(a)&&a.length===0&&Array.isArray(o)&&o.length===0)return{code:r,id:i};[`ts`,`cts`,`mts`,`tsx`].includes(d(i))&&!t(a,`@babel/plugin-syntax-typescript`)&&!t(o,`@babel/preset-typescript`)&&a.unshift([`@babel/plugin-syntax-typescript`,{isTSX:u(i)===`.tsx`}]);let p=await c(r,{highlightCode:!0,code:!0,ast:!1,cloneInputAst:!1,comments:!0,sourceType:`module`,configFile:!1,babelrc:!1,envName:this.config.mode,caller:{name:this.config.framework},...this.config.transform.babel??{},filename:i,plugins:a.map(t=>Array.isArray(t)&&t.length>=2?[t[0],s(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean),presets:o.map(t=>Array.isArray(t)&&t.length>=2?[t[0],s(t.length>1&&t[1]?t[1]:{},{options:e})]:t).filter(Boolean)});if(!p?.code)throw Error(`Powerlines - Babel plugin failed to compile ${i}`);return{code:p.code,id:i}}});export{m as default};
@@ -1 +1 @@
1
- require(`../plugin-utils/paths.cjs`);let e=require(`@stryke/path/replace`),t=require(`@stryke/type-checks/is-set-string`),n=require(`@stryke/convert/to-array`),r=require(`@stryke/fs/is-file`),i=require(`@stryke/fs/list-files`),a=require(`@stryke/path/append`),o=require(`@stryke/path/join-paths`),s=require(`@stryke/type-checks/is-string`),c=require(`@stryke/convert/parse-type-definition`),l=require(`@stryke/helpers/get-unique`);require(`@stryke/hash/murmurhash`);
1
+ require(`../plugin-utils/paths.cjs`);let e=require(`@stryke/path/replace`),t=require(`@stryke/convert/to-array`),n=require(`@stryke/fs/is-file`),r=require(`@stryke/fs/list-files`),i=require(`@stryke/path/append`),a=require(`@stryke/path/join-paths`),o=require(`@stryke/type-checks/is-set-string`),s=require(`@stryke/type-checks/is-string`),c=require(`@stryke/convert/parse-type-definition`),l=require(`@stryke/helpers/get-unique`);require(`@stryke/hash/murmurhash`);
@@ -1 +1 @@
1
- import"../plugin-utils/paths.mjs";import{replacePath as e}from"@stryke/path/replace";import{isSetString as t}from"@stryke/type-checks/is-set-string";import{toArray as n}from"@stryke/convert/to-array";import"@stryke/fs/is-file";import{listFiles as r}from"@stryke/fs/list-files";import{appendPath as i}from"@stryke/path/append";import{joinPaths as a}from"@stryke/path/join-paths";import{isString as o}from"@stryke/type-checks/is-string";import{parseTypeDefinition as s}from"@stryke/convert/parse-type-definition";import{getUniqueBy as c}from"@stryke/helpers/get-unique";import"@stryke/hash/murmurhash";export{};
1
+ import"../plugin-utils/paths.mjs";import{replacePath as e}from"@stryke/path/replace";import{toArray as t}from"@stryke/convert/to-array";import"@stryke/fs/is-file";import{listFiles as n}from"@stryke/fs/list-files";import{appendPath as r}from"@stryke/path/append";import{joinPaths as i}from"@stryke/path/join-paths";import{isSetString as a}from"@stryke/type-checks/is-set-string";import{isString as o}from"@stryke/type-checks/is-string";import{parseTypeDefinition as s}from"@stryke/convert/parse-type-definition";import{getUniqueBy as c}from"@stryke/helpers/get-unique";import"@stryke/hash/murmurhash";export{};
@@ -4,9 +4,9 @@ import { Plugin } from "./plugin.mjs";
4
4
  import { TSConfig } from "./tsconfig.mjs";
5
5
  import { PluginContext } from "./context.mjs";
6
6
  import { BabelTransformPluginOptions } from "./babel.mjs";
7
- import { LogLevelLabel } from "@storm-software/config-tools/types";
8
7
  import "c12";
9
8
  import { transformAsync } from "@babel/core";
9
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
10
10
  import { MaybePromise } from "@stryke/types/base";
11
11
  import { AssetGlob } from "@stryke/types/file";
12
12
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
@@ -312,6 +312,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
312
312
  * @param options - Additional options for writing the builtin file
313
313
  */
314
314
  emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
315
+ /**
316
+ * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
317
+ *
318
+ * @param code - The source code of the builtin file
319
+ * @param id - The unique identifier of the builtin file
320
+ * @param path - An optional path to write the builtin file to
321
+ * @param options - Additional options for writing the builtin file
322
+ */
323
+ emitBuiltinSync: (code: string, id: string, path?: string, options?: WriteOptions) => void;
315
324
  /**
316
325
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
317
326
  *
@@ -320,6 +329,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
320
329
  * @param options - Additional options for writing the entry file
321
330
  */
322
331
  emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
332
+ /**
333
+ * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
334
+ *
335
+ * @param code - The source code of the entry file
336
+ * @param path - An optional path to write the entry file to
337
+ * @param options - Additional options for writing the entry file
338
+ */
339
+ emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
323
340
  /**
324
341
  * A function to update the context fields using a new user configuration options
325
342
  */
@@ -314,6 +314,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
314
314
  * @param options - Additional options for writing the builtin file
315
315
  */
316
316
  emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
317
+ /**
318
+ * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
319
+ *
320
+ * @param code - The source code of the builtin file
321
+ * @param id - The unique identifier of the builtin file
322
+ * @param path - An optional path to write the builtin file to
323
+ * @param options - Additional options for writing the builtin file
324
+ */
325
+ emitBuiltinSync: (code: string, id: string, path?: string, options?: WriteOptions) => void;
317
326
  /**
318
327
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
319
328
  *
@@ -322,6 +331,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
322
331
  * @param options - Additional options for writing the entry file
323
332
  */
324
333
  emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
334
+ /**
335
+ * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
336
+ *
337
+ * @param code - The source code of the entry file
338
+ * @param path - An optional path to write the entry file to
339
+ * @param options - Additional options for writing the entry file
340
+ */
341
+ emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
325
342
  /**
326
343
  * A function to update the context fields using a new user configuration options
327
344
  */
@@ -13,6 +13,13 @@ interface StorageAdapter {
13
13
  * A name identifying the storage adapter type.
14
14
  */
15
15
  name: string;
16
+ /**
17
+ * The storage preset for the adapter.
18
+ *
19
+ * @remarks
20
+ * This can be used as an alternate way to identify the type of storage being used.
21
+ */
22
+ preset?: StoragePreset | null;
16
23
  /**
17
24
  * Checks if a key exists in the storage.
18
25
  *
@@ -207,6 +214,13 @@ interface WriteOptions {
207
214
  * @defaultValue false
208
215
  */
209
216
  skipFormat?: boolean;
217
+ /**
218
+ * The storage preset or adapter name for the output file.
219
+ *
220
+ * @remarks
221
+ * If not specified, the output mode will be determined by the provided `output.mode` value.
222
+ */
223
+ storage?: StoragePreset | string;
210
224
  /**
211
225
  * Additional metadata for the file.
212
226
  */
@@ -217,6 +231,10 @@ interface ResolveOptions$1 extends ResolveOptions {
217
231
  * If true, the module is being resolved as an entry point.
218
232
  */
219
233
  isEntry?: boolean;
234
+ /**
235
+ * If true, the resolver will skip alias resolution when resolving modules.
236
+ */
237
+ skipAlias?: boolean;
220
238
  /**
221
239
  * If true, the resolver will skip using the cache when resolving modules.
222
240
  */
@@ -449,6 +467,16 @@ interface VirtualFileSystemInterface {
449
467
  * @returns The resolved module path.
450
468
  */
451
469
  resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
470
+ /**
471
+ * Resolves a given module ID using the configured aliases.
472
+ *
473
+ * @remarks
474
+ * This function can be used to map module IDs to different paths based on the alias configuration.
475
+ *
476
+ * @param id - The module ID to resolve.
477
+ * @returns The resolved module ID - after applying any configured aliases (this will be the same as the input ID if no aliases match).
478
+ */
479
+ resolveAlias: (id: string) => string;
452
480
  /**
453
481
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
454
482
  */
@@ -13,6 +13,13 @@ interface StorageAdapter {
13
13
  * A name identifying the storage adapter type.
14
14
  */
15
15
  name: string;
16
+ /**
17
+ * The storage preset for the adapter.
18
+ *
19
+ * @remarks
20
+ * This can be used as an alternate way to identify the type of storage being used.
21
+ */
22
+ preset?: StoragePreset | null;
16
23
  /**
17
24
  * Checks if a key exists in the storage.
18
25
  *
@@ -207,6 +214,13 @@ interface WriteOptions {
207
214
  * @defaultValue false
208
215
  */
209
216
  skipFormat?: boolean;
217
+ /**
218
+ * The storage preset or adapter name for the output file.
219
+ *
220
+ * @remarks
221
+ * If not specified, the output mode will be determined by the provided `output.mode` value.
222
+ */
223
+ storage?: StoragePreset | string;
210
224
  /**
211
225
  * Additional metadata for the file.
212
226
  */
@@ -217,6 +231,10 @@ interface ResolveOptions$1 extends ResolveOptions {
217
231
  * If true, the module is being resolved as an entry point.
218
232
  */
219
233
  isEntry?: boolean;
234
+ /**
235
+ * If true, the resolver will skip alias resolution when resolving modules.
236
+ */
237
+ skipAlias?: boolean;
220
238
  /**
221
239
  * If true, the resolver will skip using the cache when resolving modules.
222
240
  */
@@ -449,6 +467,16 @@ interface VirtualFileSystemInterface {
449
467
  * @returns The resolved module path.
450
468
  */
451
469
  resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
470
+ /**
471
+ * Resolves a given module ID using the configured aliases.
472
+ *
473
+ * @remarks
474
+ * This function can be used to map module IDs to different paths based on the alias configuration.
475
+ *
476
+ * @param id - The module ID to resolve.
477
+ * @returns The resolved module ID - after applying any configured aliases (this will be the same as the input ID if no aliases match).
478
+ */
479
+ resolveAlias: (id: string) => string;
452
480
  /**
453
481
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
454
482
  */
@@ -3,6 +3,7 @@ import { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, Allo
3
3
  import { AutoMDPluginOptions } from "../plugin-automd/src/types/plugin.cjs";
4
4
  import { BabelPluginContext, BabelPluginOptions, BabelPluginResolvedConfig, BabelPluginUserConfig } from "../plugin-babel/src/types/plugin.cjs";
5
5
  import { EnvInterface, SecretsInterface } from "./runtime.cjs";
6
+ import { Children } from "@alloy-js/core/jsx-runtime";
6
7
  import { DotenvConfiguration, TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
7
8
  import { DotenvParseOutput } from "@stryke/env/types";
8
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-env",
3
- "version": "0.14.19",
3
+ "version": "0.14.21",
4
4
  "type": "module",
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
  "repository": {
@@ -193,11 +193,11 @@
193
193
  "@alloy-js/json": "^0.22.0",
194
194
  "@babel/core": "^7.28.5",
195
195
  "@babel/types": "^7.28.5",
196
- "@powerlines/deepkit": "^0.5.30",
197
- "@powerlines/plugin-alloy": "^0.16.2",
198
- "@powerlines/plugin-automd": "^0.1.115",
199
- "@powerlines/plugin-babel": "^0.12.124",
200
- "@powerlines/plugin-plugin": "^0.12.67",
196
+ "@powerlines/deepkit": "^0.5.32",
197
+ "@powerlines/plugin-alloy": "^0.17.0",
198
+ "@powerlines/plugin-automd": "^0.1.117",
199
+ "@powerlines/plugin-babel": "^0.12.126",
200
+ "@powerlines/plugin-plugin": "^0.12.69",
201
201
  "@storm-software/config-tools": "^1.188.74",
202
202
  "@stryke/capnp": "^0.12.51",
203
203
  "@stryke/env": "^0.20.43",
@@ -207,9 +207,9 @@
207
207
  "@stryke/type-checks": "^0.5.14",
208
208
  "@stryke/types": "^0.10.28",
209
209
  "automd": "^0.4.2",
210
- "powerlines": "^0.36.20"
210
+ "powerlines": "^0.36.22"
211
211
  },
212
212
  "devDependencies": { "@types/node": "^24.10.4", "vite": "8.0.0-beta.2" },
213
213
  "publishConfig": { "access": "public" },
214
- "gitHead": "bf1440eb5eb29cb9650051e56b0c17e596eb3942"
214
+ "gitHead": "f88fe8eb30f96536b83fc9af884972d48e31e63a"
215
215
  }
@@ -1 +0,0 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);var t={};e.__reExport(t,require(`@alloy-js/core`)),Object.defineProperty(exports,`vendor_exports`,{enumerable:!0,get:function(){return t}});var n=require(`@alloy-js/core`);Object.keys(n).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
@@ -1,7 +0,0 @@
1
- export * from "@alloy-js/core";
2
-
3
- //#region ../plugin-alloy/src/vendor/index.d.ts
4
-
5
- import * as import___alloy_js_core from "@alloy-js/core";
6
- //#endregion
7
- export { import___alloy_js_core as index_d_exports };
@@ -1 +0,0 @@
1
- import{__reExport as e}from"../../../_virtual/rolldown_runtime.mjs";export*from"@alloy-js/core";var t={};import*as n from"@alloy-js/core";e(t,n);export{t as vendor_exports};