@power-plant/alloy-js 0.0.8 → 0.0.11

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
@@ -33,7 +33,7 @@ The Power Plant monorepo is a collection of packages that are designed to work t
33
33
 
34
34
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
35
35
 
36
- [![Version](https://img.shields.io/badge/version-0.0.7-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://docs.stormsoftware.com/projects/power-plant)&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/power-plant/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
36
+ [![Version](https://img.shields.io/badge/version-0.0.8-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://docs.stormsoftware.com/projects/power-plant)&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/power-plant/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
37
37
 
38
38
  <!-- prettier-ignore-start -->
39
39
  <!-- markdownlint-disable -->
package/dist/render.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs"),t=require("./core/components/output.cjs");require("./core/index.cjs");let n=require("@alloy-js/core/jsx-runtime"),r=require("@alloy-js/core"),i=require("@stryke/helpers/noop"),a=require("@stryke/path/replace"),o=require("@stryke/string-format/list"),s=require("defu");s=e.t(s,1);async function c(e,c,l){let u={},{cwd:d,logger:f}=e,p=await(0,r.renderAsync)((0,n.createComponent)(t.Output,{context:e,spec:c,meta:u,children:l})),m=[];if(await(0,r.traverseOutput)(p,{visitDirectory:i.noop,visitFile:e=>m.push(e)}),!m.length)return f.debug(`No output files were rendered by the Alloy-js components.`),{};f.debug(`Rendering ${m.length} output files from Alloy-js components: ${(0,o.list)(m.map(e=>(0,a.replacePath)(e.path,d)))}.`);let h={};return await(0,r.traverseOutput)(p,{visitDirectory:i.noop,visitFile:e=>{if(`contents`in e){let t=u[e.path]??{};h[e.path]={path:e.path,source:[{content:e.contents,meta:t}]}}else if(e.sourcePath&&h[e.sourcePath]){let t=u[e.path]??{};h[e.path]={...h[e.sourcePath],path:e.path,source:h[e.sourcePath]?.source?.map(e=>(0,s.default)(e,{meta:t}))??[]}}}}),h}exports.render=c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-CMqjfN_6.cjs"),t=require("./core/components/output.cjs");require("./core/index.cjs");let n=require("@alloy-js/core/jsx-runtime"),r=require("@alloy-js/core"),i=require("@stryke/helpers/noop"),a=require("@stryke/path/replace"),o=require("@stryke/string-format/list"),s=require("defu");s=e.t(s,1);async function c(e,c,l){let u={},{cwd:d,logger:f}=e,p=await(0,r.renderAsync)((0,n.createComponent)(t.Output,{context:e,spec:c,meta:u,children:l})),m=[];if(await(0,r.traverseOutput)(p,{visitDirectory:i.noop,visitFile:e=>m.push(e)}),!m.length)return f.debug(`No output files were rendered by the Alloy-js components.`),{};f.debug(`Rendering ${m.length} output files from Alloy-js components: ${(0,o.list)(m.map(e=>(0,a.replacePath)(e.path,d)))}.`);let h={},g={};await(0,r.traverseOutput)(p,{visitDirectory:i.noop,visitFile:e=>{if(`contents`in e){let t=u[e.path]??{};h[e.path]={path:e.path,chunks:[{content:e.contents,meta:t}]}}else e.sourcePath&&(g[e.sourcePath]=e.path)}});for(let[e,t]of Object.entries(g))if(h[e])h[t]={...h[e],path:t,chunks:h[e].chunks?.map(e=>(0,s.default)(e,{meta:u[t]??{}}))};else throw Error(`Source path ${e} not found in documents.`);return h}exports.render=c;
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;;;;;;;;;;;;iBA6CsB,OAAO,OAAO,yBAAyB,iBAC3D,SAAS,iBAAiB,OAAO,UAAU,WAC3C,MAAM,OACN,UAAU,WACT,QAAQ,wBAAwB,OAAO"}
1
+ {"version":3,"file":"render.d.cts","names":[],"sources":["../src/render.tsx"],"mappings":";;;;;;;;;;;;;;;;;iBA8CsB,OAAO,OAAO,yBAAyB,iBAC3D,SAAS,iBAAiB,OAAO,UAAU,WAC3C,MAAM,OACN,UAAU,WACT,QAAQ,wBAAwB,OAAO"}
package/dist/render.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{Output as e}from"./core/components/output.mjs";import"./core/index.mjs";import{createComponent as t}from"@alloy-js/core/jsx-runtime";import{renderAsync as n,traverseOutput as r}from"@alloy-js/core";import{noop as i}from"@stryke/helpers/noop";import{replacePath as a}from"@stryke/path/replace";import{list as o}from"@stryke/string-format/list";import s from"defu";async function c(c,l,u){let d={},{cwd:f,logger:p}=c,m=await n(t(e,{context:c,spec:l,meta:d,children:u})),h=[];if(await r(m,{visitDirectory:i,visitFile:e=>h.push(e)}),!h.length)return p.debug(`No output files were rendered by the Alloy-js components.`),{};p.debug(`Rendering ${h.length} output files from Alloy-js components: ${o(h.map(e=>a(e.path,f)))}.`);let g={};return await r(m,{visitDirectory:i,visitFile:e=>{if(`contents`in e){let t=d[e.path]??{};g[e.path]={path:e.path,source:[{content:e.contents,meta:t}]}}else if(e.sourcePath&&g[e.sourcePath]){let t=d[e.path]??{};g[e.path]={...g[e.sourcePath],path:e.path,source:g[e.sourcePath]?.source?.map(e=>s(e,{meta:t}))??[]}}}}),g}export{c as render};
1
+ import{Output as e}from"./core/components/output.mjs";import"./core/index.mjs";import{createComponent as t}from"@alloy-js/core/jsx-runtime";import{renderAsync as n,traverseOutput as r}from"@alloy-js/core";import{noop as i}from"@stryke/helpers/noop";import{replacePath as a}from"@stryke/path/replace";import{list as o}from"@stryke/string-format/list";import s from"defu";async function c(c,l,u){let d={},{cwd:f,logger:p}=c,m=await n(t(e,{context:c,spec:l,meta:d,children:u})),h=[];if(await r(m,{visitDirectory:i,visitFile:e=>h.push(e)}),!h.length)return p.debug(`No output files were rendered by the Alloy-js components.`),{};p.debug(`Rendering ${h.length} output files from Alloy-js components: ${o(h.map(e=>a(e.path,f)))}.`);let g={},_={};await r(m,{visitDirectory:i,visitFile:e=>{if(`contents`in e){let t=d[e.path]??{};g[e.path]={path:e.path,chunks:[{content:e.contents,meta:t}]}}else e.sourcePath&&(_[e.sourcePath]=e.path)}});for(let[e,t]of Object.entries(_))if(g[e])g[t]={...g[e],path:t,chunks:g[e].chunks?.map(e=>s(e,{meta:d[t]??{}}))};else throw Error(`Source path ${e} not found in documents.`);return g}export{c as render};
2
2
  //# sourceMappingURL=render.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/alloy-js",
3
- "version": "0.0.8",
3
+ "version": "0.0.11",
4
4
  "private": false,
5
5
  "description": "A Power Plant generator for using Alloy JS to generate source code.",
6
6
  "keywords": [
@@ -869,8 +869,8 @@
869
869
  "@alloy-js/json": "^0.24.0",
870
870
  "@alloy-js/markdown": "^0.24.0",
871
871
  "@alloy-js/typescript": "^0.24.0",
872
- "@power-plant/core": "^0.0.12",
873
- "@power-plant/schema": "^0.0.12",
872
+ "@power-plant/core": "^0.0.15",
873
+ "@power-plant/schema": "^0.0.15",
874
874
  "@stryke/convert": "^0.7.26",
875
875
  "@stryke/helpers": "^0.10.35",
876
876
  "@stryke/path": "^0.29.22",
@@ -884,13 +884,13 @@
884
884
  "@alloy-js/babel-preset": "^0.3.0",
885
885
  "@babel/core": "^8.0.1",
886
886
  "@babel/preset-typescript": "^8.0.1",
887
- "@powerlines/plugin-babel": "^0.13.138",
888
- "@powerlines/plugin-tsdown": "^0.1.543",
887
+ "@powerlines/plugin-babel": "^0.13.139",
888
+ "@powerlines/plugin-tsdown": "^0.1.544",
889
889
  "@types/node": "^25.9.5",
890
- "powerlines": "^0.47.142"
890
+ "powerlines": "^0.47.143"
891
891
  },
892
892
  "peerDependencies": { "@alloy-js/babel-preset": ">=0.3.0" },
893
893
  "peerDependenciesMeta": { "@alloy-js/babel-preset": { "optional": false } },
894
894
  "publishConfig": { "access": "public" },
895
- "gitHead": "27e84d9116561bc573590459566dc4443b02b9c6"
895
+ "gitHead": "53b9aaba951c67546a3774251f4ad973eccc3997"
896
896
  }