@powerlines/plugin-openapi 0.2.235 → 0.2.237
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.cjs +2 -2
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/powerlines/src/internal/helpers/hooks.d.cts +47 -0
- package/dist/powerlines/src/internal/helpers/hooks.d.mts +47 -0
- package/dist/powerlines/src/plugin-utils/paths.cjs +36 -0
- package/dist/powerlines/src/plugin-utils/paths.mjs +35 -0
- package/dist/powerlines/src/types/api.d.cts +104 -0
- package/dist/powerlines/src/types/api.d.mts +104 -0
- package/dist/powerlines/src/types/build.d.cts +185 -0
- package/dist/powerlines/src/types/build.d.mts +185 -0
- package/dist/powerlines/src/types/commands.d.cts +8 -0
- package/dist/powerlines/src/types/commands.d.mts +8 -0
- package/dist/powerlines/src/types/config.d.cts +424 -0
- package/dist/powerlines/src/types/config.d.mts +424 -0
- package/dist/powerlines/src/types/context.d.cts +514 -0
- package/dist/powerlines/src/types/context.d.mts +514 -0
- package/dist/powerlines/src/types/fs.d.cts +486 -0
- package/dist/powerlines/src/types/fs.d.mts +486 -0
- package/dist/powerlines/src/types/hooks.d.cts +32 -0
- package/dist/powerlines/src/types/hooks.d.mts +32 -0
- package/dist/powerlines/src/types/plugin.d.cts +205 -0
- package/dist/powerlines/src/types/plugin.d.mts +205 -0
- package/dist/powerlines/src/types/resolved.d.cts +93 -0
- package/dist/powerlines/src/types/resolved.d.mts +93 -0
- package/dist/powerlines/src/types/tsconfig.d.cts +69 -0
- package/dist/powerlines/src/types/tsconfig.d.mts +69 -0
- package/dist/powerlines/src/types/unplugin.d.cts +22 -0
- package/dist/powerlines/src/types/unplugin.d.mts +22 -0
- package/dist/types/plugin.d.cts +3 -3
- package/dist/types/plugin.d.mts +3 -3
- package/package.json +7 -7
|
@@ -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,22 @@
|
|
|
1
|
+
import { BuilderVariant, InferUnpluginVariant, UnpluginBuilderVariant } from "./build.cjs";
|
|
2
|
+
import { InferResolvedConfig } from "./resolved.cjs";
|
|
3
|
+
import { Context } from "./context.cjs";
|
|
4
|
+
import { API } from "./api.cjs";
|
|
5
|
+
import { PluginHook } from "./plugin.cjs";
|
|
6
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
7
|
+
import { HookFilter, UnpluginOptions } from "unplugin";
|
|
8
|
+
|
|
9
|
+
//#region ../powerlines/src/types/unplugin.d.ts
|
|
10
|
+
interface UnpluginOptions$1<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant> extends UnpluginOptions {
|
|
11
|
+
/**
|
|
12
|
+
* An API object that can be used for inter-plugin communication.
|
|
13
|
+
*
|
|
14
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
15
|
+
*/
|
|
16
|
+
api: API<InferResolvedConfig<TUnpluginBuilderVariant>>;
|
|
17
|
+
}
|
|
18
|
+
type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> = InferUnpluginVariant<TBuilderVariant>> = { [TKey in keyof Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant]]?: Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] extends infer THandler | {
|
|
19
|
+
handler: infer THandler;
|
|
20
|
+
} ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] : Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] };
|
|
21
|
+
//#endregion
|
|
22
|
+
export { InferUnpluginOptions };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BuilderVariant, InferUnpluginVariant, UnpluginBuilderVariant } from "./build.mjs";
|
|
2
|
+
import { InferResolvedConfig } from "./resolved.mjs";
|
|
3
|
+
import { Context } from "./context.mjs";
|
|
4
|
+
import { API } from "./api.mjs";
|
|
5
|
+
import { PluginHook } from "./plugin.mjs";
|
|
6
|
+
import { MaybePromise } from "@stryke/types/base";
|
|
7
|
+
import { HookFilter, UnpluginOptions } from "unplugin";
|
|
8
|
+
|
|
9
|
+
//#region ../powerlines/src/types/unplugin.d.ts
|
|
10
|
+
interface UnpluginOptions$1<TUnpluginBuilderVariant extends UnpluginBuilderVariant = UnpluginBuilderVariant> extends UnpluginOptions {
|
|
11
|
+
/**
|
|
12
|
+
* An API object that can be used for inter-plugin communication.
|
|
13
|
+
*
|
|
14
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
15
|
+
*/
|
|
16
|
+
api: API<InferResolvedConfig<TUnpluginBuilderVariant>>;
|
|
17
|
+
}
|
|
18
|
+
type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant> = InferUnpluginVariant<TBuilderVariant>> = { [TKey in keyof Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant]]?: Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] extends infer THandler | {
|
|
19
|
+
handler: infer THandler;
|
|
20
|
+
} ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] : Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] };
|
|
21
|
+
//#endregion
|
|
22
|
+
export { InferUnpluginOptions };
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { UserConfig } from "../powerlines/src/types/config.cjs";
|
|
2
|
+
import { ResolvedConfig } from "../powerlines/src/types/resolved.cjs";
|
|
3
|
+
import { PluginContext } from "../powerlines/src/types/context.cjs";
|
|
1
4
|
import { Buffer } from "node:buffer";
|
|
2
5
|
import { Stream } from "node:stream";
|
|
3
6
|
import { OpenAPI3, OpenAPITSOptions } from "openapi-typescript";
|
|
4
|
-
import { UserConfig } from "powerlines/types/config";
|
|
5
|
-
import { PluginContext } from "powerlines/types/context";
|
|
6
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
7
7
|
|
|
8
8
|
//#region src/types/plugin.d.ts
|
|
9
9
|
type OpenAPIPluginOptions = Omit<OpenAPITSOptions, "cwd"> & {
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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
4
|
import { OpenAPI3, OpenAPITSOptions } from "openapi-typescript";
|
|
2
5
|
import { Buffer } from "node:buffer";
|
|
3
6
|
import { Stream } from "node:stream";
|
|
4
|
-
import { UserConfig } from "powerlines/types/config";
|
|
5
|
-
import { PluginContext } from "powerlines/types/context";
|
|
6
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
7
7
|
|
|
8
8
|
//#region src/types/plugin.d.ts
|
|
9
9
|
type OpenAPIPluginOptions = Omit<OpenAPITSOptions, "cwd"> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-openapi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.237",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from OpenAPI specifications.",
|
|
6
6
|
"repository": {
|
|
@@ -62,19 +62,19 @@
|
|
|
62
62
|
"powerlines-plugin"
|
|
63
63
|
],
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@stryke/path": "^0.26.
|
|
66
|
-
"@stryke/type-checks": "^0.5.
|
|
67
|
-
"@stryke/types": "^0.10.
|
|
65
|
+
"@stryke/path": "^0.26.2",
|
|
66
|
+
"@stryke/type-checks": "^0.5.22",
|
|
67
|
+
"@stryke/types": "^0.10.36",
|
|
68
68
|
"defu": "^6.1.4",
|
|
69
69
|
"jiti": "^2.6.1",
|
|
70
70
|
"openapi-typescript": "^7.10.1",
|
|
71
|
-
"powerlines": "^0.
|
|
71
|
+
"powerlines": "^0.38.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
74
|
+
"@powerlines/plugin-plugin": "^0.12.183",
|
|
75
75
|
"@types/node": "^24.10.9"
|
|
76
76
|
},
|
|
77
77
|
"publishConfig": { "access": "public" },
|
|
78
78
|
"types": "./dist/index.d.cts",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "2b025c75ca3472c6d322f6576f47ed70184abb1f"
|
|
80
80
|
}
|