@powerlines/plugin-capnp 0.1.1 → 0.1.2
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 +1330 -0
- package/dist/index-Bq85MUGy.d.ts +1330 -0
- package/dist/src/index.cjs +7 -0
- package/dist/src/index.d.cts +33 -0
- package/dist/src/index.d.ts +33 -0
- package/dist/src/index.js +7 -0
- package/dist/types/index.cjs +1 -0
- package/dist/types/index.d.cts +22 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +1 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +22 -0
- package/dist/types/plugin.d.ts +22 -0
- package/dist/types/plugin.js +0 -0
- package/package.json +8 -8
|
@@ -0,0 +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);/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
var s=Object.defineProperty;var p=(n,i)=>s(n,"name",{value:i,configurable:true});const P=p((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"),generatedPath:joinPaths.joinPaths("{builtinPath}","capnp")})}},configResolved(){this.config.capnp.generatedPath=this.config.capnp.generatedPath.replace("{builtinPath}",this.builtinsPath);},async prepare(){const i=await helpers.resolveOptions({...this.config.capnp,schemas:this.config.capnp.schema.toString(),projectRoot:this.config.projectRoot,workspaceRoot:this.workspaceConfig.workspaceRoot});if(!i?.schemas?.length){this.log(types$1.LogLevelLabel.WARN,"No Cap'n Proto schemas found to compile.");return}const a=await compile.capnpc(i);isParentPath.isParentPath(this.config.capnp.generatedPath,this.builtinsPath)?await Promise.all(Object.entries(a.files).map(async([e,o])=>this.writeBuiltin(o,filePathFns.findFileName(joinPaths.joinPaths(replace.replacePath(this.config.capnp.generatedPath,this.builtinsPath),e),{withExtension:false}),joinPaths.joinPaths(this.config.capnp.generatedPath,e)))):await Promise.all(Object.entries(a.files).map(async([e,o])=>this.fs.writeFile(joinPaths.joinPaths(this.config.capnp.generatedPath,e),o)));}}),"plugin");var U=P;exports.default=U;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]}})});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { C as CapnpPluginContext, a as CapnpPluginOptions, P as Plugin } from '../index-Bq85MUGy.cjs';
|
|
2
|
+
export { c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-Bq85MUGy.cjs';
|
|
3
|
+
import '@stryke/capnp/types';
|
|
4
|
+
import '@storm-software/build-tools/types';
|
|
5
|
+
import '@storm-software/config-tools/types';
|
|
6
|
+
import '@storm-software/config/types';
|
|
7
|
+
import '@stryke/types/base';
|
|
8
|
+
import '@stryke/types/configuration';
|
|
9
|
+
import '@stryke/types/file';
|
|
10
|
+
import 'vite';
|
|
11
|
+
import '@stryke/env/get-env-paths';
|
|
12
|
+
import '@stryke/types/package-json';
|
|
13
|
+
import 'jiti';
|
|
14
|
+
import 'oxc-parser';
|
|
15
|
+
import 'semver';
|
|
16
|
+
import 'unplugin';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import 'typescript';
|
|
19
|
+
import '@stryke/json/types';
|
|
20
|
+
import 'memfs';
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'unionfs';
|
|
23
|
+
import '@stryke/types/array';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A Powerlines plugin to integrate Cap'n Proto for code generation.
|
|
27
|
+
*
|
|
28
|
+
* @param options - The plugin options.
|
|
29
|
+
* @returns A Powerlines plugin instance.
|
|
30
|
+
*/
|
|
31
|
+
declare const plugin: <TContext extends CapnpPluginContext = CapnpPluginContext>(options?: CapnpPluginOptions) => Plugin<TContext>;
|
|
32
|
+
|
|
33
|
+
export { CapnpPluginContext, CapnpPluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { C as CapnpPluginContext, a as CapnpPluginOptions, P as Plugin } from '../index-Bq85MUGy.js';
|
|
2
|
+
export { c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-Bq85MUGy.js';
|
|
3
|
+
import '@stryke/capnp/types';
|
|
4
|
+
import '@storm-software/build-tools/types';
|
|
5
|
+
import '@storm-software/config-tools/types';
|
|
6
|
+
import '@storm-software/config/types';
|
|
7
|
+
import '@stryke/types/base';
|
|
8
|
+
import '@stryke/types/configuration';
|
|
9
|
+
import '@stryke/types/file';
|
|
10
|
+
import 'vite';
|
|
11
|
+
import '@stryke/env/get-env-paths';
|
|
12
|
+
import '@stryke/types/package-json';
|
|
13
|
+
import 'jiti';
|
|
14
|
+
import 'oxc-parser';
|
|
15
|
+
import 'semver';
|
|
16
|
+
import 'unplugin';
|
|
17
|
+
import '@stryke/types/tsconfig';
|
|
18
|
+
import 'typescript';
|
|
19
|
+
import '@stryke/json/types';
|
|
20
|
+
import 'memfs';
|
|
21
|
+
import 'node:fs';
|
|
22
|
+
import 'unionfs';
|
|
23
|
+
import '@stryke/types/array';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A Powerlines plugin to integrate Cap'n Proto for code generation.
|
|
27
|
+
*
|
|
28
|
+
* @param options - The plugin options.
|
|
29
|
+
* @returns A Powerlines plugin instance.
|
|
30
|
+
*/
|
|
31
|
+
declare const plugin: <TContext extends CapnpPluginContext = CapnpPluginContext>(options?: CapnpPluginOptions) => Plugin<TContext>;
|
|
32
|
+
|
|
33
|
+
export { CapnpPluginContext, CapnpPluginOptions, plugin as default, plugin };
|
|
@@ -0,0 +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';/*****************************************
|
|
2
|
+
*
|
|
3
|
+
* ⚡ Built by Storm Software
|
|
4
|
+
*
|
|
5
|
+
*****************************************/
|
|
6
|
+
|
|
7
|
+
var s=Object.defineProperty;var p=(n,i)=>s(n,"name",{value:i,configurable:true});const P=p((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"),generatedPath:joinPaths("{builtinPath}","capnp")})}},configResolved(){this.config.capnp.generatedPath=this.config.capnp.generatedPath.replace("{builtinPath}",this.builtinsPath);},async prepare(){const i=await resolveOptions({...this.config.capnp,schemas:this.config.capnp.schema.toString(),projectRoot:this.config.projectRoot,workspaceRoot:this.workspaceConfig.workspaceRoot});if(!i?.schemas?.length){this.log(LogLevelLabel.WARN,"No Cap'n Proto schemas found to compile.");return}const a=await capnpc(i);isParentPath(this.config.capnp.generatedPath,this.builtinsPath)?await Promise.all(Object.entries(a.files).map(async([e,o])=>this.writeBuiltin(o,findFileName(joinPaths(replacePath(this.config.capnp.generatedPath,this.builtinsPath),e),{withExtension:false}),joinPaths(this.config.capnp.generatedPath,e)))):await Promise.all(Object.entries(a.files).map(async([e,o])=>this.fs.writeFile(joinPaths(this.config.capnp.generatedPath,e),o)));}}),"plugin");var A=P;export{A as default,P as plugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var plugin=require('./plugin');Object.keys(plugin).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return plugin[k]}})});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-Bq85MUGy.cjs';
|
|
2
|
+
import '@stryke/capnp/types';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-Bq85MUGy.js';
|
|
2
|
+
import '@stryke/capnp/types';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export*from'./plugin';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import '@stryke/capnp/types';
|
|
2
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-Bq85MUGy.cjs';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import '@stryke/capnp/types';
|
|
2
|
+
export { C as CapnpPluginContext, a as CapnpPluginOptions, c as CapnpPluginResolvedConfig, b as CapnpPluginUserConfig } from '../index-Bq85MUGy.js';
|
|
3
|
+
import '@storm-software/build-tools/types';
|
|
4
|
+
import '@storm-software/config-tools/types';
|
|
5
|
+
import '@storm-software/config/types';
|
|
6
|
+
import '@stryke/types/base';
|
|
7
|
+
import '@stryke/types/configuration';
|
|
8
|
+
import '@stryke/types/file';
|
|
9
|
+
import 'vite';
|
|
10
|
+
import '@stryke/env/get-env-paths';
|
|
11
|
+
import '@stryke/types/package-json';
|
|
12
|
+
import 'jiti';
|
|
13
|
+
import 'oxc-parser';
|
|
14
|
+
import 'semver';
|
|
15
|
+
import 'unplugin';
|
|
16
|
+
import '@stryke/types/tsconfig';
|
|
17
|
+
import 'typescript';
|
|
18
|
+
import '@stryke/json/types';
|
|
19
|
+
import 'memfs';
|
|
20
|
+
import 'node:fs';
|
|
21
|
+
import 'unionfs';
|
|
22
|
+
import '@stryke/types/array';
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-capnp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from Cap'n Proto schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -99,19 +99,19 @@
|
|
|
99
99
|
"files": ["dist/**/*"],
|
|
100
100
|
"keywords": ["capnp", "powerlines", "storm-software", "powerlines-plugin"],
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@stryke/capnp": "^0.12.
|
|
103
|
-
"@stryke/path": "^0.
|
|
102
|
+
"@stryke/capnp": "^0.12.18",
|
|
103
|
+
"@stryke/path": "^0.18.5",
|
|
104
104
|
"@stryke/type-checks": "^0.3.10",
|
|
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.15.0"
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
|
-
"@powerlines/nx": "^0.
|
|
112
|
-
"@powerlines/plugin-plugin": "^0.11.
|
|
113
|
-
"@types/node": "^22.
|
|
111
|
+
"@powerlines/nx": "^0.10.0",
|
|
112
|
+
"@powerlines/plugin-plugin": "^0.11.8",
|
|
113
|
+
"@types/node": "^22.19.0"
|
|
114
114
|
},
|
|
115
115
|
"publishConfig": { "access": "public" },
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "b64f9a9d53b6eb8054c361da347f6623a7ba9e45"
|
|
117
117
|
}
|