@powerlines/plugin-env 0.13.89 → 0.13.91

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 (73) hide show
  1. package/dist/alloy/src/core/components/output.cjs +1 -1
  2. package/dist/alloy/src/core/components/output.mjs +1 -1
  3. package/dist/alloy/src/core/components/single-line-comment.cjs +1 -1
  4. package/dist/alloy/src/core/components/single-line-comment.mjs +1 -1
  5. package/dist/alloy/src/core/components/source-file.cjs +1 -1
  6. package/dist/alloy/src/core/components/source-file.mjs +1 -1
  7. package/dist/alloy/src/create-plugin.cjs +2 -2
  8. package/dist/alloy/src/create-plugin.mjs +2 -2
  9. package/dist/alloy/src/markdown/components/markdown-file.cjs +1 -1
  10. package/dist/alloy/src/markdown/components/markdown-file.mjs +1 -1
  11. package/dist/alloy/src/markdown/components/markdown-table.cjs +1 -1
  12. package/dist/alloy/src/markdown/components/markdown-table.mjs +1 -1
  13. package/dist/alloy/src/types/components.d.mts +2 -2
  14. package/dist/alloy/src/typescript/components/builtin-file.cjs +1 -1
  15. package/dist/alloy/src/typescript/components/builtin-file.mjs +1 -1
  16. package/dist/alloy/src/typescript/components/tsdoc-reflection.cjs +1 -1
  17. package/dist/alloy/src/typescript/components/tsdoc-reflection.mjs +1 -1
  18. package/dist/alloy/src/typescript/components/tsdoc.cjs +1 -1
  19. package/dist/alloy/src/typescript/components/tsdoc.mjs +1 -1
  20. package/dist/alloy/src/typescript/components/typescript-file.cjs +1 -1
  21. package/dist/alloy/src/typescript/components/typescript-file.mjs +1 -1
  22. package/dist/alloy/src/typescript/components/typescript-interface.cjs +1 -1
  23. package/dist/alloy/src/typescript/components/typescript-interface.mjs +1 -1
  24. package/dist/alloy/src/typescript/components/typescript-object.cjs +1 -1
  25. package/dist/alloy/src/typescript/components/typescript-object.mjs +1 -1
  26. package/dist/babel/plugin.cjs +4 -4
  27. package/dist/babel/plugin.mjs +3 -3
  28. package/dist/components/docs.cjs +1 -1
  29. package/dist/components/docs.mjs +1 -1
  30. package/dist/components/env.cjs +9 -9
  31. package/dist/components/env.mjs +7 -7
  32. package/dist/components/index.cjs +1 -1
  33. package/dist/components/index.mjs +1 -1
  34. package/dist/deepkit/src/utilities.cjs +1 -1
  35. package/dist/deepkit/src/utilities.mjs +1 -1
  36. package/dist/helpers/create-reflection-resource.cjs +1 -1
  37. package/dist/helpers/create-reflection-resource.mjs +1 -1
  38. package/dist/helpers/index.cjs +1 -1
  39. package/dist/helpers/index.mjs +1 -1
  40. package/dist/helpers/load.cjs +1 -1
  41. package/dist/helpers/load.mjs +1 -1
  42. package/dist/helpers/persistence.cjs +1 -1
  43. package/dist/helpers/persistence.mjs +1 -1
  44. package/dist/helpers/reflect.cjs +1 -1
  45. package/dist/helpers/reflect.mjs +1 -1
  46. package/dist/helpers/source-file-env.cjs +1 -1
  47. package/dist/helpers/source-file-env.mjs +1 -1
  48. package/dist/index.cjs +4 -4
  49. package/dist/index.mjs +4 -4
  50. package/dist/plugin-babel/src/helpers/create-plugin.cjs +1 -1
  51. package/dist/plugin-babel/src/helpers/create-plugin.mjs +1 -1
  52. package/dist/plugin-babel/src/helpers/index.cjs +1 -1
  53. package/dist/plugin-babel/src/helpers/index.mjs +1 -1
  54. package/dist/plugin-babel/src/helpers/module-helpers.cjs +1 -1
  55. package/dist/plugin-babel/src/helpers/module-helpers.mjs +1 -1
  56. package/dist/plugin-babel/src/helpers/options.cjs +1 -1
  57. package/dist/plugin-babel/src/helpers/options.mjs +1 -1
  58. package/dist/plugin-babel/src/index.cjs +1 -1
  59. package/dist/plugin-babel/src/index.mjs +1 -1
  60. package/dist/powerlines/src/lib/build/esbuild.cjs +9 -9
  61. package/dist/powerlines/src/lib/build/esbuild.mjs +9 -9
  62. package/dist/powerlines/src/lib/entry.cjs +1 -1
  63. package/dist/powerlines/src/lib/entry.mjs +1 -1
  64. package/dist/powerlines/src/lib/logger.cjs +1 -1
  65. package/dist/powerlines/src/lib/logger.mjs +1 -1
  66. package/dist/powerlines/src/lib/utilities/resolve.cjs +1 -1
  67. package/dist/powerlines/src/lib/utilities/resolve.mjs +1 -1
  68. package/dist/powerlines/src/plugin-utils/helpers.cjs +1 -1
  69. package/dist/powerlines/src/plugin-utils/helpers.mjs +1 -1
  70. package/dist/powerlines/src/types/babel.d.mts +1 -1
  71. package/dist/powerlines/src/types/config.d.mts +1 -1
  72. package/dist/types/plugin.d.mts +1 -1
  73. package/package.json +7 -7
