@power-plant/capnp 0.0.67 → 0.0.69

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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@power-plant/capnp-schema");c=s(c,1);let l=require("@power-plant/core"),u=require("@stryke/capnp/compile"),d=require("@stryke/capnp/helpers"),f=require("@stryke/convert/to-array"),p=require("@stryke/path/join-paths"),m=require("@stryke/type-checks/is-string"),h=require("node:fs/promises"),g=require("node:os"),_=require("node:path");var v=`0.0.67`;function y(e){return e instanceof Map?[...e.entries()]:Object.entries(e)}function b(e,t){return(0,_.isAbsolute)(e)?e:(0,_.resolve)(t,e)}var x=(0,l.defineGenerator)({meta:{name:`capnp`,title:`Cap'n Proto`,description:"A generator that uses `@stryke/capnp` `capnpc` to compile Cap'n Proto schemas into TypeScript/JavaScript source code.",version:v,tags:[`capnp`,`capnproto`,`capnpc`],links:[{href:`https://capnproto.org`,description:`Cap'n Proto`},{href:`https://capnproto.org/capnp-tool.html`,description:`The capnp Tool`},{href:`https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-capnp/src/index.ts`,description:`Powerlines Cap'n Proto plugin`}]},schema:c.default,generator:async(e,t)=>{let{cwd:n}=(0,l.useExecution)(),r=(0,f.toArray)(t.schemas??e.files.map(e=>e.path)).filter(m.isString).map(e=>b(e,n));if(r.length===0)throw Error("No Cap'n Proto schema paths provided. Pass `schemas` or load a CapnpSchema with file paths.");let i={schemas:r,projectRoot:n,workspaceRoot:n,tsconfigPath:b(t.tsconfigPath??`tsconfig.json`,n),output:t.output==null?await(0,h.mkdtemp)((0,p.joinPaths)((0,g.tmpdir)(),`power-plant-capnp-gen-`)):b(t.output,n),js:t.js??!1,dts:t.dts??!1,tty:t.tty??!1,skipGenerateId:t.skipGenerateId,noStandardImport:t.noStandardImport,noTs:t.ts===!1,importPath:t.importPath?(0,f.toArray)(t.importPath).join(`,`):void 0},a=await(0,d.resolveOptions)(i);if(!a?.schemas?.length)throw Error(`No Cap'n Proto schemas found to compile: ${r.join(`, `)}`);let o=await(0,u.capnpc)(a),s={};for(let[e,t]of y(o.files))s[e]={path:e,language:e.endsWith(`.ts`)?`typescript`:e.endsWith(`.js`)?`javascript`:e.endsWith(`.d.ts`)?`typescript`:void 0,chunks:[{content:t,meta:{name:`capnpc`}}]};return s}});module.exports=x;
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("@power-plant/capnp-schema");c=s(c,1);let l=require("@power-plant/core"),u=require("@stryke/capnp/compile"),d=require("@stryke/capnp/helpers"),f=require("@stryke/convert/to-array"),p=require("@stryke/path/join-paths"),m=require("@stryke/type-checks/is-string"),h=require("node:fs/promises"),g=require("node:os"),_=require("node:path");var v=`0.0.69`;function y(e){return e instanceof Map?[...e.entries()]:Object.entries(e)}function b(e,t){return(0,_.isAbsolute)(e)?e:(0,_.resolve)(t,e)}var x=(0,l.defineGenerator)({meta:{name:`capnp`,title:`Cap'n Proto`,description:"A generator that uses `@stryke/capnp` `capnpc` to compile Cap'n Proto schemas into TypeScript/JavaScript source code.",version:v,tags:[`capnp`,`capnproto`,`capnpc`],links:[{href:`https://capnproto.org`,description:`Cap'n Proto`},{href:`https://capnproto.org/capnp-tool.html`,description:`The capnp Tool`},{href:`https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-capnp/src/index.ts`,description:`Powerlines Cap'n Proto plugin`}]},schema:c.default,generator:async(e,t)=>{let{cwd:n}=(0,l.useExecution)(),r=(0,f.toArray)(t.schemas??e.files.map(e=>e.path)).filter(m.isString).map(e=>b(e,n));if(r.length===0)throw Error("No Cap'n Proto schema paths provided. Pass `schemas` or load a CapnpSchema with file paths.");let i={schemas:r,projectRoot:n,workspaceRoot:n,tsconfigPath:b(t.tsconfigPath??`tsconfig.json`,n),output:t.output==null?await(0,h.mkdtemp)((0,p.joinPaths)((0,g.tmpdir)(),`power-plant-capnp-gen-`)):b(t.output,n),js:t.js??!1,dts:t.dts??!1,tty:t.tty??!1,skipGenerateId:t.skipGenerateId,noStandardImport:t.noStandardImport,noTs:t.ts===!1,importPath:t.importPath?(0,f.toArray)(t.importPath).join(`,`):void 0},a=await(0,d.resolveOptions)(i);if(!a?.schemas?.length)throw Error(`No Cap'n Proto schemas found to compile: ${r.join(`, `)}`);let o=await(0,u.capnpc)(a),s={};for(let[e,t]of y(o.files))s[e]={path:e,language:e.endsWith(`.ts`)?`typescript`:e.endsWith(`.js`)?`javascript`:e.endsWith(`.d.ts`)?`typescript`:void 0,chunks:[{content:t,meta:{name:`capnpc`}}]};return s}});module.exports=x;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import e from"@power-plant/capnp-schema";import{defineGenerator as t,useExecution as n}from"@power-plant/core";import{capnpc as r}from"@stryke/capnp/compile";import{resolveOptions as i}from"@stryke/capnp/helpers";import{toArray as a}from"@stryke/convert/to-array";import{joinPaths as o}from"@stryke/path/join-paths";import{isString as s}from"@stryke/type-checks/is-string";import{mkdtemp as c}from"node:fs/promises";import{tmpdir as l}from"node:os";import{isAbsolute as u,resolve as d}from"node:path";var f=`0.0.67`;function p(e){return e instanceof Map?[...e.entries()]:Object.entries(e)}function m(e,t){return u(e)?e:d(t,e)}var h=t({meta:{name:`capnp`,title:`Cap'n Proto`,description:"A generator that uses `@stryke/capnp` `capnpc` to compile Cap'n Proto schemas into TypeScript/JavaScript source code.",version:f,tags:[`capnp`,`capnproto`,`capnpc`],links:[{href:`https://capnproto.org`,description:`Cap'n Proto`},{href:`https://capnproto.org/capnp-tool.html`,description:`The capnp Tool`},{href:`https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-capnp/src/index.ts`,description:`Powerlines Cap'n Proto plugin`}]},schema:e,generator:async(e,t)=>{let{cwd:u}=n(),d=a(t.schemas??e.files.map(e=>e.path)).filter(s).map(e=>m(e,u));if(d.length===0)throw Error("No Cap'n Proto schema paths provided. Pass `schemas` or load a CapnpSchema with file paths.");let f={schemas:d,projectRoot:u,workspaceRoot:u,tsconfigPath:m(t.tsconfigPath??`tsconfig.json`,u),output:t.output==null?await c(o(l(),`power-plant-capnp-gen-`)):m(t.output,u),js:t.js??!1,dts:t.dts??!1,tty:t.tty??!1,skipGenerateId:t.skipGenerateId,noStandardImport:t.noStandardImport,noTs:t.ts===!1,importPath:t.importPath?a(t.importPath).join(`,`):void 0},h=await i(f);if(!h?.schemas?.length)throw Error(`No Cap'n Proto schemas found to compile: ${d.join(`, `)}`);let g=await r(h),_={};for(let[e,t]of p(g.files))_[e]={path:e,language:e.endsWith(`.ts`)?`typescript`:e.endsWith(`.js`)?`javascript`:e.endsWith(`.d.ts`)?`typescript`:void 0,chunks:[{content:t,meta:{name:`capnpc`}}]};return _}});export{h as default};
1
+ import e from"@power-plant/capnp-schema";import{defineGenerator as t,useExecution as n}from"@power-plant/core";import{capnpc as r}from"@stryke/capnp/compile";import{resolveOptions as i}from"@stryke/capnp/helpers";import{toArray as a}from"@stryke/convert/to-array";import{joinPaths as o}from"@stryke/path/join-paths";import{isString as s}from"@stryke/type-checks/is-string";import{mkdtemp as c}from"node:fs/promises";import{tmpdir as l}from"node:os";import{isAbsolute as u,resolve as d}from"node:path";var f=`0.0.69`;function p(e){return e instanceof Map?[...e.entries()]:Object.entries(e)}function m(e,t){return u(e)?e:d(t,e)}var h=t({meta:{name:`capnp`,title:`Cap'n Proto`,description:"A generator that uses `@stryke/capnp` `capnpc` to compile Cap'n Proto schemas into TypeScript/JavaScript source code.",version:f,tags:[`capnp`,`capnproto`,`capnpc`],links:[{href:`https://capnproto.org`,description:`Cap'n Proto`},{href:`https://capnproto.org/capnp-tool.html`,description:`The capnp Tool`},{href:`https://github.com/storm-software/powerlines/blob/main/packages/plugins/plugin-capnp/src/index.ts`,description:`Powerlines Cap'n Proto plugin`}]},schema:e,generator:async(e,t)=>{let{cwd:u}=n(),d=a(t.schemas??e.files.map(e=>e.path)).filter(s).map(e=>m(e,u));if(d.length===0)throw Error("No Cap'n Proto schema paths provided. Pass `schemas` or load a CapnpSchema with file paths.");let f={schemas:d,projectRoot:u,workspaceRoot:u,tsconfigPath:m(t.tsconfigPath??`tsconfig.json`,u),output:t.output==null?await c(o(l(),`power-plant-capnp-gen-`)):m(t.output,u),js:t.js??!1,dts:t.dts??!1,tty:t.tty??!1,skipGenerateId:t.skipGenerateId,noStandardImport:t.noStandardImport,noTs:t.ts===!1,importPath:t.importPath?a(t.importPath).join(`,`):void 0},h=await i(f);if(!h?.schemas?.length)throw Error(`No Cap'n Proto schemas found to compile: ${d.join(`, `)}`);let g=await r(h),_={};for(let[e,t]of p(g.files))_[e]={path:e,language:e.endsWith(`.ts`)?`typescript`:e.endsWith(`.js`)?`javascript`:e.endsWith(`.d.ts`)?`typescript`:void 0,chunks:[{content:t,meta:{name:`capnpc`}}]};return _}});export{h as default};
2
2
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@power-plant/capnp",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "private": false,
5
5
  "description": "A Power Plant generator that compiles Cap'n Proto schemas into source code via capnpc.",
