@powerlines/plugin-deepkit 0.11.49 → 0.11.50

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/index.d.cts CHANGED
@@ -1,2181 +1,8 @@
1
- import { ArrayValues } from "@stryke/types/array";
2
- import { AnyFunction, MaybePromise, NonUndefined } from "@stryke/types/base";
3
- import { LoadResult, OutputOptions, RollupOptions } from "rollup";
4
- import { ExternalIdResult, HookFilter, TransformResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage, UnpluginOptions } from "unplugin";
5
- import { UserConfig } from "@farmfe/core";
6
- import { Configuration } from "@rspack/core";
7
- import { BuildOptions } from "@storm-software/tsup/types";
8
- import { UnbuildOptions } from "@storm-software/unbuild/types";
9
- import { BuildOptions as BuildOptions$1 } from "esbuild";
10
- import { RolldownOptions } from "rolldown";
11
- import { UserConfig as UserConfig$1 } from "tsdown";
12
- import { DepOptimizationOptions, PreviewOptions, ResolvedPreviewOptions, UserConfig as UserConfig$2 } from "vite";
13
- import { Configuration as Configuration$1 } from "webpack";
14
- import { EnvPaths } from "@stryke/env/get-env-paths";
15
- import { FetchRequestOptions } from "@stryke/http/fetch";
16
- import { PackageJson } from "@stryke/types/package-json";
17
- import { Jiti } from "jiti";
18
- import { SourceMap } from "magic-string";
19
- import { ParseResult, ParserOptions } from "oxc-parser";
20
- import { Range } from "semver";
21
- import { Project } from "ts-morph";
22
- import { RequestInfo, Response } from "undici";
23
- import { Format } from "@storm-software/build-tools/types";
24
- import { LogLevelLabel } from "@storm-software/config-tools/types";
25
- import { StormWorkspaceConfig } from "@storm-software/config/types";
26
- import { TypeDefinition, TypeDefinitionParameter } from "@stryke/types/configuration";
27
- import { AssetGlob } from "@stryke/types/file";
28
- import { DateString } from "compatx";
29
- import { ResolveOptions } from "@stryke/fs/resolve";
30
- import { CompilerOptions, TsConfigJson } from "@stryke/types/tsconfig";
31
- import ts from "typescript";
1
+ import { a as __ΩDeepkitPluginContext, c as __ΩDeepkitPluginUserConfig, i as DeepkitPluginUserConfig, l as Plugin, n as DeepkitPluginOptions, o as __ΩDeepkitPluginOptions, r as DeepkitPluginResolvedConfig, s as __ΩDeepkitPluginResolvedConfig, t as DeepkitPluginContext } from "./plugin-BS9iTMUd.cjs";
2
+ import "./index-CEgs-Dz2.cjs";
32
3
 
