@powerlines/plugin-hey-api 0.1.77 → 0.1.79

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 (56) hide show
  1. package/dist/_virtual/rolldown_runtime.cjs +29 -0
  2. package/dist/helpers/create-operation-id.cjs +15 -2
  3. package/dist/helpers/create-operation-id.d.cts +9 -1
  4. package/dist/helpers/create-operation-id.d.mts +9 -1
  5. package/dist/helpers/create-operation-id.mjs +13 -1
  6. package/dist/helpers/index.cjs +2 -3
  7. package/dist/helpers/index.d.cts +1 -2
  8. package/dist/helpers/index.d.mts +1 -2
  9. package/dist/helpers/index.mjs +1 -2
  10. package/dist/index.cjs +8 -69
  11. package/dist/index.d.cts +3 -4
  12. package/dist/index.d.mts +4 -4
  13. package/dist/index.mjs +3 -37
  14. package/dist/powerlines/src/plugin-utils/paths.cjs +36 -0
  15. package/dist/powerlines/src/plugin-utils/paths.mjs +35 -0
  16. package/dist/powerlines/src/types/build.d.cts +145 -0
  17. package/dist/powerlines/src/types/build.d.mts +145 -0
  18. package/dist/powerlines/src/types/commands.d.cts +8 -0
  19. package/dist/powerlines/src/types/commands.d.mts +8 -0
  20. package/dist/powerlines/src/types/config.d.cts +376 -0
  21. package/dist/powerlines/src/types/config.d.mts +376 -0
  22. package/dist/powerlines/src/types/context.d.cts +403 -0
  23. package/dist/powerlines/src/types/context.d.mts +403 -0
  24. package/dist/powerlines/src/types/fs.d.cts +486 -0
  25. package/dist/powerlines/src/types/fs.d.mts +486 -0
  26. package/dist/powerlines/src/types/plugin.d.cts +231 -0
  27. package/dist/powerlines/src/types/plugin.d.mts +231 -0
  28. package/dist/powerlines/src/types/resolved.d.cts +81 -0
  29. package/dist/powerlines/src/types/resolved.d.mts +81 -0
  30. package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
  31. package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
  32. package/dist/types/index.cjs +0 -2
  33. package/dist/types/index.d.cts +1 -2
  34. package/dist/types/index.d.mts +1 -2
  35. package/dist/types/index.mjs +0 -3
  36. package/dist/types/plugin.cjs +0 -1
  37. package/dist/types/plugin.d.cts +47 -1
  38. package/dist/types/plugin.d.mts +47 -1
  39. package/dist/types/plugin.mjs +0 -2
  40. package/package.json +5 -5
  41. package/dist/create-operation-id-CdT_cWku.mjs +0 -15
  42. package/dist/create-operation-id-Cw-sRmUe.cjs +0 -21
  43. package/dist/create-operation-id-DDMlsM4b.d.cts +0 -10
  44. package/dist/create-operation-id-_82tqUNg.d.mts +0 -10
  45. package/dist/helpers-B15z10jN.mjs +0 -1
  46. package/dist/helpers-LF26RHol.cjs +0 -0
  47. package/dist/index-9iG2qHLe.d.mts +0 -1
  48. package/dist/index-D-CYNcT9.d.mts +0 -1
  49. package/dist/index-D4ELpJXS.d.cts +0 -1
  50. package/dist/index-DLoAMD9J.d.cts +0 -1
  51. package/dist/plugin-BBlElEDP.d.cts +0 -1799
  52. package/dist/plugin-D2RY8Iix.d.mts +0 -1799
  53. package/dist/plugin-ifZVa20V.mjs +0 -1
  54. package/dist/plugin-pBKbb5K9.cjs +0 -0
  55. package/dist/types-U3zd8PTP.mjs +0 -1
  56. package/dist/types-o3zWarRp.cjs +0 -0
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -0,0 +1,69 @@
1
+ import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
2
+ import ts from "typescript";
3
+
4
+ //#region ../powerlines/src/types/tsconfig.d.ts
5
+ type ReflectionMode = "default" | "explicit" | "never";
6
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
7
+ /**
8
+ * Defines the level of reflection to be used during the transpilation process.
9
+ *
10
+ * @remarks
11
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
12
+ * - `minimal` - Only the essential type information is captured.
13
+ * - `normal` - Additional type information is captured, including some contextual data.
14
+ * - `verbose` - All available type information is captured, including detailed contextual data.
15
+ */
16
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
17
+ interface DeepkitOptions {
18
+ /**
19
+ * Either true to activate reflection for all files compiled using this tsconfig,
20
+ * or a list of globs/file paths relative to this tsconfig.json.
21
+ * Globs/file paths can be prefixed with a ! to exclude them.
22
+ */
23
+ reflection?: RawReflectionMode;
24
+ /**
25
+ * Defines the level of reflection to be used during the transpilation process.
26
+ *
27
+ * @remarks
28
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
29
+ * - `minimal` - Only the essential type information is captured.
30
+ * - `normal` - Additional type information is captured, including some contextual data.
31
+ * - `verbose` - All available type information is captured, including detailed contextual data.
32
+ */
33
+ reflectionLevel?: ReflectionLevel;
34
+ }
35
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
36
+ /**
37
+ * The TypeScript compiler configuration.
38
+ *
39
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
40
+ */
41
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
42
+ /**
43
+ * Either true to activate reflection for all files compiled using this tsconfig,
44
+ * or a list of globs/file paths relative to this tsconfig.json.
45
+ * Globs/file paths can be prefixed with a ! to exclude them.
46
+ */
47
+ reflection?: RawReflectionMode;
48
+ /**
49
+ * Defines the level of reflection to be used during the transpilation process.
50
+ *
51
+ * @remarks
52
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
53
+ * - `minimal` - Only the essential type information is captured.
54
+ * - `normal` - Additional type information is captured, including some contextual data.
55
+ * - `verbose` - All available type information is captured, including detailed contextual data.
56
+ */
57
+ reflectionLevel?: ReflectionLevel;
58
+ /**
59
+ * Instructs the TypeScript compiler how to compile `.ts` files.
60
+ */
61
+ compilerOptions?: TSCompilerOptions;
62
+ }
63
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
64
+ originalTsconfigJson: TsConfigJson;
65
+ tsconfigJson: TSConfig;
66
+ tsconfigFilePath: string;
67
+ };
68
+ //#endregion
69
+ export { ParsedTypeScriptConfig, TSConfig };
@@ -1,2 +0,0 @@
1
- require('../plugin-pBKbb5K9.cjs');
2
- require('../types-o3zWarRp.cjs');
@@ -1,3 +1,2 @@
1
- import { a as HeyAPIPluginUserConfig, c as __ΩHeyAPIPluginOutputOptions, i as HeyAPIPluginResolvedConfig, l as __ΩHeyAPIPluginResolvedConfig, n as HeyAPIPluginOptions, o as __ΩHeyAPIPluginContext, r as HeyAPIPluginOutputOptions, s as __ΩHeyAPIPluginOptions, t as HeyAPIPluginContext, u as __ΩHeyAPIPluginUserConfig } from "../plugin-BBlElEDP.cjs";
2
- import "../index-D4ELpJXS.cjs";
1
+ import { HeyAPIPluginContext, HeyAPIPluginOptions, HeyAPIPluginOutputOptions, HeyAPIPluginResolvedConfig, HeyAPIPluginUserConfig, __ΩHeyAPIPluginContext, __ΩHeyAPIPluginOptions, __ΩHeyAPIPluginOutputOptions, __ΩHeyAPIPluginResolvedConfig, __ΩHeyAPIPluginUserConfig } from "./plugin.cjs";
3
2
  export { HeyAPIPluginContext, HeyAPIPluginOptions, HeyAPIPluginOutputOptions, HeyAPIPluginResolvedConfig, HeyAPIPluginUserConfig, __ΩHeyAPIPluginContext, __ΩHeyAPIPluginOptions, __ΩHeyAPIPluginOutputOptions, __ΩHeyAPIPluginResolvedConfig, __ΩHeyAPIPluginUserConfig };