6
6
  "keywords": [
@@ -70,18 +70,18 @@
70
70
  "files": ["dist"],
71
71
  "dependencies": {
72
72
  "@power-plant/capnp-schema": "^0.0.1",
73
- "@power-plant/core": "^0.0.85",
74
- "@power-plant/schema": "^0.0.83",
73
+ "@power-plant/core": "^0.0.87",
74
+ "@power-plant/schema": "^0.0.85",
75
75
  "@stryke/capnp": "^0.12.137",
76
76
  "@stryke/convert": "^0.7.39",
77
77
  "@stryke/path": "^0.29.35",
78
78
  "@stryke/type-checks": "^0.6.41"
79
79
  },
80
80
  "devDependencies": {
81
- "@powerlines/plugin-tsdown": "^0.1.602",
81
+ "@powerlines/plugin-tsdown": "^0.1.604",
82
82
  "@types/node": "^25.9.5",
83
- "powerlines": "^0.47.201"
83
+ "powerlines": "^0.47.203"
84
84
  },
85
85
  "publishConfig": { "access": "public" },
86
- "gitHead": "681185c0980c7d8645734f3b5dc6a2fa1483bc52"
86
+ "gitHead": "1bfbc908d92f9c7796bb0212d0c365e90665be57"
87
87
  }