@powerlines/plugin-asyncapi 0.1.345 → 0.1.346

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/README.md CHANGED
@@ -27,7 +27,7 @@ This package is part of the <b>🔌 Powerlines</b> monorepo. Powerlines is the "
27
27
 
28
28
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
29
29
 
30
- [![Version](https://img.shields.io/badge/version-0.1.338-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
30
+ [![Version](https://img.shields.io/badge/version-0.1.345-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://stormsoftware.com/projects/powerlines)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/powerlines/release.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
31
31
 
32
32
  <!-- prettier-ignore-start -->
33
33
  <!-- markdownlint-disable -->
@@ -58,21 +58,19 @@ A Powerlines plugin to generate project code with [AsyncAPI](https://www.asyncap
58
58
 
59
59
  ## Table of Contents
60
60
 
61
- - [Powerlines - AsyncAPI Plugin](#powerlines---asyncapi-plugin)
62
- - [Table of Contents](#table-of-contents)
63
- - [Installing](#installing)
64
- - [Reduced Package Size](#reduced-package-size)
65
- - [Development](#development)
66
- - [Building](#building)
67
- - [Running unit tests](#running-unit-tests)
68
- - [Linting](#linting)
69
- - [Storm Workspaces](#storm-workspaces)
70
- - [Roadmap](#roadmap)
71
- - [Support](#support)
72
- - [License](#license)
73
- - [Changelog](#changelog)
74
- - [Contributing](#contributing)
75
- - [Contributors](#contributors)
61
+ - [Installing](#installing)
62
+ - [Reduced Package Size](#reduced-package-size)
63
+ - [Development](#development)
64
+ - [Building](#building)
65
+ - [Running unit tests](#running-unit-tests)
66
+ - [Linting](#linting)
67
+ - [Storm Workspaces](#storm-workspaces)
68
+ - [Roadmap](#roadmap)
69
+ - [Support](#support)
70
+ - [License](#license)
71
+ - [Changelog](#changelog)
72
+ - [Contributing](#contributing)
73
+ - [Contributors](#contributors)
76
74
 
77
75
  <!-- END doctoc -->
78
76
 
@@ -1,4 +1,4 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+
3
+ export { };
package/dist/index.cjs CHANGED
@@ -1,12 +1,12 @@
1
- Object.defineProperty(exports, '__esModule', { value: true });
2
- const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- let __asyncapi_generator = require("@asyncapi/generator");
4
- let __asyncapi_parser_esm_document = require("@asyncapi/parser/esm/document");
5
- let __stryke_fs_exists = require("@stryke/fs/exists");
6
- let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
7
- let __stryke_path_join = require("@stryke/path/join");
1
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
2
+ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let _asyncapi_generator = require("@asyncapi/generator");
4
+ let _asyncapi_parser_esm_document = require("@asyncapi/parser/esm/document");
5
+ let _stryke_fs_exists = require("@stryke/fs/exists");
6
+ let _stryke_fs_package_fns = require("@stryke/fs/package-fns");
7
+ let _stryke_path_join = require("@stryke/path/join");
8
8
  let defu = require("defu");
9
- defu = require_rolldown_runtime.__toESM(defu);
9
+ defu = require_runtime.__toESM(defu);
10
10
  let powerlines_plugin_utils = require("powerlines/plugin-utils");
11
11
 
12
12
  //#region src/index.ts
@@ -21,18 +21,18 @@ const plugin = (options) => {
21
21
  name: "asyncapi",
22
22
  config() {
23
23
  return { asyncapi: (0, defu.default)(options, {
24
- schema: (0, __stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "schema.yaml"),
24
+ schema: (0, _stryke_path_join.joinPaths)(this.workspaceConfig.workspaceRoot, this.config.root, "schema.yaml"),
25
25
  output: "string",
26
26
  install: false,
27
27
  compile: false,
28
28
  debug: this.config.mode === "development" || this.config.logLevel === "debug" || this.config.logLevel === "trace",
29
- targetDir: (0, __stryke_path_join.joinPaths)(this.builtinsPath, "asyncapi")
29
+ targetDir: (0, _stryke_path_join.joinPaths)(this.builtinsPath, "asyncapi")
30
30
  }) };
31
31
  },
32
32
  async configResolved() {
33
33
  if (!this.config.asyncapi.schema) throw new Error("AsyncAPI schema is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.schema\".");
34
- if (!this.config.asyncapi.document || !(0, __asyncapi_parser_esm_document.isAsyncAPIDocument)(this.config.asyncapi.document)) if ((0, __asyncapi_parser_esm_document.isAsyncAPIDocument)(this.config.asyncapi.schema)) this.config.asyncapi.document = this.config.asyncapi.schema;
35
- else if ((0, __stryke_fs_exists.existsSync)(this.config.asyncapi.schema.toString())) {
34
+ if (!this.config.asyncapi.document || !(0, _asyncapi_parser_esm_document.isAsyncAPIDocument)(this.config.asyncapi.document)) if ((0, _asyncapi_parser_esm_document.isAsyncAPIDocument)(this.config.asyncapi.schema)) this.config.asyncapi.document = this.config.asyncapi.schema;
35
+ else if ((0, _stryke_fs_exists.existsSync)(this.config.asyncapi.schema.toString())) {
36
36
  const document = await this.fs.read(this.config.asyncapi.schema.toString());
37
37
  if (!document) throw new Error(`Failed to read AsyncAPI schema from file: ${this.config.asyncapi.schema.toString()}`);
38
38
  this.config.asyncapi.document = document;
@@ -43,16 +43,15 @@ const plugin = (options) => {
43
43
  }
44
44
  if (!this.config.asyncapi.templateName) throw new Error("AsyncAPI template name is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.templateName\".");
45
45
  if (!this.config.asyncapi.outputPath) throw new Error("AsyncAPI output path is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.outputPath\".");
46
- if (!(0, __stryke_fs_exists.existsSync)(this.config.asyncapi.templateName) && !(0, __stryke_fs_package_fns.isPackageExists)(this.config.asyncapi.templateName)) this.devDependencies[this.config.asyncapi.templateName] = "latest";
46
+ if (!(0, _stryke_fs_exists.existsSync)(this.config.asyncapi.templateName) && !(0, _stryke_fs_package_fns.isPackageExists)(this.config.asyncapi.templateName)) this.devDependencies[this.config.asyncapi.templateName] = "latest";
47
47
  this.config.asyncapi.outputPath = (0, powerlines_plugin_utils.replacePathTokens)(this, this.config.asyncapi.outputPath);
48
48
  },
49
49
  async prepare() {
50
- await new __asyncapi_generator.Generator(this.config.asyncapi.templateName, this.config.asyncapi.outputPath, this.config.asyncapi).generate(this.config.asyncapi.document);
50
+ await new _asyncapi_generator.Generator(this.config.asyncapi.templateName, this.config.asyncapi.outputPath, this.config.asyncapi).generate(this.config.asyncapi.document);
51
51
  }
52
52
  };
53
53
  };
54
- var src_default = plugin;
55
54
 
56
55
  //#endregion
57
- exports.default = src_default;
56
+ exports.default = plugin;
58
57
  exports.plugin = plugin;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig } from "./types/plugin.cjs";
2
- import "./types/index.cjs";
3
2
  import { Plugin } from "powerlines";
4
3
 
5
4
  //#region src/index.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA+BwB,QAAA,CAAA,EAIT,qBAJS;EAAA;;;;AAcxB;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,qBAGT,GAHiC,qBAGjC,CAAA,CAAA,OAAA,EADC,qBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAkCY,MAAA;IACR,QAAA,GAAW,qBAAA;EAAA;AAAA;;;;;;;cAUF,MAAA,oBACM,qBAAA,GAAwB,qBAAA,EAEzC,OAAA,EAAS,qBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig } from "./types/plugin.mjs";
2
- import "./types/index.mjs";
3
2
  import { Plugin } from "powerlines";
4
3
 
5
4
  //#region src/index.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;IA+BwB,QAAA,CAAA,EAIT,qBAJS;EAAA;;;;AAcxB;;;;AAIU,cAJG,MAIH,EAAA,CAAA,iBAHS,qBAGT,GAHiC,qBAGjC,CAAA,CAAA,OAAA,EADC,qBACD,EAAA,GAAP,MAAO,CAAA,QAAA,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAkCY,MAAA;IACR,QAAA,GAAW,qBAAA;EAAA;AAAA;;;;;;;cAUF,MAAA,oBACM,qBAAA,GAAwB,qBAAA,EAEzC,OAAA,EAAS,qBAAA,KACR,MAAA,CAAO,QAAA"}
package/dist/index.mjs CHANGED
@@ -48,8 +48,7 @@ const plugin = (options) => {
48
48
  }
49
49
  };
50
50
  };
51
- var src_default = plugin;
52
51
 
53
52
  //#endregion
54
- export { src_default as default, plugin };
53
+ export { plugin as default, plugin };
55
54
  //# sourceMappingURL=index.mjs.map
@@ -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 { Generator } from \"@asyncapi/generator\";\nimport { isAsyncAPIDocument } from \"@asyncapi/parser/esm/document\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport type {\n AsyncAPIPluginContext,\n AsyncAPIPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n asyncapi?: AsyncAPIPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate AsyncAPI for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends AsyncAPIPluginContext = AsyncAPIPluginContext\n>(\n options: AsyncAPIPluginOptions\n): Plugin<TContext> => {\n return {\n name: \"asyncapi\",\n config() {\n return {\n asyncapi: defu(options, {\n schema: joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"schema.yaml\"\n ),\n output: \"string\",\n install: false,\n compile: false,\n debug:\n this.config.mode === \"development\" ||\n this.config.logLevel === \"debug\" ||\n this.config.logLevel === \"trace\",\n targetDir: joinPaths(this.builtinsPath, \"asyncapi\")\n })\n };\n },\n async configResolved() {\n if (!this.config.asyncapi.schema) {\n throw new Error(\n 'AsyncAPI schema is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.schema\".'\n );\n }\n\n if (\n !this.config.asyncapi.document ||\n !isAsyncAPIDocument(this.config.asyncapi.document)\n ) {\n if (isAsyncAPIDocument(this.config.asyncapi.schema)) {\n this.config.asyncapi.document = this.config.asyncapi.schema;\n } else if (existsSync(this.config.asyncapi.schema.toString())) {\n const document = await this.fs.read(\n this.config.asyncapi.schema.toString()\n );\n if (!document) {\n throw new Error(\n `Failed to read AsyncAPI schema from file: ${this.config.asyncapi.schema.toString()}`\n );\n }\n\n this.config.asyncapi.document = document;\n } else {\n const document = await this.fetch(\n this.config.asyncapi.schema.toString()\n );\n if (!document) {\n throw new Error(\n `Failed to fetch AsyncAPI schema from endpoint: ${this.config.asyncapi.schema.toString()}`\n );\n }\n\n this.config.asyncapi.document = await document.text();\n }\n }\n\n if (!this.config.asyncapi.templateName) {\n throw new Error(\n 'AsyncAPI template name is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.templateName\".'\n );\n }\n\n if (!this.config.asyncapi.outputPath) {\n throw new Error(\n 'AsyncAPI output path is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.outputPath\".'\n );\n }\n\n if (\n !existsSync(this.config.asyncapi.templateName) &&\n !isPackageExists(this.config.asyncapi.templateName)\n ) {\n this.devDependencies[this.config.asyncapi.templateName] = \"latest\";\n }\n\n this.config.asyncapi.outputPath = replacePathTokens(\n this,\n this.config.asyncapi.outputPath\n );\n },\n async prepare() {\n const generator = new Generator(\n this.config.asyncapi.templateName,\n this.config.asyncapi.outputPath,\n this.config.asyncapi\n );\n\n await generator.generate(this.config.asyncapi.document);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA6CA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,UAAU,KAAK,SAAS;IACtB,QAAQ,UACN,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,cACD;IACD,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OACE,KAAK,OAAO,SAAS,iBACrB,KAAK,OAAO,aAAa,WACzB,KAAK,OAAO,aAAa;IAC3B,WAAW,UAAU,KAAK,cAAc,WAAW;IACpD,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,OAAI,CAAC,KAAK,OAAO,SAAS,OACxB,OAAM,IAAI,MACR,mIACD;AAGH,OACE,CAAC,KAAK,OAAO,SAAS,YACtB,CAAC,mBAAmB,KAAK,OAAO,SAAS,SAAS,CAElD,KAAI,mBAAmB,KAAK,OAAO,SAAS,OAAO,CACjD,MAAK,OAAO,SAAS,WAAW,KAAK,OAAO,SAAS;YAC5C,WAAW,KAAK,OAAO,SAAS,OAAO,UAAU,CAAC,EAAE;IAC7D,MAAM,WAAW,MAAM,KAAK,GAAG,KAC7B,KAAK,OAAO,SAAS,OAAO,UAAU,CACvC;AACD,QAAI,CAAC,SACH,OAAM,IAAI,MACR,6CAA6C,KAAK,OAAO,SAAS,OAAO,UAAU,GACpF;AAGH,SAAK,OAAO,SAAS,WAAW;UAC3B;IACL,MAAM,WAAW,MAAM,KAAK,MAC1B,KAAK,OAAO,SAAS,OAAO,UAAU,CACvC;AACD,QAAI,CAAC,SACH,OAAM,IAAI,MACR,kDAAkD,KAAK,OAAO,SAAS,OAAO,UAAU,GACzF;AAGH,SAAK,OAAO,SAAS,WAAW,MAAM,SAAS,MAAM;;AAIzD,OAAI,CAAC,KAAK,OAAO,SAAS,aACxB,OAAM,IAAI,MACR,gJACD;AAGH,OAAI,CAAC,KAAK,OAAO,SAAS,WACxB,OAAM,IAAI,MACR,4IACD;AAGH,OACE,CAAC,WAAW,KAAK,OAAO,SAAS,aAAa,IAC9C,CAAC,gBAAgB,KAAK,OAAO,SAAS,aAAa,CAEnD,MAAK,gBAAgB,KAAK,OAAO,SAAS,gBAAgB;AAG5D,QAAK,OAAO,SAAS,aAAa,kBAChC,MACA,KAAK,OAAO,SAAS,WACtB;;EAEH,MAAM,UAAU;AAOd,SANkB,IAAI,UACpB,KAAK,OAAO,SAAS,cACrB,KAAK,OAAO,SAAS,YACrB,KAAK,OAAO,SACb,CAEe,SAAS,KAAK,OAAO,SAAS,SAAS;;EAE1D;;AAGH,kBAAe"}
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 { Generator } from \"@asyncapi/generator\";\nimport { isAsyncAPIDocument } from \"@asyncapi/parser/esm/document\";\nimport { existsSync } from \"@stryke/fs/exists\";\nimport { isPackageExists } from \"@stryke/fs/package-fns\";\nimport { joinPaths } from \"@stryke/path/join\";\nimport defu from \"defu\";\nimport type { Plugin } from \"powerlines\";\nimport { replacePathTokens } from \"powerlines/plugin-utils\";\nimport type {\n AsyncAPIPluginContext,\n AsyncAPIPluginOptions\n} from \"./types/plugin\";\n\nexport * from \"./types\";\n\ndeclare module \"powerlines\" {\n interface Config {\n asyncapi?: AsyncAPIPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to integrate AsyncAPI for code generation.\n *\n * @param options - The plugin options.\n * @returns A Powerlines plugin instance.\n */\nexport const plugin = <\n TContext extends AsyncAPIPluginContext = AsyncAPIPluginContext\n>(\n options: AsyncAPIPluginOptions\n): Plugin<TContext> => {\n return {\n name: \"asyncapi\",\n config() {\n return {\n asyncapi: defu(options, {\n schema: joinPaths(\n this.workspaceConfig.workspaceRoot,\n this.config.root,\n \"schema.yaml\"\n ),\n output: \"string\",\n install: false,\n compile: false,\n debug:\n this.config.mode === \"development\" ||\n this.config.logLevel === \"debug\" ||\n this.config.logLevel === \"trace\",\n targetDir: joinPaths(this.builtinsPath, \"asyncapi\")\n })\n };\n },\n async configResolved() {\n if (!this.config.asyncapi.schema) {\n throw new Error(\n 'AsyncAPI schema is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.schema\".'\n );\n }\n\n if (\n !this.config.asyncapi.document ||\n !isAsyncAPIDocument(this.config.asyncapi.document)\n ) {\n if (isAsyncAPIDocument(this.config.asyncapi.schema)) {\n this.config.asyncapi.document = this.config.asyncapi.schema;\n } else if (existsSync(this.config.asyncapi.schema.toString())) {\n const document = await this.fs.read(\n this.config.asyncapi.schema.toString()\n );\n if (!document) {\n throw new Error(\n `Failed to read AsyncAPI schema from file: ${this.config.asyncapi.schema.toString()}`\n );\n }\n\n this.config.asyncapi.document = document;\n } else {\n const document = await this.fetch(\n this.config.asyncapi.schema.toString()\n );\n if (!document) {\n throw new Error(\n `Failed to fetch AsyncAPI schema from endpoint: ${this.config.asyncapi.schema.toString()}`\n );\n }\n\n this.config.asyncapi.document = await document.text();\n }\n }\n\n if (!this.config.asyncapi.templateName) {\n throw new Error(\n 'AsyncAPI template name is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.templateName\".'\n );\n }\n\n if (!this.config.asyncapi.outputPath) {\n throw new Error(\n 'AsyncAPI output path is required. Please specify it in the plugin options or your Powerlines configuration under \"asyncapi.outputPath\".'\n );\n }\n\n if (\n !existsSync(this.config.asyncapi.templateName) &&\n !isPackageExists(this.config.asyncapi.templateName)\n ) {\n this.devDependencies[this.config.asyncapi.templateName] = \"latest\";\n }\n\n this.config.asyncapi.outputPath = replacePathTokens(\n this,\n this.config.asyncapi.outputPath\n );\n },\n async prepare() {\n const generator = new Generator(\n this.config.asyncapi.templateName,\n this.config.asyncapi.outputPath,\n this.config.asyncapi\n );\n\n await generator.generate(this.config.asyncapi.document);\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;AA6CA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,UAAU,KAAK,SAAS;IACtB,QAAQ,UACN,KAAK,gBAAgB,eACrB,KAAK,OAAO,MACZ,cACD;IACD,QAAQ;IACR,SAAS;IACT,SAAS;IACT,OACE,KAAK,OAAO,SAAS,iBACrB,KAAK,OAAO,aAAa,WACzB,KAAK,OAAO,aAAa;IAC3B,WAAW,UAAU,KAAK,cAAc,WAAW;IACpD,CAAC,EACH;;EAEH,MAAM,iBAAiB;AACrB,OAAI,CAAC,KAAK,OAAO,SAAS,OACxB,OAAM,IAAI,MACR,mIACD;AAGH,OACE,CAAC,KAAK,OAAO,SAAS,YACtB,CAAC,mBAAmB,KAAK,OAAO,SAAS,SAAS,CAElD,KAAI,mBAAmB,KAAK,OAAO,SAAS,OAAO,CACjD,MAAK,OAAO,SAAS,WAAW,KAAK,OAAO,SAAS;YAC5C,WAAW,KAAK,OAAO,SAAS,OAAO,UAAU,CAAC,EAAE;IAC7D,MAAM,WAAW,MAAM,KAAK,GAAG,KAC7B,KAAK,OAAO,SAAS,OAAO,UAAU,CACvC;AACD,QAAI,CAAC,SACH,OAAM,IAAI,MACR,6CAA6C,KAAK,OAAO,SAAS,OAAO,UAAU,GACpF;AAGH,SAAK,OAAO,SAAS,WAAW;UAC3B;IACL,MAAM,WAAW,MAAM,KAAK,MAC1B,KAAK,OAAO,SAAS,OAAO,UAAU,CACvC;AACD,QAAI,CAAC,SACH,OAAM,IAAI,MACR,kDAAkD,KAAK,OAAO,SAAS,OAAO,UAAU,GACzF;AAGH,SAAK,OAAO,SAAS,WAAW,MAAM,SAAS,MAAM;;AAIzD,OAAI,CAAC,KAAK,OAAO,SAAS,aACxB,OAAM,IAAI,MACR,gJACD;AAGH,OAAI,CAAC,KAAK,OAAO,SAAS,WACxB,OAAM,IAAI,MACR,4IACD;AAGH,OACE,CAAC,WAAW,KAAK,OAAO,SAAS,aAAa,IAC9C,CAAC,gBAAgB,KAAK,OAAO,SAAS,aAAa,CAEnD,MAAK,gBAAgB,KAAK,OAAO,SAAS,gBAAgB;AAG5D,QAAK,OAAO,SAAS,aAAa,kBAChC,MACA,KAAK,OAAO,SAAS,WACtB;;EAEH,MAAM,UAAU;AAOd,SANkB,IAAI,UACpB,KAAK,OAAO,SAAS,cACrB,KAAK,OAAO,SAAS,YACrB,KAAK,OAAO,SACb,CAEe,SAAS,KAAK,OAAO,SAAS,SAAS;;EAE1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;UAsBiB,qBAAA;;AAAjB;;;;;;;EAuFY,MAAA,CAAA,EAAA,MAAA,GA9EQ,GA8ER,GA9Ec,gBA8EU;EAAG;;;;;;EAO3B,YAAA,EAAA,MAAA;EAA+B;;;;;;;AAS3C;EAC0B,UAAA,CAAA,EAAA,MAAA;EACtB;;;EACa,UAAA,CAAA,EAAA,MAAA;;;;mBArEE;;;;;;;;kBAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqCK;;KAGX,wBAAA,GAA2B;aAC1B,mBACT,SACE,KAAK;;KAIC,4BAAA,GAA+B;YAC/B,mBACR,SACE,KAAK;uBAEc;;;KAIb,8CACc,+BACtB,gCACA,cAAc"}
1
+ {"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UAsBiB,qBAAA;;AAAjB;;;;;;;EASE,MAAA,YAAkB,GAAA,GAAM,gBAAA;EA2EG;;;;;;EAnE3B,YAAA;EAeA;;;;;;;;EALA,UAAA;EA4BkD;;;EAvBlD,UAAA;EAoDA;;;EA/CA,cAAA,GAAiB,MAAA;EAkDP;;;EA7CV,gBAAA;EA8CW;;;EAzCX,aAAA,GAAgB,MAAA;EA0CN;;;;;;EAlCV,QAAA;IAAsB,GAAA;IAAa,IAAA;IAAe,KAAA;EAAA;EAuCZ;;;;;EAhCtC,UAAA;EAkCE;;;;;;;;EAxBF,KAAA;EAyBS;;;;;EAlBT,OAAA;EAwB+B;;;EAnB/B,kBAAA,GAAqB,MAAA;AAAA;AAAA,KAGX,wBAAA,GAA2B,UAAA;EACrC,QAAA,GAAW,gBAAA,GACT,QAAA,CACE,IAAA,CAAK,qBAAA;AAAA;AAAA,KAIC,4BAAA,GAA+B,cAAA;EACzC,QAAA,EAAU,gBAAA,GACR,QAAA,CACE,IAAA,CAAK,qBAAA;IAEL,QAAA,WAAmB,gBAAA;EAAA;AAAA;AAAA,KAIb,qBAAA,yBACc,4BAAA,GACtB,4BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;UAsBiB,qBAAA;;AAAjB;;;;;;;EAuFY,MAAA,CAAA,EAAA,MAAA,GA9EQ,GA8ER,GA9Ec,gBA8EU;EAAG;;;;;;EAO3B,YAAA,EAAA,MAAA;EAA+B;;;;;;;AAS3C;EAC0B,UAAA,CAAA,EAAA,MAAA;EACtB;;;EACa,UAAA,CAAA,EAAA,MAAA;;;;mBArEE;;;;;;;;kBAUD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAqCK;;KAGX,wBAAA,GAA2B;aAC1B,mBACT,SACE,KAAK;;KAIC,4BAAA,GAA+B;YAC/B,mBACR,SACE,KAAK;uBAEc;;;KAIb,8CACc,+BACtB,gCACA,cAAc"}
1
+ {"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;UAsBiB,qBAAA;;AAAjB;;;;;;;EASE,MAAA,YAAkB,GAAA,GAAM,gBAAA;EA2EG;;;;;;EAnE3B,YAAA;EAeA;;;;;;;;EALA,UAAA;EA4BkD;;;EAvBlD,UAAA;EAoDA;;;EA/CA,cAAA,GAAiB,MAAA;EAkDP;;;EA7CV,gBAAA;EA8CW;;;EAzCX,aAAA,GAAgB,MAAA;EA0CN;;;;;;EAlCV,QAAA;IAAsB,GAAA;IAAa,IAAA;IAAe,KAAA;EAAA;EAuCZ;;;;;EAhCtC,UAAA;EAkCE;;;;;;;;EAxBF,KAAA;EAyBS;;;;;EAlBT,OAAA;EAwB+B;;;EAnB/B,kBAAA,GAAqB,MAAA;AAAA;AAAA,KAGX,wBAAA,GAA2B,UAAA;EACrC,QAAA,GAAW,gBAAA,GACT,QAAA,CACE,IAAA,CAAK,qBAAA;AAAA;AAAA,KAIC,4BAAA,GAA+B,cAAA;EACzC,QAAA,EAAU,gBAAA,GACR,QAAA,CACE,IAAA,CAAK,qBAAA;IAEL,QAAA,WAAmB,gBAAA;EAAA;AAAA;AAAA,KAIb,qBAAA,yBACc,4BAAA,GACtB,4BAAA,IACA,aAAA,CAAc,eAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-asyncapi",
3
- "version": "0.1.345",
3
+ "version": "0.1.346",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code from AsyncAPI specifications.",
6
6
  "repository": {
@@ -55,7 +55,7 @@
55
55
  "default": "./dist/index.mjs"
56
56
  }
57
57
  },
58
- "./*": "./*",
58
+ "./package.json": "./package.json",
59
59
  "./types": {
60
60
  "require": {
61
61
  "types": "./dist/types/index.d.cts",
@@ -96,13 +96,13 @@
96
96
  "@stryke/http": "^0.12.49",
97
97
  "@stryke/path": "^0.26.19",
98
98
  "defu": "^6.1.4",
99
- "powerlines": "^0.41.6"
99
+ "powerlines": "^0.41.7"
100
100
  },
101
101
  "devDependencies": {
102
- "@powerlines/plugin-plugin": "^0.12.292",
102
+ "@powerlines/plugin-plugin": "^0.12.293",
103
103
  "@types/node": "^25.4.0"
104
104
  },
105
105
  "publishConfig": { "access": "public" },
106
106
  "types": "./dist/index.d.cts",
107
- "gitHead": "86bbe64da57a38d472b37261ca9d113171841a6c"
107
+ "gitHead": "2fb48143904805988bac9bdbc04cdc4a35ff398b"
108
108
  }