@powerlines/plugin-asyncapi 0.1.119 → 0.1.121

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.
@@ -301,6 +301,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
301
301
  * @param options - Additional options for writing the builtin file
302
302
  */
303
303
  emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
304
+ /**
305
+ * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
306
+ *
307
+ * @param code - The source code of the builtin file
308
+ * @param id - The unique identifier of the builtin file
309
+ * @param path - An optional path to write the builtin file to
310
+ * @param options - Additional options for writing the builtin file
311
+ */
312
+ emitBuiltinSync: (code: string, id: string, path?: string, options?: WriteOptions) => void;
304
313
  /**
305
314
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
306
315
  *
@@ -309,6 +318,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
309
318
  * @param options - Additional options for writing the entry file
310
319
  */
311
320
  emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
321
+ /**
322
+ * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
323
+ *
324
+ * @param code - The source code of the entry file
325
+ * @param path - An optional path to write the entry file to
326
+ * @param options - Additional options for writing the entry file
327
+ */
328
+ emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
312
329
  /**
313
330
  * A function to update the context fields using a new user configuration options
314
331
  */
@@ -301,6 +301,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
301
301
  * @param options - Additional options for writing the builtin file
302
302
  */
303
303
  emitBuiltin: (code: string, id: string, path?: string, options?: WriteOptions) => Promise<void>;
304
+ /**
305
+ * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
306
+ *
307
+ * @param code - The source code of the builtin file
308
+ * @param id - The unique identifier of the builtin file
309
+ * @param path - An optional path to write the builtin file to
310
+ * @param options - Additional options for writing the builtin file
311
+ */
312
+ emitBuiltinSync: (code: string, id: string, path?: string, options?: WriteOptions) => void;
304
313
  /**
305
314
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
306
315
  *
@@ -309,6 +318,14 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
309
318
  * @param options - Additional options for writing the entry file
310
319
  */
311
320
  emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
321
+ /**
322
+ * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
323
+ *
324
+ * @param code - The source code of the entry file
325
+ * @param path - An optional path to write the entry file to
326
+ * @param options - Additional options for writing the entry file
327
+ */
328
+ emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
312
329
  /**
313
330
  * A function to update the context fields using a new user configuration options
314
331
  */
@@ -13,6 +13,13 @@ interface StorageAdapter {
13
13
  * A name identifying the storage adapter type.
14
14
  */
15
15
  name: string;
16
+ /**
17
+ * The storage preset for the adapter.
18
+ *
19
+ * @remarks
20
+ * This can be used as an alternate way to identify the type of storage being used.
21
+ */
22
+ preset?: StoragePreset | null;
16
23
  /**
17
24
  * Checks if a key exists in the storage.
18
25
  *
@@ -207,6 +214,13 @@ interface WriteOptions {
207
214
  * @defaultValue false
208
215
  */
209
216
  skipFormat?: boolean;
217
+ /**
218
+ * The storage preset or adapter name for the output file.
219
+ *
220
+ * @remarks
221
+ * If not specified, the output mode will be determined by the provided `output.mode` value.
222
+ */
223
+ storage?: StoragePreset | string;
210
224
  /**
211
225
  * Additional metadata for the file.
212
226
  */
@@ -217,6 +231,10 @@ interface ResolveOptions$1 extends ResolveOptions {
217
231
  * If true, the module is being resolved as an entry point.
218
232
  */
219
233
  isEntry?: boolean;
234
+ /**
235
+ * If true, the resolver will skip alias resolution when resolving modules.
236
+ */
237
+ skipAlias?: boolean;
220
238
  /**
221
239
  * If true, the resolver will skip using the cache when resolving modules.
222
240
  */
@@ -449,6 +467,16 @@ interface VirtualFileSystemInterface {
449
467
  * @returns The resolved module path.
450
468
  */
451
469
  resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
470
+ /**
471
+ * Resolves a given module ID using the configured aliases.
472
+ *
473
+ * @remarks
474
+ * This function can be used to map module IDs to different paths based on the alias configuration.
475
+ *
476
+ * @param id - The module ID to resolve.
477
+ * @returns The resolved module ID - after applying any configured aliases (this will be the same as the input ID if no aliases match).
478
+ */
479
+ resolveAlias: (id: string) => string;
452
480
  /**
453
481
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
454
482
  */
@@ -13,6 +13,13 @@ interface StorageAdapter {
13
13
  * A name identifying the storage adapter type.
14
14
  */
15
15
  name: string;
16
+ /**
17
+ * The storage preset for the adapter.
18
+ *
19
+ * @remarks
20
+ * This can be used as an alternate way to identify the type of storage being used.
21
+ */
22
+ preset?: StoragePreset | null;
16
23
  /**
17
24
  * Checks if a key exists in the storage.
18
25
  *
@@ -207,6 +214,13 @@ interface WriteOptions {
207
214
  * @defaultValue false
208
215
  */
209
216
  skipFormat?: boolean;
217
+ /**
218
+ * The storage preset or adapter name for the output file.
219
+ *
220
+ * @remarks
221
+ * If not specified, the output mode will be determined by the provided `output.mode` value.
222
+ */
223
+ storage?: StoragePreset | string;
210
224
  /**
211
225
  * Additional metadata for the file.
212
226
  */
@@ -217,6 +231,10 @@ interface ResolveOptions$1 extends ResolveOptions {
217
231
  * If true, the module is being resolved as an entry point.
218
232
  */
219
233
  isEntry?: boolean;
234
+ /**
235
+ * If true, the resolver will skip alias resolution when resolving modules.
236
+ */
237
+ skipAlias?: boolean;
220
238
  /**
221
239
  * If true, the resolver will skip using the cache when resolving modules.
222
240
  */
@@ -449,6 +467,16 @@ interface VirtualFileSystemInterface {
449
467
  * @returns The resolved module path.
450
468
  */
451
469
  resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
470
+ /**
471
+ * Resolves a given module ID using the configured aliases.
472
+ *
473
+ * @remarks
474
+ * This function can be used to map module IDs to different paths based on the alias configuration.
475
+ *
476
+ * @param id - The module ID to resolve.
477
+ * @returns The resolved module ID - after applying any configured aliases (this will be the same as the input ID if no aliases match).
478
+ */
479
+ resolveAlias: (id: string) => string;
452
480
  /**
453
481
  * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
454
482
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-asyncapi",
3
- "version": "0.1.119",
3
+ "version": "0.1.121",
4
4
  "type": "module",
5
5
  "description": "A Powerlines plugin to generate project code from AsyncAPI specifications.",
6
6
  "repository": {
@@ -124,13 +124,13 @@
124
124
  "@stryke/http": "^0.12.20",
125
125
  "@stryke/path": "^0.24.0",
126
126
  "defu": "^6.1.4",
127
- "powerlines": "^0.36.20"
127
+ "powerlines": "^0.36.22"
128
128
  },
129
129
  "devDependencies": {
130
- "@powerlines/nx": "^0.11.46",
131
- "@powerlines/plugin-plugin": "^0.12.67",
130
+ "@powerlines/nx": "^0.11.48",
131
+ "@powerlines/plugin-plugin": "^0.12.69",
132
132
  "@types/node": "^24.10.4"
133
133
  },
134
134
  "publishConfig": { "access": "public" },
135
- "gitHead": "bf1440eb5eb29cb9650051e56b0c17e596eb3942"
135
+ "gitHead": "f88fe8eb30f96536b83fc9af884972d48e31e63a"
136
136
  }