@@ -1,3 +1,2 @@
1
- import { a as HeyAPIPluginUserConfig, c as __ΩHeyAPIPluginOutputOptions, i as HeyAPIPluginResolvedConfig, l as __ΩHeyAPIPluginResolvedConfig, n as HeyAPIPluginOptions, o as __ΩHeyAPIPluginContext, r as HeyAPIPluginOutputOptions, s as __ΩHeyAPIPluginOptions, t as HeyAPIPluginContext, u as __ΩHeyAPIPluginUserConfig } from "../plugin-D2RY8Iix.mjs";
2
- import "../index-9iG2qHLe.mjs";
1
+ import { HeyAPIPluginContext, HeyAPIPluginOptions, HeyAPIPluginOutputOptions, HeyAPIPluginResolvedConfig, HeyAPIPluginUserConfig, __ΩHeyAPIPluginContext, __ΩHeyAPIPluginOptions, __ΩHeyAPIPluginOutputOptions, __ΩHeyAPIPluginResolvedConfig, __ΩHeyAPIPluginUserConfig } from "./plugin.mjs";
3
2
  export { HeyAPIPluginContext, HeyAPIPluginOptions, HeyAPIPluginOutputOptions, HeyAPIPluginResolvedConfig, HeyAPIPluginUserConfig, __ΩHeyAPIPluginContext, __ΩHeyAPIPluginOptions, __ΩHeyAPIPluginOutputOptions, __ΩHeyAPIPluginResolvedConfig, __ΩHeyAPIPluginUserConfig };
