@powerlines/plugin-openapi 0.2.125 → 0.2.127

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 (40) 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 +65 -5
  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-C3MaN5jp.mjs +1 -0
  8. package/dist/plugin-DHXHjv16.cjs +0 -0
  9. package/dist/plugin-V7q1MpoG.d.cts +1785 -0
  10. package/dist/plugin-tUPuksde.d.mts +1785 -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 -40
  17. package/dist/types/plugin.d.mts +1 -40
  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/_virtual/rolldown_runtime.cjs +0 -29
  23. package/dist/powerlines/src/plugin-utils/paths.cjs +0 -36
  24. package/dist/powerlines/src/plugin-utils/paths.mjs +0 -35
  25. package/dist/powerlines/src/types/build.d.cts +0 -145
  26. package/dist/powerlines/src/types/build.d.mts +0 -145
  27. package/dist/powerlines/src/types/commands.d.cts +0 -8
  28. package/dist/powerlines/src/types/commands.d.mts +0 -8
  29. package/dist/powerlines/src/types/config.d.cts +0 -369
  30. package/dist/powerlines/src/types/config.d.mts +0 -369
  31. package/dist/powerlines/src/types/context.d.cts +0 -403
  32. package/dist/powerlines/src/types/context.d.mts +0 -403
  33. package/dist/powerlines/src/types/fs.d.cts +0 -486
  34. package/dist/powerlines/src/types/fs.d.mts +0 -486
  35. package/dist/powerlines/src/types/plugin.d.cts +0 -231
  36. package/dist/powerlines/src/types/plugin.d.mts +0 -231
  37. package/dist/powerlines/src/types/resolved.d.cts +0 -81
  38. package/dist/powerlines/src/types/resolved.d.mts +0 -81
  39. package/dist/powerlines/src/types/tsconfig.d.cts +0 -69
  40. 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,12 +1,72 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_paths = require('./powerlines/src/plugin-utils/paths.cjs');
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 __stryke_path_join_paths = require("@stryke/path/join-paths");
5
32
  let defu = require("defu");
6
- defu = require_rolldown_runtime.__toESM(defu);
33
+ defu = __toESM(defu);
7
34
  let openapi_typescript = require("openapi-typescript");
8
- openapi_typescript = require_rolldown_runtime.__toESM(openapi_typescript);
35
+ openapi_typescript = __toESM(openapi_typescript);
36
+ let __stryke_path_replace = require("@stryke/path/replace");
37
+
38
+ //#region ../powerlines/src/plugin-utils/paths.ts
39
+ /**
40
+ * Replaces tokens in the given path string with their corresponding values from the context.
41
+ *
42
+ * @remarks
43
+ * The following tokens are supported:
44
+ * - `{workspaceRoot}` - The root directory of the workspace.
45
+ * - `{root}` - The root directory of the project (same as `{projectRoot}`).
46
+ * - `{projectRoot}` - The root directory of the project (same as `{root}`).
47
+ * - `{sourceRoot}` - The source root directory of the project (usually `./src`).
48
+ * - `{powerlinesPath}` - The directory where Powerlines is installed.
49
+ * - `{cachePath}` - The environment's directory for cached files.
50
+ * - `{dataPath}` - The environment's directory for data files.
51
+ * - `{logPath}` - The environment's directory for log files.
52
+ * - `{tempPath}` - The environment's directory for temporary files.
53
+ * - `{configPath}` - The environment's directory for configuration files.
54
+ * - `{outputPath}` - The configured output directory for the project.
55
+ * - `{buildPath}` - The configured distribution directory for the project.
56
+ * - `{artifactsPath}` - The configured directory for build artifacts.
57
+ * - `{builtinPath}` - The configured directory for generated built-in plugins.
58
+ * - `{entryPath}` - The configured directory for generated entry files.
59
+ *
60
+ * @param context - The context containing the values for the path tokens.
61
+ * @param path - The path string with tokens to replace.
62
+ * @returns The path string with tokens replaced by their corresponding values from the context.
63
+ */
64
+ function replacePathTokens(context, path) {
65
+ if (!path) return path;
66
+ 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));
67
+ }
9
68
 
69
+ //#endregion
10
70
  //#region src/index.ts
11
71
  /**
12
72
  * A Powerlines plugin to integrate OpenAPI for code generation.
@@ -26,7 +86,7 @@ const plugin = (options = {}) => {
26
86
  }) };
27
87
  },
28
88
  async configResolved() {
29
- this.config.openapi.outputPath = require_paths.replacePathTokens(this, this.config.openapi.outputPath);
89
+ this.config.openapi.outputPath = replacePathTokens(this, this.config.openapi.outputPath);
30
90
  },
31
91
  async prepare() {
32
92
  const ast = await (0, openapi_typescript.default)(this.config.openapi.schema, this.config.openapi);
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { Plugin } from "./powerlines/src/types/plugin.cjs";
2
- import { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig } from "./types/plugin.cjs";
1
+ import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, l as Plugin, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "./plugin-V7q1MpoG.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 { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig } from "./types/plugin.mjs";
3
- import "./types/index.mjs";
1
+ import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, l as Plugin, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "./plugin-tUPuksde.mjs";
2
+ import "./index-BgAdqTbb.mjs";
4
3
 
5
4
  //#region src/index.d.ts
6
5
 
package/dist/index.mjs CHANGED
@@ -1,8 +1,42 @@
1
- import { replacePathTokens } from "./powerlines/src/plugin-utils/paths.mjs";
1
+ import "./plugin-C3MaN5jp.mjs";
2
+ import "./types-CTUnla4x.mjs";
2
3
  import { joinPaths } from "@stryke/path/join-paths";
3
4
  import defu from "defu";
4
5
  import openapiTS, { astToString } from "openapi-typescript";
6
+ import { replacePath } from "@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}", replacePath(context.artifactsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{builtinPath}", replacePath(context.builtinsPath, context.workspaceConfig.workspaceRoot)).replaceAll("{entryPath}", replacePath(context.entryPath, context.workspaceConfig.workspaceRoot));
37
+ }
38
+
39
+ //#endregion
6
40
  //#region src/index.ts
7
41
  /**
8
42
  * A Powerlines plugin to integrate OpenAPI for code generation.
@@ -0,0 +1 @@
1
+ export { };
File without changes