@powerlines/plugin-crypto 0.10.85 → 0.10.86

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(`./core/contexts/context.cjs`),n=require(`./core/components/output.cjs`);require(`./core/index.cjs`),require(`./helpers/index.cjs`),require(`./markdown/index.cjs`),require(`./typescript/index.cjs`);let r=require(`@alloy-js/core`),i=require(`@alloy-js/rollup-plugin`);i=e.__toESM(i);let a=require(`@storm-software/config-tools/types`),o=require(`@stryke/json/storm-json`),s=require(`@stryke/path/is-parent-path`),c=require(`@stryke/path/replace`),l=require(`@stryke/type-checks/is-set-string`),u=require(`prettier/doc.js`),d=require(`react/jsx-runtime`);const f=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[(0,i.default)()]}}},async configResolved(){(this.tsconfig.tsconfigJson.compilerOptions?.jsx!==`preserve`||this.tsconfig.tsconfigJson.compilerOptions?.jsxImportSource!==`@alloy-js/core`)&&(this.tsconfig.tsconfigJson.compilerOptions??={},this.tsconfig.tsconfigJson.compilerOptions.jsx!==`preserve`&&(this.tsconfig.tsconfigJson.compilerOptions.jsx=`preserve`),this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource!==`@alloy-js/core`&&(this.tsconfig.tsconfigJson.compilerOptions.jsxImportSource=`@alloy-js/core`),await this.fs.write(this.tsconfig.tsconfigFilePath,o.StormJSON.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let t=(0,r.renderTree)((0,d.jsx)(n.Output,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:e}));await m(this,t,this.config.alloy)}}}}];var p=f;async function m(e,t,n={}){await(0,r.flushJobsAsync)();let i,o=async(t,l)=>{if(!Array.isArray(l))return;let u=async e=>{for(let t of l)await o(e,t)},d=(0,r.getContextForRenderNode)(l);if(!d)return u(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):i=e,await u(e)}else if(d.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(a.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:(0,c.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,n)}}else d.meta?.entry||(0,s.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(a.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),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 h(e,l,n)}):(e.log(a.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),r={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,n)});t.contents.push(r)}else if(d.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(a.LogLevelLabel.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");t.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(t)};await o(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,l.isSetString)(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&(0,l.isSetString)(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(e,i)}async function h(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await(0,r.flushJobsAsync)();let i=u.printer.printDocToString(g(t),n).formatted;return n.insertFinalNewLine&&!i.endsWith(`
1
+ const e=require(`../../_virtual/rolldown_runtime.cjs`),t=require(`./core/contexts/context.cjs`),n=require(`./core/components/output.cjs`);require(`./core/index.cjs`),require(`./helpers/index.cjs`),require(`./markdown/index.cjs`),require(`./typescript/index.cjs`);let r=require(`@alloy-js/core`),i=require(`@alloy-js/rollup-plugin`);i=e.__toESM(i);let a=require(`@storm-software/config-tools/types`),o=require(`@stryke/json/storm-json`),s=require(`@stryke/path/is-parent-path`),c=require(`@stryke/path/replace`),l=require(`@stryke/type-checks/is-set-string`),u=require(`prettier/doc.js`),d=require(`react/jsx-runtime`);const f=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[(0,i.default)()],alias:{"@alloy-js/core":`@powerlines/plugin-alloy/vendor`},external:[`@alloy-js/core`,`@vue/reactivity`,`@vue/shared`]}}},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,o.StormJSON.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let t=(0,r.renderTree)((0,d.jsx)(n.Output,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:e}));await m(this,t,this.config.alloy)}}}}];var p=f;async function m(e,t,n={}){await(0,r.flushJobsAsync)();let i,o=async(t,l)=>{if(!Array.isArray(l))return;let u=async e=>{for(let t of l)await o(e,t)},d=(0,r.getContextForRenderNode)(l);if(!d)return u(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):i=e,await u(e)}else if(d.meta?.sourceFile){if(!t)throw Error(`Source file doesn't have parent directory. Make sure you have used the Output component.`);let r;if(d.meta?.builtin){if(!d.meta.builtin.id)throw Error("Built-in runtime module doesn't have an ID. Make sure you have used the `<BuiltinFile />` component.");e.log(a.LogLevelLabel.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:(0,c.replacePath)(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,n)}}else d.meta?.entry||(0,s.isParentPath)(e.entryPath,d.meta.sourceFile.path)?(e.log(a.LogLevelLabel.TRACE,`Rendering entry module at path: ${d.meta.sourceFile.path}`),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 h(e,l,n)}):(e.log(a.LogLevelLabel.TRACE,`Rendering source file at path: ${d.meta.sourceFile.path}`),r={kind:`file`,path:d.meta.sourceFile.path,filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await h(e,l,n)});t.contents.push(r)}else if(d.meta?.copyFile){if(!t)throw Error(`Copy file doesn't have parent directory. Make sure you have used the Output component.`);if(e.log(a.LogLevelLabel.TRACE,`Processing copy file operation from "${d.meta.copyFile.sourcePath}" to "${d.meta.copyFile.path}"`),!d.meta.copyFile.sourcePath)throw Error("Copy file doesn't have a source path. Make sure you have provided a `sourcePath` property to the `meta.copyFile` context.");if(!d.meta.copyFile.path)throw Error("Copy file doesn't have a destination path. Make sure you have provided a `path` property to the `meta.copyFile` context.");t.contents.push({kind:`file`,path:d.meta.copyFile.path,sourcePath:d.meta.copyFile.sourcePath,preset:d.meta.output?.preset})}else await u(t)};await o(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,l.isSetString)(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&(0,l.isSetString)(n.contents))await e.fs.write(n.path,n.contents);else throw Error(`Unexpected output extracted from the render tree: \n\n${JSON.stringify(n,null,2)}`)};await u(e,i)}async function h(e,t,n={}){n.printWidth??=160,n.tabWidth??=2,n.useTabs??=!1,n.insertFinalNewLine??=!0,await(0,r.flushJobsAsync)();let i=u.printer.printDocToString(g(t),n).formatted;return n.insertFinalNewLine&&!i.endsWith(`
2
2
  `)?`${i}\n`:i}function g(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,r.isPrintHook)(n)?t.push(n.print(n.subtree,g)):t.push(g(n));return t}exports.default=p;
