@powerlines/plugin-unbuild 0.5.45 → 0.5.47

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