@@ -1,4 +1 @@
1
- import "../plugin-ifZVa20V.mjs";
2
- import "../types-U3zd8PTP.mjs";
3
-
4
1
  export { };
@@ -1 +0,0 @@
1
- require('../plugin-pBKbb5K9.cjs');
@@ -1,2 +1,48 @@
1
- import { a as HeyAPIPluginUserConfig, c as __ΩHeyAPIPluginOutputOptions, i as HeyAPIPluginResolvedConfig, l as __ΩHeyAPIPluginResolvedConfig, n as HeyAPIPluginOptions, o as __ΩHeyAPIPluginContext, r as HeyAPIPluginOutputOptions, s as __ΩHeyAPIPluginOptions, t as HeyAPIPluginContext, u as __ΩHeyAPIPluginUserConfig } from "../plugin-BBlElEDP.cjs";
1
+ import { UserConfig as UserConfig$1 } from "../powerlines/src/types/config.cjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.cjs";
4
+ import { OpenApi, UserConfig } from "@hey-api/openapi-ts";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ type HeyAPIPluginOutputOptions = UserConfig["output"] & {
8
+ /**
9
+ * The path to the output file generated by the plugin.
10
+ *
11
+ * @remarks
12
+ * If using the default value, the file can be imported from "powerlines:api". 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.
13
+ *
14
+ * @defaultValue "\{builtinPath\}/api"
15
+ */
16
+ path?: string;
17
+ };
18
+ type HeyAPIPluginOptions = Omit<UserConfig, "input" | "output"> & {
19
+ /**
20
+ * The path to the Hey API schema file.
21
+ *
22
+ * @remarks
23
+ * This can be a string path, URL, HeyAPI3 object, Buffer, or Readable stream.
24
+ *
25
+ * @defaultValue "\{projectRoot\}/schema.yaml"
26
+ */
27
+ schema?: UserConfig["input"];
28
+ /**
29
+ * The output details of the Hey API generation
30
+ */
31
+ output?: HeyAPIPluginOutputOptions;
32
+ };
33
+ type HeyAPIPluginUserConfig = UserConfig$1 & {
34
+ heyApi?: HeyAPIPluginOptions;
35
+ };
36
+ type HeyAPIPluginResolvedConfig = ResolvedConfig & {
37
+ heyApi: Omit<HeyAPIPluginOptions, "schema"> & {
38
+ schema: HeyAPIPluginOptions["schema"] | OpenApi.V3_0_X;
39
+ };
40
+ };
41
+ type HeyAPIPluginContext<TResolvedConfig extends HeyAPIPluginResolvedConfig = HeyAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
42
+ declare type __ΩHeyAPIPluginOutputOptions = any[];
43
+ declare type __ΩHeyAPIPluginOptions = any[];
44
+ declare type __ΩHeyAPIPluginUserConfig = any[];
45
+ declare type __ΩHeyAPIPluginResolvedConfig = any[];
46
+ declare type __ΩHeyAPIPluginContext = any[];
47
+ //#endregion
2
48
  export { HeyAPIPluginContext, HeyAPIPluginOptions, HeyAPIPluginOutputOptions, HeyAPIPluginResolvedConfig, HeyAPIPluginUserConfig, __ΩHeyAPIPluginContext, __ΩHeyAPIPluginOptions, __ΩHeyAPIPluginOutputOptions, __ΩHeyAPIPluginResolvedConfig, __ΩHeyAPIPluginUserConfig };