@@ -1,2 +1,2 @@
1
- import{PowerlinesContext as e}from"./core/contexts/context.mjs";import{Output as t}from"./core/components/output.mjs";import"./core/index.mjs";import"./helpers/index.mjs";import"./markdown/index.mjs";import"./typescript/index.mjs";import{flushJobsAsync as n,getContextForRenderNode as r,isPrintHook as i,renderTree as a}from"@alloy-js/core";import o from"@alloy-js/rollup-plugin";import{LogLevelLabel as s}from"@storm-software/config-tools/types";import{StormJSON as c}from"@stryke/json/storm-json";import{isParentPath as l}from"@stryke/path/is-parent-path";import{replacePath as u}from"@stryke/path/replace";import{isSetString as d}from"@stryke/type-checks/is-set-string";import{printer as f}from"prettier/doc.js";import{jsx as p}from"react/jsx-runtime";var m=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[o()]}}},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,c.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let n=a(p(t,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:e}));await h(this,n,this.config.alloy)}}}}];async function h(e,t,i={}){await n();let a,o=async(t,n)=>{if(!Array.isArray(n))return;let c=async e=>{for(let t of n)await o(e,t)},d=r(n);if(!d)return c(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):a=e,await c(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(s.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:u(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await g(e,n,i)}}else d.meta?.entry||l(e.entryPath,d.meta.sourceFile.path)?(e.log(s.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 g(e,n,i)}):(e.log(s.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 g(e,n,i)});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(s.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 c(t)};await o(void 0,t);let c=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await c(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(!d(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&d(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 c(e,a)}async function g(e,t,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await n();let i=f.printDocToString(_(t),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
1
+ import{PowerlinesContext as e}from"./core/contexts/context.mjs";import{Output as t}from"./core/components/output.mjs";import"./core/index.mjs";import"./helpers/index.mjs";import"./markdown/index.mjs";import"./typescript/index.mjs";import{flushJobsAsync as n,getContextForRenderNode as r,isPrintHook as i,renderTree as a}from"@alloy-js/core";import o from"@alloy-js/rollup-plugin";import{LogLevelLabel as s}from"@storm-software/config-tools/types";import{StormJSON as c}from"@stryke/json/storm-json";import{isParentPath as l}from"@stryke/path/is-parent-path";import{replacePath as u}from"@stryke/path/replace";import{isSetString as d}from"@stryke/type-checks/is-set-string";import{printer as f}from"prettier/doc.js";import{jsx as p}from"react/jsx-runtime";var m=(e={})=>[{name:`alloy:config`,config(){return{alloy:{typescript:!0,...e},build:{inputOptions:{transform:{jsx:{runtime:`classic`,pragma:`Alloy.createElement`,importSource:`@alloy-js/core`}}},plugins:[o()],alias:{"@alloy-js/core":`@powerlines/plugin-alloy/vendor`},external:[`@alloy-js/core`,`@vue/reactivity`,`@vue/shared`]}}},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,c.stringify(this.tsconfig.tsconfigJson))),this.dependencies[`@alloy-js/core`]=`^0.22.0`,this.config.alloy?.typescript!==!1&&(this.dependencies[`@alloy-js/typescript`]=`^0.22.0`),this.config.alloy?.json===!0&&(this.dependencies[`@alloy-js/json`]=`^0.22.0`),this.config.alloy?.markdown===!0&&(this.dependencies[`@alloy-js/markdown`]=`^0.22.0`)}},{name:`alloy:update-context`,configResolved:{order:`pre`,async handler(){this.render=async e=>{let n=a(p(t,{context:this,basePath:this.workspaceConfig.workspaceRoot,children:e}));await h(this,n,this.config.alloy)}}}}];async function h(e,t,i={}){await n();let a,o=async(t,n)=>{if(!Array.isArray(n))return;let c=async e=>{for(let t of n)await o(e,t)},d=r(n);if(!d)return c(t);if(d.meta?.directory){let e={kind:`directory`,path:d.meta.directory.path,contents:[]};t?t.contents.push(e):a=e,await c(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(s.TRACE,`Rendering built-in runtime module with ID: ${d.meta.builtin.id}`),r={kind:`builtin`,id:d.meta.builtin.id,path:u(d.meta.sourceFile.path,e.builtinsPath),filetype:d.meta.sourceFile.filetype,preset:d.meta.output?.mode,contents:await g(e,n,i)}}else d.meta?.entry||l(e.entryPath,d.meta.sourceFile.path)?(e.log(s.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 g(e,n,i)}):(e.log(s.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 g(e,n,i)});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(s.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 c(t)};await o(void 0,t);let c=async(e,t)=>{for(let n of t.contents)if(n.kind===`directory`)await c(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(!d(t))throw Error(`Source file "${n.sourcePath}" for copy operation is empty.`);await e.fs.write(n.path,t)}else if(`contents`in n&&d(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 c(e,a)}async function g(e,t,r={}){r.printWidth??=160,r.tabWidth??=2,r.useTabs??=!1,r.insertFinalNewLine??=!0,await n();let i=f.printDocToString(_(t),r).formatted;return r.insertFinalNewLine&&!i.endsWith(`
2
2
  `)?`${i}\n`:i}function _(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 i(n)?t.push(n.print(n.subtree,_)):t.push(_(n));return t}export{m as default};
@@ -1,5 +1,3 @@
1
- import "esbuild";
2
-
3
1
  //#region ../powerlines/src/types/build.d.ts
4
2
 
5
3
  type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
@@ -12,6 +12,7 @@ import { LogLevelLabel } from "@storm-software/config-tools/types";
12
12
  import { StormWorkspaceConfig } from "@storm-software/config/types";
13
13
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
14
14
  import { AssetGlob } from "@stryke/types/file";
15
+ import { DateString } from "compatx";
15
16
 
16
17
  //#region ../powerlines/src/types/config.d.ts
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
@@ -249,6 +250,17 @@ interface CommonUserConfig extends BaseConfig {
249
250
  * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
250
251
  */
251
252
  description?: string;
253
+ /**
254
+ * The date to use for compatibility checks
255
+ *
256
+ * @remarks
257
+ * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs.
258
+ *
259
+ * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
260
+ * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
261
+ * @see https://github.com/unjs/compatx
262
+ */
263
+ compatibilityDate?: DateString;
252
264
  /**
253
265
  * The log level to use for the Powerlines processes.
254
266
  *
@@ -13,6 +13,7 @@ import { Format } from "@storm-software/build-tools/types";
13
13
  import { StormWorkspaceConfig } from "@storm-software/config/types";
14
14
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
15
15
  import { AssetGlob } from "@stryke/types/file";
16
+ import { DateString } from "compatx";
16
17
 
17
18
  //#region ../powerlines/src/types/config.d.ts
18
19
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
@@ -250,6 +251,17 @@ interface CommonUserConfig extends BaseConfig {
250
251
  * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
251
252
  */
252
253
  description?: string;
254
+ /**
255
+ * The date to use for compatibility checks
256
+ *
257
+ * @remarks
258
+ * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs.
259
+ *
260
+ * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
261
+ * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
262
+ * @see https://github.com/unjs/compatx
263
+ */
264
+ compatibilityDate?: DateString;
253
265
  /**
254
266
  * The log level to use for the Powerlines processes.
255
267
  *
@@ -33,7 +33,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
33
33
  /**
34
34
  * The resolved options for the Powerlines project configuration.
35
35
  */
36
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
36
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "compatibilityDate" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "compatibilityDate" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
37
37
  /**
38
38
  * The configuration options that were provided inline to the Powerlines CLI.
39
39
  */
@@ -1,4 +1,3 @@
1
- import "./build.mjs";
2
1
  import { BabelUserConfig, EnvironmentConfig, InlineConfig, OutputConfig, UserConfig } from "./config.mjs";
3
2
  import { NonUndefined } from "@stryke/types/base";
4
3
  import { ResolvedPreviewOptions } from "vite";
@@ -34,7 +33,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> &
34
33
  /**
35
34
  * The resolved options for the Powerlines project configuration.
36
35
  */
37
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
36
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "compatibilityDate" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "compatibilityDate" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
38
37
  /**
39
38
  * The configuration options that were provided inline to the Powerlines CLI.
40
39
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-crypto",
3
- "version": "0.10.85",
3
+ "version": "0.10.86",
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.10",
131
+ "@powerlines/plugin-env": "^0.14.11",
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.12",
135
+ "powerlines": "^0.36.13",
136
136
  "@noble/ciphers": "^2.1.1"
137
137
  },
138
138
  "devDependencies": {
139
- "@powerlines/nx": "^0.11.38",
139
+ "@powerlines/nx": "^0.11.39",
140
140
  "@types/node": "^24.10.4"
141
141
  },
142
142
  "publishConfig": { "access": "public" },
143
- "gitHead": "d3ac72b97e62a0bff2a45b99d6e5ca5d32f95f3c"
143
+ "gitHead": "483677f34524b653a72b313c463081c800043753"
144
144
  }