@powerlines/plugin-capnp 0.1.131 → 0.1.133

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.
Files changed (22) hide show
  1. package/dist/index.cjs +4 -4
  2. package/dist/index.d.mts +1 -2
  3. package/dist/index.mjs +2 -2
  4. package/dist/node_modules/.pnpm/@storm-software_config-tools@1.188.75_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.cjs +16 -0
  5. package/dist/node_modules/.pnpm/@storm-software_config-tools@1.188.75_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.mjs +15 -0
  6. package/dist/{powerlines → packages/powerlines}/src/internal/helpers/hooks.d.mts +0 -2
  7. package/dist/{powerlines → packages/powerlines}/src/types/commands.d.mts +0 -1
  8. package/dist/{powerlines → packages/powerlines}/src/types/config.d.mts +2 -2
  9. package/dist/{powerlines → packages/powerlines}/src/types/unplugin.d.mts +0 -1
  10. package/dist/types/plugin.d.mts +3 -3
  11. package/package.json +4 -5
  12. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
  13. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
  14. package/dist/powerlines/src/types/babel.d.mts +0 -2
  15. /package/dist/{powerlines → packages/powerlines}/src/types/api.d.mts +0 -0
  16. /package/dist/{powerlines → packages/powerlines}/src/types/build.d.mts +0 -0
  17. /package/dist/{powerlines → packages/powerlines}/src/types/context.d.mts +0 -0
  18. /package/dist/{powerlines → packages/powerlines}/src/types/fs.d.mts +0 -0
  19. /package/dist/{powerlines → packages/powerlines}/src/types/hooks.d.mts +0 -0
  20. /package/dist/{powerlines → packages/powerlines}/src/types/plugin.d.mts +0 -0
  21. /package/dist/{powerlines → packages/powerlines}/src/types/resolved.d.mts +0 -0
  22. /package/dist/{powerlines → packages/powerlines}/src/types/tsconfig.d.mts +0 -0
package/dist/index.cjs CHANGED
@@ -1,7 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_paths = require('./powerlines/src/plugin-utils/paths.cjs');
4
- let __storm_software_config_tools_types = require("@storm-software/config-tools/types");
3
+ const require_chunk_POXTJ6GF = require('./node_modules/.pnpm/@storm-software_config-tools@1.188.75_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.cjs');
5
4
  let __stryke_capnp_compile = require("@stryke/capnp/compile");
6
5
  let __stryke_capnp_helpers = require("@stryke/capnp/helpers");
7
6
  let __stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
@@ -10,6 +9,7 @@ let __stryke_path_join_paths = require("@stryke/path/join-paths");
10
9
  let __stryke_path_replace = require("@stryke/path/replace");
11
10
  let defu = require("defu");
12
11
  defu = require_rolldown_runtime.__toESM(defu);
12
+ let powerlines_plugin_utils_paths = require("powerlines/plugin-utils/paths");
13
13
 
14
14
  //#region src/index.ts
