@powerlines/plugin-untyped 0.2.73 → 0.2.75

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 (39) hide show
  1. package/dist/index-BgAdqTbb.d.mts +1 -0
  2. package/dist/index-CEgs-Dz2.d.cts +1 -0
  3. package/dist/index.cjs +36 -2
  4. package/dist/index.d.cts +2 -2
  5. package/dist/index.d.mts +2 -3
  6. package/dist/index.mjs +35 -1
  7. package/dist/plugin-Bzudt0tR.d.mts +1780 -0
  8. package/dist/plugin-C3MaN5jp.mjs +1 -0
  9. package/dist/plugin-DHXHjv16.cjs +0 -0
  10. package/dist/plugin-DjMvTNlg.d.cts +1780 -0
  11. package/dist/types/index.cjs +2 -0
  12. package/dist/types/index.d.cts +2 -1
  13. package/dist/types/index.d.mts +2 -1
  14. package/dist/types/index.mjs +3 -0
  15. package/dist/types/plugin.cjs +1 -0
  16. package/dist/types/plugin.d.cts +1 -35
  17. package/dist/types/plugin.d.mts +1 -35
  18. package/dist/types/plugin.mjs +2 -0
  19. package/dist/types-CTUnla4x.mjs +1 -0
  20. package/dist/types-DHkg7xmX.cjs +0 -0
  21. package/package.json +5 -5
  22. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -35
  23. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
  24. package/dist/powerlines/src/types/build.d.cts +0 -145
  25. package/dist/powerlines/src/types/build.d.mts +0 -145
  26. package/dist/powerlines/src/types/commands.d.cts +0 -8
  27. package/dist/powerlines/src/types/commands.d.mts +0 -8
  28. package/dist/powerlines/src/types/config.d.cts +0 -369
  29. package/dist/powerlines/src/types/config.d.mts +0 -369
  30. package/dist/powerlines/src/types/context.d.cts +0 -403
  31. package/dist/powerlines/src/types/context.d.mts +0 -403
  32. package/dist/powerlines/src/types/fs.d.cts +0 -486
  33. package/dist/powerlines/src/types/fs.d.mts +0 -486
  34. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  35. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  36. package/dist/powerlines/src/types/resolved.d.cts +0 -81
  37. package/dist/powerlines/src/types/resolved.d.mts +0 -81
  38. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  39. 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,8 +1,42 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_paths = require('./powerlines/src/plugin-utils/paths.cjs');
2
+ require('./plugin-DHXHjv16.cjs');
3
+ require('./types-DHkg7xmX.cjs');
3
4
  let __storm_software_untyped_generate = require("@storm-software/untyped/generate");
4
5
  let __stryke_convert_to_array = require("@stryke/convert/to-array");
6
+ let __stryke_path_replace = require("@stryke/path/replace");
5
7
 
8
+ //#region ../powerlines/src/plugin-utils/paths.ts
9
+ /**
10
+ * Replaces tokens in the given path string with their corresponding values from the context.
11
+ *
12
+ * @remarks
13
+ * The following tokens are supported:
14
+ * - `{workspaceRoot}` - The root directory of the workspace.
15
+ * - `{root}` - The root directory of the project (same as `{projectRoot}`).
16
+ * - `{projectRoot}` - The root directory of the project (same as `{root}`).
17
+ * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
18
+ * - `{powerlinesPath}` - The directory where Powerlines is installed.
19
+ * - `{cachePath}` - The environment's directory for cached files.
20
+ * - `{dataPath}` - The environment's directory for data files.
21
+ * - `{logPath}` - The environment's directory for log files.
22
+ * - `{tempPath}` - The environment's directory for temporary files.
23
+ * - `{configPath}` - The environment's directory for configuration files.
24
+ * - `{outputPath}` - The configured output directory for the project.
25
+ * - `{buildPath}` - The configured distribution directory for the project.
26
+ * - `{artifactsPath}` - The configured directory for build artifacts.
27
+ * - `{builtinPath}` - The configured directory for generated built-in plugins.
28
+ * - `{entryPath}` - The configured directory for generated entry files.
29
+ *
30
+ * @param context - The context containing the values for the path tokens.
31
+ * @param path - The path string with tokens to replace.
32
+ * @returns The path string with tokens replaced by their corresponding values from the context.
33
+ */
34
+ function replacePathTokens(context, path) {
35
+ if (!path) return path;
36
+ 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));
37
+ }
38
+
39
+ //#endregion
6
40
  //#region src/index.ts
