@powerlines/plugin-crypto 0.9.18 → 0.9.20
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.
- package/dist/components/crypto.d.cts +1 -3
- package/dist/components/crypto.d.ts +1 -3
- package/dist/components/index.d.cts +1 -3
- package/dist/components/index.d.ts +1 -3
- package/dist/{index-D1pYRpOZ.d.cts → index-Dpl6_H0U.d.cts} +199 -113
- package/dist/{index-D1pYRpOZ.d.ts → index-Dpl6_H0U.d.ts} +199 -113
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/types/index.d.cts +1 -3
- package/dist/types/index.d.ts +1 -3
- package/dist/types/plugin.d.cts +1 -3
- package/dist/types/plugin.d.ts +1 -3
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CryptoPluginContext } from '../index-
|
|
1
|
+
import { a as CryptoPluginContext } from '../index-Dpl6_H0U.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 { a as CryptoPluginContext } from '../index-
|
|
1
|
+
import { a as CryptoPluginContext } from '../index-Dpl6_H0U.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,5 +1,5 @@
|
|
|
1
1
|
export { cryptoModule } from './crypto.cjs';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-Dpl6_H0U.cjs';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@deepkit/type';
|
|
5
5
|
import '@stryke/capnp';
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
export { cryptoModule } from './crypto.js';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-Dpl6_H0U.js';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@deepkit/type';
|
|
5
5
|
import '@stryke/capnp';
|
|
@@ -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';
|
|
@@ -15,13 +15,11 @@ import { PackageJson } from '@stryke/types/package-json';
|
|
|
15
15
|
import { Jiti } from 'jiti';
|
|
16
16
|
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
17
17
|
import { Range } from 'semver';
|
|
18
|
-
import { UnpluginContext,
|
|
18
|
+
import { UnpluginContext, UnpluginMessage, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
|
|
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,87 @@ 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[];
|
|
48
|
+
/**
|
|
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.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
52
|
+
*/
|
|
53
|
+
mainFields?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Array of strings indicating what conditions should be used for module resolution.
|
|
56
|
+
*/
|
|
57
|
+
conditions?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Array of strings indicating what file extensions should be used for module resolution.
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
62
|
+
*/
|
|
63
|
+
extensions?: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
69
|
+
*/
|
|
70
|
+
dedupe?: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
73
|
+
*/
|
|
74
|
+
builtins?: (string | RegExp)[];
|
|
75
|
+
/**
|
|
76
|
+
* Define global variable replacements.
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* {
|
|
84
|
+
* define: {
|
|
85
|
+
* __VERSION__: '"1.0.0"',
|
|
86
|
+
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @see https://esbuild.github.io/api/#define
|
|
92
|
+
* @see https://vitejs.dev/config/build-options.html#define
|
|
93
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
94
|
+
*/
|
|
95
|
+
define?: Record<string, any>;
|
|
96
|
+
/**
|
|
97
|
+
* Global variables that will have import statements injected where necessary
|
|
98
|
+
*
|
|
99
|
+
* @remarks
|
|
100
|
+
* This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* {
|
|
105
|
+
* inject: {
|
|
106
|
+
* process: 'process/browser',
|
|
107
|
+
* Buffer: ['buffer', 'Buffer'],
|
|
108
|
+
* }
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
113
|
+
*/
|
|
114
|
+
inject?: Record<string, string | string[]>;
|
|
36
115
|
/**
|
|
37
116
|
* The alias mappings to use for module resolution during the build process.
|
|
38
117
|
*
|
|
@@ -48,8 +127,13 @@ interface BuildConfig {
|
|
|
48
127
|
* }
|
|
49
128
|
* }
|
|
50
129
|
* ```
|
|
130
|
+
*
|
|
131
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
51
132
|
*/
|
|
52
|
-
alias?: Record<string, string
|
|
133
|
+
alias?: Record<string, string> | Array<{
|
|
134
|
+
find: string | RegExp;
|
|
135
|
+
replacement: string;
|
|
136
|
+
}>;
|
|
53
137
|
/**
|
|
54
138
|
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
55
139
|
*
|
|
@@ -66,13 +150,14 @@ interface BuildConfig {
|
|
|
66
150
|
*/
|
|
67
151
|
skipNodeModulesBundle?: boolean;
|
|
68
152
|
/**
|
|
69
|
-
*
|
|
153
|
+
* An optional set of override options to apply to the selected build variant.
|
|
70
154
|
*
|
|
71
|
-
* @
|
|
155
|
+
* @remarks
|
|
156
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
72
157
|
*/
|
|
73
|
-
|
|
158
|
+
override?: Record<string, any>;
|
|
74
159
|
}
|
|
75
|
-
type BuildResolvedConfig = BuildConfig
|
|
160
|
+
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
76
161
|
|
|
77
162
|
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
78
163
|
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
@@ -156,11 +241,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
|
156
241
|
tsconfigFilePath: string;
|
|
157
242
|
};
|
|
158
243
|
|
|
159
|
-
declare const
|
|
160
|
-
declare const __VFS_REVERT__
|
|
161
|
-
declare const __VFS_CACHE__ = "__VFS_CACHE__";
|
|
162
|
-
declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
|
|
163
|
-
declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
|
|
244
|
+
declare const __VFS_PATCH__: unique symbol;
|
|
245
|
+
declare const __VFS_REVERT__: unique symbol;
|
|
164
246
|
type OutputModeType = "fs" | "virtual";
|
|
165
247
|
interface VirtualFile {
|
|
166
248
|
/**
|
|
@@ -200,7 +282,24 @@ interface VirtualFile {
|
|
|
200
282
|
*/
|
|
201
283
|
code: string | NodeJS.ArrayBufferView;
|
|
202
284
|
}
|
|
203
|
-
|
|
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
|
+
}
|
|
204
303
|
interface ResolveFSOptions {
|
|
205
304
|
mode?: OutputModeType;
|
|
206
305
|
}
|
|
@@ -229,12 +328,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
229
328
|
type?: "file" | "directory";
|
|
230
329
|
}
|
|
231
330
|
interface VirtualFileSystemInterface {
|
|
232
|
-
|
|
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
|
+
*/
|
|
233
338
|
[__VFS_REVERT__]: () => void;
|
|
234
339
|
/**
|
|
235
340
|
* The underlying file metadata.
|
|
236
341
|
*/
|
|
237
|
-
|
|
342
|
+
metadata: Record<string, VirtualFileMetadata | undefined>;
|
|
238
343
|
/**
|
|
239
344
|
* A map of module ids to their file paths.
|
|
240
345
|
*/
|
|
@@ -254,7 +359,7 @@ interface VirtualFileSystemInterface {
|
|
|
254
359
|
* @param options - Optional parameters for resolving the path.
|
|
255
360
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
256
361
|
*/
|
|
257
|
-
|
|
362
|
+
isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
|
|
258
363
|
/**
|
|
259
364
|
* Checks if a file exists in the virtual file system (VFS).
|
|
260
365
|
*
|
|
@@ -269,15 +374,6 @@ interface VirtualFileSystemInterface {
|
|
|
269
374
|
* @returns `true` if the directory exists, otherwise `false`.
|
|
270
375
|
*/
|
|
271
376
|
isDirectory: (path: string) => boolean;
|
|
272
|
-
/**
|
|
273
|
-
* Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
|
|
274
|
-
*
|
|
275
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
276
|
-
*
|
|
277
|
-
* @param pathOrId - The path or id to check.
|
|
278
|
-
* @returns Whether the path or id corresponds to a virtual file.
|
|
279
|
-
*/
|
|
280
|
-
isTsconfigPath: (pathOrId: string) => boolean;
|
|
281
377
|
/**
|
|
282
378
|
* Checks if a file exists in the virtual file system (VFS).
|
|
283
379
|
*
|
|
@@ -291,7 +387,7 @@ interface VirtualFileSystemInterface {
|
|
|
291
387
|
* @param pathOrId - The path or id of the file.
|
|
292
388
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
293
389
|
*/
|
|
294
|
-
getMetadata: (pathOrId: PathLike) =>
|
|
390
|
+
getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
|
|
295
391
|
/**
|
|
296
392
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
297
393
|
*
|
|
@@ -499,23 +595,12 @@ interface VirtualFileSystemInterface {
|
|
|
499
595
|
*/
|
|
500
596
|
resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
|
|
501
597
|
/**
|
|
502
|
-
*
|
|
598
|
+
* Formats a path to match the virtual file system (VFS) structure.
|
|
503
599
|
*
|
|
504
|
-
* @
|
|
505
|
-
*
|
|
506
|
-
* @param path - The path to check.
|
|
507
|
-
* @returns The resolved file path if it exists, otherwise undefined.
|
|
508
|
-
*/
|
|
509
|
-
resolveTsconfigPath: (path: string) => string | false;
|
|
510
|
-
/**
|
|
511
|
-
* Resolves a package name based on TypeScript's `tsconfig.json` paths.
|
|
512
|
-
*
|
|
513
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
514
|
-
*
|
|
515
|
-
* @param path - The path to check.
|
|
516
|
-
* @returns The resolved package name if it exists, otherwise undefined.
|
|
600
|
+
* @param path - The path to format.
|
|
601
|
+
* @returns The formatted path.
|
|
517
602
|
*/
|
|
518
|
-
|
|
603
|
+
formatPath: (path: string) => string;
|
|
519
604
|
/**
|
|
520
605
|
* Resolves a path or id to a file path in the virtual file system.
|
|
521
606
|
*
|
|
@@ -524,23 +609,9 @@ interface VirtualFileSystemInterface {
|
|
|
524
609
|
*/
|
|
525
610
|
realpathSync: (pathOrId: string) => string;
|
|
526
611
|
/**
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
* @returns A record mapping file paths to their partial metadata.
|
|
530
|
-
*/
|
|
531
|
-
getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
|
|
532
|
-
/**
|
|
533
|
-
* A map of cached file paths to their underlying file content.
|
|
534
|
-
*/
|
|
535
|
-
[__VFS_CACHE__]: Map<string, string>;
|
|
536
|
-
/**
|
|
537
|
-
* A reference to the underlying virtual file system.
|
|
538
|
-
*/
|
|
539
|
-
[__VFS_VIRTUAL__]: Volume;
|
|
540
|
-
/**
|
|
541
|
-
* A reference to the underlying unified file system.
|
|
612
|
+
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
542
613
|
*/
|
|
543
|
-
|
|
614
|
+
dispose: () => Promise<void>;
|
|
544
615
|
}
|
|
545
616
|
|
|
546
617
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
@@ -676,24 +747,33 @@ interface BaseConfig {
|
|
|
676
747
|
* The entry point(s) for the application
|
|
677
748
|
*/
|
|
678
749
|
entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
|
|
750
|
+
/**
|
|
751
|
+
* Configuration for the output of the build process
|
|
752
|
+
*/
|
|
753
|
+
output?: OutputConfig;
|
|
679
754
|
/**
|
|
680
755
|
* Configuration for linting the source code
|
|
756
|
+
*
|
|
757
|
+
* @remarks
|
|
758
|
+
* If set to `false`, linting will be disabled.
|
|
681
759
|
*/
|
|
682
760
|
lint?: Record<string, any> | false;
|
|
683
761
|
/**
|
|
684
762
|
* Configuration for testing the source code
|
|
763
|
+
*
|
|
764
|
+
* @remarks
|
|
765
|
+
* If set to `false`, testing will be disabled.
|
|
685
766
|
*/
|
|
686
767
|
test?: Record<string, any> | false;
|
|
687
|
-
/**
|
|
688
|
-
* Configuration for the output of the build process
|
|
689
|
-
*/
|
|
690
|
-
output?: OutputConfig;
|
|
691
768
|
/**
|
|
692
769
|
* Configuration for the transformation of the source code
|
|
693
770
|
*/
|
|
694
771
|
transform?: Record<string, any>;
|
|
695
772
|
/**
|
|
696
|
-
*
|
|
773
|
+
* Configuration provided to build processes
|
|
774
|
+
*
|
|
775
|
+
* @remarks
|
|
776
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
697
777
|
*/
|
|
698
778
|
build?: BuildConfig;
|
|
699
779
|
/**
|
|
@@ -703,6 +783,13 @@ interface BaseConfig {
|
|
|
703
783
|
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
704
784
|
*/
|
|
705
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;
|
|
706
793
|
/**
|
|
707
794
|
* The path to the tsconfig file to be used by the compiler
|
|
708
795
|
*
|
|
@@ -723,37 +810,6 @@ interface BaseConfig {
|
|
|
723
810
|
tsconfigRaw?: TSConfig;
|
|
724
811
|
}
|
|
725
812
|
interface EnvironmentConfig extends BaseConfig {
|
|
726
|
-
/**
|
|
727
|
-
* 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.
|
|
728
|
-
*
|
|
729
|
-
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
730
|
-
*/
|
|
731
|
-
mainFields?: string[];
|
|
732
|
-
/**
|
|
733
|
-
* Array of strings indicating what conditions should be used for module resolution.
|
|
734
|
-
*/
|
|
735
|
-
conditions?: string[];
|
|
736
|
-
/**
|
|
737
|
-
* Array of strings indicating what conditions should be used for external modules.
|
|
738
|
-
*/
|
|
739
|
-
externalConditions?: string[];
|
|
740
|
-
/**
|
|
741
|
-
* Array of strings indicating what file extensions should be used for module resolution.
|
|
742
|
-
*
|
|
743
|
-
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
744
|
-
*/
|
|
745
|
-
extensions?: string[];
|
|
746
|
-
/**
|
|
747
|
-
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
748
|
-
*
|
|
749
|
-
* @remarks
|
|
750
|
-
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
751
|
-
*/
|
|
752
|
-
dedupe?: string[];
|
|
753
|
-
/**
|
|
754
|
-
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
755
|
-
*/
|
|
756
|
-
builtins?: (string | RegExp)[];
|
|
757
813
|
/**
|
|
758
814
|
* Configuration options for the preview server
|
|
759
815
|
*/
|
|
@@ -826,16 +882,28 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
826
882
|
*/
|
|
827
883
|
framework?: string;
|
|
828
884
|
}
|
|
829
|
-
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
830
|
-
|
|
885
|
+
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
|
|
886
|
+
/**
|
|
887
|
+
* Configuration provided to build processes
|
|
888
|
+
*
|
|
889
|
+
* @remarks
|
|
890
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
891
|
+
*/
|
|
892
|
+
build: Omit<TBuildConfig, "override"> & {
|
|
831
893
|
/**
|
|
832
894
|
* The build variant being used by the Powerlines engine.
|
|
833
895
|
*/
|
|
834
896
|
variant?: TBuildVariant;
|
|
897
|
+
/**
|
|
898
|
+
* An optional set of override options to apply to the selected build variant.
|
|
899
|
+
*
|
|
900
|
+
* @remarks
|
|
901
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
902
|
+
*/
|
|
903
|
+
override?: Partial<TBuildResolvedConfig>;
|
|
835
904
|
};
|
|
836
|
-
override?: Partial<TBuildResolvedConfig>;
|
|
837
905
|
};
|
|
838
|
-
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "
|
|
906
|
+
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
839
907
|
/**
|
|
840
908
|
* The configuration provided while executing Powerlines commands.
|
|
841
909
|
*/
|
|
@@ -857,7 +925,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
857
925
|
output?: string;
|
|
858
926
|
}
|
|
859
927
|
type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
|
|
860
|
-
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"
|
|
928
|
+
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
|
|
861
929
|
/**
|
|
862
930
|
* The name of the environment
|
|
863
931
|
*/
|
|
@@ -874,7 +942,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
|
874
942
|
/**
|
|
875
943
|
* The resolved options for the Powerlines project configuration.
|
|
876
944
|
*/
|
|
877
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "
|
|
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">> & {
|
|
878
946
|
/**
|
|
879
947
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
880
948
|
*/
|
|
@@ -905,6 +973,13 @@ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserCon
|
|
|
905
973
|
* The output configuration options to use for the build process
|
|
906
974
|
*/
|
|
907
975
|
output: OutputResolvedConfig;
|
|
976
|
+
/**
|
|
977
|
+
* Configuration provided to build processes
|
|
978
|
+
*
|
|
979
|
+
* @remarks
|
|
980
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
981
|
+
*/
|
|
982
|
+
build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
|
|
908
983
|
/**
|
|
909
984
|
* The log level to use for the Powerlines processes.
|
|
910
985
|
*
|
|
@@ -949,14 +1024,6 @@ interface MetaInfo {
|
|
|
949
1024
|
* A hash that represents the path to the project root directory
|
|
950
1025
|
*/
|
|
951
1026
|
configHash: string;
|
|
952
|
-
/**
|
|
953
|
-
* A mapping of runtime ids to their corresponding file paths
|
|
954
|
-
*/
|
|
955
|
-
builtinIdMap: Record<string, string>;
|
|
956
|
-
/**
|
|
957
|
-
* A mapping of virtual file paths to their corresponding file contents
|
|
958
|
-
*/
|
|
959
|
-
virtualFiles: Record<string, string | null>;
|
|
960
1027
|
}
|
|
961
1028
|
interface Resolver extends Jiti {
|
|
962
1029
|
plugin: Jiti;
|
|
@@ -969,7 +1036,13 @@ interface InitContextOptions {
|
|
|
969
1036
|
*/
|
|
970
1037
|
isHighPriority: boolean;
|
|
971
1038
|
}
|
|
972
|
-
|
|
1039
|
+
/**
|
|
1040
|
+
* The unresolved Powerlines context.
|
|
1041
|
+
*
|
|
1042
|
+
* @remarks
|
|
1043
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
1044
|
+
*/
|
|
1045
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
973
1046
|
/**
|
|
974
1047
|
* The Storm workspace configuration
|
|
975
1048
|
*/
|
|
@@ -977,7 +1050,10 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
977
1050
|
/**
|
|
978
1051
|
* An object containing the options provided to Powerlines
|
|
979
1052
|
*/
|
|
980
|
-
config: TResolvedConfig
|
|
1053
|
+
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1054
|
+
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1055
|
+
output: TResolvedConfig["output"];
|
|
1056
|
+
};
|
|
981
1057
|
/**
|
|
982
1058
|
* A logging function for the Powerlines engine
|
|
983
1059
|
*/
|
|
@@ -1134,6 +1210,12 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
1134
1210
|
*/
|
|
1135
1211
|
extendLog: (name: string) => LogFn;
|
|
1136
1212
|
}
|
|
1213
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
1214
|
+
/**
|
|
1215
|
+
* The fully resolved Powerlines configuration
|
|
1216
|
+
*/
|
|
1217
|
+
config: TResolvedConfig;
|
|
1218
|
+
};
|
|
1137
1219
|
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
1138
1220
|
/**
|
|
1139
1221
|
* The environment specific resolved configuration
|
|
@@ -1149,7 +1231,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1149
1231
|
}
|
|
1150
1232
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
|
|
1151
1233
|
|
|
1152
|
-
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "
|
|
1234
|
+
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1153
1235
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
1154
1236
|
|
|
1155
1237
|
interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
|
|
@@ -1174,6 +1256,10 @@ interface GenerateTypesResult {
|
|
|
1174
1256
|
directives?: string[];
|
|
1175
1257
|
code: string;
|
|
1176
1258
|
}
|
|
1259
|
+
type DeepPartial<T> = {
|
|
1260
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
1261
|
+
};
|
|
1262
|
+
type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
|
|
1177
1263
|
interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
|
|
1178
1264
|
/**
|
|
1179
1265
|
* A function that returns configuration options to be merged with the build context's options.
|
|
@@ -1189,7 +1275,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1189
1275
|
* @param config - The partial configuration object to be modified.
|
|
1190
1276
|
* @returns A promise that resolves to a partial configuration object.
|
|
1191
1277
|
*/
|
|
1192
|
-
config: (this:
|
|
1278
|
+
config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
|
|
1193
1279
|
/**
|
|
1194
1280
|
* Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
|
|
1195
1281
|
*
|
|
@@ -1292,7 +1378,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1292
1378
|
* @param config - The partial configuration object to be modified.
|
|
1293
1379
|
* @returns A promise that resolves to a partial configuration object.
|
|
1294
1380
|
*/
|
|
1295
|
-
config: PluginHook<(this:
|
|
1381
|
+
config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
|
|
1296
1382
|
/**
|
|
1297
1383
|
* A hook that is called to transform the source code.
|
|
1298
1384
|
*
|
|
@@ -15,13 +15,11 @@ import { PackageJson } from '@stryke/types/package-json';
|
|
|
15
15
|
import { Jiti } from 'jiti';
|
|
16
16
|
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
17
17
|
import { Range } from 'semver';
|
|
18
|
-
import { UnpluginContext,
|
|
18
|
+
import { UnpluginContext, UnpluginMessage, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
|
|
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,87 @@ 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[];
|
|
48
|
+
/**
|
|
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.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
52
|
+
*/
|
|
53
|
+
mainFields?: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Array of strings indicating what conditions should be used for module resolution.
|
|
56
|
+
*/
|
|
57
|
+
conditions?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Array of strings indicating what file extensions should be used for module resolution.
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
62
|
+
*/
|
|
63
|
+
extensions?: string[];
|
|
64
|
+
/**
|
|
65
|
+
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
66
|
+
*
|
|
67
|
+
* @remarks
|
|
68
|
+
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
69
|
+
*/
|
|
70
|
+
dedupe?: string[];
|
|
71
|
+
/**
|
|
72
|
+
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
73
|
+
*/
|
|
74
|
+
builtins?: (string | RegExp)[];
|
|
75
|
+
/**
|
|
76
|
+
* Define global variable replacements.
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* This option allows you to specify global constants that will be replaced in the code during the build process. It is similar to the `define` option in esbuild and Vite, enabling you to replace specific identifiers with constant expressions at build time.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* {
|
|
84
|
+
* define: {
|
|
85
|
+
* __VERSION__: '"1.0.0"',
|
|
86
|
+
* __DEV__: 'process.env.NODE_ENV !== "production"'
|
|
87
|
+
* }
|
|
88
|
+
* }
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @see https://esbuild.github.io/api/#define
|
|
92
|
+
* @see https://vitejs.dev/config/build-options.html#define
|
|
93
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/replace
|
|
94
|
+
*/
|
|
95
|
+
define?: Record<string, any>;
|
|
96
|
+
/**
|
|
97
|
+
* Global variables that will have import statements injected where necessary
|
|
98
|
+
*
|
|
99
|
+
* @remarks
|
|
100
|
+
* This option allows you to specify global variables that should be automatically imported from specified modules whenever they are used in the code. This is particularly useful for polyfilling Node.js globals in a browser environment.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* {
|
|
105
|
+
* inject: {
|
|
106
|
+
* process: 'process/browser',
|
|
107
|
+
* Buffer: ['buffer', 'Buffer'],
|
|
108
|
+
* }
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/inject
|
|
113
|
+
*/
|
|
114
|
+
inject?: Record<string, string | string[]>;
|
|
36
115
|
/**
|
|
37
116
|
* The alias mappings to use for module resolution during the build process.
|
|
38
117
|
*
|
|
@@ -48,8 +127,13 @@ interface BuildConfig {
|
|
|
48
127
|
* }
|
|
49
128
|
* }
|
|
50
129
|
* ```
|
|
130
|
+
*
|
|
131
|
+
* @see https://github.com/rollup/plugins/tree/master/packages/alias
|
|
51
132
|
*/
|
|
52
|
-
alias?: Record<string, string
|
|
133
|
+
alias?: Record<string, string> | Array<{
|
|
134
|
+
find: string | RegExp;
|
|
135
|
+
replacement: string;
|
|
136
|
+
}>;
|
|
53
137
|
/**
|
|
54
138
|
* A list of modules that should not be bundled, even if they are external dependencies.
|
|
55
139
|
*
|
|
@@ -66,13 +150,14 @@ interface BuildConfig {
|
|
|
66
150
|
*/
|
|
67
151
|
skipNodeModulesBundle?: boolean;
|
|
68
152
|
/**
|
|
69
|
-
*
|
|
153
|
+
* An optional set of override options to apply to the selected build variant.
|
|
70
154
|
*
|
|
71
|
-
* @
|
|
155
|
+
* @remarks
|
|
156
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
72
157
|
*/
|
|
73
|
-
|
|
158
|
+
override?: Record<string, any>;
|
|
74
159
|
}
|
|
75
|
-
type BuildResolvedConfig = BuildConfig
|
|
160
|
+
type BuildResolvedConfig = Omit<BuildConfig, "override">;
|
|
76
161
|
|
|
77
162
|
type BabelPluginPass<TState = unknown> = PluginPass & TState;
|
|
78
163
|
type BabelTransformPluginFilter = (code: string, id: string) => boolean;
|
|
@@ -156,11 +241,8 @@ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
|
156
241
|
tsconfigFilePath: string;
|
|
157
242
|
};
|
|
158
243
|
|
|
159
|
-
declare const
|
|
160
|
-
declare const __VFS_REVERT__
|
|
161
|
-
declare const __VFS_CACHE__ = "__VFS_CACHE__";
|
|
162
|
-
declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
|
|
163
|
-
declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
|
|
244
|
+
declare const __VFS_PATCH__: unique symbol;
|
|
245
|
+
declare const __VFS_REVERT__: unique symbol;
|
|
164
246
|
type OutputModeType = "fs" | "virtual";
|
|
165
247
|
interface VirtualFile {
|
|
166
248
|
/**
|
|
@@ -200,7 +282,24 @@ interface VirtualFile {
|
|
|
200
282
|
*/
|
|
201
283
|
code: string | NodeJS.ArrayBufferView;
|
|
202
284
|
}
|
|
203
|
-
|
|
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
|
+
}
|
|
204
303
|
interface ResolveFSOptions {
|
|
205
304
|
mode?: OutputModeType;
|
|
206
305
|
}
|
|
@@ -229,12 +328,18 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
229
328
|
type?: "file" | "directory";
|
|
230
329
|
}
|
|
231
330
|
interface VirtualFileSystemInterface {
|
|
232
|
-
|
|
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
|
+
*/
|
|
233
338
|
[__VFS_REVERT__]: () => void;
|
|
234
339
|
/**
|
|
235
340
|
* The underlying file metadata.
|
|
236
341
|
*/
|
|
237
|
-
|
|
342
|
+
metadata: Record<string, VirtualFileMetadata | undefined>;
|
|
238
343
|
/**
|
|
239
344
|
* A map of module ids to their file paths.
|
|
240
345
|
*/
|
|
@@ -254,7 +359,7 @@ interface VirtualFileSystemInterface {
|
|
|
254
359
|
* @param options - Optional parameters for resolving the path.
|
|
255
360
|
* @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
|
|
256
361
|
*/
|
|
257
|
-
|
|
362
|
+
isPhysical: (pathOrId: string, options?: ResolvePathOptions) => boolean;
|
|
258
363
|
/**
|
|
259
364
|
* Checks if a file exists in the virtual file system (VFS).
|
|
260
365
|
*
|
|
@@ -269,15 +374,6 @@ interface VirtualFileSystemInterface {
|
|
|
269
374
|
* @returns `true` if the directory exists, otherwise `false`.
|
|
270
375
|
*/
|
|
271
376
|
isDirectory: (path: string) => boolean;
|
|
272
|
-
/**
|
|
273
|
-
* Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
|
|
274
|
-
*
|
|
275
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
276
|
-
*
|
|
277
|
-
* @param pathOrId - The path or id to check.
|
|
278
|
-
* @returns Whether the path or id corresponds to a virtual file.
|
|
279
|
-
*/
|
|
280
|
-
isTsconfigPath: (pathOrId: string) => boolean;
|
|
281
377
|
/**
|
|
282
378
|
* Checks if a file exists in the virtual file system (VFS).
|
|
283
379
|
*
|
|
@@ -291,7 +387,7 @@ interface VirtualFileSystemInterface {
|
|
|
291
387
|
* @param pathOrId - The path or id of the file.
|
|
292
388
|
* @returns The metadata of the file if it exists, otherwise undefined.
|
|
293
389
|
*/
|
|
294
|
-
getMetadata: (pathOrId: PathLike) =>
|
|
390
|
+
getMetadata: (pathOrId: PathLike) => VirtualFileMetadata | undefined;
|
|
295
391
|
/**
|
|
296
392
|
* Gets the stats of a file in the virtual file system (VFS).
|
|
297
393
|
*
|
|
@@ -499,23 +595,12 @@ interface VirtualFileSystemInterface {
|
|
|
499
595
|
*/
|
|
500
596
|
resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
|
|
501
597
|
/**
|
|
502
|
-
*
|
|
598
|
+
* Formats a path to match the virtual file system (VFS) structure.
|
|
503
599
|
*
|
|
504
|
-
* @
|
|
505
|
-
*
|
|
506
|
-
* @param path - The path to check.
|
|
507
|
-
* @returns The resolved file path if it exists, otherwise undefined.
|
|
508
|
-
*/
|
|
509
|
-
resolveTsconfigPath: (path: string) => string | false;
|
|
510
|
-
/**
|
|
511
|
-
* Resolves a package name based on TypeScript's `tsconfig.json` paths.
|
|
512
|
-
*
|
|
513
|
-
* @see https://www.typescriptlang.org/tsconfig#paths
|
|
514
|
-
*
|
|
515
|
-
* @param path - The path to check.
|
|
516
|
-
* @returns The resolved package name if it exists, otherwise undefined.
|
|
600
|
+
* @param path - The path to format.
|
|
601
|
+
* @returns The formatted path.
|
|
517
602
|
*/
|
|
518
|
-
|
|
603
|
+
formatPath: (path: string) => string;
|
|
519
604
|
/**
|
|
520
605
|
* Resolves a path or id to a file path in the virtual file system.
|
|
521
606
|
*
|
|
@@ -524,23 +609,9 @@ interface VirtualFileSystemInterface {
|
|
|
524
609
|
*/
|
|
525
610
|
realpathSync: (pathOrId: string) => string;
|
|
526
611
|
/**
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
* @returns A record mapping file paths to their partial metadata.
|
|
530
|
-
*/
|
|
531
|
-
getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
|
|
532
|
-
/**
|
|
533
|
-
* A map of cached file paths to their underlying file content.
|
|
534
|
-
*/
|
|
535
|
-
[__VFS_CACHE__]: Map<string, string>;
|
|
536
|
-
/**
|
|
537
|
-
* A reference to the underlying virtual file system.
|
|
538
|
-
*/
|
|
539
|
-
[__VFS_VIRTUAL__]: Volume;
|
|
540
|
-
/**
|
|
541
|
-
* A reference to the underlying unified file system.
|
|
612
|
+
* Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
|
|
542
613
|
*/
|
|
543
|
-
|
|
614
|
+
dispose: () => Promise<void>;
|
|
544
615
|
}
|
|
545
616
|
|
|
546
617
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
@@ -676,24 +747,33 @@ interface BaseConfig {
|
|
|
676
747
|
* The entry point(s) for the application
|
|
677
748
|
*/
|
|
678
749
|
entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
|
|
750
|
+
/**
|
|
751
|
+
* Configuration for the output of the build process
|
|
752
|
+
*/
|
|
753
|
+
output?: OutputConfig;
|
|
679
754
|
/**
|
|
680
755
|
* Configuration for linting the source code
|
|
756
|
+
*
|
|
757
|
+
* @remarks
|
|
758
|
+
* If set to `false`, linting will be disabled.
|
|
681
759
|
*/
|
|
682
760
|
lint?: Record<string, any> | false;
|
|
683
761
|
/**
|
|
684
762
|
* Configuration for testing the source code
|
|
763
|
+
*
|
|
764
|
+
* @remarks
|
|
765
|
+
* If set to `false`, testing will be disabled.
|
|
685
766
|
*/
|
|
686
767
|
test?: Record<string, any> | false;
|
|
687
|
-
/**
|
|
688
|
-
* Configuration for the output of the build process
|
|
689
|
-
*/
|
|
690
|
-
output?: OutputConfig;
|
|
691
768
|
/**
|
|
692
769
|
* Configuration for the transformation of the source code
|
|
693
770
|
*/
|
|
694
771
|
transform?: Record<string, any>;
|
|
695
772
|
/**
|
|
696
|
-
*
|
|
773
|
+
* Configuration provided to build processes
|
|
774
|
+
*
|
|
775
|
+
* @remarks
|
|
776
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
697
777
|
*/
|
|
698
778
|
build?: BuildConfig;
|
|
699
779
|
/**
|
|
@@ -703,6 +783,13 @@ interface BaseConfig {
|
|
|
703
783
|
* This configuration will be used by the documentation generation plugins during the `docs` command.
|
|
704
784
|
*/
|
|
705
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;
|
|
706
793
|
/**
|
|
707
794
|
* The path to the tsconfig file to be used by the compiler
|
|
708
795
|
*
|
|
@@ -723,37 +810,6 @@ interface BaseConfig {
|
|
|
723
810
|
tsconfigRaw?: TSConfig;
|
|
724
811
|
}
|
|
725
812
|
interface EnvironmentConfig extends BaseConfig {
|
|
726
|
-
/**
|
|
727
|
-
* 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.
|
|
728
|
-
*
|
|
729
|
-
* @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
|
|
730
|
-
*/
|
|
731
|
-
mainFields?: string[];
|
|
732
|
-
/**
|
|
733
|
-
* Array of strings indicating what conditions should be used for module resolution.
|
|
734
|
-
*/
|
|
735
|
-
conditions?: string[];
|
|
736
|
-
/**
|
|
737
|
-
* Array of strings indicating what conditions should be used for external modules.
|
|
738
|
-
*/
|
|
739
|
-
externalConditions?: string[];
|
|
740
|
-
/**
|
|
741
|
-
* Array of strings indicating what file extensions should be used for module resolution.
|
|
742
|
-
*
|
|
743
|
-
* @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
|
|
744
|
-
*/
|
|
745
|
-
extensions?: string[];
|
|
746
|
-
/**
|
|
747
|
-
* Array of strings indicating what modules should be deduplicated to a single version in the build.
|
|
748
|
-
*
|
|
749
|
-
* @remarks
|
|
750
|
-
* This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
|
|
751
|
-
*/
|
|
752
|
-
dedupe?: string[];
|
|
753
|
-
/**
|
|
754
|
-
* Array of strings or regular expressions that indicate what modules are builtin for the environment.
|
|
755
|
-
*/
|
|
756
|
-
builtins?: (string | RegExp)[];
|
|
757
813
|
/**
|
|
758
814
|
* Configuration options for the preview server
|
|
759
815
|
*/
|
|
@@ -826,16 +882,28 @@ interface CommonUserConfig extends BaseConfig {
|
|
|
826
882
|
*/
|
|
827
883
|
framework?: string;
|
|
828
884
|
}
|
|
829
|
-
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
|
|
830
|
-
|
|
885
|
+
type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = Omit<CommonUserConfig, "build"> & {
|
|
886
|
+
/**
|
|
887
|
+
* Configuration provided to build processes
|
|
888
|
+
*
|
|
889
|
+
* @remarks
|
|
890
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
891
|
+
*/
|
|
892
|
+
build: Omit<TBuildConfig, "override"> & {
|
|
831
893
|
/**
|
|
832
894
|
* The build variant being used by the Powerlines engine.
|
|
833
895
|
*/
|
|
834
896
|
variant?: TBuildVariant;
|
|
897
|
+
/**
|
|
898
|
+
* An optional set of override options to apply to the selected build variant.
|
|
899
|
+
*
|
|
900
|
+
* @remarks
|
|
901
|
+
* This option allows you to provide configuration options with the guarantee that they will **not** be overridden and will take precedence over other build configurations.
|
|
902
|
+
*/
|
|
903
|
+
override?: Partial<TBuildResolvedConfig>;
|
|
835
904
|
};
|
|
836
|
-
override?: Partial<TBuildResolvedConfig>;
|
|
837
905
|
};
|
|
838
|
-
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "
|
|
906
|
+
type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
|
|
839
907
|
/**
|
|
840
908
|
* The configuration provided while executing Powerlines commands.
|
|
841
909
|
*/
|
|
@@ -857,7 +925,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
|
|
|
857
925
|
output?: string;
|
|
858
926
|
}
|
|
859
927
|
type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
|
|
860
|
-
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"
|
|
928
|
+
type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr">> & {
|
|
861
929
|
/**
|
|
862
930
|
* The name of the environment
|
|
863
931
|
*/
|
|
@@ -874,7 +942,7 @@ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
|
|
|
874
942
|
/**
|
|
875
943
|
* The resolved options for the Powerlines project configuration.
|
|
876
944
|
*/
|
|
877
|
-
type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "
|
|
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">> & {
|
|
878
946
|
/**
|
|
879
947
|
* The configuration options that were provided inline to the Powerlines CLI.
|
|
880
948
|
*/
|
|
@@ -905,6 +973,13 @@ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserCon
|
|
|
905
973
|
* The output configuration options to use for the build process
|
|
906
974
|
*/
|
|
907
975
|
output: OutputResolvedConfig;
|
|
976
|
+
/**
|
|
977
|
+
* Configuration provided to build processes
|
|
978
|
+
*
|
|
979
|
+
* @remarks
|
|
980
|
+
* This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
|
|
981
|
+
*/
|
|
982
|
+
build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
|
|
908
983
|
/**
|
|
909
984
|
* The log level to use for the Powerlines processes.
|
|
910
985
|
*
|
|
@@ -949,14 +1024,6 @@ interface MetaInfo {
|
|
|
949
1024
|
* A hash that represents the path to the project root directory
|
|
950
1025
|
*/
|
|
951
1026
|
configHash: string;
|
|
952
|
-
/**
|
|
953
|
-
* A mapping of runtime ids to their corresponding file paths
|
|
954
|
-
*/
|
|
955
|
-
builtinIdMap: Record<string, string>;
|
|
956
|
-
/**
|
|
957
|
-
* A mapping of virtual file paths to their corresponding file contents
|
|
958
|
-
*/
|
|
959
|
-
virtualFiles: Record<string, string | null>;
|
|
960
1027
|
}
|
|
961
1028
|
interface Resolver extends Jiti {
|
|
962
1029
|
plugin: Jiti;
|
|
@@ -969,7 +1036,13 @@ interface InitContextOptions {
|
|
|
969
1036
|
*/
|
|
970
1037
|
isHighPriority: boolean;
|
|
971
1038
|
}
|
|
972
|
-
|
|
1039
|
+
/**
|
|
1040
|
+
* The unresolved Powerlines context.
|
|
1041
|
+
*
|
|
1042
|
+
* @remarks
|
|
1043
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
1044
|
+
*/
|
|
1045
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
973
1046
|
/**
|
|
974
1047
|
* The Storm workspace configuration
|
|
975
1048
|
*/
|
|
@@ -977,7 +1050,10 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
977
1050
|
/**
|
|
978
1051
|
* An object containing the options provided to Powerlines
|
|
979
1052
|
*/
|
|
980
|
-
config: TResolvedConfig
|
|
1053
|
+
config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
|
|
1054
|
+
projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
|
|
1055
|
+
output: TResolvedConfig["output"];
|
|
1056
|
+
};
|
|
981
1057
|
/**
|
|
982
1058
|
* A logging function for the Powerlines engine
|
|
983
1059
|
*/
|
|
@@ -1134,6 +1210,12 @@ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
|
1134
1210
|
*/
|
|
1135
1211
|
extendLog: (name: string) => LogFn;
|
|
1136
1212
|
}
|
|
1213
|
+
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
1214
|
+
/**
|
|
1215
|
+
* The fully resolved Powerlines configuration
|
|
1216
|
+
*/
|
|
1217
|
+
config: TResolvedConfig;
|
|
1218
|
+
};
|
|
1137
1219
|
interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
|
|
1138
1220
|
/**
|
|
1139
1221
|
* The environment specific resolved configuration
|
|
@@ -1149,7 +1231,7 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1149
1231
|
}
|
|
1150
1232
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
|
|
1151
1233
|
|
|
1152
|
-
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "
|
|
1234
|
+
declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
|
|
1153
1235
|
type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
|
|
1154
1236
|
|
|
1155
1237
|
interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter = never> {
|
|
@@ -1174,6 +1256,10 @@ interface GenerateTypesResult {
|
|
|
1174
1256
|
directives?: string[];
|
|
1175
1257
|
code: string;
|
|
1176
1258
|
}
|
|
1259
|
+
type DeepPartial<T> = {
|
|
1260
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
1261
|
+
};
|
|
1262
|
+
type ConfigResult<TContext extends PluginContext = PluginContext> = DeepPartial<TContext["config"]> & Record<string, any>;
|
|
1177
1263
|
interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
|
|
1178
1264
|
/**
|
|
1179
1265
|
* A function that returns configuration options to be merged with the build context's options.
|
|
@@ -1189,7 +1275,7 @@ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext
|
|
|
1189
1275
|
* @param config - The partial configuration object to be modified.
|
|
1190
1276
|
* @returns A promise that resolves to a partial configuration object.
|
|
1191
1277
|
*/
|
|
1192
|
-
config: (this:
|
|
1278
|
+
config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>;
|
|
1193
1279
|
/**
|
|
1194
1280
|
* Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
|
|
1195
1281
|
*
|
|
@@ -1292,7 +1378,7 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1292
1378
|
* @param config - The partial configuration object to be modified.
|
|
1293
1379
|
* @returns A promise that resolves to a partial configuration object.
|
|
1294
1380
|
*/
|
|
1295
|
-
config: PluginHook<(this:
|
|
1381
|
+
config: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<ConfigResult<TContext>>> | ConfigResult<TContext>;
|
|
1296
1382
|
/**
|
|
1297
1383
|
* A hook that is called to transform the source code.
|
|
1298
1384
|
*
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-
|
|
2
|
-
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from './index-
|
|
1
|
+
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-Dpl6_H0U.cjs';
|
|
2
|
+
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from './index-Dpl6_H0U.cjs';
|
|
3
3
|
export { cryptoModule } from './components/crypto.cjs';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@deepkit/type';
|
|
@@ -22,9 +22,7 @@ import 'unplugin';
|
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
|
24
24
|
import '@stryke/json/types';
|
|
25
|
-
import 'memfs';
|
|
26
25
|
import 'node:fs';
|
|
27
|
-
import 'unionfs';
|
|
28
26
|
import '@stryke/types/array';
|
|
29
27
|
import '@stryke/env/types';
|
|
30
28
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-
|
|
2
|
-
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from './index-
|
|
1
|
+
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-Dpl6_H0U.js';
|
|
2
|
+
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from './index-Dpl6_H0U.js';
|
|
3
3
|
export { cryptoModule } from './components/crypto.js';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@deepkit/type';
|
|
@@ -22,9 +22,7 @@ import 'unplugin';
|
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
|
24
24
|
import '@stryke/json/types';
|
|
25
|
-
import 'memfs';
|
|
26
25
|
import 'node:fs';
|
|
27
|
-
import 'unionfs';
|
|
28
26
|
import '@stryke/types/array';
|
|
29
27
|
import '@stryke/env/types';
|
|
30
28
|
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-Dpl6_H0U.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';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-Dpl6_H0U.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/dist/types/plugin.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-Dpl6_H0U.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';
|
package/dist/types/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig } from '../index-Dpl6_H0U.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-crypto",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Powerlines plugin that provides unique identifier generation capabilities at runtime by adding the `id` builtin module.",
|
|
6
6
|
"repository": {
|
|
@@ -116,17 +116,17 @@
|
|
|
116
116
|
"files": ["dist/**/*"],
|
|
117
117
|
"keywords": ["powerlines", "storm-software", "powerlines-plugin"],
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@powerlines/plugin-env": "^0.13.
|
|
119
|
+
"@powerlines/plugin-env": "^0.13.17",
|
|
120
120
|
"@storm-software/config-tools": "^1.188.40",
|
|
121
121
|
"@stryke/path": "^0.19.2",
|
|
122
122
|
"defu": "^6.1.4",
|
|
123
|
-
"powerlines": "^0.
|
|
123
|
+
"powerlines": "^0.21.0"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@powerlines/nx": "^0.10.
|
|
126
|
+
"@powerlines/nx": "^0.10.11",
|
|
127
127
|
"@storm-software/tsup": "^0.2.38",
|
|
128
128
|
"@types/node": "^22.19.1"
|
|
129
129
|
},
|
|
130
130
|
"publishConfig": { "access": "public" },
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "c6ed2ca745c8f340a55758b3102933dc41e83428"
|
|
132
132
|
}
|