@powerlines/plugin-openapi 0.2.242 → 0.2.244
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-BgAdqTbb.d.mts +1 -0
- package/dist/index-CEgs-Dz2.d.cts +1 -0
- package/dist/index.cjs +31 -3
- package/dist/index.d.cts +4 -3
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +4 -3
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -0
- package/dist/plugin-C3MaN5jp.mjs +1 -0
- package/dist/plugin-CT4jq_VI.d.cts +42 -0
- package/dist/plugin-CT4jq_VI.d.cts.map +1 -0
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-a88wDz3O.d.mts +42 -0
- package/dist/plugin-a88wDz3O.d.mts.map +1 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.mts +2 -1
- package/dist/types/index.mjs +3 -0
- package/dist/types/plugin.cjs +1 -0
- package/dist/types/plugin.d.cts +1 -40
- package/dist/types/plugin.d.mts +1 -40
- package/dist/types/plugin.mjs +2 -0
- package/dist/types-CTUnla4x.mjs +1 -0
- package/dist/types-DHkg7xmX.cjs +0 -0
- package/package.json +4 -4
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
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');
|
|
3
31
|
let __stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
4
32
|
let defu = require("defu");
|
|
5
|
-
defu =
|
|
33
|
+
defu = __toESM(defu);
|
|
6
34
|
let openapi_typescript = require("openapi-typescript");
|
|
7
|
-
openapi_typescript =
|
|
35
|
+
openapi_typescript = __toESM(openapi_typescript);
|
|
8
36
|
let powerlines_plugin_utils_paths = require("powerlines/plugin-utils/paths");
|
|
9
37
|
|
|
10
38
|
//#region src/index.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPIPluginContext,
|
|
2
|
-
import "./
|
|
1
|
+
import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "./plugin-CT4jq_VI.cjs";
|
|
2
|
+
import "./index-CEgs-Dz2.cjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
@@ -12,4 +12,5 @@ import { Plugin } from "powerlines/types/plugin";
|
|
|
12
12
|
*/
|
|
13
13
|
declare const plugin: <TContext extends OpenAPIPluginContext = OpenAPIPluginContext>(options?: OpenAPIPluginOptions) => Plugin<TContext>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig, plugin as default, plugin };
|
|
16
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAqCA;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,oBAGT,GAHgC,oBAGhC,CAAA,CAAA,OAAA,CAAA,EADC,oBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OpenAPIPluginContext,
|
|
2
|
-
import "./
|
|
1
|
+
import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "./plugin-a88wDz3O.mjs";
|
|
2
|
+
import "./index-BgAdqTbb.mjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
@@ -12,4 +12,5 @@ import { Plugin } from "powerlines/types/plugin";
|
|
|
12
12
|
*/
|
|
13
13
|
declare const plugin: <TContext extends OpenAPIPluginContext = OpenAPIPluginContext>(options?: OpenAPIPluginOptions) => Plugin<TContext>;
|
|
14
14
|
//#endregion
|
|
15
|
-
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig, plugin as default, plugin };
|
|
15
|
+
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig, plugin as default, plugin };
|
|
16
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAqCA;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,oBAGT,GAHgC,oBAGhC,CAAA,CAAA,OAAA,CAAA,EADC,oBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import "./plugin-C3MaN5jp.mjs";
|
|
2
|
+
import "./types-CTUnla4x.mjs";
|
|
1
3
|
import { joinPaths } from "@stryke/path/join-paths";
|
|
2
4
|
import defu from "defu";
|
|
3
5
|
import openapiTS, { astToString } from "openapi-typescript";
|
|
@@ -34,4 +36,5 @@ const plugin = (options = {}) => {
|
|
|
34
36
|
var src_default = plugin;
|
|
35
37
|
|
|
36
38
|
//#endregion
|
|
37
|
-
export { src_default as default, plugin };
|
|
39
|
+
export { src_default as default, plugin };
|
|
40
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { joinPaths } from \"@stryke/path/join-paths\";\nimport defu from \"defu\";\nimport openapiTS, { astToString } from \"openapi-typescript\";\nimport { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport {\n OpenAPIPluginContext,\n OpenAPIPluginOptions,\n OpenAPIPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\n/**\n * A Powerlines plugin to integrate OpenAPI for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends OpenAPIPluginContext = OpenAPIPluginContext\n>(\n options: OpenAPIPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"openapi\",\n config() {\n return {\n openapi: defu(options, {\n schema: joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot,\n \"schema.yaml\"\n ),\n cwd: joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.projectRoot\n ),\n outputPath: joinPaths(\"{builtinPath}\", \"api\"),\n silent: this.config.logLevel === null\n })\n } as Partial<OpenAPIPluginUserConfig>;\n },\n async configResolved() {\n this.config.openapi.outputPath = replacePathTokens(\n this,\n this.config.openapi.outputPath\n );\n },\n async prepare() {\n const ast = await openapiTS(\n this.config.openapi.schema,\n this.config.openapi\n );\n\n if (this.config.openapi.outputPath) {\n await this.fs.write(\n this.config.openapi.outputPath,\n astToString(ast, {\n fileName: this.config.openapi.outputPath\n })\n );\n } else {\n await this.emitBuiltin(astToString(ast), \"openapi\");\n }\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;AAqCA,MAAa,UAGX,UAAgC,EAAE,KACb;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,SAAS,KAAK,SAAS;IACrB,QAAQ,UACN,KAAK,gBAAgB,eACrB,KAAK,OAAO,aACZ,cACD;IACD,KAAK,UACH,KAAK,gBAAgB,eACrB,KAAK,OAAO,YACb;IACD,YAAY,UAAU,iBAAiB,MAAM;IAC7C,QAAQ,KAAK,OAAO,aAAa;IAClC,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,QAAK,OAAO,QAAQ,aAAa,kBAC/B,MACA,KAAK,OAAO,QAAQ,WACrB;;EAEH,MAAM,UAAU;GACd,MAAM,MAAM,MAAM,UAChB,KAAK,OAAO,QAAQ,QACpB,KAAK,OAAO,QACb;AAED,OAAI,KAAK,OAAO,QAAQ,WACtB,OAAM,KAAK,GAAG,MACZ,KAAK,OAAO,QAAQ,YACpB,YAAY,KAAK,EACf,UAAU,KAAK,OAAO,QAAQ,YAC/B,CAAC,CACH;OAED,OAAM,KAAK,YAAY,YAAY,IAAI,EAAE,UAAU;;EAGxD;;AAGH,kBAAe"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Buffer } from "node:buffer";
|
|
2
|
+
import { Stream } from "node:stream";
|
|
3
|
+
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
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type OpenAPIPluginOptions = Omit<OpenAPITSOptions, "cwd"> & {
|
|
10
|
+
/**
|
|
11
|
+
* The path to the OpenAPI schema file.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* This can be a string path, URL, OpenAPI3 object, Buffer, or Readable stream.
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
17
|
+
*/
|
|
18
|
+
schema?: string | URL | OpenAPI3 | Buffer | Stream.Readable;
|
|
19
|
+
/**
|
|
20
|
+
* The path to the output file generated by the plugin.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* 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.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue "\{builtinPath\}/api.ts"
|
|
26
|
+
*/
|
|
27
|
+
outputPath?: string;
|
|
28
|
+
};
|
|
29
|
+
type OpenAPIPluginUserConfig = UserConfig & {
|
|
30
|
+
openapi?: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
31
|
+
};
|
|
32
|
+
type OpenAPIPluginResolvedConfig = ResolvedConfig & {
|
|
33
|
+
openapi: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
34
|
+
};
|
|
35
|
+
type OpenAPIPluginContext<TResolvedConfig extends OpenAPIPluginResolvedConfig = OpenAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
36
|
+
declare type __ΩOpenAPIPluginOptions = any[];
|
|
37
|
+
declare type __ΩOpenAPIPluginUserConfig = any[];
|
|
38
|
+
declare type __ΩOpenAPIPluginResolvedConfig = any[];
|
|
39
|
+
declare type __ΩOpenAPIPluginContext = any[];
|
|
40
|
+
//#endregion
|
|
41
|
+
export { __ΩOpenAPIPluginContext as a, __ΩOpenAPIPluginUserConfig as c, OpenAPIPluginUserConfig as i, OpenAPIPluginOptions as n, __ΩOpenAPIPluginOptions as o, OpenAPIPluginResolvedConfig as r, __ΩOpenAPIPluginResolvedConfig as s, OpenAPIPluginContext as t };
|
|
42
|
+
//# sourceMappingURL=plugin-CT4jq_VI.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-CT4jq_VI.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAyBY,oBAAA,GAAuB,KAAK;;AAAxC;;;;;;;EAS6D,MAAA,CAAA,EAAA,MAAA,GAAzC,GAAyC,GAAnC,QAAmC,GAAxB,MAAwB,GAAf,MAAA,CAAO,QAAQ;EAajD;;;;;;;;EAGR,UAAA,CAAA,EAAA,MAAA;CAAI;AAGI,KANA,uBAAA,GAA0B,UAMC,GAAA;EAAG,OAAA,CAAA,EAL9B,IAK8B,CALzB,oBAKyB,EAAA,QAAA,CAAA,GAJtC,QAIsC,CAJ7B,IAI6B,CAJxB,oBAIwB,EAAA,QAAA,CAAA,CAAA,GAHtC,IAGsC,CAHjC,gBAGiC,EAAA,KAAA,CAAA;CAC1B;AAAL,KADC,2BAAA,GAA8B,cAC/B,GAAA;EACO,OAAA,EADP,IACO,CADF,oBACE,EAAA,QAAA,CAAA,GAAd,QAAc,CAAL,IAAK,CAAA,oBAAA,EAAA,QAAA,CAAA,CAAA,GACd,IADc,CACT,gBADS,EAAA,KAAA,CAAA;CAAL;AAAT,KAIQ,oBAJR,CAAA,wBAKsB,2BALtB,GAMA,2BANA,CAAA,GAOA,aAPA,CAOc,eAPd,CAAA;AACK,uCAAA,GAAA,EAAA;AAAL,0CAAA,GAAA,EAAA;AAAI,8CAAA,GAAA,EAAA;AAGI,uCAAoB,GAAA,EAAA"}
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OpenAPI3, OpenAPITSOptions } from "openapi-typescript";
|
|
2
|
+
import { Buffer } from "node:buffer";
|
|
3
|
+
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
|
+
|
|
8
|
+
//#region src/types/plugin.d.ts
|
|
9
|
+
type OpenAPIPluginOptions = Omit<OpenAPITSOptions, "cwd"> & {
|
|
10
|
+
/**
|
|
11
|
+
* The path to the OpenAPI schema file.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* This can be a string path, URL, OpenAPI3 object, Buffer, or Readable stream.
|
|
15
|
+
*
|
|
16
|
+
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
17
|
+
*/
|
|
18
|
+
schema?: string | URL | OpenAPI3 | Buffer | Stream.Readable;
|
|
19
|
+
/**
|
|
20
|
+
* The path to the output file generated by the plugin.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
* 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.
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue "\{builtinPath\}/api.ts"
|
|
26
|
+
*/
|
|
27
|
+
outputPath?: string;
|
|
28
|
+
};
|
|
29
|
+
type OpenAPIPluginUserConfig = UserConfig & {
|
|
30
|
+
openapi?: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
31
|
+
};
|
|
32
|
+
type OpenAPIPluginResolvedConfig = ResolvedConfig & {
|
|
33
|
+
openapi: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
34
|
+
};
|
|
35
|
+
type OpenAPIPluginContext<TResolvedConfig extends OpenAPIPluginResolvedConfig = OpenAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
36
|
+
declare type __ΩOpenAPIPluginOptions = any[];
|
|
37
|
+
declare type __ΩOpenAPIPluginUserConfig = any[];
|
|
38
|
+
declare type __ΩOpenAPIPluginResolvedConfig = any[];
|
|
39
|
+
declare type __ΩOpenAPIPluginContext = any[];
|
|
40
|
+
//#endregion
|
|
41
|
+
export { __ΩOpenAPIPluginContext as a, __ΩOpenAPIPluginUserConfig as c, OpenAPIPluginUserConfig as i, OpenAPIPluginOptions as n, __ΩOpenAPIPluginOptions as o, OpenAPIPluginResolvedConfig as r, __ΩOpenAPIPluginResolvedConfig as s, OpenAPIPluginContext as t };
|
|
42
|
+
//# sourceMappingURL=plugin-a88wDz3O.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin-a88wDz3O.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;;KAyBY,oBAAA,GAAuB,KAAK;;AAAxC;;;;;;;EAS6D,MAAA,CAAA,EAAA,MAAA,GAAzC,GAAyC,GAAnC,QAAmC,GAAxB,MAAwB,GAAf,MAAA,CAAO,QAAQ;EAajD;;;;;;;;EAGR,UAAA,CAAA,EAAA,MAAA;CAAI;AAGI,KANA,uBAAA,GAA0B,UAMC,GAAA;EAAG,OAAA,CAAA,EAL9B,IAK8B,CALzB,oBAKyB,EAAA,QAAA,CAAA,GAJtC,QAIsC,CAJ7B,IAI6B,CAJxB,oBAIwB,EAAA,QAAA,CAAA,CAAA,GAHtC,IAGsC,CAHjC,gBAGiC,EAAA,KAAA,CAAA;CAC1B;AAAL,KADC,2BAAA,GAA8B,cAC/B,GAAA;EACO,OAAA,EADP,IACO,CADF,oBACE,EAAA,QAAA,CAAA,GAAd,QAAc,CAAL,IAAK,CAAA,oBAAA,EAAA,QAAA,CAAA,CAAA,GACd,IADc,CACT,gBADS,EAAA,KAAA,CAAA;CAAL;AAAT,KAIQ,oBAJR,CAAA,wBAKsB,2BALtB,GAMA,2BANA,CAAA,GAOA,aAPA,CAOc,eAPd,CAAA;AACK,uCAAA,GAAA,EAAA;AAAL,0CAAA,GAAA,EAAA;AAAI,8CAAA,GAAA,EAAA;AAGI,uCAAoB,GAAA,EAAA"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { OpenAPIPluginContext,
|
|
1
|
+
import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "../plugin-CT4jq_VI.cjs";
|
|
2
|
+
import "../index-CEgs-Dz2.cjs";
|
|
2
3
|
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { OpenAPIPluginContext,
|
|
1
|
+
import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "../plugin-a88wDz3O.mjs";
|
|
2
|
+
import "../index-BgAdqTbb.mjs";
|
|
2
3
|
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Stream } from "node:stream";
|
|
3
|
-
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
|
-
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
type OpenAPIPluginOptions = Omit<OpenAPITSOptions, "cwd"> & {
|
|
10
|
-
/**
|
|
11
|
-
* The path to the OpenAPI schema file.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* This can be a string path, URL, OpenAPI3 object, Buffer, or Readable stream.
|
|
15
|
-
*
|
|
16
|
-
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
17
|
-
*/
|
|
18
|
-
schema?: string | URL | OpenAPI3 | Buffer | Stream.Readable;
|
|
19
|
-
/**
|
|
20
|
-
* The path to the output file generated by the plugin.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* 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.
|
|
24
|
-
*
|
|
25
|
-
* @defaultValue "\{builtinPath\}/api.ts"
|
|
26
|
-
*/
|
|
27
|
-
outputPath?: string;
|
|
28
|
-
};
|
|
29
|
-
type OpenAPIPluginUserConfig = UserConfig & {
|
|
30
|
-
openapi?: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
31
|
-
};
|
|
32
|
-
type OpenAPIPluginResolvedConfig = ResolvedConfig & {
|
|
33
|
-
openapi: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
34
|
-
};
|
|
35
|
-
type OpenAPIPluginContext<TResolvedConfig extends OpenAPIPluginResolvedConfig = OpenAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
36
|
-
declare type __ΩOpenAPIPluginOptions = any[];
|
|
37
|
-
declare type __ΩOpenAPIPluginUserConfig = any[];
|
|
38
|
-
declare type __ΩOpenAPIPluginResolvedConfig = any[];
|
|
39
|
-
declare type __ΩOpenAPIPluginContext = any[];
|
|
40
|
-
//#endregion
|
|
1
|
+
import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "../plugin-CT4jq_VI.cjs";
|
|
41
2
|
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig };
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Buffer } from "node:buffer";
|
|
3
|
-
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
|
-
|
|
8
|
-
//#region src/types/plugin.d.ts
|
|
9
|
-
type OpenAPIPluginOptions = Omit<OpenAPITSOptions, "cwd"> & {
|
|
10
|
-
/**
|
|
11
|
-
* The path to the OpenAPI schema file.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* This can be a string path, URL, OpenAPI3 object, Buffer, or Readable stream.
|
|
15
|
-
*
|
|
16
|
-
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
17
|
-
*/
|
|
18
|
-
schema?: string | URL | OpenAPI3 | Buffer | Stream.Readable;
|
|
19
|
-
/**
|
|
20
|
-
* The path to the output file generated by the plugin.
|
|
21
|
-
*
|
|
22
|
-
* @remarks
|
|
23
|
-
* 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.
|
|
24
|
-
*
|
|
25
|
-
* @defaultValue "\{builtinPath\}/api.ts"
|
|
26
|
-
*/
|
|
27
|
-
outputPath?: string;
|
|
28
|
-
};
|
|
29
|
-
type OpenAPIPluginUserConfig = UserConfig & {
|
|
30
|
-
openapi?: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
31
|
-
};
|
|
32
|
-
type OpenAPIPluginResolvedConfig = ResolvedConfig & {
|
|
33
|
-
openapi: Omit<OpenAPIPluginOptions, "schema"> & Required<Pick<OpenAPIPluginOptions, "schema">> & Pick<OpenAPITSOptions, "cwd">;
|
|
34
|
-
};
|
|
35
|
-
type OpenAPIPluginContext<TResolvedConfig extends OpenAPIPluginResolvedConfig = OpenAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
36
|
-
declare type __ΩOpenAPIPluginOptions = any[];
|
|
37
|
-
declare type __ΩOpenAPIPluginUserConfig = any[];
|
|
38
|
-
declare type __ΩOpenAPIPluginResolvedConfig = any[];
|
|
39
|
-
declare type __ΩOpenAPIPluginContext = any[];
|
|
40
|
-
//#endregion
|
|
1
|
+
import { a as __ΩOpenAPIPluginContext, c as __ΩOpenAPIPluginUserConfig, i as OpenAPIPluginUserConfig, n as OpenAPIPluginOptions, o as __ΩOpenAPIPluginOptions, r as OpenAPIPluginResolvedConfig, s as __ΩOpenAPIPluginResolvedConfig, t as OpenAPIPluginContext } from "../plugin-a88wDz3O.mjs";
|
|
41
2
|
export { OpenAPIPluginContext, OpenAPIPluginOptions, OpenAPIPluginResolvedConfig, OpenAPIPluginUserConfig, __ΩOpenAPIPluginContext, __ΩOpenAPIPluginOptions, __ΩOpenAPIPluginResolvedConfig, __ΩOpenAPIPluginUserConfig };
|
package/dist/types/plugin.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-openapi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.244",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from OpenAPI specifications.",
|
|
6
6
|
"repository": {
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
"defu": "^6.1.4",
|
|
102
102
|
"jiti": "^2.6.1",
|
|
103
103
|
"openapi-typescript": "^7.10.1",
|
|
104
|
-
"powerlines": "^0.38.
|
|
104
|
+
"powerlines": "^0.38.6"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
107
|
+
"@powerlines/plugin-plugin": "^0.12.190",
|
|
108
108
|
"@types/node": "^24.10.9"
|
|
109
109
|
},
|
|
110
110
|
"publishConfig": { "access": "public" },
|
|
111
111
|
"types": "./dist/index.d.cts",
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "f90d675c44d4323d447a46c8a4c833420543cc0a"
|
|
113
113
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region rolldown:runtime
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
-
key = keys[i];
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: ((k) => from[k]).bind(null, key),
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
-
value: mod,
|
|
24
|
-
enumerable: true
|
|
25
|
-
}) : target, mod));
|
|
26
|
-
|
|
27
|
-
//#endregion
|
|
28
|
-
|
|
29
|
-
exports.__toESM = __toESM;
|