@powerlines/plugin-react 0.1.98 → 0.1.100

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.
@@ -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(`@stryke/type-checks/is-set-string`),o=require(`@storm-software/config-tools/types`),s=require(`@stryke/path/is-parent-path`),c=require(`@stryke/path/replace`),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,a)=>{if(!Array.isArray(a))return;let u=async e=>{for(let t of a)await l(e,t)},d=(0,i.getContextForRenderNode)(a);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(o.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:(0,c.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,a,n)}}else d.meta?.entry||(0,s.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(o.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,a,n)}):(e.log(o.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,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.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,a.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,a.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(`
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(`@stryke/type-checks/is-set-string`),o=require(`@storm-software/config-tools/types`),s=require(`@stryke/path/is-parent-path`),c=require(`@stryke/path/replace`),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,a)=>{if(!Array.isArray(a))return;let u=async e=>{for(let t of a)await l(e,t)},d=(0,i.getContextForRenderNode)(a);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(o.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:(0,c.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(e,a,n)}}else d.meta?.entry||(0,s.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(o.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,a,n)}):(e.log(o.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,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.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,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!(0,a.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,a.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
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,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{isSetString as u}from"@stryke/type-checks/is-set-string";import{LogLevelLabel as d}from"@storm-software/config-tools/types";import{isParentPath as f}from"@stryke/path/is-parent-path";import{replacePath as p}from"@stryke/path/replace";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(d.TRACE,`Rendering built-in runtime module with ID: ${c.meta.builtin.id}`),r={kind:`builtin`,id:c.meta.builtin.id,path:p(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||f(e.entryPath,c.meta.sourceFile.path)?(e.log(d.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(d.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(d.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(!u(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&u(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(`
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{isSetString as u}from"@stryke/type-checks/is-set-string";import{LogLevelLabel as d}from"@storm-software/config-tools/types";import{isParentPath as f}from"@stryke/path/is-parent-path";import{replacePath as p}from"@stryke/path/replace";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(d.TRACE,`Rendering built-in runtime module with ID: ${c.meta.builtin.id}`),r={kind:`builtin`,id:c.meta.builtin.id,path:p(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||f(e.entryPath,c.meta.sourceFile.path)?(e.log(d.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(d.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(d.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,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!u(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&u(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
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 +1 @@
1
- require(`../../core/components/single-line-comment.cjs`),require(`../../core/components/source-file.cjs`);let e=require(`@alloy-js/core/jsx-runtime`),t=require(`@alloy-js/core`);require(`@alloy-js/markdown`);
1
+ require(`../../core/contexts/context.cjs`),require(`../../core/components/single-line-comment.cjs`),require(`../../core/components/source-file.cjs`);let e=require(`@alloy-js/core/jsx-runtime`),t=require(`@alloy-js/core`),n=require(`@stryke/string-format/title-case`);require(`@alloy-js/markdown`);
@@ -1 +1 @@
1
- import"../../core/components/single-line-comment.mjs";import"../../core/components/source-file.mjs";import{createComponent as e,createIntrinsic as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{Show as r,code as i,getContext as a,splitProps as o}from"@alloy-js/core";import"@alloy-js/markdown";export{};
1
+ import"../../core/contexts/context.mjs";import"../../core/components/single-line-comment.mjs";import"../../core/components/source-file.mjs";import{createComponent as e,createIntrinsic as t,mergeProps as n}from"@alloy-js/core/jsx-runtime";import{Show as r,code as i,getContext as a,splitProps as o}from"@alloy-js/core";import{titleCase as s}from"@stryke/string-format/title-case";import"@alloy-js/markdown";export{};
@@ -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/typescript`),o=require(`@stryke/type-checks/is-string`),s=require(`@stryke/path/append`),c=require(`@stryke/type-checks/is-boolean`);function l(e){let[{children:t,path:o,imports:l,tsx:f,header:p},m]=(0,i.splitProps)(e,[`children`,`path`,`imports`,`tsx`,`header`]),h=(0,i.useContext)(i.SourceDirectoryContext),g=(0,a.getSourceDirectoryData)(h),_=(0,s.appendPath)(o,h.path),v=new a.TSModuleScope(_,(0,i.useScope)());g.modules.add(v);let y=(0,i.useContext)(a.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)(a.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,a.useSourceFile)(),s=e.scope??n.scope;return(0,r.createComponent)(i.Show,{get when(){return s.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,o.isString)(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!(0,o.isString)(e)&&e.default).length>0&&t.filter(e=>(0,o.isString)(e)||!e.default).length>0?`, `:``)+(t.filter(e=>(0,o.isString)(e)||!e.default).length>0?`{ ${t.map(e=>(0,o.isString)(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),(0,r.createComponent)(i.Show,{get when(){return s.importedModules.size>0},get children(){return(0,r.createComponent)(a.ImportStatements,{get records(){return s.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/contexts/context.cjs`),n=require(`../../core/components/single-line-comment.cjs`),r=require(`../../core/components/source-file.cjs`);let i=require(`@alloy-js/core/jsx-runtime`),a=require(`@alloy-js/core`),o=require(`@alloy-js/typescript`),s=require(`@stryke/type-checks/is-string`),c=require(`@stryke/path/append`),l=require(`@stryke/string-format/title-case`),u=require(`@stryke/type-checks/is-boolean`);function d(e){let[{children:t,path:n,imports:s,tsx:l,header:d,hashbang:m},h]=(0,a.splitProps)(e,[`children`,`path`,`imports`,`tsx`,`header`,`hashbang`]),g=(0,a.useContext)(a.SourceDirectoryContext),_=(0,o.getSourceDirectoryData)(g),v=(0,c.appendPath)(n,g.path),y=new o.TSModuleScope(v,(0,a.useScope)());_.modules.add(y);let b=(0,a.useContext)(o.PackageContext);return b&&b.scope.addModule(y),e.export&&b&&((0,u.isBoolean)(e.export)?b.scope.addExport(v,y):b.scope.addExport(e.export,y)),(0,i.createComponent)(o.SourceFileContext.Provider,{value:{scope:y},get children(){return(0,i.createComponent)(a.Scope,{value:y,get children(){return(0,i.createComponent)(r.SourceFile,(0,i.mergeProps)(h,{path:v,get header(){return d??(0,i.createComponent)(f,{hashbang:m,get children(){return(0,i.createComponent)(p,{imports:s,scope:y})}})},filetype:l?`tsx`:`typescript`,children:t}))}})}})}function f(e){let{header:r,hashbang:o,disableEslint:s=!0,disableBiome:c=!0,disablePrettier:u=!1,children:d}=e,f=t.usePowerlines();return[(0,i.createComponent)(a.Show,{get when(){return!!o},get children(){return[(0,i.memo)(()=>o===!0?a.code`#!/usr/bin/env ${f?.config.mode===`development`?`-S NODE_OPTIONS=--enable-source-maps`:``} node`:o),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(a.Show,{get when(){return!!r},get children(){return[r,(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createIntrinsic)(`hbr`,{}),(0,i.createComponent)(a.Show,{get when(){return!!s},get children(){return[(0,i.createComponent)(n.SingleLineComment,{variant:`slash-star`,children:`eslint-disable`}),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(a.Show,{get when(){return!!u},get children(){return[(0,i.createComponent)(n.SingleLineComment,{variant:`slash-star`,children:`prettier-ignore`}),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(a.Show,{get when(){return!!c},get children(){return[(0,i.createComponent)(n.SingleLineComment,{children:`biome-ignore lint: disable`}),(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(a.Show,{get when(){return!!s||!!u||!!c},get children(){return(0,i.createIntrinsic)(`hbr`,{})}}),(0,i.createComponent)(a.Show,{get when(){return!!d},get children(){return[d,(0,i.createIntrinsic)(`hbr`,{})]}}),(0,i.createComponent)(n.SingleLineComment,{get children(){return a.code`Generated by ${(0,l.titleCase)(f?.config.framework)||`Powerlines`}`}}),(0,i.createIntrinsic)(`hbr`,{}),(0,i.createComponent)(n.SingleLineComment,{children:a.code`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`}),(0,i.createIntrinsic)(`hbr`,{})]}function p(e){let{imports:t}=e,n=(0,o.useSourceFile)(),r=e.scope??n.scope;return(0,i.createComponent)(a.Show,{get when(){return r.importedModules.size>0||!!t&&Object.keys(t).length>0},get children(){return[(0,i.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,s.isString)(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!(0,s.isString)(e)&&e.default).length>0&&t.filter(e=>(0,s.isString)(e)||!e.default).length>0?`, `:``)+(t.filter(e=>(0,s.isString)(e)||!e.default).length>0?`{ ${t.map(e=>(0,s.isString)(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),(0,i.createComponent)(a.Show,{get when(){return r.importedModules.size>0},get children(){return(0,i.createComponent)(o.ImportStatements,{get records(){return r.importedModules}})}}),(0,i.createIntrinsic)(`hbr`,{})]}})}exports.TypescriptFile=d,exports.TypescriptFileHeader=f,exports.TypescriptFileHeaderImports=p;
@@ -4,6 +4,7 @@ import { Children } from "@alloy-js/core";
4
4
 
5
5
  //#region ../alloy/src/typescript/components/typescript-file.d.ts
6
6
  type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
7
+ hashbang?: Children | true;
7
8
  header?: Children;
8
9
  imports?: TypescriptFileImports;
9
10
  export?: boolean | string;
@@ -5,6 +5,7 @@ import { TSModuleScope } from "@alloy-js/typescript";
5
5
 
6
6
  //#region ../alloy/src/typescript/components/typescript-file.d.ts
7
7
  type TypescriptFileProps = Omit<SourceFileProps$1, "filetype"> & ComponentProps & {
8
+ hashbang?: Children | true;
8
9
  header?: Children;
9
10
  imports?: TypescriptFileImports;
10
11
  export?: boolean | string;
@@ -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{ImportStatements as f,PackageContext as p,SourceFileContext as m,TSModuleScope as h,getSourceDirectoryData as g,useSourceFile as _}from"@alloy-js/typescript";import{isString as v}from"@stryke/type-checks/is-string";import{appendPath as y}from"@stryke/path/append";import{isBoolean as b}from"@stryke/type-checks/is-boolean";function x(e){let[{children:r,path:o,imports:c,tsx:f,header:_},v]=l(e,[`children`,`path`,`imports`,`tsx`,`header`]),x=u(s),w=g(x),T=y(o,x.path),E=new h(T,d());w.modules.add(E);let D=u(p);return D&&D.scope.addModule(E),e.export&&D&&(b(e.export)?D.scope.addExport(T,E):D.scope.addExport(e.export,E)),n(m.Provider,{value:{scope:E},get children(){return n(a,{value:E,get children(){return n(t,i(v,{path:T,get header(){return _??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=_(),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=>!v(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!v(e)&&e.default).length>0&&t.filter(e=>v(e)||!e.default).length>0?`, `:``)+(t.filter(e=>v(e)||!e.default).length>0?`{ ${t.map(e=>v(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(f,{get records(){return a.importedModules}})}}),r(`hbr`,{})]}})}export{x as TypescriptFile,S as TypescriptFileHeader,C as TypescriptFileHeaderImports};
1
+ import{usePowerlines as e}from"../../core/contexts/context.mjs";import{SingleLineComment as t}from"../../core/components/single-line-comment.mjs";import{SourceFile as n}from"../../core/components/source-file.mjs";import{createComponent as r,createIntrinsic as i,memo as a,mergeProps as o}from"@alloy-js/core/jsx-runtime";import{Scope as s,Show as c,SourceDirectoryContext as l,code as u,splitProps as d,useContext as f,useScope as p}from"@alloy-js/core";import{ImportStatements as m,PackageContext as h,SourceFileContext as g,TSModuleScope as _,getSourceDirectoryData as v,useSourceFile as y}from"@alloy-js/typescript";import{isString as b}from"@stryke/type-checks/is-string";import{appendPath as x}from"@stryke/path/append";import{titleCase as S}from"@stryke/string-format/title-case";import{isBoolean as C}from"@stryke/type-checks/is-boolean";function w(e){let[{children:t,path:i,imports:a,tsx:c,header:u,hashbang:m},y]=d(e,[`children`,`path`,`imports`,`tsx`,`header`,`hashbang`]),b=f(l),S=v(b),w=x(i,b.path),D=new _(w,p());S.modules.add(D);let O=f(h);return O&&O.scope.addModule(D),e.export&&O&&(C(e.export)?O.scope.addExport(w,D):O.scope.addExport(e.export,D)),r(g.Provider,{value:{scope:D},get children(){return r(s,{value:D,get children(){return r(n,o(y,{path:w,get header(){return u??r(T,{hashbang:m,get children(){return r(E,{imports:a,scope:D})}})},filetype:c?`tsx`:`typescript`,children:t}))}})}})}function T(n){let{header:o,hashbang:s,disableEslint:l=!0,disableBiome:d=!0,disablePrettier:f=!1,children:p}=n,m=e();return[r(c,{get when(){return!!s},get children(){return[a(()=>s===!0?u`#!/usr/bin/env ${m?.config.mode===`development`?`-S NODE_OPTIONS=--enable-source-maps`:``} node`:s),i(`hbr`,{})]}}),r(c,{get when(){return!!o},get children(){return[o,i(`hbr`,{})]}}),i(`hbr`,{}),r(c,{get when(){return!!l},get children(){return[r(t,{variant:`slash-star`,children:`eslint-disable`}),i(`hbr`,{})]}}),r(c,{get when(){return!!f},get children(){return[r(t,{variant:`slash-star`,children:`prettier-ignore`}),i(`hbr`,{})]}}),r(c,{get when(){return!!d},get children(){return[r(t,{children:`biome-ignore lint: disable`}),i(`hbr`,{})]}}),r(c,{get when(){return!!l||!!f||!!d},get children(){return i(`hbr`,{})}}),r(c,{get when(){return!!p},get children(){return[p,i(`hbr`,{})]}}),r(t,{get children(){return u`Generated by ${S(m?.config.framework)||`Powerlines`}`}}),i(`hbr`,{}),r(t,{children:u`NOTE: Do not edit this file manually - it will be overwritten automatically by the "prepare" command`}),i(`hbr`,{})]}function E(e){let{imports:t}=e,n=y(),a=e.scope??n.scope;return r(c,{get when(){return a.importedModules.size>0||!!t&&Object.keys(t).length>0},get children(){return[r(c,{get when(){return!!t&&Object.keys(t).length>0},get children(){return Object.entries(t??{}).map(([e,t])=>u`import ${t===null?``:t.filter(e=>!b(e)&&e.default).map(e=>e.alias?e.alias:e.name).join(`, `)+(t.filter(e=>!b(e)&&e.default).length>0&&t.filter(e=>b(e)||!e.default).length>0?`, `:``)+(t.filter(e=>b(e)||!e.default).length>0?`{ ${t.map(e=>b(e)?e:e.alias?`${e.name} as ${e.alias}`:e.name).join(`, `)} }`:``)} from "${e}";`)}}),r(c,{get when(){return a.importedModules.size>0},get children(){return r(m,{get records(){return a.importedModules}})}}),i(`hbr`,{})]}})}export{w as TypescriptFile,T as TypescriptFileHeader,E 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/jsx-runtime`),a=require(`@alloy-js/core`),o=require(`@alloy-js/typescript`),s=require(`@stryke/type-checks/is-string`),c=require(`@stryke/string-format/pascal-case`);function l(e){let[{name:t,reflection:l},d]=(0,a.splitProps)(e,[`name`,`reflection`]),f=(0,a.computed)(()=>(0,c.pascalCase)(((0,s.isString)(t)?t:t.toString())||l.getName())),p=l.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:l},get children(){return[(0,i.createComponent)(r.TSDocReflectionClass,{}),(0,i.createComponent)(o.InterfaceDeclaration,(0,i.mergeProps)({export:!0,get name(){return f.value}},d,{get children(){return(0,i.createComponent)(a.For,{each:p,doubleHardline:!0,semicolon:!0,children:e=>(0,i.createComponent)(u,{property:e})})}}))]}})}function u(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=l;
@@ -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{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{isString as f}from"@stryke/type-checks/is-string";import{pascalCase as p}from"@stryke/string-format/pascal-case";function m(e){let[{name:n,reflection:i},d]=l(e,[`name`,`reflection`]),m=c(()=>p((f(n)?n:n.toString())||i.getName())),g=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 m.value}},d,{get children(){return a(s,{each:g,doubleHardline:!0,semicolon:!0,children:e=>a(h,{property:e})})}}))]}})}function h(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{m 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(`@alloy-js/typescript`),s=require(`@stryke/type-checks/is-undefined`),c=require(`@stryke/string-format/camel-case`),l=require(`@stryke/string-format/pascal-case`);function u(e){if(!e.reflection?.value)return null;let t=(0,a.computed)(()=>(0,c.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,o.createValueSymbol)(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?o.TSSymbolFlags.Nullish:o.TSSymbolFlags.None,type:e.type?p.firstSymbol:void 0,namePolicy:(0,o.useTSNamePolicy)().for(`variable`)});e.type||m.moveMembersTo(h);let g=e.var?`var`:e.let?`let`:`const`,_=e.type?(0,i.createComponent)(o.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)(o.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:s}]=(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.ObjectProperty,{get name(){return s.getNameAsString()},get value(){return t.stringifyDefaultValue(s)}}),(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(`@alloy-js/core/jsx-runtime`),a=require(`@alloy-js/core`),o=require(`@alloy-js/typescript`),s=require(`@stryke/type-checks/is-string`),c=require(`@stryke/type-checks/is-undefined`),l=require(`@stryke/string-format/camel-case`),u=require(`@stryke/string-format/pascal-case`);function d(e){if(!e.reflection?.value)return null;let t=(0,a.computed)(()=>(0,l.camelCase)(((0,s.isString)(e.name)?e.name:e.name.toString())||e.reflection.value.getName())),d=(0,a.computed)(()=>e.type||(0,u.pascalCase)(e.reflection.value.getName())),p=(0,a.computed)(()=>e.reflection.value.getProperties().filter(t=>!t.isIgnored()&&!(0,c.isUndefined)(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>(0,c.isUndefined)(t)&&!(0,c.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)),m=(0,a.createSymbolSlot)(),h=(0,a.createSymbolSlot)(),g=(0,o.createValueSymbol)(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?o.TSSymbolFlags.Nullish:o.TSSymbolFlags.None,type:e.type?m.firstSymbol:void 0,namePolicy:(0,o.useTSNamePolicy)().for(`variable`)});e.type||h.moveMembersTo(g);let _=e.var?`var`:e.let?`let`:`const`,v=e.type?(0,i.createComponent)(o.TypeRefContext,{get children(){return[`: `,(0,i.createComponent)(m,{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:d.value,defaultValue:e.defaultValue?.value}}},get children(){return[(0,i.createComponent)(a.Show,{get when(){return!!t.value&&!!d.value},get children(){return[(0,i.createComponent)(r.TSDocReflectionClass,{}),(0,i.createComponent)(a.Declaration,{symbol:g,get children(){return[(0,i.memo)(()=>e.export?`export `:``),(0,i.memo)(()=>e.default?`default `:``),_,` `,(0,i.createComponent)(a.Name,{}),v,` =`,` `,(0,i.createComponent)(h,{get children(){return e.initializer??e.children??(0,i.createComponent)(o.ObjectExpression,{get children(){return(0,i.createComponent)(a.For,{get each(){return p.value??[]},comma:!0,doubleHardline:!0,children:e=>(0,i.createComponent)(f,{property:e})})}})}})]}})]}}),(0,i.createIntrinsic)(`hbr`,{})]}})}})}function f(e){let[{property:s}]=(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.ObjectProperty,{get name(){return s.getNameAsString()},get value(){return t.stringifyDefaultValue(s)}}),(0,i.createIntrinsic)(`hbr`,{})]}})}exports.TypescriptObject=d;
@@ -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{ObjectExpression as h,ObjectProperty as g,TSSymbolFlags as _,TypeRefContext as v,createValueSymbol as y,useTSNamePolicy as b}from"@alloy-js/typescript";import{isUndefined as x}from"@stryke/type-checks/is-undefined";import{camelCase as S}from"@stryke/string-format/camel-case";import{pascalCase as C}from"@stryke/string-format/pascal-case";function w(e){if(!e.reflection?.value)return null;let n=f(()=>S(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()&&!x(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>x(t)&&!x(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)),g=p(),w=p(),E=y(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?_.Nullish:_.None,type:e.type?g.firstSymbol:void 0,namePolicy:b().for(`variable`)});e.type||w.moveMembersTo(E);let D=e.var?`var`:e.let?`let`:`const`,O=e.type?a(v,{get children(){return[`: `,a(g,{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(h,{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(g,{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{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{ObjectExpression as h,ObjectProperty as g,TSSymbolFlags as _,TypeRefContext as v,createValueSymbol as y,useTSNamePolicy as b}from"@alloy-js/typescript";import{isString as x}from"@stryke/type-checks/is-string";import{isUndefined as S}from"@stryke/type-checks/is-undefined";import{camelCase as C}from"@stryke/string-format/camel-case";import{pascalCase as w}from"@stryke/string-format/pascal-case";function T(e){if(!e.reflection?.value)return null;let n=f(()=>C((x(e.name)?e.name:e.name.toString())||e.reflection.value.getName())),i=f(()=>e.type||w(e.reflection.value.getName())),m=f(()=>e.reflection.value.getProperties().filter(t=>!t.isIgnored()&&!S(e.defaultValue?.value?.[t.getNameAsString()]??t.getAlias().reduce((t,n)=>S(t)&&!S(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)),g=p(),T=p(),D=y(e.name,{refkeys:e.refkey,default:e.default,export:e.export,metadata:e.metadata,tsFlags:e.nullish?_.Nullish:_.None,type:e.type?g.firstSymbol:void 0,namePolicy:b().for(`variable`)});e.type||T.moveMembersTo(D);let O=e.var?`var`:e.let?`let`:`const`,k=e.type?a(v,{get children(){return[`: `,a(g,{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:D,get children(){return[s(()=>e.export?`export `:``),s(()=>e.default?`default `:``),O,` `,a(u,{}),k,` =`,` `,a(T,{get children(){return e.initializer??e.children??a(h,{get children(){return a(l,{get each(){return m.value??[]},comma:!0,doubleHardline:!0,children:e=>a(E,{property:e})})}})}})]}})]}}),o(`hbr`,{})]}})}})}function E(t){let[{property:r}]=m(t,[`property`]);return a(n.Provider,{value:r,get children(){return[a(i,{}),a(g,{get name(){return r.getNameAsString()},get value(){return e(r)}}),o(`hbr`,{})]}})}export{T as TypescriptObject};
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./deepkit/src/vendor/type.cjs`),n=require(`./components/react-optimized.cjs`);require(`./components/index.cjs`);const r=require(`./alloy/src/create-plugin.cjs`),i=require(`./plugin-babel/src/index.cjs`),a=require(`./plugin-env/src/index.cjs`),o=require(`./powerlines/src/lib/typescript/tsconfig.cjs`);let s=require(`@alloy-js/core/jsx-runtime`),c=require(`defu`);c=e.__toESM(c);let l=require(`@storm-software/config-tools/types`),u=require(`@vitejs/plugin-react`);u=e.__toESM(u);const d=r.createAlloyPlugin((e={})=>({name:`react`,dependsOn:[i.default(e.babel),a.default(e.env)],config(){return(0,c.default)({react:e},{react:{jsxImportSource:this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource}},{react:{jsxRuntime:`automatic`,jsxImportSource:`react`,compiler:{target:`19`,compilationMode:`infer`,gating:{source:`${this.config.output.builtinPrefix}:react/optimized`,importSpecifierName:`isOptimizationEnabled`},enableReanimatedCheck:!0,logger:{logEvent:(e,t)=>{this.log(t.kind===`CompileSuccess`?l.LogLevelLabel.SUCCESS:t.kind===`AutoDepsEligible`||t.kind===`AutoDepsDecorations`?l.LogLevelLabel.INFO:t.kind===`CompileSkip`||t.kind===`CompileDiagnostic`?l.LogLevelLabel.DEBUG:t.kind===`Timing`?l.LogLevelLabel.TRACE:l.LogLevelLabel.ERROR,`(${e}) ${t.kind===`CompileSuccess`?`React Compiler Success`:t.kind===`AutoDepsEligible`?`React AutoDeps Eligible - ${t.depArrayLoc.identifierName||`No identifier`}`:t.kind===`AutoDepsDecorations`?`React AutoDeps Decorations - ${t.decorations.filter(e=>e.identifierName).map(e=>e.identifierName).join(`, `)}`:t.kind===`CompileSkip`?`React Compile Skip - ${t.reason}`:t.kind===`CompileDiagnostic`?`React Compile Diagnostic - (Category: ${t.detail.category}) ${t.detail.reason}${t.detail.description?`\n${t.detail.description}`:``}`:t.kind===`Timing`?`React ${t.measurement.entryType} Timing (${t.measurement.name}) - ${t.measurement.duration}ms`:`React Compiler Error - ${t.fnLoc?.identifierName||`unknown location`}`}`)}}}}})},configResolved(){if(this.dependencies.react=`^19.2.0`,this.dependencies[`react-dom`]=`^19.2.0`,this.devDependencies[`@types/react`]=`^19.2.2`,this.devDependencies[`@types/react-dom`]=`^19.2.2`,this.config.react.compiler!==!1&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push([`babel-plugin-react-compiler`,this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.module??=`esnext`,this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.options.jsxImportSource===`react`?this.tsconfig.tsconfigJson.compilerOptions.jsx??=`react-jsx`:this.tsconfig.tsconfigJson.compilerOptions.jsx??=`preserve`,this.environment.consumer===`client`&&(o.isMatchFound(`dom`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM`),o.isMatchFound(`dom.iterable`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM.Iterable`)),o.isMatchFound(`esnext`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`ESNext`),this.tsconfig.options.resolveJsonModule!==!0&&(this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule=!0),this.config.build.variant===`vite`){this.tsconfig.tsconfigJson.compilerOptions.types??=[],o.isMatchFound(`vite/client`,this.tsconfig.tsconfigJson.compilerOptions.types)||this.tsconfig.tsconfigJson.compilerOptions.types.push(`vite/client`);let e=this.config.build;e.build??={},e.build.target=`chrome95`,e.plugins??=[],e.plugins.unshift((0,u.default)({babel:this.config.transform.babel,jsxImportSource:this.config.react.jsxImportSource,jsxRuntime:this.config.react.jsxRuntime,reactRefreshHost:this.config.react.reactRefreshHost}))}this.env?.types?.env&&!this.env.types.env.hasProperty(`DISABLE_REACT_COMPILER`)&&this.env.types.env.addProperty({name:`DISABLE_REACT_COMPILER`,optional:!0,readonly:!0,description:`Disables the React compiler optimizations.`,visibility:t.type_exports.ReflectionVisibility.public,type:{kind:t.type_exports.ReflectionKind.boolean},default:!1})},render(){let e=this;return(0,s.createComponent)(n.ReactOptimizedBuiltin,{get override(){return e.config.react.compiler===!1?!1:void 0}})}}));var f=d;exports.ReactOptimizedBuiltin=n.ReactOptimizedBuiltin,exports.default=f,exports.plugin=d;
1
+ Object.defineProperty(exports,`__esModule`,{value:!0});const e=require(`./_virtual/rolldown_runtime.cjs`),t=require(`./deepkit/src/vendor/type.cjs`),n=require(`./components/react-optimized.cjs`);require(`./components/index.cjs`);const r=require(`./alloy/src/create-plugin.cjs`),i=require(`./plugin-babel/src/index.cjs`),a=require(`./plugin-env/src/index.cjs`),o=require(`./powerlines/src/lib/typescript/tsconfig.cjs`);let s=require(`@alloy-js/core/jsx-runtime`),c=require(`defu`);c=e.__toESM(c);let l=require(`@storm-software/config-tools/types`),u=require(`@vitejs/plugin-react`);u=e.__toESM(u);const d=r.createAlloyPlugin((e={})=>({name:`react`,dependsOn:[i.default(e.babel),a.default(e.env)],config(){return(0,c.default)({react:e},{react:{jsxImportSource:this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource}},{react:{jsxRuntime:`automatic`,jsxImportSource:`react`,compiler:{target:`19`,compilationMode:`infer`,gating:{source:`${this.config.output.builtinPrefix}:react/optimized`,importSpecifierName:`isOptimizationEnabled`},enableReanimatedCheck:!0,logger:{logEvent:(e,t)=>{this.log(t.kind===`CompileSuccess`?l.LogLevelLabel.SUCCESS:t.kind===`AutoDepsEligible`||t.kind===`AutoDepsDecorations`?l.LogLevelLabel.INFO:t.kind===`CompileSkip`||t.kind===`CompileDiagnostic`?l.LogLevelLabel.DEBUG:t.kind===`Timing`?l.LogLevelLabel.TRACE:l.LogLevelLabel.ERROR,`(${e}) ${t.kind===`CompileSuccess`?`React Compiler Success`:t.kind===`AutoDepsEligible`?`React AutoDeps Eligible - ${t.depArrayLoc.identifierName||`No identifier`}`:t.kind===`AutoDepsDecorations`?`React AutoDeps Decorations - ${t.decorations.filter(e=>e.identifierName).map(e=>e.identifierName).join(`, `)}`:t.kind===`CompileSkip`?`React Compile Skip - ${t.reason}`:t.kind===`CompileDiagnostic`?`React Compile Diagnostic - (Category: ${t.detail.category}) ${t.detail.reason}${t.detail.description?`\n${t.detail.description}`:``}`:t.kind===`Timing`?`React ${t.measurement.entryType} Timing (${t.measurement.name}) - ${t.measurement.duration}ms`:`React Compiler Error - ${t.fnLoc?.identifierName||`unknown location`}`}`)}}}}})},configResolved(){if(this.dependencies.react=`^19.2.3`,this.dependencies[`react-dom`]=`^19.2.3`,this.devDependencies[`@types/react`]=`^19.2.3`,this.devDependencies[`@types/react-dom`]=`^19.2.3`,this.config.react.compiler!==!1&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push([`babel-plugin-react-compiler`,this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.module??=`esnext`,this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.options.jsxImportSource===`react`?this.tsconfig.tsconfigJson.compilerOptions.jsx??=`react-jsx`:this.tsconfig.tsconfigJson.compilerOptions.jsx??=`preserve`,this.environment.consumer===`client`&&(o.isMatchFound(`dom`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM`),o.isMatchFound(`dom.iterable`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM.Iterable`)),o.isMatchFound(`esnext`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`ESNext`),this.tsconfig.options.resolveJsonModule!==!0&&(this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule=!0),this.config.build.variant===`vite`){this.tsconfig.tsconfigJson.compilerOptions.types??=[],o.isMatchFound(`vite/client`,this.tsconfig.tsconfigJson.compilerOptions.types)||this.tsconfig.tsconfigJson.compilerOptions.types.push(`vite/client`);let e=this.config.build;e.build??={},e.build.target=`chrome95`,e.plugins??=[],e.plugins.unshift((0,u.default)({babel:this.config.transform.babel,jsxImportSource:this.config.react.jsxImportSource,jsxRuntime:this.config.react.jsxRuntime,reactRefreshHost:this.config.react.reactRefreshHost}))}this.env?.types?.env&&!this.env.types.env.hasProperty(`DISABLE_REACT_COMPILER`)&&this.env.types.env.addProperty({name:`DISABLE_REACT_COMPILER`,optional:!0,readonly:!0,description:`Disables the React compiler optimizations.`,visibility:t.type_exports.ReflectionVisibility.public,type:{kind:t.type_exports.ReflectionKind.boolean},default:!1})},render(){let e=this;return(0,s.createComponent)(n.ReactOptimizedBuiltin,{get override(){return e.config.react.compiler===!1?!1:void 0}})}}));var f=d;exports.ReactOptimizedBuiltin=n.ReactOptimizedBuiltin,exports.default=f,exports.plugin=d;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{type_exports as e}from"./deepkit/src/vendor/type.mjs";import{ReactOptimizedBuiltin as t}from"./components/react-optimized.mjs";import"./components/index.mjs";import{createAlloyPlugin as n}from"./alloy/src/create-plugin.mjs";import r from"./plugin-babel/src/index.mjs";import i from"./plugin-env/src/index.mjs";import{isMatchFound as a}from"./powerlines/src/lib/typescript/tsconfig.mjs";import{createComponent as o}from"@alloy-js/core/jsx-runtime";import s from"defu";import{LogLevelLabel as c}from"@storm-software/config-tools/types";import l from"@vitejs/plugin-react";const u=n((n={})=>({name:`react`,dependsOn:[r(n.babel),i(n.env)],config(){return s({react:n},{react:{jsxImportSource:this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource}},{react:{jsxRuntime:`automatic`,jsxImportSource:`react`,compiler:{target:`19`,compilationMode:`infer`,gating:{source:`${this.config.output.builtinPrefix}:react/optimized`,importSpecifierName:`isOptimizationEnabled`},enableReanimatedCheck:!0,logger:{logEvent:(e,t)=>{this.log(t.kind===`CompileSuccess`?c.SUCCESS:t.kind===`AutoDepsEligible`||t.kind===`AutoDepsDecorations`?c.INFO:t.kind===`CompileSkip`||t.kind===`CompileDiagnostic`?c.DEBUG:t.kind===`Timing`?c.TRACE:c.ERROR,`(${e}) ${t.kind===`CompileSuccess`?`React Compiler Success`:t.kind===`AutoDepsEligible`?`React AutoDeps Eligible - ${t.depArrayLoc.identifierName||`No identifier`}`:t.kind===`AutoDepsDecorations`?`React AutoDeps Decorations - ${t.decorations.filter(e=>e.identifierName).map(e=>e.identifierName).join(`, `)}`:t.kind===`CompileSkip`?`React Compile Skip - ${t.reason}`:t.kind===`CompileDiagnostic`?`React Compile Diagnostic - (Category: ${t.detail.category}) ${t.detail.reason}${t.detail.description?`\n${t.detail.description}`:``}`:t.kind===`Timing`?`React ${t.measurement.entryType} Timing (${t.measurement.name}) - ${t.measurement.duration}ms`:`React Compiler Error - ${t.fnLoc?.identifierName||`unknown location`}`}`)}}}}})},configResolved(){if(this.dependencies.react=`^19.2.0`,this.dependencies[`react-dom`]=`^19.2.0`,this.devDependencies[`@types/react`]=`^19.2.2`,this.devDependencies[`@types/react-dom`]=`^19.2.2`,this.config.react.compiler!==!1&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push([`babel-plugin-react-compiler`,this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.module??=`esnext`,this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.options.jsxImportSource===`react`?this.tsconfig.tsconfigJson.compilerOptions.jsx??=`react-jsx`:this.tsconfig.tsconfigJson.compilerOptions.jsx??=`preserve`,this.environment.consumer===`client`&&(a(`dom`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM`),a(`dom.iterable`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM.Iterable`)),a(`esnext`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`ESNext`),this.tsconfig.options.resolveJsonModule!==!0&&(this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule=!0),this.config.build.variant===`vite`){this.tsconfig.tsconfigJson.compilerOptions.types??=[],a(`vite/client`,this.tsconfig.tsconfigJson.compilerOptions.types)||this.tsconfig.tsconfigJson.compilerOptions.types.push(`vite/client`);let e=this.config.build;e.build??={},e.build.target=`chrome95`,e.plugins??=[],e.plugins.unshift(l({babel:this.config.transform.babel,jsxImportSource:this.config.react.jsxImportSource,jsxRuntime:this.config.react.jsxRuntime,reactRefreshHost:this.config.react.reactRefreshHost}))}this.env?.types?.env&&!this.env.types.env.hasProperty(`DISABLE_REACT_COMPILER`)&&this.env.types.env.addProperty({name:`DISABLE_REACT_COMPILER`,optional:!0,readonly:!0,description:`Disables the React compiler optimizations.`,visibility:e.ReflectionVisibility.public,type:{kind:e.ReflectionKind.boolean},default:!1})},render(){let e=this;return o(t,{get override(){return e.config.react.compiler===!1?!1:void 0}})}}));var d=u;export{t as ReactOptimizedBuiltin,d as default,u as plugin};
1
+ import{type_exports as e}from"./deepkit/src/vendor/type.mjs";import{ReactOptimizedBuiltin as t}from"./components/react-optimized.mjs";import"./components/index.mjs";import{createAlloyPlugin as n}from"./alloy/src/create-plugin.mjs";import r from"./plugin-babel/src/index.mjs";import i from"./plugin-env/src/index.mjs";import{isMatchFound as a}from"./powerlines/src/lib/typescript/tsconfig.mjs";import{createComponent as o}from"@alloy-js/core/jsx-runtime";import s from"defu";import{LogLevelLabel as c}from"@storm-software/config-tools/types";import l from"@vitejs/plugin-react";const u=n((n={})=>({name:`react`,dependsOn:[r(n.babel),i(n.env)],config(){return s({react:n},{react:{jsxImportSource:this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource}},{react:{jsxRuntime:`automatic`,jsxImportSource:`react`,compiler:{target:`19`,compilationMode:`infer`,gating:{source:`${this.config.output.builtinPrefix}:react/optimized`,importSpecifierName:`isOptimizationEnabled`},enableReanimatedCheck:!0,logger:{logEvent:(e,t)=>{this.log(t.kind===`CompileSuccess`?c.SUCCESS:t.kind===`AutoDepsEligible`||t.kind===`AutoDepsDecorations`?c.INFO:t.kind===`CompileSkip`||t.kind===`CompileDiagnostic`?c.DEBUG:t.kind===`Timing`?c.TRACE:c.ERROR,`(${e}) ${t.kind===`CompileSuccess`?`React Compiler Success`:t.kind===`AutoDepsEligible`?`React AutoDeps Eligible - ${t.depArrayLoc.identifierName||`No identifier`}`:t.kind===`AutoDepsDecorations`?`React AutoDeps Decorations - ${t.decorations.filter(e=>e.identifierName).map(e=>e.identifierName).join(`, `)}`:t.kind===`CompileSkip`?`React Compile Skip - ${t.reason}`:t.kind===`CompileDiagnostic`?`React Compile Diagnostic - (Category: ${t.detail.category}) ${t.detail.reason}${t.detail.description?`\n${t.detail.description}`:``}`:t.kind===`Timing`?`React ${t.measurement.entryType} Timing (${t.measurement.name}) - ${t.measurement.duration}ms`:`React Compiler Error - ${t.fnLoc?.identifierName||`unknown location`}`}`)}}}}})},configResolved(){if(this.dependencies.react=`^19.2.3`,this.dependencies[`react-dom`]=`^19.2.3`,this.devDependencies[`@types/react`]=`^19.2.3`,this.devDependencies[`@types/react-dom`]=`^19.2.3`,this.config.react.compiler!==!1&&(this.config.transform.babel??={},this.config.transform.babel.plugins??=[],this.config.transform.babel.plugins.push([`babel-plugin-react-compiler`,this.config.react.compiler])),this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.lib??=[],this.tsconfig.tsconfigJson.compilerOptions.module??=`esnext`,this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=this.config.react.jsxImportSource,this.tsconfig.options.jsxImportSource===`react`?this.tsconfig.tsconfigJson.compilerOptions.jsx??=`react-jsx`:this.tsconfig.tsconfigJson.compilerOptions.jsx??=`preserve`,this.environment.consumer===`client`&&(a(`dom`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM`),a(`dom.iterable`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`DOM.Iterable`)),a(`esnext`,this.tsconfig.tsconfigJson.compilerOptions.lib)||this.tsconfig.tsconfigJson.compilerOptions.lib.push(`ESNext`),this.tsconfig.options.resolveJsonModule!==!0&&(this.tsconfig.tsconfigJson.compilerOptions.resolveJsonModule=!0),this.config.build.variant===`vite`){this.tsconfig.tsconfigJson.compilerOptions.types??=[],a(`vite/client`,this.tsconfig.tsconfigJson.compilerOptions.types)||this.tsconfig.tsconfigJson.compilerOptions.types.push(`vite/client`);let e=this.config.build;e.build??={},e.build.target=`chrome95`,e.plugins??=[],e.plugins.unshift(l({babel:this.config.transform.babel,jsxImportSource:this.config.react.jsxImportSource,jsxRuntime:this.config.react.jsxRuntime,reactRefreshHost:this.config.react.reactRefreshHost}))}this.env?.types?.env&&!this.env.types.env.hasProperty(`DISABLE_REACT_COMPILER`)&&this.env.types.env.addProperty({name:`DISABLE_REACT_COMPILER`,optional:!0,readonly:!0,description:`Disables the React compiler optimizations.`,visibility:e.ReflectionVisibility.public,type:{kind:e.ReflectionKind.boolean},default:!1})},render(){let e=this;return o(t,{get override(){return e.config.react.compiler===!1?!1:void 0}})}}));var d=u;export{t as ReactOptimizedBuiltin,d as default,u as plugin};
@@ -1,4 +1,4 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../alloy/src/core/contexts/context.cjs`),n=require(`../../../alloy/src/helpers/refkey.cjs`),r=require(`../../../deepkit/src/vendor/type.cjs`),i=require(`../../../alloy/src/typescript/components/tsdoc.cjs`),a=require(`../../../alloy/src/typescript/components/builtin-file.cjs`),o=require(`../../../alloy/src/typescript/components/typescript-interface.cjs`),s=require(`../../../alloy/src/typescript/components/typescript-object.cjs`),c=require(`../helpers/load.cjs`),l=require(`../helpers/create-reflection-resource.cjs`);let u=require(`@alloy-js/core/jsx-runtime`),d=require(`@alloy-js/core`),f=require(`@alloy-js/typescript`),p=require(`@stryke/type-checks/is-null`),m=require(`defu`);m=e.__toESM(m);let h=require(`@stryke/string-format/title-case`);function g(e){let[{defaultValue:n,reflection:r}]=(0,d.splitProps)(e,[`defaultValue`,`reflection`]),i=t.usePowerlines();return[(0,u.createComponent)(o.TypeScriptInterface,{name:` EnvBase`,extends:[`EnvInterface`],defaultValue:n,reflection:r,export:!0}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createComponent)(f.TypeDeclaration,{name:`Env`,export:!0,get children(){return d.code` {
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../alloy/src/core/contexts/context.cjs`),n=require(`../../../alloy/src/helpers/refkey.cjs`),r=require(`../../../deepkit/src/vendor/type.cjs`),i=require(`../../../alloy/src/typescript/components/tsdoc.cjs`),a=require(`../../../alloy/src/typescript/components/builtin-file.cjs`),o=require(`../../../alloy/src/typescript/components/typescript-interface.cjs`),s=require(`../../../alloy/src/typescript/components/typescript-object.cjs`),c=require(`../helpers/load.cjs`),l=require(`../helpers/create-reflection-resource.cjs`);let u=require(`@alloy-js/core/jsx-runtime`),d=require(`@alloy-js/core`),f=require(`@alloy-js/typescript`),p=require(`@stryke/type-checks/is-null`),m=require(`@stryke/string-format/title-case`),h=require(`defu`);h=e.__toESM(h);function g(e){let[{defaultValue:n,reflection:r}]=(0,d.splitProps)(e,[`defaultValue`,`reflection`]),i=t.usePowerlines();return[(0,u.createComponent)(o.TypeScriptInterface,{name:` EnvBase`,extends:[`EnvInterface`],defaultValue:n,reflection:r,export:!0}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createComponent)(f.TypeDeclaration,{name:`Env`,export:!0,get children(){return d.code` {
2
2
  [Key in keyof EnvBase as Key ${i?.config.env.prefix.map(e=>`| \`${e.replace(/_$/g,``)}_\${Key}\``).join(` `)}]: EnvBase[Key];
3
3
  }
4
4
  `}})]}function _(e){let[{context:t,name:n}]=(0,d.splitProps)(e,[`context`,`name`]);return t?d.code`propertyName === "${n}" || propertyName.replace(/^(${t.config.env.prefix.sort((e,t)=>e.startsWith(t)?-1:t.startsWith(e)?1:e.localeCompare(t)).map(e=>`${e.replace(/_$/,``)}_`).join(`|`)})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${n.toLowerCase().replace(/[\s\-_]+/g,``)}"`:null}function v(e){let[{context:t,property:n,index:r}]=(0,d.splitProps)(e,[`context`,`property`,`index`]);return t?[r===0?(0,u.createComponent)(f.IfStatement,{get condition(){return[(0,u.createComponent)(_,{get name(){return n.getNameAsString()},context:t}),(0,u.createComponent)(d.Show,{get when(){return(0,u.memo)(()=>!!n.getAlias())()&&n.getAlias().length>0},get children(){return[d.code` || `,(0,u.createComponent)(d.For,{get each(){return n.getAlias()},joiner:d.code` || `,children:e=>(0,u.createComponent)(_,{name:e,context:t})})]}})]},get children(){return d.code`return target["${n.getNameAsString()}"];`}}):(0,u.createComponent)(f.ElseIfClause,{get condition(){return[(0,u.createComponent)(_,{get name(){return n.getNameAsString()},context:t}),(0,u.createComponent)(d.Show,{get when(){return(0,u.memo)(()=>!!n.getAlias())()&&n.getAlias().length>0},get children(){return[d.code` || `,(0,u.createComponent)(d.For,{get each(){return n.getAlias()},joiner:d.code` || `,children:e=>(0,u.createComponent)(_,{name:e,context:t})})]}})]},get children(){return d.code`return target["${n.getNameAsString()}"];`}})]:null}function y(e){let[{context:t,property:n,index:r}]=(0,d.splitProps)(e,[`context`,`property`,`index`]);return t?[r===0?(0,u.createComponent)(f.IfStatement,{get condition(){return[(0,u.createComponent)(_,{get name(){return n.getNameAsString()},context:t}),(0,u.createComponent)(d.Show,{get when(){return(0,u.memo)(()=>!!n.getAlias())()&&n.getAlias().length>0},get children(){return[d.code` || `,(0,u.createComponent)(d.For,{get each(){return n.getAlias()},joiner:d.code` || `,children:e=>(0,u.createComponent)(_,{name:e,context:t})})]}})]},get children(){return d.code`
@@ -7,7 +7,7 @@ const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../al
7
7
  `}}):(0,u.createComponent)(f.ElseIfClause,{get condition(){return[(0,u.createComponent)(_,{get name(){return n.getNameAsString()},context:t}),(0,u.createComponent)(d.Show,{get when(){return(0,u.memo)(()=>!!n.getAlias())()&&n.getAlias().length>0},get children(){return[d.code` || `,(0,u.createComponent)(d.For,{get each(){return n.getAlias()},joiner:d.code` || `,children:e=>(0,u.createComponent)(_,{name:e,context:t})})]}})]},get children(){return d.code`
8
8
  target["${n.getNameAsString()}"] = newValue;
9
9
  return true;
10
- `}})]:null}const b=n.refkey(`createEnv`),x=n.refkey(`env`),S=n.refkey(`EnvSerializer`);function C(e){let[{defaultConfig:n},o]=(0,d.splitProps)(e,[`defaultConfig`]),_=t.usePowerlines(),C=(0,d.computed)(()=>_&&c.loadEnvFromContext(_,process.env)),w=l.createReflectionResource(_),T=(0,d.computed)(()=>new r.type_exports.ReflectionClass({kind:r.type_exports.ReflectionKind.objectLiteral,description:`The initial environment configuration state for the ${(0,h.titleCase)(_?.config?.name)} project.`,types:[]},w.data??void 0)),E=(0,d.computed)(()=>w.data?.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]),D=(0,d.computed)(()=>w.data?.getProperties().filter(e=>!e.isIgnored()&&!e.isReadonly()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]);return(0,u.createComponent)(a.BuiltinFile,(0,u.mergeProps)(o,{id:`env`,description:`The Powerlines environment configuration module provides an interface to define environment configuration parameters.`,get imports(){return(0,m.default)({"@powerlines/deepkit/vendor/type":[`Type`,`stringify`,`serializer`,`serializeFunction`,`deserializeFunction`,`ReflectionKind`,`TemplateState`,`Serializer`,`TypeProperty`,`TypePropertySignature`],"@powerlines/plugin-env/types/runtime":[{name:`EnvInterface`}]},o.imports??{})},get children(){return[(0,u.createComponent)(d.Show,{get when(){return!(0,p.isNull)(w.data)},get children(){return[(0,u.createComponent)(g,{get defaultValue(){return C.value},get reflection(){return w.data}}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createIntrinsic)(`hbr`,{})]}}),(0,u.createComponent)(s.TypescriptObject,{name:`initialEnv`,type:`Partial<EnvBase>`,defaultValue:C,reflection:T,export:!0,const:!0}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createComponent)(i.TSDoc,{heading:`The environment configuration serializer for the Powerlines application.`,get children(){return[(0,u.createComponent)(i.TSDocLink,{children:`https://deepkit.io/docs/serialization/serializers`}),(0,u.createComponent)(i.TSDocLink,{children:`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}),(0,u.createComponent)(i.TSDocRemarks,{children:`This serializer is used to serialize and deserialize the Powerlines environment configuration.`})]}}),(0,u.createComponent)(f.ClassDeclaration,{refkey:S,name:`EnvSerializer`,extends:`Serializer`,export:!0,get children(){return(0,u.createComponent)(f.ClassMethod,{name:`constructor`,public:!0,children:d.code`
10
+ `}})]:null}const b=n.refkey(`createEnv`),x=n.refkey(`env`),S=n.refkey(`EnvSerializer`);function C(e){let[{defaultConfig:n},o]=(0,d.splitProps)(e,[`defaultConfig`]),_=t.usePowerlines(),C=(0,d.computed)(()=>_&&c.loadEnvFromContext(_,process.env)),w=l.createReflectionResource(_),T=(0,d.computed)(()=>new r.type_exports.ReflectionClass({kind:r.type_exports.ReflectionKind.objectLiteral,description:`The initial environment configuration state for the ${(0,m.titleCase)(_?.config?.name)} project.`,types:[]},w.data??void 0)),E=(0,d.computed)(()=>w.data?.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]),D=(0,d.computed)(()=>w.data?.getProperties().filter(e=>!e.isIgnored()&&!e.isReadonly()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]);return(0,u.createComponent)(a.BuiltinFile,(0,u.mergeProps)(o,{id:`env`,description:`The Powerlines environment configuration module provides an interface to define environment configuration parameters.`,get imports(){return(0,h.default)({"@powerlines/deepkit/vendor/type":[`Type`,`stringify`,`serializer`,`serializeFunction`,`deserializeFunction`,`ReflectionKind`,`TemplateState`,`Serializer`,`TypeProperty`,`TypePropertySignature`],"@powerlines/plugin-env/types/runtime":[{name:`EnvInterface`}]},o.imports??{})},get children(){return[(0,u.createComponent)(d.Show,{get when(){return!(0,p.isNull)(w.data)},get children(){return[(0,u.createComponent)(g,{get defaultValue(){return C.value},get reflection(){return w.data}}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createIntrinsic)(`hbr`,{})]}}),(0,u.createComponent)(s.TypescriptObject,{name:`initialEnv`,type:`Partial<EnvBase>`,defaultValue:C,reflection:T,export:!0,const:!0}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createIntrinsic)(`hbr`,{}),(0,u.createComponent)(i.TSDoc,{heading:`The environment configuration serializer for the Powerlines application.`,get children(){return[(0,u.createComponent)(i.TSDocLink,{children:`https://deepkit.io/docs/serialization/serializers`}),(0,u.createComponent)(i.TSDocLink,{children:`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}),(0,u.createComponent)(i.TSDocRemarks,{children:`This serializer is used to serialize and deserialize the Powerlines environment configuration.`})]}}),(0,u.createComponent)(f.ClassDeclaration,{refkey:S,name:`EnvSerializer`,extends:`Serializer`,export:!0,get children(){return(0,u.createComponent)(f.ClassMethod,{name:`constructor`,public:!0,children:d.code`
11
11
  super("env");
12
12
 
13
13
  this.deserializeRegistry.register(
@@ -1,10 +1,10 @@
1
- import{usePowerlines as e}from"../../../alloy/src/core/contexts/context.mjs";import{refkey as t}from"../../../alloy/src/helpers/refkey.mjs";import{type_exports as n}from"../../../deepkit/src/vendor/type.mjs";import{TSDoc as r,TSDocExample as i,TSDocLink as a,TSDocParam as o,TSDocRemarks as s,TSDocReturns as c,TSDocThrows as l}from"../../../alloy/src/typescript/components/tsdoc.mjs";import{BuiltinFile as u}from"../../../alloy/src/typescript/components/builtin-file.mjs";import{TypeScriptInterface as d}from"../../../alloy/src/typescript/components/typescript-interface.mjs";import{TypescriptObject as f}from"../../../alloy/src/typescript/components/typescript-object.mjs";import{loadEnvFromContext as p}from"../helpers/load.mjs";import{createReflectionResource as m}from"../helpers/create-reflection-resource.mjs";import{createComponent as h,createIntrinsic as g,memo as _,mergeProps as v}from"@alloy-js/core/jsx-runtime";import{For as y,Show as b,code as x,computed as S,splitProps as C}from"@alloy-js/core";import{ClassDeclaration as w,ClassMethod as T,ElseIfClause as E,FunctionDeclaration as D,IfStatement as O,NewExpression as k,TypeDeclaration as A,VarDeclaration as j}from"@alloy-js/typescript";import{isNull as M}from"@stryke/type-checks/is-null";import N from"defu";import{titleCase as P}from"@stryke/string-format/title-case";function F(t){let[{defaultValue:n,reflection:r}]=C(t,[`defaultValue`,`reflection`]),i=e();return[h(d,{name:` EnvBase`,extends:[`EnvInterface`],defaultValue:n,reflection:r,export:!0}),g(`hbr`,{}),g(`hbr`,{}),h(A,{name:`Env`,export:!0,get children(){return x` {
1
+ import{usePowerlines as e}from"../../../alloy/src/core/contexts/context.mjs";import{refkey as t}from"../../../alloy/src/helpers/refkey.mjs";import{type_exports as n}from"../../../deepkit/src/vendor/type.mjs";import{TSDoc as r,TSDocExample as i,TSDocLink as a,TSDocParam as o,TSDocRemarks as s,TSDocReturns as c,TSDocThrows as l}from"../../../alloy/src/typescript/components/tsdoc.mjs";import{BuiltinFile as u}from"../../../alloy/src/typescript/components/builtin-file.mjs";import{TypeScriptInterface as d}from"../../../alloy/src/typescript/components/typescript-interface.mjs";import{TypescriptObject as f}from"../../../alloy/src/typescript/components/typescript-object.mjs";import{loadEnvFromContext as p}from"../helpers/load.mjs";import{createReflectionResource as m}from"../helpers/create-reflection-resource.mjs";import{createComponent as h,createIntrinsic as g,memo as _,mergeProps as v}from"@alloy-js/core/jsx-runtime";import{For as y,Show as b,code as x,computed as S,splitProps as C}from"@alloy-js/core";import{ClassDeclaration as w,ClassMethod as T,ElseIfClause as E,FunctionDeclaration as D,IfStatement as O,NewExpression as k,TypeDeclaration as A,VarDeclaration as j}from"@alloy-js/typescript";import{isNull as M}from"@stryke/type-checks/is-null";import{titleCase as N}from"@stryke/string-format/title-case";import P from"defu";function F(t){let[{defaultValue:n,reflection:r}]=C(t,[`defaultValue`,`reflection`]),i=e();return[h(d,{name:` EnvBase`,extends:[`EnvInterface`],defaultValue:n,reflection:r,export:!0}),g(`hbr`,{}),g(`hbr`,{}),h(A,{name:`Env`,export:!0,get children(){return x` {
2
2
  [Key in keyof EnvBase as Key ${i?.config.env.prefix.map(e=>`| \`${e.replace(/_$/g,``)}_\${Key}\``).join(` `)}]: EnvBase[Key];
3
3
  }
4
4
  `}})]}function I(e){let[{context:t,name:n}]=C(e,[`context`,`name`]);return t?x`propertyName === "${n}" || propertyName.replace(/^(${t.config.env.prefix.sort((e,t)=>e.startsWith(t)?-1:t.startsWith(e)?1:e.localeCompare(t)).map(e=>`${e.replace(/_$/,``)}_`).join(`|`)})/g, "").toLowerCase().replace(/[\\s\\-_]+/g, "") === "${n.toLowerCase().replace(/[\s\-_]+/g,``)}"`:null}function L(e){let[{context:t,property:n,index:r}]=C(e,[`context`,`property`,`index`]);return t?[h(r===0?O:E,{get condition(){return[h(I,{get name(){return n.getNameAsString()},context:t}),h(b,{get when(){return _(()=>!!n.getAlias())()&&n.getAlias().length>0},get children(){return[x` || `,h(y,{get each(){return n.getAlias()},joiner:x` || `,children:e=>h(I,{name:e,context:t})})]}})]},get children(){return x`return target["${n.getNameAsString()}"];`}})]:null}function R(e){let[{context:t,property:n,index:r}]=C(e,[`context`,`property`,`index`]);return t?[h(r===0?O:E,{get condition(){return[h(I,{get name(){return n.getNameAsString()},context:t}),h(b,{get when(){return _(()=>!!n.getAlias())()&&n.getAlias().length>0},get children(){return[x` || `,h(y,{get each(){return n.getAlias()},joiner:x` || `,children:e=>h(I,{name:e,context:t})})]}})]},get children(){return x`
5
5
  target["${n.getNameAsString()}"] = newValue;
6
6
  return true;
7
- `}})]:null}const z=t(`createEnv`),B=t(`env`),V=t(`EnvSerializer`);function H(t){let[{defaultConfig:d},_]=C(t,[`defaultConfig`]),E=e(),O=S(()=>E&&p(E,process.env)),A=m(E),I=S(()=>new n.ReflectionClass({kind:n.ReflectionKind.objectLiteral,description:`The initial environment configuration state for the ${P(E?.config?.name)} project.`,types:[]},A.data??void 0)),H=S(()=>A.data?.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]),U=S(()=>A.data?.getProperties().filter(e=>!e.isIgnored()&&!e.isReadonly()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]);return h(u,v(_,{id:`env`,description:`The Powerlines environment configuration module provides an interface to define environment configuration parameters.`,get imports(){return N({"@powerlines/deepkit/vendor/type":[`Type`,`stringify`,`serializer`,`serializeFunction`,`deserializeFunction`,`ReflectionKind`,`TemplateState`,`Serializer`,`TypeProperty`,`TypePropertySignature`],"@powerlines/plugin-env/types/runtime":[{name:`EnvInterface`}]},_.imports??{})},get children(){return[h(b,{get when(){return!M(A.data)},get children(){return[h(F,{get defaultValue(){return O.value},get reflection(){return A.data}}),g(`hbr`,{}),g(`hbr`,{})]}}),h(f,{name:`initialEnv`,type:`Partial<EnvBase>`,defaultValue:O,reflection:I,export:!0,const:!0}),g(`hbr`,{}),g(`hbr`,{}),h(r,{heading:`The environment configuration serializer for the Powerlines application.`,get children(){return[h(a,{children:`https://deepkit.io/docs/serialization/serializers`}),h(a,{children:`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}),h(s,{children:`This serializer is used to serialize and deserialize the Powerlines environment configuration.`})]}}),h(w,{refkey:V,name:`EnvSerializer`,extends:`Serializer`,export:!0,get children(){return h(T,{name:`constructor`,public:!0,children:x`
7
+ `}})]:null}const z=t(`createEnv`),B=t(`env`),V=t(`EnvSerializer`);function H(t){let[{defaultConfig:d},_]=C(t,[`defaultConfig`]),E=e(),O=S(()=>E&&p(E,process.env)),A=m(E),I=S(()=>new n.ReflectionClass({kind:n.ReflectionKind.objectLiteral,description:`The initial environment configuration state for the ${N(E?.config?.name)} project.`,types:[]},A.data??void 0)),H=S(()=>A.data?.getProperties().filter(e=>!e.isIgnored()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]),U=S(()=>A.data?.getProperties().filter(e=>!e.isIgnored()&&!e.isReadonly()).sort((e,t)=>e.getNameAsString().localeCompare(t.getNameAsString()))??[]);return h(u,v(_,{id:`env`,description:`The Powerlines environment configuration module provides an interface to define environment configuration parameters.`,get imports(){return P({"@powerlines/deepkit/vendor/type":[`Type`,`stringify`,`serializer`,`serializeFunction`,`deserializeFunction`,`ReflectionKind`,`TemplateState`,`Serializer`,`TypeProperty`,`TypePropertySignature`],"@powerlines/plugin-env/types/runtime":[{name:`EnvInterface`}]},_.imports??{})},get children(){return[h(b,{get when(){return!M(A.data)},get children(){return[h(F,{get defaultValue(){return O.value},get reflection(){return A.data}}),g(`hbr`,{}),g(`hbr`,{})]}}),h(f,{name:`initialEnv`,type:`Partial<EnvBase>`,defaultValue:O,reflection:I,export:!0,const:!0}),g(`hbr`,{}),g(`hbr`,{}),h(r,{heading:`The environment configuration serializer for the Powerlines application.`,get children(){return[h(a,{children:`https://deepkit.io/docs/serialization/serializers`}),h(a,{children:`https://github.com/marcj/untitled-code/blob/master/packages/type/src/serializer.ts#L1918`}),h(s,{children:`This serializer is used to serialize and deserialize the Powerlines environment configuration.`})]}}),h(w,{refkey:V,name:`EnvSerializer`,extends:`Serializer`,export:!0,get children(){return h(T,{name:`constructor`,public:!0,children:x`
8
8
  super("env");
9
9
 
10
10
  this.deserializeRegistry.register(
@@ -1 +1 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../deepkit/src/vendor/type.cjs`),n=require(`../../../deepkit/src/reflect-type.cjs`),r=require(`./persistence.cjs`);let i=require(`@stryke/path/is-parent-path`),a=require(`@stryke/string-format/title-case`),o=require(`@stryke/path/join-paths`);function s(e,n){return d(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}function c(e,n){return f(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}var l=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},u=class{};function d(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base environment configuration definition for the ${(0,a.titleCase)(e.config.name)} project.`,classType:l,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${(0,a.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${(0,a.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function f(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base secrets configuration definition for the ${(0,a.titleCase)(e.config.name)} project.`,classType:u,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${(0,a.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${(0,a.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function p(e,a,c){let l;a&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,i.isParentPath)(a,e.workspaceConfig.workspaceRoot)?a:(0,o.joinPaths)(e.workspaceConfig.workspaceRoot,a),name:c},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getEnvDefaultTypeDefinition(e));return s(e,[await r.readEnvTypeReflection(e,`env`),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}async function m(e,a,s){let l;a&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,i.isParentPath)(a,e.workspaceConfig.workspaceRoot)?a:(0,o.joinPaths)(e.workspaceConfig.workspaceRoot,a),name:s},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getSecretsDefaultTypeDefinition(e));return c(e,[await r.readSecretsReflection(e),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}exports.BaseEnv=l,exports.BaseSecrets=u,exports.createEnvReflection=d,exports.createSecretsReflection=f,exports.mergeEnvReflections=s,exports.mergeSecretsReflections=c,exports.reflectEnv=p,exports.reflectSecrets=m;
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`),t=require(`../../../deepkit/src/vendor/type.cjs`),n=require(`../../../deepkit/src/reflect-type.cjs`),r=require(`./persistence.cjs`);let i=require(`@stryke/string-format/title-case`),a=require(`@stryke/path/is-parent-path`),o=require(`@stryke/path/join-paths`);function s(e,n){return d(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}function c(e,n){return f(e,{type:(0,t.type_exports.merge)(n.map(e=>e.type))})}var l=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},u=class{};function d(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base environment configuration definition for the ${(0,i.titleCase)(e.config.name)} project.`,classType:l,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${(0,i.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Env`;let a=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${e.config.name?`${(0,i.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return a.name=`Env`,a}function f(e,n={}){let r=n.superReflection??new t.type_exports.ReflectionClass({kind:t.type_exports.ReflectionKind.class,description:`The base secrets configuration definition for the ${(0,i.titleCase)(e.config.name)} project.`,classType:u,types:[],implements:[{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${(0,i.titleCase)(e.config.name)} project.`,types:[]}]});r.name=`Secrets`;let a=new t.type_exports.ReflectionClass(n.type??{kind:t.type_exports.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${e.config.name?`${(0,i.titleCase)(e.config.name)} application`:`application`}.`,types:[]},r);return a.name=`Secrets`,a}async function p(e,i,c){let l;i&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,a.isParentPath)(i,e.workspaceConfig.workspaceRoot)?i:(0,o.joinPaths)(e.workspaceConfig.workspaceRoot,i),name:c},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getEnvDefaultTypeDefinition(e));return s(e,[await r.readEnvTypeReflection(e,`env`),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}async function m(e,i,s){let l;i&&(l=(0,t.type_exports.resolveClassType)(await n.reflectType(e,{file:(0,a.isParentPath)(i,e.workspaceConfig.workspaceRoot)?i:(0,o.joinPaths)(e.workspaceConfig.workspaceRoot,i),name:s},{skipNodeModulesBundle:!0})));let u=await n.reflectType(e,await r.getSecretsDefaultTypeDefinition(e));return c(e,[await r.readSecretsReflection(e),l,(0,t.type_exports.resolveClassType)(u)].filter(Boolean))}exports.BaseEnv=l,exports.BaseSecrets=u,exports.createEnvReflection=d,exports.createSecretsReflection=f,exports.mergeEnvReflections=s,exports.mergeSecretsReflections=c,exports.reflectEnv=p,exports.reflectSecrets=m;
@@ -1 +1 @@
1
- import{type_exports as e}from"../../../deepkit/src/vendor/type.mjs";import{reflectType as t}from"../../../deepkit/src/reflect-type.mjs";import{getEnvDefaultTypeDefinition as n,getSecretsDefaultTypeDefinition as r,readEnvTypeReflection as i,readSecretsReflection as a}from"./persistence.mjs";import{isParentPath as o}from"@stryke/path/is-parent-path";import{titleCase as s}from"@stryke/string-format/title-case";import{joinPaths as c}from"@stryke/path/join-paths";function l(t,n){return p(t,{type:(0,e.merge)(n.map(e=>e.type))})}function u(t,n){return m(t,{type:(0,e.merge)(n.map(e=>e.type))})}var d=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},f=class{};function p(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base environment configuration definition for the ${s(t.config.name)} project.`,classType:d,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${s(t.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${t.config.name?`${s(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function m(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base secrets configuration definition for the ${s(t.config.name)} project.`,classType:f,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${s(t.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${t.config.name?`${s(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function h(r,a,s){let u;a&&(u=(0,e.resolveClassType)(await t(r,{file:o(a,r.workspaceConfig.workspaceRoot)?a:c(r.workspaceConfig.workspaceRoot,a),name:s},{skipNodeModulesBundle:!0})));let d=await t(r,await n(r));return l(r,[await i(r,`env`),u,(0,e.resolveClassType)(d)].filter(Boolean))}async function g(n,i,s){let l;i&&(l=(0,e.resolveClassType)(await t(n,{file:o(i,n.workspaceConfig.workspaceRoot)?i:c(n.workspaceConfig.workspaceRoot,i),name:s},{skipNodeModulesBundle:!0})));let d=await t(n,await r(n));return u(n,[await a(n),l,(0,e.resolveClassType)(d)].filter(Boolean))}export{d as BaseEnv,f as BaseSecrets,p as createEnvReflection,m as createSecretsReflection,l as mergeEnvReflections,u as mergeSecretsReflections,h as reflectEnv,g as reflectSecrets};
1
+ import{type_exports as e}from"../../../deepkit/src/vendor/type.mjs";import{reflectType as t}from"../../../deepkit/src/reflect-type.mjs";import{getEnvDefaultTypeDefinition as n,getSecretsDefaultTypeDefinition as r,readEnvTypeReflection as i,readSecretsReflection as a}from"./persistence.mjs";import{titleCase as o}from"@stryke/string-format/title-case";import{isParentPath as s}from"@stryke/path/is-parent-path";import{joinPaths as c}from"@stryke/path/join-paths";function l(t,n){return p(t,{type:(0,e.merge)(n.map(e=>e.type))})}function u(t,n){return m(t,{type:(0,e.merge)(n.map(e=>e.type))})}var d=class{PLATFORM=`neutral`;MODE=`production`;DEBUG=!1;TEST=!1;MINIMAL=!1;NO_COLOR=!1;FORCE_COLOR=!1;FORCE_HYPERLINK=!1;STACKTRACE=!1;INCLUDE_ERROR_DATA=!1;CI=!1},f=class{};function p(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base environment configuration definition for the ${o(t.config.name)} project.`,classType:d,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`EnvInterface`,description:`The environment configuration interface definition for the ${o(t.config.name)} project.`,types:[]}]});r.name=`Env`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Env`,description:`A schema describing the list of available environment variables that can be used by the ${t.config.name?`${o(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Env`,i}function m(t,n={}){let r=n.superReflection??new e.ReflectionClass({kind:e.ReflectionKind.class,description:`The base secrets configuration definition for the ${o(t.config.name)} project.`,classType:f,types:[],implements:[{kind:e.ReflectionKind.objectLiteral,typeName:`SecretsInterface`,description:`The secrets configuration interface definition for the ${o(t.config.name)} project.`,types:[]}]});r.name=`Secrets`;let i=new e.ReflectionClass(n.type??{kind:e.ReflectionKind.objectLiteral,typeName:`Secrets`,description:`A schema describing the list of available environment secrets that can be used by the ${t.config.name?`${o(t.config.name)} application`:`application`}.`,types:[]},r);return i.name=`Secrets`,i}async function h(r,a,o){let u;a&&(u=(0,e.resolveClassType)(await t(r,{file:s(a,r.workspaceConfig.workspaceRoot)?a:c(r.workspaceConfig.workspaceRoot,a),name:o},{skipNodeModulesBundle:!0})));let d=await t(r,await n(r));return l(r,[await i(r,`env`),u,(0,e.resolveClassType)(d)].filter(Boolean))}async function g(n,i,o){let l;i&&(l=(0,e.resolveClassType)(await t(n,{file:s(i,n.workspaceConfig.workspaceRoot)?i:c(n.workspaceConfig.workspaceRoot,i),name:o},{skipNodeModulesBundle:!0})));let d=await t(n,await r(n));return u(n,[await a(n),l,(0,e.resolveClassType)(d)].filter(Boolean))}export{d as BaseEnv,f as BaseSecrets,p as createEnvReflection,m as createSecretsReflection,l as mergeEnvReflections,u as mergeSecretsReflections,h as reflectEnv,g as reflectSecrets};
@@ -1 +1 @@
1
- const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@storm-software/config-tools/types`),n=require(`chalk`);n=e.__toESM(n),require(`@storm-software/config-tools/logger`),require(`@storm-software/config-tools/utilities/colors`),require(`@stryke/helpers/noop`);let r=require(`@stryke/string-format/title-case`);const i=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],a=(e,t)=>(a,...o)=>e(a,` ${n.default.inverse.hex(i[t.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%i.length]||i[0])(` ${(0,r.titleCase)(t)} `)} ${o.join(` `)} `);exports.extendLog=a;
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`);let t=require(`@stryke/string-format/title-case`),n=require(`@storm-software/config-tools/types`),r=require(`chalk`);r=e.__toESM(r),require(`@storm-software/config-tools/logger`),require(`@storm-software/config-tools/utilities/colors`),require(`@stryke/helpers/noop`);const i=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],a=(e,n)=>(a,...o)=>e(a,` ${r.default.inverse.hex(i[n.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%i.length]||i[0])(` ${(0,t.titleCase)(n)} `)} ${o.join(` `)} `);exports.extendLog=a;
@@ -1 +1 @@
1
- import{LogLevelLabel as e}from"@storm-software/config-tools/types";import t from"chalk";import"@storm-software/config-tools/logger";import"@storm-software/config-tools/utilities/colors";import"@stryke/helpers/noop";import{titleCase as n}from"@stryke/string-format/title-case";const r=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],i=(e,i)=>(a,...o)=>e(a,` ${t.inverse.hex(r[i.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%r.length]||r[0])(` ${n(i)} `)} ${o.join(` `)} `);export{i as extendLog};
1
+ import{titleCase as e}from"@stryke/string-format/title-case";import{LogLevelLabel as t}from"@storm-software/config-tools/types";import n from"chalk";import"@storm-software/config-tools/logger";import"@storm-software/config-tools/utilities/colors";import"@stryke/helpers/noop";const r=[`#00A0DD`,`#6FCE4E`,`#FBBF24`,`#F43F5E`,`#3B82F6`,`#A855F7`,`#469592`,`#288EDF`,`#10B981`,`#EF4444`,`#F0EC56`,`#F472B6`,`#22D3EE`,`#EAB308`,`#84CC16`,`#F87171`,`#0EA5E9`,`#D946EF`,`#FACC15`,`#34D399`],i=(t,i)=>(a,...o)=>t(a,` ${n.inverse.hex(r[i.split(``).map(e=>e.charCodeAt(0)).reduce((e,t)=>e+t,0)%r.length]||r[0])(` ${e(i)} `)} ${o.join(` `)} `);export{i as extendLog};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-react",
3
- "version": "0.1.98",
3
+ "version": "0.1.100",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a React application.",
6
6
  "repository": {
@@ -130,7 +130,7 @@
130
130
  },
131
131
  "files": ["dist/**/*"],
132
132
  "keywords": ["react", "powerlines", "storm-software", "powerlines-plugin"],
133
- "peerDependencies": { "react": ">=19.0.0", "react-dom": ">=19.0.0" },
133
+ "peerDependencies": { "react": ">=19.2.0", "react-dom": ">=19.2.0" },
134
134
  "peerDependenciesMeta": {
135
135
  "react": { "optional": false },
136
136
  "react-dom": { "optional": false }
@@ -142,18 +142,22 @@
142
142
  "@stryke/fs": "^0.33.26",
143
143
  "@stryke/path": "^0.24.0",
144
144
  "babel-plugin-react-compiler": "^1.0.0",
145
- "@powerlines/alloy": "^0.11.107",
146
- "@powerlines/plugin-babel": "^0.12.104",
147
- "@powerlines/plugin-env": "^0.13.104",
148
- "@powerlines/plugin-plugin": "^0.12.47",
145
+ "@powerlines/alloy": "^0.12.0",
146
+ "@powerlines/plugin-babel": "^0.12.106",
147
+ "@powerlines/plugin-env": "^0.13.106",
148
+ "@powerlines/plugin-plugin": "^0.12.49",
149
149
  "@vitejs/plugin-react": "^5.1.2",
150
150
  "defu": "^6.1.4",
151
- "powerlines": "^0.36.0"
151
+ "powerlines": "^0.36.2"
152
152
  },
153
153
  "devDependencies": {
154
- "@powerlines/nx": "^0.11.26",
155
- "@types/node": "^24.10.4"
154
+ "@powerlines/nx": "^0.11.28",
155
+ "@types/node": "^24.10.4",
156
+ "@types/react": "^19.2.7",
157
+ "@types/react-dom": "^19.2.3",
158
+ "react": "^19.2.3",
159
+ "react-dom": "^19.2.3"
156
160
  },
157
161
  "publishConfig": { "access": "public" },
158
- "gitHead": "e77abaa4bdc897b57d6840eecdf5125847d2c03e"
162
+ "gitHead": "916e24a276b03bbc9d64349bf85f37ffb43d5e87"
159
163
  }