@powerlines/plugin-crypto 0.10.89 → 0.10.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -27,7 +27,7 @@ This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages
27
27
 
28
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
29
 
30
- [![Version](https://img.shields.io/badge/version-0.2.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.2.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
@@ -39,7 +39,7 @@ This package is part of the 🔌 <b>Powerlines</b> monorepo. Powerlines packages
39
39
  <!-- prettier-ignore-end -->
40
40
 
41
41
  <div align="center">
42
- <b>Be sure to ⭐ this repository on <a href="https://github.com/storm-software/powerlines" target="_blank">GitHub</a> so you can keep up to date on any daily progress!</b>
42
+ <a href="https://github.com/storm-software/powerlines" target="_blank"><b>Be sure to ⭐ this repository on GitHub so you can keep up to date with it's progress!</b></a>
43
43
  </div>
44
44
 
45
45
  <br />
@@ -1 +1 @@
1
- const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../vendor.cjs`),n=require(`../contexts/context.cjs`);let r=require(`@stryke/path/replace`),i=require(`react/jsx-runtime`);function a(e){let[{children:a,context:o,basePath:s},c]=(0,t.vendor_exports.splitProps)(e,[`children`,`context`,`basePath`]),l=(0,t.vendor_exports.ref)(o),u=(0,t.vendor_exports.computed)(()=>s?(0,r.replacePath)(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return(0,i.jsx)(t.vendor_exports.Output,{...c,basePath:u.value,children:(0,i.jsx)(n.PowerlinesContext.Provider,{value:{ref:l},children:(0,i.jsx)(t.vendor_exports.Show,{when:!!l.value,children:a})})})}exports.Output=a;
1
+ const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`../../vendor/index.cjs`),n=require(`../contexts/context.cjs`);let r=require(`@stryke/path/replace`),i=require(`react/jsx-runtime`);function a(e){let[{children:a,context:o,basePath:s},c]=(0,t.vendor_exports.splitProps)(e,[`children`,`context`,`basePath`]),l=(0,t.vendor_exports.ref)(o),u=(0,t.vendor_exports.computed)(()=>s?(0,r.replacePath)(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return(0,i.jsx)(t.vendor_exports.Output,{...c,basePath:u.value,children:(0,i.jsx)(n.PowerlinesContext.Provider,{value:{ref:l},children:(0,i.jsx)(t.vendor_exports.Show,{when:!!l.value,children:a})})})}exports.Output=a;
@@ -1 +1 @@
1
- import{vendor_exports as e}from"../../vendor.mjs";import{PowerlinesContext as t}from"../contexts/context.mjs";import{replacePath as n}from"@stryke/path/replace";import{jsx as r}from"react/jsx-runtime";function i(i){let[{children:a,context:o,basePath:s},c]=(0,e.splitProps)(i,[`children`,`context`,`basePath`]),l=(0,e.ref)(o),u=(0,e.computed)(()=>s?n(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return r(e.Output,{...c,basePath:u.value,children:r(t.Provider,{value:{ref:l},children:r(e.Show,{when:!!l.value,children:a})})})}export{i as Output};
1
+ import{vendor_exports as e}from"../../vendor/index.mjs";import{PowerlinesContext as t}from"../contexts/context.mjs";import{replacePath as n}from"@stryke/path/replace";import{jsx as r}from"react/jsx-runtime";function i(i){let[{children:a,context:o,basePath:s},c]=(0,e.splitProps)(i,[`children`,`context`,`basePath`]),l=(0,e.ref)(o),u=(0,e.computed)(()=>s?n(s,l.value.workspaceConfig.workspaceRoot):l.value.workspaceConfig.workspaceRoot);return r(e.Output,{...c,basePath:u.value,children:r(t.Provider,{value:{ref:l},children:r(e.Show,{when:!!l.value,children:a})})})}export{i as Output};
@@ -1 +1 @@
1
- const e=require(`../../vendor.cjs`),t=(0,e.vendor_exports.createContext)();exports.PowerlinesContext=t;
1
+ const e=require(`../../vendor/index.cjs`),t=(0,e.vendor_exports.createContext)();exports.PowerlinesContext=t;
@@ -1 +1 @@
1
- import{vendor_exports as e}from"../../vendor.mjs";const t=(0,e.createContext)();export{t as PowerlinesContext};
1
+ import{vendor_exports as e}from"../../vendor/index.mjs";const t=(0,e.createContext)();export{t as PowerlinesContext};
@@ -1,2 +1,2 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./vendor.cjs`),n=require(`./core/components/output.cjs`);let r=require(`@alloy-js/rollup-plugin`);r=e.__toESM(r);let i=require(`@storm-software/config-tools/types`),a=require(`@stryke/json/storm-json`),o=require(`@stryke/path/is-parent-path`),s=require(`@stryke/path/replace`),c=require(`@stryke/type-checks/is-set-string`),l=require(`prettier/doc.js`),u=require(`react/jsx-runtime`);const d=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[(0,r.default)()]}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@alloy-js/core`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@alloy-js/core`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@alloy-js/core`),await this.fs.write(this.tsconfig.tsconfigFilePath,a.StormJSON.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)},resolveId(e){return e===`@alloy-js/core`?{id:`@powerlines/plugin-alloy/vendor`,external:!0}:null}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let r=(0,t.vendor_exports.renderTree)((0,u.jsx)(n.Output,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:e}));await p(this,r,this.config.alloy)}}}}];var f=d;async function p(e,n,r={}){await(0,t.vendor_exports.flushJobsAsync)();let a,l=async(n,c)=>{if(!Array.isArray(c))return;let u=async e=>{for(let t of c)await l(e,t)},d=(0,t.vendor_exports.getContextForRenderNode)(c);if(!d)return u(n);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};n?n.contents.push(e):a=e,await u(e)}else if(d.meta?.sourceFile){if(!n)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let t;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(i.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),t={kind:`builtin`,id:d.meta.builtin.id,path:(0,s.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await m(e,c,r)}}else d.meta?.entry||(0,o.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(i.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),t={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await m(e,c,r)}):(e.log(i.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),t={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await m(e,c,r)});n.contents.push(t)}else if(d.meta?.copyFile){if(!n)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(i.LogLevelLabel.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");n.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(n)};await l(void 0,n);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!(0,c.isSetString)(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&(0,c.isSetString)(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(e,a)}async function m(e,n,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await(0,t.vendor_exports.flushJobsAsync)();let i=l.printer.printDocToString(h(n),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
1
+ const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./vendor/index.cjs`),n=require(`./core/components/output.cjs`);let r=require(`@alloy-js/rollup-plugin`);r=e.__toESM(r);let i=require(`@storm-software/config-tools/types`),a=require(`@stryke/json/storm-json`),o=require(`@stryke/path/is-parent-path`),s=require(`@stryke/path/replace`),c=require(`@stryke/type-checks/is-set-string`),l=require(`prettier/doc.js`),u=require(`react/jsx-runtime`);const d=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@powerlines/plugin-alloy/vendor`}}},plugins:[(0,r.default)()],alias:{"@alloy-js/core":`@powerlines/plugin-alloy/vendor`,"@alloy-js/core/jsx-runtime":`@powerlines/plugin-alloy/vendor/jsx-runtime`}}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@powerlines/plugin-alloy/vendor`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@powerlines/plugin-alloy/vendor`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@powerlines/plugin-alloy/vendor`),await this.fs.write(this.tsconfig.tsconfigFilePath,a.StormJSON.stringify(this.tsconfig.tsconfigJson))),this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)},resolveId(e){return e===`@alloy-js/core`?{id:`@powerlines/plugin-alloy/vendor`,external:!0}:e===`@alloy-js/core/jsx-runtime`?{id:`@powerlines/plugin-alloy/vendor/jsx-runtime`,external:!0}:null}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let r=(0,t.vendor_exports.renderTree)((0,u.jsx)(n.Output,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:e}));await p(this,r,this.config.alloy)}}}}];var f=d;async function p(e,n,r={}){await(0,t.vendor_exports.flushJobsAsync)();let a,l=async(n,c)=>{if(!Array.isArray(c))return;let u=async e=>{for(let t of c)await l(e,t)},d=(0,t.vendor_exports.getContextForRenderNode)(c);if(!d)return u(n);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};n?n.contents.push(e):a=e,await u(e)}else if(d.meta?.sourceFile){if(!n)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let t;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(i.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),t={kind:`builtin`,id:d.meta.builtin.id,path:(0,s.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await m(e,c,r)}}else d.meta?.entry||(0,o.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(i.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),t={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await m(e,c,r)}):(e.log(i.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),t={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await m(e,c,r)});n.contents.push(t)}else if(d.meta?.copyFile){if(!n)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(i.LogLevelLabel.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");n.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(n)};await l(void 0,n);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!(0,c.isSetString)(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&(0,c.isSetString)(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(e,a)}async function m(e,n,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await(0,t.vendor_exports.flushJobsAsync)();let i=l.printer.printDocToString(h(n),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
2
2
  `)?`${i}\n`:i}function h(e){let n=[];for(let r of e)if(typeof r==`string`){let e=r.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));n.push(e)}else (0,t.vendor_exports.isPrintHook)(r)?n.push(r.print(r.subtree,h)):n.push(h(r));return n}exports.default=f;
@@ -1,2 +1,2 @@
1
- import{vendor_exports as e}from"./vendor.mjs";import{Output as t}from"./core/components/output.mjs";import n from"@alloy-js/rollup-plugin";import{LogLevelLabel as r}from"@storm-software/config-tools/types";import{StormJSON as i}from"@stryke/json/storm-json";import{isParentPath as a}from"@stryke/path/is-parent-path";import{replacePath as o}from"@stryke/path/replace";import{isSetString as s}from"@stryke/type-checks/is-set-string";import{printer as c}from"prettier/doc.js";import{jsx as l}from"react/jsx-runtime";var u=(r={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...r},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[n()]}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@alloy-js/core`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@alloy-js/core`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@alloy-js/core`),await this.fs.write(this.tsconfig.tsconfigFilePath,i.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)},resolveId(e){return e===`@alloy-js/core`?{id:`@powerlines/plugin-alloy/vendor`,external:!0}:null}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async n=>{let r=(0,e.renderTree)(l(t,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:n}));await d(this,r,this.config.alloy)}}}}];async function d(t,n,i={}){await(0,e.flushJobsAsync)();let c,l=async(n,s)=>{if(!Array.isArray(s))return;let u=async e=>{for(let t of s)await l(e,t)},d=(0,e.getContextForRenderNode)(s);if(!d)return u(n);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};n?n.contents.push(e):c=e,await u(e)}else if(d.meta?.sourceFile){if(!n)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let e;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");t.log(r.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),e={kind:`builtin`,id:d.meta.builtin.id,path:o(d.meta.sourceFile.path,t.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(t,s,i)}}else d.meta?.entry||a(t.entryPath,d.meta.sourceFile.path)?(t.log(r.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),e={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(t,s,i)}):(t.log(r.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),e={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(t,s,i)});n.contents.push(e)}else if(d.meta?.copyFile){if(!n)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(t.log(r.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");n.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(n)};await l(void 0,n);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!s(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&s(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(t,c)}async function f(t,n,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await(0,e.flushJobsAsync)();let i=c.printDocToString(p(n),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
1
+ import{vendor_exports as e}from"./vendor/index.mjs";import{Output as t}from"./core/components/output.mjs";import n from"@alloy-js/rollup-plugin";import{LogLevelLabel as r}from"@storm-software/config-tools/types";import{StormJSON as i}from"@stryke/json/storm-json";import{isParentPath as a}from"@stryke/path/is-parent-path";import{replacePath as o}from"@stryke/path/replace";import{isSetString as s}from"@stryke/type-checks/is-set-string";import{printer as c}from"prettier/doc.js";import{jsx as l}from"react/jsx-runtime";var u=(r={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...r},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@powerlines/plugin-alloy/vendor`}}},plugins:[n()],alias:{"@alloy-js/core":`@powerlines/plugin-alloy/vendor`,"@alloy-js/core/jsx-runtime":`@powerlines/plugin-alloy/vendor/jsx-runtime`}}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@powerlines/plugin-alloy/vendor`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@powerlines/plugin-alloy/vendor`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@powerlines/plugin-alloy/vendor`),await this.fs.write(this.tsconfig.tsconfigFilePath,i.stringify(this.tsconfig.tsconfigJson))),this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)},resolveId(e){return e===`@alloy-js/core`?{id:`@powerlines/plugin-alloy/vendor`,external:!0}:e===`@alloy-js/core/jsx-runtime`?{id:`@powerlines/plugin-alloy/vendor/jsx-runtime`,external:!0}:null}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async n=>{let r=(0,e.renderTree)(l(t,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:n}));await d(this,r,this.config.alloy)}}}}];async function d(t,n,i={}){await(0,e.flushJobsAsync)();let c,l=async(n,s)=>{if(!Array.isArray(s))return;let u=async e=>{for(let t of s)await l(e,t)},d=(0,e.getContextForRenderNode)(s);if(!d)return u(n);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};n?n.contents.push(e):c=e,await u(e)}else if(d.meta?.sourceFile){if(!n)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let e;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");t.log(r.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),e={kind:`builtin`,id:d.meta.builtin.id,path:o(d.meta.sourceFile.path,t.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(t,s,i)}}else d.meta?.entry||a(t.entryPath,d.meta.sourceFile.path)?(t.log(r.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),e={kind:`entry`,typeDefinition:d.meta.entry?.typeDefinition,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(t,s,i)}):(t.log(r.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),e={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await f(t,s,i)});n.contents.push(e)}else if(d.meta?.copyFile){if(!n)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(t.log(r.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");n.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(n)};await l(void 0,n);let u=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await u(e,n);else if(n.kind===`builtin`)await e.emitBuiltin(n.contents,n.id,n.path);else if(n.kind===`entry`)await e.emitEntry(n.contents,n.path,n.typeDefinition);else if(n.kind===`file`)if(`sourcePath`in n&&n.sourcePath){if(!e.fs.existsSync(n.sourcePath))throw Error(`Source file "${n.sourcePath}" for copy operation does not exist.`);let t=await e.fs.read(n.sourcePath);if(!s(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&s(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(t,c)}async function f(t,n,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await(0,e.flushJobsAsync)();let i=c.printDocToString(p(n),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
2
2
  `)?`${i}\n`:i}function p(t){let n=[];for(let r of t)if(typeof r==`string`){let e=r.split(/\r?\n/).flatMap((e,t,n)=>(n.length-1,[e]));n.push(e)}else (0,e.isPrintHook)(r)?n.push(r.print(r.subtree,p)):n.push(p(r));return n}export{u as default};
@@ -1,4 +1,4 @@
1
1
  import "../../../powerlines/src/types/fs.mjs";
2
2
  import "../../../powerlines/src/types/resolved.mjs";
3
- import "../vendor.mjs";
3
+ import "../vendor/index.mjs";
4
4
  import "@alloy-js/typescript";
@@ -1,10 +1,10 @@
1
1
  import { UserConfig } from "../../../powerlines/src/types/config.cjs";
2
2
  import { ResolvedConfig } from "../../../powerlines/src/types/resolved.cjs";
3
3
  import { PluginContext } from "../../../powerlines/src/types/context.cjs";
4
- import { vendor_d_exports } from "../vendor.cjs";
4
+ import { index_d_exports } from "../vendor/index.cjs";
5
5
 
6
6
  //#region ../plugin-alloy/src/types/plugin.d.ts
7
- type AlloyPluginOptions = Partial<vendor_d_exports.PrintTreeOptions> & {
7
+ type AlloyPluginOptions = Partial<index_d_exports.PrintTreeOptions> & {
8
8
  /**
9
9
  * If true, the Alloy framework is used to generate Typescript output files.
10
10
  *
@@ -31,7 +31,7 @@ type AlloyPluginResolvedConfig = ResolvedConfig & {
31
31
  alloy: AlloyPluginOptions;
32
32
  };
33
33
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
34
- render: <TContext extends AlloyPluginContext>(this: TContext, children: vendor_d_exports.Children) => Promise<void>;
34
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: index_d_exports.Children) => Promise<void>;
35
35
  };
36
36
  //#endregion
37
37
  export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
@@ -1,10 +1,10 @@
1
1
  import { UserConfig } from "../../../powerlines/src/types/config.mjs";
2
2
  import { ResolvedConfig } from "../../../powerlines/src/types/resolved.mjs";
3
3
  import { PluginContext } from "../../../powerlines/src/types/context.mjs";
4
- import { vendor_d_exports } from "../vendor.mjs";
4
+ import { index_d_exports } from "../vendor/index.mjs";
5
5
 
6
6
  //#region ../plugin-alloy/src/types/plugin.d.ts
7
- type AlloyPluginOptions = Partial<vendor_d_exports.PrintTreeOptions> & {
7
+ type AlloyPluginOptions = Partial<index_d_exports.PrintTreeOptions> & {
8
8
  /**
9
9
  * If true, the Alloy framework is used to generate Typescript output files.
10
10
  *
@@ -31,7 +31,7 @@ type AlloyPluginResolvedConfig = ResolvedConfig & {
31
31
  alloy: AlloyPluginOptions;
32
32
  };
33
33
  type AlloyPluginContext<TResolvedConfig extends AlloyPluginResolvedConfig = AlloyPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
34
- render: <TContext extends AlloyPluginContext>(this: TContext, children: vendor_d_exports.Children) => Promise<void>;
34
+ render: <TContext extends AlloyPluginContext>(this: TContext, children: index_d_exports.Children) => Promise<void>;
35
35
  };
36
36
  //#endregion
37
37
  export { AlloyPluginContext, AlloyPluginOptions, AlloyPluginResolvedConfig, AlloyPluginUserConfig };
@@ -0,0 +1 @@
1
+ const e=require(`../../../_virtual/rolldown_runtime.cjs`);var t={};e.__reExport(t,require(`@alloy-js/core`)),Object.defineProperty(exports,`vendor_exports`,{enumerable:!0,get:function(){return t}});var n=require(`@alloy-js/core`);Object.keys(n).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
@@ -1,7 +1,7 @@
1
1
  export * from "@alloy-js/core";
2
2
 
3
- //#region ../plugin-alloy/src/vendor.d.ts
3
+ //#region ../plugin-alloy/src/vendor/index.d.ts
4
4
 
5
5
  import * as import___alloy_js_core from "@alloy-js/core";
6
6
  //#endregion
7
- export { import___alloy_js_core as vendor_d_exports };
7
+ export { import___alloy_js_core as index_d_exports };
@@ -1,7 +1,7 @@
1
1
  export * from "@alloy-js/core";
2
2
 
3
- //#region ../plugin-alloy/src/vendor.d.ts
3
+ //#region ../plugin-alloy/src/vendor/index.d.ts
4
4
 
5
5
  import * as import___alloy_js_core from "@alloy-js/core";
6
6
  //#endregion
7
- export { import___alloy_js_core as vendor_d_exports };
7
+ export { import___alloy_js_core as index_d_exports };
@@ -0,0 +1 @@
1
+ import{__reExport as e}from"../../../_virtual/rolldown_runtime.mjs";export*from"@alloy-js/core";var t={};import*as n from"@alloy-js/core";e(t,n);export{t as vendor_exports};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-crypto",
3
- "version": "0.10.89",
3
+ "version": "0.10.91",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
6
6
  "repository": {
@@ -128,17 +128,17 @@
128
128
  "files": ["dist/**/*"],
129
129
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
130
130
  "dependencies": {
131
- "@powerlines/plugin-env": "^0.14.14",
131
+ "@powerlines/plugin-env": "^0.14.16",
132
132
  "@storm-software/config-tools": "^1.188.74",
133
133
  "@stryke/path": "^0.24.0",
134
134
  "defu": "^6.1.4",
135
- "powerlines": "^0.36.16",
135
+ "powerlines": "^0.36.18",
136
136
  "@noble/ciphers": "^2.1.1"
137
137
  },
138
138
  "devDependencies": {
139
- "@powerlines/nx": "^0.11.42",
139
+ "@powerlines/nx": "^0.11.44",
140
140
  "@types/node": "^24.10.4"
141
141
  },
142
142
  "publishConfig": { "access": "public" },
143
- "gitHead": "d81b9da2628c49a75e654462be7062599d2c6441"
143
+ "gitHead": "3633a74a1f46949bc713044084e89a2b5efa4425"
144
144
  }
@@ -1 +0,0 @@
1
- const e=require(`../../_virtual/rolldown_runtime.cjs`);var t={};e.__reExport(t,require(`@alloy-js/core`)),Object.defineProperty(exports,`vendor_exports`,{enumerable:!0,get:function(){return t}});var n=require(`@alloy-js/core`);Object.keys(n).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return n[e]}})});
@@ -1 +0,0 @@
1
- import{__reExport as e}from"../../_virtual/rolldown_runtime.mjs";export*from"@alloy-js/core";var t={};import*as n from"@alloy-js/core";e(t,n);export{t as vendor_exports};