7
41
  /**
8
42
  * A Powerlines plugin to use Untyped for code generation based on user-defined schemas.
@@ -21,7 +55,7 @@ const plugin = (options = {}) => {
21
55
  },
22
56
  async configResolved() {
23
57
  if (!this.config.untyped.schema) throw new Error("Untyped plugin requires a schema path or glob pattern to be specified in the configuration.");
24
- this.config.untyped.schema = (0, __stryke_convert_to_array.toArray)(this.config.untyped.schema).map((path) => require_paths.replacePathTokens(this, path));
58
+ this.config.untyped.schema = (0, __stryke_convert_to_array.toArray)(this.config.untyped.schema).map((path) => replacePathTokens(this, path));
25
59
  this.untyped = (0, __storm_software_untyped_generate.getGenerateAction)(this.workspaceConfig);
26
60
  },
27
61
  async prepare() {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
- import { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig } from "./types/plugin.cjs";
1
+ import { a as __ΩUntypedPluginContext, c as __ΩUntypedPluginUserConfig, i as UntypedPluginUserConfig, l as Plugin, n as UntypedPluginOptions, o as __ΩUntypedPluginOptions, r as UntypedPluginResolvedConfig, s as __ΩUntypedPluginResolvedConfig, t as UntypedPluginContext } from "./plugin-DjMvTNlg.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 "./powerlines/src/types/plugin.mjs";
2
- import { UntypedPluginContext, UntypedPluginOptions, UntypedPluginResolvedConfig, UntypedPluginUserConfig, __ΩUntypedPluginContext, __ΩUntypedPluginOptions, __ΩUntypedPluginResolvedConfig, __ΩUntypedPluginUserConfig } from "./types/plugin.mjs";
3
- import "./types/index.mjs";
1
+ import { a as __ΩUntypedPluginContext, c as __ΩUntypedPluginUserConfig, i as UntypedPluginUserConfig, l as Plugin, n as UntypedPluginOptions, o as __ΩUntypedPluginOptions, r as UntypedPluginResolvedConfig, s as __ΩUntypedPluginResolvedConfig, t as UntypedPluginContext } from "./plugin-Bzudt0tR.mjs";
2
+ import "./index-BgAdqTbb.mjs";
4
3
 
5
4
  //#region src/index.d.ts
6
5
 
package/dist/index.mjs CHANGED
@@ -1,7 +1,41 @@
1
- import { replacePathTokens } from "./powerlines/src/plugin-utils/paths.mjs";
1
+ import "./plugin-C3MaN5jp.mjs";
2
+ import "./types-CTUnla4x.mjs";
2
3
  import { getGenerateAction } from "@storm-software/untyped/generate";
3
4
  import { toArray } from "@stryke/convert/to-array";
5
+ import { replacePath } from "@stryke/path/replace";
4
6
 
7
+ //#region ../powerlines/src/plugin-utils/paths.ts
8
+ /**
9
+ * Replaces tokens in the given path string with their corresponding values from the context.
10
+ *
11
+ * @remarks
12
+ * The following tokens are supported:
13
+ * - `{workspaceRoot}` - The root directory of the workspace.
14
+ * - `{root}` - The root directory of the project (same as `{projectRoot}`).
15
+ * - `{projectRoot}` - The root directory of the project (same as `{root}`).
16
+ * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
17
+ * - `{powerlinesPath}` - The directory where Powerlines is installed.
18
+ * - `{cachePath}` - The environment's directory for cached files.
19
+ * - `{dataPath}` - The environment's directory for data files.
20
+ * - `{logPath}` - The environment's directory for log files.
21
+ * - `{tempPath}` - The environment's directory for temporary files.
22
+ * - `{configPath}` - The environment's directory for configuration files.
23
+ * - `{outputPath}` - The configured output directory for the project.
24
+ * - `{buildPath}` - The configured distribution directory for the project.
25
+ * - `{artifactsPath}` - The configured directory for build artifacts.
26
+ * - `{builtinPath}` - The configured directory for generated built-in plugins.
27
+ * - `{entryPath}` - The configured directory for generated entry files.
28
+ *
29
+ * @param context - The context containing the values for the path tokens.
30
+ * @param path - The path string with tokens to replace.
31
+ * @returns The path string with tokens replaced by their corresponding values from the context.
32
+ */
33
+ function replacePathTokens(context, path) {
34
+ if (!path) return path;
35
+ 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));
36
+ }
37
+
38
+ //#endregion
5
39
  //#region src/index.ts
6
40
  /**
7
41
  * A Powerlines plugin to use Untyped for code generation based on user-defined schemas.