@powerlines/plugin-capnp 0.1.124 → 0.1.125
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-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +63 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +34 -1
- package/dist/plugin-4KG6imcA.d.mts +1780 -0
- package/dist/plugin-BFkAulzn.d.cts +1780 -0
- package/dist/plugin-C3MaN5jp.mjs +1 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -35
- package/dist/types/plugin.d.mts +1 -35
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CTUnla4x.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +3 -3
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
- package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
- package/dist/powerlines/src/types/babel.d.mts +0 -2
- package/dist/powerlines/src/types/build.d.cts +0 -145
- package/dist/powerlines/src/types/build.d.mts +0 -145
- package/dist/powerlines/src/types/commands.d.cts +0 -8
- package/dist/powerlines/src/types/commands.d.mts +0 -9
- package/dist/powerlines/src/types/config.d.cts +0 -369
- package/dist/powerlines/src/types/config.d.mts +0 -369
- package/dist/powerlines/src/types/context.d.cts +0 -403
- package/dist/powerlines/src/types/context.d.mts +0 -405
- package/dist/powerlines/src/types/fs.d.cts +0 -486
- package/dist/powerlines/src/types/fs.d.mts +0 -486
- package/dist/powerlines/src/types/hooks.d.mts +0 -2
- package/dist/powerlines/src/types/plugin.d.cts +0 -231
- package/dist/powerlines/src/types/plugin.d.mts +0 -231
- package/dist/powerlines/src/types/resolved.d.cts +0 -81
- package/dist/powerlines/src/types/resolved.d.mts +0 -81
- package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
- package/dist/powerlines/src/types/tsconfig.d.mts +0 -69
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
//#region rolldown:runtime
|
|
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');
|
|
4
31
|
let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
|
|
5
32
|
let __stryke_capnp_compile = require("@stryke/capnp/compile");
|
|
6
33
|
let __stryke_capnp_helpers = require("@stryke/capnp/helpers");
|
|
@@ -9,8 +36,40 @@ let __stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
|
9
36
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
10
37
|
let __stryke_path_replace = require("@stryke/path/replace");
|
|
11
38
|
let defu = require("defu");
|
|
12
|
-
defu =
|
|
39
|
+
defu = __toESM(defu);
|
|
13
40
|
|
|
41
|
+
//#region ../powerlines/src/plugin-utils/paths.ts
|
|
42
|
+
/**
|
|
43
|
+
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* The following tokens are supported:
|
|
47
|
+
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
48
|
+
* - `{root}` - The root directory of the project (same as `{projectRoot}`).
|
|
49
|
+
* - `{projectRoot}` - The root directory of the project (same as `{root}`).
|
|
50
|
+
* - `{sourceRoot}` - The source root directory of the project (usually `./src`).
|
|
51
|
+
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
52
|
+
* - `{cachePath}` - The environment's directory for cached files.
|
|
53
|
+
* - `{dataPath}` - The environment's directory for data files.
|
|
54
|
+
* - `{logPath}` - The environment's directory for log files.
|
|
55
|
+
* - `{tempPath}` - The environment's directory for temporary files.
|
|
56
|
+
* - `{configPath}` - The environment's directory for configuration files.
|
|
57
|
+
* - `{outputPath}` - The configured output directory for the project.
|
|
58
|
+
* - `{buildPath}` - The configured distribution directory for the project.
|
|
59
|
+
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
60
|
+
* - `{builtinPath}` - The configured directory for generated built-in plugins.
|
|
61
|
+
* - `{entryPath}` - The configured directory for generated entry files.
|
|
62
|
+
*
|
|
63
|
+
* @param context - The context containing the values for the path tokens.
|
|
64
|
+
* @param path - The path string with tokens to replace.
|
|
65
|
+
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
66
|
+
*/
|
|
67
|
+
function replacePathTokens(context, path) {
|
|
68
|
+
if (!path) return path;
|
|
69
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", (0, __stryke_path_replace.replacePath)(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", (0, __stryke_path_replace.replacePath)(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", (0, __stryke_path_replace.replacePath)(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//#endregion
|
|
14
73
|
//#region src/index.ts
|
|
15
74
|
/**
|
|
16
75
|
* A Powerlines plugin to integrate Cap'n Proto for code generation.
|
|
@@ -33,7 +92,7 @@ const plugin = (options = {}) => {
|
|
|
33
92
|
}) };
|
|
34
93
|
},
|
|
35
94
|
configResolved() {
|
|
36
|
-
this.config.capnp.outputPath =
|
|
95
|
+
this.config.capnp.outputPath = replacePathTokens(this, this.config.capnp.outputPath);
|
|
37
96
|
},
|
|
38
97
|
async prepare() {
|
|
39
98
|
const resolvedOptions = await (0, __stryke_capnp_helpers.resolveOptions)({
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Plugin } from "./
|
|
2
|
-
import
|
|
1
|
+
import { a as __ΩCapnpPluginContext, c as __ΩCapnpPluginUserConfig, i as CapnpPluginUserConfig, l as Plugin, n as CapnpPluginOptions, o as __ΩCapnpPluginOptions, r as CapnpPluginResolvedConfig, s as __ΩCapnpPluginResolvedConfig, t as CapnpPluginContext } from "./plugin-BFkAulzn.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/index.d.ts
|
|
5
5
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Plugin } from "./
|
|
2
|
-
import
|
|
3
|
-
import "./types/index.mjs";
|
|
1
|
+
import { a as __ΩCapnpPluginContext, c as __ΩCapnpPluginUserConfig, i as CapnpPluginUserConfig, l as Plugin, n as CapnpPluginOptions, o as __ΩCapnpPluginOptions, r as CapnpPluginResolvedConfig, s as __ΩCapnpPluginResolvedConfig, t as CapnpPluginContext } from "./plugin-4KG6imcA.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
4
3
|
|
|
5
4
|
//#region src/index.d.ts
|
|
6
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./plugin-C3MaN5jp.mjs";
|
|
2
|
+
import "./types-CTUnla4x.mjs";
|
|
2
3
|
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
3
4
|
import { capnpc } from "@stryke/capnp/compile";
|
|
4
5
|
import { resolveOptions } from "@stryke/capnp/helpers";
|
|
@@ -8,6 +9,38 @@ import { joinPaths } from "@stryke/path/join-paths";
|
|
|
8
9
|
import { replacePath } from "@stryke/path/replace";
|
|
9
10
|
import defu from "defu";
|
|
10
11
|
|
|
12
|
+
//#region ../powerlines/src/plugin-utils/paths.ts
|
|
13
|
+
/**
|
|
14
|
+
* Replaces tokens in the given path string with their corresponding values from the context.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* The following tokens are supported:
|
|
18
|
+
* - `{workspaceRoot}` - The root directory of the workspace.
|
|
19
|
+
* - `{root}` - The root directory of the project (same as `{projectRoot}`).
|
|
20
|
+
* - `{projectRoot}` - The root directory of the project (same as `{root}`).
|
|
21
|
+
* - `{sourceRoot}` - The source root directory of the project (usually `./src`).
|
|
22
|
+
* - `{powerlinesPath}` - The directory where Powerlines is installed.
|
|
23
|
+
* - `{cachePath}` - The environment's directory for cached files.
|
|
24
|
+
* - `{dataPath}` - The environment's directory for data files.
|
|
25
|
+
* - `{logPath}` - The environment's directory for log files.
|
|
26
|
+
* - `{tempPath}` - The environment's directory for temporary files.
|
|
27
|
+
* - `{configPath}` - The environment's directory for configuration files.
|
|
28
|
+
* - `{outputPath}` - The configured output directory for the project.
|
|
29
|
+
* - `{buildPath}` - The configured distribution directory for the project.
|
|
30
|
+
* - `{artifactsPath}` - The configured directory for build artifacts.
|
|
31
|
+
* - `{builtinPath}` - The configured directory for generated built-in plugins.
|
|
32
|
+
* - `{entryPath}` - The configured directory for generated entry files.
|
|
33
|
+
*
|
|
34
|
+
* @param context - The context containing the values for the path tokens.
|
|
35
|
+
* @param path - The path string with tokens to replace.
|
|
36
|
+
* @returns The path string with tokens replaced by their corresponding values from the context.
|
|
37
|
+
*/
|
|
38
|
+
function replacePathTokens(context, path) {
|
|
39
|
+
if (!path) return path;
|
|
40
|
+
return path.replaceAll("{workspaceRoot}", context.workspaceConfig.workspaceRoot).replaceAll("{root}", context.config.projectRoot).replaceAll("{projectRoot}", context.config.projectRoot).replaceAll("{sourceRoot}", context.config.sourceRoot).replaceAll("{powerlinesPath}", context.powerlinesPath).replaceAll("{cachePath}", context.cachePath).replaceAll("{dataPath}", context.dataPath).replaceAll("{logPath}", context.envPaths.log).replaceAll("{tempPath}", context.envPaths.temp).replaceAll("{configPath}", context.envPaths.config).replaceAll("{outputPath}", context.config.output.outputPath).replaceAll("{buildPath}", context.config.output.buildPath).replaceAll("{artifactsPath}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
11
44
|
//#region src/index.ts
|
|
12
45
|
/**
|
|
13
46
|
* A Powerlines plugin to integrate Cap'n Proto for code generation.
|