@powerlines/plugin-asyncapi 0.1.609 → 0.1.610
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +35 -11
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +33 -11
- package/dist/types/plugin.d.cts +28 -12
- package/dist/types/plugin.d.cts.map +1 -1
- package/dist/types/plugin.d.mts +28 -12
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
2
|
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
3
|
-
let
|
|
4
|
-
|
|
3
|
+
let _power_plant_asyncapi = require("@power-plant/asyncapi");
|
|
4
|
+
_power_plant_asyncapi = require_runtime.__toESM(_power_plant_asyncapi, 1);
|
|
5
|
+
let _powerlines_plugin_power_plant = require("@powerlines/plugin-power-plant");
|
|
6
|
+
_powerlines_plugin_power_plant = require_runtime.__toESM(_powerlines_plugin_power_plant, 1);
|
|
5
7
|
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
6
8
|
let _stryke_fs_package_fns = require("@stryke/fs/package-fns");
|
|
7
9
|
let _stryke_path_join = require("@stryke/path/join");
|
|
@@ -10,14 +12,18 @@ defu = require_runtime.__toESM(defu, 1);
|
|
|
10
12
|
let powerlines_plugin_utils = require("powerlines/plugin-utils");
|
|
11
13
|
|
|
12
14
|
//#region src/index.ts
|
|
15
|
+
function isLoadedDocument(value) {
|
|
16
|
+
return typeof value === "object" && value !== null && !(value instanceof URL);
|
|
17
|
+
}
|
|
13
18
|
/**
|
|
14
|
-
* A Powerlines plugin to integrate AsyncAPI for code generation.
|
|
19
|
+
* A Powerlines plugin to integrate AsyncAPI for code generation via Power Plant.
|
|
15
20
|
*
|
|
16
21
|
* @param options - The plugin options.
|
|
17
|
-
* @returns
|
|
22
|
+
* @returns Powerlines plugin instances.
|
|
18
23
|
*/
|
|
19
24
|
const plugin = (options) => {
|
|
20
|
-
|
|
25
|
+
const generatorConfig = { ..._power_plant_asyncapi.default };
|
|
26
|
+
return [(0, _powerlines_plugin_power_plant.default)(generatorConfig), {
|
|
21
27
|
name: "asyncapi",
|
|
22
28
|
config() {
|
|
23
29
|
return { asyncapi: (0, defu.default)(options, {
|
|
@@ -26,12 +32,12 @@ const plugin = (options) => {
|
|
|
26
32
|
install: false,
|
|
27
33
|
compile: false,
|
|
28
34
|
debug: this.config.mode === "development" || this.config.logLevel.general === "debug" || this.config.logLevel.general === "trace",
|
|
29
|
-
|
|
35
|
+
outputPath: (0, _stryke_path_join.joinPaths)(this.builtinsPath, "asyncapi")
|
|
30
36
|
}) };
|
|
31
37
|
},
|
|
32
38
|
async configResolved() {
|
|
33
39
|
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 || !(
|
|
40
|
+
if (!this.config.asyncapi.document || !isLoadedDocument(this.config.asyncapi.document)) if (isLoadedDocument(this.config.asyncapi.schema)) this.config.asyncapi.document = this.config.asyncapi.schema;
|
|
35
41
|
else if ((0, _stryke_fs_exists.existsSync)(this.config.asyncapi.schema.toString())) {
|
|
36
42
|
const document = await this.fs.read(this.config.asyncapi.schema.toString());
|
|
37
43
|
if (!document) throw new Error(`Failed to read AsyncAPI schema from file: ${this.config.asyncapi.schema.toString()}`);
|
|
@@ -45,11 +51,29 @@ const plugin = (options) => {
|
|
|
45
51
|
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
52
|
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
53
|
this.config.asyncapi.outputPath = (0, powerlines_plugin_utils.replacePathTokens)(this, this.config.asyncapi.outputPath);
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
const { schema: _schema, document, templateName, outputPath, entrypoint, templateParams, noOverwriteGlobs, disabledHooks, registry, forceWrite, debug, compile, mapBaseUrlToFolder, ...rest } = this.config.asyncapi;
|
|
55
|
+
this.config.powerplant = {
|
|
56
|
+
...generatorConfig,
|
|
57
|
+
input: document
|
|
58
|
+
};
|
|
59
|
+
this.powerplant.options = {
|
|
60
|
+
...rest,
|
|
61
|
+
templateName,
|
|
62
|
+
outputPath,
|
|
63
|
+
entrypoint,
|
|
64
|
+
templateParams,
|
|
65
|
+
noOverwriteGlobs,
|
|
66
|
+
disabledHooks,
|
|
67
|
+
registry,
|
|
68
|
+
forceWrite,
|
|
69
|
+
debug,
|
|
70
|
+
compile,
|
|
71
|
+
mapBaseUrlToFolder,
|
|
72
|
+
output: "string",
|
|
73
|
+
install: false
|
|
74
|
+
};
|
|
51
75
|
}
|
|
52
|
-
};
|
|
76
|
+
}];
|
|
53
77
|
};
|
|
54
78
|
|
|
55
79
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -8,12 +8,12 @@ declare module "powerlines" {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* A Powerlines plugin to integrate AsyncAPI for code generation.
|
|
11
|
+
* A Powerlines plugin to integrate AsyncAPI for code generation via Power Plant.
|
|
12
12
|
*
|
|
13
13
|
* @param options - The plugin options.
|
|
14
|
-
* @returns
|
|
14
|
+
* @returns Powerlines plugin instances.
|
|
15
15
|
*/
|
|
16
|
-
declare const plugin: <TContext extends AsyncAPIPluginContext = AsyncAPIPluginContext>(options: AsyncAPIPluginOptions) => Plugin<TContext
|
|
16
|
+
declare const plugin: <TContext extends AsyncAPIPluginContext = AsyncAPIPluginContext>(options: AsyncAPIPluginOptions) => Plugin<TContext>[];
|
|
17
17
|
//#endregion
|
|
18
18
|
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, plugin as default, plugin };
|
|
19
19
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;YAoCY;IACR,WAAW;;;;;;;;;cAcF,SACX,iBAAiB,wBAAwB,uBAEzC,SAAS,0BACR,OAAO"}
|
package/dist/index.d.mts
CHANGED
|
@@ -8,12 +8,12 @@ declare module "powerlines" {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* A Powerlines plugin to integrate AsyncAPI for code generation.
|
|
11
|
+
* A Powerlines plugin to integrate AsyncAPI for code generation via Power Plant.
|
|
12
12
|
*
|
|
13
13
|
* @param options - The plugin options.
|
|
14
|
-
* @returns
|
|
14
|
+
* @returns Powerlines plugin instances.
|
|
15
15
|
*/
|
|
16
|
-
declare const plugin: <TContext extends AsyncAPIPluginContext = AsyncAPIPluginContext>(options: AsyncAPIPluginOptions) => Plugin<TContext
|
|
16
|
+
declare const plugin: <TContext extends AsyncAPIPluginContext = AsyncAPIPluginContext>(options: AsyncAPIPluginOptions) => Plugin<TContext>[];
|
|
17
17
|
//#endregion
|
|
18
18
|
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig, plugin as default, plugin };
|
|
19
19
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import asyncapiGenerator from "@power-plant/asyncapi";
|
|
2
|
+
import powerPlant from "@powerlines/plugin-power-plant";
|
|
3
3
|
import { existsSync } from "@stryke/fs/exists";
|
|
4
4
|
import { isPackageExists } from "@stryke/fs/package-fns";
|
|
5
5
|
import { joinPaths } from "@stryke/path/join";
|
|
@@ -7,14 +7,18 @@ import defu from "defu";
|
|
|
7
7
|
import { replacePathTokens } from "powerlines/plugin-utils";
|
|
8
8
|
|
|
9
9
|
//#region src/index.ts
|
|
10
|
+
function isLoadedDocument(value) {
|
|
11
|
+
return typeof value === "object" && value !== null && !(value instanceof URL);
|
|
12
|
+
}
|
|
10
13
|
/**
|
|
11
|
-
* A Powerlines plugin to integrate AsyncAPI for code generation.
|
|
14
|
+
* A Powerlines plugin to integrate AsyncAPI for code generation via Power Plant.
|
|
12
15
|
*
|
|
13
16
|
* @param options - The plugin options.
|
|
14
|
-
* @returns
|
|
17
|
+
* @returns Powerlines plugin instances.
|
|
15
18
|
*/
|
|
16
19
|
const plugin = (options) => {
|
|
17
|
-
|
|
20
|
+
const generatorConfig = { ...asyncapiGenerator };
|
|
21
|
+
return [powerPlant(generatorConfig), {
|
|
18
22
|
name: "asyncapi",
|
|
19
23
|
config() {
|
|
20
24
|
return { asyncapi: defu(options, {
|
|
@@ -23,12 +27,12 @@ const plugin = (options) => {
|
|
|
23
27
|
install: false,
|
|
24
28
|
compile: false,
|
|
25
29
|
debug: this.config.mode === "development" || this.config.logLevel.general === "debug" || this.config.logLevel.general === "trace",
|
|
26
|
-
|
|
30
|
+
outputPath: joinPaths(this.builtinsPath, "asyncapi")
|
|
27
31
|
}) };
|
|
28
32
|
},
|
|
29
33
|
async configResolved() {
|
|
30
34
|
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\".");
|
|
31
|
-
if (!this.config.asyncapi.document || !
|
|
35
|
+
if (!this.config.asyncapi.document || !isLoadedDocument(this.config.asyncapi.document)) if (isLoadedDocument(this.config.asyncapi.schema)) this.config.asyncapi.document = this.config.asyncapi.schema;
|
|
32
36
|
else if (existsSync(this.config.asyncapi.schema.toString())) {
|
|
33
37
|
const document = await this.fs.read(this.config.asyncapi.schema.toString());
|
|
34
38
|
if (!document) throw new Error(`Failed to read AsyncAPI schema from file: ${this.config.asyncapi.schema.toString()}`);
|
|
@@ -42,11 +46,29 @@ const plugin = (options) => {
|
|
|
42
46
|
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\".");
|
|
43
47
|
if (!existsSync(this.config.asyncapi.templateName) && !isPackageExists(this.config.asyncapi.templateName)) this.devDependencies[this.config.asyncapi.templateName] = "latest";
|
|
44
48
|
this.config.asyncapi.outputPath = replacePathTokens(this, this.config.asyncapi.outputPath);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
const { schema: _schema, document, templateName, outputPath, entrypoint, templateParams, noOverwriteGlobs, disabledHooks, registry, forceWrite, debug, compile, mapBaseUrlToFolder, ...rest } = this.config.asyncapi;
|
|
50
|
+
this.config.powerplant = {
|
|
51
|
+
...generatorConfig,
|
|
52
|
+
input: document
|
|
53
|
+
};
|
|
54
|
+
this.powerplant.options = {
|
|
55
|
+
...rest,
|
|
56
|
+
templateName,
|
|
57
|
+
outputPath,
|
|
58
|
+
entrypoint,
|
|
59
|
+
templateParams,
|
|
60
|
+
noOverwriteGlobs,
|
|
61
|
+
disabledHooks,
|
|
62
|
+
registry,
|
|
63
|
+
forceWrite,
|
|
64
|
+
debug,
|
|
65
|
+
compile,
|
|
66
|
+
mapBaseUrlToFolder,
|
|
67
|
+
output: "string",
|
|
68
|
+
install: false
|
|
69
|
+
};
|
|
48
70
|
}
|
|
49
|
-
};
|
|
71
|
+
}];
|
|
50
72
|
};
|
|
51
73
|
|
|
52
74
|
//#endregion
|
package/dist/types/plugin.d.cts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ResolvedConfig, UserConfig } from "powerlines";
|
|
2
|
+
import { Options } from "@power-plant/asyncapi";
|
|
3
|
+
import { PowerPlantPluginContext, PowerPlantPluginResolvedConfig } from "@powerlines/plugin-power-plant/types/plugin";
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Options for the AsyncAPI Powerlines plugin.
|
|
7
|
+
*/
|
|
5
8
|
interface AsyncAPIPluginOptions {
|
|
6
9
|
/**
|
|
7
10
|
* The path to the AsyncAPI schema file.
|
|
8
11
|
*
|
|
9
12
|
* @remarks
|
|
10
|
-
* This can be a string file path/remote URL string
|
|
13
|
+
* This can be a string file path/remote URL string, a {@link URL} object, or an
|
|
14
|
+
* already-loaded AsyncAPI document.
|
|
11
15
|
*
|
|
12
16
|
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
13
17
|
*/
|
|
14
|
-
schema?: string | URL |
|
|
18
|
+
schema?: string | URL | Record<string, unknown>;
|
|
15
19
|
/**
|
|
16
20
|
* The name of the AsyncAPI template to use.
|
|
17
21
|
*
|
|
@@ -35,7 +39,7 @@ interface AsyncAPIPluginOptions {
|
|
|
35
39
|
/**
|
|
36
40
|
* Template parameters to pass to the AsyncAPI generator.
|
|
37
41
|
*/
|
|
38
|
-
templateParams?: Record<string,
|
|
42
|
+
templateParams?: Record<string, unknown>;
|
|
39
43
|
/**
|
|
40
44
|
* Glob patterns to prevent overwriting specific files.
|
|
41
45
|
*/
|
|
@@ -51,7 +55,7 @@ interface AsyncAPIPluginOptions {
|
|
|
51
55
|
* If no value is provided, the default registry configured for the repository will be used.
|
|
52
56
|
*/
|
|
53
57
|
registry?: string | {
|
|
54
|
-
url
|
|
58
|
+
url?: string;
|
|
55
59
|
auth?: string;
|
|
56
60
|
token?: string;
|
|
57
61
|
};
|
|
@@ -80,16 +84,28 @@ interface AsyncAPIPluginOptions {
|
|
|
80
84
|
* 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/ .
|
|
81
85
|
*/
|
|
82
86
|
mapBaseUrlToFolder?: Record<string, string>;
|
|
87
|
+
/**
|
|
88
|
+
* Type of output. Can be either `'fs'` or `'string'`.
|
|
89
|
+
*
|
|
90
|
+
* @defaultValue "string"
|
|
91
|
+
*/
|
|
92
|
+
output?: "fs" | "string";
|
|
93
|
+
/**
|
|
94
|
+
* Install the template and its dependencies, even when the template has already been installed.
|
|
95
|
+
*
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
install?: boolean;
|
|
83
99
|
}
|
|
84
100
|
type AsyncAPIPluginUserConfig = UserConfig & {
|
|
85
|
-
asyncapi?:
|
|
101
|
+
asyncapi?: Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & Omit<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">;
|
|
86
102
|
};
|
|
87
|
-
type AsyncAPIPluginResolvedConfig = ResolvedConfig & {
|
|
88
|
-
asyncapi:
|
|
89
|
-
document: string |
|
|
103
|
+
type AsyncAPIPluginResolvedConfig = ResolvedConfig & PowerPlantPluginResolvedConfig<Record<string, unknown>, Options> & {
|
|
104
|
+
asyncapi: Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & Omit<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath"> & {
|
|
105
|
+
document: string | Record<string, unknown>;
|
|
90
106
|
};
|
|
91
107
|
};
|
|
92
|
-
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> =
|
|
108
|
+
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> = PowerPlantPluginContext<Record<string, unknown>, Options, TResolvedConfig>;
|
|
93
109
|
//#endregion
|
|
94
110
|
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig };
|
|
95
111
|
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"mappings":";;;;;;;UA4BiB;;;;;;;;;;EAUf,kBAAkB,MAAM;;;;;;;EAQxB;;;;;;;;;EAUA;;;;EAKA;;;;EAKA,iBAAiB;;;;EAKjB;;;;EAKA,gBAAgB;;;;;;;EAQhB;IAAsB;IAAc;IAAe;;;;;;;EAOnD;;;;;;;;;EAUA;;;;;;EAOA;;;;EAKA,qBAAqB;;;;;;EAOrB;;;;;;EAOA;;KAGU,2BAA2B;EACrC,WAAW,SACT,KAAK,oEAEL,KAAK;;KAGG,+BAA+B,iBACzC,+BACE,yBACA;EAEA,UAAU,SACR,KAAK,oEAEL,KAAK;IACH,mBAAmB;;;KAIf,sBACV,wBAAwB,+BACtB,gCACA,wBACF,yBACA,SACA"}
|
package/dist/types/plugin.d.mts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Options } from "@power-plant/asyncapi";
|
|
2
|
+
import { ResolvedConfig, UserConfig } from "powerlines";
|
|
3
|
+
import { PowerPlantPluginContext, PowerPlantPluginResolvedConfig } from "@powerlines/plugin-power-plant/types/plugin";
|
|
4
4
|
//#region src/types/plugin.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Options for the AsyncAPI Powerlines plugin.
|
|
7
|
+
*/
|
|
5
8
|
interface AsyncAPIPluginOptions {
|
|
6
9
|
/**
|
|
7
10
|
* The path to the AsyncAPI schema file.
|
|
8
11
|
*
|
|
9
12
|
* @remarks
|
|
10
|
-
* This can be a string file path/remote URL string
|
|
13
|
+
* This can be a string file path/remote URL string, a {@link URL} object, or an
|
|
14
|
+
* already-loaded AsyncAPI document.
|
|
11
15
|
*
|
|
12
16
|
* @defaultValue "\{projectRoot\}/schema.yaml"
|
|
13
17
|
*/
|
|
14
|
-
schema?: string | URL |
|
|
18
|
+
schema?: string | URL | Record<string, unknown>;
|
|
15
19
|
/**
|
|
16
20
|
* The name of the AsyncAPI template to use.
|
|
17
21
|
*
|
|
@@ -35,7 +39,7 @@ interface AsyncAPIPluginOptions {
|
|
|
35
39
|
/**
|
|
36
40
|
* Template parameters to pass to the AsyncAPI generator.
|
|
37
41
|
*/
|
|
38
|
-
templateParams?: Record<string,
|
|
42
|
+
templateParams?: Record<string, unknown>;
|
|
39
43
|
/**
|
|
40
44
|
* Glob patterns to prevent overwriting specific files.
|
|
41
45
|
*/
|
|
@@ -51,7 +55,7 @@ interface AsyncAPIPluginOptions {
|
|
|
51
55
|
* If no value is provided, the default registry configured for the repository will be used.
|
|
52
56
|
*/
|
|
53
57
|
registry?: string | {
|
|
54
|
-
url
|
|
58
|
+
url?: string;
|
|
55
59
|
auth?: string;
|
|
56
60
|
token?: string;
|
|
57
61
|
};
|
|
@@ -80,16 +84,28 @@ interface AsyncAPIPluginOptions {
|
|
|
80
84
|
* 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/ .
|
|
81
85
|
*/
|
|
82
86
|
mapBaseUrlToFolder?: Record<string, string>;
|
|
87
|
+
/**
|
|
88
|
+
* Type of output. Can be either `'fs'` or `'string'`.
|
|
89
|
+
*
|
|
90
|
+
* @defaultValue "string"
|
|
91
|
+
*/
|
|
92
|
+
output?: "fs" | "string";
|
|
93
|
+
/**
|
|
94
|
+
* Install the template and its dependencies, even when the template has already been installed.
|
|
95
|
+
*
|
|
96
|
+
* @defaultValue false
|
|
97
|
+
*/
|
|
98
|
+
install?: boolean;
|
|
83
99
|
}
|
|
84
100
|
type AsyncAPIPluginUserConfig = UserConfig & {
|
|
85
|
-
asyncapi?:
|
|
101
|
+
asyncapi?: Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & Omit<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">;
|
|
86
102
|
};
|
|
87
|
-
type AsyncAPIPluginResolvedConfig = ResolvedConfig & {
|
|
88
|
-
asyncapi:
|
|
89
|
-
document: string |
|
|
103
|
+
type AsyncAPIPluginResolvedConfig = ResolvedConfig & PowerPlantPluginResolvedConfig<Record<string, unknown>, Options> & {
|
|
104
|
+
asyncapi: Required<Pick<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath">> & Omit<AsyncAPIPluginOptions, "schema" | "templateName" | "outputPath"> & {
|
|
105
|
+
document: string | Record<string, unknown>;
|
|
90
106
|
};
|
|
91
107
|
};
|
|
92
|
-
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> =
|
|
108
|
+
type AsyncAPIPluginContext<TResolvedConfig extends AsyncAPIPluginResolvedConfig = AsyncAPIPluginResolvedConfig> = PowerPlantPluginContext<Record<string, unknown>, Options, TResolvedConfig>;
|
|
93
109
|
//#endregion
|
|
94
110
|
export { AsyncAPIPluginContext, AsyncAPIPluginOptions, AsyncAPIPluginResolvedConfig, AsyncAPIPluginUserConfig };
|
|
95
111
|
//# sourceMappingURL=plugin.d.mts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-asyncapi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.610",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin to generate project code from AsyncAPI specifications.",
|
|
6
6
|
"repository": {
|
|
@@ -89,19 +89,19 @@
|
|
|
89
89
|
"files": ["dist/**/*"],
|
|
90
90
|
"keywords": ["asyncapi", "powerlines", "storm-software", "powerlines-plugin"],
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@asyncapi
|
|
93
|
-
"@
|
|
94
|
-
"@
|
|
95
|
-
"@stryke/fs": "^0.33.
|
|
96
|
-
"@stryke/path": "^0.29.
|
|
92
|
+
"@power-plant/asyncapi": "^0.0.19",
|
|
93
|
+
"@power-plant/core": "^0.0.23",
|
|
94
|
+
"@powerlines/plugin-power-plant": "^0.1.1",
|
|
95
|
+
"@stryke/fs": "^0.33.97",
|
|
96
|
+
"@stryke/path": "^0.29.23",
|
|
97
97
|
"defu": "^6.1.7",
|
|
98
|
-
"powerlines": "^0.47.
|
|
98
|
+
"powerlines": "^0.47.145"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
101
|
+
"@powerlines/plugin-plugin": "^0.12.557",
|
|
102
102
|
"@types/node": "^25.9.5"
|
|
103
103
|
},
|
|
104
104
|
"publishConfig": { "access": "public" },
|
|
105
105
|
"types": "./dist/index.d.cts",
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "d81170b608c0b80e7726e129c3edd1b7b6ca2605"
|
|
107
107
|
}
|