@@ -1,2 +1,48 @@
1
- import { a as HeyAPIPluginUserConfig, c as __ΩHeyAPIPluginOutputOptions, i as HeyAPIPluginResolvedConfig, l as __ΩHeyAPIPluginResolvedConfig, n as HeyAPIPluginOptions, o as __ΩHeyAPIPluginContext, r as HeyAPIPluginOutputOptions, s as __ΩHeyAPIPluginOptions, t as HeyAPIPluginContext, u as __ΩHeyAPIPluginUserConfig } from "../plugin-D2RY8Iix.mjs";
1
+ import { UserConfig as UserConfig$1 } from "../powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.mjs";
4
+ import { OpenApi, UserConfig } from "@hey-api/openapi-ts";
5
+
6
+ //#region src/types/plugin.d.ts
7
+ type HeyAPIPluginOutputOptions = UserConfig["output"] & {
8
+ /**
9
+ * The path to the output file generated by the plugin.
10
+ *
11
+ * @remarks
12
+ * If using the default value, the file can be imported from "powerlines:api". 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.
13
+ *
14
+ * @defaultValue "\{builtinPath\}/api"
15
+ */
16
+ path?: string;
17
+ };
18
+ type HeyAPIPluginOptions = Omit<UserConfig, "input" | "output"> & {
19
+ /**
20
+ * The path to the Hey API schema file.
21
+ *
22
+ * @remarks
23
+ * This can be a string path, URL, HeyAPI3 object, Buffer, or Readable stream.
24
+ *
25
+ * @defaultValue "\{projectRoot\}/schema.yaml"
26
+ */
27
+ schema?: UserConfig["input"];
28
+ /**
29
+ * The output details of the Hey API generation
30
+ */
31
+ output?: HeyAPIPluginOutputOptions;
32
+ };
33
+ type HeyAPIPluginUserConfig = UserConfig$1 & {
34
+ heyApi?: HeyAPIPluginOptions;
35
+ };
36
+ type HeyAPIPluginResolvedConfig = ResolvedConfig & {
37
+ heyApi: Omit<HeyAPIPluginOptions, "schema"> & {
38
+ schema: HeyAPIPluginOptions["schema"] | OpenApi.V3_0_X;
39
+ };
40
+ };
41
+ type HeyAPIPluginContext<TResolvedConfig extends HeyAPIPluginResolvedConfig = HeyAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
42
+ declare type __ΩHeyAPIPluginOutputOptions = any[];
43
+ declare type __ΩHeyAPIPluginOptions = any[];
44
+ declare type __ΩHeyAPIPluginUserConfig = any[];
45
+ declare type __ΩHeyAPIPluginResolvedConfig = any[];
46
+ declare type __ΩHeyAPIPluginContext = any[];
47
+ //#endregion
2
48
  export { HeyAPIPluginContext, HeyAPIPluginOptions, HeyAPIPluginOutputOptions, HeyAPIPluginResolvedConfig, HeyAPIPluginUserConfig, __ΩHeyAPIPluginContext, __ΩHeyAPIPluginOptions, __ΩHeyAPIPluginOutputOptions, __ΩHeyAPIPluginResolvedConfig, __ΩHeyAPIPluginUserConfig };
