@powerlines/plugin-rollup 0.7.19 → 0.7.21

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.
@@ -1,6 +1,6 @@
1
1
  export { createRollupPlugin } from './unplugin.cjs';
2
2
  import 'esbuild';
3
- import '../index-CFL04PF-.cjs';
3
+ import '../index-mEoiAFKV.cjs';
4
4
  import 'rollup';
5
5
  import '@stryke/env/get-env-paths';
6
6
  import '@stryke/types/base';
@@ -19,6 +19,4 @@ import '@stryke/types/array';
19
19
  import '@stryke/types/tsconfig';
20
20
  import 'typescript';
21
21
  import '@stryke/json/types';
22
- import 'memfs';
23
22
  import 'node:fs';
24
- import 'unionfs';
@@ -1,6 +1,6 @@
1
1
  export { createRollupPlugin } from './unplugin.js';
2
2
  import 'esbuild';
3
- import '../index-CFL04PF-.js';
3
+ import '../index-mEoiAFKV.js';
4
4
  import 'rollup';
5
5
  import '@stryke/env/get-env-paths';
6
6
  import '@stryke/types/base';
@@ -19,6 +19,4 @@ import '@stryke/types/array';
19
19
  import '@stryke/types/tsconfig';
20
20
  import 'typescript';
21
21
  import '@stryke/json/types';
22
- import 'memfs';
23
22
  import 'node:fs';
24
- import 'unionfs';
@@ -1,5 +1,5 @@
1
1
  import * as esbuild from 'esbuild';
2
- import { R as RollupPluginContext } from '../index-CFL04PF-.cjs';
2
+ import { R as RollupPluginContext } from '../index-mEoiAFKV.cjs';
3
3
  import 'rollup';
4
4
  import '@stryke/env/get-env-paths';
5
5
  import '@stryke/types/base';
@@ -18,9 +18,7 @@ import '@stryke/types/array';
18
18
  import '@stryke/types/tsconfig';
19
19
  import 'typescript';
20
20
  import '@stryke/json/types';
21
- import 'memfs';
22
21
  import 'node:fs';
23
- import 'unionfs';
24
22
 
25
23
  declare function createRollupPlugin(context: RollupPluginContext): esbuild.Plugin;
26
24
 
@@ -1,5 +1,5 @@
1
1
  import * as esbuild from 'esbuild';
2
- import { R as RollupPluginContext } from '../index-CFL04PF-.js';
2
+ import { R as RollupPluginContext } from '../index-mEoiAFKV.js';
3
3
  import 'rollup';
4
4
  import '@stryke/env/get-env-paths';
5
5
  import '@stryke/types/base';
@@ -18,9 +18,7 @@ import '@stryke/types/array';
18
18
  import '@stryke/types/tsconfig';
19
19
  import 'typescript';
20
20
  import '@stryke/json/types';
21
- import 'memfs';
22
21
  import 'node:fs';
23
- import 'unionfs';
24
22
 
25
23
  declare function createRollupPlugin(context: RollupPluginContext): esbuild.Plugin;
26
24
 
@@ -16,9 +16,7 @@ import { ArrayValues } from '@stryke/types/array';
16
16
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
17
17
  import ts from 'typescript';
18
18
  import { PrimitiveJsonValue } from '@stryke/json/types';
19
- import { Volume } from 'memfs';
20
19
  import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
21
- import { IUnionFs } from 'unionfs';
22
20
 
23
21
  type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
