@powerlines/plugin-capnp 0.1.2 → 0.1.4
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-Bq85MUGy.d.cts → index-DwFfaQMt.d.cts} +3 -3
- package/dist/{index-Bq85MUGy.d.ts → index-DwFfaQMt.d.ts} +3 -3
- package/dist/src/index.cjs +2 -2
- package/dist/src/index.d.cts +2 -2
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.js +2 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugin.d.cts +1 -1
- package/dist/types/plugin.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1317,13 +1317,13 @@ type CapnpPluginOptions = Partial<Omit<CapnpcOptions, "workspaceRoot" | "project
|
|
|
1317
1317
|
*
|
|
1318
1318
|
* @defaultValue "\{builtinPath\}/capnp"
|
|
1319
1319
|
*/
|
|
1320
|
-
|
|
1320
|
+
outputPath?: string;
|
|
1321
1321
|
};
|
|
1322
1322
|
type CapnpPluginUserConfig = UserConfig & {
|
|
1323
|
-
capnp?: Omit<CapnpPluginOptions, "schema" | "
|
|
1323
|
+
capnp?: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
1324
1324
|
};
|
|
1325
1325
|
type CapnpPluginResolvedConfig = ResolvedConfig & {
|
|
1326
|
-
capnp: Omit<CapnpPluginOptions, "schema" | "
|
|
1326
|
+
capnp: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
1327
1327
|
};
|
|
1328
1328
|
type CapnpPluginContext<TResolvedConfig extends CapnpPluginResolvedConfig = CapnpPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
1329
1329
|
|
|
@@ -1317,13 +1317,13 @@ type CapnpPluginOptions = Partial<Omit<CapnpcOptions, "workspaceRoot" | "project
|
|
|
1317
1317
|
*
|
|
1318
1318
|
* @defaultValue "\{builtinPath\}/capnp"
|
|
1319
1319
|
*/
|
|
1320
|
-
|
|
1320
|
+
outputPath?: string;
|
|
1321
1321
|
};
|
|
1322
1322
|
type CapnpPluginUserConfig = UserConfig & {
|
|
1323
|
-
capnp?: Omit<CapnpPluginOptions, "schema" | "
|
|
1323
|
+
capnp?: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
1324
1324
|
};
|
|
1325
1325
|
type CapnpPluginResolvedConfig = ResolvedConfig & {
|
|
1326
|
-
capnp: Omit<CapnpPluginOptions, "schema" | "
|
|
1326
|
+
capnp: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
1327
1327
|
};
|
|
1328
1328
|
type CapnpPluginContext<TResolvedConfig extends CapnpPluginResolvedConfig = CapnpPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
1329
1329
|
|
package/dist/src/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var types$1=require('@storm-software/config-tools/types'),compile=require('@stryke/capnp/compile'),helpers=require('@stryke/capnp/helpers'),filePathFns=require('@stryke/path/file-path-fns'),isParentPath=require('@stryke/path/is-parent-path'),joinPaths=require('@stryke/path/join-paths'),replace=require('@stryke/path/replace'),m=require('defu'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var m__default=/*#__PURE__*/_interopDefault(m);/*****************************************
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var types$1=require('@storm-software/config-tools/types'),compile=require('@stryke/capnp/compile'),helpers=require('@stryke/capnp/helpers'),filePathFns=require('@stryke/path/file-path-fns'),isParentPath=require('@stryke/path/is-parent-path'),joinPaths=require('@stryke/path/join-paths'),replace=require('@stryke/path/replace'),m=require('defu'),paths=require('powerlines/plugin-utils/paths'),types=require('./types');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var m__default=/*#__PURE__*/_interopDefault(m);/*****************************************
|
|
2
2
|
*
|
|
3
3
|
* ⚡ Built by Storm Software
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
var s=Object.defineProperty;var
|
|
7
|
+
var s=Object.defineProperty;var e=(n,o)=>s(n,"name",{value:o,configurable:true});const P=e((n={})=>({name:"capnp",config(){return {capnp:m__default.default(n,{ts:true,js:false,dts:false,tty:true,tsconfig:this.tsconfig,schema:joinPaths.joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot,"*.capnp"),outputPath:joinPaths.joinPaths("{builtinPath}","capnp")})}},configResolved(){this.config.capnp.outputPath=paths.replacePathTokens(this,this.config.capnp.outputPath);},async prepare(){const o=await helpers.resolveOptions({...this.config.capnp,schemas:this.config.capnp.schema.toString(),projectRoot:this.config.projectRoot,workspaceRoot:this.workspaceConfig.workspaceRoot});if(!o?.schemas?.length){this.log(types$1.LogLevelLabel.WARN,"No Cap'n Proto schemas found to compile.");return}const a=await compile.capnpc(o);isParentPath.isParentPath(this.config.capnp.outputPath,this.builtinsPath)?await Promise.all(Object.entries(a.files).map(async([i,p])=>this.writeBuiltin(p,filePathFns.findFileName(joinPaths.joinPaths(replace.replacePath(this.config.capnp.outputPath,this.builtinsPath),i),{withExtension:false}),joinPaths.joinPaths(this.config.capnp.outputPath,i)))):await Promise.all(Object.entries(a.files).map(async([i,p])=>this.fs.writeFile(joinPaths.joinPaths(this.config.capnp.outputPath,i),p)));}}),"plugin");var B=P;exports.default=B;exports.plugin=P;Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
package/dist/src/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CapnpPluginContext, a as CapnpPluginOptions, P as Plugin } from '../index-
|
|
2
|
-
export { c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-
|
|
1
|
+
import { C as CapnpPluginContext, a as CapnpPluginOptions, P as Plugin } from '../index-DwFfaQMt.cjs';
|
|
2
|
+
export { c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-DwFfaQMt.cjs';
|
|
3
3
|
import '@stryke/capnp/types';
|
|
4
4
|
import '@storm-software/build-tools/types';
|
|
5
5
|
import '@storm-software/config-tools/types';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CapnpPluginContext, a as CapnpPluginOptions, P as Plugin } from '../index-
|
|
2
|
-
export { c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-
|
|
1
|
+
import { C as CapnpPluginContext, a as CapnpPluginOptions, P as Plugin } from '../index-DwFfaQMt.js';
|
|
2
|
+
export { c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-DwFfaQMt.js';
|
|
3
3
|
import '@stryke/capnp/types';
|
|
4
4
|
import '@storm-software/build-tools/types';
|
|
5
5
|
import '@storm-software/config-tools/types';
|
package/dist/src/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {LogLevelLabel}from'@storm-software/config-tools/types';import {capnpc}from'@stryke/capnp/compile';import {resolveOptions}from'@stryke/capnp/helpers';import {findFileName}from'@stryke/path/file-path-fns';import {isParentPath}from'@stryke/path/is-parent-path';import {joinPaths}from'@stryke/path/join-paths';import {replacePath}from'@stryke/path/replace';import m from'defu';export*from'./types';/*****************************************
|
|
1
|
+
import {LogLevelLabel}from'@storm-software/config-tools/types';import {capnpc}from'@stryke/capnp/compile';import {resolveOptions}from'@stryke/capnp/helpers';import {findFileName}from'@stryke/path/file-path-fns';import {isParentPath}from'@stryke/path/is-parent-path';import {joinPaths}from'@stryke/path/join-paths';import {replacePath}from'@stryke/path/replace';import m from'defu';import {replacePathTokens}from'powerlines/plugin-utils/paths';export*from'./types';/*****************************************
|
|
2
2
|
*
|
|
3
3
|
* ⚡ Built by Storm Software
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
var s=Object.defineProperty;var
|
|
7
|
+
var s=Object.defineProperty;var e=(n,o)=>s(n,"name",{value:o,configurable:true});const P=e((n={})=>({name:"capnp",config(){return {capnp:m(n,{ts:true,js:false,dts:false,tty:true,tsconfig:this.tsconfig,schema:joinPaths(this.workspaceConfig.workspaceRoot,this.config.projectRoot,"*.capnp"),outputPath:joinPaths("{builtinPath}","capnp")})}},configResolved(){this.config.capnp.outputPath=replacePathTokens(this,this.config.capnp.outputPath);},async prepare(){const o=await resolveOptions({...this.config.capnp,schemas:this.config.capnp.schema.toString(),projectRoot:this.config.projectRoot,workspaceRoot:this.workspaceConfig.workspaceRoot});if(!o?.schemas?.length){this.log(LogLevelLabel.WARN,"No Cap'n Proto schemas found to compile.");return}const a=await capnpc(o);isParentPath(this.config.capnp.outputPath,this.builtinsPath)?await Promise.all(Object.entries(a.files).map(async([i,p])=>this.writeBuiltin(p,findFileName(joinPaths(replacePath(this.config.capnp.outputPath,this.builtinsPath),i),{withExtension:false}),joinPaths(this.config.capnp.outputPath,i)))):await Promise.all(Object.entries(a.files).map(async([i,p])=>this.fs.writeFile(joinPaths(this.config.capnp.outputPath,i),p)));}}),"plugin");var E=P;export{E as default,P as plugin};
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-
|
|
1
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-DwFfaQMt.cjs';
|
|
2
2
|
import '@stryke/capnp/types';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-
|
|
1
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-DwFfaQMt.js';
|
|
2
2
|
import '@stryke/capnp/types';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@stryke/capnp/types';
|
|
2
|
-
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-
|
|
2
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-DwFfaQMt.cjs';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@stryke/capnp/types';
|
|
2
|
-
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-
|
|
2
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-DwFfaQMt.js';
|
|
3
3
|
import '@storm-software/build-tools/types';
|
|
4
4
|
import '@storm-software/config-tools/types';
|
|
5
5
|
import '@storm-software/config/types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-capnp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from Cap'n Proto schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
"@stryke/types": "^0.10.0",
|
|
106
106
|
"defu": "^6.1.4",
|
|
107
107
|
"jiti": "^2.6.1",
|
|
108
|
-
"powerlines": "^0.
|
|
108
|
+
"powerlines": "^0.17.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@powerlines/nx": "^0.10.
|
|
112
|
-
"@powerlines/plugin-plugin": "^0.11.
|
|
111
|
+
"@powerlines/nx": "^0.10.2",
|
|
112
|
+
"@powerlines/plugin-plugin": "^0.11.10",
|
|
113
113
|
"@types/node": "^22.19.0"
|
|
114
114
|
},
|
|
115
115
|
"publishConfig": { "access": "public" },
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "27064ac269a2d34c5b9371105cdd58bf6ebe85b4"
|
|
117
117
|
}
|