@@ -1,3 +1 @@
1
- import "../plugin-ifZVa20V.mjs";
2
-
3
1
  export { };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-hey-api",
3
- "version": "0.1.77",
3
+ "version": "0.1.79",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code using Hey API.",
6
6
  "repository": {
@@ -152,13 +152,13 @@
152
152
  "@stryke/types": "^0.10.29",
153
153
  "defu": "^6.1.4",
154
154
  "jiti": "^2.6.1",
155
- "powerlines": "^0.36.27"
155
+ "powerlines": "^0.36.29"
156
156
  },
157
157
  "devDependencies": {
158
- "@powerlines/nx": "^0.11.53",
159
- "@powerlines/plugin-plugin": "^0.12.75",
158
+ "@powerlines/nx": "^0.11.55",
159
+ "@powerlines/plugin-plugin": "^0.12.77",
160
160
  "@types/node": "^24.10.4"
161
161
  },
162
162
  "publishConfig": { "access": "public" },
163
- "gitHead": "fbc59ce584fd0f78d90d2dbaa18f9c9267bd3b61"
163
+ "gitHead": "bfbde2cda62a5307013bf11d1ef6a8500bcbc4b1"
164
164
  }
@@ -1,15 +0,0 @@
1
- import { camelCase } from "@stryke/string-format/camel-case";
2
-
3
- //#region src/helpers/create-operation-id.ts
4
- /**
5
- * Create an Operation Id from a summary string
6
- *
7
- * @param summary - The summary string from the specification
8
- * @returns The generated operation ID
9
- */
10
- function createOperationId(summary) {
11
- return camelCase(summary.replace(/\b(?:a|from|to|the|given|of|an)\b/gi, "").replace("Get list", "list"));
12
- }
13
-
14
- //#endregion
15
- export { createOperationId as t };
@@ -1,21 +0,0 @@
1
- const require_index = require('./index.cjs');
2
- let __stryke_string_format_camel_case = require("@stryke/string-format/camel-case");
3
-
4
- //#region src/helpers/create-operation-id.ts
5
- /**
6
- * Create an Operation Id from a summary string
7
- *
8
- * @param summary - The summary string from the specification
9
- * @returns The generated operation ID
10
- */
11
- function createOperationId(summary) {
12
- return (0, __stryke_string_format_camel_case.camelCase)(summary.replace(/\b(?:a|from|to|the|given|of|an)\b/gi, "").replace("Get list", "list"));
13
- }
14
-
15
- //#endregion
16
- Object.defineProperty(exports, 'createOperationId', {
17
- enumerable: true,
18
- get: function () {
19
- return createOperationId;
20
- }
21
- });
@@ -1,10 +0,0 @@
1
- //#region src/helpers/create-operation-id.d.ts
2
- /**
3
- * Create an Operation Id from a summary string
4
- *
5
- * @param summary - The summary string from the specification
6
- * @returns The generated operation ID
7
- */
8
- declare function createOperationId(summary: string): string;
9
- //#endregion
10
- export { createOperationId as t };
@@ -1,10 +0,0 @@
1
- //#region src/helpers/create-operation-id.d.ts
2
- /**
3
- * Create an Operation Id from a summary string
4
- *
5
- * @param summary - The summary string from the specification
6
- * @returns The generated operation ID
7
- */
8
- declare function createOperationId(summary: string): string;
9
- //#endregion
10
- export { createOperationId as t };
@@ -1 +0,0 @@
1
- export { };
File without changes
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };
@@ -1 +0,0 @@
1
- export { };