@powerlines/plugin-crypto 0.9.29 → 0.9.31
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 +2 -4
- package/dist/components/crypto.d.ts +2 -4
- package/dist/components/index.d.cts +2 -4
- package/dist/components/index.d.ts +2 -4
- package/dist/{index-e4nmX1u6.d.cts → index-CqJoG1K0.d.cts} +118 -101
- package/dist/{index-e4nmX1u6.d.ts → index-CqJoG1K0.d.ts} +118 -101
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -5
- package/dist/index.d.ts +3 -5
- package/dist/index.js +1 -1
- package/dist/types/index.d.cts +2 -4
- package/dist/types/index.d.ts +2 -4
- package/dist/types/plugin.d.cts +2 -4
- package/dist/types/plugin.d.ts +2 -4
- package/package.json +7 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CryptoPluginContext } from '../index-
|
|
1
|
+
import { a as CryptoPluginContext } from '../index-CqJoG1K0.cjs';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -14,13 +14,11 @@ import '@babel/helper-plugin-utils';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
-
import 'oxc-parser';
|
|
18
17
|
import 'semver';
|
|
19
18
|
import 'unplugin';
|
|
19
|
+
import 'node:fs';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
22
|
-
import '@stryke/json/types';
|
|
23
|
-
import 'node:fs';
|
|
24
22
|
import '@stryke/types/array';
|
|
25
23
|
import '@stryke/env/types';
|
|
26
24
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CryptoPluginContext } from '../index-
|
|
1
|
+
import { a as CryptoPluginContext } from '../index-CqJoG1K0.js';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -14,13 +14,11 @@ import '@babel/helper-plugin-utils';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
-
import 'oxc-parser';
|
|
18
17
|
import 'semver';
|
|
19
18
|
import 'unplugin';
|
|
19
|
+
import 'node:fs';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
22
|
-
import '@stryke/json/types';
|
|
23
|
-
import 'node:fs';
|
|
24
22
|
import '@stryke/types/array';
|
|
25
23
|
import '@stryke/env/types';
|
|
26
24
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cryptoModule } from './crypto.cjs';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-CqJoG1K0.cjs';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@deepkit/type';
|
|
5
5
|
import '@stryke/capnp';
|
|
@@ -15,12 +15,10 @@ import '@babel/helper-plugin-utils';
|
|
|
15
15
|
import '@stryke/env/get-env-paths';
|
|
16
16
|
import '@stryke/types/package-json';
|
|
17
17
|
import 'jiti';
|
|
18
|
-
import 'oxc-parser';
|
|
19
18
|
import 'semver';
|
|
20
19
|
import 'unplugin';
|
|
20
|
+
import 'node:fs';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
|
23
|
-
import '@stryke/json/types';
|
|
24
|
-
import 'node:fs';
|
|
25
23
|
import '@stryke/types/array';
|
|
26
24
|
import '@stryke/env/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { cryptoModule } from './crypto.js';
|
|
2
|
-
import '../index-
|
|
2
|
+
import '../index-CqJoG1K0.js';
|
|
3
3
|
import '@alloy-js/core/jsx-runtime';
|
|
4
4
|
import '@deepkit/type';
|
|
5
5
|
import '@stryke/capnp';
|
|
@@ -15,12 +15,10 @@ import '@babel/helper-plugin-utils';
|
|
|
15
15
|
import '@stryke/env/get-env-paths';
|
|
16
16
|
import '@stryke/types/package-json';
|
|
17
17
|
import 'jiti';
|
|
18
|
-
import 'oxc-parser';
|
|
19
18
|
import 'semver';
|
|
20
19
|
import 'unplugin';
|
|
20
|
+
import 'node:fs';
|
|
21
21
|
import '@stryke/types/tsconfig';
|
|
22
22
|
import 'typescript';
|
|
23
|
-
import '@stryke/json/types';
|
|
24
|
-
import 'node:fs';
|
|
25
23
|
import '@stryke/types/array';
|
|
26
24
|
import '@stryke/env/types';
|
|
@@ -13,13 +13,11 @@ import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
|
13
13
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
14
14
|
import { PackageJson } from '@stryke/types/package-json';
|
|
15
15
|
import { Jiti } from 'jiti';
|
|
16
|
-
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
17
16
|
import { Range } from 'semver';
|
|
18
17
|
import { UnpluginContext, UnpluginMessage, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
|
|
18
|
+
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
19
19
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
20
20
|
import ts from 'typescript';
|
|
21
|
-
import { PrimitiveJsonValue } from '@stryke/json/types';
|
|
22
|
-
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
23
21
|
import { ArrayValues } from '@stryke/types/array';
|
|
24
22
|
import { DotenvParseOutput } from '@stryke/env/types';
|
|
25
23
|
|
|
@@ -177,87 +175,20 @@ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions ex
|
|
|
177
175
|
BabelTransformPluginFilter
|
|
178
176
|
];
|
|
179
177
|
|
|
180
|
-
type ReflectionMode = "default" | "explicit" | "never";
|
|
181
|
-
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
182
|
-
/**
|
|
183
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
184
|
-
*
|
|
185
|
-
* @remarks
|
|
186
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
187
|
-
* - `minimal` - Only the essential type information is captured.
|
|
188
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
189
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
190
|
-
*/
|
|
191
|
-
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
192
|
-
interface DeepkitOptions {
|
|
193
|
-
/**
|
|
194
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
195
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
196
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
197
|
-
*/
|
|
198
|
-
reflection?: RawReflectionMode;
|
|
199
|
-
/**
|
|
200
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
204
|
-
* - `minimal` - Only the essential type information is captured.
|
|
205
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
206
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
207
|
-
*/
|
|
208
|
-
reflectionLevel?: ReflectionLevel;
|
|
209
|
-
}
|
|
210
|
-
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
211
|
-
/**
|
|
212
|
-
* The TypeScript compiler configuration.
|
|
213
|
-
*
|
|
214
|
-
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
215
|
-
*/
|
|
216
|
-
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
217
|
-
/**
|
|
218
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
219
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
220
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
221
|
-
*/
|
|
222
|
-
reflection?: RawReflectionMode;
|
|
223
|
-
/**
|
|
224
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
225
|
-
*
|
|
226
|
-
* @remarks
|
|
227
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
228
|
-
* - `minimal` - Only the essential type information is captured.
|
|
229
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
230
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
231
|
-
*/
|
|
232
|
-
reflectionLevel?: ReflectionLevel;
|
|
233
|
-
/**
|
|
234
|
-
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
235
|
-
*/
|
|
236
|
-
compilerOptions?: TSCompilerOptions;
|
|
237
|
-
}
|
|
238
|
-
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
239
|
-
originalTsconfigJson: TsConfigJson;
|
|
240
|
-
tsconfigJson: TSConfig;
|
|
241
|
-
tsconfigFilePath: string;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
178
|
declare const __VFS_PATCH__ = "__VFS_PATCH__";
|
|
245
179
|
declare const __VFS_REVERT__ = "__VFS_REVERT__";
|
|
246
180
|
type OutputModeType = "fs" | "virtual";
|
|
247
|
-
interface
|
|
181
|
+
interface VirtualFileMetadata {
|
|
248
182
|
/**
|
|
249
|
-
* The
|
|
250
|
-
*
|
|
251
|
-
* @remarks
|
|
252
|
-
* If no specific id is provided, it defaults to the file's {@link path}.
|
|
183
|
+
* The identifier for the file data.
|
|
253
184
|
*/
|
|
254
185
|
id: string;
|
|
255
186
|
/**
|
|
256
|
-
*
|
|
187
|
+
* The timestamp of the virtual file.
|
|
257
188
|
*/
|
|
258
|
-
|
|
189
|
+
timestamp: number;
|
|
259
190
|
/**
|
|
260
|
-
* The
|
|
191
|
+
* The type of the file.
|
|
261
192
|
*
|
|
262
193
|
* @remarks
|
|
263
194
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
@@ -265,52 +196,72 @@ interface VirtualFile {
|
|
|
265
196
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
266
197
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
267
198
|
*/
|
|
268
|
-
|
|
199
|
+
type: string;
|
|
269
200
|
/**
|
|
270
201
|
* The output mode of the file.
|
|
271
|
-
*
|
|
272
|
-
* @remarks
|
|
273
|
-
* This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
|
|
274
202
|
*/
|
|
275
|
-
mode:
|
|
276
|
-
/**
|
|
277
|
-
* A virtual (or actual) path to the file in the file system.
|
|
278
|
-
*/
|
|
279
|
-
path: string;
|
|
203
|
+
mode: string;
|
|
280
204
|
/**
|
|
281
|
-
*
|
|
205
|
+
* Additional metadata associated with the file.
|
|
282
206
|
*/
|
|
283
|
-
|
|
207
|
+
properties: Record<string, string>;
|
|
284
208
|
}
|
|
285
|
-
interface
|
|
209
|
+
interface VirtualFileData {
|
|
286
210
|
/**
|
|
287
211
|
* The identifier for the file data.
|
|
288
212
|
*/
|
|
289
|
-
id
|
|
213
|
+
id?: string;
|
|
290
214
|
/**
|
|
291
|
-
* The
|
|
215
|
+
* The contents of the virtual file.
|
|
216
|
+
*/
|
|
217
|
+
code: string;
|
|
218
|
+
/**
|
|
219
|
+
* The type of the file.
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
223
|
+
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
224
|
+
* - `entry`: Indicates that the file is an entry point for execution.
|
|
225
|
+
* - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
|
|
226
|
+
* - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
|
|
227
|
+
* - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
|
|
228
|
+
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
292
229
|
*/
|
|
293
|
-
|
|
230
|
+
type?: string;
|
|
294
231
|
/**
|
|
295
232
|
* The output mode of the file.
|
|
296
233
|
*/
|
|
297
|
-
mode
|
|
234
|
+
mode?: string;
|
|
298
235
|
/**
|
|
299
236
|
* Additional metadata associated with the file.
|
|
300
237
|
*/
|
|
301
|
-
properties
|
|
238
|
+
properties?: Record<string, string>;
|
|
239
|
+
}
|
|
240
|
+
interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
|
|
241
|
+
/**
|
|
242
|
+
* An additional name for the file.
|
|
243
|
+
*/
|
|
244
|
+
path: string;
|
|
245
|
+
/**
|
|
246
|
+
* The timestamp of the virtual file.
|
|
247
|
+
*/
|
|
248
|
+
timestamp: number;
|
|
302
249
|
}
|
|
303
250
|
interface ResolveFSOptions {
|
|
304
251
|
mode?: OutputModeType;
|
|
305
252
|
}
|
|
306
253
|
type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
|
|
307
254
|
interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
255
|
+
/**
|
|
256
|
+
* Should the file skip formatting before being written?
|
|
257
|
+
*
|
|
258
|
+
* @defaultValue false
|
|
259
|
+
*/
|
|
308
260
|
skipFormat?: boolean;
|
|
309
261
|
}
|
|
310
262
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
311
263
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
312
|
-
type
|
|
313
|
-
type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
|
|
264
|
+
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
314
265
|
interface ResolvePathOptions extends ResolveFSOptions {
|
|
315
266
|
/**
|
|
316
267
|
* Should the resolved path include the file extension?
|
|
@@ -325,7 +276,7 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
325
276
|
/**
|
|
326
277
|
* The type of the path to resolve.
|
|
327
278
|
*/
|
|
328
|
-
|
|
279
|
+
pathType?: "file" | "directory";
|
|
329
280
|
}
|
|
330
281
|
interface VirtualFileSystemInterface {
|
|
331
282
|
/**
|
|
@@ -614,6 +565,70 @@ interface VirtualFileSystemInterface {
|
|
|
614
565
|
dispose: () => Promise<void>;
|
|
615
566
|
}
|
|
616
567
|
|
|
568
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
569
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
570
|
+
/**
|
|
571
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
572
|
+
*
|
|
573
|
+
* @remarks
|
|
574
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
575
|
+
* - `minimal` - Only the essential type information is captured.
|
|
576
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
577
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
578
|
+
*/
|
|
579
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
580
|
+
interface DeepkitOptions {
|
|
581
|
+
/**
|
|
582
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
583
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
584
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
585
|
+
*/
|
|
586
|
+
reflection?: RawReflectionMode;
|
|
587
|
+
/**
|
|
588
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
592
|
+
* - `minimal` - Only the essential type information is captured.
|
|
593
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
594
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
595
|
+
*/
|
|
596
|
+
reflectionLevel?: ReflectionLevel;
|
|
597
|
+
}
|
|
598
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
599
|
+
/**
|
|
600
|
+
* The TypeScript compiler configuration.
|
|
601
|
+
*
|
|
602
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
603
|
+
*/
|
|
604
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
605
|
+
/**
|
|
606
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
607
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
608
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
609
|
+
*/
|
|
610
|
+
reflection?: RawReflectionMode;
|
|
611
|
+
/**
|
|
612
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
613
|
+
*
|
|
614
|
+
* @remarks
|
|
615
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
616
|
+
* - `minimal` - Only the essential type information is captured.
|
|
617
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
618
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
619
|
+
*/
|
|
620
|
+
reflectionLevel?: ReflectionLevel;
|
|
621
|
+
/**
|
|
622
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
623
|
+
*/
|
|
624
|
+
compilerOptions?: TSCompilerOptions;
|
|
625
|
+
}
|
|
626
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
627
|
+
originalTsconfigJson: TsConfigJson;
|
|
628
|
+
tsconfigJson: TSConfig;
|
|
629
|
+
tsconfigFilePath: string;
|
|
630
|
+
};
|
|
631
|
+
|
|
617
632
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
618
633
|
/**
|
|
619
634
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
@@ -1183,7 +1198,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1183
1198
|
* @param path - An optional path to write the builtin file to
|
|
1184
1199
|
* @param options - Options for writing the file
|
|
1185
1200
|
*/
|
|
1186
|
-
|
|
1201
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1187
1202
|
/**
|
|
1188
1203
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1189
1204
|
*
|
|
@@ -1191,11 +1206,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1191
1206
|
* @param path - An optional path to write the entry file to
|
|
1192
1207
|
* @param options - Options for writing the file
|
|
1193
1208
|
*/
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* Parses the source code and returns a {@link ParseResult} object.
|
|
1197
|
-
*/
|
|
1198
|
-
parse: (code: string, id: string, options?: ParserOptions | null) => Promise<ParseResult>;
|
|
1209
|
+
emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1199
1210
|
/**
|
|
1200
1211
|
* A function to update the context fields using a new user configuration options
|
|
1201
1212
|
*/
|
|
@@ -1417,6 +1428,12 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1417
1428
|
resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
|
|
1418
1429
|
isEntry: boolean;
|
|
1419
1430
|
}) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
|
|
1431
|
+
/**
|
|
1432
|
+
* An API object that can be used for inter-plugin communication.
|
|
1433
|
+
*
|
|
1434
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
1435
|
+
*/
|
|
1436
|
+
api?: Record<string, any>;
|
|
1420
1437
|
};
|
|
1421
1438
|
type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
|
|
1422
1439
|
[TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
|
|
@@ -13,13 +13,11 @@ import { BabelAPI } from '@babel/helper-plugin-utils';
|
|
|
13
13
|
import { EnvPaths } from '@stryke/env/get-env-paths';
|
|
14
14
|
import { PackageJson } from '@stryke/types/package-json';
|
|
15
15
|
import { Jiti } from 'jiti';
|
|
16
|
-
import { ParserOptions, ParseResult } from 'oxc-parser';
|
|
17
16
|
import { Range } from 'semver';
|
|
18
17
|
import { UnpluginContext, UnpluginMessage, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
|
|
18
|
+
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
19
19
|
import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
|
|
20
20
|
import ts from 'typescript';
|
|
21
|
-
import { PrimitiveJsonValue } from '@stryke/json/types';
|
|
22
|
-
import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
|
|
23
21
|
import { ArrayValues } from '@stryke/types/array';
|
|
24
22
|
import { DotenvParseOutput } from '@stryke/env/types';
|
|
25
23
|
|
|
@@ -177,87 +175,20 @@ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions ex
|
|
|
177
175
|
BabelTransformPluginFilter
|
|
178
176
|
];
|
|
179
177
|
|
|
180
|
-
type ReflectionMode = "default" | "explicit" | "never";
|
|
181
|
-
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
182
|
-
/**
|
|
183
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
184
|
-
*
|
|
185
|
-
* @remarks
|
|
186
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
187
|
-
* - `minimal` - Only the essential type information is captured.
|
|
188
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
189
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
190
|
-
*/
|
|
191
|
-
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
192
|
-
interface DeepkitOptions {
|
|
193
|
-
/**
|
|
194
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
195
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
196
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
197
|
-
*/
|
|
198
|
-
reflection?: RawReflectionMode;
|
|
199
|
-
/**
|
|
200
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
201
|
-
*
|
|
202
|
-
* @remarks
|
|
203
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
204
|
-
* - `minimal` - Only the essential type information is captured.
|
|
205
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
206
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
207
|
-
*/
|
|
208
|
-
reflectionLevel?: ReflectionLevel;
|
|
209
|
-
}
|
|
210
|
-
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
211
|
-
/**
|
|
212
|
-
* The TypeScript compiler configuration.
|
|
213
|
-
*
|
|
214
|
-
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
215
|
-
*/
|
|
216
|
-
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
217
|
-
/**
|
|
218
|
-
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
219
|
-
* or a list of globs/file paths relative to this tsconfig.json.
|
|
220
|
-
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
221
|
-
*/
|
|
222
|
-
reflection?: RawReflectionMode;
|
|
223
|
-
/**
|
|
224
|
-
* Defines the level of reflection to be used during the transpilation process.
|
|
225
|
-
*
|
|
226
|
-
* @remarks
|
|
227
|
-
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
228
|
-
* - `minimal` - Only the essential type information is captured.
|
|
229
|
-
* - `normal` - Additional type information is captured, including some contextual data.
|
|
230
|
-
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
231
|
-
*/
|
|
232
|
-
reflectionLevel?: ReflectionLevel;
|
|
233
|
-
/**
|
|
234
|
-
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
235
|
-
*/
|
|
236
|
-
compilerOptions?: TSCompilerOptions;
|
|
237
|
-
}
|
|
238
|
-
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
239
|
-
originalTsconfigJson: TsConfigJson;
|
|
240
|
-
tsconfigJson: TSConfig;
|
|
241
|
-
tsconfigFilePath: string;
|
|
242
|
-
};
|
|
243
|
-
|
|
244
178
|
declare const __VFS_PATCH__ = "__VFS_PATCH__";
|
|
245
179
|
declare const __VFS_REVERT__ = "__VFS_REVERT__";
|
|
246
180
|
type OutputModeType = "fs" | "virtual";
|
|
247
|
-
interface
|
|
181
|
+
interface VirtualFileMetadata {
|
|
248
182
|
/**
|
|
249
|
-
* The
|
|
250
|
-
*
|
|
251
|
-
* @remarks
|
|
252
|
-
* If no specific id is provided, it defaults to the file's {@link path}.
|
|
183
|
+
* The identifier for the file data.
|
|
253
184
|
*/
|
|
254
185
|
id: string;
|
|
255
186
|
/**
|
|
256
|
-
*
|
|
187
|
+
* The timestamp of the virtual file.
|
|
257
188
|
*/
|
|
258
|
-
|
|
189
|
+
timestamp: number;
|
|
259
190
|
/**
|
|
260
|
-
* The
|
|
191
|
+
* The type of the file.
|
|
261
192
|
*
|
|
262
193
|
* @remarks
|
|
263
194
|
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
@@ -265,52 +196,72 @@ interface VirtualFile {
|
|
|
265
196
|
* - `entry`: Indicates that the file is an entry point for execution.
|
|
266
197
|
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
267
198
|
*/
|
|
268
|
-
|
|
199
|
+
type: string;
|
|
269
200
|
/**
|
|
270
201
|
* The output mode of the file.
|
|
271
|
-
*
|
|
272
|
-
* @remarks
|
|
273
|
-
* This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
|
|
274
202
|
*/
|
|
275
|
-
mode:
|
|
276
|
-
/**
|
|
277
|
-
* A virtual (or actual) path to the file in the file system.
|
|
278
|
-
*/
|
|
279
|
-
path: string;
|
|
203
|
+
mode: string;
|
|
280
204
|
/**
|
|
281
|
-
*
|
|
205
|
+
* Additional metadata associated with the file.
|
|
282
206
|
*/
|
|
283
|
-
|
|
207
|
+
properties: Record<string, string>;
|
|
284
208
|
}
|
|
285
|
-
interface
|
|
209
|
+
interface VirtualFileData {
|
|
286
210
|
/**
|
|
287
211
|
* The identifier for the file data.
|
|
288
212
|
*/
|
|
289
|
-
id
|
|
213
|
+
id?: string;
|
|
290
214
|
/**
|
|
291
|
-
* The
|
|
215
|
+
* The contents of the virtual file.
|
|
216
|
+
*/
|
|
217
|
+
code: string;
|
|
218
|
+
/**
|
|
219
|
+
* The type of the file.
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
|
|
223
|
+
* - `builtin`: Indicates that the file is a built-in module provided by the system.
|
|
224
|
+
* - `entry`: Indicates that the file is an entry point for execution.
|
|
225
|
+
* - `chunk`: Indicates that the file is a code chunk, typically used in code-splitting scenarios.
|
|
226
|
+
* - `prebuilt-chunk`: Indicates that the file is a prebuilt code chunk.
|
|
227
|
+
* - `asset`: Indicates that the file is a static asset, such as an image or stylesheet.
|
|
228
|
+
* - `normal`: Indicates that the file is a standard file without any special role.
|
|
292
229
|
*/
|
|
293
|
-
|
|
230
|
+
type?: string;
|
|
294
231
|
/**
|
|
295
232
|
* The output mode of the file.
|
|
296
233
|
*/
|
|
297
|
-
mode
|
|
234
|
+
mode?: string;
|
|
298
235
|
/**
|
|
299
236
|
* Additional metadata associated with the file.
|
|
300
237
|
*/
|
|
301
|
-
properties
|
|
238
|
+
properties?: Record<string, string>;
|
|
239
|
+
}
|
|
240
|
+
interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
|
|
241
|
+
/**
|
|
242
|
+
* An additional name for the file.
|
|
243
|
+
*/
|
|
244
|
+
path: string;
|
|
245
|
+
/**
|
|
246
|
+
* The timestamp of the virtual file.
|
|
247
|
+
*/
|
|
248
|
+
timestamp: number;
|
|
302
249
|
}
|
|
303
250
|
interface ResolveFSOptions {
|
|
304
251
|
mode?: OutputModeType;
|
|
305
252
|
}
|
|
306
253
|
type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
|
|
307
254
|
interface PowerlinesWriteFileOptions extends ResolveFSOptions {
|
|
255
|
+
/**
|
|
256
|
+
* Should the file skip formatting before being written?
|
|
257
|
+
*
|
|
258
|
+
* @defaultValue false
|
|
259
|
+
*/
|
|
308
260
|
skipFormat?: boolean;
|
|
309
261
|
}
|
|
310
262
|
type NodeWriteFileOptions = WriteFileOptions$1;
|
|
311
263
|
type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
|
|
312
|
-
type
|
|
313
|
-
type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
|
|
264
|
+
type WriteFileData = string | NodeJS.ArrayBufferView | VirtualFileData;
|
|
314
265
|
interface ResolvePathOptions extends ResolveFSOptions {
|
|
315
266
|
/**
|
|
316
267
|
* Should the resolved path include the file extension?
|
|
@@ -325,7 +276,7 @@ interface ResolvePathOptions extends ResolveFSOptions {
|
|
|
325
276
|
/**
|
|
326
277
|
* The type of the path to resolve.
|
|
327
278
|
*/
|
|
328
|
-
|
|
279
|
+
pathType?: "file" | "directory";
|
|
329
280
|
}
|
|
330
281
|
interface VirtualFileSystemInterface {
|
|
331
282
|
/**
|
|
@@ -614,6 +565,70 @@ interface VirtualFileSystemInterface {
|
|
|
614
565
|
dispose: () => Promise<void>;
|
|
615
566
|
}
|
|
616
567
|
|
|
568
|
+
type ReflectionMode = "default" | "explicit" | "never";
|
|
569
|
+
type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
|
|
570
|
+
/**
|
|
571
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
572
|
+
*
|
|
573
|
+
* @remarks
|
|
574
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
575
|
+
* - `minimal` - Only the essential type information is captured.
|
|
576
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
577
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
578
|
+
*/
|
|
579
|
+
type ReflectionLevel = "minimal" | "normal" | "verbose";
|
|
580
|
+
interface DeepkitOptions {
|
|
581
|
+
/**
|
|
582
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
583
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
584
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
585
|
+
*/
|
|
586
|
+
reflection?: RawReflectionMode;
|
|
587
|
+
/**
|
|
588
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
592
|
+
* - `minimal` - Only the essential type information is captured.
|
|
593
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
594
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
595
|
+
*/
|
|
596
|
+
reflectionLevel?: ReflectionLevel;
|
|
597
|
+
}
|
|
598
|
+
type TSCompilerOptions = CompilerOptions & DeepkitOptions;
|
|
599
|
+
/**
|
|
600
|
+
* The TypeScript compiler configuration.
|
|
601
|
+
*
|
|
602
|
+
* @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
|
|
603
|
+
*/
|
|
604
|
+
interface TSConfig extends Omit<TsConfigJson, "reflection"> {
|
|
605
|
+
/**
|
|
606
|
+
* Either true to activate reflection for all files compiled using this tsconfig,
|
|
607
|
+
* or a list of globs/file paths relative to this tsconfig.json.
|
|
608
|
+
* Globs/file paths can be prefixed with a ! to exclude them.
|
|
609
|
+
*/
|
|
610
|
+
reflection?: RawReflectionMode;
|
|
611
|
+
/**
|
|
612
|
+
* Defines the level of reflection to be used during the transpilation process.
|
|
613
|
+
*
|
|
614
|
+
* @remarks
|
|
615
|
+
* The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
|
|
616
|
+
* - `minimal` - Only the essential type information is captured.
|
|
617
|
+
* - `normal` - Additional type information is captured, including some contextual data.
|
|
618
|
+
* - `verbose` - All available type information is captured, including detailed contextual data.
|
|
619
|
+
*/
|
|
620
|
+
reflectionLevel?: ReflectionLevel;
|
|
621
|
+
/**
|
|
622
|
+
* Instructs the TypeScript compiler how to compile `.ts` files.
|
|
623
|
+
*/
|
|
624
|
+
compilerOptions?: TSCompilerOptions;
|
|
625
|
+
}
|
|
626
|
+
type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
|
|
627
|
+
originalTsconfigJson: TsConfigJson;
|
|
628
|
+
tsconfigJson: TSConfig;
|
|
629
|
+
tsconfigFilePath: string;
|
|
630
|
+
};
|
|
631
|
+
|
|
617
632
|
type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
|
|
618
633
|
/**
|
|
619
634
|
* The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
|
|
@@ -1183,7 +1198,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1183
1198
|
* @param path - An optional path to write the builtin file to
|
|
1184
1199
|
* @param options - Options for writing the file
|
|
1185
1200
|
*/
|
|
1186
|
-
|
|
1201
|
+
emitBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1187
1202
|
/**
|
|
1188
1203
|
* Resolves a entry virtual file and writes it to the VFS if it does not already exist
|
|
1189
1204
|
*
|
|
@@ -1191,11 +1206,7 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
1191
1206
|
* @param path - An optional path to write the entry file to
|
|
1192
1207
|
* @param options - Options for writing the file
|
|
1193
1208
|
*/
|
|
1194
|
-
|
|
1195
|
-
/**
|
|
1196
|
-
* Parses the source code and returns a {@link ParseResult} object.
|
|
1197
|
-
*/
|
|
1198
|
-
parse: (code: string, id: string, options?: ParserOptions | null) => Promise<ParseResult>;
|
|
1209
|
+
emitEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
|
|
1199
1210
|
/**
|
|
1200
1211
|
* A function to update the context fields using a new user configuration options
|
|
1201
1212
|
*/
|
|
@@ -1417,6 +1428,12 @@ type PluginHooks<TContext extends PluginContext = PluginContext> = {
|
|
|
1417
1428
|
resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
|
|
1418
1429
|
isEntry: boolean;
|
|
1419
1430
|
}) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
|
|
1431
|
+
/**
|
|
1432
|
+
* An API object that can be used for inter-plugin communication.
|
|
1433
|
+
*
|
|
1434
|
+
* @see https://rollupjs.org/plugin-development/#direct-plugin-communication
|
|
1435
|
+
*/
|
|
1436
|
+
api?: Record<string, any>;
|
|
1420
1437
|
};
|
|
1421
1438
|
type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
|
|
1422
1439
|
[TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
|
package/dist/index.cjs
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function n(e={}){return {name:"crypto",dependsOn:[i__default.default(e.env)],config(){return {crypto:{salt:e.salt,encryptionKey:e.encryptionKey}}},configResolved(){this.dependencies["@noble/ciphers"]="^2.0.1",this.dependencies["@noble/hashes"]="^2.0.1",this.config.crypto.salt??=this.env.parsed.SALT,this.config.crypto.salt||this.log(types$1.LogLevelLabel.WARN,"No salt provided for the Crypto plugin. It's highly recommended to provide a unique salt via the plugin options or the SALT environment variable."),this.config.crypto.encryptionKey??=this.env.parsed.ENCRYPTION_KEY,this.config.crypto.encryptionKey||this.log(types$1.LogLevelLabel.WARN,"No encryption key provided for the Crypto plugin. It's highly recommended to provide a secure encryption key via the plugin options or the ENCRYPTION_KEY environment variable.");},async prepare(){this.log(types$1.LogLevelLabel.TRACE,"Preparing the Crypto runtime artifacts for the Powerlines project."),await this.
|
|
7
|
+
function n(e={}){return {name:"crypto",dependsOn:[i__default.default(e.env)],config(){return {crypto:{salt:e.salt,encryptionKey:e.encryptionKey}}},configResolved(){this.dependencies["@noble/ciphers"]="^2.0.1",this.dependencies["@noble/hashes"]="^2.0.1",this.config.crypto.salt??=this.env.parsed.SALT,this.config.crypto.salt||this.log(types$1.LogLevelLabel.WARN,"No salt provided for the Crypto plugin. It's highly recommended to provide a unique salt via the plugin options or the SALT environment variable."),this.config.crypto.encryptionKey??=this.env.parsed.ENCRYPTION_KEY,this.config.crypto.encryptionKey||this.log(types$1.LogLevelLabel.WARN,"No encryption key provided for the Crypto plugin. It's highly recommended to provide a secure encryption key via the plugin options or the ENCRYPTION_KEY environment variable.");},async prepare(){this.log(types$1.LogLevelLabel.TRACE,"Preparing the Crypto runtime artifacts for the Powerlines project."),await this.emitBuiltin(await Promise.resolve(crypto.cryptoModule(this)),"crypto","crypto.ts");}}}chunkFBBMZ4NC_cjs.a(n,"plugin");var d=n;exports.default=d;exports.plugin=n;Object.keys(components).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return components[k]}})});Object.keys(types).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return types[k]}})});
|
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, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-
|
|
1
|
+
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-CqJoG1K0.cjs';
|
|
2
|
+
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-CqJoG1K0.cjs';
|
|
3
3
|
export { cryptoModule } from './components/crypto.cjs';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@deepkit/type';
|
|
@@ -16,13 +16,11 @@ import '@babel/helper-plugin-utils';
|
|
|
16
16
|
import '@stryke/env/get-env-paths';
|
|
17
17
|
import '@stryke/types/package-json';
|
|
18
18
|
import 'jiti';
|
|
19
|
-
import 'oxc-parser';
|
|
20
19
|
import 'semver';
|
|
21
20
|
import 'unplugin';
|
|
21
|
+
import 'node:fs';
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
|
24
|
-
import '@stryke/json/types';
|
|
25
|
-
import 'node:fs';
|
|
26
24
|
import '@stryke/types/array';
|
|
27
25
|
import '@stryke/env/types';
|
|
28
26
|
|
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, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-
|
|
1
|
+
import { C as CryptoPluginOptions, P as Plugin, a as CryptoPluginContext } from './index-CqJoG1K0.js';
|
|
2
|
+
export { c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from './index-CqJoG1K0.js';
|
|
3
3
|
export { cryptoModule } from './components/crypto.js';
|
|
4
4
|
import '@alloy-js/core/jsx-runtime';
|
|
5
5
|
import '@deepkit/type';
|
|
@@ -16,13 +16,11 @@ import '@babel/helper-plugin-utils';
|
|
|
16
16
|
import '@stryke/env/get-env-paths';
|
|
17
17
|
import '@stryke/types/package-json';
|
|
18
18
|
import 'jiti';
|
|
19
|
-
import 'oxc-parser';
|
|
20
19
|
import 'semver';
|
|
21
20
|
import 'unplugin';
|
|
21
|
+
import 'node:fs';
|
|
22
22
|
import '@stryke/types/tsconfig';
|
|
23
23
|
import 'typescript';
|
|
24
|
-
import '@stryke/json/types';
|
|
25
|
-
import 'node:fs';
|
|
26
24
|
import '@stryke/types/array';
|
|
27
25
|
import '@stryke/env/types';
|
|
28
26
|
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,4 @@ import {a}from'./chunk-UCUR73HG.js';import i from'@powerlines/plugin-env';import
|
|
|
4
4
|
*
|
|
5
5
|
*****************************************/
|
|
6
6
|
|
|
7
|
-
function n(e={}){return {name:"crypto",dependsOn:[i(e.env)],config(){return {crypto:{salt:e.salt,encryptionKey:e.encryptionKey}}},configResolved(){this.dependencies["@noble/ciphers"]="^2.0.1",this.dependencies["@noble/hashes"]="^2.0.1",this.config.crypto.salt??=this.env.parsed.SALT,this.config.crypto.salt||this.log(LogLevelLabel.WARN,"No salt provided for the Crypto plugin. It's highly recommended to provide a unique salt via the plugin options or the SALT environment variable."),this.config.crypto.encryptionKey??=this.env.parsed.ENCRYPTION_KEY,this.config.crypto.encryptionKey||this.log(LogLevelLabel.WARN,"No encryption key provided for the Crypto plugin. It's highly recommended to provide a secure encryption key via the plugin options or the ENCRYPTION_KEY environment variable.");},async prepare(){this.log(LogLevelLabel.TRACE,"Preparing the Crypto runtime artifacts for the Powerlines project."),await this.
|
|
7
|
+
function n(e={}){return {name:"crypto",dependsOn:[i(e.env)],config(){return {crypto:{salt:e.salt,encryptionKey:e.encryptionKey}}},configResolved(){this.dependencies["@noble/ciphers"]="^2.0.1",this.dependencies["@noble/hashes"]="^2.0.1",this.config.crypto.salt??=this.env.parsed.SALT,this.config.crypto.salt||this.log(LogLevelLabel.WARN,"No salt provided for the Crypto plugin. It's highly recommended to provide a unique salt via the plugin options or the SALT environment variable."),this.config.crypto.encryptionKey??=this.env.parsed.ENCRYPTION_KEY,this.config.crypto.encryptionKey||this.log(LogLevelLabel.WARN,"No encryption key provided for the Crypto plugin. It's highly recommended to provide a secure encryption key via the plugin options or the ENCRYPTION_KEY environment variable.");},async prepare(){this.log(LogLevelLabel.TRACE,"Preparing the Crypto runtime artifacts for the Powerlines project."),await this.emitBuiltin(await Promise.resolve(cryptoModule(this)),"crypto","crypto.ts");}}}a(n,"plugin");var f=n;export{f as default,n as plugin};
|
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, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-CqJoG1K0.cjs';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -14,12 +14,10 @@ import '@babel/helper-plugin-utils';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
-
import 'oxc-parser';
|
|
18
17
|
import 'semver';
|
|
19
18
|
import 'unplugin';
|
|
19
|
+
import 'node:fs';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
22
|
-
import '@stryke/json/types';
|
|
23
|
-
import 'node:fs';
|
|
24
22
|
import '@stryke/types/array';
|
|
25
23
|
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, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-CqJoG1K0.js';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -14,12 +14,10 @@ import '@babel/helper-plugin-utils';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
-
import 'oxc-parser';
|
|
18
17
|
import 'semver';
|
|
19
18
|
import 'unplugin';
|
|
19
|
+
import 'node:fs';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
22
|
-
import '@stryke/json/types';
|
|
23
|
-
import 'node:fs';
|
|
24
22
|
import '@stryke/types/array';
|
|
25
23
|
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, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-CqJoG1K0.cjs';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -14,12 +14,10 @@ import '@babel/helper-plugin-utils';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
-
import 'oxc-parser';
|
|
18
17
|
import 'semver';
|
|
19
18
|
import 'unplugin';
|
|
19
|
+
import 'node:fs';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
22
|
-
import '@stryke/json/types';
|
|
23
|
-
import 'node:fs';
|
|
24
22
|
import '@stryke/types/array';
|
|
25
23
|
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, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-
|
|
1
|
+
export { a as CryptoPluginContext, C as CryptoPluginOptions, c as CryptoPluginResolvedConfig, b as CryptoPluginUserConfig, f as __ΩCryptoPluginContext, _ as __ΩCryptoPluginOptions, e as __ΩCryptoPluginResolvedConfig, d as __ΩCryptoPluginUserConfig } from '../index-CqJoG1K0.js';
|
|
2
2
|
import '@alloy-js/core/jsx-runtime';
|
|
3
3
|
import '@deepkit/type';
|
|
4
4
|
import '@stryke/capnp';
|
|
@@ -14,12 +14,10 @@ import '@babel/helper-plugin-utils';
|
|
|
14
14
|
import '@stryke/env/get-env-paths';
|
|
15
15
|
import '@stryke/types/package-json';
|
|
16
16
|
import 'jiti';
|
|
17
|
-
import 'oxc-parser';
|
|
18
17
|
import 'semver';
|
|
19
18
|
import 'unplugin';
|
|
19
|
+
import 'node:fs';
|
|
20
20
|
import '@stryke/types/tsconfig';
|
|
21
21
|
import 'typescript';
|
|
22
|
-
import '@stryke/json/types';
|
|
23
|
-
import 'node:fs';
|
|
24
22
|
import '@stryke/types/array';
|
|
25
23
|
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.31",
|
|
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.
|
|
120
|
-
"@storm-software/config-tools": "^1.188.
|
|
119
|
+
"@powerlines/plugin-env": "^0.13.28",
|
|
120
|
+
"@storm-software/config-tools": "^1.188.47",
|
|
121
121
|
"@stryke/path": "^0.19.2",
|
|
122
122
|
"defu": "^6.1.4",
|
|
123
|
-
"powerlines": "^0.23.
|
|
123
|
+
"powerlines": "^0.23.5"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@powerlines/nx": "^0.10.
|
|
127
|
-
"@storm-software/tsup": "^0.2.
|
|
126
|
+
"@powerlines/nx": "^0.10.22",
|
|
127
|
+
"@storm-software/tsup": "^0.2.45",
|
|
128
128
|
"@types/node": "^24.10.1"
|
|
129
129
|
},
|
|
130
130
|
"publishConfig": { "access": "public" },
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "50a08b483769a727b5d7c3a2f38e022e21ee915d"
|
|
132
132
|
}
|