@powerlines/plugin-date 0.12.19 → 0.12.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,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.cjs';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.cjs';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.js';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.js';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.cjs';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.cjs';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.js';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.js';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -2,7 +2,7 @@ export { dateFnsModule } from './date-fns.cjs';
2
2
  export { dayjsModule } from './dayjs.cjs';
3
3
  export { luxonModule } from './luxon.cjs';
4
4
  export { momentModule } from './moment.cjs';
5
- import '../plugin-CS9W3E3s.cjs';
5
+ import '../plugin-BDYgSjQN.cjs';
6
6
  import '@alloy-js/core/jsx-runtime';
7
7
  import '@deepkit/type';
8
8
  import '@stryke/capnp';
@@ -24,8 +24,6 @@ import 'unplugin';
24
24
  import '@stryke/types/tsconfig';
25
25
  import 'typescript';
26
26
  import '@stryke/json/types';
27
- import 'memfs';
28
27
  import 'node:fs';
29
- import 'unionfs';
30
28
  import '@stryke/types/array';
31
29
  import '@stryke/env/types';
@@ -2,7 +2,7 @@ export { dateFnsModule } from './date-fns.js';
2
2
  export { dayjsModule } from './dayjs.js';
3
3
  export { luxonModule } from './luxon.js';
4
4
  export { momentModule } from './moment.js';
5
- import '../plugin-CS9W3E3s.js';
5
+ import '../plugin-BDYgSjQN.js';
6
6
  import '@alloy-js/core/jsx-runtime';
7
7
  import '@deepkit/type';
8
8
  import '@stryke/capnp';
@@ -24,8 +24,6 @@ import 'unplugin';
24
24
  import '@stryke/types/tsconfig';
25
25
  import 'typescript';
26
26
  import '@stryke/json/types';
27
- import 'memfs';
28
27
  import 'node:fs';
29
- import 'unionfs';
30
28
  import '@stryke/types/array';
