@powerlines/engine 0.43.31 → 0.44.1
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/_internal/worker.cjs +187 -169
- package/dist/_internal/worker.d.cts.map +1 -1
- package/dist/_internal/worker.d.mts.map +1 -1
- package/dist/_internal/worker.mjs +188 -170
- package/dist/_internal/worker.mjs.map +1 -1
- package/dist/api.cjs +6 -5
- package/dist/api.d.cts.map +1 -1
- package/dist/api.d.mts.map +1 -1
- package/dist/api.mjs +4 -3
- package/dist/api.mjs.map +1 -1
- package/dist/{base-context-CPoqO4io.cjs → base-context-DkGTyGX0.cjs} +34 -44
- package/dist/{base-context-SmQ6OfXm.mjs → base-context-Dv5OTHxZ.mjs} +35 -45
- package/dist/base-context-Dv5OTHxZ.mjs.map +1 -0
- package/dist/context/index.cjs +3 -3
- package/dist/context/index.d.cts +40 -36
- package/dist/context/index.d.cts.map +1 -1
- package/dist/context/index.d.mts +40 -36
- package/dist/context/index.d.mts.map +1 -1
- package/dist/context/index.mjs +3 -3
- package/dist/{engine-context-CEu21ZZf.cjs → engine-context-CDSR7PHF.cjs} +1 -1
- package/dist/{engine-context-D7CWyTsr.mjs → engine-context-CytME-Ht.mjs} +2 -2
- package/dist/{engine-context-D7CWyTsr.mjs.map → engine-context-CytME-Ht.mjs.map} +1 -1
- package/dist/{execution-context-DsT6s1du.cjs → execution-context-B-CVP76S.cjs} +148 -105
- package/dist/{execution-context-C_7IC8er.mjs → execution-context-F7RyGqff.mjs} +150 -107
- package/dist/execution-context-F7RyGqff.mjs.map +1 -0
- package/dist/index.cjs +8 -12
- package/dist/index.mjs +8 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/dist/base-context-SmQ6OfXm.mjs.map +0 -1
- package/dist/execution-context-C_7IC8er.mjs.map +0 -1
package/dist/context/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { EnvPaths } from "@stryke/env/get-env-paths";
|
|
2
|
-
import { BaseContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EngineOptions, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, ExecutionState, FetchOptions, HooksList, InlineConfig, LogFn, LogLevel, Logger, MetaInfo, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, Plugin, PluginContext, ResolveOptions, ResolveResult, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, Resolver, SelectHookResult, SelectHooksOptions, TransformResult, VirtualFile, VirtualFileSystemInterface } from "@powerlines/core";
|
|
3
2
|
import { FlatCache } from "flat-cache";
|
|
4
3
|
import { ParseResult } from "oxc-parser";
|
|
5
4
|
import { RequestInfo, Response } from "undici";
|
|
6
|
-
import {
|
|
5
|
+
import { BaseContext, Context, EmitEntryOptions, EmitOptions, EngineContext, EngineOptions, EnvironmentContext, EnvironmentContextPlugin, EnvironmentResolvedConfig, ExecutionContext, ExecutionOptions, ExecutionState, FetchOptions, HooksList, InlineConfig, LogLevelResolvedConfig, LogMessage, Logger, LoggerMessage, LoggerOptions, MetaInfo, ParseOptions, ParsedTypeScriptConfig, ParsedUserConfig, Plugin, PluginContext, ResolveOptions, ResolveResult, ResolvedConfig, ResolvedEngineOptions, ResolvedEntryTypeDefinition, ResolvedExecutionOptions, Resolver, SelectHookResult, SelectHooksOptions, TransformResult, VirtualFile, VirtualFileSystemInterface } from "@powerlines/core";
|
|
7
6
|
import { Unstable_ContextInternal, Unstable_EnvironmentContext, Unstable_PluginContext } from "@powerlines/core/types/_internal";
|
|
8
7
|
import { PackageJson } from "@stryke/types/package-json";
|
|
9
8
|
import { Range } from "semver";
|
|
@@ -32,15 +31,14 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
32
31
|
*/
|
|
33
32
|
configFile: ParsedUserConfig;
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
34
|
+
* The logger instance for the context, which can be used to create log messages with consistent formatting and metadata. This logger is extended by plugin contexts to include additional metadata such as the plugin name and category, which can be used to filter and format log messages in a more granular way.
|
|
36
35
|
*/
|
|
37
|
-
get
|
|
38
|
-
get logLevel(): LogLevel | null;
|
|
39
|
-
set logLevel(level: LogLevel | null);
|
|
36
|
+
get logger(): Logger;
|
|
40
37
|
/**
|
|
41
|
-
*
|
|
38
|
+
* A timestamp representing when the context was initialized
|
|
42
39
|
*/
|
|
43
|
-
get
|
|
40
|
+
get timestamp(): number;
|
|
41
|
+
get logLevel(): LogLevelResolvedConfig;
|
|
44
42
|
/**
|
|
45
43
|
* The environment paths for the project
|
|
46
44
|
*/
|
|
@@ -59,37 +57,37 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
59
57
|
*
|
|
60
58
|
* @param message - The message to log.
|
|
61
59
|
*/
|
|
62
|
-
fatal(message: string |
|
|
60
|
+
fatal(message: string | LogMessage): void;
|
|
63
61
|
/**
|
|
64
62
|
* A logging function for error messages
|
|
65
63
|
*
|
|
66
64
|
* @param message - The message to log.
|
|
67
65
|
*/
|
|
68
|
-
error(message: string |
|
|
66
|
+
error(message: string | LogMessage): void;
|
|
69
67
|
/**
|
|
70
68
|
* A logging function for warning messages
|
|
71
69
|
*
|
|
72
70
|
* @param message - The message to log.
|
|
73
71
|
*/
|
|
74
|
-
warn(message: string |
|
|
72
|
+
warn(message: string | LogMessage): void;
|
|
75
73
|
/**
|
|
76
74
|
* A logging function for informational messages
|
|
77
75
|
*
|
|
78
76
|
* @param message - The message to log.
|
|
79
77
|
*/
|
|
80
|
-
info(message: string |
|
|
78
|
+
info(message: string | LogMessage): void;
|
|
81
79
|
/**
|
|
82
80
|
* A logging function for debug messages
|
|
83
81
|
*
|
|
84
82
|
* @param message - The message to log.
|
|
85
83
|
*/
|
|
86
|
-
debug(message: string |
|
|
84
|
+
debug(message: string | LogMessage): void;
|
|
87
85
|
/**
|
|
88
86
|
* A logging function for trace messages
|
|
89
87
|
*
|
|
90
88
|
* @param message - The message to log.
|
|
91
89
|
*/
|
|
92
|
-
trace(message: string |
|
|
90
|
+
trace(message: string | LogMessage): void;
|
|
93
91
|
/**
|
|
94
92
|
* A function to create a timer for measuring the duration of asynchronous operations
|
|
95
93
|
*
|
|
@@ -107,21 +105,17 @@ declare class PowerlinesBaseContext implements BaseContext {
|
|
|
107
105
|
/**
|
|
108
106
|
* Create a new logger instance
|
|
109
107
|
*
|
|
110
|
-
* @param
|
|
111
|
-
* @returns A logger
|
|
108
|
+
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
109
|
+
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
112
110
|
*/
|
|
113
|
-
|
|
111
|
+
createLogger(options: LoggerOptions, callback?: (message: string | LoggerMessage) => void): Logger;
|
|
114
112
|
/**
|
|
115
|
-
* Extend the
|
|
113
|
+
* Extend the base logger with additional configuration options
|
|
116
114
|
*
|
|
117
|
-
* @param
|
|
118
|
-
* @returns A logger
|
|
115
|
+
* @param options - The configuration options to extend the base logger with, which can be used to add additional metadata or customize the appearance of log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance, as well as any additional metadata such as the plugin category or environment.
|
|
116
|
+
* @returns A new logger client instance that extends the base logger with the provided configuration options.
|
|
119
117
|
*/
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* A logger function specific to this context
|
|
123
|
-
*/
|
|
124
|
-
protected logger: Logger;
|
|
118
|
+
extendLogger(options: LoggerOptions): Logger;
|
|
125
119
|
/**
|
|
126
120
|
* Initialize the context with the provided configuration options
|
|
127
121
|
*
|
|
@@ -264,6 +258,10 @@ declare class PowerlinesContext<TResolvedConfig extends ResolvedConfig = Resolve
|
|
|
264
258
|
* This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
|
|
265
259
|
*/
|
|
266
260
|
get alias(): Record<string, string>;
|
|
261
|
+
/**
|
|
262
|
+
* The logger instance for the context, which can be used to create log messages with consistent formatting and metadata. This logger is extended by plugin contexts to include additional metadata such as the plugin name and category, which can be used to filter and format log messages in a more granular way.
|
|
263
|
+
*/
|
|
264
|
+
get logger(): Logger;
|
|
267
265
|
/**
|
|
268
266
|
* Gets the parser cache.
|
|
269
267
|
*/
|
|
@@ -516,18 +514,17 @@ declare class PowerlinesEnvironmentContext<TResolvedConfig extends ResolvedConfi
|
|
|
516
514
|
/**
|
|
517
515
|
* Create a new logger instance
|
|
518
516
|
*
|
|
519
|
-
* @param
|
|
520
|
-
* @returns A logger
|
|
517
|
+
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
518
|
+
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
521
519
|
*/
|
|
522
|
-
|
|
520
|
+
createLogger(options: LoggerOptions, callback?: (message: string | LoggerMessage) => void): Logger;
|
|
523
521
|
/**
|
|
524
|
-
* Extend the
|
|
522
|
+
* Extend the base logger with additional configuration options
|
|
525
523
|
*
|
|
526
|
-
* @param
|
|
527
|
-
* @
|
|
528
|
-
* @returns A logger function
|
|
524
|
+
* @param options - The configuration options to extend the base logger with, which can be used to add additional metadata or customize the appearance of log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance, as well as any additional metadata such as the plugin category or environment.
|
|
525
|
+
* @returns A new logger client instance that extends the base logger with the provided configuration options.
|
|
529
526
|
*/
|
|
530
|
-
|
|
527
|
+
extendLogger(options: LoggerOptions): Logger;
|
|
531
528
|
/**
|
|
532
529
|
* Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.
|
|
533
530
|
*
|
|
@@ -611,10 +608,17 @@ declare class PowerlinesExecutionContext<TResolvedConfig extends ResolvedConfig
|
|
|
611
608
|
/**
|
|
612
609
|
* Create a new logger instance
|
|
613
610
|
*
|
|
614
|
-
* @param
|
|
615
|
-
* @returns A logger
|
|
611
|
+
* @param options - The configuration options to use for the logger instance, which can be used to customize the appearance and behavior of the log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance.
|
|
612
|
+
* @returns A logger client instance that can be used to generate log messages with consistent formatting and metadata.
|
|
613
|
+
*/
|
|
614
|
+
createLogger(options: LoggerOptions, callback?: (message: string | LoggerMessage) => void): Logger;
|
|
615
|
+
/**
|
|
616
|
+
* Extend the base logger with additional configuration options
|
|
617
|
+
*
|
|
618
|
+
* @param options - The configuration options to extend the base logger with, which can be used to add additional metadata or customize the appearance of log messages generated by the logger. This is typically the name of the plugin or module that is creating the logger instance, as well as any additional metadata such as the plugin category or environment.
|
|
619
|
+
* @returns A new logger client instance that extends the base logger with the provided configuration options.
|
|
616
620
|
*/
|
|
617
|
-
|
|
621
|
+
extendLogger(options: LoggerOptions): Logger;
|
|
618
622
|
/**
|
|
619
623
|
* Creates a clone of the current context with the same configuration and workspace settings. This can be useful for running multiple builds in parallel or for creating isolated contexts for different parts of the build process.
|
|
620
624
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/context/base-context.ts","../../src/context/context.ts","../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/execution-context.ts","../../src/context/plugin-context.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/context/base-context.ts","../../src/context/context.ts","../../src/context/engine-context.ts","../../src/context/environment-context.ts","../../src/context/execution-context.ts","../../src/context/plugin-context.ts"],"mappings":";;;;;;;;;;cA+Ca,qBAAA,YAAiC,WAAA;EAAA;;;;EAMrC,cAAA;;;AANT;EAWS,QAAA,EAAW,QAAA;;;;EAKX,OAAA,EAAU,qBAAA;EAKI;;;EAAd,YAAA,EAAc,OAAA,CAAQ,aAAA;EA4BN;;;EAvBhB,UAAA,EAAa,gBAAA;EA8DW;;;EAAA,IAzDpB,MAAA,CAAA,GAAU,MAAA;EAqGU;;;EAAA,IA9FpB,SAAA,CAAA;EAAA,I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Aa,OAAA,EAAS,aAAA,GAAgB,MAAA;EJhFvB;;;;;;;;EIgGT,KAAA,CAAA,GAAS,OAAA,CAAQ,gBAAA,CAAiB,eAAA;EJ/DzB;;;;;;EIyFlB,EAAA,CACX,WAAA,EAAa,yBAAA,GACZ,OAAA,CAAQ,2BAAA,CAA4B,eAAA;EJpChC;;;EI+De,KAAA,CAAA,GAAK,OAAA;EJ7Db;;;;;EImFD,SAAA,CAAU,MAAA,EAAQ,MAAA,CAAO,aAAA,CAAc,eAAA,KAAiB,OAAA;EJpExB;;;;;;EIoFhC,cAAA,CAAe,IAAA,YAAa,OAAA,CAAA,kBAAA,CAAA,eAAA;EJxEgB;;;;AC7G3D;;EG4Ne,kBAAA,CACX,IAAA,YACC,OAAA,CAAQ,kBAAA,CAAmB,eAAA;EH7NN;;;;;;;;EG6OX,aAAA,CAAA,GAAiB,OAAA,CAAQ,kBAAA,CAAmB,eAAA;AAAA;;;;;;;;;;;iBCnV3C,mBAAA,yBACU,cAAA,GAAiB,cAAA,CAAA,CAEzC,QAAA,UACA,MAAA,EAAQ,MAAA,CAAO,aAAA,CAAc,eAAA,IAC7B,WAAA,EAAa,2BAAA,CAA4B,eAAA,IACxC,sBAAA,CAAuB,eAAA"}
|
package/dist/context/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as PowerlinesBaseContext } from "../base-context-
|
|
2
|
-
import { t as PowerlinesEngineContext } from "../engine-context-
|
|
3
|
-
import { n as PowerlinesEnvironmentContext, o as PowerlinesContext, r as createPluginContext, t as PowerlinesExecutionContext } from "../execution-context-
|
|
1
|
+
import { t as PowerlinesBaseContext } from "../base-context-Dv5OTHxZ.mjs";
|
|
2
|
+
import { t as PowerlinesEngineContext } from "../engine-context-CytME-Ht.mjs";
|
|
3
|
+
import { n as PowerlinesEnvironmentContext, o as PowerlinesContext, r as createPluginContext, t as PowerlinesExecutionContext } from "../execution-context-F7RyGqff.mjs";
|
|
4
4
|
|
|
5
5
|
export { PowerlinesBaseContext, PowerlinesContext, PowerlinesEngineContext, PowerlinesEnvironmentContext, PowerlinesExecutionContext, createPluginContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-C0xms8kb.cjs');
|
|
2
|
-
const require_base_context = require('./base-context-
|
|
2
|
+
const require_base_context = require('./base-context-DkGTyGX0.cjs');
|
|
3
3
|
let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
|
|
4
4
|
|
|
5
5
|
//#region src/context/engine-context.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PowerlinesBaseContext } from "./base-context-
|
|
1
|
+
import { t as PowerlinesBaseContext } from "./base-context-Dv5OTHxZ.mjs";
|
|
2
2
|
import { uuid } from "@stryke/unique-id/uuid";
|
|
3
3
|
|
|
4
4
|
//#region src/context/engine-context.ts
|
|
@@ -63,4 +63,4 @@ var PowerlinesEngineContext = class PowerlinesEngineContext extends PowerlinesBa
|
|
|
63
63
|
|
|
64
64
|
//#endregion
|
|
65
65
|
export { PowerlinesEngineContext as t };
|
|
66
|
-
//# sourceMappingURL=engine-context-
|
|
66
|
+
//# sourceMappingURL=engine-context-CytME-Ht.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-context-
|
|
1
|
+
{"version":3,"file":"engine-context-CytME-Ht.mjs","names":["#executions"],"sources":["../src/context/engine-context.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type {\n EngineContext,\n EngineOptions,\n ExecutionState\n} from \"@powerlines/core\";\nimport { uuid } from \"@stryke/unique-id/uuid\";\nimport { PowerlinesBaseContext } from \"./base-context\";\n\nexport class PowerlinesEngineContext\n extends PowerlinesBaseContext\n implements EngineContext\n{\n #executions: ExecutionState[] = [];\n\n /**\n * Creates a new instance of the PowerlinesEngineContext class.\n *\n * @param options - The options to initialize the context with.\n * @returns A promise that resolves to an instance of the PowerlinesEngineContext class.\n */\n public static async fromOptions(\n options: EngineOptions\n ): Promise<PowerlinesEngineContext> {\n const context = new PowerlinesEngineContext();\n await context.init(options);\n\n if (!context.configFile?.config) {\n context.fatal(\n \"No configuration file found. Please ensure you have a valid configuration file in your project.\"\n );\n throw new Error(\"No configuration file found\");\n }\n\n if (Array.isArray(context.configFile.config)) {\n context.#executions = await Promise.all(\n context.configFile.config.map(async (_, executionIndex) => {\n const executionId = uuid();\n\n return {\n executionId,\n options: { ...context.options, executionId, executionIndex },\n active: {\n command: null,\n hook: null,\n plugin: null\n }\n };\n })\n );\n } else {\n const executionId = uuid();\n context.#executions = [\n {\n executionId,\n options: { ...context.options, executionId, executionIndex: 0 },\n active: {\n command: null,\n hook: null,\n plugin: null\n }\n }\n ];\n }\n\n return context;\n }\n\n /**\n * A list of all command executions that will be run during the lifecycle of the engine\n *\n * @returns An array of {@link ExecutionState} representing each execution context for the engine.\n */\n public get executions(): ExecutionState[] {\n return this.#executions;\n }\n}\n"],"mappings":";;;;AA0BA,IAAa,0BAAb,MAAa,gCACH,sBAEV;CACE,cAAgC,EAAE;;;;;;;CAQlC,aAAoB,YAClB,SACkC;EAClC,MAAM,UAAU,IAAI,yBAAyB;AAC7C,QAAM,QAAQ,KAAK,QAAQ;AAE3B,MAAI,CAAC,QAAQ,YAAY,QAAQ;AAC/B,WAAQ,MACN,kGACD;AACD,SAAM,IAAI,MAAM,8BAA8B;;AAGhD,MAAI,MAAM,QAAQ,QAAQ,WAAW,OAAO,CAC1C,UAAQA,aAAc,MAAM,QAAQ,IAClC,QAAQ,WAAW,OAAO,IAAI,OAAO,GAAG,mBAAmB;GACzD,MAAM,cAAc,MAAM;AAE1B,UAAO;IACL;IACA,SAAS;KAAE,GAAG,QAAQ;KAAS;KAAa;KAAgB;IAC5D,QAAQ;KACN,SAAS;KACT,MAAM;KACN,QAAQ;KACT;IACF;IACD,CACH;OACI;GACL,MAAM,cAAc,MAAM;AAC1B,YAAQA,aAAc,CACpB;IACE;IACA,SAAS;KAAE,GAAG,QAAQ;KAAS;KAAa,gBAAgB;KAAG;IAC/D,QAAQ;KACN,SAAS;KACT,MAAM;KACN,QAAQ;KACT;IACF,CACF;;AAGH,SAAO;;;;;;;CAQT,IAAW,aAA+B;AACxC,SAAO,MAAKA"}
|