@powerlines/plugin-openapi 0.2.306 → 0.2.308
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.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +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 { Plugin } from \"powerlines\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport {\n OpenAPIPluginContext,\n OpenAPIPluginOptions,\n OpenAPIPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n
|
|
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 { Plugin } from \"powerlines\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport {\n OpenAPIPluginContext,\n OpenAPIPluginOptions,\n OpenAPIPluginUserConfig\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface BaseConfig {\n openapi?: OpenAPIPluginOptions;\n }\n}\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.root,\n \"schema.yaml\"\n ),\n cwd: joinPaths(this.workspaceConfig.workspaceRoot, this.config.root),\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":";;;;;;;;;;;;AA2CA,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,MACZ,cACD;IACD,KAAK,UAAU,KAAK,gBAAgB,eAAe,KAAK,OAAO,KAAK;IACpE,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-openapi",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.308",
|
|
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.13.0",
|
|
104
|
-
"powerlines": "^0.39.
|
|
104
|
+
"powerlines": "^0.39.11"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
107
|
+
"@powerlines/plugin-plugin": "^0.12.254",
|
|
108
108
|
"@types/node": "^25.3.3"
|
|
109
109
|
},
|
|
110
110
|
"publishConfig": { "access": "public" },
|
|
111
111
|
"types": "./dist/index.d.cts",
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "e63eb5a0ecd0e5ee3e030388ad1c534b3ecb2136"
|
|
113
113
|
}
|