@powerlines/plugin-id 0.9.45 → 0.9.46

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.
@@ -13,7 +13,6 @@ import { Range } from 'semver';
13
13
  import { Project } from 'ts-morph';
14
14
  import { UnpluginMessage, ExternalIdResult, UnpluginContext, UnpluginBuildContext, TransformResult as TransformResult$1, HookFilter, UnpluginOptions } from 'unplugin';
15
15
  import { ResolveOptions as ResolveOptions$1 } from '@stryke/fs/resolve';
16
- import { StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
17
16
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
18
17
  import ts from 'typescript';
19
18
  import { ArrayValues } from '@stryke/types/array';
@@ -154,9 +153,107 @@ interface BuildConfig {
154
153
  }
155
154
  type BuildResolvedConfig = Omit<BuildConfig, "override">;
156
155
 
157
- declare const __VFS_PATCH__ = "__VFS_PATCH__";
158
- declare const __VFS_REVERT__ = "__VFS_REVERT__";
159
- type OutputModeType = "fs" | "virtual";
156
+ declare enum StoragePreset {
157
+ VIRTUAL = "virtual",
158
+ FS = "fs"
159
+ }
160
+ /**
161
+ * Interface defining the methods and properties for a storage adapter.
162
+ */
163
+ interface StorageAdapter {
164
+ /**
165
+ * A name identifying the storage adapter type.
166
+ */
167
+ name: string;
168
+ /**
169
+ * Checks if a key exists in the storage.
170
+ *
171
+ * @param key - The key to check for existence.
172
+ * @returns A promise that resolves to `true` if the key exists, otherwise `false`.
173
+ */
174
+ exists: (key: string) => Promise<boolean>;
175
+ /**
176
+ * Synchronously checks if a key exists in the storage.
177
+ *
178
+ * @param key - The key to check for existence.
179
+ * @returns Returns `true` if the key exists, otherwise `false`.
180
+ */
181
+ existsSync: (key: string) => boolean;
182
+ /**
183
+ * Read a value associated with a key from the storage.
184
+ *
185
+ * @param key - The key to read the value for.
186
+ * @returns A promise that resolves to the value if found, otherwise `null`.
187
+ */
188
+ get: (key: string) => Promise<string | null>;
189
+ /**
190
+ * Synchronously reads the value associated with a key from the storage.
191
+ *
192
+ * @param key - The key to read the value for.
193
+ * @returns The value if found, otherwise `null`.
194
+ */
195
+ getSync: (key: string) => string | null;
196
+ /**
197
+ * Writes a value to the storage for the given key.
198
+ *
199
+ * @param key - The key to associate the value with.
200
+ * @param value - The value to store.
201
+ */
202
+ set: (key: string, value: string) => Promise<void>;
203
+ /**
204
+ * Synchronously writes a value to the storage for the given key.
205
+ *
206
+ * @param key - The key to associate the value with.
207
+ * @param value - The value to store.
208
+ */
209
+ setSync: (key: string, value: string) => void;
210
+ /**
211
+ * Removes a value from the storage.
212
+ *
213
+ * @param key - The key whose value should be removed.
214
+ */
215
+ remove: (key: string) => Promise<void>;
216
+ /**
217
+ * Synchronously removes a value from the storage.
218
+ *
219
+ * @param key - The key whose value should be removed.
220
+ */
221
+ removeSync: (key: string) => void;
222
+ /**
223
+ * Remove all entries from the storage that match the provided base path.
224
+ *
225
+ * @param base - The base path or prefix to clear entries from.
226
+ */
227
+ clear: (base?: string) => Promise<void>;
228
+ /**
229
+ * Synchronously remove all entries from the storage that match the provided base path.
230
+ *
231
+ * @param base - The base path or prefix to clear entries from.
232
+ */
233
+ clearSync: (base?: string) => void;
234
+ /**
235
+ * Lists all keys under the provided base path.
236
+ *
237
+ * @param base - The base path or prefix to list keys from.
238
+ * @returns A promise resolving to the list of keys.
239
+ */
240
+ list: (base?: string) => Promise<string[]>;
241
+ /**
242
+ * Synchronously lists all keys under the provided base path.
243
+ *
244
+ * @param base - The base path or prefix to list keys from.
245
+ * @returns The list of keys.
246
+ */
247
+ listSync: (base?: string) => string[];
248
+ /**
249
+ * Releases any resources held by the storage adapter.
250
+ */
251
+ dispose: () => MaybePromise<void>;
252
+ }
253
+ /**
254
+ * A mapping of file paths to storage adapter names and their corresponding {@link StorageAdapter} instances.
255
+ */
256
+ type StoragePort = Record<string, StorageAdapter>;
160
257
  interface VirtualFileMetadata {
161
258
  /**
162
259
  * The identifier for the file data.
@@ -176,10 +273,6 @@ interface VirtualFileMetadata {
176
273
  * - `normal`: Indicates that the file is a standard file without any special role.
177
274
  */
178
275
  type: string;
179
- /**
180
- * The output mode of the file.
181
- */
182
- mode: string;
183
276
  /**
184
277
  * Additional metadata associated with the file.
185
278
  */
@@ -201,16 +294,9 @@ interface VirtualFileData {
201
294
  * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
202
295
  * - `builtin`: Indicates that the file is a built-in module provided by the system.
203
296
  * - `entry`: Indicates that the file is an entry point for execution.
204
- * - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
205
- * - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
206
- * - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
207
297
  * - `normal`: Indicates that the file is a standard file without any special role.
208
298
  */
209
299
  type?: string;
210
- /**
211
- * The output mode of the file.
212
- */
213
- mode?: string;
214
300
  /**
215
301
  * Additional metadata associated with the file.
216
302
  */
@@ -226,21 +312,18 @@ interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
226
312
  */
227
313
  timestamp: number;
228
314
  }
229
- interface ResolveFSOptions {
230
- mode?: OutputModeType;
231
- }
232
- type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
233
- interface PowerlinesWriteFileOptions extends ResolveFSOptions {
315
+ interface WriteOptions {
234
316
  /**
235
317
  * Should the file skip formatting before being written?
236
318
  *
237
319
  * @defaultValue false
238
320
  */
239
321
  skipFormat?: boolean;
322
+ /**
323
+ * Additional metadata for the file.
324
+ */
325
+ meta?: VirtualFileMetadata;
240
326
  }
241
- type NodeWriteFileOptions = WriteFileOptions$1;
242
- type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
243
- type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
244
327
  interface ResolveOptions extends ResolveOptions$1 {
245
328
  /**
246
329
  * If true, the module is being resolved as an entry point.
@@ -264,14 +347,6 @@ interface ResolveOptions extends ResolveOptions$1 {
264
347
  skipNodeModulesBundle?: boolean;
265
348
  }
266
349
  interface VirtualFileSystemInterface {
267
- /**
268
- * Patches the File System to include the virtual file system (VFS) contents.
269
- */
270
- [__VFS_PATCH__]: () => void;
271
- /**
272
- * Reverts the virtual file system (VFS) to its previous state.
273
- */
274
- [__VFS_REVERT__]: () => void;
275
350
  /**
276
351
  * The underlying file metadata.
277
352
  */
@@ -284,208 +359,92 @@ interface VirtualFileSystemInterface {
284
359
  * A map of module ids to their file paths.
285
360
  */
286
361
  paths: Readonly<Record<string, string>>;
287
- /**
288
- * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
289
- *
290
- * @param pathOrId - The path or id to check.
291
- * @param importer - The importer path, if any.
292
- * @param options - Optional parameters for resolving the path.
293
- * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
294
- */
295
- isVirtual: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
296
- /**
297
- * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
298
- *
299
- * @param pathOrId - The path or id to check.
300
- * @param importer - The importer path, if any.
301
- * @param options - Optional parameters for resolving the path.
302
- * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
303
- */
304
- isPhysical: (pathOrId: string, importer?: string, options?: ResolveOptions) => boolean;
305
362
  /**
306
363
  * Checks if a file exists in the virtual file system (VFS).
307
364
  *
308
- * @param path - The path of the file to check.
365
+ * @param path - The path or id of the file.
309
366
  * @returns `true` if the file exists, otherwise `false`.
310
367
  */
311
- isFile: (path: string) => boolean;
368
+ exists: (path: string) => Promise<boolean>;
312
369
  /**
313
- * Checks if a directory exists in the virtual file system (VFS).
370
+ * Synchronously Checks if a file exists in the virtual file system (VFS).
314
371
  *
315
- * @param path - The path of the directory to check.
316
- * @returns `true` if the directory exists, otherwise `false`.
372
+ * @param path - The path or id of the file.
373
+ * @returns `true` if the file exists, otherwise `false`.
317
374
  */
318
- isDirectory: (path: string) => boolean;
375
+ existsSync: (path: string) => boolean;
319
376
  /**
320
- * Checks if a file exists in the virtual file system (VFS).
377
+ * Checks if a file is virtual in the virtual file system (VFS).
321
378
  *
322
- * @param pathOrId - The path or id of the file.
323
- * @returns `true` if the file exists, otherwise `false`.
379
+ * @param path - The path or id of the file.
380
+ * @returns `true` if the file is virtual, otherwise `false`.
324
381
  */
325
- existsSync: (pathOrId: string) => boolean;
382
+ isVirtual: (path: string) => boolean;
326
383
  /**
327
384
  * Gets the metadata of a file in the virtual file system (VFS).
328
385
  *
329
- * @param pathOrId - The path or id of the file.
386
+ * @param path - The path or id of the file.
330
387
  * @returns The metadata of the file if it exists, otherwise undefined.
331
388
  */
332
- getMetadata: (pathOrId: string) => VirtualFileMetadata | undefined;
333
- /**
334
- * Gets the stats of a file in the virtual file system (VFS).
335
- *
336
- * @param pathOrId - The path or id of the file.
337
- * @param options - Optional parameters for getting the stats.
338
- * @returns The stats of the file if it exists, otherwise undefined.
339
- */
340
- lstat: (pathOrId: string, options?: StatSyncOptions & {
341
- bigint?: false | undefined;
342
- throwIfNoEntry: false;
343
- }) => Promise<Stats>;
344
- /**
345
- * Gets the stats of a file in the virtual file system (VFS).
346
- *
347
- * @param pathOrId - The path or id of the file.
348
- * @param options - Optional parameters for getting the stats.
349
- * @returns The stats of the file if it exists, otherwise undefined.
350
- */
351
- lstatSync: (pathOrId: string, options?: StatSyncOptions & {
352
- bigint?: false | undefined;
353
- throwIfNoEntry: false;
354
- }) => Stats | undefined;
355
- /**
356
- * Gets the stats of a file in the virtual file system (VFS).
357
- *
358
- * @param pathOrId - The path or id of the file.
359
- * @returns The stats of the file if it exists, otherwise false.
360
- */
361
- stat: (pathOrId: string, options?: StatSyncOptions & {
362
- bigint?: false | undefined;
363
- throwIfNoEntry: false;
364
- }) => Promise<Stats>;
365
- /**
366
- * Gets the stats of a file in the virtual file system (VFS).
367
- *
368
- * @param pathOrId - The path or id of the file.
369
- * @returns The stats of the file if it exists, otherwise false.
370
- */
371
- statSync: (pathOrId: string, options?: StatSyncOptions & {
372
- bigint?: false | undefined;
373
- throwIfNoEntry: false;
374
- }) => Stats | undefined;
389
+ getMetadata: (path: string) => VirtualFileMetadata | undefined;
375
390
  /**
376
391
  * Lists files in a given path.
377
392
  *
378
393
  * @param path - The path to list files from.
379
- * @param options - Options for listing files, such as encoding and recursion.
380
394
  * @returns An array of file names in the specified path.
381
395
  */
382
- readdirSync: (path: string, options?: {
383
- encoding: BufferEncoding | null;
384
- withFileTypes?: false | undefined;
385
- recursive?: boolean | undefined;
386
- } | BufferEncoding) => string[];
396
+ listSync: (path: string) => string[];
387
397
  /**
388
398
  * Lists files in a given path.
389
399
  *
390
400
  * @param path - The path to list files from.
391
- * @param options - Options for listing files, such as encoding and recursion.
392
401
  * @returns An array of file names in the specified path.
393
402
  */
394
- readdir: (path: string, options?: {
395
- encoding: BufferEncoding | null;
396
- withFileTypes?: false | undefined;
397
- recursive?: boolean | undefined;
398
- } | BufferEncoding) => Promise<string[]>;
403
+ list: (path: string) => Promise<string[]>;
399
404
  /**
400
405
  * Removes a file or symbolic link in the virtual file system (VFS).
401
406
  *
402
407
  * @param path - The path to the file to remove.
403
408
  * @returns A promise that resolves when the file is removed.
404
409
  */
405
- unlinkSync: (path: string, options?: ResolveFSOptions) => void;
410
+ removeSync: (path: string) => void;
406
411
  /**
407
412
  * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
408
413
  *
409
414
  * @param path - The path to the file to remove.
410
415
  * @returns A promise that resolves when the file is removed.
411
416
  */
412
- unlink: (path: string, options?: ResolveFSOptions) => Promise<void>;
413
- /**
414
- * Removes a directory in the virtual file system (VFS).
415
- *
416
- * @param path - The path to create the directory at.
417
- * @param options - Options for creating the directory.
418
- */
419
- rmdirSync: (path: string, options?: RmDirOptions & ResolveFSOptions) => any;
420
- /**
421
- * Removes a directory in the virtual file system (VFS).
422
- *
423
- * @param path - The path to create the directory at.
424
- * @param options - Options for creating the directory.
425
- * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
426
- */
427
- rmdir: (path: string, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
428
- /**
429
- * Removes a file or directory in the virtual file system (VFS).
430
- *
431
- * @param path - The path to the file or directory to remove.
432
- * @param options - Options for removing the file or directory.
433
- * @returns A promise that resolves when the file or directory is removed.
434
- */
435
- rm: (path: string, options?: RmOptions & ResolveFSOptions) => Promise<void>;
436
- /**
437
- * Synchronously removes a file or directory in the virtual file system (VFS).
438
- *
439
- * @param path - The path to the file or directory to remove.
440
- * @param options - Options for removing the file or directory.
441
- */
442
- rmSync: (path: string, options?: RmOptions & ResolveFSOptions) => void;
443
- /**
444
- * Creates a directory in the virtual file system (VFS).
445
- *
446
- * @param path - The path to create the directory at.
447
- * @param options - Options for creating the directory.
448
- * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
449
- */
450
- mkdirSync: (path: string, options?: MakeDirectoryOptions) => string | undefined;
451
- /**
452
- * Creates a directory in the virtual file system (VFS).
453
- *
454
- * @param path - The path to create the directory at.
455
- * @param options - Options for creating the directory.
456
- * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
457
- */
458
- mkdir: (path: string, options?: MakeDirectoryOptions) => Promise<string | undefined>;
417
+ remove: (path: string) => Promise<void>;
459
418
  /**
460
419
  * Reads a file from the virtual file system (VFS).
461
420
  *
462
- * @param pathOrId - The path or id of the file.
421
+ * @param path - The path or id of the file.
463
422
  * @returns The contents of the file if it exists, otherwise undefined.
464
423
  */
465
- readFile: (pathOrId: string) => Promise<string | undefined>;
424
+ read: (path: string) => Promise<string | undefined>;
466
425
  /**
467
426
  * Reads a file from the virtual file system (VFS).
468
427
  *
469
- * @param pathOrId - The path or id of the file.
428
+ * @param path - The path or id of the file.
470
429
  */
471
- readFileSync: (pathOrId: string) => string | undefined;
430
+ readSync: (path: string) => string | undefined;
472
431
  /**
473
432
  * Writes a file to the virtual file system (VFS).
474
433
  *
475
434
  * @param path - The path to the file.
476
435
  * @param data - The contents of the file.
477
- * @param options - Optional parameters for writing the file.
436
+ * @param options - Options for writing the file.
478
437
  * @returns A promise that resolves when the file is written.
479
438
  */
480
- writeFile: (path: string, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
439
+ write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
481
440
  /**
482
441
  * Writes a file to the virtual file system (VFS).
483
442
  *
484
443
  * @param path - The path to the file.
485
444
  * @param data - The contents of the file.
486
- * @param options - Optional parameters for writing the file.
445
+ * @param options - Options for writing the file.
487
446
  */
488
- writeFileSync: (path: string, data?: WriteFileData, options?: WriteFileOptions) => void;
447
+ writeSync: (path: string, data: string, options?: WriteOptions) => void;
489
448
  /**
490
449
  * Moves a file from one path to another in the virtual file system (VFS).
491
450
  *
@@ -528,13 +487,6 @@ interface VirtualFileSystemInterface {
528
487
  * @returns An array of file paths matching the provided pattern(s)
529
488
  */
530
489
  globSync: (pattern: string | string[]) => string[];
531
- /**
532
- * Resolves a path or id to a file path in the virtual file system.
533
- *
534
- * @param pathOrId - The path or id of the file to resolve.
535
- * @returns The resolved path of the file if it exists, otherwise false.
536
- */
537
- realpathSync: (pathOrId: string) => string;
538
490
  /**
539
491
  * A helper function to resolve modules using the Jiti resolver
540
492
  *
@@ -684,13 +636,16 @@ interface OutputConfig {
684
636
  *
685
637
  * @defaultValue "\{projectRoot\}/dist"
686
638
  */
687
- distPath?: string;
639
+ buildPath?: string;
688
640
  /**
689
- * The format of the output files
641
+ * The folder where the generated runtime artifacts will be located
690
642
  *
691
- * @defaultValue "virtual"
643
+ * @remarks
644
+ * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
645
+ *
646
+ * @defaultValue "\{projectRoot\}/.powerlines"
692
647
  */
693
- mode?: OutputModeType;
648
+ artifactsPath?: string;
694
649
  /**
695
650
  * The path of the generated runtime declaration file relative to the workspace root.
696
651
  *
@@ -706,15 +661,6 @@ interface OutputConfig {
706
661
  * @defaultValue "powerlines"
707
662
  */
708
663
  builtinPrefix?: string;
709
- /**
710
- * The folder where the generated runtime artifacts will be located
711
- *
712
- * @remarks
713
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
714
- *
715
- * @defaultValue "\{projectRoot\}/.powerlines"
716
- */
717
- artifactsFolder?: string;
718
664
  /**
719
665
  * The module format of the output files
720
666
  *
@@ -731,42 +677,21 @@ interface OutputConfig {
731
677
  * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
732
678
  */
733
679
  assets?: Array<string | AssetGlob>;
734
- }
735
- interface BaseConfig {
736
- /**
737
- * The name of the project
738
- */
739
- name?: string;
740
- /**
741
- * The project display title
742
- *
743
- * @remarks
744
- * This option is used in documentation generation and other places where a human-readable title is needed.
745
- */
746
- title?: string;
747
680
  /**
748
- * A description of the project
681
+ * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
749
682
  *
750
683
  * @remarks
751
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
752
- */
753
- description?: string;
754
- /**
755
- * The log level to use for the Powerlines processes.
684
+ * If a string preset is provided, it must be one of the following values:
685
+ * - `"virtual"`: Uses the local file system for storage.
686
+ * - `"fs"`: Uses an in-memory virtual file system for storage.
756
687
  *
757
- * @defaultValue "info"
758
- */
759
- logLevel?: LogLevelLabel | null;
760
- /**
761
- * A custom logger function to use for logging messages
762
- */
763
- customLogger?: LogFn;
764
- /**
765
- * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
688
+ * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
766
689
  *
767
- * @defaultValue "production"
690
+ * @defaultValue "virtual"
768
691
  */
769
- mode?: "development" | "test" | "production";
692
+ storage?: StoragePort | StoragePreset;
693
+ }
694
+ interface BaseConfig {
770
695
  /**
771
696
  * The entry point(s) for the application
772
697
  */
@@ -850,6 +775,40 @@ interface EnvironmentConfig extends BaseConfig {
850
775
  consumer?: "client" | "server";
851
776
  }
852
777
  interface CommonUserConfig extends BaseConfig {
778
+ /**
779
+ * The name of the project
780
+ */
781
+ name?: string;
782
+ /**
783
+ * The project display title
784
+ *
785
+ * @remarks
786
+ * This option is used in documentation generation and other places where a human-readable title is needed.
787
+ */
788
+ title?: string;
789
+ /**
790
+ * A description of the project
791
+ *
792
+ * @remarks
793
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
794
+ */
795
+ description?: string;
796
+ /**
797
+ * The log level to use for the Powerlines processes.
798
+ *
799
+ * @defaultValue "info"
800
+ */
801
+ logLevel?: LogLevelLabel | null;
802
+ /**
803
+ * A custom logger function to use for logging messages
804
+ */
805
+ customLogger?: LogFn;
806
+ /**
807
+ * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
808
+ *
809
+ * @defaultValue "production"
810
+ */
811
+ mode?: "development" | "test" | "production";
853
812
  /**
854
813
  * The type of project being built
855
814
  *
@@ -900,7 +859,7 @@ interface CommonUserConfig extends BaseConfig {
900
859
  * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
901
860
  *
902
861
  * @remarks
903
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
862
+ * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
904
863
  *
905
864
  * @defaultValue "powerlines"
906
865
  */
@@ -948,7 +907,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
948
907
  */
949
908
  output?: string;
950
909
  }
951
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
910
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
952
911
  /**
953
912
  * The name of the environment
954
913
  */
@@ -959,9 +918,9 @@ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "
959
918
  preview?: ResolvedPreviewOptions;
960
919
  };
961
920
  type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
962
- type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
921
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
963
922
  assets: ResolvedAssetGlob[];
964
- }>;
923
+ }> & Pick<OutputConfig, "storage">;
965
924
  /**
966
925
  * The resolved options for the Powerlines project configuration.
967
926
  */
@@ -1229,17 +1188,15 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
1229
1188
  * @param code - The source code of the builtin file
1230
1189
  * @param id - The unique identifier of the builtin file
1231
1190
  * @param path - An optional path to write the builtin file to
1232
- * @param options - Options for writing the file
1233
1191
  */
1234
- emitBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
1192
+ emitBuiltin: (code: string, id: string, path?: string) => Promise<void>;
1235
1193
  /**
1236
1194
  * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1237
1195
  *
1238
1196
  * @param code - The source code of the entry file
1239
1197
  * @param path - An optional path to write the entry file to
1240
- * @param options - Options for writing the file
1241
1198
  */
1242
- emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
1199
+ emitEntry: (code: string, path: string) => Promise<void>;
1243
1200
  /**
1244
1201
  * A function to update the context fields using a new user configuration options
1245
1202
  */
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-BnDDfc1h.cjs';
2
- export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-BnDDfc1h.cjs';
1
+ import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-B-Y0hGir.cjs';
2
+ export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-B-Y0hGir.cjs';
3
3
  export { nanoidModule } from './components/nanoid.cjs';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -16,7 +16,6 @@ import 'semver';
16
16
  import 'ts-morph';
17
17
  import 'unplugin';
18
18
  import '@stryke/fs/resolve';
19
- import 'node:fs';
20
19
  import '@stryke/types/tsconfig';
21
20
  import 'typescript';
22
21
  import '@stryke/types/array';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-BnDDfc1h.js';
2
- export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-BnDDfc1h.js';
1
+ import { I as IdPluginOptions, P as Plugin, a as IdPluginContext } from './index-B-Y0hGir.js';
2
+ export { c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from './index-B-Y0hGir.js';
3
3
  export { nanoidModule } from './components/nanoid.js';
4
4
  import '@storm-software/build-tools/types';
5
5
  import '@storm-software/config-tools/types';
@@ -16,7 +16,6 @@ import 'semver';
16
16
  import 'ts-morph';
17
17
  import 'unplugin';
18
18
  import '@stryke/fs/resolve';
19
- import 'node:fs';
20
19
  import '@stryke/types/tsconfig';
21
20
  import 'typescript';
22
21
  import '@stryke/types/array';
@@ -1,4 +1,4 @@
1
- export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-BnDDfc1h.cjs';
1
+ export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-B-Y0hGir.cjs';
2
2
  import '@storm-software/build-tools/types';
3
3
  import '@storm-software/config-tools/types';
4
4
  import '@storm-software/config/types';
@@ -14,7 +14,6 @@ import 'semver';
14
14
  import 'ts-morph';
15
15
  import 'unplugin';
16
16
  import '@stryke/fs/resolve';
17
- import 'node:fs';
18
17
  import '@stryke/types/tsconfig';
19
18
  import 'typescript';
20
19
  import '@stryke/types/array';
@@ -1,4 +1,4 @@
1
- export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-BnDDfc1h.js';
1
+ export { a as IdPluginContext, I as IdPluginOptions, c as IdPluginResolvedConfig, b as IdPluginUserConfig, U as UniqueIdFormatType, g as __ΩIdPluginContext, d as __ΩIdPluginOptions, f as __ΩIdPluginResolvedConfig, e as __ΩIdPluginUserConfig, _ as __ΩUniqueIdFormatType } from '../index-B-Y0hGir.js';
2
2
  import '@storm-software/build-tools/types';
3
3
  import '@storm-software/config-tools/types';
4
4
  import '@storm-software/config/types';
@@ -14,7 +14,6 @@ import 'semver';
14
14
  import 'ts-morph';
15
15
  import 'unplugin';
16
16
  import '@stryke/fs/resolve';
17
- import 'node:fs';
18
17
  import '@stryke/types/tsconfig';
19
18
  import 'typescript';
20
19
  import '@stryke/types/array';