24
22
  interface BuildConfig {
@@ -28,6 +26,20 @@ interface BuildConfig {
28
26
  * @defaultValue "neutral"
29
27
  */
30
28
  platform?: "node" | "browser" | "neutral";
29
+ /**
30
+ * Array of strings indicating the polyfills to include for the build.
31
+ *
32
+ * @remarks
33
+ * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * {
38
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
39
+ * }
40
+ * ```
41
+ */
42
+ polyfill?: string[];
31
43
  /**
32
44
  * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
33
45
  *
@@ -113,7 +125,10 @@ interface BuildConfig {
113
125
  *
114
126
  * @see https://github.com/rollup/plugins/tree/master/packages/alias
115
127
  */
116
- alias?: Record<string, string>;
128
+ alias?: Record<string, string> | Array<{
129
+ find: string | RegExp;
130
+ replacement: string;
131
+ }>;
117
132
  /**
118
133
  * A list of modules that should not be bundled, even if they are external dependencies.
119
134
  *
@@ -208,11 +223,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
208
223
  tsconfigFilePath: string;
209
224
  };
210
225
 
211
- declare const __VFS_INIT__ = "__VFS_INIT__";
212
- declare const __VFS_REVERT__ = "__VFS_REVERT__";
213
- declare const __VFS_CACHE__ = "__VFS_CACHE__";
214
- declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
215
- declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
226
+ declare const __VFS_PATCH__: unique symbol;
227
+ declare const __VFS_REVERT__: unique symbol;
216
228
  type OutputModeType = "fs" | "virtual";
217
229
  interface VirtualFile {
218
230
  /**
@@ -252,7 +264,24 @@ interface VirtualFile {
252
264
  */
253
265
  code: string | NodeJS.ArrayBufferView;
254
266
  }
255
- type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
267
+ interface VirtualFileMetadata {
268
+ /**
269
+ * The identifier for the file data.
270
+ */
271
+ id: string;
272
+ /**
273
+ * The variant of the file.
274
+ */
275
+ variant: string;
276
+ /**
277
+ * The output mode of the file.
278
+ */
279
+ mode: string;
280
+ /**
281
+ * Additional metadata associated with the file.
282
+ */
283
+ properties: Record<string, string>;
284
+ }
256
285
  interface ResolveFSOptions {
257
286
  mode?: OutputModeType;
258
287
  }
@@ -281,12 +310,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
281
310
  type?: "file" | "directory";
282
311
  }
