@powerlines/core 0.13.12 → 0.13.13
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/constants/api.cjs +16 -0
- package/dist/constants/api.d.cts +5 -0
- package/dist/constants/api.d.cts.map +1 -0
- package/dist/constants/api.d.mts +5 -0
- package/dist/constants/api.d.mts.map +1 -0
- package/dist/constants/api.mjs +16 -0
- package/dist/constants/api.mjs.map +1 -0
- package/dist/constants/commands.cjs +2 -11
- package/dist/constants/commands.d.cts +1 -1
- package/dist/constants/commands.d.cts.map +1 -1
- package/dist/constants/commands.d.mts +1 -1
- package/dist/constants/commands.d.mts.map +1 -1
- package/dist/constants/commands.mjs +3 -11
- package/dist/constants/commands.mjs.map +1 -1
- package/dist/constants/index.cjs +2 -0
- package/dist/constants/index.d.cts +2 -1
- package/dist/constants/index.d.mts +2 -1
- package/dist/constants/index.mjs +2 -1
- package/dist/constants/plugin.d.cts +2 -2
- package/dist/constants/plugin.d.mts +2 -2
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/lib/config.cjs +17 -28
- package/dist/lib/config.d.cts +6 -11
- package/dist/lib/config.d.cts.map +1 -1
- package/dist/lib/config.d.mts +6 -11
- package/dist/lib/config.d.mts.map +1 -1
- package/dist/lib/config.mjs +17 -28
- package/dist/lib/config.mjs.map +1 -1
- package/dist/lib/entry.cjs +4 -4
- package/dist/lib/entry.d.cts.map +1 -1
- package/dist/lib/entry.d.mts.map +1 -1
- package/dist/lib/entry.mjs +4 -4
- package/dist/lib/entry.mjs.map +1 -1
- package/dist/lib/logger.cjs +1 -1
- package/dist/lib/logger.d.cts.map +1 -1
- package/dist/lib/logger.d.mts.map +1 -1
- package/dist/lib/logger.mjs +1 -1
- package/dist/lib/logger.mjs.map +1 -1
- package/dist/lib/unplugin/plugin.cjs +1 -1
- package/dist/lib/unplugin/plugin.mjs +1 -1
- package/dist/lib/unplugin/plugin.mjs.map +1 -1
- package/dist/lib/utilities/format.cjs +3 -3
- package/dist/lib/utilities/format.d.cts.map +1 -1
- package/dist/lib/utilities/format.d.mts.map +1 -1
- package/dist/lib/utilities/format.mjs +3 -3
- package/dist/lib/utilities/format.mjs.map +1 -1
- package/dist/plugin-base.cjs +2 -2
- package/dist/plugin-base.mjs +2 -2
- package/dist/plugin-base.mjs.map +1 -1
- package/dist/plugin-utils/context-helpers.cjs +8 -5
- package/dist/plugin-utils/context-helpers.d.cts +1 -1
- package/dist/plugin-utils/context-helpers.d.cts.map +1 -1
- package/dist/plugin-utils/context-helpers.d.mts +1 -1
- package/dist/plugin-utils/context-helpers.d.mts.map +1 -1
- package/dist/plugin-utils/context-helpers.mjs +8 -5
- package/dist/plugin-utils/context-helpers.mjs.map +1 -1
- package/dist/plugin-utils/format-package-json.cjs +1 -1
- package/dist/plugin-utils/format-package-json.mjs +1 -1
- package/dist/plugin-utils/format-package-json.mjs.map +1 -1
- package/dist/plugin-utils/get-config-path.cjs +32 -32
- package/dist/plugin-utils/get-config-path.mjs +32 -32
- package/dist/plugin-utils/get-config-path.mjs.map +1 -1
- package/dist/plugin-utils/helpers.d.cts +4 -4
- package/dist/plugin-utils/helpers.d.cts.map +1 -1
- package/dist/plugin-utils/helpers.d.mts +4 -4
- package/dist/plugin-utils/helpers.d.mts.map +1 -1
- package/dist/plugin-utils/paths.cjs +1 -1
- package/dist/plugin-utils/paths.mjs +1 -1
- package/dist/plugin-utils/paths.mjs.map +1 -1
- package/dist/types/_internal.d.cts +6 -6
- package/dist/types/_internal.d.cts.map +1 -1
- package/dist/types/_internal.d.mts +6 -6
- package/dist/types/_internal.d.mts.map +1 -1
- package/dist/types/api.d.cts +62 -9
- package/dist/types/api.d.cts.map +1 -1
- package/dist/types/api.d.mts +62 -9
- package/dist/types/api.d.mts.map +1 -1
- package/dist/types/config.d.cts +89 -56
- package/dist/types/config.d.cts.map +1 -1
- package/dist/types/config.d.mts +89 -56
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/context.d.cts +101 -62
- package/dist/types/context.d.cts.map +1 -1
- package/dist/types/context.d.mts +101 -62
- package/dist/types/context.d.mts.map +1 -1
- package/dist/types/index.d.cts +4 -3
- package/dist/types/index.d.mts +4 -3
- package/dist/types/utils.d.cts +9 -0
- package/dist/types/utils.d.cts.map +1 -0
- package/dist/types/utils.d.mts +9 -0
- package/dist/types/utils.d.mts.map +1 -0
- package/package.json +3 -3
package/dist/types/context.d.cts
CHANGED
|
@@ -2,12 +2,11 @@ import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions }
|
|
|
2
2
|
import { Plugin } from "./plugin.cjs";
|
|
3
3
|
import { HooksList, HooksListItem } from "./hooks.cjs";
|
|
4
4
|
import { ParsedTypeScriptConfig } from "./tsconfig.cjs";
|
|
5
|
-
import { EnvironmentResolvedConfig, InlineConfig, LogFn, ResolvedConfig, ResolvedEntryTypeDefinition,
|
|
5
|
+
import { EnvironmentResolvedConfig, InlineConfig, LogFn, LogLevel, ParsedUserConfig, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, UserConfig } from "./config.cjs";
|
|
6
6
|
import { Jiti } from "jiti";
|
|
7
7
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
8
8
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
9
9
|
import { PackageJson } from "@stryke/types/package-json";
|
|
10
|
-
import { Worker } from "jest-worker";
|
|
11
10
|
import MagicString, { SourceMap } from "magic-string";
|
|
12
11
|
import { ParseResult, ParserOptions } from "oxc-parser";
|
|
13
12
|
import { Range } from "semver";
|
|
@@ -16,10 +15,6 @@ import { Unimport } from "unimport";
|
|
|
16
15
|
import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
|
|
17
16
|
|
|
18
17
|
//#region src/types/context.d.ts
|
|
19
|
-
type WorkerProcess<TExposedMethods extends ReadonlyArray<string>> = { [K in TExposedMethods[number]]: (data: any) => Promise<any> } & {
|
|
20
|
-
close: () => void;
|
|
21
|
-
end: () => ReturnType<Worker["end"]>;
|
|
22
|
-
};
|
|
23
18
|
interface MetaInfo {
|
|
24
19
|
/**
|
|
25
20
|
* The checksum generated from the resolved options
|
|
@@ -134,22 +129,36 @@ interface ResolveResult extends ExternalIdResult {
|
|
|
134
129
|
virtual?: boolean;
|
|
135
130
|
}
|
|
136
131
|
/**
|
|
137
|
-
* The
|
|
132
|
+
* The base Powerlines context.
|
|
138
133
|
*
|
|
139
134
|
* @remarks
|
|
140
|
-
* This context
|
|
135
|
+
* This context provides the foundational structure for interacting with the Powerlines engine.
|
|
141
136
|
*/
|
|
142
|
-
interface
|
|
137
|
+
interface BaseContext {
|
|
143
138
|
/**
|
|
144
|
-
* The
|
|
139
|
+
* The options provided to the Powerlines process
|
|
145
140
|
*/
|
|
146
|
-
|
|
141
|
+
options: ResolvedEngineOptions;
|
|
147
142
|
/**
|
|
148
|
-
*
|
|
143
|
+
* The timestamp when the context was initialized
|
|
149
144
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
timestamp: Date;
|
|
146
|
+
/**
|
|
147
|
+
* The Powerlines environment paths
|
|
148
|
+
*/
|
|
149
|
+
envPaths: EnvPaths;
|
|
150
|
+
/**
|
|
151
|
+
* The file system path to the Powerlines package installation
|
|
152
|
+
*/
|
|
153
|
+
powerlinesPath: string;
|
|
154
|
+
/**
|
|
155
|
+
* The parsed user configuration file provided to the Powerlines process before any resolution or merging
|
|
156
|
+
*/
|
|
157
|
+
configFile: ParsedUserConfig;
|
|
158
|
+
/**
|
|
159
|
+
* The log level to use for the Powerlines processes.
|
|
160
|
+
*/
|
|
161
|
+
logLevel: LogLevel | null;
|
|
153
162
|
/**
|
|
154
163
|
* A logging function for the Powerlines engine
|
|
155
164
|
*/
|
|
@@ -193,33 +202,64 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
193
202
|
*/
|
|
194
203
|
timer: (name: string) => () => void;
|
|
195
204
|
/**
|
|
196
|
-
*
|
|
205
|
+
* Create a new logger instance
|
|
206
|
+
*
|
|
207
|
+
* @param name - The name to use for the logger instance
|
|
208
|
+
* @returns A logger function
|
|
197
209
|
*/
|
|
198
|
-
|
|
210
|
+
createLog: (name: string | null) => LogFn;
|
|
199
211
|
/**
|
|
200
|
-
*
|
|
212
|
+
* Extend the current logger instance with a new name
|
|
213
|
+
*
|
|
214
|
+
* @param name - The name to use for the extended logger instance
|
|
215
|
+
* @returns A logger function
|
|
201
216
|
*/
|
|
202
|
-
|
|
217
|
+
extendLog: (name: string) => LogFn;
|
|
203
218
|
/**
|
|
204
|
-
*
|
|
219
|
+
* A function to create a deep clone of the context
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* This function is used to create a copy of the context for a specific environment, allowing for environment-specific modifications without affecting the global context.
|
|
205
223
|
*/
|
|
206
|
-
|
|
224
|
+
clone: () => Promise<BaseContext>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The Powerlines engine context.
|
|
228
|
+
*
|
|
229
|
+
* @remarks
|
|
230
|
+
* This context is used during the execution of the Powerlines engine, providing access to the input user configurations.
|
|
231
|
+
*/
|
|
232
|
+
interface EngineContext extends BaseContext {
|
|
207
233
|
/**
|
|
208
|
-
*
|
|
234
|
+
* A list of API contexts for each configured run instance
|
|
209
235
|
*/
|
|
210
|
-
|
|
236
|
+
executions: ResolvedExecutionOptions[];
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The unresolved Powerlines context.
|
|
240
|
+
*
|
|
241
|
+
* @remarks
|
|
242
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
243
|
+
*/
|
|
244
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends BaseContext {
|
|
211
245
|
/**
|
|
212
|
-
* The
|
|
246
|
+
* The options provided to the Powerlines process
|
|
213
247
|
*/
|
|
214
|
-
|
|
248
|
+
options: ResolvedExecutionOptions;
|
|
215
249
|
/**
|
|
216
|
-
*
|
|
250
|
+
* An object containing the options provided to Powerlines
|
|
217
251
|
*/
|
|
218
|
-
|
|
252
|
+
config: Omit<TResolvedConfig["userConfig"], "output"> & Required<Pick<TResolvedConfig["userConfig"], "output">> & {
|
|
253
|
+
output: TResolvedConfig["output"];
|
|
254
|
+
};
|
|
219
255
|
/**
|
|
220
|
-
* The
|
|
256
|
+
* The metadata information
|
|
221
257
|
*/
|
|
222
|
-
|
|
258
|
+
meta: MetaInfo;
|
|
259
|
+
/**
|
|
260
|
+
* The metadata information currently written to disk
|
|
261
|
+
*/
|
|
262
|
+
persistedMeta?: MetaInfo;
|
|
223
263
|
/**
|
|
224
264
|
* The path to a directory where the reflection data buffers (used by the build processes) are stored
|
|
225
265
|
*/
|
|
@@ -229,17 +269,25 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
229
269
|
*/
|
|
230
270
|
cachePath: string;
|
|
231
271
|
/**
|
|
232
|
-
* The Powerlines
|
|
272
|
+
* The Powerlines artifacts directory
|
|
233
273
|
*/
|
|
234
|
-
|
|
274
|
+
artifactsPath: string;
|
|
235
275
|
/**
|
|
236
|
-
* The
|
|
276
|
+
* The path to the Powerlines builtin runtime modules directory
|
|
237
277
|
*/
|
|
238
|
-
|
|
278
|
+
builtinsPath: string;
|
|
279
|
+
/**
|
|
280
|
+
* The path to the Powerlines entry modules directory
|
|
281
|
+
*/
|
|
282
|
+
entryPath: string;
|
|
283
|
+
/**
|
|
284
|
+
* The path to the Powerlines infrastructure modules directory
|
|
285
|
+
*/
|
|
286
|
+
infrastructurePath: string;
|
|
239
287
|
/**
|
|
240
|
-
* The
|
|
288
|
+
* The path to the Powerlines TypeScript declaration files directory
|
|
241
289
|
*/
|
|
242
|
-
|
|
290
|
+
typesPath: string;
|
|
243
291
|
/**
|
|
244
292
|
* The project's `package.json` file content
|
|
245
293
|
*/
|
|
@@ -425,28 +473,6 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
425
473
|
* @param options - Additional options for writing the infrastructure file
|
|
426
474
|
*/
|
|
427
475
|
emitInfrastructureSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
428
|
-
/**
|
|
429
|
-
* A function to update the context fields using a new user configuration options
|
|
430
|
-
*/
|
|
431
|
-
withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
|
|
432
|
-
/**
|
|
433
|
-
* A function to update the context fields using inline configuration options
|
|
434
|
-
*/
|
|
435
|
-
withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
|
|
436
|
-
/**
|
|
437
|
-
* Create a new logger instance
|
|
438
|
-
*
|
|
439
|
-
* @param name - The name to use for the logger instance
|
|
440
|
-
* @returns A logger function
|
|
441
|
-
*/
|
|
442
|
-
createLog: (name: string | null) => LogFn;
|
|
443
|
-
/**
|
|
444
|
-
* Extend the current logger instance with a new name
|
|
445
|
-
*
|
|
446
|
-
* @param name - The name to use for the extended logger instance
|
|
447
|
-
* @returns A logger function
|
|
448
|
-
*/
|
|
449
|
-
extendLog: (name: string) => LogFn;
|
|
450
476
|
/**
|
|
451
477
|
* Generates a checksum representing the current context state
|
|
452
478
|
*
|
|
@@ -454,11 +480,23 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
454
480
|
*/
|
|
455
481
|
generateChecksum: () => Promise<string>;
|
|
456
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* The resolved Powerlines context.
|
|
485
|
+
*
|
|
486
|
+
* @remarks
|
|
487
|
+
* This context is used after the user configuration has been fully resolved and merged with default values, providing access to the final configuration options and utility functions for interacting with the Powerlines engine.
|
|
488
|
+
*/
|
|
457
489
|
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
458
490
|
/**
|
|
459
491
|
* The fully resolved Powerlines configuration
|
|
460
492
|
*/
|
|
461
493
|
config: TResolvedConfig;
|
|
494
|
+
/**
|
|
495
|
+
* Initialize the context with the provided configuration options
|
|
496
|
+
*
|
|
497
|
+
* @param config - The partial configuration to use for initialization.
|
|
498
|
+
*/
|
|
499
|
+
setup: (config: UserConfig | InlineConfig) => Promise<void>;
|
|
462
500
|
/**
|
|
463
501
|
* A function to create a deep clone of the context
|
|
464
502
|
*
|
|
@@ -467,7 +505,7 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<Unr
|
|
|
467
505
|
*/
|
|
468
506
|
clone: () => Promise<Context<TResolvedConfig>>;
|
|
469
507
|
};
|
|
470
|
-
interface
|
|
508
|
+
interface ExecutionContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
471
509
|
/**
|
|
472
510
|
* The expected plugins options for the Powerlines project.
|
|
473
511
|
*
|
|
@@ -545,7 +583,7 @@ interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> ex
|
|
|
545
583
|
* @remarks
|
|
546
584
|
* This function is used to create a copy of the context for a specific environment, allowing for environment-specific modifications without affecting the global context.
|
|
547
585
|
*/
|
|
548
|
-
clone: () => Promise<
|
|
586
|
+
clone: () => Promise<ExecutionContext<TResolvedConfig>>;
|
|
549
587
|
}
|
|
550
588
|
interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
551
589
|
plugin: Plugin<PluginContext<TResolvedConfig>>;
|
|
@@ -609,7 +647,6 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
609
647
|
}
|
|
610
648
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
611
649
|
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
612
|
-
declare type __ΩWorkerProcess = any[];
|
|
613
650
|
declare type __ΩMetaInfo = any[];
|
|
614
651
|
declare type __ΩResolver = any[];
|
|
615
652
|
declare type __ΩTransformResult = any[];
|
|
@@ -622,9 +659,11 @@ declare type __ΩParseOptions = any[];
|
|
|
622
659
|
declare type __ΩEmitOptions = any[];
|
|
623
660
|
declare type __ΩEmitEntryOptions = any[];
|
|
624
661
|
declare type __ΩResolveResult = any[];
|
|
662
|
+
declare type __ΩBaseContext = any[];
|
|
663
|
+
declare type __ΩEngineContext = any[];
|
|
625
664
|
declare type __ΩUnresolvedContext = any[];
|
|
626
665
|
declare type __ΩContext = any[];
|
|
627
|
-
declare type __Ω
|
|
666
|
+
declare type __ΩExecutionContext = any[];
|
|
628
667
|
declare type __ΩEnvironmentContextPlugin = any[];
|
|
629
668
|
declare type __ΩSelectHookResultItem = any[];
|
|
630
669
|
declare type __ΩSelectHookResult = any[];
|
|
@@ -633,5 +672,5 @@ declare type __ΩPluginContext = any[];
|
|
|
633
672
|
declare type __ΩBuildPluginContext = any[];
|
|
634
673
|
declare type __ΩWithUnpluginBuildContext = any[];
|
|
635
674
|
//#endregion
|
|
636
|
-
export {
|
|
675
|
+
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩFetchOptions, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext };
|
|
637
676
|
//# sourceMappingURL=context.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.cts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;UAwDiB,QAAA;EAAA;;;EAIf,QAAA;EAAA;;;EAKA,OAAA;EAeA;;;EAVA,SAAA;EAkBe;;;EAbf,SAAA;EAagC;;;EARhC,QAAA;EASY;AAGd;;EAPE,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAA;EAChC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GAAA,EAAK,SAAA;AAAA;;;;UAMU,UAAA;EAST;;;EALN,EAAA;EAewB;;AAG1B;EAbE,IAAA,EAAM,WAAA;;;;EAKN,GAAA;EAUwB;;;EALxB,MAAA,GAAS,iBAAA;AAAA;AAAA,KAGC,eAAA,GAAkB,IAAA,CAAK,QAAA;EACjC,WAAA,QAAmB,OAAA;EACnB,aAAA,GAAgB,MAAA,EAAQ,UAAA,KAAe,OAAA,CAAQ,UAAA;EAC/C,qBAAA,QAA6B,OAAA;AAAA;AAAA,UAGd,kBAAA;EACf,KAAA;AAAA;;;;UAMe,kBAAA;EAVqB;;AAGtC;;;EAaE,cAAA;AAAA;AANF;;;AAAA,UAYiB,YAAA,SAAqB,mBAAA;EANtB;AAMhB;;EAIE,SAAA;AAAA;;AAMF;;UAAiB,YAAA,SAAqB,aAAA;EAAA;;AAOtC;EAHE,0BAAA;AAAA;AAAA,UAGe,WAAA,SAAoB,YAAA;EAWd;;;EAPrB,SAAA;EAJ+C;;;EAS/C,eAAA;EAEA,kBAAA,GAAqB,UAAA,CACnB,oBAAA;EAGF,gBAAA,GAAmB,UAAA,CACjB,oBAAA;AAAA;;;;KAOQ,gBAAA,GAAmB,WAAA,GAC7B,IAAA,CAAK,2BA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OAAA,CAAQ,aAAA,CAAc,eAAA;AAAA;AAAA,KAGzB,kBAAA,yBACc,cAAA,GAAiB,cAAA,IACvC,oBAAA,GAAuB,aAAA,CAAc,eAAA;AAAA,KAE7B,wBAAA,kBAA0C,aAAA,IACpD,oBAAA,GAAuB,QAAA;AAAA"}
|
package/dist/types/context.d.mts
CHANGED
|
@@ -2,24 +2,19 @@ import { ResolveOptions, VirtualFile, VirtualFileSystemInterface, WriteOptions }
|
|
|
2
2
|
import { Plugin } from "./plugin.mjs";
|
|
3
3
|
import { HooksList, HooksListItem } from "./hooks.mjs";
|
|
4
4
|
import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
|
|
5
|
-
import { EnvironmentResolvedConfig, InlineConfig, LogFn, ResolvedConfig, ResolvedEntryTypeDefinition,
|
|
5
|
+
import { EnvironmentResolvedConfig, InlineConfig, LogFn, LogLevel, ParsedUserConfig, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, UserConfig } from "./config.mjs";
|
|
6
6
|
import { ExternalIdResult, UnpluginBuildContext, UnpluginContext, UnpluginMessage } from "unplugin";
|
|
7
7
|
import MagicString, { SourceMap } from "magic-string";
|
|
8
8
|
import { Jiti } from "jiti";
|
|
9
9
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
10
10
|
import { FetchRequestOptions } from "@stryke/http/fetch";
|
|
11
11
|
import { PackageJson } from "@stryke/types/package-json";
|
|
12
|
-
import { Worker } from "jest-worker";
|
|
13
12
|
import { ParseResult, ParserOptions } from "oxc-parser";
|
|
14
13
|
import { Range } from "semver";
|
|
15
14
|
import { RequestInfo, Response } from "undici";
|
|
16
15
|
import { Unimport } from "unimport";
|
|
17
16
|
|
|
18
17
|
//#region src/types/context.d.ts
|
|
19
|
-
type WorkerProcess<TExposedMethods extends ReadonlyArray<string>> = { [K in TExposedMethods[number]]: (data: any) => Promise<any> } & {
|
|
20
|
-
close: () => void;
|
|
21
|
-
end: () => ReturnType<Worker["end"]>;
|
|
22
|
-
};
|
|
23
18
|
interface MetaInfo {
|
|
24
19
|
/**
|
|
25
20
|
* The checksum generated from the resolved options
|
|
@@ -134,22 +129,36 @@ interface ResolveResult extends ExternalIdResult {
|
|
|
134
129
|
virtual?: boolean;
|
|
135
130
|
}
|
|
136
131
|
/**
|
|
137
|
-
* The
|
|
132
|
+
* The base Powerlines context.
|
|
138
133
|
*
|
|
139
134
|
* @remarks
|
|
140
|
-
* This context
|
|
135
|
+
* This context provides the foundational structure for interacting with the Powerlines engine.
|
|
141
136
|
*/
|
|
142
|
-
interface
|
|
137
|
+
interface BaseContext {
|
|
143
138
|
/**
|
|
144
|
-
* The
|
|
139
|
+
* The options provided to the Powerlines process
|
|
145
140
|
*/
|
|
146
|
-
|
|
141
|
+
options: ResolvedEngineOptions;
|
|
147
142
|
/**
|
|
148
|
-
*
|
|
143
|
+
* The timestamp when the context was initialized
|
|
149
144
|
*/
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
145
|
+
timestamp: Date;
|
|
146
|
+
/**
|
|
147
|
+
* The Powerlines environment paths
|
|
148
|
+
*/
|
|
149
|
+
envPaths: EnvPaths;
|
|
150
|
+
/**
|
|
151
|
+
* The file system path to the Powerlines package installation
|
|
152
|
+
*/
|
|
153
|
+
powerlinesPath: string;
|
|
154
|
+
/**
|
|
155
|
+
* The parsed user configuration file provided to the Powerlines process before any resolution or merging
|
|
156
|
+
*/
|
|
157
|
+
configFile: ParsedUserConfig;
|
|
158
|
+
/**
|
|
159
|
+
* The log level to use for the Powerlines processes.
|
|
160
|
+
*/
|
|
161
|
+
logLevel: LogLevel | null;
|
|
153
162
|
/**
|
|
154
163
|
* A logging function for the Powerlines engine
|
|
155
164
|
*/
|
|
@@ -193,33 +202,64 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
193
202
|
*/
|
|
194
203
|
timer: (name: string) => () => void;
|
|
195
204
|
/**
|
|
196
|
-
*
|
|
205
|
+
* Create a new logger instance
|
|
206
|
+
*
|
|
207
|
+
* @param name - The name to use for the logger instance
|
|
208
|
+
* @returns A logger function
|
|
197
209
|
*/
|
|
198
|
-
|
|
210
|
+
createLog: (name: string | null) => LogFn;
|
|
199
211
|
/**
|
|
200
|
-
*
|
|
212
|
+
* Extend the current logger instance with a new name
|
|
213
|
+
*
|
|
214
|
+
* @param name - The name to use for the extended logger instance
|
|
215
|
+
* @returns A logger function
|
|
201
216
|
*/
|
|
202
|
-
|
|
217
|
+
extendLog: (name: string) => LogFn;
|
|
203
218
|
/**
|
|
204
|
-
*
|
|
219
|
+
* A function to create a deep clone of the context
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* This function is used to create a copy of the context for a specific environment, allowing for environment-specific modifications without affecting the global context.
|
|
205
223
|
*/
|
|
206
|
-
|
|
224
|
+
clone: () => Promise<BaseContext>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The Powerlines engine context.
|
|
228
|
+
*
|
|
229
|
+
* @remarks
|
|
230
|
+
* This context is used during the execution of the Powerlines engine, providing access to the input user configurations.
|
|
231
|
+
*/
|
|
232
|
+
interface EngineContext extends BaseContext {
|
|
207
233
|
/**
|
|
208
|
-
*
|
|
234
|
+
* A list of API contexts for each configured run instance
|
|
209
235
|
*/
|
|
210
|
-
|
|
236
|
+
executions: ResolvedExecutionOptions[];
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The unresolved Powerlines context.
|
|
240
|
+
*
|
|
241
|
+
* @remarks
|
|
242
|
+
* This context is used before the user configuration has been fully resolved after the `config`.
|
|
243
|
+
*/
|
|
244
|
+
interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends BaseContext {
|
|
211
245
|
/**
|
|
212
|
-
* The
|
|
246
|
+
* The options provided to the Powerlines process
|
|
213
247
|
*/
|
|
214
|
-
|
|
248
|
+
options: ResolvedExecutionOptions;
|
|
215
249
|
/**
|
|
216
|
-
*
|
|
250
|
+
* An object containing the options provided to Powerlines
|
|
217
251
|
*/
|
|
218
|
-
|
|
252
|
+
config: Omit<TResolvedConfig["userConfig"], "output"> & Required<Pick<TResolvedConfig["userConfig"], "output">> & {
|
|
253
|
+
output: TResolvedConfig["output"];
|
|
254
|
+
};
|
|
219
255
|
/**
|
|
220
|
-
* The
|
|
256
|
+
* The metadata information
|
|
221
257
|
*/
|
|
222
|
-
|
|
258
|
+
meta: MetaInfo;
|
|
259
|
+
/**
|
|
260
|
+
* The metadata information currently written to disk
|
|
261
|
+
*/
|
|
262
|
+
persistedMeta?: MetaInfo;
|
|
223
263
|
/**
|
|
224
264
|
* The path to a directory where the reflection data buffers (used by the build processes) are stored
|
|
225
265
|
*/
|
|
@@ -229,17 +269,25 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
229
269
|
*/
|
|
230
270
|
cachePath: string;
|
|
231
271
|
/**
|
|
232
|
-
* The Powerlines
|
|
272
|
+
* The Powerlines artifacts directory
|
|
233
273
|
*/
|
|
234
|
-
|
|
274
|
+
artifactsPath: string;
|
|
235
275
|
/**
|
|
236
|
-
* The
|
|
276
|
+
* The path to the Powerlines builtin runtime modules directory
|
|
237
277
|
*/
|
|
238
|
-
|
|
278
|
+
builtinsPath: string;
|
|
279
|
+
/**
|
|
280
|
+
* The path to the Powerlines entry modules directory
|
|
281
|
+
*/
|
|
282
|
+
entryPath: string;
|
|
283
|
+
/**
|
|
284
|
+
* The path to the Powerlines infrastructure modules directory
|
|
285
|
+
*/
|
|
286
|
+
infrastructurePath: string;
|
|
239
287
|
/**
|
|
240
|
-
* The
|
|
288
|
+
* The path to the Powerlines TypeScript declaration files directory
|
|
241
289
|
*/
|
|
242
|
-
|
|
290
|
+
typesPath: string;
|
|
243
291
|
/**
|
|
244
292
|
* The project's `package.json` file content
|
|
245
293
|
*/
|
|
@@ -425,28 +473,6 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
425
473
|
* @param options - Additional options for writing the infrastructure file
|
|
426
474
|
*/
|
|
427
475
|
emitInfrastructureSync: (code: string, id: string, options?: EmitOptions) => void;
|
|
428
|
-
/**
|
|
429
|
-
* A function to update the context fields using a new user configuration options
|
|
430
|
-
*/
|
|
431
|
-
withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
|
|
432
|
-
/**
|
|
433
|
-
* A function to update the context fields using inline configuration options
|
|
434
|
-
*/
|
|
435
|
-
withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
|
|
436
|
-
/**
|
|
437
|
-
* Create a new logger instance
|
|
438
|
-
*
|
|
439
|
-
* @param name - The name to use for the logger instance
|
|
440
|
-
* @returns A logger function
|
|
441
|
-
*/
|
|
442
|
-
createLog: (name: string | null) => LogFn;
|
|
443
|
-
/**
|
|
444
|
-
* Extend the current logger instance with a new name
|
|
445
|
-
*
|
|
446
|
-
* @param name - The name to use for the extended logger instance
|
|
447
|
-
* @returns A logger function
|
|
448
|
-
*/
|
|
449
|
-
extendLog: (name: string) => LogFn;
|
|
450
476
|
/**
|
|
451
477
|
* Generates a checksum representing the current context state
|
|
452
478
|
*
|
|
@@ -454,11 +480,23 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
454
480
|
*/
|
|
455
481
|
generateChecksum: () => Promise<string>;
|
|
456
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* The resolved Powerlines context.
|
|
485
|
+
*
|
|
486
|
+
* @remarks
|
|
487
|
+
* This context is used after the user configuration has been fully resolved and merged with default values, providing access to the final configuration options and utility functions for interacting with the Powerlines engine.
|
|
488
|
+
*/
|
|
457
489
|
type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<UnresolvedContext<TResolvedConfig>, "config"> & {
|
|
458
490
|
/**
|
|
459
491
|
* The fully resolved Powerlines configuration
|
|
460
492
|
*/
|
|
461
493
|
config: TResolvedConfig;
|
|
494
|
+
/**
|
|
495
|
+
* Initialize the context with the provided configuration options
|
|
496
|
+
*
|
|
497
|
+
* @param config - The partial configuration to use for initialization.
|
|
498
|
+
*/
|
|
499
|
+
setup: (config: UserConfig | InlineConfig) => Promise<void>;
|
|
462
500
|
/**
|
|
463
501
|
* A function to create a deep clone of the context
|
|
464
502
|
*
|
|
@@ -467,7 +505,7 @@ type Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = Omit<Unr
|
|
|
467
505
|
*/
|
|
468
506
|
clone: () => Promise<Context<TResolvedConfig>>;
|
|
469
507
|
};
|
|
470
|
-
interface
|
|
508
|
+
interface ExecutionContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig> {
|
|
471
509
|
/**
|
|
472
510
|
* The expected plugins options for the Powerlines project.
|
|
473
511
|
*
|
|
@@ -545,7 +583,7 @@ interface APIContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> ex
|
|
|
545
583
|
* @remarks
|
|
546
584
|
* This function is used to create a copy of the context for a specific environment, allowing for environment-specific modifications without affecting the global context.
|
|
547
585
|
*/
|
|
548
|
-
clone: () => Promise<
|
|
586
|
+
clone: () => Promise<ExecutionContext<TResolvedConfig>>;
|
|
549
587
|
}
|
|
550
588
|
interface EnvironmentContextPlugin<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
|
|
551
589
|
plugin: Plugin<PluginContext<TResolvedConfig>>;
|
|
@@ -609,7 +647,6 @@ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedCon
|
|
|
609
647
|
}
|
|
610
648
|
type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = UnpluginBuildContext & PluginContext<TResolvedConfig>;
|
|
611
649
|
type WithUnpluginBuildContext<TContext extends PluginContext> = UnpluginBuildContext & TContext;
|
|
612
|
-
declare type __ΩWorkerProcess = any[];
|
|
613
650
|
declare type __ΩMetaInfo = any[];
|
|
614
651
|
declare type __ΩResolver = any[];
|
|
615
652
|
declare type __ΩTransformResult = any[];
|
|
@@ -622,9 +659,11 @@ declare type __ΩParseOptions = any[];
|
|
|
622
659
|
declare type __ΩEmitOptions = any[];
|
|
623
660
|
declare type __ΩEmitEntryOptions = any[];
|
|
624
661
|
declare type __ΩResolveResult = any[];
|
|
662
|
+
declare type __ΩBaseContext = any[];
|
|
663
|
+
declare type __ΩEngineContext = any[];
|
|
625
664
|
declare type __ΩUnresolvedContext = any[];
|
|
626
665
|
declare type __ΩContext = any[];
|
|
627
|
-
declare type __Ω
|
|
666
|
+
declare type __ΩExecutionContext = any[];
|
|
628
667
|
declare type __ΩEnvironmentContextPlugin = any[];
|
|
629
668
|
declare type __ΩSelectHookResultItem = any[];
|
|
630
669
|
declare type __ΩSelectHookResult = any[];
|
|
@@ -633,5 +672,5 @@ declare type __ΩPluginContext = any[];
|
|
|
633
672
|
declare type __ΩBuildPluginContext = any[];
|
|
634
673
|
declare type __ΩWithUnpluginBuildContext = any[];
|
|
635
674
|
//#endregion
|
|
636
|
-
export {
|
|
675
|
+
export { BaseContext, BuildPluginContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EnvironmentContext, EnvironmentContextPlugin, ExecutionContext, FetchOptions, InitContextOptions, MetaInfo, ParseOptions, PluginContext, ResolveResult, Resolver, SelectHookResult, SelectHookResultItem, SelectHooksOptions, SourceFile, TransformResult$1 as TransformResult, UnimportContext, UnresolvedContext, WithUnpluginBuildContext, __ΩBaseContext, __ΩBuildPluginContext, __ΩContext, __ΩEmitEntryOptions, __ΩEmitOptions, __ΩEngineContext, __ΩEnvironmentContext, __ΩEnvironmentContextPlugin, __ΩExecutionContext, __ΩFetchOptions, __ΩInitContextOptions, __ΩMetaInfo, __ΩParseOptions, __ΩPluginContext, __ΩResolveResult, __ΩResolver, __ΩSelectHookResult, __ΩSelectHookResultItem, __ΩSelectHooksOptions, __ΩSourceFile, __ΩTransformResult, __ΩUnimportContext, __ΩUnresolvedContext, __ΩWithUnpluginBuildContext };
|
|
637
676
|
//# sourceMappingURL=context.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.d.mts","names":[],"sources":["../../src/types/context.ts"],"mappings":";;;;;;;;;;;;;;;;;UAwDiB,QAAA;EAAA;;;EAIf,QAAA;EAAA;;;EAKA,OAAA;EAeA;;;EAVA,SAAA;EAkBe;;;EAbf,SAAA;EAagC;;;EARhC,QAAA;EASY;AAGd;;EAPE,UAAA;AAAA;AAAA,UAGe,QAAA,SAAiB,IAAA;EAChC,MAAA,EAAQ,IAAA;AAAA;AAAA,UAGO,iBAAA;EACf,IAAA;EACA,GAAA,EAAK,SAAA;AAAA;;;;UAMU,UAAA;EAST;;;EALN,EAAA;EAewB;;AAG1B;EAbE,IAAA,EAAM,WAAA;;;;EAKN,GAAA;EAUwB;;;EALxB,MAAA,GAAS,iBAAA;AAAA;AAAA,KAGC,eAAA,GAAkB,IAAA,CAAK,QAAA;EACjC,WAAA,QAAmB,OAAA;EACnB,aAAA,GAAgB,MAAA,EAAQ,UAAA,KAAe,OAAA,CAAQ,UAAA;EAC/C,qBAAA,QAA6B,OAAA;AAAA;AAAA,UAGd,kBAAA;EACf,KAAA;AAAA;;;;UAMe,kBAAA;EAVqB;;AAGtC;;;EAaE,cAAA;AAAA;AANF;;;AAAA,UAYiB,YAAA,SAAqB,mBAAA;EANtB;AAMhB;;EAIE,SAAA;AAAA;;AAMF;;UAAiB,YAAA,SAAqB,aAAA;EAAA;;AAOtC;EAHE,0BAAA;AAAA;AAAA,UAGe,WAAA,SAAoB,YAAA;EAWd;;;EAPrB,SAAA;EAJ+C;;;EAS/C,eAAA;EAEA,kBAAA,GAAqB,UAAA,CACnB,oBAAA;EAGF,gBAAA,GAAmB,UAAA,CACjB,oBAAA;AAAA;;;;KAOQ,gBAAA,GAAmB,WAAA,GAC7B,IAAA,CAAK,2BAAA;AAAA,UAEU,aAAA,SAAsB,gBAAA;EAVf;AAOxB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