15
15
  /**
@@ -33,7 +33,7 @@ const plugin = (options = {}) => {
33
33
  }) };
34
34
  },
35
35
  configResolved() {
36
- this.config.capnp.outputPath = require_paths.replacePathTokens(this, this.config.capnp.outputPath);
36
+ this.config.capnp.outputPath = (0, powerlines_plugin_utils_paths.replacePathTokens)(this, this.config.capnp.outputPath);
37
37
  },
38
38
  async prepare() {
39
39
  const resolvedOptions = await (0, __stryke_capnp_helpers.resolveOptions)({
@@ -43,7 +43,7 @@ const plugin = (options = {}) => {
43
43
  workspaceRoot: this.workspaceConfig.workspaceRoot
44
44
  });
45
45
  if (!resolvedOptions?.schemas?.length) {
46
- this.log(__storm_software_config_tools_types.LogLevelLabel.WARN, "No Cap'n Proto schemas found to compile.");
46
+ this.log(require_chunk_POXTJ6GF.LogLevelLabel.WARN, "No Cap'n Proto schemas found to compile.");
47
47
  return;
48
48
  }
49
49
  const result = await (0, __stryke_capnp_compile.capnpc)(resolvedOptions);
package/dist/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.mjs";
1
+ import { Plugin } from "./packages/powerlines/src/types/plugin.mjs";
2
2
  import { CapnpPluginContext, CapnpPluginOptions, CapnpPluginResolvedConfig, CapnpPluginUserConfig, __ΩCapnpPluginContext, __ΩCapnpPluginOptions, __ΩCapnpPluginResolvedConfig, __ΩCapnpPluginUserConfig } from "./types/plugin.mjs";
3
- import "./types/index.mjs";
4
3
 
5
4
  //#region src/index.d.ts
6
5
 
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { replacePathTokens } from "./powerlines/src/plugin-utils/paths.mjs";
2
- import { LogLevelLabel } from "@storm-software/config-tools/types";
1
+ import { LogLevelLabel } from "./node_modules/.pnpm/@storm-software_config-tools@1.188.75_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.mjs";
3
2
  import { capnpc } from "@stryke/capnp/compile";
4
3
  import { resolveOptions } from "@stryke/capnp/helpers";
5
4
  import { findFileName } from "@stryke/path/file-path-fns";
@@ -7,6 +6,7 @@ import { isParentPath } from "@stryke/path/is-parent-path";
7
6
  import { joinPaths } from "@stryke/path/join-paths";
8
7
  import { replacePath } from "@stryke/path/replace";
9
8
  import defu from "defu";
9
+ import { replacePathTokens } from "powerlines/plugin-utils/paths";
10
10
 
11
11
  //#region src/index.ts
12
12
  /**
@@ -0,0 +1,16 @@
1
+
2
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.188.75_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
3
+ var LogLevelLabel = {
4
+ SILENT: "silent",
5
+ FATAL: "fatal",
6
+ ERROR: "error",
7
+ WARN: "warn",
8
+ SUCCESS: "success",
9
+ INFO: "info",
10
+ DEBUG: "debug",
11
+ TRACE: "trace",
12
+ ALL: "all"
13
+ };
14
+
15
+ //#endregion
16
+ exports.LogLevelLabel = LogLevelLabel;
@@ -0,0 +1,15 @@
1
+ //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.188.75_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
2
+ var LogLevelLabel = {
3
+ SILENT: "silent",
4
+ FATAL: "fatal",
5
+ ERROR: "error",
6
+ WARN: "warn",
7
+ SUCCESS: "success",
8
+ INFO: "info",
9
+ DEBUG: "debug",
10
+ TRACE: "trace",
11
+ ALL: "all"
12
+ };
13
+
14
+ //#endregion
15
+ export { LogLevelLabel };
@@ -1,5 +1,3 @@
1
- import "../../types/hooks.mjs";
2
- import "../../types/resolved.mjs";
3
1
  import { SelectHooksOptions } from "../../types/context.mjs";
4
2
  import { MaybePromise } from "@stryke/types/base";
5
3
 
@@ -1,4 +1,3 @@
1
- import "./context.mjs";
2
1
  import { ArrayValues } from "@stryke/types/array";
3
2
  import { MaybePromise } from "@stryke/types/base";
4
3
 
@@ -1,19 +1,19 @@
1
1
  import { BuildConfig, BuildResolvedConfig, ESBuildBuildConfig, ESBuildResolvedBuildConfig, FarmBuildConfig, FarmResolvedBuildConfig, RolldownBuildConfig, RolldownResolvedBuildConfig, RollupBuildConfig, RollupResolvedBuildConfig, RspackBuildConfig, RspackResolvedBuildConfig, TsdownBuildConfig, TsdownResolvedBuildConfig, TsupBuildConfig, TsupResolvedBuildConfig, UnbuildBuildConfig, UnbuildResolvedBuildConfig, ViteBuildConfig, ViteResolvedBuildConfig, WebpackBuildConfig, WebpackResolvedBuildConfig } from "./build.mjs";
2
- import "./babel.mjs";
3
2
  import { StoragePort, StoragePreset } from "./fs.mjs";
4
3
  import { TSConfig } from "./tsconfig.mjs";
5
4
  import { PluginContext } from "./context.mjs";
6
5
  import { Plugin } from "./plugin.mjs";
7
- import { LogLevelLabel } from "@storm-software/config-tools/types";
8
6
  import { MaybePromise } from "@stryke/types/base";
9
7
  import { PreviewOptions } from "vite";
10
8
  import { Format } from "@storm-software/build-tools/types";
9
+ import { LogLevelLabel } from "@storm-software/config-tools/types";
11
10
  import { StormWorkspaceConfig } from "@storm-software/config/types";
12
11
  import { TypeDefinitionParameter } from "@stryke/types/configuration";
13
12
  import { AssetGlob } from "@stryke/types/file";
14
13
  import { DateString } from "compatx";
15
14
 
16
15
  //#region ../powerlines/src/types/config.d.ts
16
+
17
17
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
18
  /**
19
19
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -1,5 +1,4 @@
1
1
  import { BuilderVariant, InferUnpluginVariant, UnpluginBuilderVariant } from "./build.mjs";
2
- import "./config.mjs";
3
2
  import { InferResolvedConfig } from "./resolved.mjs";
4
3
  import { Context } from "./context.mjs";
5
4
  import { API } from "./api.mjs";
@@ -1,6 +1,6 @@
1
- import { UserConfig } from "../powerlines/src/types/config.mjs";
2
- import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
- import { PluginContext } from "../powerlines/src/types/context.mjs";
1
+ import { UserConfig } from "../packages/powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../packages/powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../packages/powerlines/src/types/context.mjs";
4
4
  import { CapnpcOptions } from "@stryke/capnp/types";
5
5
 
6
6
  //#region src/types/plugin.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-capnp",
3
- "version": "0.1.131",
3
+ "version": "0.1.133",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code from Cap'n Proto schemas.",
6
6
  "repository": {
@@ -123,13 +123,12 @@
123
123
  "@stryke/types": "^0.10.29",
124
124
  "defu": "^6.1.4",
125
125
  "jiti": "^2.6.1",
126
- "powerlines": "^0.37.2"
126
+ "powerlines": "^0.37.4"
127
127
  },
128
128
  "devDependencies": {
129
- "@powerlines/nx": "^0.11.58",
130
- "@powerlines/plugin-plugin": "^0.12.80",
129
+ "@powerlines/plugin-plugin": "^0.12.82",
131
130
  "@types/node": "^24.10.4"
132
131
  },
133
132
  "publishConfig": { "access": "public" },
134
- "gitHead": "5a9bfc9333eca98a453682f39a04a0d642930a50"
133
+ "gitHead": "48a35579bd5535a267a420c160c273899920b2e7"
135
134
  }
@@ -1,36 +0,0 @@
1
- const require_rolldown_runtime = require('../../../_virtual/rolldown_runtime.cjs');
2
- let __stryke_path_replace = require("@stryke/path/replace");
3
-
4
- //#region ../powerlines/src/plugin-utils/paths.ts
5
- /**
6
- * Replaces tokens in the given path string with their corresponding values from the context.
7
- *
8
- * @remarks
9
- * The following tokens are supported:
10
- * - `{workspaceRoot}` - The root directory of the workspace.
11
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
12
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
13
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
14
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
15
- * - `{cachePath}` - The environment's directory for cached files.
16
- * - `{dataPath}` - The environment's directory for data files.
17
- * - `{logPath}` - The environment's directory for log files.
18
- * - `{tempPath}` - The environment's directory for temporary files.
19
- * - `{configPath}` - The environment's directory for configuration files.
20
- * - `{outputPath}` - The configured output directory for the project.
21
- * - `{buildPath}` - The configured distribution directory for the project.
22
- * - `{artifactsPath}` - The configured directory for build artifacts.
23
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
24
- * - `{entryPath}` - The configured directory for generated entry files.
25
- *
26
- * @param context - The context containing the values for the path tokens.
27
- * @param path - The path string with tokens to replace.
28
- * @returns The path string with tokens replaced by their corresponding values from the context.
29
- */
30
- function replacePathTokens(context, path) {
31
- if (!path) return path;
32
- 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));
33
- }
34
-
35
- //#endregion
36
- exports.replacePathTokens = replacePathTokens;
@@ -1,35 +0,0 @@
1
- import { replacePath } from "@stryke/path/replace";
2
-
3
- //#region ../powerlines/src/plugin-utils/paths.ts
4
- /**
5
- * Replaces tokens in the given path string with their corresponding values from the context.
6
- *
7
- * @remarks
8
- * The following tokens are supported:
9
- * - `{workspaceRoot}` - The root directory of the workspace.
10
- * - `{root}` - The root directory of the project (same as `{projectRoot}`).
11
- * - `{projectRoot}` - The root directory of the project (same as `{root}`).
12
- * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
13
- * - `{powerlinesPath}` - The directory where Powerlines is installed.
14
- * - `{cachePath}` - The environment's directory for cached files.
15
- * - `{dataPath}` - The environment's directory for data files.
16
- * - `{logPath}` - The environment's directory for log files.
17
- * - `{tempPath}` - The environment's directory for temporary files.
18
- * - `{configPath}` - The environment's directory for configuration files.
19
- * - `{outputPath}` - The configured output directory for the project.
20
- * - `{buildPath}` - The configured distribution directory for the project.
21
- * - `{artifactsPath}` - The configured directory for build artifacts.
22
- * - `{builtinPath}` - The configured directory for generated built-in plugins.
23
- * - `{entryPath}` - The configured directory for generated entry files.
24
- *
25
- * @param context - The context containing the values for the path tokens.
26
- * @param path - The path string with tokens to replace.
27
- * @returns The path string with tokens replaced by their corresponding values from the context.
28
- */
29
- function replacePathTokens(context, path) {
30
- if (!path) return path;
31
- 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));
32
- }
33
-
34
- //#endregion
35
- export { replacePathTokens };
@@ -1,2 +0,0 @@
1
- import "./config.mjs";
2
- import "./context.mjs";