283
312
  interface VirtualFileSystemInterface {
284
- [__VFS_INIT__]: () => void;
313
+ /**
314
+ * Patches the File System to include the virtual file system (VFS) contents.
315
+ */
316
+ [__VFS_PATCH__]: () => void;
317
+ /**
318
+ * Reverts the virtual file system (VFS) to its previous state.
319
+ */
285
320
  [__VFS_REVERT__]: () => void;
286
321
  /**
287
322
  * The underlying file metadata.
288
323
  */
289
- meta: Record<string, VirtualFileSystemMetadata | undefined>;
324
+ metadata: Record<string, VirtualFileMetadata | undefined>;
290
325
  /**
291
326
  * A map of module ids to their file paths.
292
327
  */
@@ -306,7 +341,7 @@ interface VirtualFileSystemInterface {
306
341
  * @param options - Optional parameters for resolving the path.
307
342
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
308
343
  */
309
- isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
344
+ isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
310
345
  /**
311
346
  * Checks if a file exists in the virtual file system (VFS).
312
347
  *
@@ -321,15 +356,6 @@ interface VirtualFileSystemInterface {
321
356
  * @returns `true` if the directory exists, otherwise `false`.
322
357
  */
323
358
  isDirectory: (path: string) => boolean;
324
- /**
325
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
326
- *
327
- * @see https://www.typescriptlang.org/tsconfig#paths
328
- *
329
- * @param pathOrId - The path or id to check.
330
- * @returns Whether the path or id corresponds to a virtual file.
331
- */
332
- isTsconfigPath: (pathOrId: string) => boolean;
333
359
  /**
334
360
  * Checks if a file exists in the virtual file system (VFS).
335
361
  *
@@ -343,7 +369,7 @@ interface VirtualFileSystemInterface {
343
369
  * @param pathOrId - The path or id of the file.
344
370
  * @returns The metadata of the file if it exists, otherwise undefined.
345
371
  */
346
- getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;
372
+ getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
347
373
  /**
348
374
  * Gets the stats of a file in the virtual file system (VFS).
349
375
  *
@@ -551,23 +577,12 @@ interface VirtualFileSystemInterface {
551
577
  */
552
578
  resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
553
579
  /**
554
- * Resolves a path based on TypeScript's `tsconfig.json` paths.
555
- *
556
- * @see https://www.typescriptlang.org/tsconfig#paths
580
+ * Formats a path to match the virtual file system (VFS) structure.
557
581
  *
558
- * @param path - The path to check.
559
- * @returns The resolved file path if it exists, otherwise undefined.
582
+ * @param path - The path to format.
583
+ * @returns The formatted path.
560
584
  */
561
- resolveTsconfigPath: (path: string) => string | false;
562
- /**
563
- * Resolves a package name based on TypeScript's `tsconfig.json` paths.
564
- *
565
- * @see https://www.typescriptlang.org/tsconfig#paths
566
- *
567
- * @param path - The path to check.
568
- * @returns The resolved package name if it exists, otherwise undefined.
569
- */
570
- resolveTsconfigPathPackage: (path: string) => string | false;
585
+ formatPath: (path: string) => string;
571
586
  /**
572
587
  * Resolves a path or id to a file path in the virtual file system.
573
588
  *
@@ -576,23 +591,9 @@ interface VirtualFileSystemInterface {
576
591
  */
577
592
  realpathSync: (pathOrId: string) => string;
578
593
  /**
579
- * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
580
- *
581
- * @returns A record mapping file paths to their partial metadata.
582
- */
583
- getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
584
- /**
585
- * A map of cached file paths to their underlying file content.
586
- */
587
- [__VFS_CACHE__]: Map<string, string>;
588
- /**
589
- * A reference to the underlying virtual file system.
594
+ * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
590
595
  */
591
- [__VFS_VIRTUAL__]: Volume;
592
- /**
593
- * A reference to the underlying unified file system.
594
- */
595
- [__VFS_UNIFIED__]: IUnionFs;
596
+ dispose: () => Promise<void>;
596
597
  }
597
598
 
598
599
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
@@ -754,6 +755,13 @@ interface BaseConfig {
754
755
  * This configuration will be used by the documentation generation plugins during the `docs` command.
755
756
  */
756
757
  docs?: Record<string, any>;
758
+ /**
759
+ * Configuration for deploying the source code
760
+ *
761
+ * @remarks
762
+ * If set to `false`, the deployment will be disabled.
763
+ */
764
+ deploy?: Record<string, any> | false;
757
765
  /**
758
766
  * The path to the tsconfig file to be used by the compiler
759
767
  *
@@ -868,7 +876,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
868
876
  };
869
877
  };
870
878
  type RollupUserConfig = UserConfig<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
871
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
879
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
872
880
  /**
873
881
  * The configuration provided while executing Powerlines commands.
874
882
  */
@@ -906,7 +914,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
906
914
  /**
907
915
  * The resolved options for the Powerlines project configuration.
908
916
  */
909
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "framework">> & {
917
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
910
918
  /**
911
919
  * The configuration options that were provided inline to the Powerlines CLI.
912
920
  */
@@ -978,14 +986,6 @@ interface MetaInfo {
978
986
  * A hash that represents the path to the project root directory
979
987
  */
980
988
  configHash: string;
981
- /**
982
- * A mapping of runtime ids to their corresponding file paths
983
- */
984
- builtinIdMap: Record<string, string>;
985
- /**
986
- * A mapping of virtual file paths to their corresponding file contents
987
- */
988
- virtualFiles: Record<string, string | null>;
989
989
  }
990
990
  interface Resolver extends Jiti {
991
991
  plugin: Jiti;
@@ -1193,7 +1193,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
1193
1193
  }
1194
1194
  type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1195
1195
 
1196
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
1196
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
1197
1197
  type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1198
1198
 
1199
1199
  interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
@@ -16,9 +16,7 @@ import { ArrayValues } from '@stryke/types/array';
16
16
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
17
17
  import ts from 'typescript';
18
18
  import { PrimitiveJsonValue } from '@stryke/json/types';
19
- import { Volume } from 'memfs';
20
19
  import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
21
- import { IUnionFs } from 'unionfs';
22
20
 
23
21
  type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
24
22
  interface BuildConfig {
@@ -28,6 +26,20 @@ interface BuildConfig {
28
26
  * @defaultValue "neutral"
29
27
  */
30
28
  platform?: "node" | "browser" | "neutral";
29
+ /**
30
+ * Array of strings indicating the polyfills to include for the build.
31
+ *
32
+ * @remarks
33
+ * This option allows you to specify which polyfills should be included in the build process to ensure compatibility with the target environment. The paths for the polyfills can use placeholder tokens (the `replacePathTokens` helper function will be used to resolve the actual values).
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * {
38
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
39
+ * }
40
+ * ```
41
+ */
42
+ polyfill?: string[];
31
43
  /**
32
44
  * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
33
45
  *
@@ -113,7 +125,10 @@ interface BuildConfig {
113
125
  *
114
126
  * @see https://github.com/rollup/plugins/tree/master/packages/alias
115
127
  */
116
- alias?: Record<string, string>;
128
+ alias?: Record<string, string> | Array<{
129
+ find: string | RegExp;
130
+ replacement: string;
131
+ }>;
117
132
  /**
118
133
  * A list of modules that should not be bundled, even if they are external dependencies.
119
134
  *
@@ -208,11 +223,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
208
223
  tsconfigFilePath: string;
209
224
  };
210
225
 
211
- declare const __VFS_INIT__ = "__VFS_INIT__";
212
- declare const __VFS_REVERT__ = "__VFS_REVERT__";
213
- declare const __VFS_CACHE__ = "__VFS_CACHE__";
214
- declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
215
- declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
226
+ declare const __VFS_PATCH__: unique symbol;
227
+ declare const __VFS_REVERT__: unique symbol;
216
228
  type OutputModeType = "fs" | "virtual";
217
229
  interface VirtualFile {
218
230
  /**
@@ -252,7 +264,24 @@ interface VirtualFile {
252
264
  */
253
265
  code: string | NodeJS.ArrayBufferView;
254
266
  }
255
- type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
267
+ interface VirtualFileMetadata {
268
+ /**
269
+ * The identifier for the file data.
270
+ */
271
+ id: string;
272
+ /**
273
+ * The variant of the file.
274
+ */
275
+ variant: string;
276
+ /**
277
+ * The output mode of the file.
278
+ */
279
+ mode: string;
280
+ /**
281
+ * Additional metadata associated with the file.
282
+ */
283
+ properties: Record<string, string>;
284
+ }
256
285
  interface ResolveFSOptions {
257
286
  mode?: OutputModeType;
258
287
  }
@@ -281,12 +310,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
281
310
  type?: "file" | "directory";
282
311
  }
283
312
  interface VirtualFileSystemInterface {
284
- [__VFS_INIT__]: () => void;
313
+ /**
314
+ * Patches the File System to include the virtual file system (VFS) contents.
315
+ */
316
+ [__VFS_PATCH__]: () => void;
317
+ /**
318
+ * Reverts the virtual file system (VFS) to its previous state.
319
+ */
285
320
  [__VFS_REVERT__]: () => void;
286
321
  /**
287
322
  * The underlying file metadata.
288
323
  */
289
- meta: Record<string, VirtualFileSystemMetadata | undefined>;
324
+ metadata: Record<string, VirtualFileMetadata | undefined>;
290
325
  /**
291
326
  * A map of module ids to their file paths.
292
327
  */
@@ -306,7 +341,7 @@ interface VirtualFileSystemInterface {
306
341
  * @param options - Optional parameters for resolving the path.
307
342
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
308
343
  */
309
- isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
344
+ isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
310
345
  /**
311
346
  * Checks if a file exists in the virtual file system (VFS).
312
347
  *
@@ -321,15 +356,6 @@ interface VirtualFileSystemInterface {
321
356
  * @returns `true` if the directory exists, otherwise `false`.
322
357
  */
323
358
  isDirectory: (path: string) => boolean;
324
- /**
325
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
326
- *
327
- * @see https://www.typescriptlang.org/tsconfig#paths
328
- *
329
- * @param pathOrId - The path or id to check.
330
- * @returns Whether the path or id corresponds to a virtual file.
331
- */
332
- isTsconfigPath: (pathOrId: string) => boolean;
333
359
  /**
334
360
  * Checks if a file exists in the virtual file system (VFS).
335
361
  *
@@ -343,7 +369,7 @@ interface VirtualFileSystemInterface {
343
369
  * @param pathOrId - The path or id of the file.
344
370
  * @returns The metadata of the file if it exists, otherwise undefined.
345
371
  */
346
- getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;
372
+ getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
347
373
  /**
348
374
  * Gets the stats of a file in the virtual file system (VFS).
349
375
  *
@@ -551,23 +577,12 @@ interface VirtualFileSystemInterface {
551
577
  */
552
578
  resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
553
579
  /**
554
- * Resolves a path based on TypeScript's `tsconfig.json` paths.
555
- *
556
- * @see https://www.typescriptlang.org/tsconfig#paths
580
+ * Formats a path to match the virtual file system (VFS) structure.
557
581
  *
558
- * @param path - The path to check.
559
- * @returns The resolved file path if it exists, otherwise undefined.
582
+ * @param path - The path to format.
583
+ * @returns The formatted path.
560
584
  */
561
- resolveTsconfigPath: (path: string) => string | false;
562
- /**
563
- * Resolves a package name based on TypeScript's `tsconfig.json` paths.
564
- *
565
- * @see https://www.typescriptlang.org/tsconfig#paths
566
- *
567
- * @param path - The path to check.
568
- * @returns The resolved package name if it exists, otherwise undefined.
569
- */
570
- resolveTsconfigPathPackage: (path: string) => string | false;
585
+ formatPath: (path: string) => string;
571
586
  /**
572
587
  * Resolves a path or id to a file path in the virtual file system.
573
588
  *
@@ -576,23 +591,9 @@ interface VirtualFileSystemInterface {
576
591
  */
577
592
  realpathSync: (pathOrId: string) => string;
578
593
  /**
579
- * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
580
- *
581
- * @returns A record mapping file paths to their partial metadata.
582
- */
583
- getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
584
- /**
585
- * A map of cached file paths to their underlying file content.
586
- */
587
- [__VFS_CACHE__]: Map<string, string>;
588
- /**
589
- * A reference to the underlying virtual file system.
594
+ * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
590
595
  */
591
- [__VFS_VIRTUAL__]: Volume;
592
- /**
593
- * A reference to the underlying unified file system.
594
- */
595
- [__VFS_UNIFIED__]: IUnionFs;
596
+ dispose: () => Promise<void>;
596
597
  }
597
598
 
598
599
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
@@ -754,6 +755,13 @@ interface BaseConfig {
754
755
  * This configuration will be used by the documentation generation plugins during the `docs` command.
755
756
  */
756
757
  docs?: Record<string, any>;
758
+ /**
759
+ * Configuration for deploying the source code
760
+ *
761
+ * @remarks
762
+ * If set to `false`, the deployment will be disabled.
763
+ */
764
+ deploy?: Record<string, any> | false;
757
765
  /**
758
766
  * The path to the tsconfig file to be used by the compiler
759
767
  *
@@ -868,7 +876,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
868
876
  };
869
877
  };
870
878
  type RollupUserConfig = UserConfig<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
871
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
879
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
872
880
  /**
873
881
  * The configuration provided while executing Powerlines commands.
874
882
  */
@@ -906,7 +914,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
906
914
  /**
907
915
  * The resolved options for the Powerlines project configuration.
908
916
  */
909
- type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "framework">> & {
917
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework">> & {
910
918
  /**
911
919
  * The configuration options that were provided inline to the Powerlines CLI.
912
920
  */
@@ -978,14 +986,6 @@ interface MetaInfo {
978
986
  * A hash that represents the path to the project root directory
979
987
  */
980
988
  configHash: string;
981
- /**
982
- * A mapping of runtime ids to their corresponding file paths
983
- */
984
- builtinIdMap: Record<string, string>;
985
- /**
986
- * A mapping of virtual file paths to their corresponding file contents
987
- */
988
- virtualFiles: Record<string, string | null>;
989
989
  }
990
990
  interface Resolver extends Jiti {
991
991
  plugin: Jiti;
@@ -1193,7 +1193,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
1193
1193
  }
1194
1194
  type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1195
1195
 
1196
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
1196
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
1197
1197
  type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1198
1198
 
1199
1199
  interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-CFL04PF-.cjs';
2
- export { b as RollupPluginResolvedConfig } from './index-CFL04PF-.cjs';
1
+ import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-mEoiAFKV.cjs';
2
+ export { b as RollupPluginResolvedConfig } from './index-mEoiAFKV.cjs';
3
3
  export { createRollupPlugin } from './helpers/unplugin.cjs';
4
4
  import 'rollup';
5
5
  import '@stryke/env/get-env-paths';
@@ -19,9 +19,7 @@ import '@stryke/types/array';
19
19
  import '@stryke/types/tsconfig';
20
20
  import 'typescript';
21
21
  import '@stryke/json/types';
22
- import 'memfs';
23
22
  import 'node:fs';
24
- import 'unionfs';
25
23
  import 'esbuild';
26
24
 
27
25
  /**
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-CFL04PF-.js';
2
- export { b as RollupPluginResolvedConfig } from './index-CFL04PF-.js';
1
+ import { R as RollupPluginContext, a as RollupPluginOptions, P as Plugin } from './index-mEoiAFKV.js';
2
+ export { b as RollupPluginResolvedConfig } from './index-mEoiAFKV.js';
3
3
  export { createRollupPlugin } from './helpers/unplugin.js';
4
4
  import 'rollup';
5
5
  import '@stryke/env/get-env-paths';
@@ -19,9 +19,7 @@ import '@stryke/types/array';
19
19
  import '@stryke/types/tsconfig';
20
20
  import 'typescript';
21
21
  import '@stryke/json/types';
22
- import 'memfs';
23
22
  import 'node:fs';
24
- import 'unionfs';
25
23
  import 'esbuild';
26
24
 
27
25
  /**
@@ -1,4 +1,4 @@
1
- export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-CFL04PF-.cjs';
1
+ export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-mEoiAFKV.cjs';
2
2
  import 'rollup';
3
3
  import '@stryke/env/get-env-paths';
4
4
  import '@stryke/types/base';
@@ -17,6 +17,4 @@ import '@stryke/types/array';
17
17
  import '@stryke/types/tsconfig';
18
18
  import 'typescript';
19
19
  import '@stryke/json/types';
20
- import 'memfs';
21
20
  import 'node:fs';
22
- import 'unionfs';
@@ -1,4 +1,4 @@
1
- export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-CFL04PF-.js';
1
+ export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-mEoiAFKV.js';
2
2
  import 'rollup';
3
3
  import '@stryke/env/get-env-paths';
4
4
  import '@stryke/types/base';
@@ -17,6 +17,4 @@ import '@stryke/types/array';
17
17
  import '@stryke/types/tsconfig';
18
18
  import 'typescript';
19
19
  import '@stryke/json/types';
20
- import 'memfs';
21
20
  import 'node:fs';
22
- import 'unionfs';
@@ -1,4 +1,4 @@
1
- export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-CFL04PF-.cjs';
1
+ export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-mEoiAFKV.cjs';
2
2
  import 'rollup';
3
3
  import '@stryke/env/get-env-paths';
4
4
  import '@stryke/types/base';
@@ -17,6 +17,4 @@ import '@stryke/types/array';
17
17
  import '@stryke/types/tsconfig';
18
18
  import 'typescript';
19
19
  import '@stryke/json/types';
20
- import 'memfs';
21
20
  import 'node:fs';
22
- import 'unionfs';
@@ -1,4 +1,4 @@
1
- export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-CFL04PF-.js';
1
+ export { R as RollupPluginContext, a as RollupPluginOptions, b as RollupPluginResolvedConfig } from '../index-mEoiAFKV.js';
2
2
  import 'rollup';
3
3
  import '@stryke/env/get-env-paths';
4
4
  import '@stryke/types/base';
@@ -17,6 +17,4 @@ import '@stryke/types/array';
17
17
  import '@stryke/types/tsconfig';
18
18
  import 'typescript';
19
19
  import '@stryke/json/types';
20
- import 'memfs';
21
20
  import 'node:fs';
22
- import 'unionfs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-rollup",
3
- "version": "0.7.19",
3
+ "version": "0.7.21",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "repository": {
@@ -134,15 +134,15 @@
134
134
  "@stryke/types": "^0.10.2",
135
135
  "defu": "^6.1.4",
136
136
  "jiti": "^2.6.1",
137
- "powerlines": "^0.20.0",
137
+ "powerlines": "^0.22.0",
138
138
  "rollup": "^4.53.2",
139
139
  "unplugin": "^2.3.10"
140
140
  },
141
141
  "devDependencies": {
142
- "@powerlines/nx": "^0.10.10",
143
- "@powerlines/plugin-plugin": "^0.11.18",
142
+ "@powerlines/nx": "^0.10.12",
143
+ "@powerlines/plugin-plugin": "^0.11.20",
144
144
  "@types/node": "^22.19.1"
145
145
  },
146
146
  "publishConfig": { "access": "public" },
147
- "gitHead": "e33924ab31dbf508b8983523edbaecffeebbee4f"
147
+ "gitHead": "30a4cf4f1c707fe159b55f65f1e87b14d679614d"
148
148
  }