31
29
  import '@stryke/env/types';
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.cjs';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.cjs';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.js';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.js';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.cjs';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.cjs';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
@@ -1,4 +1,4 @@
1
- import { d as DatePluginContext } from '../plugin-CS9W3E3s.js';
1
+ import { d as DatePluginContext } from '../plugin-BDYgSjQN.js';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,9 +20,7 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
28
26
 
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as DatePluginOptions, P as Plugin, d as DatePluginContext } from './plugin-CS9W3E3s.cjs';
2
- export { D as DateLibraryType, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from './plugin-CS9W3E3s.cjs';
1
+ import { a as DatePluginOptions, P as Plugin, d as DatePluginContext } from './plugin-BDYgSjQN.cjs';
2
+ export { D as DateLibraryType, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from './plugin-BDYgSjQN.cjs';
3
3
  export { dateFnsModule } from './components/date-fns.cjs';
4
4
  export { dayjsModule } from './components/dayjs.cjs';
5
5
  export { luxonModule } from './components/luxon.cjs';
@@ -26,9 +26,7 @@ import 'unplugin';
26
26
  import '@stryke/types/tsconfig';
27
27
  import 'typescript';
28
28
  import '@stryke/json/types';
29
- import 'memfs';
30
29
  import 'node:fs';
31
- import 'unionfs';
32
30
  import '@stryke/types/array';
33
31
  import '@stryke/env/types';
34
32
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as DatePluginOptions, P as Plugin, d as DatePluginContext } from './plugin-CS9W3E3s.js';
2
- export { D as DateLibraryType, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from './plugin-CS9W3E3s.js';
1
+ import { a as DatePluginOptions, P as Plugin, d as DatePluginContext } from './plugin-BDYgSjQN.js';
2
+ export { D as DateLibraryType, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from './plugin-BDYgSjQN.js';
3
3
  export { dateFnsModule } from './components/date-fns.js';
4
4
  export { dayjsModule } from './components/dayjs.js';
5
5
  export { luxonModule } from './components/luxon.js';
@@ -26,9 +26,7 @@ import 'unplugin';
26
26
  import '@stryke/types/tsconfig';
27
27
  import 'typescript';
28
28
  import '@stryke/json/types';
29
- import 'memfs';
30
29
  import 'node:fs';
31
- import 'unionfs';
32
30
  import '@stryke/types/array';
33
31
  import '@stryke/env/types';
34
32
 
@@ -19,9 +19,7 @@ import { UnpluginContext, UnpluginMessage, UnpluginBuildContext, TransformResult
19
19
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
20
20
  import ts from 'typescript';
21
21
  import { PrimitiveJsonValue } from '@stryke/json/types';
22
- import { Volume } from 'memfs';
23
22
  import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
24
- import { IUnionFs } from 'unionfs';
25
23
  import { ArrayValues } from '@stryke/types/array';
26
24
  import { DotenvParseOutput } from '@stryke/env/types';
27
25
 
@@ -33,6 +31,20 @@ interface BuildConfig {
33
31
  * @defaultValue "neutral"
34
32
  */
35
33
  platform?: "node" | "browser" | "neutral";
34
+ /**
35
+ * Array of strings indicating the polyfills to include for the build.
36
+ *
37
+ * @remarks
38
+ * 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).
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * {
43
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
44
+ * }
45
+ * ```
46
+ */
47
+ polyfill?: string[];
36
48
  /**
37
49
  * 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.
38
50
  *
@@ -118,7 +130,10 @@ interface BuildConfig {
118
130
  *
119
131
  * @see https://github.com/rollup/plugins/tree/master/packages/alias
120
132
  */
121
- alias?: Record<string, string>;
133
+ alias?: Record<string, string> | Array<{
134
+ find: string | RegExp;
135
+ replacement: string;
136
+ }>;
122
137
  /**
123
138
  * A list of modules that should not be bundled, even if they are external dependencies.
124
139
  *
@@ -226,11 +241,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
226
241
  tsconfigFilePath: string;
227
242
  };
228
243
 
229
- declare const __VFS_INIT__ = "__VFS_INIT__";
230
- declare const __VFS_REVERT__ = "__VFS_REVERT__";
231
- declare const __VFS_CACHE__ = "__VFS_CACHE__";
232
- declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
233
- declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
244
+ declare const __VFS_PATCH__: unique symbol;
245
+ declare const __VFS_REVERT__: unique symbol;
234
246
  type OutputModeType = "fs" | "virtual";
235
247
  interface VirtualFile {
236
248
  /**
@@ -270,7 +282,24 @@ interface VirtualFile {
270
282
  */
271
283
  code: string | NodeJS.ArrayBufferView;
272
284
  }
273
- type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
285
+ interface VirtualFileMetadata {
286
+ /**
287
+ * The identifier for the file data.
288
+ */
289
+ id: string;
290
+ /**
291
+ * The variant of the file.
292
+ */
293
+ variant: string;
294
+ /**
295
+ * The output mode of the file.
296
+ */
297
+ mode: string;
298
+ /**
299
+ * Additional metadata associated with the file.
300
+ */
301
+ properties: Record<string, string>;
302
+ }
274
303
  interface ResolveFSOptions {
275
304
  mode?: OutputModeType;
276
305
  }
@@ -299,12 +328,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
299
328
  type?: "file" | "directory";
300
329
  }
301
330
  interface VirtualFileSystemInterface {
302
- [__VFS_INIT__]: () => void;
331
+ /**
332
+ * Patches the File System to include the virtual file system (VFS) contents.
333
+ */
334
+ [__VFS_PATCH__]: () => void;
335
+ /**
336
+ * Reverts the virtual file system (VFS) to its previous state.
337
+ */
303
338
  [__VFS_REVERT__]: () => void;
304
339
  /**
305
340
  * The underlying file metadata.
306
341
  */
307
- meta: Record<string, VirtualFileSystemMetadata | undefined>;
342
+ metadata: Record<string, VirtualFileMetadata | undefined>;
308
343
  /**
309
344
  * A map of module ids to their file paths.
310
345
  */
@@ -324,7 +359,7 @@ interface VirtualFileSystemInterface {
324
359
  * @param options - Optional parameters for resolving the path.
325
360
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
326
361
  */
327
- isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
362
+ isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
328
363
  /**
329
364
  * Checks if a file exists in the virtual file system (VFS).
330
365
  *
@@ -339,15 +374,6 @@ interface VirtualFileSystemInterface {
339
374
  * @returns `true` if the directory exists, otherwise `false`.
340
375
  */
341
376
  isDirectory: (path: string) => boolean;
342
- /**
343
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
344
- *
345
- * @see https://www.typescriptlang.org/tsconfig#paths
346
- *
347
- * @param pathOrId - The path or id to check.
348
- * @returns Whether the path or id corresponds to a virtual file.
349
- */
350
- isTsconfigPath: (pathOrId: string) => boolean;
351
377
  /**
352
378
  * Checks if a file exists in the virtual file system (VFS).
353
379
  *
@@ -361,7 +387,7 @@ interface VirtualFileSystemInterface {
361
387
  * @param pathOrId - The path or id of the file.
362
388
  * @returns The metadata of the file if it exists, otherwise undefined.
363
389
  */
364
- getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;
390
+ getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
365
391
  /**
366
392
  * Gets the stats of a file in the virtual file system (VFS).
367
393
  *
@@ -569,23 +595,12 @@ interface VirtualFileSystemInterface {
569
595
  */
570
596
  resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
571
597
  /**
572
- * Resolves a path based on TypeScript's `tsconfig.json` paths.
573
- *
574
- * @see https://www.typescriptlang.org/tsconfig#paths
598
+ * Formats a path to match the virtual file system (VFS) structure.
575
599
  *
576
- * @param path - The path to check.
577
- * @returns The resolved file path if it exists, otherwise undefined.
600
+ * @param path - The path to format.
601
+ * @returns The formatted path.
578
602
  */
579
- resolveTsconfigPath: (path: string) => string | false;
580
- /**
581
- * Resolves a package name based on TypeScript's `tsconfig.json` paths.
582
- *
583
- * @see https://www.typescriptlang.org/tsconfig#paths
584
- *
585
- * @param path - The path to check.
586
- * @returns The resolved package name if it exists, otherwise undefined.
587
- */
588
- resolveTsconfigPathPackage: (path: string) => string | false;
603
+ formatPath: (path: string) => string;
589
604
  /**
590
605
  * Resolves a path or id to a file path in the virtual file system.
591
606
  *
@@ -594,23 +609,9 @@ interface VirtualFileSystemInterface {
594
609
  */
595
610
  realpathSync: (pathOrId: string) => string;
596
611
  /**
597
- * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
598
- *
599
- * @returns A record mapping file paths to their partial metadata.
600
- */
601
- getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
602
- /**
603
- * A map of cached file paths to their underlying file content.
604
- */
605
- [__VFS_CACHE__]: Map<string, string>;
606
- /**
607
- * A reference to the underlying virtual file system.
612
+ * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
608
613
  */
609
- [__VFS_VIRTUAL__]: Volume;
610
- /**
611
- * A reference to the underlying unified file system.
612
- */
613
- [__VFS_UNIFIED__]: IUnionFs;
614
+ dispose: () => Promise<void>;
614
615
  }
615
616
 
616
617
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
@@ -782,6 +783,13 @@ interface BaseConfig {
782
783
  * This configuration will be used by the documentation generation plugins during the `docs` command.
783
784
  */
784
785
  docs?: Record<string, any>;
786
+ /**
787
+ * Configuration for deploying the source code
788
+ *
789
+ * @remarks
790
+ * If set to `false`, the deployment will be disabled.
791
+ */
792
+ deploy?: Record<string, any> | false;
785
793
  /**
786
794
  * The path to the tsconfig file to be used by the compiler
787
795
  *
@@ -895,7 +903,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
895
903
  override?: Partial<TBuildResolvedConfig>;
896
904
  };
897
905
  };
898
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
906
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
899
907
  /**
900
908
  * The configuration provided while executing Powerlines commands.
901
909
  */
@@ -934,7 +942,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
934
942
  /**
935
943
  * The resolved options for the Powerlines project configuration.
936
944
  */
937
- 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">> & {
945
+ 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">> & {
938
946
  /**
939
947
  * The configuration options that were provided inline to the Powerlines CLI.
940
948
  */
@@ -1016,14 +1024,6 @@ interface MetaInfo {
1016
1024
  * A hash that represents the path to the project root directory
1017
1025
  */
1018
1026
  configHash: string;
1019
- /**
1020
- * A mapping of runtime ids to their corresponding file paths
1021
- */
1022
- builtinIdMap: Record<string, string>;
1023
- /**
1024
- * A mapping of virtual file paths to their corresponding file contents
1025
- */
1026
- virtualFiles: Record<string, string | null>;
1027
1027
  }
1028
1028
  interface Resolver extends Jiti {
1029
1029
  plugin: Jiti;
@@ -1231,7 +1231,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
1231
1231
  }
1232
1232
  type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1233
1233
 
1234
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
1234
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
1235
1235
  type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1236
1236
 
1237
1237
  interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
@@ -19,9 +19,7 @@ import { UnpluginContext, UnpluginMessage, UnpluginBuildContext, TransformResult
19
19
  import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
20
20
  import ts from 'typescript';
21
21
  import { PrimitiveJsonValue } from '@stryke/json/types';
22
- import { Volume } from 'memfs';
23
22
  import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
24
- import { IUnionFs } from 'unionfs';
25
23
  import { ArrayValues } from '@stryke/types/array';
26
24
  import { DotenvParseOutput } from '@stryke/env/types';
27
25
 
@@ -33,6 +31,20 @@ interface BuildConfig {
33
31
  * @defaultValue "neutral"
34
32
  */
35
33
  platform?: "node" | "browser" | "neutral";
34
+ /**
35
+ * Array of strings indicating the polyfills to include for the build.
36
+ *
37
+ * @remarks
38
+ * 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).
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * {
43
+ * polyfill: ['{projectRoot}/custom-polyfill.ts']
44
+ * }
45
+ * ```
46
+ */
47
+ polyfill?: string[];
36
48
  /**
37
49
  * 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.
38
50
  *
@@ -118,7 +130,10 @@ interface BuildConfig {
118
130
  *
119
131
  * @see https://github.com/rollup/plugins/tree/master/packages/alias
120
132
  */
121
- alias?: Record<string, string>;
133
+ alias?: Record<string, string> | Array<{
134
+ find: string | RegExp;
135
+ replacement: string;
136
+ }>;
122
137
  /**
123
138
  * A list of modules that should not be bundled, even if they are external dependencies.
124
139
  *
@@ -226,11 +241,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
226
241
  tsconfigFilePath: string;
227
242
  };
228
243
 
229
- declare const __VFS_INIT__ = "__VFS_INIT__";
230
- declare const __VFS_REVERT__ = "__VFS_REVERT__";
231
- declare const __VFS_CACHE__ = "__VFS_CACHE__";
232
- declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
233
- declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
244
+ declare const __VFS_PATCH__: unique symbol;
245
+ declare const __VFS_REVERT__: unique symbol;
234
246
  type OutputModeType = "fs" | "virtual";
235
247
  interface VirtualFile {
236
248
  /**
@@ -270,7 +282,24 @@ interface VirtualFile {
270
282
  */
271
283
  code: string | NodeJS.ArrayBufferView;
272
284
  }
273
- type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
285
+ interface VirtualFileMetadata {
286
+ /**
287
+ * The identifier for the file data.
288
+ */
289
+ id: string;
290
+ /**
291
+ * The variant of the file.
292
+ */
293
+ variant: string;
294
+ /**
295
+ * The output mode of the file.
296
+ */
297
+ mode: string;
298
+ /**
299
+ * Additional metadata associated with the file.
300
+ */
301
+ properties: Record<string, string>;
302
+ }
274
303
  interface ResolveFSOptions {
275
304
  mode?: OutputModeType;
276
305
  }
@@ -299,12 +328,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
299
328
  type?: "file" | "directory";
300
329
  }
301
330
  interface VirtualFileSystemInterface {
302
- [__VFS_INIT__]: () => void;
331
+ /**
332
+ * Patches the File System to include the virtual file system (VFS) contents.
333
+ */
334
+ [__VFS_PATCH__]: () => void;
335
+ /**
336
+ * Reverts the virtual file system (VFS) to its previous state.
337
+ */
303
338
  [__VFS_REVERT__]: () => void;
304
339
  /**
305
340
  * The underlying file metadata.
306
341
  */
307
- meta: Record<string, VirtualFileSystemMetadata | undefined>;
342
+ metadata: Record<string, VirtualFileMetadata | undefined>;
308
343
  /**
309
344
  * A map of module ids to their file paths.
310
345
  */
@@ -324,7 +359,7 @@ interface VirtualFileSystemInterface {
324
359
  * @param options - Optional parameters for resolving the path.
325
360
  * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
326
361
  */
327
- isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
362
+ isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
328
363
  /**
329
364
  * Checks if a file exists in the virtual file system (VFS).
330
365
  *
@@ -339,15 +374,6 @@ interface VirtualFileSystemInterface {
339
374
  * @returns `true` if the directory exists, otherwise `false`.
340
375
  */
341
376
  isDirectory: (path: string) => boolean;
342
- /**
343
- * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
344
- *
345
- * @see https://www.typescriptlang.org/tsconfig#paths
346
- *
347
- * @param pathOrId - The path or id to check.
348
- * @returns Whether the path or id corresponds to a virtual file.
349
- */
350
- isTsconfigPath: (pathOrId: string) => boolean;
351
377
  /**
352
378
  * Checks if a file exists in the virtual file system (VFS).
353
379
  *
@@ -361,7 +387,7 @@ interface VirtualFileSystemInterface {
361
387
  * @param pathOrId - The path or id of the file.
362
388
  * @returns The metadata of the file if it exists, otherwise undefined.
363
389
  */
364
- getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;
390
+ getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
365
391
  /**
366
392
  * Gets the stats of a file in the virtual file system (VFS).
367
393
  *
@@ -569,23 +595,12 @@ interface VirtualFileSystemInterface {
569
595
  */
570
596
  resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
571
597
  /**
572
- * Resolves a path based on TypeScript's `tsconfig.json` paths.
573
- *
574
- * @see https://www.typescriptlang.org/tsconfig#paths
598
+ * Formats a path to match the virtual file system (VFS) structure.
575
599
  *
576
- * @param path - The path to check.
577
- * @returns The resolved file path if it exists, otherwise undefined.
600
+ * @param path - The path to format.
601
+ * @returns The formatted path.
578
602
  */
579
- resolveTsconfigPath: (path: string) => string | false;
580
- /**
581
- * Resolves a package name based on TypeScript's `tsconfig.json` paths.
582
- *
583
- * @see https://www.typescriptlang.org/tsconfig#paths
584
- *
585
- * @param path - The path to check.
586
- * @returns The resolved package name if it exists, otherwise undefined.
587
- */
588
- resolveTsconfigPathPackage: (path: string) => string | false;
603
+ formatPath: (path: string) => string;
589
604
  /**
590
605
  * Resolves a path or id to a file path in the virtual file system.
591
606
  *
@@ -594,23 +609,9 @@ interface VirtualFileSystemInterface {
594
609
  */
595
610
  realpathSync: (pathOrId: string) => string;
596
611
  /**
597
- * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
598
- *
599
- * @returns A record mapping file paths to their partial metadata.
600
- */
601
- getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
602
- /**
603
- * A map of cached file paths to their underlying file content.
604
- */
605
- [__VFS_CACHE__]: Map<string, string>;
606
- /**
607
- * A reference to the underlying virtual file system.
612
+ * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
608
613
  */
609
- [__VFS_VIRTUAL__]: Volume;
610
- /**
611
- * A reference to the underlying unified file system.
612
- */
613
- [__VFS_UNIFIED__]: IUnionFs;
614
+ dispose: () => Promise<void>;
614
615
  }
615
616
 
616
617
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
@@ -782,6 +783,13 @@ interface BaseConfig {
782
783
  * This configuration will be used by the documentation generation plugins during the `docs` command.
783
784
  */
784
785
  docs?: Record<string, any>;
786
+ /**
787
+ * Configuration for deploying the source code
788
+ *
789
+ * @remarks
790
+ * If set to `false`, the deployment will be disabled.
791
+ */
792
+ deploy?: Record<string, any> | false;
785
793
  /**
786
794
  * The path to the tsconfig file to be used by the compiler
787
795
  *
@@ -895,7 +903,7 @@ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedCo
895
903
  override?: Partial<TBuildResolvedConfig>;
896
904
  };
897
905
  };
898
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
906
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
899
907
  /**
900
908
  * The configuration provided while executing Powerlines commands.
901
909
  */
@@ -934,7 +942,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
934
942
  /**
935
943
  * The resolved options for the Powerlines project configuration.
936
944
  */
937
- 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">> & {
945
+ 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">> & {
938
946
  /**
939
947
  * The configuration options that were provided inline to the Powerlines CLI.
940
948
  */
@@ -1016,14 +1024,6 @@ interface MetaInfo {
1016
1024
  * A hash that represents the path to the project root directory
1017
1025
  */
1018
1026
  configHash: string;
1019
- /**
1020
- * A mapping of runtime ids to their corresponding file paths
1021
- */
1022
- builtinIdMap: Record<string, string>;
1023
- /**
1024
- * A mapping of virtual file paths to their corresponding file contents
1025
- */
1026
- virtualFiles: Record<string, string | null>;
1027
1027
  }
1028
1028
  interface Resolver extends Jiti {
1029
1029
  plugin: Jiti;
@@ -1231,7 +1231,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
1231
1231
  }
1232
1232
  type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1233
1233
 
1234
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
1234
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
1235
1235
  type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1236
1236
 
1237
1237
  interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
@@ -1,4 +1,4 @@
1
- export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-CS9W3E3s.cjs';
1
+ export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BDYgSjQN.cjs';
2
2
  export { DateFormats, StormDateInterface, TimeUnit } from './runtime.cjs';
3
3
  import '@alloy-js/core/jsx-runtime';
4
4
  import '@deepkit/type';
@@ -21,8 +21,6 @@ import 'unplugin';
21
21
  import '@stryke/types/tsconfig';
22
22
  import 'typescript';
23
23
  import '@stryke/json/types';
24
- import 'memfs';
25
24
  import 'node:fs';
26
- import 'unionfs';
27
25
  import '@stryke/types/array';
28
26
  import '@stryke/env/types';
@@ -1,4 +1,4 @@
1
- export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-CS9W3E3s.js';
1
+ export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BDYgSjQN.js';
2
2
  export { DateFormats, StormDateInterface, TimeUnit } from './runtime.js';
3
3
  import '@alloy-js/core/jsx-runtime';
4
4
  import '@deepkit/type';
@@ -21,8 +21,6 @@ import 'unplugin';
21
21
  import '@stryke/types/tsconfig';
22
22
  import 'typescript';
23
23
  import '@stryke/json/types';
24
- import 'memfs';
25
24
  import 'node:fs';
26
- import 'unionfs';
27
25
  import '@stryke/types/array';
28
26
  import '@stryke/env/types';
@@ -1,4 +1,4 @@
1
- export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-CS9W3E3s.cjs';
1
+ export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BDYgSjQN.cjs';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,8 +20,6 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
@@ -1,4 +1,4 @@
1
- export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-CS9W3E3s.js';
1
+ export { D as DateLibraryType, d as DatePluginContext, a as DatePluginOptions, c as DatePluginResolvedConfig, b as DatePluginUserConfig } from '../plugin-BDYgSjQN.js';
2
2
  import '@alloy-js/core/jsx-runtime';
3
3
  import '@deepkit/type';
4
4
  import '@stryke/capnp';
@@ -20,8 +20,6 @@ import 'unplugin';
20
20
  import '@stryke/types/tsconfig';
21
21
  import 'typescript';
22
22
  import '@stryke/json/types';
23
- import 'memfs';
24
23
  import 'node:fs';
25
- import 'unionfs';
26
24
  import '@stryke/types/array';
27
25
  import '@stryke/env/types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-date",
3
- "version": "0.12.19",
3
+ "version": "0.12.21",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
6
6
  "repository": {
@@ -116,16 +116,16 @@
116
116
  "files": ["dist/**/*"],
117
117
  "keywords": ["powerlines", "storm-software", "powerlines-plugin"],
118
118
  "dependencies": {
119
- "@powerlines/plugin-env": "^0.13.16",
119
+ "@powerlines/plugin-env": "^0.13.18",
120
120
  "@storm-software/config-tools": "^1.188.40",
121
121
  "@stryke/path": "^0.19.2",
122
- "powerlines": "^0.20.0"
122
+ "powerlines": "^0.22.0"
123
123
  },
124
124
  "devDependencies": {
125
- "@powerlines/nx": "^0.10.10",
125
+ "@powerlines/nx": "^0.10.12",
126
126
  "@storm-software/tsup": "^0.2.38",
127
127
  "@types/node": "^22.19.1"
128
128
  },
129
129
  "publishConfig": { "access": "public" },
130
- "gitHead": "e33924ab31dbf508b8983523edbaecffeebbee4f"
130
+ "gitHead": "30a4cf4f1c707fe159b55f65f1e87b14d679614d"
131
131
  }