@@ -1 +1 @@
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,basePath:s},c]=(0,r.splitProps)(e,[`children`,`context`,`basePath`]),l=(0,r.ref)(o),u=(0,r.computed)(()=>s?(0,i.replacePath)(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return(0,n.createComponent)(r.Output,(0,n.mergeProps)(c,{get basePath(){return u.value},get children(){return(0,n.createComponent)(t.PowerlinesContext.Provider,{value:{ref:l},get children(){return(0,n.createComponent)(r.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(`@stryke/path/replace`),r=require(`@alloy-js/core`),i=require(`@alloy-js/core/jsx-runtime`);function a(e){let[{children:a,context:o,basePath:s},c]=(0,r.splitProps)(e,[`children`,`context`,`basePath`]),l=(0,r.ref)(o),u=(0,r.computed)(()=>s?(0,n.replacePath)(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return(0,i.createComponent)(r.Output,(0,i.mergeProps)(c,{get basePath(){return u.value},get children(){return(0,i.createComponent)(t.PowerlinesContext.Provider,{value:{ref:l},get children(){return(0,i.createComponent)(r.Show,{get when(){return!!l.value},children:a})}})}}))}exports.Output=a;
@@ -1 +1 @@
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,basePath:f},p]=s(l,[`children`,`context`,`basePath`]),m=o(d),h=a(()=>f?c(f,m.value.workspaceConfig.workspaceRoot):m.value.workspaceConfig.workspaceRoot);return t(r,n(p,{get basePath(){return h.value},get children(){return t(e.Provider,{value:{ref:m},get children(){return t(i,{get when(){return!!m.value},children:u})}})}}))}export{l as Output};
1
+ import{PowerlinesContext as e}from"../contexts/context.mjs";import{replacePath as t}from"@stryke/path/replace";import{Output as n,Show as r,computed as i,ref as a,splitProps as o}from"@alloy-js/core";import{createComponent as s,mergeProps as c}from"@alloy-js/core/jsx-runtime";function l(l){let[{children:u,context:d,basePath:f},p]=o(l,[`children`,`context`,`basePath`]),m=a(d),h=i(()=>f?t(f,m.value.workspaceConfig.workspaceRoot):m.value.workspaceConfig.workspaceRoot);return s(n,c(p,{get basePath(){return h.value},get children(){return s(e.Provider,{value:{ref:m},get children(){return s(r,{get when(){return!!m.value},children:u})}})}}))}export{l as Output};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core/jsx-runtime`),n=require(`@alloy-js/core`);function r(e){let{variant:r=`double-slash`,children:i}=e,a=r===`slash-star`?`/* `:r===`slash-star-star`?`/** `:r===`triple-slash`?`/// `:r===`markdown`?`<!-- `:`// `;return[a,(0,t.createIntrinsic)(`align`,{string:a,get children(){return[(0,t.createComponent)(n.Prose,{children:i}),r===`slash-star`||r===`slash-star-star`?` */ `:r===`markdown`?` -->`:``]}})]}exports.SingleLineComment=r;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core`),n=require(`@alloy-js/core/jsx-runtime`);function r(e){let{variant:r=`double-slash`,children:i}=e,a=r===`slash-star`?`/* `:r===`slash-star-star`?`/** `:r===`triple-slash`?`/// `:r===`markdown`?`<!-- `:`// `;return[a,(0,n.createIntrinsic)(`align`,{string:a,get children(){return[(0,n.createComponent)(t.Prose,{children:i}),r===`slash-star`||r===`slash-star-star`?` */ `:r===`markdown`?` -->`:``]}})]}exports.SingleLineComment=r;
@@ -1 +1 @@
1
- import{createComponent as e,createIntrinsic as t}from"@alloy-js/core/jsx-runtime";import{Prose as n}from"@alloy-js/core";function r(r){let{variant:i=`double-slash`,children:a}=r,o=i===`slash-star`?`/* `:i===`slash-star-star`?`/** `:i===`triple-slash`?`/// `:i===`markdown`?`<!-- `:`// `;return[o,t(`align`,{string:o,get children(){return[e(n,{children:a}),i===`slash-star`||i===`slash-star-star`?` */ `:i===`markdown`?` -->`:``]}})]}export{r as SingleLineComment};
1
+ import{Prose as e}from"@alloy-js/core";import{createComponent as t,createIntrinsic as n}from"@alloy-js/core/jsx-runtime";function r(r){let{variant:i=`double-slash`,children:a}=r,o=i===`slash-star`?`/* `:i===`slash-star-star`?`/** `:i===`triple-slash`?`/// `:i===`markdown`?`<!-- `:`// `;return[o,n(`align`,{string:o,get children(){return[t(e,{children:a}),i===`slash-star`||i===`slash-star-star`?` */ `:i===`markdown`?` -->`:``]}})]}export{r as SingleLineComment};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`@alloy-js/core/jsx-runtime`),n=require(`@alloy-js/core`),r=require(`defu`);r=e.__toESM(r);let i=require(`@stryke/path/append`);function a(e){let[{children:a,meta:o,path:s,header:c,preset:l,filetype:u,reference:d}]=(0,n.splitProps)(e,[`children`,`meta`,`path`,`header`,`preset`,`filetype`,`reference`]),f=(0,n.useContext)(n.SourceDirectoryContext),p={path:(0,i.appendPath)(s,f.path),filetype:u,reference:d};f?.addContent(p);let m=(0,n.useFormatOptions)({printWidth:e.printWidth,tabWidth:e.tabWidth,useTabs:e.useTabs,insertFinalNewLine:e.insertFinalNewLine}),h=(0,n.getContext)();return h.meta=(0,r.default)({sourceFile:p,printOptions:m,output:{preset:l}},o??{}),(0,t.createComponent)(n.SourceFileContext.Provider,{value:p,get children(){return[(0,t.createComponent)(n.Show,{when:c!==void 0,get children(){return[c,(0,t.createIntrinsic)(`hbr`,{})]}}),a]}})}exports.SourceFile=a;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`defu`);t=e.__toESM(t);let n=require(`@stryke/path/append`),r=require(`@alloy-js/core`),i=require(`@alloy-js/core/jsx-runtime`);function a(e){let[{children:a,meta:o,path:s,header:c,preset:l,filetype:u,reference:d}]=(0,r.splitProps)(e,[`children`,`meta`,`path`,`header`,`preset`,`filetype`,`reference`]),f=(0,r.useContext)(r.SourceDirectoryContext),p={path:(0,n.appendPath)(s,f.path),filetype:u,reference:d};f?.addContent(p);let m=(0,r.useFormatOptions)({printWidth:e.printWidth,tabWidth:e.tabWidth,useTabs:e.useTabs,insertFinalNewLine:e.insertFinalNewLine}),h=(0,r.getContext)();return h.meta=(0,t.default)({sourceFile:p,printOptions:m,output:{preset:l}},o??{}),(0,i.createComponent)(r.SourceFileContext.Provider,{value:p,get children(){return[(0,i.createComponent)(r.Show,{when:c!==void 0,get children(){return[c,(0,i.createIntrinsic)(`hbr`,{})]}}),a]}})}exports.SourceFile=a;
@@ -1 +1 @@
1
- import{createComponent as e,createIntrinsic as t}from"@alloy-js/core/jsx-runtime";import{Show as n,SourceDirectoryContext as r,SourceFileContext as i,getContext as a,splitProps as o,useContext as s,useFormatOptions as c}from"@alloy-js/core";import l from"defu";import{appendPath as u}from"@stryke/path/append";function d(d){let[{children:f,meta:p,path:m,header:h,preset:g,filetype:_,reference:v}]=o(d,[`children`,`meta`,`path`,`header`,`preset`,`filetype`,`reference`]),y=s(r),b={path:u(m,y.path),filetype:_,reference:v};y?.addContent(b);let x=c({printWidth:d.printWidth,tabWidth:d.tabWidth,useTabs:d.useTabs,insertFinalNewLine:d.insertFinalNewLine}),S=a();return S.meta=l({sourceFile:b,printOptions:x,output:{preset:g}},p??{}),e(i.Provider,{value:b,get children(){return[e(n,{when:h!==void 0,get children(){return[h,t(`hbr`,{})]}}),f]}})}export{d as SourceFile};
1
+ import e from"defu";import{appendPath as t}from"@stryke/path/append";import{Show as n,SourceDirectoryContext as r,SourceFileContext as i,getContext as a,splitProps as o,useContext as s,useFormatOptions as c}from"@alloy-js/core";import{createComponent as l,createIntrinsic as u}from"@alloy-js/core/jsx-runtime";function d(d){let[{children:f,meta:p,path:m,header:h,preset:g,filetype:_,reference:v}]=o(d,[`children`,`meta`,`path`,`header`,`preset`,`filetype`,`reference`]),y=s(r),b={path:t(m,y.path),filetype:_,reference:v};y?.addContent(b);let x=c({printWidth:d.printWidth,tabWidth:d.tabWidth,useTabs:d.useTabs,insertFinalNewLine:d.insertFinalNewLine}),S=a();return S.meta=e({sourceFile:b,printOptions:x,output:{preset:g}},p??{}),l(i.Provider,{value:b,get children(){return[l(n,{when:h!==void 0,get children(){return[h,u(`hbr`,{})]}}),f]}})}export{d as SourceFile};
@@ -1,2 +1,2 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../powerlines/src/plugin-utils/helpers.cjs`),n=require(`./core/components/output.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@storm-software/config-tools/types`),o=require(`@stryke/path/is-parent-path`),s=require(`@stryke/path/replace`),c=require(`@stryke/type-checks/is-set-string`),l=require(`prettier/doc.js`);function u(e){return a=>{let o=e(a);return{...o,async prepare(){let e=this;if(t.isPluginHook(o.prepare)&&o.enforce!==`post`&&(t.isPluginHookFunction(o.prepare)||t.isPluginHookObject(o.prepare)&&o.prepare.order!==`post`)&&await Promise.resolve(t.getHookHandler(o.prepare).call(this)),t.isPluginHook(o.render)){let t=(0,i.renderTree)((0,r.createComponent)(n.Output,{context:e,get basePath(){return e.workspaceConfig.workspaceRoot},get children(){return o.render.call(e)}}));await d(this,t,a?.alloy)}t.isPluginHook(o.prepare)&&(o.enforce===`post`||t.isPluginHookObject(o.prepare)&&o.prepare.order===`post`)&&await Promise.resolve(t.getHookHandler(o.prepare).call(this))}}}}async function d(e,t,n={}){await(0,i.flushJobsAsync)();let r,l=async(t,c)=>{if(!Array.isArray(c))return;let u=async e=>{for(let t of c)await l(e,t)},d=(0,i.getContextForRenderNode)(c);if(!d)return u(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):r=e,await u(e)}else if(d.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;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}`),r={kind:`builtin`,id:d.meta.builtin.id,path:(0,s.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,c,n)}}else d.meta?.entry||(0,o.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(a.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),r={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,c,n)}):(e.log(a.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),r={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,c,n)});t.contents.push(r)}else if(d.meta?.copyFile){if(!t)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.");t.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(t)};await l(void 0,t);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);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,c.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,c.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,r)}async function f(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await(0,i.flushJobsAsync)();let r=l.printer.printDocToString(p(t),n).formatted;return n.insertFinalNewLine&&!r.endsWith(`
2
- `)?`${r}\n`:r}function p(e){let t=[];for(let n of e)if(typeof n==`string`){let e=n.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));t.push(e)}else (0,i.isPrintHook)(n)?t.push(n.print(n.subtree,p)):t.push(p(n));return t}exports.createAlloyPlugin=u;
1
+ const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`../../powerlines/src/plugin-utils/helpers.cjs`),n=require(`./core/components/output.cjs`);let r=require(`@stryke/type-checks/is-set-string`),i=require(`@storm-software/config-tools/types`),a=require(`@stryke/path/replace`),o=require(`@stryke/path/is-parent-path`),s=require(`@alloy-js/core`),c=require(`@alloy-js/core/jsx-runtime`),l=require(`prettier/doc.js`);function u(e){return r=>{let i=e(r);return{...i,async prepare(){let e=this;if(t.isPluginHook(i.prepare)&&i.enforce!==`post`&&(t.isPluginHookFunction(i.prepare)||t.isPluginHookObject(i.prepare)&&i.prepare.order!==`post`)&&await Promise.resolve(t.getHookHandler(i.prepare).call(this)),t.isPluginHook(i.render)){let t=(0,s.renderTree)((0,c.createComponent)(n.Output,{context:e,get basePath(){return e.workspaceConfig.workspaceRoot},get children(){return i.render.call(e)}}));await d(this,t,r?.alloy)}t.isPluginHook(i.prepare)&&(i.enforce===`post`||t.isPluginHookObject(i.prepare)&&i.prepare.order===`post`)&&await Promise.resolve(t.getHookHandler(i.prepare).call(this))}}}}async function d(e,t,n={}){await(0,s.flushJobsAsync)();let c,l=async(t,r)=>{if(!Array.isArray(r))return;let u=async e=>{for(let t of r)await l(e,t)},d=(0,s.getContextForRenderNode)(r);if(!d)return u(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):c=e,await u(e)}else if(d.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let s;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(i.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),s={kind:`builtin`,id:d.meta.builtin.id,path:(0,a.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,r,n)}}else d.meta?.entry||(0,o.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(i.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),s={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,r,n)}):(e.log(i.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),s={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,r,n)});t.contents.push(s)}else if(d.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(i.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.");t.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(t)};await l(void 0,t);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);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,r.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,r.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,c)}async function f(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await(0,s.flushJobsAsync)();let r=l.printer.printDocToString(p(t),n).formatted;return n.insertFinalNewLine&&!r.endsWith(`
2
+ `)?`${r}\n`:r}function p(e){let t=[];for(let n of e)if(typeof n==`string`){let e=n.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));t.push(e)}else (0,s.isPrintHook)(n)?t.push(n.print(n.subtree,p)):t.push(p(n));return t}exports.createAlloyPlugin=u;
@@ -1,2 +1,2 @@
1
- import{getHookHandler as e,isPluginHook as t,isPluginHookFunction as n,isPluginHookObject as r}from"../../powerlines/src/plugin-utils/helpers.mjs";import{Output as i}from"./core/components/output.mjs";import{createComponent as a}from"@alloy-js/core/jsx-runtime";import{flushJobsAsync as o,getContextForRenderNode as s,isPrintHook as c,renderTree as l}from"@alloy-js/core";import{LogLevelLabel as u}from"@storm-software/config-tools/types";import{isParentPath as d}from"@stryke/path/is-parent-path";import{replacePath as f}from"@stryke/path/replace";import{isSetString as p}from"@stryke/type-checks/is-set-string";import{printer as m}from"prettier/doc.js";function h(o){return s=>{let c=o(s);return{...c,async prepare(){let o=this;if(t(c.prepare)&&c.enforce!==`post`&&(n(c.prepare)||r(c.prepare)&&c.prepare.order!==`post`)&&await Promise.resolve(e(c.prepare).call(this)),t(c.render)){let e=l(a(i,{context:o,get basePath(){return o.workspaceConfig.workspaceRoot},get children(){return c.render.call(o)}}));await g(this,e,s?.alloy)}t(c.prepare)&&(c.enforce===`post`||r(c.prepare)&&c.prepare.order===`post`)&&await Promise.resolve(e(c.prepare).call(this))}}}}async function g(e,t,n={}){await o();let r,i=async(t,a)=>{if(!Array.isArray(a))return;let o=async e=>{for(let t of a)await i(e,t)},c=s(a);if(!c)return o(t);if(c.meta?.directory){let e={kind:`directory`,path:c.meta.directory.path,contents:[]};t?t.contents.push(e):r=e,await o(e)}else if(c.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;if(c.meta?.builtin){if(!c.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(u.TRACE,`Rendering built-in runtime module with ID: ${c.meta.builtin.id}`),r={kind:`builtin`,id:c.meta.builtin.id,path:f(c.meta.sourceFile.path,e.builtinsPath),filetype:c.meta.sourceFile.filetype,preset:c.meta.output?.mode,contents:await _(e,a,n)}}else c.meta?.entry||d(e.entryPath,c.meta.sourceFile.path)?(e.log(u.TRACE,`Rendering entry module at path: ${c.meta.sourceFile.path}`),r={kind:`entry`,typeDefinition:c.meta.entry?.typeDefinition,path:c.meta.sourceFile.path,filetype:c.meta.sourceFile.filetype,preset:c.meta.output?.mode,contents:await _(e,a,n)}):(e.log(u.TRACE,`Rendering source file at path: ${c.meta.sourceFile.path}`),r={kind:`file`,path:c.meta.sourceFile.path,filetype:c.meta.sourceFile.filetype,preset:c.meta.output?.mode,contents:await _(e,a,n)});t.contents.push(r)}else if(c.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(u.TRACE,`Processing copy file operation from "${c.meta.copyFile.sourcePath}" to "${c.meta.copyFile.path}"`),!c.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(!c.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.");t.contents.push({kind:`file`,path:c.meta.copyFile.path,sourcePath:c.meta.copyFile.sourcePath,preset:c.meta.output?.preset})}else await o(t)};await i(void 0,t);let a=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await a(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);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(!p(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&p(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 a(e,r)}async function _(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await o();let r=m.printDocToString(v(t),n).formatted;return n.insertFinalNewLine&&!r.endsWith(`
2
- `)?`${r}\n`:r}function v(e){let t=[];for(let n of e)if(typeof n==`string`){let e=n.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));t.push(e)}else c(n)?t.push(n.print(n.subtree,v)):t.push(v(n));return t}export{h as createAlloyPlugin};
1
+ import{getHookHandler as e,isPluginHook as t,isPluginHookFunction as n,isPluginHookObject as r}from"../../powerlines/src/plugin-utils/helpers.mjs";import{Output as i}from"./core/components/output.mjs";import{isSetString as a}from"@stryke/type-checks/is-set-string";import{LogLevelLabel as o}from"@storm-software/config-tools/types";import{replacePath as s}from"@stryke/path/replace";import{isParentPath as c}from"@stryke/path/is-parent-path";import{flushJobsAsync as l,getContextForRenderNode as u,isPrintHook as d,renderTree as f}from"@alloy-js/core";import{createComponent as p}from"@alloy-js/core/jsx-runtime";import{printer as m}from"prettier/doc.js";function h(a){return o=>{let s=a(o);return{...s,async prepare(){let a=this;if(t(s.prepare)&&s.enforce!==`post`&&(n(s.prepare)||r(s.prepare)&&s.prepare.order!==`post`)&&await Promise.resolve(e(s.prepare).call(this)),t(s.render)){let e=f(p(i,{context:a,get basePath(){return a.workspaceConfig.workspaceRoot},get children(){return s.render.call(a)}}));await g(this,e,o?.alloy)}t(s.prepare)&&(s.enforce===`post`||r(s.prepare)&&s.prepare.order===`post`)&&await Promise.resolve(e(s.prepare).call(this))}}}}async function g(e,t,n={}){await l();let r,i=async(t,a)=>{if(!Array.isArray(a))return;let l=async e=>{for(let t of a)await i(e,t)},d=u(a);if(!d)return l(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):r=e,await l(e)}else if(d.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;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(o.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:s(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await _(e,a,n)}}else d.meta?.entry||c(e.entryPath,d.meta.sourceFile.path)?(e.log(o.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),r={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await _(e,a,n)}):(e.log(o.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),r={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await _(e,a,n)});t.contents.push(r)}else if(d.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(o.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.");t.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await l(t)};await i(void 0,t);let d=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await d(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);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(!a(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&a(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 d(e,r)}async function _(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await l();let r=m.printDocToString(v(t),n).formatted;return n.insertFinalNewLine&&!r.endsWith(`
2
+ `)?`${r}\n`:r}function v(e){let t=[];for(let n of e)if(typeof n==`string`){let e=n.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));t.push(e)}else d(n)?t.push(n.print(n.subtree,v)):t.push(v(n));return t}export{h as createAlloyPlugin};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/components/single-line-comment.cjs`),n=require(`../../core/components/source-file.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@alloy-js/markdown`);function o(e){let[{children:t,preset:o},c]=(0,i.splitProps)(e,[`children`,`preset`]),l=(0,i.getContext)();return l.meta??={},l.meta.output={preset:o},(0,r.createComponent)(n.SourceFile,(0,r.mergeProps)({get header(){return(0,r.createComponent)(s,{})}},c,{filetype:`md`,reference:a.Link,get children(){return(0,r.createComponent)(i.Show,{get when(){return!!t},children:t})}}))}function s(e){let[{children:n,disableEslint:a=!0,disableBiome:o=!0,disablePrettier:s=!1}]=(0,i.splitProps)(e,[`children`,`disableEslint`,`disableBiome`,`disablePrettier`]);return[(0,r.createComponent)(i.Show,{get when(){return!!a},get children(){return[(0,r.createComponent)(t.SingleLineComment,{variant:`markdown`,children:`eslint-disable`}),(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(i.Show,{get when(){return!!s},get children(){return[(0,r.createComponent)(t.SingleLineComment,{variant:`markdown`,children:`prettier-ignore`}),(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(i.Show,{get when(){return!!o},get children(){return[(0,r.createComponent)(t.SingleLineComment,{variant:`markdown`,children:`biome-ignore lint: disable`}),(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(i.Show,{get when(){return!!a||!!s||!!o},get children(){return(0,r.createIntrinsic)(`hbr`,{})}}),(0,r.createComponent)(i.Show,{get when(){return!!n},get children(){return[n,(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(t.SingleLineComment,{variant:`markdown`,children:i.code`Generated by Powerlines`}),(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(t.SingleLineComment,{variant:`markdown`,children:i.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),(0,r.createIntrinsic)(`hbr`,{})]}exports.MarkdownFile=o;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/components/single-line-comment.cjs`),n=require(`../../core/components/source-file.cjs`);let r=require(`@alloy-js/core`),i=require(`@alloy-js/core/jsx-runtime`),a=require(`@alloy-js/markdown`);function o(e){let[{children:t,preset:o},c]=(0,r.splitProps)(e,[`children`,`preset`]),l=(0,r.getContext)();return l.meta??={},l.meta.output={preset:o},(0,i.createComponent)(n.SourceFile,(0,i.mergeProps)({get header(){return(0,i.createComponent)(s,{})}},c,{filetype:`md`,reference:a.Link,get children(){return(0,i.createComponent)(r.Show,{get when(){return!!t},children:t})}}))}function s(e){let[{children:n,disableEslint:a=!0,disableBiome:o=!0,disablePrettier:s=!1}]=(0,r.splitProps)(e,[`children`,`disableEslint`,`disableBiome`,`disablePrettier`]);return[(0,i.createComponent)(r.Show,{get when(){return!!a},get children(){return[(0,i.createComponent)(t.SingleLineComment,{variant:`markdown`,children:`eslint-disable`}),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(r.Show,{get when(){return!!s},get children(){return[(0,i.createComponent)(t.SingleLineComment,{variant:`markdown`,children:`prettier-ignore`}),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(r.Show,{get when(){return!!o},get children(){return[(0,i.createComponent)(t.SingleLineComment,{variant:`markdown`,children:`biome-ignore lint: disable`}),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(r.Show,{get when(){return!!a||!!s||!!o},get children(){return(0,i.createIntrinsic)(`hbr`,{})}}),(0,i.createComponent)(r.Show,{get when(){return!!n},get children(){return[n,(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(t.SingleLineComment,{variant:`markdown`,children:r.code`Generated by Powerlines`}),(0,i.createIntrinsic)(`hbr`,{}),(0,i.createComponent)(t.SingleLineComment,{variant:`markdown`,children:r.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),(0,i.createIntrinsic)(`hbr`,{})]}exports.MarkdownFile=o;
@@ -1 +1 @@
1
- import{SingleLineComment as e}from"../../core/components/single-line-comment.mjs";import{SourceFile as t}from"../../core/components/source-file.mjs";import{createComponent as n,createIntrinsic as r,mergeProps as i}from"@alloy-js/core/jsx-runtime";import{Show as a,code as o,getContext as s,splitProps as c}from"@alloy-js/core";import{Link as l}from"@alloy-js/markdown";function u(e){let[{children:r,preset:o},u]=c(e,[`children`,`preset`]),f=s();return f.meta??={},f.meta.output={preset:o},n(t,i({get header(){return n(d,{})}},u,{filetype:`md`,reference:l,get children(){return n(a,{get when(){return!!r},children:r})}}))}function d(t){let[{children:i,disableEslint:s=!0,disableBiome:l=!0,disablePrettier:u=!1}]=c(t,[`children`,`disableEslint`,`disableBiome`,`disablePrettier`]);return[n(a,{get when(){return!!s},get children(){return[n(e,{variant:`markdown`,children:`eslint-disable`}),r(`hbr`,{})]}}),n(a,{get when(){return!!u},get children(){return[n(e,{variant:`markdown`,children:`prettier-ignore`}),r(`hbr`,{})]}}),n(a,{get when(){return!!l},get children(){return[n(e,{variant:`markdown`,children:`biome-ignore lint: disable`}),r(`hbr`,{})]}}),n(a,{get when(){return!!s||!!u||!!l},get children(){return r(`hbr`,{})}}),n(a,{get when(){return!!i},get children(){return[i,r(`hbr`,{})]}}),n(e,{variant:`markdown`,children:o`Generated by Powerlines`}),r(`hbr`,{}),n(e,{variant:`markdown`,children:o`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),r(`hbr`,{})]}export{u as MarkdownFile};
1
+ import{SingleLineComment as e}from"../../core/components/single-line-comment.mjs";import{SourceFile as t}from"../../core/components/source-file.mjs";import{Show as n,code as r,getContext as i,splitProps as a}from"@alloy-js/core";import{createComponent as o,createIntrinsic as s,mergeProps as c}from"@alloy-js/core/jsx-runtime";import{Link as l}from"@alloy-js/markdown";function u(e){let[{children:r,preset:s},u]=a(e,[`children`,`preset`]),f=i();return f.meta??={},f.meta.output={preset:s},o(t,c({get header(){return o(d,{})}},u,{filetype:`md`,reference:l,get children(){return o(n,{get when(){return!!r},children:r})}}))}function d(t){let[{children:i,disableEslint:c=!0,disableBiome:l=!0,disablePrettier:u=!1}]=a(t,[`children`,`disableEslint`,`disableBiome`,`disablePrettier`]);return[o(n,{get when(){return!!c},get children(){return[o(e,{variant:`markdown`,children:`eslint-disable`}),s(`hbr`,{})]}}),o(n,{get when(){return!!u},get children(){return[o(e,{variant:`markdown`,children:`prettier-ignore`}),s(`hbr`,{})]}}),o(n,{get when(){return!!l},get children(){return[o(e,{variant:`markdown`,children:`biome-ignore lint: disable`}),s(`hbr`,{})]}}),o(n,{get when(){return!!c||!!u||!!l},get children(){return s(`hbr`,{})}}),o(n,{get when(){return!!i},get children(){return[i,s(`hbr`,{})]}}),o(e,{variant:`markdown`,children:r`Generated by Powerlines`}),s(`hbr`,{}),o(e,{variant:`markdown`,children:r`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),s(`hbr`,{})]}export{u as MarkdownFile};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../contexts/markdown-table.cjs`);let n=require(`@alloy-js/core/jsx-runtime`),r=require(`@alloy-js/core`),i=require(`@stryke/type-checks/is-undefined`),a=require(`@stryke/string-format/title-case`);function o(e){let[{children:i,data:a}]=(0,r.splitProps)(e,[`children`,`data`]),o=(0,r.computed)(()=>Object.keys(a).map((e,t)=>({index:t,name:e,align:`left`,width:20})));return(0,n.createComponent)(t.MarkdownTableContext.Provider,{get value(){return{columns:o.value,data:a}},get children(){return(0,n.createComponent)(r.Show,{get when(){return!!i},children:i})}})}exports.MarkdownTable=o;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../contexts/markdown-table.cjs`);let n=require(`@stryke/string-format/title-case`),r=require(`@alloy-js/core`),i=require(`@alloy-js/core/jsx-runtime`),a=require(`@stryke/type-checks/is-undefined`);function o(e){let[{children:n,data:a}]=(0,r.splitProps)(e,[`children`,`data`]),o=(0,r.computed)(()=>Object.keys(a).map((e,t)=>({index:t,name:e,align:`left`,width:20})));return(0,i.createComponent)(t.MarkdownTableContext.Provider,{get value(){return{columns:o.value,data:a}},get children(){return(0,i.createComponent)(r.Show,{get when(){return!!n},children:n})}})}exports.MarkdownTable=o;
@@ -1 +1 @@
1
- import{MarkdownTableContext as e}from"../contexts/markdown-table.mjs";import{createComponent as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{Prose as r,Show as i,code as a,computed as o,splitProps as s}from"@alloy-js/core";import{isUndefined as c}from"@stryke/type-checks/is-undefined";import{titleCase as l}from"@stryke/string-format/title-case";function u(n){let[{children:r,data:a}]=s(n,[`children`,`data`]),c=o(()=>Object.keys(a).map((e,t)=>({index:t,name:e,align:`left`,width:20})));return t(e.Provider,{get value(){return{columns:c.value,data:a}},get children(){return t(i,{get when(){return!!r},children:r})}})}export{u as MarkdownTable};
1
+ import{MarkdownTableContext as e}from"../contexts/markdown-table.mjs";import{titleCase as t}from"@stryke/string-format/title-case";import{Prose as n,Show as r,code as i,computed as a,splitProps as o}from"@alloy-js/core";import{createComponent as s,mergeProps as c}from"@alloy-js/core/jsx-runtime";import{isUndefined as l}from"@stryke/type-checks/is-undefined";function u(t){let[{children:n,data:i}]=o(t,[`children`,`data`]),c=a(()=>Object.keys(i).map((e,t)=>({index:t,name:e,align:`left`,width:20})));return s(e.Provider,{get value(){return{columns:c.value,data:i}},get children(){return s(r,{get when(){return!!n},children:n})}})}export{u as MarkdownTable};
@@ -1,7 +1,7 @@
1
1
  import "../../../powerlines/src/types/fs.mjs";
2
2
  import "../../../powerlines/src/types/resolved.mjs";
3
- import { Children } from "@alloy-js/core/jsx-runtime";
4
3
  import "@alloy-js/core";
4
+ import { Children as Children$1 } from "@alloy-js/core/jsx-runtime";
5
5
  import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
6
6
 
7
7
  //#region ../alloy/src/types/components.d.ts
@@ -10,7 +10,7 @@ import { SourceFileContext as SourceFileContext$1 } from "@alloy-js/typescript";
10
10
  * A type that represents the props of a component that can have children.
11
11
  */
12
12
  interface ComponentProps {
13
- children?: Children;
13
+ children?: Children$1;
14
14
  }
15
15
  interface TypescriptFileImportItem {
16
16
  name: string;
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./tsdoc.cjs`),n=require(`./typescript-file.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`);function a(e){let[{children:a,imports:o,id:s,description:c,tsx:l},u]=(0,i.splitProps)(e,[`children`,`imports`,`id`,`description`,`tsx`]);return(0,r.createComponent)(n.TypescriptFile,(0,r.mergeProps)({get header(){return(0,r.createComponent)(n.TypescriptFileHeader,{get header(){return(0,r.createComponent)(t.TSDocModule,{name:s,children:c})},get children(){return(0,r.createComponent)(n.TypescriptFileHeaderImports,{imports:o})}})},meta:{builtin:{id:s}}},u,{path:`${s}${l?`.tsx`:`.ts`}`,children:a}))}exports.BuiltinFile=a;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./tsdoc.cjs`),n=require(`./typescript-file.cjs`);let r=require(`@alloy-js/core`),i=require(`@alloy-js/core/jsx-runtime`);function a(e){let[{children:a,imports:o,id:s,description:c,tsx:l},u]=(0,r.splitProps)(e,[`children`,`imports`,`id`,`description`,`tsx`]);return(0,i.createComponent)(n.TypescriptFile,(0,i.mergeProps)({get header(){return(0,i.createComponent)(n.TypescriptFileHeader,{get header(){return(0,i.createComponent)(t.TSDocModule,{name:s,children:c})},get children(){return(0,i.createComponent)(n.TypescriptFileHeaderImports,{imports:o})}})},meta:{builtin:{id:s}}},u,{path:`${s}${l?`.tsx`:`.ts`}`,children:a}))}exports.BuiltinFile=a;
@@ -1 +1 @@
1
- import{TSDocModule as e}from"./tsdoc.mjs";import{TypescriptFile as t,TypescriptFileHeader as n,TypescriptFileHeaderImports as r}from"./typescript-file.mjs";import{createComponent as i,mergeProps as a}from"@alloy-js/core/jsx-runtime";import{splitProps as o}from"@alloy-js/core";function s(s){let[{children:c,imports:l,id:u,description:d,tsx:f},p]=o(s,[`children`,`imports`,`id`,`description`,`tsx`]);return i(t,a({get header(){return i(n,{get header(){return i(e,{name:u,children:d})},get children(){return i(r,{imports:l})}})},meta:{builtin:{id:u}}},p,{path:`${u}${f?`.tsx`:`.ts`}`,children:c}))}export{s as BuiltinFile};
1
+ import{TSDocModule as e}from"./tsdoc.mjs";import{TypescriptFile as t,TypescriptFileHeader as n,TypescriptFileHeaderImports as r}from"./typescript-file.mjs";import{splitProps as i}from"@alloy-js/core";import{createComponent as a,mergeProps as o}from"@alloy-js/core/jsx-runtime";function s(s){let[{children:c,imports:l,id:u,description:d,tsx:f},p]=i(s,[`children`,`imports`,`id`,`description`,`tsx`]);return a(t,o({get header(){return a(n,{get header(){return a(e,{name:u,children:d})},get children(){return a(r,{imports:l})}})},meta:{builtin:{id:u}}},p,{path:`${u}${f?`.tsx`:`.ts`}`,children:c}))}export{s as BuiltinFile};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./tsdoc.cjs`),n=require(`../../core/contexts/reflection.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@stryke/type-checks/is-set-string`),o=require(`@stryke/type-checks/is-undefined`),s=require(`@stryke/string-format/title-case`),c=require(`@stryke/type-checks/is-string`);function l(e){let[{children:c},l]=(0,i.splitProps)(e,[`children`]),u=n.useReflectionClass(),d=(0,i.computed)(()=>u.reflection.getTitle()||(0,s.titleCase)(u.reflection.getName())),f=(0,i.computed)(()=>u.reflection.getAlias()),p=(0,i.computed)(()=>u.reflection.getDomain()),m=(0,i.computed)(()=>u.reflection.getPermission()),h=(0,i.computed)(()=>u.reflection.isReadonly()),g=(0,i.computed)(()=>u.reflection.isInternal()),_=(0,i.computed)(()=>u.reflection.isIgnored()),v=(0,i.computed)(()=>u.reflection.isHidden());return u.reflection.getName()?(0,r.createComponent)(t.TSDoc,(0,r.mergeProps)(l,{get heading(){return u.reflection.getDescription()},get children(){return[(0,r.createComponent)(i.Show,{get when(){return(0,a.isSetString)(d.value)||!(0,o.isUndefined)(f.value)&&f.value.length>0||!(0,o.isUndefined)(m.value)&&m.value.length>0||(0,a.isSetString)(p.value)||!(0,o.isUndefined)(h.value)||!(0,o.isUndefined)(g.value)||!(0,o.isUndefined)(_.value)||!(0,o.isUndefined)(v.value)},get children(){return(0,r.createComponent)(t.TSDocAttributesTags,{get title(){return d.value},get alias(){return f.value},get domain(){return p.value},get permission(){return m.value},get readonly(){return h.value},get internal(){return g.value},get ignore(){return _.value},get hidden(){return v.value}})}}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!!c)()&&(0,i.childrenArray)(()=>c).length>0},get children(){return(0,r.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>c)}})}})]}})):null}function u(e){let[{children:a},o]=(0,i.splitProps)(e,[`children`]),s=n.useReflectionProperty();return(0,r.createComponent)(t.TSDoc,(0,r.mergeProps)({get heading(){return s.getDescription()}},o,{get children(){return[(0,r.createComponent)(t.TSDocAttributesTags,{get title(){return s.getTitle()},get alias(){return s.getAlias()},get domain(){return s.getDomain()},get permission(){return s.getPermission()},get readonly(){return s.isReadonly()},get internal(){return s.isInternal()},get ignore(){return s.isIgnored()},get hidden(){return s.isHidden()}}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!!a)()&&(0,i.childrenArray)(()=>a).length>0},get children(){return(0,r.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>a)}})}})]}}))}exports.TSDocReflectionClass=l,exports.TSDocReflectionProperty=u;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./tsdoc.cjs`),n=require(`../../core/contexts/reflection.cjs`);let r=require(`@stryke/string-format/title-case`),i=require(`@stryke/type-checks/is-set-string`),a=require(`@stryke/type-checks/is-string`),o=require(`@alloy-js/core`),s=require(`@alloy-js/core/jsx-runtime`),c=require(`@stryke/type-checks/is-undefined`);function l(e){let[{children:a},l]=(0,o.splitProps)(e,[`children`]),u=n.useReflectionClass(),d=(0,o.computed)(()=>u.reflection.getTitle()||(0,r.titleCase)(u.reflection.getName())),f=(0,o.computed)(()=>u.reflection.getAlias()),p=(0,o.computed)(()=>u.reflection.getDomain()),m=(0,o.computed)(()=>u.reflection.getPermission()),h=(0,o.computed)(()=>u.reflection.isReadonly()),g=(0,o.computed)(()=>u.reflection.isInternal()),_=(0,o.computed)(()=>u.reflection.isIgnored()),v=(0,o.computed)(()=>u.reflection.isHidden());return u.reflection.getName()?(0,s.createComponent)(t.TSDoc,(0,s.mergeProps)(l,{get heading(){return u.reflection.getDescription()},get children(){return[(0,s.createComponent)(o.Show,{get when(){return(0,i.isSetString)(d.value)||!(0,c.isUndefined)(f.value)&&f.value.length>0||!(0,c.isUndefined)(m.value)&&m.value.length>0||(0,i.isSetString)(p.value)||!(0,c.isUndefined)(h.value)||!(0,c.isUndefined)(g.value)||!(0,c.isUndefined)(_.value)||!(0,c.isUndefined)(v.value)},get children(){return(0,s.createComponent)(t.TSDocAttributesTags,{get title(){return d.value},get alias(){return f.value},get domain(){return p.value},get permission(){return m.value},get readonly(){return h.value},get internal(){return g.value},get ignore(){return _.value},get hidden(){return v.value}})}}),(0,s.createComponent)(o.Show,{get when(){return(0,s.memo)(()=>!!a)()&&(0,o.childrenArray)(()=>a).length>0},get children(){return(0,s.createComponent)(o.List,{get children(){return(0,o.childrenArray)(()=>a)}})}})]}})):null}function u(e){let[{children:r},i]=(0,o.splitProps)(e,[`children`]),a=n.useReflectionProperty();return(0,s.createComponent)(t.TSDoc,(0,s.mergeProps)({get heading(){return a.getDescription()}},i,{get children(){return[(0,s.createComponent)(t.TSDocAttributesTags,{get title(){return a.getTitle()},get alias(){return a.getAlias()},get domain(){return a.getDomain()},get permission(){return a.getPermission()},get readonly(){return a.isReadonly()},get internal(){return a.isInternal()},get ignore(){return a.isIgnored()},get hidden(){return a.isHidden()}}),(0,s.createComponent)(o.Show,{get when(){return(0,s.memo)(()=>!!r)()&&(0,o.childrenArray)(()=>r).length>0},get children(){return(0,s.createComponent)(o.List,{get children(){return(0,o.childrenArray)(()=>r)}})}})]}}))}exports.TSDocReflectionClass=l,exports.TSDocReflectionProperty=u;
@@ -1 +1 @@
1
- import{TSDoc as e,TSDocAttributesTags as t}from"./tsdoc.mjs";import{useReflectionClass as n,useReflectionProperty as r}from"../../core/contexts/reflection.mjs";import{createComponent as i,memo as a,mergeProps as o}from"@alloy-js/core/jsx-runtime";import{List as s,Show as c,childrenArray as l,code as u,computed as d,splitProps as f}from"@alloy-js/core";import{isSetString as p}from"@stryke/type-checks/is-set-string";import{isUndefined as m}from"@stryke/type-checks/is-undefined";import{titleCase as h}from"@stryke/string-format/title-case";import{isString as g}from"@stryke/type-checks/is-string";function _(r){let[{children:u},g]=f(r,[`children`]),_=n(),v=d(()=>_.reflection.getTitle()||h(_.reflection.getName())),y=d(()=>_.reflection.getAlias()),b=d(()=>_.reflection.getDomain()),x=d(()=>_.reflection.getPermission()),S=d(()=>_.reflection.isReadonly()),C=d(()=>_.reflection.isInternal()),w=d(()=>_.reflection.isIgnored()),T=d(()=>_.reflection.isHidden());return _.reflection.getName()?i(e,o(g,{get heading(){return _.reflection.getDescription()},get children(){return[i(c,{get when(){return p(v.value)||!m(y.value)&&y.value.length>0||!m(x.value)&&x.value.length>0||p(b.value)||!m(S.value)||!m(C.value)||!m(w.value)||!m(T.value)},get children(){return i(t,{get title(){return v.value},get alias(){return y.value},get domain(){return b.value},get permission(){return x.value},get readonly(){return S.value},get internal(){return C.value},get ignore(){return w.value},get hidden(){return T.value}})}}),i(c,{get when(){return a(()=>!!u)()&&l(()=>u).length>0},get children(){return i(s,{get children(){return l(()=>u)}})}})]}})):null}function v(n){let[{children:u},d]=f(n,[`children`]),p=r();return i(e,o({get heading(){return p.getDescription()}},d,{get children(){return[i(t,{get title(){return p.getTitle()},get alias(){return p.getAlias()},get domain(){return p.getDomain()},get permission(){return p.getPermission()},get readonly(){return p.isReadonly()},get internal(){return p.isInternal()},get ignore(){return p.isIgnored()},get hidden(){return p.isHidden()}}),i(c,{get when(){return a(()=>!!u)()&&l(()=>u).length>0},get children(){return i(s,{get children(){return l(()=>u)}})}})]}}))}export{_ as TSDocReflectionClass,v as TSDocReflectionProperty};
1
+ import{TSDoc as e,TSDocAttributesTags as t}from"./tsdoc.mjs";import{useReflectionClass as n,useReflectionProperty as r}from"../../core/contexts/reflection.mjs";import{titleCase as i}from"@stryke/string-format/title-case";import{isSetString as a}from"@stryke/type-checks/is-set-string";import{isString as o}from"@stryke/type-checks/is-string";import{List as s,Show as c,childrenArray as l,code as u,computed as d,splitProps as f}from"@alloy-js/core";import{createComponent as p,memo as m,mergeProps as h}from"@alloy-js/core/jsx-runtime";import{isUndefined as g}from"@stryke/type-checks/is-undefined";function _(r){let[{children:o},u]=f(r,[`children`]),_=n(),v=d(()=>_.reflection.getTitle()||i(_.reflection.getName())),y=d(()=>_.reflection.getAlias()),b=d(()=>_.reflection.getDomain()),x=d(()=>_.reflection.getPermission()),S=d(()=>_.reflection.isReadonly()),C=d(()=>_.reflection.isInternal()),w=d(()=>_.reflection.isIgnored()),T=d(()=>_.reflection.isHidden());return _.reflection.getName()?p(e,h(u,{get heading(){return _.reflection.getDescription()},get children(){return[p(c,{get when(){return a(v.value)||!g(y.value)&&y.value.length>0||!g(x.value)&&x.value.length>0||a(b.value)||!g(S.value)||!g(C.value)||!g(w.value)||!g(T.value)},get children(){return p(t,{get title(){return v.value},get alias(){return y.value},get domain(){return b.value},get permission(){return x.value},get readonly(){return S.value},get internal(){return C.value},get ignore(){return w.value},get hidden(){return T.value}})}}),p(c,{get when(){return m(()=>!!o)()&&l(()=>o).length>0},get children(){return p(s,{get children(){return l(()=>o)}})}})]}})):null}function v(n){let[{children:i},a]=f(n,[`children`]),o=r();return p(e,h({get heading(){return o.getDescription()}},a,{get children(){return[p(t,{get title(){return o.getTitle()},get alias(){return o.getAlias()},get domain(){return o.getDomain()},get permission(){return o.getPermission()},get readonly(){return o.isReadonly()},get internal(){return o.isInternal()},get ignore(){return o.isIgnored()},get hidden(){return o.isHidden()}}),p(c,{get when(){return m(()=>!!i)()&&l(()=>i).length>0},get children(){return p(s,{get children(){return l(()=>i)}})}})]}}))}export{_ as TSDocReflectionClass,v as TSDocReflectionProperty};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/contexts/context.cjs`),n=require(`../../../../deepkit/src/utilities.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@stryke/type-checks/is-set-string`),o=require(`@stryke/type-checks/is-undefined`);function s(e){let[{children:t,heading:n}]=(0,i.splitProps)(e,[`children`,`heading`]);return[`/**`,(0,r.createIntrinsic)(`align`,{string:` * `,get children(){return[(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(n)},get children(){return[n,(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!(0,o.isUndefined)(t))()&&(0,i.childrenArray)(()=>t).length>0},get children(){return(0,r.createIntrinsic)(`hbr`,{})}})]}}),(0,r.createComponent)(i.Show,{get when(){return(0,r.memo)(()=>!(0,o.isUndefined)(t))()&&(0,i.childrenArray)(()=>t).length>0},get children(){return(0,r.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>t)}})}})]}}),(0,r.createIntrinsic)(`hbr`,{}),` */`,(0,r.createIntrinsic)(`hbr`,{})]}function c(e){let[{children:t,tag:n}]=(0,i.splitProps)(e,[`children`,`tag`]);return[`@${n} `,(0,r.createComponent)(i.Show,{get when(){return!!t},get children(){return(0,r.createIntrinsic)(`align`,{width:2,get children(){return(0,r.createComponent)(i.Prose,{children:t})}})}}),(0,r.createIntrinsic)(`hbr`,{})]}function l(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`title`,children:t}))}function u(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`domain`,children:t}))}function d(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`alias`,children:t}))}function f(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,r.createComponent)(c,(0,r.mergeProps)(n,{tag:`permission`,children:t}))}function p(e){return[`@defaultValue `,(0,r.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(e.value)},get children(){return(0,r.createIntrinsic)(`align`,{width:2,get children(){return(0,r.createComponent)(i.Prose,{get children(){return n.stringifyDefaultValue(e.value)}})}})}}),(0,r.createIntrinsic)(`hbr`,{})]}function m(e){return[`@remarks `,(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.List,{hardline:!0,get children(){return(0,i.childrenArray)(()=>e.children)}})]}function h(e){return(0,r.createComponent)(c,(0,r.mergeProps)(e,{tag:`see`}))}function g(e){let[{tsx:t,fenced:n=!0,language:a,children:o}]=(0,i.splitProps)(e,[`tsx`,`fenced`,`language`,`children`]);return[`@example `,(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{when:n,get children(){return["```",a||(t?`tsx`:`ts`),(0,r.createIntrinsic)(`hbr`,{})]}}),o,(0,r.createComponent)(i.Show,{when:n,get children(){return[(0,r.createIntrinsic)(`hbr`,{}),"```"]}})]}function _(){return(0,r.createComponent)(c,{tag:`readonly`})}function v(){return(0,r.createComponent)(c,{tag:`internal`})}function y(){return(0,r.createComponent)(c,{tag:`ignore`})}function b(){return(0,r.createComponent)(c,{tag:`hidden`})}function x(e){let[{title:t,alias:n,permission:s,domain:c,readonly:m,internal:h,ignore:g,hidden:x,defaultValue:S}]=(0,i.splitProps)(e,[`title`,`alias`,`permission`,`domain`,`readonly`,`internal`,`ignore`,`hidden`,`defaultValue`]);return[(0,r.createComponent)(i.Show,{get when(){return(0,a.isSetString)(t)},get children(){return(0,r.createComponent)(l,{children:t})}}),(0,r.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(n)&&n.length>0},get children(){return(0,r.createComponent)(i.For,{each:n??[],children:e=>(0,r.createComponent)(d,{children:e})})}}),(0,r.createComponent)(i.Show,{get when(){return(0,a.isSetString)(c)},get children(){return(0,r.createComponent)(u,{children:c})}}),(0,r.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(s)&&s.length>0},get children(){return(0,r.createComponent)(i.For,{each:s??[],children:e=>(0,r.createComponent)(f,{children:e})})}}),(0,r.createComponent)(i.Show,{when:m===!0,get children(){return(0,r.createComponent)(_,{})}}),(0,r.createComponent)(i.Show,{when:h===!0,get children(){return(0,r.createComponent)(v,{})}}),(0,r.createComponent)(i.Show,{when:g===!0,get children(){return(0,r.createComponent)(y,{})}}),(0,r.createComponent)(i.Show,{when:x===!0,get children(){return(0,r.createComponent)(b,{})}}),(0,r.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(S)},get children(){return(0,r.createComponent)(p,{value:S})}})]}function S(e){return[`@param `,(0,r.createComponent)(C,{get name(){return e.name},get optional(){return e.optional},get defaultValue(){return e.defaultValue}}),(0,r.createComponent)(w,{get children(){return e.children}})]}function C(e){return[(0,r.createComponent)(i.Show,{get when(){return e.optional},children:`[`}),(0,r.memo)(()=>e.name),(0,r.createComponent)(i.Show,{get when(){return!!e.defaultValue},get children(){return[`=`,(0,r.memo)(()=>e.defaultValue)]}}),(0,r.createComponent)(i.Show,{get when(){return e.optional},children:`]`})]}function w(e){return(0,r.createComponent)(i.Show,{get when(){return!!e.children},get children(){return[` - `,(0,r.createIntrinsic)(`align`,{width:2,get children(){return(0,r.createComponent)(i.Prose,{get children(){return e.children}})}})]}})}function T(e){return(0,r.createComponent)(c,(0,r.mergeProps)(e,{tag:`returns`}))}function E(e){return(0,r.createComponent)(c,(0,r.mergeProps)(e,{tag:`throws`}))}function D(e){let[{children:n,name:a,prefix:o}]=(0,i.splitProps)(e,[`children`,`name`,`prefix`]),s=t.usePowerlines();return[`/**`,(0,r.createIntrinsic)(`align`,{string:` * `,get children(){return[(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return!!n},get children(){return[(0,r.createComponent)(i.List,{hardline:!0,get children(){return(0,i.childrenArray)(()=>n)}}),(0,r.createIntrinsic)(`hbr`,{}),(0,r.createIntrinsic)(`hbr`,{})]}}),`@module `,(0,r.memo)(()=>o||s?.config.output.builtinPrefix),`:`,a]}}),(0,r.createIntrinsic)(`hbr`,{}),` */`]}exports.TSDoc=s,exports.TSDocAttributesTags=x,exports.TSDocExample=g,exports.TSDocLink=h,exports.TSDocModule=D,exports.TSDocParam=S,exports.TSDocRemarks=m,exports.TSDocReturns=T,exports.TSDocThrows=E;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/contexts/context.cjs`),n=require(`../../../../deepkit/src/utilities.cjs`);let r=require(`@stryke/type-checks/is-set-string`),i=require(`@alloy-js/core`),a=require(`@alloy-js/core/jsx-runtime`),o=require(`@stryke/type-checks/is-undefined`);function s(e){let[{children:t,heading:n}]=(0,i.splitProps)(e,[`children`,`heading`]);return[`/**`,(0,a.createIntrinsic)(`align`,{string:` * `,get children(){return[(0,a.createIntrinsic)(`hbr`,{}),(0,a.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(n)},get children(){return[n,(0,a.createIntrinsic)(`hbr`,{}),(0,a.createComponent)(i.Show,{get when(){return(0,a.memo)(()=>!(0,o.isUndefined)(t))()&&(0,i.childrenArray)(()=>t).length>0},get children(){return(0,a.createIntrinsic)(`hbr`,{})}})]}}),(0,a.createComponent)(i.Show,{get when(){return(0,a.memo)(()=>!(0,o.isUndefined)(t))()&&(0,i.childrenArray)(()=>t).length>0},get children(){return(0,a.createComponent)(i.List,{get children(){return(0,i.childrenArray)(()=>t)}})}})]}}),(0,a.createIntrinsic)(`hbr`,{}),` */`,(0,a.createIntrinsic)(`hbr`,{})]}function c(e){let[{children:t,tag:n}]=(0,i.splitProps)(e,[`children`,`tag`]);return[`@${n} `,(0,a.createComponent)(i.Show,{get when(){return!!t},get children(){return(0,a.createIntrinsic)(`align`,{width:2,get children(){return(0,a.createComponent)(i.Prose,{children:t})}})}}),(0,a.createIntrinsic)(`hbr`,{})]}function l(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,a.createComponent)(c,(0,a.mergeProps)(n,{tag:`title`,children:t}))}function u(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,a.createComponent)(c,(0,a.mergeProps)(n,{tag:`domain`,children:t}))}function d(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,a.createComponent)(c,(0,a.mergeProps)(n,{tag:`alias`,children:t}))}function f(e){let[{children:t},n]=(0,i.splitProps)(e,[`children`]);return(0,a.createComponent)(c,(0,a.mergeProps)(n,{tag:`permission`,children:t}))}function p(e){return[`@defaultValue `,(0,a.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(e.value)},get children(){return(0,a.createIntrinsic)(`align`,{width:2,get children(){return(0,a.createComponent)(i.Prose,{get children(){return n.stringifyDefaultValue(e.value)}})}})}}),(0,a.createIntrinsic)(`hbr`,{})]}function m(e){return[`@remarks `,(0,a.createIntrinsic)(`hbr`,{}),(0,a.createComponent)(i.List,{hardline:!0,get children(){return(0,i.childrenArray)(()=>e.children)}})]}function h(e){return(0,a.createComponent)(c,(0,a.mergeProps)(e,{tag:`see`}))}function g(e){let[{tsx:t,fenced:n=!0,language:r,children:o}]=(0,i.splitProps)(e,[`tsx`,`fenced`,`language`,`children`]);return[`@example `,(0,a.createIntrinsic)(`hbr`,{}),(0,a.createComponent)(i.Show,{when:n,get children(){return["```",r||(t?`tsx`:`ts`),(0,a.createIntrinsic)(`hbr`,{})]}}),o,(0,a.createComponent)(i.Show,{when:n,get children(){return[(0,a.createIntrinsic)(`hbr`,{}),"```"]}})]}function _(){return(0,a.createComponent)(c,{tag:`readonly`})}function v(){return(0,a.createComponent)(c,{tag:`internal`})}function y(){return(0,a.createComponent)(c,{tag:`ignore`})}function b(){return(0,a.createComponent)(c,{tag:`hidden`})}function x(e){let[{title:t,alias:n,permission:s,domain:c,readonly:m,internal:h,ignore:g,hidden:x,defaultValue:S}]=(0,i.splitProps)(e,[`title`,`alias`,`permission`,`domain`,`readonly`,`internal`,`ignore`,`hidden`,`defaultValue`]);return[(0,a.createComponent)(i.Show,{get when(){return(0,r.isSetString)(t)},get children(){return(0,a.createComponent)(l,{children:t})}}),(0,a.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(n)&&n.length>0},get children(){return(0,a.createComponent)(i.For,{each:n??[],children:e=>(0,a.createComponent)(d,{children:e})})}}),(0,a.createComponent)(i.Show,{get when(){return(0,r.isSetString)(c)},get children(){return(0,a.createComponent)(u,{children:c})}}),(0,a.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(s)&&s.length>0},get children(){return(0,a.createComponent)(i.For,{each:s??[],children:e=>(0,a.createComponent)(f,{children:e})})}}),(0,a.createComponent)(i.Show,{when:m===!0,get children(){return(0,a.createComponent)(_,{})}}),(0,a.createComponent)(i.Show,{when:h===!0,get children(){return(0,a.createComponent)(v,{})}}),(0,a.createComponent)(i.Show,{when:g===!0,get children(){return(0,a.createComponent)(y,{})}}),(0,a.createComponent)(i.Show,{when:x===!0,get children(){return(0,a.createComponent)(b,{})}}),(0,a.createComponent)(i.Show,{get when(){return!(0,o.isUndefined)(S)},get children(){return(0,a.createComponent)(p,{value:S})}})]}function S(e){return[`@param `,(0,a.createComponent)(C,{get name(){return e.name},get optional(){return e.optional},get defaultValue(){return e.defaultValue}}),(0,a.createComponent)(w,{get children(){return e.children}})]}function C(e){return[(0,a.createComponent)(i.Show,{get when(){return e.optional},children:`[`}),(0,a.memo)(()=>e.name),(0,a.createComponent)(i.Show,{get when(){return!!e.defaultValue},get children(){return[`=`,(0,a.memo)(()=>e.defaultValue)]}}),(0,a.createComponent)(i.Show,{get when(){return e.optional},children:`]`})]}function w(e){return(0,a.createComponent)(i.Show,{get when(){return!!e.children},get children(){return[` - `,(0,a.createIntrinsic)(`align`,{width:2,get children(){return(0,a.createComponent)(i.Prose,{get children(){return e.children}})}})]}})}function T(e){return(0,a.createComponent)(c,(0,a.mergeProps)(e,{tag:`returns`}))}function E(e){return(0,a.createComponent)(c,(0,a.mergeProps)(e,{tag:`throws`}))}function D(e){let[{children:n,name:r,prefix:o}]=(0,i.splitProps)(e,[`children`,`name`,`prefix`]),s=t.usePowerlines();return[`/**`,(0,a.createIntrinsic)(`align`,{string:` * `,get children(){return[(0,a.createIntrinsic)(`hbr`,{}),(0,a.createComponent)(i.Show,{get when(){return!!n},get children(){return[(0,a.createComponent)(i.List,{hardline:!0,get children(){return(0,i.childrenArray)(()=>n)}}),(0,a.createIntrinsic)(`hbr`,{}),(0,a.createIntrinsic)(`hbr`,{})]}}),`@module `,(0,a.memo)(()=>o||s?.config.output.builtinPrefix),`:`,r]}}),(0,a.createIntrinsic)(`hbr`,{}),` */`]}exports.TSDoc=s,exports.TSDocAttributesTags=x,exports.TSDocExample=g,exports.TSDocLink=h,exports.TSDocModule=D,exports.TSDocParam=S,exports.TSDocRemarks=m,exports.TSDocReturns=T,exports.TSDocThrows=E;
@@ -1 +1 @@
1
- import{usePowerlines as e}from"../../core/contexts/context.mjs";import{stringifyDefaultValue as t}from"../../../../deepkit/src/utilities.mjs";import{createComponent as n,createIntrinsic as r,memo as i,mergeProps as a}from"@alloy-js/core/jsx-runtime";import{For as o,List as s,Prose as c,Show as l,childrenArray as u,splitProps as d}from"@alloy-js/core";import{isSetString as f}from"@stryke/type-checks/is-set-string";import{isUndefined as p}from"@stryke/type-checks/is-undefined";function m(e){let[{children:t,heading:a}]=d(e,[`children`,`heading`]);return[`/**`,r(`align`,{string:` * `,get children(){return[r(`hbr`,{}),n(l,{get when(){return!p(a)},get children(){return[a,r(`hbr`,{}),n(l,{get when(){return i(()=>!p(t))()&&u(()=>t).length>0},get children(){return r(`hbr`,{})}})]}}),n(l,{get when(){return i(()=>!p(t))()&&u(()=>t).length>0},get children(){return n(s,{get children(){return u(()=>t)}})}})]}}),r(`hbr`,{}),` */`,r(`hbr`,{})]}function h(e){let[{children:t,tag:i}]=d(e,[`children`,`tag`]);return[`@${i} `,n(l,{get when(){return!!t},get children(){return r(`align`,{width:2,get children(){return n(c,{children:t})}})}}),r(`hbr`,{})]}function g(e){let[{children:t},r]=d(e,[`children`]);return n(h,a(r,{tag:`title`,children:t}))}function _(e){let[{children:t},r]=d(e,[`children`]);return n(h,a(r,{tag:`domain`,children:t}))}function v(e){let[{children:t},r]=d(e,[`children`]);return n(h,a(r,{tag:`alias`,children:t}))}function y(e){let[{children:t},r]=d(e,[`children`]);return n(h,a(r,{tag:`permission`,children:t}))}function b(e){return[`@defaultValue `,n(l,{get when(){return!p(e.value)},get children(){return r(`align`,{width:2,get children(){return n(c,{get children(){return t(e.value)}})}})}}),r(`hbr`,{})]}function x(e){return[`@remarks `,r(`hbr`,{}),n(s,{hardline:!0,get children(){return u(()=>e.children)}})]}function S(e){return n(h,a(e,{tag:`see`}))}function C(e){let[{tsx:t,fenced:i=!0,language:a,children:o}]=d(e,[`tsx`,`fenced`,`language`,`children`]);return[`@example `,r(`hbr`,{}),n(l,{when:i,get children(){return["```",a||(t?`tsx`:`ts`),r(`hbr`,{})]}}),o,n(l,{when:i,get children(){return[r(`hbr`,{}),"```"]}})]}function w(){return n(h,{tag:`readonly`})}function T(){return n(h,{tag:`internal`})}function E(){return n(h,{tag:`ignore`})}function D(){return n(h,{tag:`hidden`})}function O(e){let[{title:t,alias:r,permission:i,domain:a,readonly:s,internal:c,ignore:u,hidden:m,defaultValue:h}]=d(e,[`title`,`alias`,`permission`,`domain`,`readonly`,`internal`,`ignore`,`hidden`,`defaultValue`]);return[n(l,{get when(){return f(t)},get children(){return n(g,{children:t})}}),n(l,{get when(){return!p(r)&&r.length>0},get children(){return n(o,{each:r??[],children:e=>n(v,{children:e})})}}),n(l,{get when(){return f(a)},get children(){return n(_,{children:a})}}),n(l,{get when(){return!p(i)&&i.length>0},get children(){return n(o,{each:i??[],children:e=>n(y,{children:e})})}}),n(l,{when:s===!0,get children(){return n(w,{})}}),n(l,{when:c===!0,get children(){return n(T,{})}}),n(l,{when:u===!0,get children(){return n(E,{})}}),n(l,{when:m===!0,get children(){return n(D,{})}}),n(l,{get when(){return!p(h)},get children(){return n(b,{value:h})}})]}function k(e){return[`@param `,n(A,{get name(){return e.name},get optional(){return e.optional},get defaultValue(){return e.defaultValue}}),n(j,{get children(){return e.children}})]}function A(e){return[n(l,{get when(){return e.optional},children:`[`}),i(()=>e.name),n(l,{get when(){return!!e.defaultValue},get children(){return[`=`,i(()=>e.defaultValue)]}}),n(l,{get when(){return e.optional},children:`]`})]}function j(e){return n(l,{get when(){return!!e.children},get children(){return[` - `,r(`align`,{width:2,get children(){return n(c,{get children(){return e.children}})}})]}})}function M(e){return n(h,a(e,{tag:`returns`}))}function N(e){return n(h,a(e,{tag:`throws`}))}function P(t){let[{children:a,name:o,prefix:c}]=d(t,[`children`,`name`,`prefix`]),f=e();return[`/**`,r(`align`,{string:` * `,get children(){return[r(`hbr`,{}),n(l,{get when(){return!!a},get children(){return[n(s,{hardline:!0,get children(){return u(()=>a)}}),r(`hbr`,{}),r(`hbr`,{})]}}),`@module `,i(()=>c||f?.config.output.builtinPrefix),`:`,o]}}),r(`hbr`,{}),` */`]}export{m as TSDoc,O as TSDocAttributesTags,C as TSDocExample,S as TSDocLink,P as TSDocModule,k as TSDocParam,x as TSDocRemarks,M as TSDocReturns,N as TSDocThrows};
1
+ import{usePowerlines as e}from"../../core/contexts/context.mjs";import{stringifyDefaultValue as t}from"../../../../deepkit/src/utilities.mjs";import{isSetString as n}from"@stryke/type-checks/is-set-string";import{For as r,List as i,Prose as a,Show as o,childrenArray as s,splitProps as c}from"@alloy-js/core";import{createComponent as l,createIntrinsic as u,memo as d,mergeProps as f}from"@alloy-js/core/jsx-runtime";import{isUndefined as p}from"@stryke/type-checks/is-undefined";function m(e){let[{children:t,heading:n}]=c(e,[`children`,`heading`]);return[`/**`,u(`align`,{string:` * `,get children(){return[u(`hbr`,{}),l(o,{get when(){return!p(n)},get children(){return[n,u(`hbr`,{}),l(o,{get when(){return d(()=>!p(t))()&&s(()=>t).length>0},get children(){return u(`hbr`,{})}})]}}),l(o,{get when(){return d(()=>!p(t))()&&s(()=>t).length>0},get children(){return l(i,{get children(){return s(()=>t)}})}})]}}),u(`hbr`,{}),` */`,u(`hbr`,{})]}function h(e){let[{children:t,tag:n}]=c(e,[`children`,`tag`]);return[`@${n} `,l(o,{get when(){return!!t},get children(){return u(`align`,{width:2,get children(){return l(a,{children:t})}})}}),u(`hbr`,{})]}function g(e){let[{children:t},n]=c(e,[`children`]);return l(h,f(n,{tag:`title`,children:t}))}function _(e){let[{children:t},n]=c(e,[`children`]);return l(h,f(n,{tag:`domain`,children:t}))}function v(e){let[{children:t},n]=c(e,[`children`]);return l(h,f(n,{tag:`alias`,children:t}))}function y(e){let[{children:t},n]=c(e,[`children`]);return l(h,f(n,{tag:`permission`,children:t}))}function b(e){return[`@defaultValue `,l(o,{get when(){return!p(e.value)},get children(){return u(`align`,{width:2,get children(){return l(a,{get children(){return t(e.value)}})}})}}),u(`hbr`,{})]}function x(e){return[`@remarks `,u(`hbr`,{}),l(i,{hardline:!0,get children(){return s(()=>e.children)}})]}function S(e){return l(h,f(e,{tag:`see`}))}function C(e){let[{tsx:t,fenced:n=!0,language:r,children:i}]=c(e,[`tsx`,`fenced`,`language`,`children`]);return[`@example `,u(`hbr`,{}),l(o,{when:n,get children(){return["```",r||(t?`tsx`:`ts`),u(`hbr`,{})]}}),i,l(o,{when:n,get children(){return[u(`hbr`,{}),"```"]}})]}function w(){return l(h,{tag:`readonly`})}function T(){return l(h,{tag:`internal`})}function E(){return l(h,{tag:`ignore`})}function D(){return l(h,{tag:`hidden`})}function O(e){let[{title:t,alias:i,permission:a,domain:s,readonly:u,internal:d,ignore:f,hidden:m,defaultValue:h}]=c(e,[`title`,`alias`,`permission`,`domain`,`readonly`,`internal`,`ignore`,`hidden`,`defaultValue`]);return[l(o,{get when(){return n(t)},get children(){return l(g,{children:t})}}),l(o,{get when(){return!p(i)&&i.length>0},get children(){return l(r,{each:i??[],children:e=>l(v,{children:e})})}}),l(o,{get when(){return n(s)},get children(){return l(_,{children:s})}}),l(o,{get when(){return!p(a)&&a.length>0},get children(){return l(r,{each:a??[],children:e=>l(y,{children:e})})}}),l(o,{when:u===!0,get children(){return l(w,{})}}),l(o,{when:d===!0,get children(){return l(T,{})}}),l(o,{when:f===!0,get children(){return l(E,{})}}),l(o,{when:m===!0,get children(){return l(D,{})}}),l(o,{get when(){return!p(h)},get children(){return l(b,{value:h})}})]}function k(e){return[`@param `,l(A,{get name(){return e.name},get optional(){return e.optional},get defaultValue(){return e.defaultValue}}),l(j,{get children(){return e.children}})]}function A(e){return[l(o,{get when(){return e.optional},children:`[`}),d(()=>e.name),l(o,{get when(){return!!e.defaultValue},get children(){return[`=`,d(()=>e.defaultValue)]}}),l(o,{get when(){return e.optional},children:`]`})]}function j(e){return l(o,{get when(){return!!e.children},get children(){return[` - `,u(`align`,{width:2,get children(){return l(a,{get children(){return e.children}})}})]}})}function M(e){return l(h,f(e,{tag:`returns`}))}function N(e){return l(h,f(e,{tag:`throws`}))}function P(t){let[{children:n,name:r,prefix:a}]=c(t,[`children`,`name`,`prefix`]),f=e();return[`/**`,u(`align`,{string:` * `,get children(){return[u(`hbr`,{}),l(o,{get when(){return!!n},get children(){return[l(i,{hardline:!0,get children(){return s(()=>n)}}),u(`hbr`,{}),u(`hbr`,{})]}}),`@module `,d(()=>a||f?.config.output.builtinPrefix),`:`,r]}}),u(`hbr`,{}),` */`]}export{m as TSDoc,O as TSDocAttributesTags,C as TSDocExample,S as TSDocLink,P as TSDocModule,k as TSDocParam,x as TSDocRemarks,M as TSDocReturns,N as TSDocThrows};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/components/single-line-comment.cjs`),n=require(`../../core/components/source-file.cjs`);let r=require(`@alloy-js/core/jsx-runtime`),i=require(`@alloy-js/core`),a=require(`@stryke/type-checks/is-string`),o=require(`@stryke/path/append`),s=require(`@alloy-js/typescript`),c=require(`@stryke/type-checks/is-boolean`);function l(e){let[{children:t,path:a,imports:l,tsx:f,header:p},m]=(0,i.splitProps)(e,[`children`,`path`,`imports`,`tsx`,`header`]),h=(0,i.useContext)(i.SourceDirectoryContext),g=(0,s.getSourceDirectoryData)(h),_=(0,o.appendPath)(a,h.path),v=new s.TSModuleScope(_,(0,i.useScope)());g.modules.add(v);let y=(0,i.useContext)(s.PackageContext);return y&&y.scope.addModule(v),e.export&&y&&((0,c.isBoolean)(e.export)?y.scope.addExport(_,v):y.scope.addExport(e.export,v)),(0,r.createComponent)(s.SourceFileContext.Provider,{value:{scope:v},get children(){return(0,r.createComponent)(i.Scope,{value:v,get children(){return(0,r.createComponent)(n.SourceFile,(0,r.mergeProps)(m,{path:_,get header(){return p??(0,r.createComponent)(u,{get children(){return(0,r.createComponent)(d,{imports:l,scope:v})}})},filetype:f?`tsx`:`typescript`,children:t}))}})}})}function u(e){let{header:n,disableEslint:a=!0,disableBiome:o=!0,disablePrettier:s=!1,children:c}=e;return[(0,r.createComponent)(i.Show,{get when(){return!!n},get children(){return[n,(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(i.Show,{get when(){return!!a},get children(){return[(0,r.createComponent)(t.SingleLineComment,{variant:`slash-star`,children:`eslint-disable`}),(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(i.Show,{get when(){return!!s},get children(){return[(0,r.createComponent)(t.SingleLineComment,{variant:`slash-star`,children:`prettier-ignore`}),(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(i.Show,{get when(){return!!o},get children(){return[(0,r.createComponent)(t.SingleLineComment,{children:`biome-ignore lint: disable`}),(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(i.Show,{get when(){return!!a||!!s||!!o},get children(){return(0,r.createIntrinsic)(`hbr`,{})}}),(0,r.createComponent)(i.Show,{get when(){return!!c},get children(){return[c,(0,r.createIntrinsic)(`hbr`,{})]}}),(0,r.createComponent)(t.SingleLineComment,{children:i.code`Generated by Powerlines`}),(0,r.createIntrinsic)(`hbr`,{}),(0,r.createComponent)(t.SingleLineComment,{children:i.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),(0,r.createIntrinsic)(`hbr`,{})]}function d(e){let{imports:t}=e,n=(0,s.useSourceFile)(),o=e.scope??n.scope;return(0,r.createComponent)(i.Show,{get when(){return o.importedModules.size>0||!!t&&Object.keys(t).length>0},get children(){return[(0,r.createComponent)(i.Show,{get when(){return!!t&&Object.keys(t).length>0},get children(){return Object.entries(t??{}).map(([e,t])=>i.code`import ${t===null?``:t.filter(e=>!(0,a.isString)(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!(0,a.isString)(e)&&e.default).length>0&&t.filter(e=>(0,a.isString)(e)||!e.default).length>0?`, `:``)+(t.filter(e=>(0,a.isString)(e)||!e.default).length>0?`{ ${t.map(e=>(0,a.isString)(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),(0,r.createComponent)(i.Show,{get when(){return o.importedModules.size>0},get children(){return(0,r.createComponent)(s.ImportStatements,{get records(){return o.importedModules}})}}),(0,r.createIntrinsic)(`hbr`,{})]}})}exports.TypescriptFile=l,exports.TypescriptFileHeader=u,exports.TypescriptFileHeaderImports=d;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../core/components/single-line-comment.cjs`),n=require(`../../core/components/source-file.cjs`);let r=require(`@stryke/type-checks/is-string`),i=require(`@stryke/path/append`),a=require(`@alloy-js/core`),o=require(`@alloy-js/core/jsx-runtime`),s=require(`@alloy-js/typescript`),c=require(`@stryke/type-checks/is-boolean`);function l(e){let[{children:t,path:r,imports:l,tsx:f,header:p},m]=(0,a.splitProps)(e,[`children`,`path`,`imports`,`tsx`,`header`]),h=(0,a.useContext)(a.SourceDirectoryContext),g=(0,s.getSourceDirectoryData)(h),_=(0,i.appendPath)(r,h.path),v=new s.TSModuleScope(_,(0,a.useScope)());g.modules.add(v);let y=(0,a.useContext)(s.PackageContext);return y&&y.scope.addModule(v),e.export&&y&&((0,c.isBoolean)(e.export)?y.scope.addExport(_,v):y.scope.addExport(e.export,v)),(0,o.createComponent)(s.SourceFileContext.Provider,{value:{scope:v},get children(){return(0,o.createComponent)(a.Scope,{value:v,get children(){return(0,o.createComponent)(n.SourceFile,(0,o.mergeProps)(m,{path:_,get header(){return p??(0,o.createComponent)(u,{get children(){return(0,o.createComponent)(d,{imports:l,scope:v})}})},filetype:f?`tsx`:`typescript`,children:t}))}})}})}function u(e){let{header:n,disableEslint:r=!0,disableBiome:i=!0,disablePrettier:s=!1,children:c}=e;return[(0,o.createComponent)(a.Show,{get when(){return!!n},get children(){return[n,(0,o.createIntrinsic)(`hbr`,{})]}}),(0,o.createIntrinsic)(`hbr`,{}),(0,o.createComponent)(a.Show,{get when(){return!!r},get children(){return[(0,o.createComponent)(t.SingleLineComment,{variant:`slash-star`,children:`eslint-disable`}),(0,o.createIntrinsic)(`hbr`,{})]}}),(0,o.createComponent)(a.Show,{get when(){return!!s},get children(){return[(0,o.createComponent)(t.SingleLineComment,{variant:`slash-star`,children:`prettier-ignore`}),(0,o.createIntrinsic)(`hbr`,{})]}}),(0,o.createComponent)(a.Show,{get when(){return!!i},get children(){return[(0,o.createComponent)(t.SingleLineComment,{children:`biome-ignore lint: disable`}),(0,o.createIntrinsic)(`hbr`,{})]}}),(0,o.createComponent)(a.Show,{get when(){return!!r||!!s||!!i},get children(){return(0,o.createIntrinsic)(`hbr`,{})}}),(0,o.createComponent)(a.Show,{get when(){return!!c},get children(){return[c,(0,o.createIntrinsic)(`hbr`,{})]}}),(0,o.createComponent)(t.SingleLineComment,{children:a.code`Generated by Powerlines`}),(0,o.createIntrinsic)(`hbr`,{}),(0,o.createComponent)(t.SingleLineComment,{children:a.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),(0,o.createIntrinsic)(`hbr`,{})]}function d(e){let{imports:t}=e,n=(0,s.useSourceFile)(),i=e.scope??n.scope;return(0,o.createComponent)(a.Show,{get when(){return i.importedModules.size>0||!!t&&Object.keys(t).length>0},get children(){return[(0,o.createComponent)(a.Show,{get when(){return!!t&&Object.keys(t).length>0},get children(){return Object.entries(t??{}).map(([e,t])=>a.code`import ${t===null?``:t.filter(e=>!(0,r.isString)(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!(0,r.isString)(e)&&e.default).length>0&&t.filter(e=>(0,r.isString)(e)||!e.default).length>0?`, `:``)+(t.filter(e=>(0,r.isString)(e)||!e.default).length>0?`{ ${t.map(e=>(0,r.isString)(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),(0,o.createComponent)(a.Show,{get when(){return i.importedModules.size>0},get children(){return(0,o.createComponent)(s.ImportStatements,{get records(){return i.importedModules}})}}),(0,o.createIntrinsic)(`hbr`,{})]}})}exports.TypescriptFile=l,exports.TypescriptFileHeader=u,exports.TypescriptFileHeaderImports=d;
@@ -1 +1 @@
1
- import{SingleLineComment as e}from"../../core/components/single-line-comment.mjs";import{SourceFile as t}from"../../core/components/source-file.mjs";import{createComponent as n,createIntrinsic as r,mergeProps as i}from"@alloy-js/core/jsx-runtime";import{Scope as a,Show as o,SourceDirectoryContext as s,code as c,splitProps as l,useContext as u,useScope as d}from"@alloy-js/core";import{isString as f}from"@stryke/type-checks/is-string";import{appendPath as p}from"@stryke/path/append";import{ImportStatements as m,PackageContext as h,SourceFileContext as g,TSModuleScope as _,getSourceDirectoryData as v,useSourceFile as y}from"@alloy-js/typescript";import{isBoolean as b}from"@stryke/type-checks/is-boolean";function x(e){let[{children:r,path:o,imports:c,tsx:f,header:m},y]=l(e,[`children`,`path`,`imports`,`tsx`,`header`]),x=u(s),w=v(x),T=p(o,x.path),E=new _(T,d());w.modules.add(E);let D=u(h);return D&&D.scope.addModule(E),e.export&&D&&(b(e.export)?D.scope.addExport(T,E):D.scope.addExport(e.export,E)),n(g.Provider,{value:{scope:E},get children(){return n(a,{value:E,get children(){return n(t,i(y,{path:T,get header(){return m??n(S,{get children(){return n(C,{imports:c,scope:E})}})},filetype:f?`tsx`:`typescript`,children:r}))}})}})}function S(t){let{header:i,disableEslint:a=!0,disableBiome:s=!0,disablePrettier:l=!1,children:u}=t;return[n(o,{get when(){return!!i},get children(){return[i,r(`hbr`,{})]}}),r(`hbr`,{}),n(o,{get when(){return!!a},get children(){return[n(e,{variant:`slash-star`,children:`eslint-disable`}),r(`hbr`,{})]}}),n(o,{get when(){return!!l},get children(){return[n(e,{variant:`slash-star`,children:`prettier-ignore`}),r(`hbr`,{})]}}),n(o,{get when(){return!!s},get children(){return[n(e,{children:`biome-ignore lint: disable`}),r(`hbr`,{})]}}),n(o,{get when(){return!!a||!!l||!!s},get children(){return r(`hbr`,{})}}),n(o,{get when(){return!!u},get children(){return[u,r(`hbr`,{})]}}),n(e,{children:c`Generated by Powerlines`}),r(`hbr`,{}),n(e,{children:c`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),r(`hbr`,{})]}function C(e){let{imports:t}=e,i=y(),a=e.scope??i.scope;return n(o,{get when(){return a.importedModules.size>0||!!t&&Object.keys(t).length>0},get children(){return[n(o,{get when(){return!!t&&Object.keys(t).length>0},get children(){return Object.entries(t??{}).map(([e,t])=>c`import ${t===null?``:t.filter(e=>!f(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!f(e)&&e.default).length>0&&t.filter(e=>f(e)||!e.default).length>0?`, `:``)+(t.filter(e=>f(e)||!e.default).length>0?`{ ${t.map(e=>f(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),n(o,{get when(){return a.importedModules.size>0},get children(){return n(m,{get records(){return a.importedModules}})}}),r(`hbr`,{})]}})}export{x as TypescriptFile,S as TypescriptFileHeader,C as TypescriptFileHeaderImports};
1
+ import{SingleLineComment as e}from"../../core/components/single-line-comment.mjs";import{SourceFile as t}from"../../core/components/source-file.mjs";import{isString as n}from"@stryke/type-checks/is-string";import{appendPath as r}from"@stryke/path/append";import{Scope as i,Show as a,SourceDirectoryContext as o,code as s,splitProps as c,useContext as l,useScope as u}from"@alloy-js/core";import{createComponent as d,createIntrinsic as f,mergeProps as p}from"@alloy-js/core/jsx-runtime";import{ImportStatements as m,PackageContext as h,SourceFileContext as g,TSModuleScope as _,getSourceDirectoryData as v,useSourceFile as y}from"@alloy-js/typescript";import{isBoolean as b}from"@stryke/type-checks/is-boolean";function x(e){let[{children:n,path:a,imports:s,tsx:f,header:m},y]=c(e,[`children`,`path`,`imports`,`tsx`,`header`]),x=l(o),w=v(x),T=r(a,x.path),E=new _(T,u());w.modules.add(E);let D=l(h);return D&&D.scope.addModule(E),e.export&&D&&(b(e.export)?D.scope.addExport(T,E):D.scope.addExport(e.export,E)),d(g.Provider,{value:{scope:E},get children(){return d(i,{value:E,get children(){return d(t,p(y,{path:T,get header(){return m??d(S,{get children(){return d(C,{imports:s,scope:E})}})},filetype:f?`tsx`:`typescript`,children:n}))}})}})}function S(t){let{header:n,disableEslint:r=!0,disableBiome:i=!0,disablePrettier:o=!1,children:c}=t;return[d(a,{get when(){return!!n},get children(){return[n,f(`hbr`,{})]}}),f(`hbr`,{}),d(a,{get when(){return!!r},get children(){return[d(e,{variant:`slash-star`,children:`eslint-disable`}),f(`hbr`,{})]}}),d(a,{get when(){return!!o},get children(){return[d(e,{variant:`slash-star`,children:`prettier-ignore`}),f(`hbr`,{})]}}),d(a,{get when(){return!!i},get children(){return[d(e,{children:`biome-ignore lint: disable`}),f(`hbr`,{})]}}),d(a,{get when(){return!!r||!!o||!!i},get children(){return f(`hbr`,{})}}),d(a,{get when(){return!!c},get children(){return[c,f(`hbr`,{})]}}),d(e,{children:s`Generated by Powerlines`}),f(`hbr`,{}),d(e,{children:s`NOTE: Do not edit this file manually - it will be overwritten automatically by the "storm prepare" command`}),f(`hbr`,{})]}function C(e){let{imports:t}=e,r=y(),i=e.scope??r.scope;return d(a,{get when(){return i.importedModules.size>0||!!t&&Object.keys(t).length>0},get children(){return[d(a,{get when(){return!!t&&Object.keys(t).length>0},get children(){return Object.entries(t??{}).map(([e,t])=>s`import ${t===null?``:t.filter(e=>!n(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!n(e)&&e.default).length>0&&t.filter(e=>n(e)||!e.default).length>0?`, `:``)+(t.filter(e=>n(e)||!e.default).length>0?`{ ${t.map(e=>n(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),d(a,{get when(){return i.importedModules.size>0},get children(){return d(m,{get records(){return i.importedModules}})}}),f(`hbr`,{})]}})}export{x as TypescriptFile,S as TypescriptFileHeader,C as TypescriptFileHeaderImports};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../../deepkit/src/vendor/type.cjs`),n=require(`../../core/contexts/reflection.cjs`),r=require(`./tsdoc-reflection.cjs`);let i=require(`@alloy-js/core/jsx-runtime`),a=require(`@alloy-js/core`),o=require(`@alloy-js/typescript`),s=require(`@stryke/string-format/pascal-case`);function c(e){let[{name:t,reflection:c},u]=(0,a.splitProps)(e,[`name`,`reflection`]),d=(0,a.computed)(()=>(0,s.pascalCase)(t||c.getName())),f=c.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1);return(0,i.createComponent)(n.ReflectionClassContext.Provider,{value:{reflection:c},get children(){return[(0,i.createComponent)(r.TSDocReflectionClass,{}),(0,i.createComponent)(o.InterfaceDeclaration,(0,i.mergeProps)({export:!0,get name(){return d.value}},u,{get children(){return(0,i.createComponent)(a.For,{each:f,doubleHardline:!0,semicolon:!0,children:e=>(0,i.createComponent)(l,{property:e})})}}))]}})}function l(e){let[{property:s},c]=(0,a.splitProps)(e,[`property`]);return(0,i.createComponent)(n.ReflectionPropertyContext.Provider,{value:s,get children(){return[(0,i.createComponent)(r.TSDocReflectionProperty,{}),(0,i.createComponent)(o.InterfaceMember,(0,i.mergeProps)({get name(){return s.getNameAsString()},get readonly(){return s.isReadonly()},get optional(){return s.isOptional()},get nullish(){return s.isNullable()},get type(){return(0,t.type_exports.stringifyType)(s.getType())}},c))]}})}exports.TypeScriptInterface=c;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../../deepkit/src/vendor/type.cjs`),n=require(`../../core/contexts/reflection.cjs`),r=require(`./tsdoc-reflection.cjs`);let i=require(`@alloy-js/core`),a=require(`@alloy-js/core/jsx-runtime`),o=require(`@alloy-js/typescript`),s=require(`@stryke/string-format/pascal-case`);function c(e){let[{name:t,reflection:c},u]=(0,i.splitProps)(e,[`name`,`reflection`]),d=(0,i.computed)(()=>(0,s.pascalCase)(t||c.getName())),f=c.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1);return(0,a.createComponent)(n.ReflectionClassContext.Provider,{value:{reflection:c},get children(){return[(0,a.createComponent)(r.TSDocReflectionClass,{}),(0,a.createComponent)(o.InterfaceDeclaration,(0,a.mergeProps)({export:!0,get name(){return d.value}},u,{get children(){return(0,a.createComponent)(i.For,{each:f,doubleHardline:!0,semicolon:!0,children:e=>(0,a.createComponent)(l,{property:e})})}}))]}})}function l(e){let[{property:s},c]=(0,i.splitProps)(e,[`property`]);return(0,a.createComponent)(n.ReflectionPropertyContext.Provider,{value:s,get children(){return[(0,a.createComponent)(r.TSDocReflectionProperty,{}),(0,a.createComponent)(o.InterfaceMember,(0,a.mergeProps)({get name(){return s.getNameAsString()},get readonly(){return s.isReadonly()},get optional(){return s.isOptional()},get nullish(){return s.isNullable()},get type(){return(0,t.type_exports.stringifyType)(s.getType())}},c))]}})}exports.TypeScriptInterface=c;
@@ -1 +1 @@
1
- import{type_exports as e}from"../../../../deepkit/src/vendor/type.mjs";import{ReflectionClassContext as t,ReflectionPropertyContext as n}from"../../core/contexts/reflection.mjs";import{TSDocReflectionClass as r,TSDocReflectionProperty as i}from"./tsdoc-reflection.mjs";import{createComponent as a,mergeProps as o}from"@alloy-js/core/jsx-runtime";import{For as s,computed as c,splitProps as l}from"@alloy-js/core";import{InterfaceDeclaration as u,InterfaceMember as d}from"@alloy-js/typescript";import{pascalCase as f}from"@stryke/string-format/pascal-case";function p(e){let[{name:n,reflection:i},d]=l(e,[`name`,`reflection`]),p=c(()=>f(n||i.getName())),h=i.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1);return a(t.Provider,{value:{reflection:i},get children(){return[a(r,{}),a(u,o({export:!0,get name(){return p.value}},d,{get children(){return a(s,{each:h,doubleHardline:!0,semicolon:!0,children:e=>a(m,{property:e})})}}))]}})}function m(t){let[{property:r},s]=l(t,[`property`]);return a(n.Provider,{value:r,get children(){return[a(i,{}),a(d,o({get name(){return r.getNameAsString()},get readonly(){return r.isReadonly()},get optional(){return r.isOptional()},get nullish(){return r.isNullable()},get type(){return(0,e.stringifyType)(r.getType())}},s))]}})}export{p as TypeScriptInterface};
1
+ import{type_exports as e}from"../../../../deepkit/src/vendor/type.mjs";import{ReflectionClassContext as t,ReflectionPropertyContext as n}from"../../core/contexts/reflection.mjs";import{TSDocReflectionClass as r,TSDocReflectionProperty as i}from"./tsdoc-reflection.mjs";import{For as a,computed as o,splitProps as s}from"@alloy-js/core";import{createComponent as c,mergeProps as l}from"@alloy-js/core/jsx-runtime";import{InterfaceDeclaration as u,InterfaceMember as d}from"@alloy-js/typescript";import{pascalCase as f}from"@stryke/string-format/pascal-case";function p(e){let[{name:n,reflection:i},d]=s(e,[`name`,`reflection`]),p=o(()=>f(n||i.getName())),h=i.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1);return c(t.Provider,{value:{reflection:i},get children(){return[c(r,{}),c(u,l({export:!0,get name(){return p.value}},d,{get children(){return c(a,{each:h,doubleHardline:!0,semicolon:!0,children:e=>c(m,{property:e})})}}))]}})}function m(t){let[{property:r},a]=s(t,[`property`]);return c(n.Provider,{value:r,get children(){return[c(i,{}),c(d,l({get name(){return r.getNameAsString()},get readonly(){return r.isReadonly()},get optional(){return r.isOptional()},get nullish(){return r.isNullable()},get type(){return(0,e.stringifyType)(r.getType())}},a))]}})}export{p as TypeScriptInterface};
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../../deepkit/src/utilities.cjs`),n=require(`../../core/contexts/reflection.cjs`),r=require(`./tsdoc-reflection.cjs`);let i=require(`@alloy-js/core/jsx-runtime`),a=require(`@alloy-js/core`),o=require(`@stryke/type-checks/is-undefined`),s=require(`@stryke/string-format/camel-case`),c=require(`@alloy-js/typescript`),l=require(`@stryke/string-format/pascal-case`);function u(e){if(!e.reflection?.value)return null;let t=(0,a.computed)(()=>(0,s.camelCase)(e.name||e.reflection.value.getName())),u=(0,a.computed)(()=>e.type||(0,l.pascalCase)(e.reflection.value.getName())),f=(0,a.computed)(()=>e.reflection.value.getProperties().filter(t=>!t.isIgnored()&&!(0,o.isUndefined)(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>(0,o.isUndefined)(t)&&!(0,o.isUndefined)(e.defaultValue?.value?.[n])?e.defaultValue?.value?.[n]:t,void 0)??t.getDefaultValue())).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1)),p=(0,a.createSymbolSlot)(),m=(0,a.createSymbolSlot)(),h=(0,c.createValueSymbol)(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?c.TSSymbolFlags.Nullish:c.TSSymbolFlags.None,type:e.type?p.firstSymbol:void 0,namePolicy:(0,c.useTSNamePolicy)().for(`variable`)});e.type||m.moveMembersTo(h);let g=e.var?`var`:e.let?`let`:`const`,_=e.type?(0,i.createComponent)(c.TypeRefContext,{get children(){return[`: `,(0,i.createComponent)(p,{get children(){return e.type}})]}}):void 0;return(0,i.createComponent)(a.Show,{get when(){return!!e.reflection.value},get children(){return(0,i.createComponent)(n.ReflectionClassContext.Provider,{get value(){return{reflection:e.reflection.value,override:{name:t.value,type:u.value,defaultValue:e.defaultValue?.value}}},get children(){return[(0,i.createComponent)(a.Show,{get when(){return!!t.value&&!!u.value},get children(){return[(0,i.createComponent)(r.TSDocReflectionClass,{}),(0,i.createComponent)(a.Declaration,{symbol:h,get children(){return[(0,i.memo)(()=>e.export?`export `:``),(0,i.memo)(()=>e.default?`default `:``),g,` `,(0,i.createComponent)(a.Name,{}),_,` =`,` `,(0,i.createComponent)(m,{get children(){return e.initializer??e.children??(0,i.createComponent)(c.ObjectExpression,{get children(){return(0,i.createComponent)(a.For,{get each(){return f.value??[]},comma:!0,doubleHardline:!0,children:e=>(0,i.createComponent)(d,{property:e})})}})}})]}})]}}),(0,i.createIntrinsic)(`hbr`,{})]}})}})}function d(e){let[{property:o}]=(0,a.splitProps)(e,[`property`]);return(0,i.createComponent)(n.ReflectionPropertyContext.Provider,{value:o,get children(){return[(0,i.createComponent)(r.TSDocReflectionProperty,{}),(0,i.createComponent)(c.ObjectProperty,{get name(){return o.getNameAsString()},get value(){return t.stringifyDefaultValue(o)}}),(0,i.createIntrinsic)(`hbr`,{})]}})}exports.TypescriptObject=u;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../../deepkit/src/utilities.cjs`),n=require(`../../core/contexts/reflection.cjs`),r=require(`./tsdoc-reflection.cjs`);let i=require(`@stryke/string-format/camel-case`),a=require(`@alloy-js/core`),o=require(`@alloy-js/core/jsx-runtime`),s=require(`@stryke/type-checks/is-undefined`),c=require(`@alloy-js/typescript`),l=require(`@stryke/string-format/pascal-case`);function u(e){if(!e.reflection?.value)return null;let t=(0,a.computed)(()=>(0,i.camelCase)(e.name||e.reflection.value.getName())),u=(0,a.computed)(()=>e.type||(0,l.pascalCase)(e.reflection.value.getName())),f=(0,a.computed)(()=>e.reflection.value.getProperties().filter(t=>!t.isIgnored()&&!(0,s.isUndefined)(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>(0,s.isUndefined)(t)&&!(0,s.isUndefined)(e.defaultValue?.value?.[n])?e.defaultValue?.value?.[n]:t,void 0)??t.getDefaultValue())).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1)),p=(0,a.createSymbolSlot)(),m=(0,a.createSymbolSlot)(),h=(0,c.createValueSymbol)(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?c.TSSymbolFlags.Nullish:c.TSSymbolFlags.None,type:e.type?p.firstSymbol:void 0,namePolicy:(0,c.useTSNamePolicy)().for(`variable`)});e.type||m.moveMembersTo(h);let g=e.var?`var`:e.let?`let`:`const`,_=e.type?(0,o.createComponent)(c.TypeRefContext,{get children(){return[`: `,(0,o.createComponent)(p,{get children(){return e.type}})]}}):void 0;return(0,o.createComponent)(a.Show,{get when(){return!!e.reflection.value},get children(){return(0,o.createComponent)(n.ReflectionClassContext.Provider,{get value(){return{reflection:e.reflection.value,override:{name:t.value,type:u.value,defaultValue:e.defaultValue?.value}}},get children(){return[(0,o.createComponent)(a.Show,{get when(){return!!t.value&&!!u.value},get children(){return[(0,o.createComponent)(r.TSDocReflectionClass,{}),(0,o.createComponent)(a.Declaration,{symbol:h,get children(){return[(0,o.memo)(()=>e.export?`export `:``),(0,o.memo)(()=>e.default?`default `:``),g,` `,(0,o.createComponent)(a.Name,{}),_,` =`,` `,(0,o.createComponent)(m,{get children(){return e.initializer??e.children??(0,o.createComponent)(c.ObjectExpression,{get children(){return(0,o.createComponent)(a.For,{get each(){return f.value??[]},comma:!0,doubleHardline:!0,children:e=>(0,o.createComponent)(d,{property:e})})}})}})]}})]}}),(0,o.createIntrinsic)(`hbr`,{})]}})}})}function d(e){let[{property:i}]=(0,a.splitProps)(e,[`property`]);return(0,o.createComponent)(n.ReflectionPropertyContext.Provider,{value:i,get children(){return[(0,o.createComponent)(r.TSDocReflectionProperty,{}),(0,o.createComponent)(c.ObjectProperty,{get name(){return i.getNameAsString()},get value(){return t.stringifyDefaultValue(i)}}),(0,o.createIntrinsic)(`hbr`,{})]}})}exports.TypescriptObject=u;
@@ -1 +1 @@
1
- import{stringifyDefaultValue as e}from"../../../../deepkit/src/utilities.mjs";import{ReflectionClassContext as t,ReflectionPropertyContext as n}from"../../core/contexts/reflection.mjs";import{TSDocReflectionClass as r,TSDocReflectionProperty as i}from"./tsdoc-reflection.mjs";import{createComponent as a,createIntrinsic as o,memo as s}from"@alloy-js/core/jsx-runtime";import{Declaration as c,For as l,Name as u,Show as d,computed as f,createSymbolSlot as p,splitProps as m}from"@alloy-js/core";import{isUndefined as h}from"@stryke/type-checks/is-undefined";import{camelCase as g}from"@stryke/string-format/camel-case";import{ObjectExpression as _,ObjectProperty as v,TSSymbolFlags as y,TypeRefContext as b,createValueSymbol as x,useTSNamePolicy as S}from"@alloy-js/typescript";import{pascalCase as C}from"@stryke/string-format/pascal-case";function w(e){if(!e.reflection?.value)return null;let n=f(()=>g(e.name||e.reflection.value.getName())),i=f(()=>e.type||C(e.reflection.value.getName())),m=f(()=>e.reflection.value.getProperties().filter(t=>!t.isIgnored()&&!h(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>h(t)&&!h(e.defaultValue?.value?.[n])?e.defaultValue?.value?.[n]:t,void 0)??t.getDefaultValue())).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1)),v=p(),w=p(),E=x(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?y.Nullish:y.None,type:e.type?v.firstSymbol:void 0,namePolicy:S().for(`variable`)});e.type||w.moveMembersTo(E);let D=e.var?`var`:e.let?`let`:`const`,O=e.type?a(b,{get children(){return[`: `,a(v,{get children(){return e.type}})]}}):void 0;return a(d,{get when(){return!!e.reflection.value},get children(){return a(t.Provider,{get value(){return{reflection:e.reflection.value,override:{name:n.value,type:i.value,defaultValue:e.defaultValue?.value}}},get children(){return[a(d,{get when(){return!!n.value&&!!i.value},get children(){return[a(r,{}),a(c,{symbol:E,get children(){return[s(()=>e.export?`export `:``),s(()=>e.default?`default `:``),D,` `,a(u,{}),O,` =`,` `,a(w,{get children(){return e.initializer??e.children??a(_,{get children(){return a(l,{get each(){return m.value??[]},comma:!0,doubleHardline:!0,children:e=>a(T,{property:e})})}})}})]}})]}}),o(`hbr`,{})]}})}})}function T(t){let[{property:r}]=m(t,[`property`]);return a(n.Provider,{value:r,get children(){return[a(i,{}),a(v,{get name(){return r.getNameAsString()},get value(){return e(r)}}),o(`hbr`,{})]}})}export{w as TypescriptObject};
1
+ import{stringifyDefaultValue as e}from"../../../../deepkit/src/utilities.mjs";import{ReflectionClassContext as t,ReflectionPropertyContext as n}from"../../core/contexts/reflection.mjs";import{TSDocReflectionClass as r,TSDocReflectionProperty as i}from"./tsdoc-reflection.mjs";import{camelCase as a}from"@stryke/string-format/camel-case";import{Declaration as o,For as s,Name as c,Show as l,computed as u,createSymbolSlot as d,splitProps as f}from"@alloy-js/core";import{createComponent as p,createIntrinsic as m,memo as h}from"@alloy-js/core/jsx-runtime";import{isUndefined as g}from"@stryke/type-checks/is-undefined";import{ObjectExpression as _,ObjectProperty as v,TSSymbolFlags as y,TypeRefContext as b,createValueSymbol as x,useTSNamePolicy as S}from"@alloy-js/typescript";import{pascalCase as C}from"@stryke/string-format/pascal-case";function w(e){if(!e.reflection?.value)return null;let n=u(()=>a(e.name||e.reflection.value.getName())),i=u(()=>e.type||C(e.reflection.value.getName())),f=u(()=>e.reflection.value.getProperties().filter(t=>!t.isIgnored()&&!g(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>g(t)&&!g(e.defaultValue?.value?.[n])?e.defaultValue?.value?.[n]:t,void 0)??t.getDefaultValue())).sort((e,t)=>e.isReadonly()&&t.isReadonly()||!e.isReadonly()&&!t.isReadonly()?e.getNameAsString().localeCompare(t.getNameAsString()):e.isReadonly()?1:-1)),v=d(),w=d(),E=x(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?y.Nullish:y.None,type:e.type?v.firstSymbol:void 0,namePolicy:S().for(`variable`)});e.type||w.moveMembersTo(E);let D=e.var?`var`:e.let?`let`:`const`,O=e.type?p(b,{get children(){return[`: `,p(v,{get children(){return e.type}})]}}):void 0;return p(l,{get when(){return!!e.reflection.value},get children(){return p(t.Provider,{get value(){return{reflection:e.reflection.value,override:{name:n.value,type:i.value,defaultValue:e.defaultValue?.value}}},get children(){return[p(l,{get when(){return!!n.value&&!!i.value},get children(){return[p(r,{}),p(o,{symbol:E,get children(){return[h(()=>e.export?`export `:``),h(()=>e.default?`default `:``),D,` `,p(c,{}),O,` =`,` `,p(w,{get children(){return e.initializer??e.children??p(_,{get children(){return p(s,{get each(){return f.value??[]},comma:!0,doubleHardline:!0,children:e=>p(T,{property:e})})}})}})]}})]}}),m(`hbr`,{})]}})}})}function T(t){let[{property:r}]=f(t,[`property`]);return p(n.Provider,{value:r,get children(){return[p(i,{}),p(v,{get name(){return r.getNameAsString()},get value(){return e(r)}}),m(`hbr`,{})]}})}export{w as TypescriptObject};
@@ -1,5 +1,5 @@
1
- const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../deepkit/src/vendor/type.cjs`),n=require(`../plugin-babel/src/helpers/create-plugin.cjs`),r=require(`../plugin-babel/src/helpers/module-helpers.cjs`),i=require(`../deepkit/src/capnp.cjs`),a=require(`../deepkit/schemas/reflection2.cjs`),o=require(`../deepkit/src/utilities.cjs`),s=require(`../helpers/persistence.cjs`);let c=require(`@storm-software/config-tools/types`),l=require(`@stryke/capnp`);l=e.__toESM(l);let u=require(`@stryke/fs/buffer`),d=require(`node:fs`);const f=n.createBabelPlugin(`env`,({log:e,context:n})=>{function f(t,r,i=!1){let a=n.env.types.env?.getProperties().filter(e=>e.getAlias().length>0);if(t.name){let s=n.config.env.prefix.find(e=>t.name&&t.name.startsWith(e)&&(n.env.types.env?.hasProperty(t.name.replace(`${e}_`,``))||a.some(n=>n.getAlias().includes(t.name.replace(`${e}_`,``))))),l=t.name;if(s&&(l=t.name.replace(`${s}_`,``)),e(c.LogLevelLabel.TRACE,`Environment variable ${l} found in ${r.filename||`unknown file`}.`),n.env.types.env?.hasProperty(l)||a.some(e=>e.getAlias().includes(l))){let e=n.env.types.env.hasProperty(l)?n.env.types.env.getProperty(l):a.find(e=>e.getAlias().includes(l));if(!e||e.isIgnored())return;if(n.env.used.env.hasProperty(l)||n.env.used.env.addProperty(e.property),n.config.env.inject&&i){let t=n.env.parsed?.[l];if(t===void 0){let e=n.config.env.prefix.find(e=>n.env.parsed[`${e.replace(/_$/g,``)}_${l}`]);e&&(t=n.env.parsed[`${e.replace(/_$/g,``)}_${l}`])}if(t??=e.getDefaultValue(),e.isValueRequired()&&t===void 0)throw Error(`Environment variable \`${l}\` is not defined in the .env configuration files`);return o.stringifyDefaultValue(e,t)}}else throw Error(`The "${l}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${r.filename?r.filename:`unknown`}.
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../deepkit/src/vendor/type.cjs`),n=require(`../deepkit/src/capnp.cjs`),r=require(`../deepkit/schemas/reflection2.cjs`),i=require(`../helpers/persistence.cjs`),a=require(`../deepkit/src/utilities.cjs`),o=require(`../plugin-babel/src/helpers/create-plugin.cjs`),s=require(`../plugin-babel/src/helpers/module-helpers.cjs`);let c=require(`@stryke/capnp`);c=e.__toESM(c);let l=require(`@stryke/fs/buffer`),u=require(`node:fs`),d=require(`@storm-software/config-tools/types`);const f=o.createBabelPlugin(`env`,({log:e,context:o})=>{function f(t,n,r=!1){let i=o.env.types.env?.getProperties().filter(e=>e.getAlias().length>0);if(t.name){let s=o.config.env.prefix.find(e=>t.name&&t.name.startsWith(e)&&(o.env.types.env?.hasProperty(t.name.replace(`${e}_`,``))||i.some(n=>n.getAlias().includes(t.name.replace(`${e}_`,``))))),c=t.name;if(s&&(c=t.name.replace(`${s}_`,``)),e(d.LogLevelLabel.TRACE,`Environment variable ${c} found in ${n.filename||`unknown file`}.`),o.env.types.env?.hasProperty(c)||i.some(e=>e.getAlias().includes(c))){let e=o.env.types.env.hasProperty(c)?o.env.types.env.getProperty(c):i.find(e=>e.getAlias().includes(c));if(!e||e.isIgnored())return;if(o.env.used.env.hasProperty(c)||o.env.used.env.addProperty(e.property),o.config.env.inject&&r){let t=o.env.parsed?.[c];if(t===void 0){let e=o.config.env.prefix.find(e=>o.env.parsed[`${e.replace(/_$/g,``)}_${c}`]);e&&(t=o.env.parsed[`${e.replace(/_$/g,``)}_${c}`])}if(t??=e.getDefaultValue(),e.isValueRequired()&&t===void 0)throw Error(`Environment variable \`${c}\` is not defined in the .env configuration files`);return a.stringifyDefaultValue(e,t)}}else throw Error(`The "${c}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${n.filename?n.filename:`unknown`}.
2
2
 
3
- The following environment configuration names are defined in the \`env\` type definition: \n${n.env.types.env?.getPropertyNames().sort((e,t)=>String(e).localeCompare(String(t))).map(e=>` - ${String(e)} ${a.some(t=>t.getNameAsString()===String(e)&&t.getAlias().length>0)?`(Alias: ${a?.find(t=>t.getNameAsString()===String(e))?.getAlias().join(`, `)})`:``}`).join(`
4
- `)} \n\nUsing the following env prefix: \n${n.config.env.prefix.map(e=>` - ${e}`).join(`
5
- `)} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`)}}return{visitor:{MemberExpression(e,t){if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`$storm`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),r.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isCallExpression({callee:{name:`useStorm`,type:`Identifier`}})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),r.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`process`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),r.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isMetaProperty()&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),r.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}}},post(){e(c.LogLevelLabel.TRACE,`Adding environment variables from ${this.filename||`unknown file`} to env.json.`);let r=t.type_exports.ReflectionClass.from({kind:t.type_exports.ReflectionKind.objectLiteral,description:`An object containing the environment variables used by the application.`,types:[]}),o=s.getEnvReflectionsPath(n,`env`);o&&(0,d.existsSync)(o)&&(e(c.LogLevelLabel.TRACE,`Environment reflection file found at ${o}, reading existing reflection.`),r=(0,t.type_exports.resolveClassType)((0,t.type_exports.deserializeType)(i.convertFromCapnp(new l.Message((0,u.readFileBufferSync)(o),!1).getRoot(a.SerializedTypes).types)))),e(c.LogLevelLabel.TRACE,`Adding new variables to env reflection at ${o}.`),r.getProperties().filter(e=>e.getNameAsString()&&!n.env.used.env.hasProperty(e.getNameAsString())).forEach(e=>{n.env.used.env.addProperty({...e,name:e.getNameAsString(),description:e.getDescription()??`The ${e.getNameAsString()} variable.`,default:e.getDefaultValue(),optional:e.isOptional()?!0:void 0,readonly:e.isReadonly()?!0:void 0,visibility:e.getVisibility(),type:e.getType(),tags:e.getTags()})})}}});exports.envBabelPlugin=f;
3
+ The following environment configuration names are defined in the \`env\` type definition: \n${o.env.types.env?.getPropertyNames().sort((e,t)=>String(e).localeCompare(String(t))).map(e=>` - ${String(e)} ${i.some(t=>t.getNameAsString()===String(e)&&t.getAlias().length>0)?`(Alias: ${i?.find(t=>t.getNameAsString()===String(e))?.getAlias().join(`, `)})`:``}`).join(`
4
+ `)} \n\nUsing the following env prefix: \n${o.config.env.prefix.map(e=>` - ${e}`).join(`
5
+ `)} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`)}}return{visitor:{MemberExpression(e,t){if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`$storm`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),s.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isCallExpression({callee:{name:`useStorm`,type:`Identifier`}})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),s.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`process`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),s.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isMetaProperty()&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),s.addImport(e,{module:`storm:env`,name:`env`,imported:`env`})}}},post(){e(d.LogLevelLabel.TRACE,`Adding environment variables from ${this.filename||`unknown file`} to env.json.`);let a=t.type_exports.ReflectionClass.from({kind:t.type_exports.ReflectionKind.objectLiteral,description:`An object containing the environment variables used by the application.`,types:[]}),s=i.getEnvReflectionsPath(o,`env`);s&&(0,u.existsSync)(s)&&(e(d.LogLevelLabel.TRACE,`Environment reflection file found at ${s}, reading existing reflection.`),a=(0,t.type_exports.resolveClassType)((0,t.type_exports.deserializeType)(n.convertFromCapnp(new c.Message((0,l.readFileBufferSync)(s),!1).getRoot(r.SerializedTypes).types)))),e(d.LogLevelLabel.TRACE,`Adding new variables to env reflection at ${s}.`),a.getProperties().filter(e=>e.getNameAsString()&&!o.env.used.env.hasProperty(e.getNameAsString())).forEach(e=>{o.env.used.env.addProperty({...e,name:e.getNameAsString(),description:e.getDescription()??`The ${e.getNameAsString()} variable.`,default:e.getDefaultValue(),optional:e.isOptional()?!0:void 0,readonly:e.isReadonly()?!0:void 0,visibility:e.getVisibility(),type:e.getType(),tags:e.getTags()})})}}});exports.envBabelPlugin=f;
@@ -1,5 +1,5 @@
1
- import{type_exports as e}from"../deepkit/src/vendor/type.mjs";import{createBabelPlugin as t}from"../plugin-babel/src/helpers/create-plugin.mjs";import{addImport as n}from"../plugin-babel/src/helpers/module-helpers.mjs";import{convertFromCapnp as r}from"../deepkit/src/capnp.mjs";import{SerializedTypes as i}from"../deepkit/schemas/reflection2.mjs";import{stringifyDefaultValue as a}from"../deepkit/src/utilities.mjs";import{getEnvReflectionsPath as o}from"../helpers/persistence.mjs";import{LogLevelLabel as s}from"@storm-software/config-tools/types";import*as c from"@stryke/capnp";import{readFileBufferSync as l}from"@stryke/fs/buffer";import{existsSync as u}from"node:fs";const d=t(`env`,({log:t,context:d})=>{function f(e,n,r=!1){let i=d.env.types.env?.getProperties().filter(e=>e.getAlias().length>0);if(e.name){let o=d.config.env.prefix.find(t=>e.name&&e.name.startsWith(t)&&(d.env.types.env?.hasProperty(e.name.replace(`${t}_`,``))||i.some(n=>n.getAlias().includes(e.name.replace(`${t}_`,``))))),c=e.name;if(o&&(c=e.name.replace(`${o}_`,``)),t(s.TRACE,`Environment variable ${c} found in ${n.filename||`unknown file`}.`),d.env.types.env?.hasProperty(c)||i.some(e=>e.getAlias().includes(c))){let e=d.env.types.env.hasProperty(c)?d.env.types.env.getProperty(c):i.find(e=>e.getAlias().includes(c));if(!e||e.isIgnored())return;if(d.env.used.env.hasProperty(c)||d.env.used.env.addProperty(e.property),d.config.env.inject&&r){let t=d.env.parsed?.[c];if(t===void 0){let e=d.config.env.prefix.find(e=>d.env.parsed[`${e.replace(/_$/g,``)}_${c}`]);e&&(t=d.env.parsed[`${e.replace(/_$/g,``)}_${c}`])}if(t??=e.getDefaultValue(),e.isValueRequired()&&t===void 0)throw Error(`Environment variable \`${c}\` is not defined in the .env configuration files`);return a(e,t)}}else throw Error(`The "${c}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${n.filename?n.filename:`unknown`}.
1
+ import{type_exports as e}from"../deepkit/src/vendor/type.mjs";import{convertFromCapnp as t}from"../deepkit/src/capnp.mjs";import{SerializedTypes as n}from"../deepkit/schemas/reflection2.mjs";import{getEnvReflectionsPath as r}from"../helpers/persistence.mjs";import{stringifyDefaultValue as i}from"../deepkit/src/utilities.mjs";import{createBabelPlugin as a}from"../plugin-babel/src/helpers/create-plugin.mjs";import{addImport as o}from"../plugin-babel/src/helpers/module-helpers.mjs";import*as s from"@stryke/capnp";import{readFileBufferSync as c}from"@stryke/fs/buffer";import{existsSync as l}from"node:fs";import{LogLevelLabel as u}from"@storm-software/config-tools/types";const d=a(`env`,({log:a,context:d})=>{function f(e,t,n=!1){let r=d.env.types.env?.getProperties().filter(e=>e.getAlias().length>0);if(e.name){let o=d.config.env.prefix.find(t=>e.name&&e.name.startsWith(t)&&(d.env.types.env?.hasProperty(e.name.replace(`${t}_`,``))||r.some(n=>n.getAlias().includes(e.name.replace(`${t}_`,``))))),s=e.name;if(o&&(s=e.name.replace(`${o}_`,``)),a(u.TRACE,`Environment variable ${s} found in ${t.filename||`unknown file`}.`),d.env.types.env?.hasProperty(s)||r.some(e=>e.getAlias().includes(s))){let e=d.env.types.env.hasProperty(s)?d.env.types.env.getProperty(s):r.find(e=>e.getAlias().includes(s));if(!e||e.isIgnored())return;if(d.env.used.env.hasProperty(s)||d.env.used.env.addProperty(e.property),d.config.env.inject&&n){let t=d.env.parsed?.[s];if(t===void 0){let e=d.config.env.prefix.find(e=>d.env.parsed[`${e.replace(/_$/g,``)}_${s}`]);e&&(t=d.env.parsed[`${e.replace(/_$/g,``)}_${s}`])}if(t??=e.getDefaultValue(),e.isValueRequired()&&t===void 0)throw Error(`Environment variable \`${s}\` is not defined in the .env configuration files`);return i(e,t)}}else throw Error(`The "${s}" environment variable is not defined in the \`env\` type definition, but is used in the source code file ${t.filename?t.filename:`unknown`}.
2
2
 
3
- The following environment configuration names are defined in the \`env\` type definition: \n${d.env.types.env?.getPropertyNames().sort((e,t)=>String(e).localeCompare(String(t))).map(e=>` - ${String(e)} ${i.some(t=>t.getNameAsString()===String(e)&&t.getAlias().length>0)?`(Alias: ${i?.find(t=>t.getNameAsString()===String(e))?.getAlias().join(`, `)})`:``}`).join(`
3
+ The following environment configuration names are defined in the \`env\` type definition: \n${d.env.types.env?.getPropertyNames().sort((e,t)=>String(e).localeCompare(String(t))).map(e=>` - ${String(e)} ${r.some(t=>t.getNameAsString()===String(e)&&t.getAlias().length>0)?`(Alias: ${r?.find(t=>t.getNameAsString()===String(e))?.getAlias().join(`, `)})`:``}`).join(`
4
4
  `)} \n\nUsing the following env prefix: \n${d.config.env.prefix.map(e=>` - ${e}`).join(`
5
- `)} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`)}}return{visitor:{MemberExpression(e,t){if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`$storm`})&&e.get(`property`)?.isIdentifier()){let r=e.get(`property`)?.node;f(r,t,!1),e.replaceWithSourceString(`env.${r.name}`),n(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isCallExpression({callee:{name:`useStorm`,type:`Identifier`}})&&e.get(`property`)?.isIdentifier()){let r=e.get(`property`)?.node;f(r,t,!1),e.replaceWithSourceString(`env.${r.name}`),n(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`process`})&&e.get(`property`)?.isIdentifier()){let r=e.get(`property`)?.node;if(!r.name)return;f(r,t,!1),e.replaceWithSourceString(`env.${r.name}`),n(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isMetaProperty()&&e.get(`property`)?.isIdentifier()){let r=e.get(`property`)?.node;if(!r.name)return;f(r,t,!1),e.replaceWithSourceString(`env.${r.name}`),n(e,{module:`storm:env`,name:`env`,imported:`env`})}}},post(){t(s.TRACE,`Adding environment variables from ${this.filename||`unknown file`} to env.json.`);let n=e.ReflectionClass.from({kind:e.ReflectionKind.objectLiteral,description:`An object containing the environment variables used by the application.`,types:[]}),a=o(d,`env`);a&&u(a)&&(t(s.TRACE,`Environment reflection file found at ${a}, reading existing reflection.`),n=(0,e.resolveClassType)((0,e.deserializeType)(r(new c.Message(l(a),!1).getRoot(i).types)))),t(s.TRACE,`Adding new variables to env reflection at ${a}.`),n.getProperties().filter(e=>e.getNameAsString()&&!d.env.used.env.hasProperty(e.getNameAsString())).forEach(e=>{d.env.used.env.addProperty({...e,name:e.getNameAsString(),description:e.getDescription()??`The ${e.getNameAsString()} variable.`,default:e.getDefaultValue(),optional:e.isOptional()?!0:void 0,readonly:e.isReadonly()?!0:void 0,visibility:e.getVisibility(),type:e.getType(),tags:e.getTags()})})}}});export{d as envBabelPlugin};
5
+ `)} \n\nPlease check your \`env\` configuration option. If you are using a custom dotenv type definition, please make sure that the configuration names match the ones in the code. \n\n`)}}return{visitor:{MemberExpression(e,t){if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`$storm`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),o(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isCallExpression({callee:{name:`useStorm`,type:`Identifier`}})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),o(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isIdentifier({name:`process`})&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),o(e,{module:`storm:env`,name:`env`,imported:`env`})}else if(e.get(`object`)?.get(`property`)?.isIdentifier({name:`env`})&&e.get(`object`)?.get(`object`)?.isMetaProperty()&&e.get(`property`)?.isIdentifier()){let n=e.get(`property`)?.node;if(!n.name)return;f(n,t,!1),e.replaceWithSourceString(`env.${n.name}`),o(e,{module:`storm:env`,name:`env`,imported:`env`})}}},post(){a(u.TRACE,`Adding environment variables from ${this.filename||`unknown file`} to env.json.`);let i=e.ReflectionClass.from({kind:e.ReflectionKind.objectLiteral,description:`An object containing the environment variables used by the application.`,types:[]}),o=r(d,`env`);o&&l(o)&&(a(u.TRACE,`Environment reflection file found at ${o}, reading existing reflection.`),i=(0,e.resolveClassType)((0,e.deserializeType)(t(new s.Message(c(o),!1).getRoot(n).types)))),a(u.TRACE,`Adding new variables to env reflection at ${o}.`),i.getProperties().filter(e=>e.getNameAsString()&&!d.env.used.env.hasProperty(e.getNameAsString())).forEach(e=>{d.env.used.env.addProperty({...e,name:e.getNameAsString(),description:e.getDescription()??`The ${e.getNameAsString()} variable.`,default:e.getDefaultValue(),optional:e.isOptional()?!0:void 0,readonly:e.isReadonly()?!0:void 0,visibility:e.getVisibility(),type:e.getType(),tags:e.getTags()})})}}});export{d as envBabelPlugin};
@@ -1 +1 @@
1
- const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../alloy/src/core/contexts/context.cjs`),n=require(`../deepkit/src/vendor/type.cjs`),r=require(`../helpers/create-reflection-resource.cjs`),i=require(`../alloy/src/markdown/components/markdown-file.cjs`),a=require(`../alloy/src/markdown/components/markdown-table.cjs`);let o=require(`@alloy-js/core/jsx-runtime`),s=require(`@alloy-js/core`),c=require(`@stryke/path/join`),l=require(`@alloy-js/markdown`);function u(){let e=t.usePowerlines();if(!e)return null;let u=r.createReflectionResource(e);return(0,o.createComponent)(i.MarkdownFile,{get path(){return(0,c.joinPaths)(e.config.projectRoot,`docs`,`generated`,`env.md`)},get children(){return[(0,o.createComponent)(l.Heading,{level:1,children:`Environment Configuration`}),s.code`Below is a list of environment variables used by the`,(0,o.createComponent)(s.Show,{get when(){return!!e?.packageJson.name},get children(){return(0,o.createComponent)(l.Link,{get href(){return`https://www.npmjs.com/package/${e?.packageJson.name}`},get title(){return e.packageJson.name}})}}),s.code`package. These values can be updated in the \`.env\` file in the root of the project.`,(0,o.createIntrinsic)(`hbr`,{}),(0,o.createComponent)(l.Heading,{level:2,children:`Environment Variables`}),s.code`The below list of environment variables 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.`,(0,o.createIntrinsic)(`hbr`,{}),(0,o.createComponent)(a.MarkdownTable,{get data(){return u.data?.getProperties().filter(e=>e.getNameAsString()!==`__STORM_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(e=>({name:e.getNameAsString().trim(),description:(e.getDescription()??``).trim(),type:(0,n.type_exports.stringifyType)(e.getType()).trim().replaceAll(` | `,`, or `),defaultValue:e.hasDefault()?String(e.getDefaultValue())?.includes(`"`)?e.getDefaultValue():`\`${e.getDefaultValue()}\``:``,required:e.isValueRequired()?``:`✔`}))??[]}})]}})}exports.EnvDocs=u;
1
+ const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../deepkit/src/vendor/type.cjs`),n=require(`../helpers/create-reflection-resource.cjs`),r=require(`../alloy/src/core/contexts/context.cjs`),i=require(`../alloy/src/markdown/components/markdown-file.cjs`),a=require(`../alloy/src/markdown/components/markdown-table.cjs`);let o=require(`@alloy-js/core`),s=require(`@alloy-js/core/jsx-runtime`),c=require(`@alloy-js/markdown`),l=require(`@stryke/path/join`);function u(){let e=r.usePowerlines();if(!e)return null;let u=n.createReflectionResource(e);return(0,s.createComponent)(i.MarkdownFile,{get path(){return(0,l.joinPaths)(e.config.projectRoot,`docs`,`generated`,`env.md`)},get children(){return[(0,s.createComponent)(c.Heading,{level:1,children:`Environment Configuration`}),o.code`Below is a list of environment variables used by the`,(0,s.createComponent)(o.Show,{get when(){return!!e?.packageJson.name},get children(){return(0,s.createComponent)(c.Link,{get href(){return`https://www.npmjs.com/package/${e?.packageJson.name}`},get title(){return e.packageJson.name}})}}),o.code`package. These values can be updated in the \`.env\` file in the root of the project.`,(0,s.createIntrinsic)(`hbr`,{}),(0,s.createComponent)(c.Heading,{level:2,children:`Environment Variables`}),o.code`The below list of environment variables 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.`,(0,s.createIntrinsic)(`hbr`,{}),(0,s.createComponent)(a.MarkdownTable,{get data(){return u.data?.getProperties().filter(e=>e.getNameAsString()!==`__STORM_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(e=>({name:e.getNameAsString().trim(),description:(e.getDescription()??``).trim(),type:(0,t.type_exports.stringifyType)(e.getType()).trim().replaceAll(` | `,`, or `),defaultValue:e.hasDefault()?String(e.getDefaultValue())?.includes(`"`)?e.getDefaultValue():`\`${e.getDefaultValue()}\``:``,required:e.isValueRequired()?``:`✔`}))??[]}})]}})}exports.EnvDocs=u;
@@ -1 +1 @@
1
- import{usePowerlines as e}from"../alloy/src/core/contexts/context.mjs";import{type_exports as t}from"../deepkit/src/vendor/type.mjs";import{createReflectionResource as n}from"../helpers/create-reflection-resource.mjs";import{MarkdownFile as r}from"../alloy/src/markdown/components/markdown-file.mjs";import{MarkdownTable as i}from"../alloy/src/markdown/components/markdown-table.mjs";import{createComponent as a,createIntrinsic as o}from"@alloy-js/core/jsx-runtime";import{Show as s,code as c}from"@alloy-js/core";import{joinPaths as l}from"@stryke/path/join";import{Heading as u,Link as d}from"@alloy-js/markdown";function f(){let f=e();if(!f)return null;let p=n(f);return a(r,{get path(){return l(f.config.projectRoot,`docs`,`generated`,`env.md`)},get children(){return[a(u,{level:1,children:`Environment Configuration`}),c`Below is a list of environment variables used by the`,a(s,{get when(){return!!f?.packageJson.name},get children(){return a(d,{get href(){return`https://www.npmjs.com/package/${f?.packageJson.name}`},get title(){return f.packageJson.name}})}}),c`package. These values can be updated in the \`.env\` file in the root of the project.`,o(`hbr`,{}),a(u,{level:2,children:`Environment Variables`}),c`The below list of environment variables 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.`,o(`hbr`,{}),a(i,{get data(){return p.data?.getProperties().filter(e=>e.getNameAsString()!==`__STORM_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(e=>({name:e.getNameAsString().trim(),description:(e.getDescription()??``).trim(),type:(0,t.stringifyType)(e.getType()).trim().replaceAll(` | `,`, or `),defaultValue:e.hasDefault()?String(e.getDefaultValue())?.includes(`"`)?e.getDefaultValue():`\`${e.getDefaultValue()}\``:``,required:e.isValueRequired()?``:`✔`}))??[]}})]}})}export{f as EnvDocs};
1
+ import{type_exports as e}from"../deepkit/src/vendor/type.mjs";import{createReflectionResource as t}from"../helpers/create-reflection-resource.mjs";import{usePowerlines as n}from"../alloy/src/core/contexts/context.mjs";import{MarkdownFile as r}from"../alloy/src/markdown/components/markdown-file.mjs";import{MarkdownTable as i}from"../alloy/src/markdown/components/markdown-table.mjs";import{Show as a,code as o}from"@alloy-js/core";import{createComponent as s,createIntrinsic as c}from"@alloy-js/core/jsx-runtime";import{Heading as l,Link as u}from"@alloy-js/markdown";import{joinPaths as d}from"@stryke/path/join";function f(){let f=n();if(!f)return null;let p=t(f);return s(r,{get path(){return d(f.config.projectRoot,`docs`,`generated`,`env.md`)},get children(){return[s(l,{level:1,children:`Environment Configuration`}),o`Below is a list of environment variables used by the`,s(a,{get when(){return!!f?.packageJson.name},get children(){return s(u,{get href(){return`https://www.npmjs.com/package/${f?.packageJson.name}`},get title(){return f.packageJson.name}})}}),o`package. These values can be updated in the \`.env\` file in the root of the project.`,c(`hbr`,{}),s(l,{level:2,children:`Environment Variables`}),o`The below list of environment variables 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.`,c(`hbr`,{}),s(i,{get data(){return p.data?.getProperties().filter(e=>e.getNameAsString()!==`__STORM_INJECTED__`).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString())).map(t=>({name:t.getNameAsString().trim(),description:(t.getDescription()??``).trim(),type:(0,e.stringifyType)(t.getType()).trim().replaceAll(` | `,`, or `),defaultValue:t.hasDefault()?String(t.getDefaultValue())?.includes(`"`)?t.getDefaultValue():`\`${t.getDefaultValue()}\``:``,required:t.isValueRequired()?``:`✔`}))??[]}})]}})}export{f as EnvDocs};