@powerlines/plugin-asyncapi 0.1.257 → 0.1.258
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/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/index.cjs +2 -30
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.cjs +0 -2
- package/dist/types/index.d.cts +1 -2
- package/dist/types/index.d.mts +1 -2
- package/dist/types/index.mjs +0 -3
- package/dist/types/plugin.cjs +0 -1
- package/dist/types/plugin.d.cts +102 -2
- package/dist/types/plugin.d.cts.map +1 -0
- package/dist/types/plugin.d.mts +102 -2
- package/dist/types/plugin.d.mts.map +1 -0
- package/dist/types/plugin.mjs +0 -2
- package/package.json +4 -4
- package/dist/index-BgAdqTbb.d.mts +0 -1
- package/dist/index-CEgs-Dz2.d.cts +0 -1
- package/dist/plugin-BkIdKIZ5.d.cts +0 -102
- package/dist/plugin-BkIdKIZ5.d.cts.map +0 -1
- package/dist/plugin-C3MaN5jp.mjs +0 -1
- package/dist/plugin-DHXHjv16.cjs +0 -0
- package/dist/plugin-DoJ3XQ3H.d.mts +0 -102
- package/dist/plugin-DoJ3XQ3H.d.mts.map +0 -1
- package/dist/types-CTUnla4x.mjs +0 -1
- package/dist/types-DHkg7xmX.cjs +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
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;
|
package/dist/index.cjs
CHANGED
|
@@ -1,40 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
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');
|
|
2
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
31
3
|
let __asyncapi_generator = require("@asyncapi/generator");
|
|
32
4
|
let __asyncapi_parser_esm_document = require("@asyncapi/parser/esm/document");
|
|
33
5
|
let __stryke_fs_exists = require("@stryke/fs/exists");
|
|
34
6
|
let __stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
35
7
|
let __stryke_path_join = require("@stryke/path/join");
|
|
36
8
|
let defu = require("defu");
|
|
37
|
-
defu = __toESM(defu);
|
|
9
|
+
defu = require_rolldown_runtime.__toESM(defu);
|
|
38
10
|
let powerlines_plugin_utils_paths = require("powerlines/plugin-utils/paths");
|
|
39
11
|
|
|
40
12
|
//#region src/index.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig } from "./types/plugin.cjs";
|
|
2
|
+
import "./types/index.cjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index
|
|
1
|
+
import { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig } from "./types/plugin.mjs";
|
|
2
|
+
import "./types/index.mjs";
|
|
3
3
|
import { Plugin } from "powerlines/types/plugin";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
package/dist/index.mjs
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 { 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 { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { AsyncAPIPluginContext, AsyncAPIPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\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.projectRoot,\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":"
|
|
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 { replacePathTokens } from \"powerlines/plugin-utils/paths\";\nimport { Plugin } from \"powerlines/types/plugin\";\nimport { AsyncAPIPluginContext, AsyncAPIPluginOptions } from \"./types/plugin\";\n\nexport * from \"./types\";\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.projectRoot,\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":";;;;;;;;;;;;;;;AAoCA,MAAa,UAGX,YACqB;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO,EACL,UAAU,KAAK,SAAS;IACtB,QAAQ,UACN,KAAK,gBAAgB,eACrB,KAAK,OAAO,aACZ,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"}
|
package/dist/types/index.cjs
CHANGED
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-CEgs-Dz2.cjs";
|
|
1
|
+
import { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig } from "./plugin.cjs";
|
|
3
2
|
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../index-BgAdqTbb.mjs";
|
|
1
|
+
import { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig } from "./plugin.mjs";
|
|
3
2
|
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig };
|
package/dist/types/index.mjs
CHANGED
package/dist/types/plugin.cjs
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
require('../plugin-DHXHjv16.cjs');
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,2 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { GeneratorOptions } from "@asyncapi/generator";
|
|
2
|
+
import { AsyncAPIDocument } from "@asyncapi/parser/esm/models/v3/asyncapi";
|
|
3
|
+
import { UserConfig } from "powerlines/types/config";
|
|
4
|
+
import { PluginContext } from "powerlines/types/context";
|
|
5
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
interface AsyncAPIPluginOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The path to the AsyncAPI schema file.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* This can be a string file path/remote URL string or a {@link URL} object.
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
16
|
+
*/
|
|
17
|
+
schema?: string | URL | AsyncAPIDocument;
|
|
18
|
+
/**
|
|
19
|
+
* The name of the AsyncAPI template to use.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* This can be a local path or a template package that will be installed by AsyncAPI.
|
|
23
|
+
*/
|
|
24
|
+
templateName: string;
|
|
25
|
+
/**
|
|
26
|
+
* The target directory where the generated files will be written.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* If using the default value, the files can be imported from "powerlines:asyncapi/fileName". 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.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue "\{builtinPath\}/asyncapi"
|
|
32
|
+
*/
|
|
33
|
+
outputPath?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Name of the file to use as the entry point for the rendering process. Use in case you want to use only a specific template file. Note: this potentially avoids rendering every file in the template.
|
|
36
|
+
*/
|
|
37
|
+
entrypoint?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Template parameters to pass to the AsyncAPI generator.
|
|
40
|
+
*/
|
|
41
|
+
templateParams?: Record<string, any>;
|
|
42
|
+
/**
|
|
43
|
+
* Glob patterns to prevent overwriting specific files.
|
|
44
|
+
*/
|
|
45
|
+
noOverwriteGlobs?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Object with hooks to disable. The key is a hook type. If key has "true" value, then the generator skips all hooks from the given type. If the value associated with a key is a string with the name of a single hook, then the generator skips only this single hook name. If the value associated with a key is an array of strings, then the generator skips only hooks from the array.
|
|
48
|
+
*/
|
|
49
|
+
disabledHooks?: Record<string, boolean | string | string[]>;
|
|
50
|
+
/**
|
|
51
|
+
* The registry to use for installing templates/dependencies.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* If no value is provided, the default registry configured for the repository will be used.
|
|
55
|
+
*/
|
|
56
|
+
registry?: string | {
|
|
57
|
+
url: string;
|
|
58
|
+
auth?: string;
|
|
59
|
+
token?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Whether to force write files even if they exist.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue true
|
|
65
|
+
*/
|
|
66
|
+
forceWrite?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to enable debug mode.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* When no value is provided, if `mode` is "development" or `logLevel` is "debug" or "trace", debug mode will be enabled by default.
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
75
|
+
debug?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to compile the template before generating files.
|
|
78
|
+
*
|
|
79
|
+
* @defaultValue false
|
|
80
|
+
*/
|
|
81
|
+
compile?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Optional parameter to map schema references from a base url to a local base folder e.g. url=https://schema.example.com/crm/ folder=./test/docs/ .
|
|
84
|
+
*/
|
|
85
|
+
mapBaseUrlToFolder?: Record<string, string>;
|
|
86
|
+
}
|
|
87
|
+
type AsyncAPIPluginUserConfig = UserConfig & {
|
|
88
|
+
asyncapi?: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">>;
|
|
89
|
+
};
|
|
90
|
+
type AsyncAPIPluginResolvedConfig = ResolvedConfig & {
|
|
91
|
+
asyncapi: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & {
|
|
92
|
+
document: string | AsyncAPIDocument;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
96
|
+
declare type __ΩAsyncAPIPluginOptions = any[];
|
|
97
|
+
declare type __ΩAsyncAPIPluginUserConfig = any[];
|
|
98
|
+
declare type __ΩAsyncAPIPluginResolvedConfig = any[];
|
|
99
|
+
declare type __ΩAsyncAPIPluginContext = any[];
|
|
100
|
+
//#endregion
|
|
101
|
+
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig };
|
|
102
|
+
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAwBiB,qBAAA;;AAAjB;;;;;;;EAuFY,MAAA,CAAA,EAAA,MAAA,GA9EQ,GA8ER,GA9Ec,gBA8EU;EAAG;;;;;;EAO3B,YAAA,EAAA,MAAA;EAA+B;;;;;;;AAS3C;EAEI,UAAA,CAAA,EAAA,MAAA;EAA+B;;;EAClB,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,8CAER,+BAA+B,gCAC/B,cAAc"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,2 +1,102 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { GeneratorOptions } from "@asyncapi/generator";
|
|
2
|
+
import { AsyncAPIDocument } from "@asyncapi/parser/esm/models/v3/asyncapi";
|
|
3
|
+
import { UserConfig } from "powerlines/types/config";
|
|
4
|
+
import { PluginContext } from "powerlines/types/context";
|
|
5
|
+
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
+
|
|
7
|
+
//#region src/types/plugin.d.ts
|
|
8
|
+
interface AsyncAPIPluginOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The path to the AsyncAPI schema file.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* This can be a string file path/remote URL string or a {@link URL} object.
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
16
|
+
*/
|
|
17
|
+
schema?: string | URL | AsyncAPIDocument;
|
|
18
|
+
/**
|
|
19
|
+
* The name of the AsyncAPI template to use.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
* This can be a local path or a template package that will be installed by AsyncAPI.
|
|
23
|
+
*/
|
|
24
|
+
templateName: string;
|
|
25
|
+
/**
|
|
26
|
+
* The target directory where the generated files will be written.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* If using the default value, the files can be imported from "powerlines:asyncapi/fileName". 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.
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue "\{builtinPath\}/asyncapi"
|
|
32
|
+
*/
|
|
33
|
+
outputPath?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Name of the file to use as the entry point for the rendering process. Use in case you want to use only a specific template file. Note: this potentially avoids rendering every file in the template.
|
|
36
|
+
*/
|
|
37
|
+
entrypoint?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Template parameters to pass to the AsyncAPI generator.
|
|
40
|
+
*/
|
|
41
|
+
templateParams?: Record<string, any>;
|
|
42
|
+
/**
|
|
43
|
+
* Glob patterns to prevent overwriting specific files.
|
|
44
|
+
*/
|
|
45
|
+
noOverwriteGlobs?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* Object with hooks to disable. The key is a hook type. If key has "true" value, then the generator skips all hooks from the given type. If the value associated with a key is a string with the name of a single hook, then the generator skips only this single hook name. If the value associated with a key is an array of strings, then the generator skips only hooks from the array.
|
|
48
|
+
*/
|
|
49
|
+
disabledHooks?: Record<string, boolean | string | string[]>;
|
|
50
|
+
/**
|
|
51
|
+
* The registry to use for installing templates/dependencies.
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* If no value is provided, the default registry configured for the repository will be used.
|
|
55
|
+
*/
|
|
56
|
+
registry?: string | {
|
|
57
|
+
url: string;
|
|
58
|
+
auth?: string;
|
|
59
|
+
token?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Whether to force write files even if they exist.
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue true
|
|
65
|
+
*/
|
|
66
|
+
forceWrite?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to enable debug mode.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* When no value is provided, if `mode` is "development" or `logLevel` is "debug" or "trace", debug mode will be enabled by default.
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
75
|
+
debug?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Whether to compile the template before generating files.
|
|
78
|
+
*
|
|
79
|
+
* @defaultValue false
|
|
80
|
+
*/
|
|
81
|
+
compile?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Optional parameter to map schema references from a base url to a local base folder e.g. url=https://schema.example.com/crm/ folder=./test/docs/ .
|
|
84
|
+
*/
|
|
85
|
+
mapBaseUrlToFolder?: Record<string, string>;
|
|
86
|
+
}
|
|
87
|
+
type AsyncAPIPluginUserConfig = UserConfig & {
|
|
88
|
+
asyncapi?: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">>;
|
|
89
|
+
};
|
|
90
|
+
type AsyncAPIPluginResolvedConfig = ResolvedConfig & {
|
|
91
|
+
asyncapi: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & {
|
|
92
|
+
document: string | AsyncAPIDocument;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
96
|
+
declare type __ΩAsyncAPIPluginOptions = any[];
|
|
97
|
+
declare type __ΩAsyncAPIPluginUserConfig = any[];
|
|
98
|
+
declare type __ΩAsyncAPIPluginResolvedConfig = any[];
|
|
99
|
+
declare type __ΩAsyncAPIPluginContext = any[];
|
|
100
|
+
//#endregion
|
|
101
|
+
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, __ΩAsyncAPIPluginContext, __ΩAsyncAPIPluginOptions, __ΩAsyncAPIPluginResolvedConfig, __ΩAsyncAPIPluginUserConfig };
|
|
102
|
+
//# sourceMappingURL=plugin.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.mts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAwBiB,qBAAA;;AAAjB;;;;;;;EAuFY,MAAA,CAAA,EAAA,MAAA,GA9EQ,GA8ER,GA9Ec,gBA8EU;EAAG;;;;;;EAO3B,YAAA,EAAA,MAAA;EAA+B;;;;;;;AAS3C;EAEI,UAAA,CAAA,EAAA,MAAA;EAA+B;;;EAClB,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,8CAER,+BAA+B,gCAC/B,cAAc"}
|
package/dist/types/plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-asyncapi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.258",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from AsyncAPI specifications.",
|
|
6
6
|
"repository": {
|
|
@@ -96,13 +96,13 @@
|
|
|
96
96
|
"@stryke/http": "^0.12.33",
|
|
97
97
|
"@stryke/path": "^0.26.4",
|
|
98
98
|
"defu": "^6.1.4",
|
|
99
|
-
"powerlines": "^0.38.
|
|
99
|
+
"powerlines": "^0.38.21"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
102
|
+
"@powerlines/plugin-plugin": "^0.12.205",
|
|
103
103
|
"@types/node": "^24.10.9"
|
|
104
104
|
},
|
|
105
105
|
"publishConfig": { "access": "public" },
|
|
106
106
|
"types": "./dist/index.d.cts",
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "6000a15bf3fbc1b7eaaf967088c68eef9949786a"
|
|
108
108
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { GeneratorOptions } from "@asyncapi/generator";
|
|
2
|
-
import { AsyncAPIDocument } from "@asyncapi/parser/esm/models/v3/asyncapi";
|
|
3
|
-
import { UserConfig } from "powerlines/types/config";
|
|
4
|
-
import { PluginContext } from "powerlines/types/context";
|
|
5
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
-
|
|
7
|
-
//#region src/types/plugin.d.ts
|
|
8
|
-
interface AsyncAPIPluginOptions {
|
|
9
|
-
/**
|
|
10
|
-
* The path to the AsyncAPI schema file.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* This can be a string file path/remote URL string or a {@link URL} object.
|
|
14
|
-
*
|
|
15
|
-
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
16
|
-
*/
|
|
17
|
-
schema?: string | URL | AsyncAPIDocument;
|
|
18
|
-
/**
|
|
19
|
-
* The name of the AsyncAPI template to use.
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
* This can be a local path or a template package that will be installed by AsyncAPI.
|
|
23
|
-
*/
|
|
24
|
-
templateName: string;
|
|
25
|
-
/**
|
|
26
|
-
* The target directory where the generated files will be written.
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
* If using the default value, the files can be imported from "powerlines:asyncapi/fileName". 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.
|
|
30
|
-
*
|
|
31
|
-
* @defaultValue "\{builtinPath\}/asyncapi"
|
|
32
|
-
*/
|
|
33
|
-
outputPath?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Name of the file to use as the entry point for the rendering process. Use in case you want to use only a specific template file. Note: this potentially avoids rendering every file in the template.
|
|
36
|
-
*/
|
|
37
|
-
entrypoint?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Template parameters to pass to the AsyncAPI generator.
|
|
40
|
-
*/
|
|
41
|
-
templateParams?: Record<string, any>;
|
|
42
|
-
/**
|
|
43
|
-
* Glob patterns to prevent overwriting specific files.
|
|
44
|
-
*/
|
|
45
|
-
noOverwriteGlobs?: string[];
|
|
46
|
-
/**
|
|
47
|
-
* Object with hooks to disable. The key is a hook type. If key has "true" value, then the generator skips all hooks from the given type. If the value associated with a key is a string with the name of a single hook, then the generator skips only this single hook name. If the value associated with a key is an array of strings, then the generator skips only hooks from the array.
|
|
48
|
-
*/
|
|
49
|
-
disabledHooks?: Record<string, boolean | string | string[]>;
|
|
50
|
-
/**
|
|
51
|
-
* The registry to use for installing templates/dependencies.
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* If no value is provided, the default registry configured for the repository will be used.
|
|
55
|
-
*/
|
|
56
|
-
registry?: string | {
|
|
57
|
-
url: string;
|
|
58
|
-
auth?: string;
|
|
59
|
-
token?: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Whether to force write files even if they exist.
|
|
63
|
-
*
|
|
64
|
-
* @defaultValue true
|
|
65
|
-
*/
|
|
66
|
-
forceWrite?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Whether to enable debug mode.
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* When no value is provided, if `mode` is "development" or `logLevel` is "debug" or "trace", debug mode will be enabled by default.
|
|
72
|
-
*
|
|
73
|
-
* @defaultValue false
|
|
74
|
-
*/
|
|
75
|
-
debug?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Whether to compile the template before generating files.
|
|
78
|
-
*
|
|
79
|
-
* @defaultValue false
|
|
80
|
-
*/
|
|
81
|
-
compile?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Optional parameter to map schema references from a base url to a local base folder e.g. url=https://schema.example.com/crm/ folder=./test/docs/ .
|
|
84
|
-
*/
|
|
85
|
-
mapBaseUrlToFolder?: Record<string, string>;
|
|
86
|
-
}
|
|
87
|
-
type AsyncAPIPluginUserConfig = UserConfig & {
|
|
88
|
-
asyncapi?: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">>;
|
|
89
|
-
};
|
|
90
|
-
type AsyncAPIPluginResolvedConfig = ResolvedConfig & {
|
|
91
|
-
asyncapi: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & {
|
|
92
|
-
document: string | AsyncAPIDocument;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
96
|
-
declare type __ΩAsyncAPIPluginOptions = any[];
|
|
97
|
-
declare type __ΩAsyncAPIPluginUserConfig = any[];
|
|
98
|
-
declare type __ΩAsyncAPIPluginResolvedConfig = any[];
|
|
99
|
-
declare type __ΩAsyncAPIPluginContext = any[];
|
|
100
|
-
//#endregion
|
|
101
|
-
export { __ΩAsyncAPIPluginContext as a, __ΩAsyncAPIPluginUserConfig as c, AsyncAPIPluginUserConfig as i, AsyncAPIPluginOptions as n, __ΩAsyncAPIPluginOptions as o, AsyncAPIPluginResolvedConfig as r, __ΩAsyncAPIPluginResolvedConfig as s, AsyncAPIPluginContext as t };
|
|
102
|
-
//# sourceMappingURL=plugin-BkIdKIZ5.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-BkIdKIZ5.d.cts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAwBiB,qBAAA;;AAAjB;;;;;;;EAuFY,MAAA,CAAA,EAAA,MAAA,GA9EQ,GA8ER,GA9Ec,gBA8EU;EAAG;;;;;;EAO3B,YAAA,EAAA,MAAA;EAA+B;;;;;;;AAS3C;EAEI,UAAA,CAAA,EAAA,MAAA;EAA+B;;;EAClB,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,8CAER,+BAA+B,gCAC/B,cAAc"}
|
package/dist/plugin-C3MaN5jp.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/plugin-DHXHjv16.cjs
DELETED
|
File without changes
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { GeneratorOptions } from "@asyncapi/generator";
|
|
2
|
-
import { AsyncAPIDocument } from "@asyncapi/parser/esm/models/v3/asyncapi";
|
|
3
|
-
import { UserConfig } from "powerlines/types/config";
|
|
4
|
-
import { PluginContext } from "powerlines/types/context";
|
|
5
|
-
import { ResolvedConfig } from "powerlines/types/resolved";
|
|
6
|
-
|
|
7
|
-
//#region src/types/plugin.d.ts
|
|
8
|
-
interface AsyncAPIPluginOptions {
|
|
9
|
-
/**
|
|
10
|
-
* The path to the AsyncAPI schema file.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* This can be a string file path/remote URL string or a {@link URL} object.
|
|
14
|
-
*
|
|
15
|
-
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
16
|
-
*/
|
|
17
|
-
schema?: string | URL | AsyncAPIDocument;
|
|
18
|
-
/**
|
|
19
|
-
* The name of the AsyncAPI template to use.
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
* This can be a local path or a template package that will be installed by AsyncAPI.
|
|
23
|
-
*/
|
|
24
|
-
templateName: string;
|
|
25
|
-
/**
|
|
26
|
-
* The target directory where the generated files will be written.
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
* If using the default value, the files can be imported from "powerlines:asyncapi/fileName". 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.
|
|
30
|
-
*
|
|
31
|
-
* @defaultValue "\{builtinPath\}/asyncapi"
|
|
32
|
-
*/
|
|
33
|
-
outputPath?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Name of the file to use as the entry point for the rendering process. Use in case you want to use only a specific template file. Note: this potentially avoids rendering every file in the template.
|
|
36
|
-
*/
|
|
37
|
-
entrypoint?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Template parameters to pass to the AsyncAPI generator.
|
|
40
|
-
*/
|
|
41
|
-
templateParams?: Record<string, any>;
|
|
42
|
-
/**
|
|
43
|
-
* Glob patterns to prevent overwriting specific files.
|
|
44
|
-
*/
|
|
45
|
-
noOverwriteGlobs?: string[];
|
|
46
|
-
/**
|
|
47
|
-
* Object with hooks to disable. The key is a hook type. If key has "true" value, then the generator skips all hooks from the given type. If the value associated with a key is a string with the name of a single hook, then the generator skips only this single hook name. If the value associated with a key is an array of strings, then the generator skips only hooks from the array.
|
|
48
|
-
*/
|
|
49
|
-
disabledHooks?: Record<string, boolean | string | string[]>;
|
|
50
|
-
/**
|
|
51
|
-
* The registry to use for installing templates/dependencies.
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* If no value is provided, the default registry configured for the repository will be used.
|
|
55
|
-
*/
|
|
56
|
-
registry?: string | {
|
|
57
|
-
url: string;
|
|
58
|
-
auth?: string;
|
|
59
|
-
token?: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Whether to force write files even if they exist.
|
|
63
|
-
*
|
|
64
|
-
* @defaultValue true
|
|
65
|
-
*/
|
|
66
|
-
forceWrite?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Whether to enable debug mode.
|
|
69
|
-
*
|
|
70
|
-
* @remarks
|
|
71
|
-
* When no value is provided, if `mode` is "development" or `logLevel` is "debug" or "trace", debug mode will be enabled by default.
|
|
72
|
-
*
|
|
73
|
-
* @defaultValue false
|
|
74
|
-
*/
|
|
75
|
-
debug?: boolean;
|
|
76
|
-
/**
|
|
77
|
-
* Whether to compile the template before generating files.
|
|
78
|
-
*
|
|
79
|
-
* @defaultValue false
|
|
80
|
-
*/
|
|
81
|
-
compile?: boolean;
|
|
82
|
-
/**
|
|
83
|
-
* Optional parameter to map schema references from a base url to a local base folder e.g. url=https://schema.example.com/crm/ folder=./test/docs/ .
|
|
84
|
-
*/
|
|
85
|
-
mapBaseUrlToFolder?: Record<string, string>;
|
|
86
|
-
}
|
|
87
|
-
type AsyncAPIPluginUserConfig = UserConfig & {
|
|
88
|
-
asyncapi?: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">>;
|
|
89
|
-
};
|
|
90
|
-
type AsyncAPIPluginResolvedConfig = ResolvedConfig & {
|
|
91
|
-
asyncapi: GeneratorOptions & Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & {
|
|
92
|
-
document: string | AsyncAPIDocument;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
96
|
-
declare type __ΩAsyncAPIPluginOptions = any[];
|
|
97
|
-
declare type __ΩAsyncAPIPluginUserConfig = any[];
|
|
98
|
-
declare type __ΩAsyncAPIPluginResolvedConfig = any[];
|
|
99
|
-
declare type __ΩAsyncAPIPluginContext = any[];
|
|
100
|
-
//#endregion
|
|
101
|
-
export { __ΩAsyncAPIPluginContext as a, __ΩAsyncAPIPluginUserConfig as c, AsyncAPIPluginUserConfig as i, AsyncAPIPluginOptions as n, __ΩAsyncAPIPluginOptions as o, AsyncAPIPluginResolvedConfig as r, __ΩAsyncAPIPluginResolvedConfig as s, AsyncAPIPluginContext as t };
|
|
102
|
-
//# sourceMappingURL=plugin-DoJ3XQ3H.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-DoJ3XQ3H.d.mts","names":[],"sources":["../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;;UAwBiB,qBAAA;;AAAjB;;;;;;;EAuFY,MAAA,CAAA,EAAA,MAAA,GA9EQ,GA8ER,GA9Ec,gBA8EU;EAAG;;;;;;EAO3B,YAAA,EAAA,MAAA;EAA+B;;;;;;;AAS3C;EAEI,UAAA,CAAA,EAAA,MAAA;EAA+B;;;EAClB,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,8CAER,+BAA+B,gCAC/B,cAAc"}
|
package/dist/types-CTUnla4x.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
package/dist/types-DHkg7xmX.cjs
DELETED
|
File without changes
|