@powerlines/plugin-capnp 0.1.256 → 0.1.258
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/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/index.cjs +2 -30
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +37 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +37 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +0 -2
- package/package.json +4 -4
- package/dist/index-BgAdqTbb.d.mts +0 -1
- package/dist/index-CEgs-Dz2.d.cts +0 -1
- package/dist/plugin-BNjIeTe1.d.cts +0 -37
- package/dist/plugin-BNjIeTe1.d.cts.map +0 -1
- package/dist/plugin-C3MaN5jp.mjs +0 -1
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-_k3DBsKW.d.mts +0 -37
- package/dist/plugin-_k3DBsKW.d.mts.map +0 -1
- package/dist/types-CTUnla4x.mjs +0 -1
- package/dist/types-DHkg7xmX.cjs +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
|
|
29
|
+
exports.__toESM = __toESM;
|
package/dist/index.cjs
CHANGED
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
require('./plugin-DHXHjv16.cjs');
|
|
30
|
-
require('./types-DHkg7xmX.cjs');
|
|
2
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
31
3
|
let __stryke_capnp_compile = require("@stryke/capnp/compile");
|
|
32
4
|
let __stryke_capnp_helpers = require("@stryke/capnp/helpers");
|
|
33
5
|
let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
@@ -35,7 +7,7 @@ let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
|
35
7
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
36
8
|
let __stryke_path_replace = require("@stryke/path/replace");
|
|
37
9
|
let defu = require("defu");
|
|
38
|
-
defu = __toESM(defu);
|
|
10
|
+
defu = require_rolldown_runtime.__toESM(defu);
|
|
39
11
|
let powerlines_plugin_utils_paths = require("powerlines/plugin-utils/paths");
|
|
40
12
|
|
|
41
13
|
//#region src/index.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
+
import "./types/index.cjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
+
import "./types/index.mjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { capnpc } from \"@stryke/capnp/compile\";\nimport { resolveOptions } from \"@stryke/capnp/helpers\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n CapnpPluginContext,\n CapnpPluginOptions,\n CapnpPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate Cap'n Proto for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends CapnpPluginContext = CapnpPluginContext\n>(\n options: CapnpPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"capnp\",\n config() {\n return {\n capnp: defu(options, {\n ts: true,\n js: false,\n dts: false,\n tty: true,\n tsconfig: this.tsconfig,\n schema: joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot,\n \"*.capnp\"\n ),\n outputPath: joinPaths(\"{builtinPath}\", \"capnp\")\n })\n } as Partial<CapnpPluginUserConfig>;\n },\n configResolved() {\n this.config.capnp.outputPath = replacePathTokens(\n this,\n this.config.capnp.outputPath\n );\n },\n async prepare() {\n const resolvedOptions = await resolveOptions({\n ...this.config.capnp,\n schemas: this.config.capnp.schema.toString(),\n projectRoot: this.config.projectRoot,\n workspaceRoot: this.workspaceConfig.workspaceRoot\n });\n if (!resolvedOptions?.schemas?.length) {\n this.warn(\"No Cap'n Proto schemas found to compile.\");\n\n return;\n }\n\n const result = await capnpc(resolvedOptions);\n\n if (isParentPath(this.config.capnp.outputPath, this.builtinsPath)) {\n await Promise.all(\n Object.entries(result.files).map(async ([filePath, content]) =>\n this.emitBuiltin(\n content,\n findFileName(\n joinPaths(\n replacePath(this.config.capnp.outputPath, this.builtinsPath),\n filePath\n ),\n { withExtension: false }\n )\n )\n )\n );\n } else {\n await Promise.all(\n Object.entries(result.files).map(async ([filePath, content]) =>\n this.fs.write(\n joinPaths(this.config.capnp.outputPath, filePath),\n content\n )\n )\n );\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { capnpc } from \"@stryke/capnp/compile\";\nimport { resolveOptions } from \"@stryke/capnp/helpers\";\nimport { findFileName } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport { replacePath } from \"@stryke/path/replace\";\nimport defu from \"defu\";\nimport { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n CapnpPluginContext,\n CapnpPluginOptions,\n CapnpPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate Cap'n Proto for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends CapnpPluginContext = CapnpPluginContext\n>(\n options: CapnpPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"capnp\",\n config() {\n return {\n capnp: defu(options, {\n ts: true,\n js: false,\n dts: false,\n tty: true,\n tsconfig: this.tsconfig,\n schema: joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot,\n \"*.capnp\"\n ),\n outputPath: joinPaths(\"{builtinPath}\", \"capnp\")\n })\n } as Partial<CapnpPluginUserConfig>;\n },\n configResolved() {\n this.config.capnp.outputPath = replacePathTokens(\n this,\n this.config.capnp.outputPath\n );\n },\n async prepare() {\n const resolvedOptions = await resolveOptions({\n ...this.config.capnp,\n schemas: this.config.capnp.schema.toString(),\n projectRoot: this.config.projectRoot,\n workspaceRoot: this.workspaceConfig.workspaceRoot\n });\n if (!resolvedOptions?.schemas?.length) {\n this.warn(\"No Cap'n Proto schemas found to compile.\");\n\n return;\n }\n\n const result = await capnpc(resolvedOptions);\n\n if (isParentPath(this.config.capnp.outputPath, this.builtinsPath)) {\n await Promise.all(\n Object.entries(result.files).map(async ([filePath, content]) =>\n this.emitBuiltin(\n content,\n findFileName(\n joinPaths(\n replacePath(this.config.capnp.outputPath, this.builtinsPath),\n filePath\n ),\n { withExtension: false }\n )\n )\n )\n );\n } else {\n await Promise.all(\n Object.entries(result.files).map(async ([filePath, content]) =>\n this.fs.write(\n joinPaths(this.config.capnp.outputPath, filePath),\n content\n )\n )\n );\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;AAyCA,MAAa,UAGX,UAA8B,EAAE,KACX;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,OAAO,KAAK,SAAS;IACnB,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,UAAU,KAAK;IACf,QAAQ,UACN,KAAK,gBAAgB,eACrB,KAAK,OAAO,aACZ,UACD;IACD,YAAY,UAAU,iBAAiB,QAAQ;IAChD,CAAC,EACH;;EAEH,iBAAiB;AACf,QAAK,OAAO,MAAM,aAAa,kBAC7B,MACA,KAAK,OAAO,MAAM,WACnB;;EAEH,MAAM,UAAU;GACd,MAAM,kBAAkB,MAAM,eAAe;IAC3C,GAAG,KAAK,OAAO;IACf,SAAS,KAAK,OAAO,MAAM,OAAO,UAAU;IAC5C,aAAa,KAAK,OAAO;IACzB,eAAe,KAAK,gBAAgB;IACrC,CAAC;AACF,OAAI,CAAC,iBAAiB,SAAS,QAAQ;AACrC,SAAK,KAAK,2CAA2C;AAErD;;GAGF,MAAM,SAAS,MAAM,OAAO,gBAAgB;AAE5C,OAAI,aAAa,KAAK,OAAO,MAAM,YAAY,KAAK,aAAa,CAC/D,OAAM,QAAQ,IACZ,OAAO,QAAQ,OAAO,MAAM,CAAC,IAAI,OAAO,CAAC,UAAU,aACjD,KAAK,YACH,SACA,aACE,UACE,YAAY,KAAK,OAAO,MAAM,YAAY,KAAK,aAAa,EAC5D,SACD,EACD,EAAE,eAAe,OAAO,CACzB,CACF,CACF,CACF;OAED,OAAM,QAAQ,IACZ,OAAO,QAAQ,OAAO,MAAM,CAAC,IAAI,OAAO,CAAC,UAAU,aACjD,KAAK,GAAG,MACN,UAAU,KAAK,OAAO,MAAM,YAAY,SAAS,EACjD,QACD,CACF,CACF;;EAGN;;AAGH,kBAAe"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-CEgs-Dz2.cjs";
|
|
1
|
+
import { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig } from "./plugin.cjs";
|
|
3
2
|
export { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-BgAdqTbb.mjs";
|
|
1
|
+
import { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig } from "./plugin.mjs";
|
|
3
2
|
export { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CapnpcOptions } from "@stryke/capnp/types";
|
|
2
|
+
import { UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { PluginContext } from "powerlines/types/context";
|
|
4
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
+
|
|
6
|
+
//#region src/types/plugin.d.ts
|
|
7
|
+
type CapnpPluginOptions = Partial<Omit<CapnpcOptions, "workspaceRoot" | "projectRoot" | "schemas">> & {
|
|
8
|
+
/**
|
|
9
|
+
* The path to the Cap'n Proto schema file(s).
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue "\{projectRoot\}/schemas/*.capnp"
|
|
12
|
+
*/
|
|
13
|
+
schema?: string | URL;
|
|
14
|
+
/**
|
|
15
|
+
* The path to the output file generated by the plugin.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* If using the default value, the file can be imported from "powerlines:capnp/schema-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue "\{builtinPath\}/capnp"
|
|
21
|
+
*/
|
|
22
|
+
outputPath?: string;
|
|
23
|
+
};
|
|
24
|
+
type CapnpPluginUserConfig = UserConfig & {
|
|
25
|
+
capnp?: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
26
|
+
};
|
|
27
|
+
type CapnpPluginResolvedConfig = ResolvedConfig & {
|
|
28
|
+
capnp: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
29
|
+
};
|
|
30
|
+
type CapnpPluginContext<TResolvedConfig extends CapnpPluginResolvedConfig = CapnpPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
31
|
+
declare type __ΩCapnpPluginOptions = any[];
|
|
32
|
+
declare type __ΩCapnpPluginUserConfig = any[];
|
|
33
|
+
declare type __ΩCapnpPluginResolvedConfig = any[];
|
|
34
|
+
declare type __ΩCapnpPluginContext = any[];
|
|
35
|
+
//#endregion
|
|
36
|
+
export { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig };
|
|
37
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,kBAAA,GAAqB,QAC/B,KAAK;;AADP;;;;EAQoB,MAAA,CAAA,EAAA,MAAA,GAAA,GAAA;EAAG;AAavB;;;;;;;EAEY,UAAA,CAAA,EAAA,MAAA;AAGZ,CAAA;AAAwC,KAL5B,qBAAA,GAAwB,UAKI,GAAA;EAC1B,KAAA,CAAA,EALJ,IAKI,CALC,kBAKD,EAAA,QAAA,GAAA,YAAA,CAAA,GAJV,QAIU,CAJD,IAIC,CAJI,kBAIJ,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAL;AACS,KAFN,yBAAA,GAA4B,cAEtB,GAAA;EAAL,KAAA,EADJ,IACI,CADC,kBACD,EAAA,QAAA,GAAA,YAAA,CAAA,GAAT,QAAS,CAAA,IAAA,CAAK,kBAAL,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAT;AAAQ,KAGA,kBAHA,CAAA,wBAIc,yBAJd,GAI0C,yBAJ1C,CAAA,GAKR,aALQ,CAKM,eALN,CAAA;AAGA,qCAAkB,GAAA,EAAA;AACJ,wCAAA,GAAA,EAAA;AAA4B,4CAAA,GAAA,EAAA;AACpC,qCAAA,GAAA,EAAA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CapnpcOptions } from "@stryke/capnp/types";
|
|
2
|
+
import { UserConfig } from "powerlines/types/config";
|
|
3
|
+
import { PluginContext } from "powerlines/types/context";
|
|
4
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
+
|
|
6
|
+
//#region src/types/plugin.d.ts
|
|
7
|
+
type CapnpPluginOptions = Partial<Omit<CapnpcOptions, "workspaceRoot" | "projectRoot" | "schemas">> & {
|
|
8
|
+
/**
|
|
9
|
+
* The path to the Cap'n Proto schema file(s).
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue "\{projectRoot\}/schemas/*.capnp"
|
|
12
|
+
*/
|
|
13
|
+
schema?: string | URL;
|
|
14
|
+
/**
|
|
15
|
+
* The path to the output file generated by the plugin.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* If using the default value, the file can be imported from "powerlines:capnp/schema-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue "\{builtinPath\}/capnp"
|
|
21
|
+
*/
|
|
22
|
+
outputPath?: string;
|
|
23
|
+
};
|
|
24
|
+
type CapnpPluginUserConfig = UserConfig & {
|
|
25
|
+
capnp?: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
26
|
+
};
|
|
27
|
+
type CapnpPluginResolvedConfig = ResolvedConfig & {
|
|
28
|
+
capnp: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
29
|
+
};
|
|
30
|
+
type CapnpPluginContext<TResolvedConfig extends CapnpPluginResolvedConfig = CapnpPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
31
|
+
declare type __ΩCapnpPluginOptions = any[];
|
|
32
|
+
declare type __ΩCapnpPluginUserConfig = any[];
|
|
33
|
+
declare type __ΩCapnpPluginResolvedConfig = any[];
|
|
34
|
+
declare type __ΩCapnpPluginContext = any[];
|
|
35
|
+
//#endregion
|
|
36
|
+
export { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig };
|
|
37
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,kBAAA,GAAqB,QAC/B,KAAK;;AADP;;;;EAQoB,MAAA,CAAA,EAAA,MAAA,GAAA,GAAA;EAAG;AAavB;;;;;;;EAEY,UAAA,CAAA,EAAA,MAAA;AAGZ,CAAA;AAAwC,KAL5B,qBAAA,GAAwB,UAKI,GAAA;EAC1B,KAAA,CAAA,EALJ,IAKI,CALC,kBAKD,EAAA,QAAA,GAAA,YAAA,CAAA,GAJV,QAIU,CAJD,IAIC,CAJI,kBAIJ,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAL;AACS,KAFN,yBAAA,GAA4B,cAEtB,GAAA;EAAL,KAAA,EADJ,IACI,CADC,kBACD,EAAA,QAAA,GAAA,YAAA,CAAA,GAAT,QAAS,CAAA,IAAA,CAAK,kBAAL,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAT;AAAQ,KAGA,kBAHA,CAAA,wBAIc,yBAJd,GAI0C,yBAJ1C,CAAA,GAKR,aALQ,CAKM,eALN,CAAA;AAGA,qCAAkB,GAAA,EAAA;AACJ,wCAAA,GAAA,EAAA;AAA4B,4CAAA,GAAA,EAAA;AACpC,qCAAA,GAAA,EAAA"}
|
package/dist/types/plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-capnp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.258",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from Cap'n Proto schemas.",
|
|
6
6
|
"repository": {
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
"@stryke/types": "^0.10.37",
|
|
96
96
|
"defu": "^6.1.4",
|
|
97
97
|
"jiti": "^2.6.1",
|
|
98
|
-
"powerlines": "^0.38.
|
|
98
|
+
"powerlines": "^0.38.22"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
101
|
+
"@powerlines/plugin-plugin": "^0.12.206",
|
|
102
102
|
"@types/node": "^24.10.9"
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": { "access": "public" },
|
|
105
105
|
"types": "./dist/index.d.cts",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "02ca3097aeae5f5bb4838b4263e8cf7cc44fa3bd"
|
|
107
107
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CapnpcOptions } from "@stryke/capnp/types";
|
|
2
|
-
import { UserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
type CapnpPluginOptions = Partial<Omit<CapnpcOptions, "workspaceRoot" | "projectRoot" | "schemas">> & {
|
|
8
|
-
/**
|
|
9
|
-
* The path to the Cap'n Proto schema file(s).
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue "\{projectRoot\}/schemas/*.capnp"
|
|
12
|
-
*/
|
|
13
|
-
schema?: string | URL;
|
|
14
|
-
/**
|
|
15
|
-
* The path to the output file generated by the plugin.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* If using the default value, the file can be imported from "powerlines:capnp/schema-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
19
|
-
*
|
|
20
|
-
* @defaultValue "\{builtinPath\}/capnp"
|
|
21
|
-
*/
|
|
22
|
-
outputPath?: string;
|
|
23
|
-
};
|
|
24
|
-
type CapnpPluginUserConfig = UserConfig & {
|
|
25
|
-
capnp?: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
26
|
-
};
|
|
27
|
-
type CapnpPluginResolvedConfig = ResolvedConfig & {
|
|
28
|
-
capnp: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
29
|
-
};
|
|
30
|
-
type CapnpPluginContext<TResolvedConfig extends CapnpPluginResolvedConfig = CapnpPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
31
|
-
declare type __ΩCapnpPluginOptions = any[];
|
|
32
|
-
declare type __ΩCapnpPluginUserConfig = any[];
|
|
33
|
-
declare type __ΩCapnpPluginResolvedConfig = any[];
|
|
34
|
-
declare type __ΩCapnpPluginContext = any[];
|
|
35
|
-
//#endregion
|
|
36
|
-
export { __ΩCapnpPluginContext as a, __ΩCapnpPluginUserConfig as c, CapnpPluginUserConfig as i, CapnpPluginOptions as n, __ΩCapnpPluginOptions as o, CapnpPluginResolvedConfig as r, __ΩCapnpPluginResolvedConfig as s, CapnpPluginContext as t };
|
|
37
|
-
//# sourceMappingURL=plugin-BNjIeTe1.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-BNjIeTe1.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,kBAAA,GAAqB,QAC/B,KAAK;;AADP;;;;EAQoB,MAAA,CAAA,EAAA,MAAA,GAAA,GAAA;EAAG;AAavB;;;;;;;EAEY,UAAA,CAAA,EAAA,MAAA;AAGZ,CAAA;AAAwC,KAL5B,qBAAA,GAAwB,UAKI,GAAA;EAC1B,KAAA,CAAA,EALJ,IAKI,CALC,kBAKD,EAAA,QAAA,GAAA,YAAA,CAAA,GAJV,QAIU,CAJD,IAIC,CAJI,kBAIJ,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAL;AACS,KAFN,yBAAA,GAA4B,cAEtB,GAAA;EAAL,KAAA,EADJ,IACI,CADC,kBACD,EAAA,QAAA,GAAA,YAAA,CAAA,GAAT,QAAS,CAAA,IAAA,CAAK,kBAAL,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAT;AAAQ,KAGA,kBAHA,CAAA,wBAIc,yBAJd,GAI0C,yBAJ1C,CAAA,GAKR,aALQ,CAKM,eALN,CAAA;AAGA,qCAAkB,GAAA,EAAA;AACJ,wCAAA,GAAA,EAAA;AAA4B,4CAAA,GAAA,EAAA;AACpC,qCAAA,GAAA,EAAA"}
|
package/dist/plugin-C3MaN5jp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-DHXHjv16.cjs
DELETED
|
File without changes
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CapnpcOptions } from "@stryke/capnp/types";
|
|
2
|
-
import { UserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
type CapnpPluginOptions = Partial<Omit<CapnpcOptions, "workspaceRoot" | "projectRoot" | "schemas">> & {
|
|
8
|
-
/**
|
|
9
|
-
* The path to the Cap'n Proto schema file(s).
|
|
10
|
-
*
|
|
11
|
-
* @defaultValue "\{projectRoot\}/schemas/*.capnp"
|
|
12
|
-
*/
|
|
13
|
-
schema?: string | URL;
|
|
14
|
-
/**
|
|
15
|
-
* The path to the output file generated by the plugin.
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* If using the default value, the file can be imported from "powerlines:capnp/schema-name". This field allows the use of the "\{builtinPath\}" token to refer to the built-in Powerlines plugins directory - the value will be replaced with the correct file path by the plugin.
|
|
19
|
-
*
|
|
20
|
-
* @defaultValue "\{builtinPath\}/capnp"
|
|
21
|
-
*/
|
|
22
|
-
outputPath?: string;
|
|
23
|
-
};
|
|
24
|
-
type CapnpPluginUserConfig = UserConfig & {
|
|
25
|
-
capnp?: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
26
|
-
};
|
|
27
|
-
type CapnpPluginResolvedConfig = ResolvedConfig & {
|
|
28
|
-
capnp: Omit<CapnpPluginOptions, "schema" | "outputPath"> & Required<Pick<CapnpPluginOptions, "schema" | "outputPath">>;
|
|
29
|
-
};
|
|
30
|
-
type CapnpPluginContext<TResolvedConfig extends CapnpPluginResolvedConfig = CapnpPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
31
|
-
declare type __ΩCapnpPluginOptions = any[];
|
|
32
|
-
declare type __ΩCapnpPluginUserConfig = any[];
|
|
33
|
-
declare type __ΩCapnpPluginResolvedConfig = any[];
|
|
34
|
-
declare type __ΩCapnpPluginContext = any[];
|
|
35
|
-
//#endregion
|
|
36
|
-
export { __ΩCapnpPluginContext as a, __ΩCapnpPluginUserConfig as c, CapnpPluginUserConfig as i, CapnpPluginOptions as n, __ΩCapnpPluginOptions as o, CapnpPluginResolvedConfig as r, __ΩCapnpPluginResolvedConfig as s, CapnpPluginContext as t };
|
|
37
|
-
//# sourceMappingURL=plugin-_k3DBsKW.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-_k3DBsKW.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,kBAAA,GAAqB,QAC/B,KAAK;;AADP;;;;EAQoB,MAAA,CAAA,EAAA,MAAA,GAAA,GAAA;EAAG;AAavB;;;;;;;EAEY,UAAA,CAAA,EAAA,MAAA;AAGZ,CAAA;AAAwC,KAL5B,qBAAA,GAAwB,UAKI,GAAA;EAC1B,KAAA,CAAA,EALJ,IAKI,CALC,kBAKD,EAAA,QAAA,GAAA,YAAA,CAAA,GAJV,QAIU,CAJD,IAIC,CAJI,kBAIJ,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAL;AACS,KAFN,yBAAA,GAA4B,cAEtB,GAAA;EAAL,KAAA,EADJ,IACI,CADC,kBACD,EAAA,QAAA,GAAA,YAAA,CAAA,GAAT,QAAS,CAAA,IAAA,CAAK,kBAAL,EAAA,QAAA,GAAA,YAAA,CAAA,CAAA;CAAT;AAAQ,KAGA,kBAHA,CAAA,wBAIc,yBAJd,GAI0C,yBAJ1C,CAAA,GAKR,aALQ,CAKM,eALN,CAAA;AAGA,qCAAkB,GAAA,EAAA;AACJ,wCAAA,GAAA,EAAA;AAA4B,4CAAA,GAAA,EAAA;AACpC,qCAAA,GAAA,EAAA"}
|
package/dist/types-CTUnla4x.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types-DHkg7xmX.cjs
DELETED
|
File without changes
|