33
- //#region rolldown:runtime
34
- //#endregion
35
- //#region ../powerlines/src/types/build.d.ts
36
- type UnpluginBuilderVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown" | "bun";
37
- type BuilderVariant = UnpluginBuilderVariant | "tsup" | "tsdown" | "unbuild";
38
- type InferUnpluginVariant<TBuildVariant extends BuilderVariant> = TBuildVariant extends "tsup" ? "esbuild" : TBuildVariant extends "tsdown" ? "rolldown" : TBuildVariant extends "unbuild" ? "rollup" : TBuildVariant;
39
- interface BuildConfig {
40
- /**
41
- * The platform to build the project for
42
- *
43
- * @defaultValue "neutral"
44
- */
45
- platform?: "node" | "browser" | "neutral";
46
- /**
47
- * Array of strings indicating the polyfills to include for the build.
48
- *
49
- * @remarks
50
- * 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).
51
- *
52
- * @example
53
- * ```ts
54
- * {
55
- * polyfill: ['{projectRoot}/custom-polyfill.ts']
56
- * }
57
- * ```
58
- */
59
- polyfill?: string[];
60
- /**
61
- * 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.
62
- *
63
- * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
64
- */
65
- mainFields?: string[];
66
- /**
67
- * Array of strings indicating what conditions should be used for module resolution.
68
- */
69
- conditions?: string[];
70
- /**
71
- * Array of strings indicating what file extensions should be used for module resolution.
72
- *
73
- * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
74
- */
75
- extensions?: string[];
76
- /**
77
- * Array of strings indicating what modules should be deduplicated to a single version in the build.
78
- *
79
- * @remarks
80
- * 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.
81
- */
82
- dedupe?: string[];
83
- /**
84
- * Array of strings or regular expressions that indicate what modules are builtin for the environment.
85
- */
86
- builtins?: (string | RegExp)[];
87
- /**
88
- * Define global variable replacements.
89
- *
90
- * @remarks
91
- * 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.
92
- *
93
- * @example
94
- * ```ts
95
- * {
96
- * define: {
97
- * __VERSION__: '"1.0.0"',
98
- * __DEV__: 'process.env.NODE_ENV !== "production"'
99
- * }
100
- * }
101
- * ```
102
- *
103
- * @see https://esbuild.github.io/api/#define
104
- * @see https://vitejs.dev/config/build-options.html#define
105
- * @see https://github.com/rollup/plugins/tree/master/packages/replace
106
- */
107
- define?: Record<string, any>;
108
- /**
109
- * Global variables that will have import statements injected where necessary
110
- *
111
- * @remarks
112
- * 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.
113
- *
114
- * @example
115
- * ```ts
116
- * {
117
- * inject: {
118
- * process: 'process/browser',
119
- * Buffer: ['buffer', 'Buffer'],
120
- * }
121
- * }
122
- * ```
123
- *
124
- * @see https://github.com/rollup/plugins/tree/master/packages/inject
125
- */
126
- inject?: Record<string, string | string[]>;
127
- /**
128
- * The alias mappings to use for module resolution during the build process.
129
- *
130
- * @remarks
131
- * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
132
- *
133
- * @example
134
- * ```ts
135
- * {
136
- * alias: {
137
- * "@utils": "./src/utils",
138
- * "@components": "./src/components"
139
- * }
140
- * }
141
- * ```
142
- *
143
- * @see https://github.com/rollup/plugins/tree/master/packages/alias
144
- */
145
- alias?: Record<string, string> | Array<{
146
- find: string | RegExp;
147
- replacement: string;
148
- }>;
149
- /**
150
- * A list of modules that should not be bundled, even if they are external dependencies.
151
- *
152
- * @remarks
153
- * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
154
- */
155
- external?: (string | RegExp)[];
156
- /**
157
- * A list of modules that should always be bundled, even if they are external dependencies.
158
- */
159
- noExternal?: (string | RegExp)[];
160
- /**
161
- * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
162
- */
163
- skipNodeModulesBundle?: boolean;
164
- /**
165
- * If true, `process.env` referenced in code will be preserved as-is and evaluated in runtime. Otherwise, it is statically replaced as an empty object.
166
- *
167
- * @defaultValue false
168
- */
169
- keepProcessEnv?: boolean;
170
- /**
171
- * An optional set of override options to apply to the selected build variant.
172
- *
173
- * @remarks
174
- * 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.
175
- */
176
- override?: Record<string, any>;
177
- }
178
- type BuildResolvedConfig = Omit<BuildConfig, "override">;
179
- type ESBuildBuildConfig = Omit<BuildOptions$1, "entryPoints" | "sourceRoot" | "platform" | "outdir" | "env" | "assets" | "external" | "inject" | "tsconfig" | "tsconfigRaw" | "logLevel"> & BuildConfig;
180
- type ESBuildResolvedBuildConfig = Omit<BuildOptions$1, "inject"> & BuildResolvedConfig;
181
- type ViteBuildConfig = Omit<UserConfig$2, "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw" | "environments" | "output"> & BuildConfig & {
182
- /**
183
- * Optimize deps config
184
- */
185
- optimizeDeps?: Omit<DepOptimizationOptions, "extensions">;
186
- };
187
- type ViteResolvedBuildConfig = UserConfig$2 & BuildResolvedConfig;
188
- type WebpackBuildConfig = Omit<Configuration$1, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
189
- type WebpackResolvedBuildConfig = Configuration$1 & BuildResolvedConfig;
190
- type RspackBuildConfig = Omit<Configuration, "name" | "entry" | "entryPoints" | "tsconfig" | "tsconfigRaw"> & BuildConfig;
191
- type RspackResolvedBuildConfig = Configuration & BuildResolvedConfig;
192
- type RollupBuildOutputConfig = Omit<OutputOptions, "dir" | "format">;
193
- type RollupBuildConfig = Omit<RollupOptions, "entry" | "external" | "input" | "output" | "logLevel"> & {
194
- output: RollupBuildOutputConfig | RollupBuildOutputConfig[];
195
- } & BuildConfig;
196
- type RollupResolvedBuildConfig = RollupOptions & BuildResolvedConfig;
197
- type RolldownBuildConfig = Omit<RolldownOptions, "input" | "external" | "tsconfig" | "logLevel" | "output"> & BuildConfig;
198
- type RolldownResolvedBuildConfig = RolldownOptions & BuildResolvedConfig;
199
- type TsupBuildConfig = Partial<Omit<BuildOptions, "userOptions" | "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "clean" | "env" | "entry" | "entryPoints" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
200
- type TsupResolvedBuildConfig = BuildOptions & BuildResolvedConfig;
201
- type TsdownBuildConfig = Partial<Omit<UserConfig$1, "name" | "outDir" | "clean" | "cwd" | "tsconfig" | "publicDir" | "copy" | "alias" | "format" | "platform" | "env" | "define" | "entry" | "external" | "noExternal" | "skipNodeModulesBundle">> & BuildConfig;
202
- type TsdownResolvedBuildConfig = UserConfig$1 & BuildResolvedConfig;
203
- type UnbuildBuildConfig = Partial<Omit<UnbuildOptions, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
204
- type UnbuildResolvedBuildConfig = UnbuildOptions & BuildResolvedConfig;
205
- type FarmBuildConfig = Partial<Omit<UserConfig, "tsconfig" | "tsconfigRaw" | "assets" | "outputPath" | "mode" | "format" | "platform" | "projectRoot" | "env" | "entry" | "entryPoints">> & BuildConfig;
206
- type FarmResolvedBuildConfig = UserConfig & BuildResolvedConfig;
207
- //#endregion
208
- //#region ../powerlines/src/types/fs.d.ts
209
- type StoragePreset = "fs" | "virtual";
210
- /**
211
- * Interface defining the methods and properties for a storage adapter.
212
- */
213
- interface StorageAdapter {
214
- /**
215
- * A name identifying the storage adapter type.
216
- */
217
- name: string;
218
- /**
219
- * The storage preset for the adapter.
220
- *
221
- * @remarks
222
- * This can be used as an alternate way to identify the type of storage being used.
223
- */
224
- preset?: StoragePreset | null;
225
- /**
226
- * Checks if a key exists in the storage.
227
- *
228
- * @param key - The key to check for existence.
229
- * @returns A promise that resolves to `true` if the key exists, otherwise `false`.
230
- */
231
- exists: (key: string) => Promise<boolean>;
232
- /**
233
- * Synchronously checks if a key exists in the storage.
234
- *
235
- * @param key - The key to check for existence.
236
- * @returns Returns `true` if the key exists, otherwise `false`.
237
- */
238
- existsSync: (key: string) => boolean;
239
- /**
240
- * Read a value associated with a key from the storage.
241
- *
242
- * @param key - The key to read the value for.
243
- * @returns A promise that resolves to the value if found, otherwise `null`.
244
- */
245
- get: (key: string) => Promise<string | null>;
246
- /**
247
- * Synchronously reads the value associated with a key from the storage.
248
- *
249
- * @param key - The key to read the value for.
250
- * @returns The value if found, otherwise `null`.
251
- */
252
- getSync: (key: string) => string | null;
253
- /**
254
- * Writes a value to the storage for the given key.
255
- *
256
- * @param key - The key to associate the value with.
257
- * @param value - The value to store.
258
- */
259
- set: (key: string, value: string) => Promise<void>;
260
- /**
261
- * Synchronously writes a value to the storage for the given key.
262
- *
263
- * @param key - The key to associate the value with.
264
- * @param value - The value to store.
265
- */
266
- setSync: (key: string, value: string) => void;
267
- /**
268
- * Removes a value from the storage.
269
- *
270
- * @param key - The key whose value should be removed.
271
- */
272
- remove: (key: string) => Promise<void>;
273
- /**
274
- * Synchronously removes a value from the storage.
275
- *
276
- * @param key - The key whose value should be removed.
277
- */
278
- removeSync: (key: string) => void;
279
- /**
280
- * Creates a directory at the specified path.
281
- *
282
- * @param dirPath - The path of the directory to create.
283
- */
284
- mkdir: (dirPath: string) => Promise<void>;
285
- /**
286
- * Synchronously creates a directory at the specified path.
287
- *
288
- * @param dirPath - The path of the directory to create.
289
- */
290
- mkdirSync: (dirPath: string) => void;
291
- /**
292
- * Remove all entries from the storage that match the provided base path.
293
- *
294
- * @param base - The base path or prefix to clear entries from.
295
- */
296
- clear: (base?: string) => Promise<void>;
297
- /**
298
- * Synchronously remove all entries from the storage that match the provided base path.
299
- *
300
- * @param base - The base path or prefix to clear entries from.
301
- */
302
- clearSync: (base?: string) => void;
303
- /**
304
- * Lists all keys under the provided base path.
305
- *
306
- * @param base - The base path or prefix to list keys from.
307
- * @returns A promise resolving to the list of keys.
308
- */
309
- list: (base?: string) => Promise<string[]>;
310
- /**
311
- * Synchronously lists all keys under the provided base path.
312
- *
313
- * @param base - The base path or prefix to list keys from.
314
- * @returns The list of keys.
315
- */
316
- listSync: (base?: string) => string[];
317
- /**
318
- * Checks if the given key is a directory.
319
- *
320
- * @param key - The key to check.
321
- * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
322
- */
323
- isDirectory: (key: string) => Promise<boolean>;
324
- /**
325
- * Synchronously checks if the given key is a directory.
326
- *
327
- * @param key - The key to check.
328
- * @returns `true` if the key is a directory, otherwise `false`.
329
- */
330
- isDirectorySync: (key: string) => boolean;
331
- /**
332
- * Checks if the given key is a file.
333
- *
334
- * @param key - The key to check.
335
- * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
336
- */
337
- isFile: (key: string) => Promise<boolean>;
338
- /**
339
- * Synchronously checks if the given key is a file.
340
- *
341
- * @param key - The key to check.
342
- * @returns `true` if the key is a file, otherwise `false`.
343
- */
344
- isFileSync: (key: string) => boolean;
345
- /**
346
- * Releases any resources held by the storage adapter.
347
- */
348
- dispose: () => MaybePromise<void>;
349
- }
350
- /**
351
- * A mapping of file paths to storage adapter names and their corresponding {@link StorageAdapter} instances.
352
- */
353
- type StoragePort = Record<string, StorageAdapter>;
354
- interface VirtualFileMetadata {
355
- /**
356
- * The identifier for the file data.
357
- */
358
- id: string;
359
- /**
360
- * The timestamp of the virtual file.
361
- */
362
- timestamp: number;
363
- /**
364
- * The type of the file.
365
- *
366
- * @remarks
367
- * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
368
- * - `builtin`: Indicates that the file is a built-in module provided by the system.
369
- * - `entry`: Indicates that the file is an entry point for execution.
370
- * - `normal`: Indicates that the file is a standard file without any special role.
371
- */
372
- type: string;
373
- /**
374
- * Additional metadata associated with the file.
375
- */
376
- properties: Record<string, string | undefined>;
377
- }
378
- interface VirtualFileData {
379
- /**
380
- * The identifier for the file data.
381
- */
382
- id?: string;
383
- /**
384
- * The contents of the virtual file.
385
- */
386
- code: string;
387
- /**
388
- * The type of the file.
389
- *
390
- * @remarks
391
- * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
392
- * - `builtin`: Indicates that the file is a built-in module provided by the system.
393
- * - `entry`: Indicates that the file is an entry point for execution.
394
- * - `normal`: Indicates that the file is a standard file without any special role.
395
- */
396
- type?: string;
397
- /**
398
- * Additional metadata associated with the file.
399
- */
400
- properties?: Record<string, string | undefined>;
401
- }
402
- interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
403
- /**
404
- * An additional name for the file.
405
- */
406
- path: string;
407
- /**
408
- * The timestamp of the virtual file.
409
- */
410
- timestamp: number;
411
- }
412
- interface WriteOptions {
413
- /**
414
- * Should the file skip formatting before being written?
415
- *
416
- * @defaultValue false
417
- */
418
- skipFormat?: boolean;
419
- /**
420
- * The storage preset or adapter name for the output file.
421
- *
422
- * @remarks
423
- * If not specified, the output mode will be determined by the provided `output.mode` value.
424
- */
425
- storage?: StoragePreset | string;
426
- /**
427
- * Additional metadata for the file.
428
- */
429
- meta?: Partial<VirtualFileMetadata>;
430
- }
431
- interface ResolveOptions$1 extends ResolveOptions {
432
- /**
433
- * If true, the module is being resolved as an entry point.
434
- */
435
- isEntry?: boolean;
436
- /**
437
- * If true, the resolver will skip alias resolution when resolving modules.
438
- */
439
- skipAlias?: boolean;
440
- /**
441
- * If true, the resolver will skip using the cache when resolving modules.
442
- */
443
- skipCache?: boolean;
444
- /**
445
- * An array of external modules or patterns to exclude from resolution.
446
- */
447
- external?: (string | RegExp)[];
448
- /**
449
- * An array of modules or patterns to include in the resolution, even if they are marked as external.
450
- */
451
- noExternal?: (string | RegExp)[];
452
- /**
453
- * An array of patterns to match when resolving modules.
454
- */
455
- skipNodeModulesBundle?: boolean;
456
- }
457
- interface VirtualFileSystemInterface {
458
- /**
459
- * The underlying file metadata.
460
- */
461
- metadata: Readonly<Record<string, VirtualFileMetadata>>;
462
- /**
463
- * A map of file paths to their module ids.
464
- */
465
- ids: Readonly<Record<string, string>>;
466
- /**
467
- * A map of module ids to their file paths.
468
- */
469
- paths: Readonly<Record<string, string>>;
470
- /**
471
- * Checks if a file exists in the virtual file system (VFS).
472
- *
473
- * @param path - The path or id of the file.
474
- * @returns `true` if the file exists, otherwise `false`.
475
- */
476
- exists: (path: string) => Promise<boolean>;
477
- /**
478
- * Synchronously Checks if a file exists in the virtual file system (VFS).
479
- *
480
- * @param path - The path or id of the file.
481
- * @returns `true` if the file exists, otherwise `false`.
482
- */
483
- existsSync: (path: string) => boolean;
484
- /**
485
- * Checks if a file is virtual in the virtual file system (VFS).
486
- *
487
- * @param path - The path or id of the file.
488
- * @returns `true` if the file is virtual, otherwise `false`.
489
- */
490
- isVirtual: (path: string) => boolean;
491
- /**
492
- * Checks if the given key is a directory.
493
- *
494
- * @param key - The key to check.
495
- * @returns A promise that resolves to `true` if the key is a directory, otherwise `false`.
496
- */
497
- isDirectory: (key: string) => Promise<boolean>;
498
- /**
499
- * Synchronously checks if the given key is a directory.
500
- *
501
- * @param key - The key to check.
502
- * @returns `true` if the key is a directory, otherwise `false`.
503
- */
504
- isDirectorySync: (key: string) => boolean;
505
- /**
506
- * Checks if the given key is a file.
507
- *
508
- * @param key - The key to check.
509
- * @returns A promise that resolves to `true` if the key is a file, otherwise `false`.
510
- */
511
- isFile: (key: string) => Promise<boolean>;
512
- /**
513
- * Synchronously checks if the given key is a file.
514
- *
515
- * @param key - The key to check.
516
- * @returns `true` if the key is a file, otherwise `false`.
517
- */
518
- isFileSync: (key: string) => boolean;
519
- /**
520
- * Gets the metadata of a file in the virtual file system (VFS).
521
- *
522
- * @param path - The path or id of the file.
523
- * @returns The metadata of the file if it exists, otherwise undefined.
524
- */
525
- getMetadata: (path: string) => VirtualFileMetadata | undefined;
526
- /**
527
- * Lists files in a given path.
528
- *
529
- * @param path - The path to list files from.
530
- * @returns An array of file names in the specified path.
531
- */
532
- listSync: (path: string) => string[];
533
- /**
534
- * Lists files in a given path.
535
- *
536
- * @param path - The path to list files from.
537
- * @returns An array of file names in the specified path.
538
- */
539
- list: (path: string) => Promise<string[]>;
540
- /**
541
- * Removes a file or symbolic link in the virtual file system (VFS).
542
- *
543
- * @param path - The path to the file to remove.
544
- * @returns A promise that resolves when the file is removed.
545
- */
546
- removeSync: (path: string) => void;
547
- /**
548
- * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
549
- *
550
- * @param path - The path to the file to remove.
551
- * @returns A promise that resolves when the file is removed.
552
- */
553
- remove: (path: string) => Promise<void>;
554
- /**
555
- * Reads a file from the virtual file system (VFS).
556
- *
557
- * @param path - The path or id of the file.
558
- * @returns The contents of the file if it exists, otherwise undefined.
559
- */
560
- read: (path: string) => Promise<string | undefined>;
561
- /**
562
- * Reads a file from the virtual file system (VFS).
563
- *
564
- * @param path - The path or id of the file.
565
- */
566
- readSync: (path: string) => string | undefined;
567
- /**
568
- * Writes a file to the virtual file system (VFS).
569
- *
570
- * @param path - The path to the file.
571
- * @param data - The contents of the file.
572
- * @param options - Options for writing the file.
573
- * @returns A promise that resolves when the file is written.
574
- */
575
- write: (path: string, data: string, options?: WriteOptions) => Promise<void>;
576
- /**
577
- * Writes a file to the virtual file system (VFS).
578
- *
579
- * @param path - The path to the file.
580
- * @param data - The contents of the file.
581
- * @param options - Options for writing the file.
582
- */
583
- writeSync: (path: string, data: string, options?: WriteOptions) => void;
584
- /**
585
- * Creates a directory at the specified path.
586
- *
587
- * @param dirPath - The path of the directory to create.
588
- */
589
- mkdir: (dirPath: string) => Promise<void>;
590
- /**
591
- * Synchronously creates a directory at the specified path.
592
- *
593
- * @param dirPath - The path of the directory to create.
594
- */
595
- mkdirSync: (dirPath: string) => void;
596
- /**
597
- * Moves a file from one path to another in the virtual file system (VFS).
598
- *
599
- * @param srcPath - The source path to move
600
- * @param destPath - The destination path to move to
601
- */
602
- move: (srcPath: string, destPath: string) => Promise<void>;
603
- /**
604
- * Synchronously moves a file from one path to another in the virtual file system (VFS).
605
- *
606
- * @param srcPath - The source path to move
607
- * @param destPath - The destination path to move to
608
- */
609
- moveSync: (srcPath: string, destPath: string) => void;
610
- /**
611
- * Copies a file from one path to another in the virtual file system (VFS).
612
- *
613
- * @param srcPath - The source path to copy
614
- * @param destPath - The destination path to copy to
615
- */
616
- copy: (srcPath: string | URL | Omit<AssetGlob, "output">, destPath: string | URL) => Promise<void>;
617
- /**
618
- * Synchronously copies a file from one path to another in the virtual file system (VFS).
619
- *
620
- * @param srcPath - The source path to copy
621
- * @param destPath - The destination path to copy to
622
- */
623
- copySync: (srcPath: string | URL | Omit<AssetGlob, "output">, destPath: string | URL) => void;
624
- /**
625
- * Glob files in the virtual file system (VFS) based on the provided pattern(s).
626
- *
627
- * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
628
- * @returns An array of file paths matching the provided pattern(s)
629
- */
630
- glob: (patterns: string | Omit<AssetGlob, "output"> | (string | Omit<AssetGlob, "output">)[]) => Promise<string[]>;
631
- /**
632
- * Synchronously glob files in the virtual file system (VFS) based on the provided pattern(s).
633
- *
634
- * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
635
- * @returns An array of file paths matching the provided pattern(s)
636
- */
637
- globSync: (patterns: string | Omit<AssetGlob, "output"> | (string | Omit<AssetGlob, "output">)[]) => string[];
638
- /**
639
- * A helper function to resolve modules using the Jiti resolver
640
- *
641
- * @remarks
642
- * This function can be used to resolve modules relative to the project root directory.
643
- *
644
- * @example
645
- * ```ts
646
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
647
- * ```
648
- *
649
- * @param id - The module to resolve.
650
- * @param importer - An optional path to the importer module.
651
- * @param options - Additional resolution options.
652
- * @returns A promise that resolves to the resolved module path.
653
- */
654
- resolve: (id: string, importer?: string, options?: ResolveOptions$1) => Promise<string | undefined>;
655
- /**
656
- * A synchronous helper function to resolve modules using the Jiti resolver
657
- *
658
- * @remarks
659
- * This function can be used to resolve modules relative to the project root directory.
660
- *
661
- * @example
662
- * ```ts
663
- * const resolvedPath = context.resolveSync("some-module", "/path/to/importer");
664
- * ```
665
- *
666
- * @param id - The module to resolve.
667
- * @param importer - An optional path to the importer module.
668
- * @param options - Additional resolution options.
669
- * @returns The resolved module path.
670
- */
671
- resolveSync: (id: string, importer?: string, options?: ResolveOptions$1) => string | undefined;
672
- /**
673
- * Resolves a given module ID using the configured aliases.
674
- *
675
- * @remarks
676
- * This function can be used to map module IDs to different paths based on the alias configuration.
677
- *
678
- * @param id - The module ID to resolve.
679
- * @returns The resolved module ID - after applying any configured aliases (this will be the same as the input ID if no aliases match).
680
- */
681
- resolveAlias: (id: string) => string;
682
- /**
683
- * Disposes of the virtual file system (VFS), writes any virtual file changes to disk, and releases any associated resources.
684
- */
685
- dispose: () => Promise<void>;
686
- }
687
- //#endregion
688
- //#region ../powerlines/src/types/tsconfig.d.ts
689
- type ReflectionMode = "default" | "explicit" | "never";
690
- type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
691
- /**
692
- * Defines the level of reflection to be used during the transpilation process.
693
- *
694
- * @remarks
695
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
696
- * - `minimal` - Only the essential type information is captured.
697
- * - `normal` - Additional type information is captured, including some contextual data.
698
- * - `verbose` - All available type information is captured, including detailed contextual data.
699
- */
700
- type ReflectionLevel = "minimal" | "normal" | "verbose";
701
- interface DeepkitOptions {
702
- /**
703
- * Either true to activate reflection for all files compiled using this tsconfig,
704
- * or a list of globs/file paths relative to this tsconfig.json.
705
- * Globs/file paths can be prefixed with a ! to exclude them.
706
- */
707
- reflection?: RawReflectionMode;
708
- /**
709
- * Defines the level of reflection to be used during the transpilation process.
710
- *
711
- * @remarks
712
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
713
- * - `minimal` - Only the essential type information is captured.
714
- * - `normal` - Additional type information is captured, including some contextual data.
715
- * - `verbose` - All available type information is captured, including detailed contextual data.
716
- */
717
- reflectionLevel?: ReflectionLevel;
718
- }
719
- type TSCompilerOptions = CompilerOptions & DeepkitOptions;
720
- /**
721
- * The TypeScript compiler configuration.
722
- *
723
- * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
724
- */
725
- interface TSConfig extends Omit<TsConfigJson, "reflection"> {
726
- /**
727
- * Either true to activate reflection for all files compiled using this tsconfig,
728
- * or a list of globs/file paths relative to this tsconfig.json.
729
- * Globs/file paths can be prefixed with a ! to exclude them.
730
- */
731
- reflection?: RawReflectionMode;
732
- /**
733
- * Defines the level of reflection to be used during the transpilation process.
734
- *
735
- * @remarks
736
- * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
737
- * - `minimal` - Only the essential type information is captured.
738
- * - `normal` - Additional type information is captured, including some contextual data.
739
- * - `verbose` - All available type information is captured, including detailed contextual data.
740
- */
741
- reflectionLevel?: ReflectionLevel;
742
- /**
743
- * Instructs the TypeScript compiler how to compile `.ts` files.
744
- */
745
- compilerOptions?: TSCompilerOptions;
746
- }
747
- type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
748
- originalTsconfigJson: TsConfigJson;
749
- tsconfigJson: TSConfig;
750
- tsconfigFilePath: string;
751
- };
752
- //#endregion
753
- //#region ../powerlines/src/types/config.d.ts
754
- type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
755
- /**
756
- * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
757
- */
758
- type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
759
- type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext> | Plugin<TContext>[]>;
760
- /**
761
- * A configuration tuple for a Powerlines plugin.
762
- */
763
- type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
764
- /**
765
- * A configuration object for a Powerlines plugin.
766
- */
767
- type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
768
- plugin: string | PluginFactory<TContext, TOptions>;
769
- options: TOptions;
770
- } | {
771
- plugin: Plugin<TContext>;
772
- options?: never;
773
- };
774
- /**
775
- * A configuration tuple for a Powerlines plugin.
776
- */
777
- type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | PluginConfigTuple<TContext> | PluginConfigObject<TContext> | Promise<PluginConfig<TContext>> | PluginConfig<TContext>[];
778
- type ProjectType = "application" | "library";
779
- interface DeployConfig {
780
- /**
781
- * The deployment variant being used by the Powerlines engine.
782
- *
783
- * @example
784
- * ```ts
785
- * export default defineConfig({
786
- * deploy: {
787
- * variant: "cloudflare"
788
- * }
789
- * });
790
- *
791
- * ```
792
- */
793
- variant?: string;
794
- }
795
- interface OutputConfig {
796
- /**
797
- * The path to output the final compiled files to
798
- *
799
- * @remarks
800
- * If a value is not provided, Powerlines will attempt to:
801
- * 1. Use the `outDir` value in the `tsconfig.json` file.
802
- * 2. Use the `dist` directory in the project root directory.
803
- *
804
- * @defaultValue "dist/\{projectRoot\}"
805
- */
806
- outputPath?: string;
807
- /**
808
- * The output directory path for the project build.
809
- *
810
- * @remarks
811
- * This path is used to determine where the built files will be placed after the build process completes. This will be used in scenarios where the monorepo uses TSConfig paths to link packages together.
812
- *
813
- * @defaultValue "\{projectRoot\}/dist"
814
- */
815
- buildPath?: string;
816
- /**
817
- * The folder where the generated runtime artifacts will be located
818
- *
819
- * @remarks
820
- * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
821
- *
822
- * @defaultValue "\{projectRoot\}/.powerlines"
823
- */
824
- artifactsPath?: string;
825
- /**
826
- * The path of the generated runtime declaration file relative to the workspace root.
827
- *
828
- * @defaultValue "\{projectRoot\}/powerlines.d.ts"
829
- */
830
- dts?: string | false;
831
- /**
832
- * A prefix to use for identifying builtin modules
833
- *
834
- * @remarks
835
- * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
836
- *
837
- * @defaultValue "powerlines"
838
- */
839
- builtinPrefix?: string;
840
- /**
841
- * The module format of the output files
842
- *
843
- * @remarks
844
- * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
845
- *
846
- * @defaultValue "esm"
847
- */
848
- format?: Format | Format[];
849
- /**
850
- * A list of assets to copy to the output directory
851
- *
852
- * @remarks
853
- * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
854
- */
855
- assets?: Array<string | AssetGlob>;
856
- /**
857
- * A string preset or a custom {@link StoragePort} to provide fine-grained control over generated/output file storage.
858
- *
859
- * @remarks
860
- * If a string preset is provided, it must be one of the following values:
861
- * - `"virtual"`: Uses the local file system for storage.
862
- * - `"fs"`: Uses an in-memory virtual file system for storage.
863
- *
864
- * If a custom {@link StoragePort} is provided, it will be used for all file storage operations during the build process.
865
- *
866
- * @defaultValue "virtual"
867
- */
868
- storage?: StoragePort | StoragePreset;
869
- }
870
- interface BaseConfig {
871
- /**
872
- * The entry point(s) for the application
873
- */
874
- entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
875
- /**
876
- * Configuration for the output of the build process
877
- */
878
- output?: OutputConfig;
879
- /**
880
- * Configuration for cleaning the build artifacts
881
- *
882
- * @remarks
883
- * If set to `false`, the cleaning process will be disabled.
884
- */
885
- clean?: Record<string, any> | false;
886
- /**
887
- * Configuration for linting the source code
888
- *
889
- * @remarks
890
- * If set to `false`, linting will be disabled.
891
- */
892
- lint?: Record<string, any> | false;
893
- /**
894
- * Configuration for testing the source code
895
- *
896
- * @remarks
897
- * If set to `false`, testing will be disabled.
898
- */
899
- test?: Record<string, any> | false;
900
- /**
901
- * Configuration for the transformation of the source code
902
- */
903
- transform?: Record<string, any>;
904
- /**
905
- * Configuration provided to build processes
906
- *
907
- * @remarks
908
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
909
- */
910
- build?: BuildConfig;
911
- /**
912
- * Configuration for documentation generation
913
- *
914
- * @remarks
915
- * This configuration will be used by the documentation generation plugins during the `docs` command.
916
- */
917
- docs?: Record<string, any>;
918
- /**
919
- * Configuration for deploying the source code
920
- *
921
- * @remarks
922
- * If set to `false`, the deployment will be disabled.
923
- */
924
- deploy?: DeployConfig | false;
925
- /**
926
- * The path to the tsconfig file to be used by the compiler
927
- *
928
- * @remarks
929
- * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
930
- *
931
- * @defaultValue "\{projectRoot\}/tsconfig.json"
932
- */
933
- tsconfig?: string;
934
- /**
935
- * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
936
- *
937
- * @see https://www.typescriptlang.org/tsconfig
938
- *
939
- * @remarks
940
- * If populated, this option takes higher priority than `tsconfig`
941
- */
942
- tsconfigRaw?: TSConfig;
943
- }
944
- interface EnvironmentConfig extends BaseConfig {
945
- /**
946
- * Configuration options for the preview server
947
- */
948
- preview?: PreviewOptions;
949
- /**
950
- * A flag indicating whether the build is for a Server-Side Rendering environment.
951
- */
952
- ssr?: boolean;
953
- /**
954
- * Define if this environment is used for Server-Side Rendering
955
- *
956
- * @defaultValue "server" (if it isn't the client environment)
957
- */
958
- consumer?: "client" | "server";
959
- }
960
- interface CommonUserConfig extends BaseConfig {
961
- /**
962
- * The name of the project
963
- */
964
- name?: string;
965
- /**
966
- * The project display title
967
- *
968
- * @remarks
969
- * This option is used in documentation generation and other places where a human-readable title is needed.
970
- */
971
- title?: string;
972
- /**
973
- * A description of the project
974
- *
975
- * @remarks
976
- * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
977
- */
978
- description?: string;
979
- /**
980
- * The organization or author of the project
981
- *
982
- * @remarks
983
- * If this option is not provided, the build process will try to use the \`author\` value from the \`package.json\` file. If the \`author\` value cannot be determined, the {@link name | name configuration} will be used.
984
- */
985
- organization?: string;
986
- /**
987
- * The date to use for compatibility checks
988
- *
989
- * @remarks
990
- * This date can be used by plugins and build processes to determine compatibility with certain features or APIs. It is recommended to set this date to the date when the project was last known to be compatible with the desired features or APIs.
991
- *
992
- * @see https://developers.cloudflare.com/pages/platform/compatibility-dates/
993
- * @see https://docs.netlify.com/configure-builds/get-started/#set-a-compatibility-date
994
- * @see https://github.com/unjs/compatx
995
- */
996
- compatibilityDate?: DateString;
997
- /**
998
- * The log level to use for the Powerlines processes.
999
- *
1000
- * @defaultValue "info"
1001
- */
1002
- logLevel?: LogLevelLabel | null;
1003
- /**
1004
- * A custom logger function to use for logging messages
1005
- */
1006
- customLogger?: LogFn;
1007
- /**
1008
- * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
1009
- *
1010
- * @defaultValue "production"
1011
- */
1012
- mode?: "development" | "test" | "production";
1013
- /**
1014
- * The type of project being built
1015
- *
1016
- * @defaultValue "application"
1017
- */
1018
- type?: ProjectType;
1019
- /**
1020
- * The root directory of the project
1021
- */
1022
- root: string;
1023
- /**
1024
- * The root directory of the project's source code
1025
- *
1026
- * @defaultValue "\{root\}/src"
1027
- */
1028
- sourceRoot?: string;
1029
- /**
1030
- * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
1031
- *
1032
- * @remarks
1033
- * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
1034
- */
1035
- configFile?: string;
1036
- /**
1037
- * Should the Powerlines processes automatically install missing package dependencies?
1038
- *
1039
- * @remarks
1040
- * When set to `true`, Powerlines will attempt to install any missing dependencies using the package manager detected in the project (e.g., npm, yarn, pnpm). This can be useful for ensuring that all required packages are available during the build and preparation phases.
1041
- *
1042
- * @defaultValue false
1043
- */
1044
- autoInstall?: boolean;
1045
- /**
1046
- * Should the compiler processes skip any improvements that make use of cache?
1047
- *
1048
- * @defaultValue false
1049
- */
1050
- skipCache?: boolean;
1051
- /**
1052
- * A list of resolvable paths to plugins used during the build process
1053
- */
1054
- plugins?: PluginConfig<any>[];
1055
- /**
1056
- * Environment-specific configurations
1057
- */
1058
- environments?: Record<string, EnvironmentConfig>;
1059
- /**
1060
- * Should a single `build` process be ran for each environment?
1061
- *
1062
- * @remarks
1063
- * This option determines how environments are managed during the `build` process. The available options are:
1064
- *
1065
- * - `false`: A separate build is ran for each environment.
1066
- * - `true`: A single build is ran for all environments.
1067
- *
1068
- * @defaultValue false
1069
- */
1070
- singleBuild?: boolean;
1071
- /**
1072
- * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
1073
- *
1074
- * @remarks
1075
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
1076
- *
1077
- * @defaultValue "powerlines"
1078
- */
1079
- framework?: string;
1080
- }
1081
- interface UserConfig$3<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> extends Omit<CommonUserConfig, "build"> {
1082
- /**
1083
- * Configuration provided to build processes
1084
- *
1085
- * @remarks
1086
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuildVariant | build variant}.
1087
- */
1088
- build: Omit<TBuildConfig, "override"> & {
1089
- /**
1090
- * The build variant being used by the Powerlines engine.
1091
- */
1092
- variant?: TBuildVariant;
1093
- /**
1094
- * An optional set of override options to apply to the selected build variant.
1095
- *
1096
- * @remarks
1097
- * 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.
1098
- */
1099
- override?: Partial<TBuildResolvedConfig>;
1100
- };
1101
- }
1102
- type WebpackUserConfig = UserConfig$3<WebpackBuildConfig, WebpackResolvedBuildConfig, "webpack">;
1103
- type RspackUserConfig = UserConfig$3<RspackBuildConfig, RspackResolvedBuildConfig, "rspack">;
1104
- type RollupUserConfig = UserConfig$3<RollupBuildConfig, RollupResolvedBuildConfig, "rollup">;
1105
- type RolldownUserConfig = UserConfig$3<RolldownBuildConfig, RolldownResolvedBuildConfig, "rolldown">;
1106
- type ViteUserConfig = UserConfig$3<ViteBuildConfig, ViteResolvedBuildConfig, "vite">;
1107
- type ESBuildUserConfig = UserConfig$3<ESBuildBuildConfig, ESBuildResolvedBuildConfig, "esbuild">;
1108
- type UnbuildUserConfig = UserConfig$3<UnbuildBuildConfig, UnbuildResolvedBuildConfig, "unbuild">;
1109
- type TsupUserConfig = UserConfig$3<TsupBuildConfig, TsupResolvedBuildConfig, "tsup">;
1110
- type TsdownUserConfig = UserConfig$3<TsdownBuildConfig, TsdownResolvedBuildConfig, "tsdown">;
1111
- type FarmUserConfig = UserConfig$3<FarmBuildConfig, FarmResolvedBuildConfig, "farm">;
1112
- type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "deploy" | "clean";
1113
- /**
1114
- * The configuration provided while executing Powerlines commands.
1115
- */
1116
- type InlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = Partial<TUserConfig> & {
1117
- /**
1118
- * A string identifier for the Powerlines command being executed
1119
- */
1120
- command: PowerlinesCommand;
1121
- };
1122
- type NewInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & Required<Pick<InlineConfig<TUserConfig>, "root">> & {
1123
- /**
1124
- * A string identifier for the Powerlines command being executed
1125
- */
1126
- command: "new";
1127
- /**
1128
- * The package name (from the \`package.json\`) for the project that will be used in the \`new\` command to create a new project based on this configuration
1129
- */
1130
- packageName?: string;
1131
- };
1132
- type CleanInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & {
1133
- /**
1134
- * A string identifier for the Powerlines command being executed
1135
- */
1136
- command: "clean";
1137
- };
1138
- type PrepareInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & {
1139
- /**
1140
- * A string identifier for the Powerlines command being executed
1141
- */
1142
- command: "prepare";
1143
- };
1144
- type BuildInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & {
1145
- /**
1146
- * A string identifier for the Powerlines command being executed
1147
- */
1148
- command: "build";
1149
- };
1150
- type LintInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & {
1151
- /**
1152
- * A string identifier for the Powerlines command being executed
1153
- */
1154
- command: "lint";
1155
- };
1156
- type DocsInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & {
1157
- /**
1158
- * A string identifier for the Powerlines command being executed
1159
- */
1160
- command: "docs";
1161
- };
1162
- type DeployInlineConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = InlineConfig<TUserConfig> & {
1163
- /**
1164
- * A string identifier for the Powerlines command being executed
1165
- */
1166
- command: "deploy";
1167
- };
1168
- //#endregion
1169
- //#region ../powerlines/src/types/hooks.d.ts
1170
- type HookListOrders = "preOrdered" | "preEnforced" | "normal" | "postEnforced" | "postOrdered";
1171
- type UnpluginHookFunctions<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1] = keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1]> = Required<UnpluginOptions>[TUnpluginBuilderVariant$1][TField$1] extends infer THandler | {
1172
- handler: infer THandler;
1173
- } ? THandler extends ((this: infer THandlerOriginalContext, ...args: infer THandlerArgs) => infer THandlerReturn) ? (this: THandlerOriginalContext & WithUnpluginBuildContext<TContext>, ...args: THandlerArgs) => THandlerReturn : THandler extends {
1174
- handler: infer THandlerFunction;
1175
- } ? THandlerFunction extends ((this: infer THandlerFunctionOriginalContext, ...args: infer THandlerFunctionArgs) => infer THandlerFunctionReturn) ? (this: THandlerFunctionOriginalContext & WithUnpluginBuildContext<TContext>, ...args: THandlerFunctionArgs) => THandlerFunctionReturn : never : never : never;
1176
- interface PluginHooksListItem<TContext extends PluginContext = PluginContext, TFields extends PluginHookFields<TContext> = PluginHookFields<TContext>> {
1177
- plugin: Plugin<TContext>;
1178
- handler: PluginHookFunctions<TContext>[TFields];
1179
- }
1180
- type PluginHooksList<TContext extends PluginContext = PluginContext, TFields extends PluginHookFields<TContext> = PluginHookFields<TContext>> = { [TKey in HookListOrders]?: PluginHooksListItem<TContext, TFields>[] | undefined };
1181
- interface UnpluginHooksListItem<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1] = keyof Required<UnpluginOptions>[TUnpluginBuilderVariant$1]> {
1182
- plugin: Plugin<TContext>;
1183
- handler: UnpluginHookFunctions<TContext, TUnpluginBuilderVariant$1, TField$1>;
1184
- }
1185
- type UnpluginHookList<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant, TField$1 extends keyof UnpluginOptions[TUnpluginBuilderVariant$1] = keyof UnpluginOptions[TUnpluginBuilderVariant$1]> = { [TKey in HookListOrders]?: UnpluginHooksListItem<TContext, TUnpluginBuilderVariant$1, TField$1>[] | undefined };
1186
- type UnpluginHookVariantField<TContext extends PluginContext = PluginContext, TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant> = { [TKey in keyof UnpluginOptions[TUnpluginBuilderVariant$1]]?: UnpluginHookList<TContext, TUnpluginBuilderVariant$1, TKey> };
1187
- type UnpluginHookVariant<TContext extends PluginContext = PluginContext> = { [TKey in UnpluginBuilderVariant]?: UnpluginHookVariantField<TContext, TKey> };
1188
- type HookFields<TContext extends PluginContext = PluginContext> = PluginHookFields<TContext> | UnpluginBuilderVariant;
1189
- type HooksList<TContext extends PluginContext = PluginContext> = { [TField in HookFields<TContext>]?: TField extends PluginHookFields<TContext> ? PluginHooksList<TContext, TField> : TField extends UnpluginBuilderVariant ? UnpluginHookVariant<TContext>[TField] : never };
1190
- type InferHooksListItem<TContext extends PluginContext, TKey$1 extends string> = TKey$1 extends `${infer TUnpluginBuilderVariant}:${infer TUnpluginField}` ? TUnpluginBuilderVariant extends UnpluginBuilderVariant ? TUnpluginField extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant] ? UnpluginHooksListItem<TContext, TUnpluginBuilderVariant, TUnpluginField> : never : never : TKey$1 extends keyof PluginHookFunctions<TContext> ? PluginHooksListItem<TContext, TKey$1> : never;
1191
- type InferHookFunction<TContext extends PluginContext, TKey$1 extends string> = TKey$1 extends `${infer TUnpluginBuilderVariant}:${infer TUnpluginField}` ? TUnpluginBuilderVariant extends UnpluginBuilderVariant ? TUnpluginField extends keyof Required<UnpluginOptions>[TUnpluginBuilderVariant] ? UnpluginHookFunctions<TContext, TUnpluginBuilderVariant, TUnpluginField> : never : never : TKey$1 extends keyof PluginHookFunctions<TContext> ? PluginHookFunctions<TContext>[TKey$1] : never;
1192
- type InferHookReturnType<TContext extends PluginContext, TKey$1 extends string> = ReturnType<InferHookFunction<TContext, TKey$1>>;
1193
- type InferHookParameters<TContext extends PluginContext, TKey$1 extends string> = Parameters<InferHookFunction<TContext, TKey$1>>;
1194
- //#endregion
1195
- //#region ../powerlines/src/types/resolved.d.ts
1196
- interface ResolvedEntryTypeDefinition extends TypeDefinition {
1197
- /**
1198
- * The user provided entry point in the source code
1199
- */
1200
- input?: TypeDefinition;
1201
- /**
1202
- * An optional name to use in the package export during the build process
1203
- */
1204
- output?: string;
1205
- }
1206
- type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "ssr" | "preview"> & Required<Pick<EnvironmentConfig, "consumer" | "ssr">> & {
1207
- /**
1208
- * The name of the environment
1209
- */
1210
- name: string;
1211
- /**
1212
- * Configuration options for the preview server
1213
- */
1214
- preview?: ResolvedPreviewOptions;
1215
- };
1216
- type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
1217
- type OutputResolvedConfig = Required<Omit<OutputConfig, "assets" | "storage"> & {
1218
- assets: ResolvedAssetGlob[];
1219
- }> & Pick<OutputConfig, "storage">;
1220
- /**
1221
- * The resolved options for the Powerlines project configuration.
1222
- */
1223
- type ResolvedConfig<TUserConfig extends UserConfig$3 = UserConfig$3> = Omit<TUserConfig, "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "variant" | "type" | "output" | "logLevel" | "framework" | "sourceRoot"> & Required<Pick<TUserConfig, "name" | "title" | "organization" | "compatibilityDate" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "deploy" | "framework" | "sourceRoot">> & {
1224
- /**
1225
- * The configuration options that were provided inline to the Powerlines CLI.
1226
- */
1227
- inlineConfig: InlineConfig<TUserConfig>;
1228
- /**
1229
- * The original configuration options that were provided by the user to the Powerlines process.
1230
- */
1231
- userConfig: TUserConfig;
1232
- /**
1233
- * A string identifier for the Powerlines command being executed.
1234
- */
1235
- command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
1236
- /**
1237
- * The root directory of the project's source code
1238
- *
1239
- * @defaultValue "\{projectRoot\}/src"
1240
- */
1241
- sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
1242
- /**
1243
- * The root directory of the project.
1244
- */
1245
- projectRoot: NonUndefined<TUserConfig["root"]>;
1246
- /**
1247
- * The type of project being built.
1248
- */
1249
- projectType: NonUndefined<TUserConfig["type"]>;
1250
- /**
1251
- * The output configuration options to use for the build process
1252
- */
1253
- output: OutputResolvedConfig;
1254
- /**
1255
- * Configuration provided to build processes
1256
- *
1257
- * @remarks
1258
- * This configuration can be used by plugins during the `build` command. It will generally contain options specific to the selected {@link BuilderVariant | build variant}.
1259
- */
1260
- build: Omit<TUserConfig["build"], "override"> & Required<Pick<Required<TUserConfig["build"]>, "override">>;
1261
- /**
1262
- * The log level to use for the Powerlines processes.
1263
- *
1264
- * @defaultValue "info"
1265
- */
1266
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
1267
- };
1268
- type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
1269
- type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
1270
- type RspackResolvedConfig = ResolvedConfig<RspackUserConfig>;
1271
- type ESBuildResolvedConfig = ResolvedConfig<ESBuildUserConfig>;
1272
- type RollupResolvedConfig = ResolvedConfig<RollupUserConfig>;
1273
- type RolldownResolvedConfig = ResolvedConfig<RolldownUserConfig>;
1274
- type TsupResolvedConfig = ResolvedConfig<TsupUserConfig>;
1275
- type TsdownResolvedConfig = ResolvedConfig<TsdownUserConfig>;
1276
- type UnbuildResolvedConfig = ResolvedConfig<UnbuildUserConfig>;
1277
- type FarmResolvedConfig = ResolvedConfig<FarmUserConfig>;
1278
- type InferResolvedConfig<TBuildVariant extends BuilderVariant | undefined> = TBuildVariant extends undefined ? ResolvedConfig : TBuildVariant extends "webpack" ? WebpackResolvedConfig : TBuildVariant extends "rspack" ? RspackResolvedConfig : TBuildVariant extends "vite" ? ViteResolvedConfig : TBuildVariant extends "esbuild" ? ESBuildResolvedConfig : TBuildVariant extends "unbuild" ? UnbuildResolvedConfig : TBuildVariant extends "tsup" ? TsupResolvedConfig : TBuildVariant extends "tsdown" ? TsdownResolvedConfig : TBuildVariant extends "rolldown" ? RolldownResolvedConfig : TBuildVariant extends "rollup" ? RollupResolvedConfig : TBuildVariant extends "farm" ? FarmResolvedConfig : ResolvedConfig;
1279
- //#endregion
1280
- //#region ../powerlines/src/types/context.d.ts
1281
- interface MetaInfo {
1282
- /**
1283
- * The checksum generated from the resolved options
1284
- */
1285
- checksum: string;
1286
- /**
1287
- * The build id
1288
- */
1289
- buildId: string;
1290
- /**
1291
- * The release id
1292
- */
1293
- releaseId: string;
1294
- /**
1295
- * The build timestamp
1296
- */
1297
- timestamp: number;
1298
- /**
1299
- * A hash that represents the path to the project root directory
1300
- */
1301
- projectRootHash: string;
1302
- /**
1303
- * A hash that represents the path to the project root directory
1304
- */
1305
- configHash: string;
1306
- }
1307
- interface Resolver extends Jiti {
1308
- plugin: Jiti;
1309
- }
1310
- interface TransformResult$1 {
1311
- code: string;
1312
- map: SourceMap | null;
1313
- }
1314
- interface SelectHooksOptions {
1315
- order?: "pre" | "post" | "normal";
1316
- }
1317
- /**
1318
- * Options for initializing or updating the context with new configuration values
1319
- */
1320
- interface InitContextOptions {
1321
- /**
1322
- * If false, the plugin will be loaded after all other plugins.
1323
- *
1324
- * @defaultValue true
1325
- */
1326
- isHighPriority: boolean;
1327
- }
1328
- /**
1329
- * Options for fetch requests made via the context's {@link Context.fetch} method
1330
- */
1331
- interface FetchOptions extends FetchRequestOptions {
1332
- /**
1333
- * An indicator specifying that the request should bypass any caching
1334
- */
1335
- skipCache?: boolean;
1336
- }
1337
- /**
1338
- * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
1339
- */
1340
- interface ParseOptions extends ParserOptions {
1341
- /**
1342
- * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
1343
- */
1344
- allowReturnOutsideFunction?: boolean;
1345
- }
1346
- interface EmitOptions extends WriteOptions {
1347
- /**
1348
- * The file extension to use when emitting the file
1349
- */
1350
- extension?: string;
1351
- /**
1352
- * If true, will emit the file using {@link UnpluginBuildContext.emitFile | the bundler's emit function}.
1353
- */
1354
- emitWithBundler?: boolean;
1355
- needsCodeReference?: Parameters<UnpluginBuildContext["emitFile"]>[0]["needsCodeReference"];
1356
- originalFileName?: Parameters<UnpluginBuildContext["emitFile"]>[0]["originalFileName"];
1357
- }
1358
- /**
1359
- * Options for emitting entry virtual files
1360
- */
1361
- type EmitEntryOptions = EmitOptions & Omit<ResolvedEntryTypeDefinition, "file">;
1362
- /**
1363
- * The unresolved Powerlines context.
1364
- *
1365
- * @remarks
1366
- * This context is used before the user configuration has been fully resolved after the `config`.
1367
- */
1368
- interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1369
- /**
1370
- * The Storm workspace configuration
1371
- */
1372
- workspaceConfig: WorkspaceConfig;
1373
- /**
1374
- * An object containing the options provided to Powerlines
1375
- */
1376
- config: Omit<TResolvedConfig["userConfig"], "build" | "output"> & Required<Pick<TResolvedConfig["userConfig"], "build" | "output">> & {
1377
- projectRoot: NonUndefined<TResolvedConfig["userConfig"]["root"]>;
1378
- sourceRoot: NonUndefined<TResolvedConfig["userConfig"]["sourceRoot"]>;
1379
- output: TResolvedConfig["output"];
1380
- };
1381
- /**
1382
- * A logging function for the Powerlines engine
1383
- */
1384
- log: LogFn;
1385
- /**
1386
- * A logging function for fatal messages
1387
- */
1388
- fatal: (message: string | UnpluginMessage) => void;
1389
- /**
1390
- * A logging function for error messages
1391
- */
1392
- error: (message: string | UnpluginMessage) => void;
1393
- /**
1394
- * A logging function for warning messages
1395
- */
1396
- warn: (message: string | UnpluginMessage) => void;
1397
- /**
1398
- * A logging function for informational messages
1399
- */
1400
- info: (message: string | UnpluginMessage) => void;
1401
- /**
1402
- * A logging function for debug messages
1403
- */
1404
- debug: (message: string | UnpluginMessage) => void;
1405
- /**
1406
- * A logging function for trace messages
1407
- */
1408
- trace: (message: string | UnpluginMessage) => void;
1409
- /**
1410
- * The metadata information
1411
- */
1412
- meta: MetaInfo;
1413
- /**
1414
- * The metadata information currently written to disk
1415
- */
1416
- persistedMeta?: MetaInfo;
1417
- /**
1418
- * The Powerlines artifacts directory
1419
- */
1420
- artifactsPath: string;
1421
- /**
1422
- * The path to the Powerlines builtin runtime modules directory
1423
- */
1424
- builtinsPath: string;
1425
- /**
1426
- * The path to the Powerlines entry modules directory
1427
- */
1428
- entryPath: string;
1429
- /**
1430
- * The path to the Powerlines TypeScript declaration files directory
1431
- */
1432
- dtsPath: string;
1433
- /**
1434
- * The path to a directory where the reflection data buffers (used by the build processes) are stored
1435
- */
1436
- dataPath: string;
1437
- /**
1438
- * The path to a directory where the project cache (used by the build processes) is stored
1439
- */
1440
- cachePath: string;
1441
- /**
1442
- * The Powerlines environment paths
1443
- */
1444
- envPaths: EnvPaths;
1445
- /**
1446
- * The file system path to the Powerlines package installation
1447
- */
1448
- powerlinesPath: string;
1449
- /**
1450
- * The relative path to the Powerlines workspace root directory
1451
- */
1452
- relativeToWorkspaceRoot: string;
1453
- /**
1454
- * The project's `package.json` file content
1455
- */
1456
- packageJson: PackageJson & Record<string, any>;
1457
- /**
1458
- * The project's `project.json` file content
1459
- */
1460
- projectJson?: Record<string, any>;
1461
- /**
1462
- * The dependency installations required by the project
1463
- */
1464
- dependencies: Record<string, string | Range>;
1465
- /**
1466
- * The development dependency installations required by the project
1467
- */
1468
- devDependencies: Record<string, string | Range>;
1469
- /**
1470
- * The parsed TypeScript configuration from the `tsconfig.json` file
1471
- */
1472
- tsconfig: ParsedTypeScriptConfig;
1473
- /**
1474
- * The entry points of the source code
1475
- */
1476
- entry: ResolvedEntryTypeDefinition[];
1477
- /**
1478
- * The virtual file system manager used during the build process to reference generated runtime files
1479
- */
1480
- fs: VirtualFileSystemInterface;
1481
- /**
1482
- * The Jiti module resolver
1483
- */
1484
- resolver: Resolver;
1485
- /**
1486
- * The builtin module id that exist in the Powerlines virtual file system
1487
- */
1488
- builtins: string[];
1489
- /**
1490
- * The {@link Project} instance used for type reflection and module manipulation
1491
- *
1492
- * @see https://ts-morph.com/
1493
- *
1494
- * @remarks
1495
- * This instance is created lazily on first access.
1496
- */
1497
- program: Project;
1498
- /**
1499
- * A function to perform HTTP fetch requests
1500
- *
1501
- * @remarks
1502
- * This function uses a caching layer to avoid duplicate requests during the Powerlines process.
1503
- *
1504
- * @example
1505
- * ```ts
1506
- * const response = await context.fetch("https://api.example.com/data");
1507
- * const data = await response.json();
1508
- * ```
1509
- *
1510
- * @see https://github.com/nodejs/undici
1511
- *
1512
- * @param input - The URL to fetch.
1513
- * @param options - The fetch request options.
1514
- * @returns A promise that resolves to a response returned by the fetch.
1515
- */
1516
- fetch: (input: RequestInfo, options?: FetchOptions) => Promise<Response>;
1517
- /**
1518
- * Parse code using [Oxc-Parser](https://github.com/oxc/oxc) into an (ESTree-compatible)[https://github.com/estree/estree] AST object.
1519
- *
1520
- * @remarks
1521
- * This function can be used to parse TypeScript code into an AST for further analysis or transformation.
1522
- *
1523
- * @example
1524
- * ```ts
1525
- * const ast = context.parse("const x: number = 42;");
1526
- * ```
1527
- *
1528
- * @see https://rollupjs.org/plugin-development/#this-parse
1529
- * @see https://github.com/oxc/oxc
1530
- *
1531
- * @param code - The source code to parse.
1532
- * @param options - The options to pass to the parser.
1533
- * @returns An (ESTree-compatible)[https://github.com/estree/estree] AST object.
1534
- */
1535
- parse: (code: string, options?: ParseOptions) => Promise<ParseResult>;
1536
- /**
1537
- * A helper function to resolve modules using the Jiti resolver
1538
- *
1539
- * @remarks
1540
- * This function can be used to resolve modules relative to the project root directory.
1541
- *
1542
- * @example
1543
- * ```ts
1544
- * const resolvedPath = await context.resolve("some-module", "/path/to/importer");
1545
- * ```
1546
- *
1547
- * @param id - The module to resolve.
1548
- * @param importer - An optional path to the importer module.
1549
- * @param options - Additional resolution options.
1550
- * @returns A promise that resolves to the resolved module path.
1551
- */
1552
- resolve: (id: string, importer?: string, options?: ResolveOptions$1) => Promise<ExternalIdResult | undefined>;
1553
- /**
1554
- * A helper function to load modules using the Jiti resolver
1555
- *
1556
- * @remarks
1557
- * This function can be used to load modules relative to the project root directory.
1558
- *
1559
- * @example
1560
- * ```ts
1561
- * const module = await context.load("some-module", "/path/to/importer");
1562
- * ```
1563
- *
1564
- * @param id - The module to load.
1565
- * @returns A promise that resolves to the loaded module.
1566
- */
1567
- load: (id: string) => Promise<TransformResult$1 | undefined>;
1568
- /**
1569
- * The Powerlines builtin virtual files
1570
- */
1571
- getBuiltins: () => Promise<VirtualFile[]>;
1572
- /**
1573
- * Resolves a file and writes it to the VFS if it does not already exist
1574
- *
1575
- * @param code - The source code of the file
1576
- * @param path - The path to write the file to
1577
- * @param options - Additional options for writing the file
1578
- */
1579
- emit: (code: string, path: string, options?: EmitOptions) => Promise<void>;
1580
- /**
1581
- * Synchronously resolves a file and writes it to the VFS if it does not already exist
1582
- *
1583
- * @param code - The source code of the file
1584
- * @param path - The path to write the file to
1585
- * @param options - Additional options for writing the file
1586
- */
1587
- emitSync: (code: string, path: string, options?: EmitOptions) => void;
1588
- /**
1589
- * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
1590
- *
1591
- * @param code - The source code of the builtin file
1592
- * @param id - The unique identifier of the builtin file
1593
- * @param options - Additional options for writing the builtin file
1594
- */
1595
- emitBuiltin: (code: string, id: string, options?: EmitOptions) => Promise<void>;
1596
- /**
1597
- * Synchronously resolves a builtin virtual file and writes it to the VFS if it does not already exist
1598
- *
1599
- * @param code - The source code of the builtin file
1600
- * @param id - The unique identifier of the builtin file
1601
- * @param options - Additional options for writing the builtin file
1602
- */
1603
- emitBuiltinSync: (code: string, id: string, options?: EmitOptions) => void;
1604
- /**
1605
- * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1606
- *
1607
- * @param code - The source code of the entry file
1608
- * @param path - An optional path to write the entry file to
1609
- * @param options - Additional options for writing the entry file
1610
- */
1611
- emitEntry: (code: string, path: string, options?: EmitEntryOptions) => Promise<void>;
1612
- /**
1613
- * Synchronously resolves a entry virtual file and writes it to the VFS if it does not already exist
1614
- *
1615
- * @param code - The source code of the entry file
1616
- * @param path - An optional path to write the entry file to
1617
- * @param options - Additional options for writing the entry file
1618
- */
1619
- emitEntrySync: (code: string, path: string, options?: EmitEntryOptions) => void;
1620
- /**
1621
- * A function to update the context fields using a new user configuration options
1622
- */
1623
- withUserConfig: (userConfig: UserConfig$3, options?: InitContextOptions) => Promise<void>;
1624
- /**
1625
- * A function to update the context fields using inline configuration options
1626
- */
1627
- withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
1628
- /**
1629
- * Create a new logger instance
1630
- *
1631
- * @param name - The name to use for the logger instance
1632
- * @returns A logger function
1633
- */
1634
- createLog: (name: string | null) => LogFn;
1635
- /**
1636
- * Extend the current logger instance with a new name
1637
- *
1638
- * @param name - The name to use for the extended logger instance
1639
- * @returns A logger function
1640
- */
1641
- extendLog: (name: string) => LogFn;
1642
- /**
1643
- * Generates a checksum representing the current context state
1644
- *
1645
- * @returns A promise that resolves to a string representing the checksum
1646
- */
1647
- generateChecksum: () => Promise<string>;
1648
- }
1649
- type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
1650
- /**
1651
- * The fully resolved Powerlines configuration
1652
- */
1653
- config: TResolvedConfig;
1654
- };
1655
- interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
1656
- /**
1657
- * The expected plugins options for the Powerlines project.
1658
- *
1659
- * @remarks
1660
- * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
1661
- */
1662
- plugins: Plugin<PluginContext<TResolvedConfig>>[];
1663
- /**
1664
- * A function to add a plugin to the context and update the configuration options
1665
- */
1666
- addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
1667
- /**
1668
- * A table for storing the current context for each configured environment
1669
- */
1670
- environments: Record<string, EnvironmentContext<TResolvedConfig>>;
1671
- /**
1672
- * Retrieves the context for a specific environment by name
1673
- *
1674
- * @throws Will throw an error if the environment does not exist
1675
- *
1676
- * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
1677
- * @returns A promise that resolves to the environment context.
1678
- *
1679
- * @example
1680
- * ```ts
1681
- * const devEnv = await apiContext.getEnvironment("development");
1682
- * const defaultEnv = await apiContext.getEnvironment();
1683
- * ```
1684
- */
1685
- getEnvironment: (name?: string) => Promise<EnvironmentContext<TResolvedConfig>>;
1686
- /**
1687
- * Safely retrieves the context for a specific environment by name
1688
- *
1689
- * @param name - The name of the environment to retrieve. If not provided, the default environment is returned.
1690
- * @returns A promise that resolves to the environment context, or undefined if the environment does not exist.
1691
- *
1692
- * @example
1693
- * ```ts
1694
- * const devEnv = await apiContext.getEnvironmentSafe("development");
1695
- * const defaultEnv = await apiContext.getEnvironmentSafe();
1696
- * ```
1697
- *
1698
- * @remarks
1699
- * This method is similar to `getEnvironment`, but it returns `undefined` instead of throwing an error if the specified environment does not exist.
1700
- * This can be useful in scenarios where the existence of an environment is optional or uncertain.
1701
- *
1702
- * ```ts
1703
- * const testEnv = await apiContext.getEnvironmentSafe("test");
1704
- * if (testEnv) {
1705
- * // Environment exists, safe to use it
1706
- * } else {
1707
- * // Environment does not exist, handle accordingly
1708
- * }
1709
- * ```
1710
- *
1711
- * Using this method helps avoid unhandled exceptions in cases where an environment might not be defined.
1712
- */
1713
- getEnvironmentSafe: (name?: string) => Promise<EnvironmentContext<TResolvedConfig> | undefined>;
1714
- /**
1715
- * A function to copy the context and update the fields for a specific environment
1716
- *
1717
- * @param environment - The environment configuration to use.
1718
- * @returns A new context instance with the updated environment.
1719
- */
1720
- in: (environment: EnvironmentResolvedConfig) => Promise<EnvironmentContext<TResolvedConfig>>;
1721
- /**
1722
- * A function to merge all configured environments into a single context
1723
- *
1724
- * @returns A promise that resolves to the merged environment context.
1725
- */
1726
- toEnvironment: () => Promise<EnvironmentContext<TResolvedConfig>>;
1727
- }
1728
- interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1729
- plugin: Plugin<PluginContext<TResolvedConfig>>;
1730
- context: PluginContext<TResolvedConfig>;
1731
- }
1732
- type SelectHookResultItem<TContext extends PluginContext, TKey$1 extends string> = InferHooksListItem<TContext, TKey$1> & {
1733
- context: TContext;
1734
- };
1735
- type SelectHookResult<TContext extends PluginContext, TKey$1 extends string> = SelectHookResultItem<TContext, TKey$1>[];
1736
- interface EnvironmentContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
1737
- /**
1738
- * The expected plugins options for the Powerlines project.
1739
- *
1740
- * @remarks
1741
- * This is a record of plugin identifiers to their respective options. This field is populated by the Powerlines engine during both plugin initialization and the `init` command.
1742
- */
1743
- plugins: EnvironmentContextPlugin<TResolvedConfig>[];
1744
- /**
1745
- * A function to add a plugin to the context and update the configuration options
1746
- */
1747
- addPlugin: (plugin: Plugin<PluginContext<TResolvedConfig>>) => Promise<void>;
1748
- /**
1749
- * The environment specific resolved configuration
1750
- */
1751
- environment: EnvironmentResolvedConfig;
1752
- /**
1753
- * A table holding references to hook functions registered by plugins
1754
- */
1755
- hooks: HooksList<PluginContext<TResolvedConfig>>;
1756
- /**
1757
- * Retrieves the hook handlers for a specific hook name
1758
- */
1759
- selectHooks: <TKey$1 extends string>(key: TKey$1, options?: SelectHooksOptions) => SelectHookResult<PluginContext<TResolvedConfig>, TKey$1>;
1760
- }
1761
- interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1762
- /**
1763
- * The environment specific resolved configuration
1764
- */
1765
- environment: EnvironmentResolvedConfig;
1766
- /**
1767
- * An alternative property name for the {@link log} property
1768
- *
1769
- * @remarks
1770
- * This is provided for compatibility with other logging libraries that expect a `logger` property.
1771
- */
1772
- logger: LogFn;
1773
- }
1774
- type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
1775
- type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
1776
- //#endregion
1777
- //#region ../powerlines/src/types/commands.d.ts
1778
- declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "deploy", "finalize"];
1779
- type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1780
- //#endregion
1781
- //#region ../powerlines/src/internal/helpers/hooks.d.ts
1782
- type CallHookOptions = SelectHooksOptions & (({
1783
- /**
1784
- * Whether to call the hooks sequentially or in parallel.
1785
- *
1786
- * @defaultValue true
1787
- */
1788
- sequential?: true;
1789
- } & ({
1790
- /**
1791
- * How to handle multiple return values from hooks.
1792
- * - "merge": Merge all non-undefined return values (if they are objects).
1793
- * - "first": Return the first non-undefined value.
1794
- *
1795
- * @remarks
1796
- * Merging only works if the return values are objects.
1797
- *
1798
- * @defaultValue "merge"
1799
- */
1800
- result: "first";
1801
- } | {
1802
- /**
1803
- * How to handle multiple return values from hooks.
1804
- * - "merge": Merge all non-undefined return values (if they are objects).
1805
- * - "first": Return the first non-undefined value.
1806
- *
1807
- * @remarks
1808
- * Merging only works if the return values are objects.
1809
- *
1810
- * @defaultValue "merge"
1811
- */
1812
- result?: "merge" | "last";
1813
- /**
1814
- * An indicator specifying if the results of the previous hook should be provided as the **first** parameter of the next hook function, or a function to process the result of the previous hook function and pass the returned value as the next hook's **first** parameter
1815
- */
1816
- asNextParam?: false | ((previousResult: any) => MaybePromise<any>);
1817
- })) | {
1818
- /**
1819
- * Whether to call the hooks sequentially or in parallel.
1820
- */
1821
- sequential: false;
1822
- });
1823
- //#endregion
1824
- //#region ../powerlines/src/types/api.d.ts
1825
- /**
1826
- * Powerlines API Interface
1827
- */
1828
- interface API<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
1829
- /**
1830
- * The Powerlines shared API context
1831
- */
1832
- context: APIContext<TResolvedConfig>;
1833
- /**
1834
- * Prepare the Powerlines API
1835
- *
1836
- * @remarks
1837
- * This method will prepare the Powerlines API for use, initializing any necessary resources.
1838
- *
1839
- * @param inlineConfig - The inline configuration for the prepare command
1840
- */
1841
- prepare: (inlineConfig: PrepareInlineConfig | NewInlineConfig | CleanInlineConfig | BuildInlineConfig | LintInlineConfig | DocsInlineConfig | DeployInlineConfig) => Promise<void>;
1842
- /**
1843
- * Create a new Powerlines project
1844
- *
1845
- * @remarks
1846
- * This method will create a new Powerlines project in the current directory.
1847
- *
1848
- * @param inlineConfig - The inline configuration for the new command
1849
- * @returns A promise that resolves when the project has been created
1850
- */
1851
- new: (inlineConfig: NewInlineConfig) => Promise<void>;
1852
- /**
1853
- * Clean any previously prepared artifacts
1854
- *
1855
- * @remarks
1856
- * This method will remove the previous Powerlines artifacts from the project.
1857
- *
1858
- * @param inlineConfig - The inline configuration for the clean command
1859
- * @returns A promise that resolves when the clean command has completed
1860
- */
1861
- clean: (inlineConfig: CleanInlineConfig | PrepareInlineConfig) => Promise<void>;
1862
- /**
1863
- * Lint the project source code
1864
- *
1865
- * @param inlineConfig - The inline configuration for the lint command
1866
- * @returns A promise that resolves when the lint command has completed
1867
- */
1868
- lint: (inlineConfig: LintInlineConfig) => Promise<void>;
1869
- /**
1870
- * Build the project
1871
- *
1872
- * @remarks
1873
- * This method will build the Powerlines project, generating the necessary artifacts.
1874
- *
1875
- * @param inlineConfig - The inline configuration for the build command
1876
- * @returns A promise that resolves when the build command has completed
1877
- */
1878
- build: (inlineConfig: BuildInlineConfig) => Promise<void>;
1879
- /**
1880
- * Prepare the documentation for the project
1881
- *
1882
- * @param inlineConfig - The inline configuration for the docs command
1883
- * @returns A promise that resolves when the documentation generation has completed
1884
- */
1885
- docs: (inlineConfig: DocsInlineConfig) => Promise<void>;
1886
- /**
1887
- * Deploy the project source code
1888
- *
1889
- * @remarks
1890
- * This method will prepare and build the Powerlines project, generating the necessary artifacts for the deployment.
1891
- *
1892
- * @param inlineConfig - The inline configuration for the deploy command
1893
- */
1894
- deploy: (inlineConfig: DeployInlineConfig) => Promise<void>;
1895
- /**
1896
- * Finalization process
1897
- *
1898
- * @remarks
1899
- * This step includes any final processes or clean up required by Powerlines. It will be run after each Powerlines command.
1900
- *
1901
- * @returns A promise that resolves when the finalization process has completed
1902
- */
1903
- finalize: () => Promise<void>;
1904
- /**
1905
- * Invokes the configured plugin hooks
1906
- *
1907
- * @remarks
1908
- * By default, it will call the `"pre"`, `"normal"`, and `"post"` ordered hooks in sequence
1909
- *
1910
- * @param hook - The hook to call
1911
- * @param options - The options to provide to the hook
1912
- * @param args - The arguments to pass to the hook
1913
- * @returns The result of the hook call
1914
- */
1915
- callHook: <TKey$1 extends string>(hook: TKey$1, options: CallHookOptions & {
1916
- environment?: string | EnvironmentContext<TResolvedConfig>;
1917
- }, ...args: InferHookParameters<PluginContext<TResolvedConfig>, TKey$1>) => Promise<InferHookReturnType<PluginContext<TResolvedConfig>, TKey$1> | undefined>;
1918
- }
1919
- //#endregion
1920
- //#region ../powerlines/src/types/unplugin.d.ts
1921
- interface UnpluginOptions$1<TUnpluginBuilderVariant$1 extends UnpluginBuilderVariant = UnpluginBuilderVariant> extends UnpluginOptions {
1922
- /**
1923
- * An API object that can be used for inter-plugin communication.
1924
- *
1925
- * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
1926
- */
1927
- api: API<InferResolvedConfig<TUnpluginBuilderVariant$1>>;
1928
- }
1929
- type InferUnpluginOptions<TContext extends Context = Context, TBuilderVariant$1 extends BuilderVariant = BuilderVariant, TUnpluginVariant extends InferUnpluginVariant<TBuilderVariant$1> = InferUnpluginVariant<TBuilderVariant$1>> = { [TKey in keyof Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant]]?: Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] extends infer THandler | {
1930
- handler: infer THandler;
1931
- } ? THandler extends ((this: infer TOriginalContext, ...args: infer TArgs) => infer TReturn) ? PluginHook<(this: TOriginalContext & TContext, ...args: TArgs) => MaybePromise<TReturn>, keyof HookFilter> : Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] : Required<UnpluginOptions$1<TUnpluginVariant>>[TUnpluginVariant][TKey] };
1932
- //#endregion
1933
- //#region ../powerlines/src/types/plugin.d.ts
1934
- interface PluginHookObject<THookFunction extends AnyFunction, TFilter extends keyof HookFilter = never> {
1935
- /**
1936
- * The order in which the plugin should be applied.
1937
- */
1938
- order?: "pre" | "post" | null | undefined;
1939
- /**
1940
- * A filter to determine when the hook should be called.
1941
- */
1942
- filter?: Pick<HookFilter, TFilter>;
1943
- /**
1944
- * The hook function to be called.
1945
- */
1946
- handler: THookFunction;
1947
- }
1948
- type PluginHook<THookFunction extends AnyFunction, TFilter extends keyof HookFilter = never> = THookFunction | PluginHookObject<THookFunction, TFilter>;
1949
- /**
1950
- * A result returned by the plugin from the `types` hook that describes the declaration types output file.
1951
- */
1952
- interface TypesResult {
1953
- directives?: string[];
1954
- code: string;
1955
- }
1956
- type PluginHookFunctions<TContext extends PluginContext> = { [TCommandType in CommandType]: (this: TContext) => MaybePromise<void> } & {
1957
- /**
1958
- * A function that returns configuration options to be merged with the build context's options.
1959
- *
1960
- * @remarks
1961
- * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
1962
- *
1963
- * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect.
1964
- *
1965
- * @see https://vitejs.dev/guide/api-plugin#config
1966
- *
1967
- * @param this - The build context.
1968
- * @param config - The partial configuration object to be modified.
1969
- * @returns A promise that resolves to a partial configuration object.
1970
- */
1971
- config: (this: UnresolvedContext<TContext["config"]>) => MaybePromise<DeepPartial<TContext["config"]> & Record<string, any>>;
1972
- /**
1973
- * 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.
1974
- *
1975
- * @remarks
1976
- * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.
1977
- *
1978
- * @see https://vitejs.dev/guide/api-plugin#configenvironment
1979
- *
1980
- * @param this - The build context.
1981
- * @param name - The name of the environment being configured.
1982
- * @param environment - The Vite-like environment object containing information about the current build environment.
1983
- * @returns A promise that resolves when the hook is complete.
1984
- */
1985
- configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
1986
- /**
1987
- * A hook that is called when the plugin is resolved.
1988
- *
1989
- * @see https://vitejs.dev/guide/api-plugin#configresolved
1990
- *
1991
- * @param this - The build context.
1992
- * @returns A promise that resolves when the hook is complete.
1993
- */
1994
- configResolved: (this: TContext) => MaybePromise<void>;
1995
- /**
1996
- * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.
1997
- *
1998
- * @param this - The build context.
1999
- * @param code - The source code to generate types for.
2000
- * @returns A promise that resolves when the hook is complete.
2001
- */
2002
- types: (this: TContext, code: string) => MaybePromise<TypesResult | string | undefined | null>;
2003
- /**
2004
- * A hook that is called at the start of the build process.
2005
- *
2006
- * @param this - The build context and unplugin build context.
2007
- * @returns A promise that resolves when the hook is complete.
2008
- */
2009
- buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
2010
- /**
2011
- * A hook that is called at the end of the build process.
2012
- *
2013
- * @param this - The build context and unplugin build context.
2014
- * @returns A promise that resolves when the hook is complete.
2015
- */
2016
- buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
2017
- /**
2018
- * A hook that is called to transform the source code.
2019
- *
2020
- * @param this - The build context, unplugin build context, and unplugin context.
2021
- * @param code - The source code to transform.
2022
- * @param id - The identifier of the source code.
2023
- * @returns A promise that resolves when the hook is complete.
2024
- */
2025
- transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
2026
- /**
2027
- * A hook that is called to load the source code.
2028
- *
2029
- * @param this - The build context, unplugin build context, and unplugin context.
2030
- * @param id - The identifier of the source code.
2031
- * @returns A promise that resolves when the hook is complete.
2032
- */
2033
- load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<LoadResult>;
2034
- /**
2035
- * A hook that is called to resolve the identifier of the source code.
2036
- *
2037
- * @param this - The build context, unplugin build context, and unplugin context.
2038
- * @param id - The identifier of the source code.
2039
- * @param importer - The importer of the source code.
2040
- * @param options - The options for resolving the identifier.
2041
- * @returns A promise that resolves when the hook is complete.
2042
- */
2043
- resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
2044
- isEntry: boolean;
2045
- }) => MaybePromise<string | ExternalIdResult | null | undefined>;
2046
- /**
2047
- * A hook that is called to write the bundle to disk.
2048
- *
2049
- * @param this - The build context.
2050
- * @returns A promise that resolves when the hook is complete.
2051
- */
2052
- writeBundle: (this: TContext) => MaybePromise<void>;
2053
- };
2054
- type PluginHooks<TContext extends PluginContext> = { [TPluginHook in keyof PluginHookFunctions<TContext>]?: PluginHook<PluginHookFunctions<TContext>[TPluginHook]> } & {
2055
- transform: PluginHook<PluginHookFunctions<TContext>["transform"], "code" | "id">;
2056
- load: PluginHook<PluginHookFunctions<TContext>["load"], "id">;
2057
- resolveId: PluginHook<PluginHookFunctions<TContext>["resolveId"], "id">;
2058
- };
2059
- type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]> };
2060
- type Plugin<TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> = Partial<PluginHooks<TContext>> & {
2061
- /**
2062
- * The name of the plugin, for use in deduplication, error messages and logs.
2063
- */
2064
- name: string;
2065
- /**
2066
- * An API object that can be used for inter-plugin communication.
2067
- *
2068
- * @see https://rollupjs.org/plugin-development/#direct-plugin-communication
2069
- */
2070
- api?: Record<string, any>;
2071
- /**
2072
- * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
2073
- *
2074
- * @remarks
2075
- * The Plugin invocation order is as follows:
2076
- * - `enforce: 'pre'` plugins
2077
- * - `order: 'pre'` plugin hooks
2078
- * - any other plugins (normal)
2079
- * - `order: 'post'` plugin hooks
2080
- * - `enforce: 'post'` plugins
2081
- *
2082
- * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
2083
- * @see https://rollupjs.org/plugin-development/#build-hooks
2084
- * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
2085
- * @see https://esbuild.github.io/plugins/#concepts
2086
- */
2087
- enforce?: "pre" | "post";
2088
- /**
2089
- * A function to determine if two plugins are the same and can be de-duplicated.
2090
- *
2091
- * @remarks
2092
- * If this is not provided, plugins are de-duplicated by comparing their names.
2093
- *
2094
- * @param other - The other plugin to compare against.
2095
- * @returns `true` if the two plugins are the same, `false` otherwise.
2096
- */
2097
- dedupe?: false | ((other: Plugin<any>) => boolean);
2098
- /**
2099
- * A list of pre-requisite plugins that must be loaded before this plugin can be used.
2100
- */
2101
- /**
2102
- * Define environments where this plugin should be active. By default, the plugin is active in all environments.
2103
- *
2104
- * @param environment - The environment to check.
2105
- * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
2106
- */
2107
- applyToEnvironment?: (environment: EnvironmentResolvedConfig) => boolean | PluginConfig<TContext>;
2108
- /**
2109
- * A function that returns configuration options to be merged with the build context's options.
2110
- *
2111
- * @remarks
2112
- * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
2113
- *
2114
- * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
2115
- *
2116
- * @see https://vitejs.dev/guide/api-plugin#config
2117
- *
2118
- * @param this - The build context.
2119
- * @param config - The partial configuration object to be modified.
2120
- * @returns A promise that resolves to a partial configuration object.
2121
- */
2122
- config?: PluginHook<(this: UnresolvedContext<TContext["config"]>) => MaybePromise<DeepPartial<TContext["config"]> & Record<string, any>>> | (DeepPartial<TContext["config"]> & Record<string, any>);
2123
- } & { [TBuilderVariant in BuilderVariant]?: InferUnpluginOptions<TContext, TBuilderVariant> };
2124
- type PluginHookFields<TContext extends PluginContext = PluginContext> = keyof PluginHookFunctions<TContext>;
2125
- import * as import___deepkit_type_compiler_config from "@deepkit/type-compiler/config";
2126
- //#endregion
2127
- //#region ../plugin-tsc/src/types/plugin.d.ts
2128
- type TypeScriptCompilerPluginOptions = Partial<Omit<ts.TranspileOptions, "fileName">> & {
2129
- /**
2130
- * Whether to perform type checking during the `lint` task.
2131
- *
2132
- * @defaultValue false
2133
- */
2134
- typeCheck?: boolean;
2135
- };
2136
- interface TypeScriptCompilerPluginUserConfig extends UserConfig$3 {
2137
- transform: {
2138
- /**
2139
- * TypeScript Compiler transformation options
2140
- */
2141
- tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
2142
- };
2143
- }
2144
- interface TypeScriptCompilerPluginResolvedConfig extends ResolvedConfig {
2145
- transform: {
2146
- /**
2147
- * Resolved TypeScript Compiler transformation options
2148
- */
2149
- tsc: Partial<Omit<TypeScriptCompilerPluginOptions, "typeCheck">> & Required<Pick<TypeScriptCompilerPluginOptions, "typeCheck">>;
2150
- };
2151
- }
2152
- type TypeScriptCompilerPluginContext<TResolvedConfig extends TypeScriptCompilerPluginResolvedConfig = TypeScriptCompilerPluginResolvedConfig> = PluginContext<TResolvedConfig>;
2153
- //#endregion
2154
- //#region src/types/plugin.d.ts
2155
- type DeepkitPluginOptions = Partial<config_d_exports.ReflectionConfig> & TypeScriptCompilerPluginOptions;
2156
- type DeepkitPluginUserConfig = TypeScriptCompilerPluginUserConfig & {
2157
- transform: {
2158
- /**
2159
- * Deepkit transformation options
2160
- */
2161
- deepkit: DeepkitPluginOptions;
2162
- };
2163
- };
2164
- type DeepkitPluginResolvedConfig = TypeScriptCompilerPluginResolvedConfig & {
2165
- transform: {
2166
- /**
2167
- * Resolved deepkit transformation options
2168
- */
2169
- deepkit: Required<DeepkitPluginOptions>;
2170
- };
2171
- };
2172
- type DeepkitPluginContext<TResolvedConfig extends DeepkitPluginResolvedConfig = DeepkitPluginResolvedConfig> = TypeScriptCompilerPluginContext<TResolvedConfig>;
2173
- declare type __ΩDeepkitPluginOptions = any[];
2174
- declare type __ΩDeepkitPluginUserConfig = any[];
2175
- declare type __ΩDeepkitPluginResolvedConfig = any[];
2176
- declare type __ΩDeepkitPluginContext = any[];
2177
- //#endregion
2178
4
  //#region src/index.d.ts
5
+
2179
6
  /**
2180
7
  * Deepkit plugin for Powerlines.
2181
8
  *