@powerlines/engine 0.9.3 → 0.9.5
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/api/build.d.mts +2 -2
- package/dist/api/clean.d.mts +2 -2
- package/dist/api/create.d.mts +2 -2
- package/dist/api/deploy.d.mts +2 -2
- package/dist/api/docs.d.mts +2 -2
- package/dist/api/lint.d.mts +2 -2
- package/dist/api/prepare.d.mts +2 -2
- package/dist/api/test.d.mts +2 -2
- package/dist/api/types.d.mts +2 -2
- package/dist/{api-CcNgO71y.d.mts → api-Cdw4v0W4.d.mts} +3 -3
- package/dist/{api-CcNgO71y.d.mts.map → api-Cdw4v0W4.d.mts.map} +1 -1
- package/dist/{config-C9AD-erz.d.mts → config-BNe23XHx.d.mts} +1 -1
- package/dist/{config-C9AD-erz.d.mts.map → config-BNe23XHx.d.mts.map} +1 -1
- package/dist/{engine-context-SEzTm1aq.cjs → context/engine-context.cjs} +3 -7
- package/dist/context/engine-context.d.cts +2 -0
- package/dist/context/engine-context.d.mts +2 -0
- package/dist/{engine-context-f72fUF0N.mjs → context/engine-context.mjs} +2 -2
- package/dist/context/engine-context.mjs.map +1 -0
- package/dist/context/index.cjs +2 -2
- package/dist/context/index.d.mts +1 -1
- package/dist/context/index.mjs +1 -1
- package/dist/{context-S3XH2DWP.d.mts → context-DzgsMSWr.d.mts} +2 -2
- package/dist/{context-S3XH2DWP.d.mts.map → context-DzgsMSWr.d.mts.map} +1 -1
- package/dist/{engine-context-BiDxBwme.d.mts → engine-context-DEotmVzB.d.mts} +3 -3
- package/dist/{engine-context-BiDxBwme.d.mts.map → engine-context-DEotmVzB.d.mts.map} +1 -1
- package/dist/engine.cjs +2 -2
- package/dist/engine.d.mts +4 -4
- package/dist/engine.mjs +1 -1
- package/dist/execution-host.cjs +44 -0
- package/dist/execution-host.d.cts +14 -0
- package/dist/execution-host.d.cts.map +1 -0
- package/dist/execution-host.d.mts +14 -0
- package/dist/execution-host.d.mts.map +1 -0
- package/dist/execution-host.mjs +36 -0
- package/dist/execution-host.mjs.map +1 -0
- package/dist/helpers/create-execution-host.cjs +5 -3
- package/dist/helpers/create-execution-host.d.cts +4 -1
- package/dist/helpers/create-execution-host.d.cts.map +1 -1
- package/dist/helpers/create-execution-host.d.mts +7 -4
- package/dist/helpers/create-execution-host.d.mts.map +1 -1
- package/dist/helpers/create-execution-host.mjs +5 -3
- package/dist/helpers/create-execution-host.mjs.map +1 -1
- package/dist/helpers/execution-host-worker.d.mts +2 -2
- package/dist/helpers/rpc.d.mts +1 -1
- package/dist/index-CNgSR_kt.d.mts +1 -0
- package/dist/index-D_TYgLX3.d.cts +1 -0
- package/dist/index.cjs +10 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.mts +8 -4
- package/dist/index.mjs +6 -1
- package/package.json +13 -5
- package/dist/engine-context-f72fUF0N.mjs.map +0 -1
- package/dist/worker/execution-host.cjs +0 -577
- package/dist/worker/execution-host.d.cts +0 -76
- package/dist/worker/execution-host.d.cts.map +0 -1
- package/dist/worker/execution-host.d.mts +0 -76
- package/dist/worker/execution-host.d.mts.map +0 -1
- package/dist/worker/execution-host.mjs +0 -540
- package/dist/worker/execution-host.mjs.map +0 -1
|
@@ -1,577 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
12
|
-
key = keys[i];
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: ((k) => from[k]).bind(null, key),
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
let _powerlines_core = require("@powerlines/core");
|
|
30
|
-
let _powerlines_core_lib_environment = require("@powerlines/core/lib/environment");
|
|
31
|
-
let _stryke_fs_copy_file = require("@stryke/fs/copy-file");
|
|
32
|
-
let _stryke_path_append = require("@stryke/path/append");
|
|
33
|
-
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
34
|
-
let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
|
|
35
|
-
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
36
|
-
let _stryke_path_replace = require("@stryke/path/replace");
|
|
37
|
-
let chalk = require("chalk");
|
|
38
|
-
chalk = __toESM(chalk, 1);
|
|
39
|
-
let node_fs = require("node:fs");
|
|
40
|
-
let _powerlines_core_lib_generate_types = require("@powerlines/core/lib/generate-types");
|
|
41
|
-
let _powerlines_core_lib_install_dependencies = require("@powerlines/core/lib/install-dependencies");
|
|
42
|
-
let _powerlines_core_lib_meta = require("@powerlines/core/lib/meta");
|
|
43
|
-
let _powerlines_core_lib_typescript_tsconfig = require("@powerlines/core/lib/typescript/tsconfig");
|
|
44
|
-
let _powerlines_core_lib_utilities_format = require("@powerlines/core/lib/utilities/format");
|
|
45
|
-
let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
|
|
46
|
-
let _stryke_convert_to_array = require("@stryke/convert/to-array");
|
|
47
|
-
let _stryke_fs_helpers = require("@stryke/fs/helpers");
|
|
48
|
-
let _stryke_type_checks_is_object = require("@stryke/type-checks/is-object");
|
|
49
|
-
let _stryke_path_join = require("@stryke/path/join");
|
|
50
|
-
let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
51
|
-
let handlebars = require("handlebars");
|
|
52
|
-
handlebars = __toESM(handlebars, 1);
|
|
53
|
-
let _storm_software_config_tools_logger = require("@storm-software/config-tools/logger");
|
|
54
|
-
let _stryke_helpers_omit = require("@stryke/helpers/omit");
|
|
55
|
-
let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
|
|
56
|
-
let _powerlines_core_context_execution_context = require("@powerlines/core/context/execution-context");
|
|
57
|
-
let _powerlines_core_lib_context_helpers = require("@powerlines/core/lib/context-helpers");
|
|
58
|
-
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
59
|
-
let _stryke_unique_id_uuid = require("@stryke/unique-id/uuid");
|
|
60
|
-
let _powerlines_core_lib_events = require("@powerlines/core/lib/events");
|
|
61
|
-
let _stryke_type_checks_is_number = require("@stryke/type-checks/is-number");
|
|
62
|
-
let _stryke_type_checks_is_set = require("@stryke/type-checks/is-set");
|
|
63
|
-
let _stryke_url = require("@stryke/url");
|
|
64
|
-
let devframe_client = require("devframe/client");
|
|
65
|
-
let devframe_rpc = require("devframe/rpc");
|
|
66
|
-
let devframe_rpc_client = require("devframe/rpc/client");
|
|
67
|
-
let devframe_rpc_transports_ws_client = require("devframe/rpc/transports/ws-client");
|
|
68
|
-
let devframe_utils_promise = require("devframe/utils/promise");
|
|
69
|
-
let human_id = require("human-id");
|
|
70
|
-
let node_events = require("node:events");
|
|
71
|
-
|
|
72
|
-
//#region src/api/prepare.ts
|
|
73
|
-
/**
|
|
74
|
-
* Prepare the project
|
|
75
|
-
*
|
|
76
|
-
* @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
|
|
77
|
-
*/
|
|
78
|
-
async function prepare$1(context, skipTypes = false) {
|
|
79
|
-
const timer = context.timer("Preparation");
|
|
80
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
81
|
-
env.debug(`Initializing the processing options for the Powerlines project.`);
|
|
82
|
-
await context.callHook("configResolved", {
|
|
83
|
-
environment: env,
|
|
84
|
-
order: "pre"
|
|
85
|
-
});
|
|
86
|
-
await (0, _powerlines_core_lib_typescript_tsconfig.initializeTsconfig)(env);
|
|
87
|
-
await context.callHook("configResolved", {
|
|
88
|
-
environment: env,
|
|
89
|
-
order: "normal"
|
|
90
|
-
});
|
|
91
|
-
if (env.entry.length > 0) env.debug(`The configuration provided ${(0, _stryke_type_checks_is_object.isObject)(env.config.input) ? Object.keys(env.config.input).length : (0, _stryke_convert_to_array.toArray)(env.config.input).length} entry point(s), Powerlines has found ${env.entry.length} entry files(s) for the ${env.config.title} project${env.entry.length > 0 && env.entry.length < 10 ? `: \n${env.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
|
|
92
|
-
else env.warn(`No entry files were found for the ${env.config.title} project. Please ensure this is correct. Powerlines plugins generally require at least one entry point to function properly.`);
|
|
93
|
-
await (0, _powerlines_core_lib_typescript_tsconfig.resolveTsconfig)(env);
|
|
94
|
-
await (0, _powerlines_core_lib_install_dependencies.installDependencies)(env);
|
|
95
|
-
await context.callHook("configResolved", {
|
|
96
|
-
environment: env,
|
|
97
|
-
order: "post"
|
|
98
|
-
});
|
|
99
|
-
env.trace({
|
|
100
|
-
meta: { category: "config" },
|
|
101
|
-
message: `Powerlines configuration after configResolved hook: \n${(0, _powerlines_core_plugin_utils.formatConfig)(env.config)}`
|
|
102
|
-
});
|
|
103
|
-
if (!env.fs.existsSync(env.cachePath)) await (0, _stryke_fs_helpers.createDirectory)(env.cachePath);
|
|
104
|
-
if (!env.fs.existsSync(env.dataPath)) await (0, _stryke_fs_helpers.createDirectory)(env.dataPath);
|
|
105
|
-
await context.callHook("prepare", {
|
|
106
|
-
environment: env,
|
|
107
|
-
order: "pre"
|
|
108
|
-
});
|
|
109
|
-
await context.callHook("prepare", {
|
|
110
|
-
environment: env,
|
|
111
|
-
order: "normal"
|
|
112
|
-
});
|
|
113
|
-
await context.callHook("prepare", {
|
|
114
|
-
environment: env,
|
|
115
|
-
order: "post"
|
|
116
|
-
});
|
|
117
|
-
if (!skipTypes && env.config.output.types !== false) await (0, _powerlines_core_lib_generate_types.handleTypes)(context, env);
|
|
118
|
-
context.debug("Formatting files generated during the prepare step.");
|
|
119
|
-
await Promise.all([(0, _powerlines_core_lib_utilities_format.formatFolder)(env, env.builtinsPath), (0, _powerlines_core_lib_utilities_format.formatFolder)(env, env.entryPath)]);
|
|
120
|
-
await (0, _powerlines_core_lib_meta.writeMetaFile)(env);
|
|
121
|
-
env.persistedMeta = env.meta;
|
|
122
|
-
});
|
|
123
|
-
timer();
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
//#endregion
|
|
127
|
-
//#region src/api/build.ts
|
|
128
|
-
async function handleBuild(context, env) {
|
|
129
|
-
await context.callHook("build", {
|
|
130
|
-
environment: env,
|
|
131
|
-
order: "pre"
|
|
132
|
-
});
|
|
133
|
-
env.debug("Formatting the generated entry files before the build process starts.");
|
|
134
|
-
await (0, _powerlines_core.formatFolder)(env, env.entryPath);
|
|
135
|
-
await context.callHook("build", {
|
|
136
|
-
environment: env,
|
|
137
|
-
order: "normal"
|
|
138
|
-
});
|
|
139
|
-
if (env.config.output.copy) {
|
|
140
|
-
env.debug("Copying project's files from build output directory.");
|
|
141
|
-
const destinationPath = (0, _stryke_path_is_parent_path.isParentPath)((0, _stryke_path_append.appendPath)(env.config.output.path, env.config.cwd), (0, _stryke_path_append.appendPath)(env.config.root, env.config.cwd)) ? (0, _stryke_path_join_paths.joinPaths)(env.config.output.copy.path, (0, _stryke_path_file_path_fns.relativePath)((0, _stryke_path_append.appendPath)(env.config.root, env.config.cwd), (0, _stryke_path_append.appendPath)(env.config.output.path, env.config.cwd))) : (0, _stryke_path_join_paths.joinPaths)(env.config.output.copy.path, "dist");
|
|
142
|
-
const sourcePath = env.config.output.path;
|
|
143
|
-
if ((0, node_fs.existsSync)(sourcePath) && sourcePath !== destinationPath) {
|
|
144
|
-
env.debug(`Copying files from project's build output directory (${env.config.output.path}) to the project's copy/publish directory (${destinationPath}).`);
|
|
145
|
-
await (0, _stryke_fs_copy_file.copyFiles)(sourcePath, destinationPath);
|
|
146
|
-
} else env.warn(`The source path for the copy operation ${!(0, node_fs.existsSync)(sourcePath) ? "does not exist" : "is the same as the destination path"}. Source: ${sourcePath}, Destination: ${destinationPath}. Skipping copying of build output files.`);
|
|
147
|
-
if (env.config.output.copy.assets && Array.isArray(env.config.output.copy.assets)) await Promise.all(env.config.output.copy.assets.map(async (asset) => {
|
|
148
|
-
env.trace(`Copying asset(s): ${chalk.default.redBright(env.config.cwd === asset.input ? asset.glob : (0, _stryke_path_append.appendPath)(asset.glob, (0, _stryke_path_replace.replacePath)(asset.input, env.config.cwd)))} -> ${chalk.default.greenBright((0, _stryke_path_append.appendPath)(asset.glob, (0, _stryke_path_replace.replacePath)(asset.output, env.config.cwd)))} ${Array.isArray(asset.ignore) && asset.ignore.length > 0 ? ` (ignoring: ${asset.ignore.map((i) => chalk.default.yellowBright(i)).join(", ")})` : ""}`);
|
|
149
|
-
await env.fs.copy(asset, asset.output);
|
|
150
|
-
}));
|
|
151
|
-
} else env.debug("No copy configuration found for the project output. Skipping the copying of build output files.");
|
|
152
|
-
await context.callHook("build", {
|
|
153
|
-
environment: env,
|
|
154
|
-
order: "post"
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Build the project
|
|
159
|
-
*
|
|
160
|
-
* @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
|
|
161
|
-
*/
|
|
162
|
-
async function build$1(context) {
|
|
163
|
-
const timer = context.timer("Building");
|
|
164
|
-
await context.generateChecksum();
|
|
165
|
-
if (context.meta.checksum !== context.persistedMeta?.checksum || context.config.skipCache) {
|
|
166
|
-
context.info(!context.persistedMeta?.checksum ? "No previous build cache found. Preparing the project for the initial build." : context.meta.checksum !== context.persistedMeta.checksum ? "The project has been modified since the last time `prepare` was ran. Re-preparing the project." : "The project is configured to skip cache. Re-preparing the project.");
|
|
167
|
-
await prepare$1(context);
|
|
168
|
-
}
|
|
169
|
-
if (context.config.singleBuild) await handleBuild(context, await context.toEnvironment());
|
|
170
|
-
else await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
171
|
-
await handleBuild(context, env);
|
|
172
|
-
});
|
|
173
|
-
timer();
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
//#endregion
|
|
177
|
-
//#region src/api/clean.ts
|
|
178
|
-
/**
|
|
179
|
-
* Clean any previously prepared artifacts
|
|
180
|
-
*
|
|
181
|
-
* @param context - The execution context for the clean process, which provides access to the project configuration, environment, and utility functions for performing the clean operation. The context is used to manage the state and behavior of the clean process, allowing for hooks to be called at different stages of the clean and for environment-specific configurations to be applied.
|
|
182
|
-
*/
|
|
183
|
-
async function clean$1(context) {
|
|
184
|
-
const timer = context.timer("Cleaning");
|
|
185
|
-
await prepare$1(context, true);
|
|
186
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
187
|
-
env.debug("Cleaning the project's dist and artifacts directories.");
|
|
188
|
-
await env.fs.remove((0, _stryke_path_join.joinPaths)(env.config.cwd, env.config.output.path));
|
|
189
|
-
await env.fs.remove((0, _stryke_path_join.joinPaths)(env.config.cwd, env.config.root, env.config.output.artifactsPath));
|
|
190
|
-
await context.callHook("clean", {
|
|
191
|
-
environment: env,
|
|
192
|
-
sequential: false
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
timer();
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/api/create.ts
|
|
200
|
-
/**
|
|
201
|
-
* Create a new Powerlines project
|
|
202
|
-
*
|
|
203
|
-
* @param context - The execution context for the create process, which provides access to the project configuration, environment, and utility functions for performing the create operation. The context is used to manage the state and behavior of the create process, allowing for hooks to be called at different stages of the create and for environment-specific configurations to be applied.
|
|
204
|
-
*/
|
|
205
|
-
async function create$1(context) {
|
|
206
|
-
const timer = context.timer("Create a New Project Generation");
|
|
207
|
-
await prepare$1(context, true);
|
|
208
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
209
|
-
env.debug("Initializing the processing options for the project.");
|
|
210
|
-
await context.callHook("create", {
|
|
211
|
-
environment: env,
|
|
212
|
-
order: "pre"
|
|
213
|
-
});
|
|
214
|
-
const files = await (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_join.joinPaths)(env.powerlinesPath, "files/common/**/*.hbs"));
|
|
215
|
-
for (const file of files) {
|
|
216
|
-
env.trace(`Adding template file to project: ${file}`);
|
|
217
|
-
const template = handlebars.default.compile(file);
|
|
218
|
-
await env.fs.write((0, _stryke_path_join.joinPaths)(env.config.root, file.replace(".hbs", "")), template(env));
|
|
219
|
-
}
|
|
220
|
-
await context.callHook("create", {
|
|
221
|
-
environment: env,
|
|
222
|
-
order: "normal"
|
|
223
|
-
});
|
|
224
|
-
if (env.config.projectType === "application") {
|
|
225
|
-
const appFiles = await (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_join.joinPaths)(env.powerlinesPath, "files/application/**/*.hbs"));
|
|
226
|
-
for (const file of appFiles) {
|
|
227
|
-
env.trace(`Adding application template file: ${file}`);
|
|
228
|
-
const template = handlebars.default.compile(file);
|
|
229
|
-
await env.fs.write((0, _stryke_path_join.joinPaths)(env.config.root, file.replace(".hbs", "")), template(env));
|
|
230
|
-
}
|
|
231
|
-
} else {
|
|
232
|
-
const libFiles = await (0, _stryke_fs_list_files.listFiles)((0, _stryke_path_join.joinPaths)(env.powerlinesPath, "files/library/**/*.hbs"));
|
|
233
|
-
for (const file of libFiles) {
|
|
234
|
-
env.trace(`Adding library template file: ${file}`);
|
|
235
|
-
const template = handlebars.default.compile(file);
|
|
236
|
-
await env.fs.write((0, _stryke_path_join.joinPaths)(env.config.root, file.replace(".hbs", "")), template(env));
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
await context.callHook("create", {
|
|
240
|
-
environment: env,
|
|
241
|
-
order: "post"
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
timer();
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
//#endregion
|
|
248
|
-
//#region src/api/deploy.ts
|
|
249
|
-
/**
|
|
250
|
-
* Deploy the project's source files to the target environment.
|
|
251
|
-
*
|
|
252
|
-
* @remarks
|
|
253
|
-
* This function serves as the main entry point for the deployment process, orchestrating the execution of deployment hooks across different environments defined in the project configuration. It ensures that all relevant deployment operations are performed in a structured manner, allowing for pre-deployment, main deployment, and post-deployment hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the deployment operation, providing insights into the performance of the deployment process.
|
|
254
|
-
*
|
|
255
|
-
* @param context - The execution context for the deploy process, which provides access to the project configuration, environment, and utility functions for performing the deploy operation. The context is used to manage the state and behavior of the deploy process, allowing for hooks to be called at different stages of the deploy and for environment-specific configurations to be applied.
|
|
256
|
-
*/
|
|
257
|
-
async function deploy$1(context) {
|
|
258
|
-
const timer = context.timer("Deployment");
|
|
259
|
-
await prepare$1(context);
|
|
260
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
261
|
-
await context.callHook("deploy", { environment: env });
|
|
262
|
-
});
|
|
263
|
-
timer();
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
//#endregion
|
|
267
|
-
//#region src/api/docs.ts
|
|
268
|
-
/**
|
|
269
|
-
* Generate the project's documentation.
|
|
270
|
-
*
|
|
271
|
-
* @remarks
|
|
272
|
-
* This function serves as the main entry point for the documentation generation process, orchestrating the execution of documentation hooks across different environments defined in the project configuration. It ensures that all relevant documentation operations are performed in a structured manner, allowing for pre-documentation, main documentation, and post-documentation hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the documentation operation, providing insights into the performance of the documentation process.
|
|
273
|
-
*
|
|
274
|
-
* @param context - The execution context for the documentation process, which provides access to the project configuration, environment, and utility functions for performing the documentation operation. The context is used to manage the state and behavior of the documentation process, allowing for hooks to be called at different stages of the documentation and for environment-specific configurations to be applied.
|
|
275
|
-
*/
|
|
276
|
-
async function docs$1(context) {
|
|
277
|
-
const timer = context.timer("Documentation");
|
|
278
|
-
await prepare$1(context);
|
|
279
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
280
|
-
await context.callHook("docs", { environment: env });
|
|
281
|
-
});
|
|
282
|
-
timer();
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
//#endregion
|
|
286
|
-
//#region src/api/lint.ts
|
|
287
|
-
/**
|
|
288
|
-
* Lint the project's source files and report any issues found.
|
|
289
|
-
*
|
|
290
|
-
* @remarks
|
|
291
|
-
* This function serves as the main entry point for the linting process, orchestrating the execution of linting hooks across different environments defined in the project configuration. It ensures that all relevant linting operations are performed in a structured manner, allowing for pre-linting, main linting, and post-linting hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the linting operation, providing insights into the performance of the linting process.
|
|
292
|
-
*
|
|
293
|
-
* @param context - The execution context for the lint process, which provides access to the project configuration, environment, and utility functions for performing the lint operation. The context is used to manage the state and behavior of the lint process, allowing for hooks to be called at different stages of the lint and for environment-specific configurations to be applied.
|
|
294
|
-
*/
|
|
295
|
-
async function lint$1(context) {
|
|
296
|
-
const timer = context.timer("Linting");
|
|
297
|
-
await prepare$1(context);
|
|
298
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
299
|
-
await context.callHook("lint", {
|
|
300
|
-
environment: env,
|
|
301
|
-
sequential: false
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
timer();
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
//#endregion
|
|
308
|
-
//#region src/api/test.ts
|
|
309
|
-
/**
|
|
310
|
-
* Test the project's source files and report any issues found.
|
|
311
|
-
*
|
|
312
|
-
* @remarks
|
|
313
|
-
* This function serves as the main entry point for the testing process, orchestrating the execution of testing hooks across different environments defined in the project configuration. It ensures that all relevant testing operations are performed in a structured manner, allowing for pre-testing, main testing, and post-testing hooks to be executed at the appropriate stages of the process. The function also utilizes a timer to measure the duration of the testing operation, providing insights into the performance of the testing process.
|
|
314
|
-
*
|
|
315
|
-
* @param context - The execution context for the test process, which provides access to the project configuration, environment, and utility functions for performing the test operation. The context is used to manage the state and behavior of the test process, allowing for hooks to be called at different stages of the test and for environment-specific configurations to be applied.
|
|
316
|
-
*/
|
|
317
|
-
async function test$1(context) {
|
|
318
|
-
const timer = context.timer("Testing");
|
|
319
|
-
await prepare$1(context);
|
|
320
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
321
|
-
await context.callHook("test", {
|
|
322
|
-
environment: env,
|
|
323
|
-
sequential: false
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
timer();
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
//#endregion
|
|
330
|
-
//#region src/api/types.ts
|
|
331
|
-
/**
|
|
332
|
-
* Generate runtime types for the Powerlines project.
|
|
333
|
-
*
|
|
334
|
-
* @remarks
|
|
335
|
-
* This function is responsible for generating TypeScript declaration files based on the project's configuration and environment. It executes hooks at various stages of the type generation process, allowing for customization and extension by plugins. The generated types are formatted and written to the appropriate location in the project's file system, ensuring that they are available for use by other parts of the Powerlines system and by end-users of the project.
|
|
336
|
-
*
|
|
337
|
-
* @param context - The execution context for the build process, which provides access to the project configuration, environment, and utility functions for performing the build. The context is used to manage the state and behavior of the build process, allowing for hooks to be called at different stages of the build and for environment-specific configurations to be applied.
|
|
338
|
-
*/
|
|
339
|
-
async function types$1(context) {
|
|
340
|
-
const timer = context.timer("Type Generation");
|
|
341
|
-
context.debug(" Aggregating configuration options for the Powerlines project");
|
|
342
|
-
await (0, _powerlines_core_lib_environment.executeEnvironments)(context, async (env) => {
|
|
343
|
-
env.debug(`Initializing the processing options for the Powerlines project.`);
|
|
344
|
-
await context.callHook("configResolved", {
|
|
345
|
-
environment: env,
|
|
346
|
-
order: "pre"
|
|
347
|
-
});
|
|
348
|
-
await (0, _powerlines_core_lib_typescript_tsconfig.initializeTsconfig)(env);
|
|
349
|
-
await context.callHook("configResolved", {
|
|
350
|
-
environment: env,
|
|
351
|
-
order: "normal"
|
|
352
|
-
});
|
|
353
|
-
if (env.entry.length > 0) env.debug(`The configuration provided ${(0, _stryke_type_checks_is_object.isObject)(env.config.input) ? Object.keys(env.config.input).length : (0, _stryke_convert_to_array.toArray)(env.config.input).length} entry point(s), Powerlines has found ${env.entry.length} entry files(s) for the ${env.config.title} project${env.entry.length > 0 && env.entry.length < 10 ? `: \n${env.entry.map((entry) => `- ${entry.file}${entry.output ? ` -> ${entry.output}` : ""}`).join(" \n")}` : ""}`);
|
|
354
|
-
else env.warn(`No entry files were found for the ${env.config.title} project. Please ensure this is correct. Powerlines plugins generally require at least one entry point to function properly.`);
|
|
355
|
-
await (0, _powerlines_core_lib_typescript_tsconfig.resolveTsconfig)(env);
|
|
356
|
-
await (0, _powerlines_core_lib_install_dependencies.installDependencies)(env);
|
|
357
|
-
await context.callHook("configResolved", {
|
|
358
|
-
environment: env,
|
|
359
|
-
order: "post"
|
|
360
|
-
});
|
|
361
|
-
context.trace(`Powerlines configuration has been resolved: \n\n${(0, _storm_software_config_tools_logger.formatLogMessage)({
|
|
362
|
-
...env.config,
|
|
363
|
-
userConfig: (0, _stryke_type_checks_is_set_object.isSetObject)(env.config.userConfig) ? (0, _stryke_helpers_omit.omit)(env.config.userConfig, ["plugins"]) : void 0,
|
|
364
|
-
inlineConfig: (0, _stryke_type_checks_is_set_object.isSetObject)(env.config.inlineConfig) ? env.config.inlineConfig : void 0,
|
|
365
|
-
plugins: env.plugins.map((plugin) => plugin.name)
|
|
366
|
-
})}`);
|
|
367
|
-
if (!env.fs.existsSync(env.cachePath)) await (0, _stryke_fs_helpers.createDirectory)(env.cachePath);
|
|
368
|
-
if (!env.fs.existsSync(env.dataPath)) await (0, _stryke_fs_helpers.createDirectory)(env.dataPath);
|
|
369
|
-
if (env.config.skipCache === true || env.persistedMeta?.checksum !== env.meta.checksum) env.debug(`Using previously prepared files as the meta checksum has not changed.`);
|
|
370
|
-
else {
|
|
371
|
-
env.info(`Running \`prepare\` command as the meta checksum has changed since the last run.`);
|
|
372
|
-
await prepare$1(context, true);
|
|
373
|
-
}
|
|
374
|
-
await (0, _powerlines_core_lib_generate_types.handleTypes)(context, env);
|
|
375
|
-
context.debug("Formatting files generated during the types step.");
|
|
376
|
-
await (0, _powerlines_core_lib_utilities_format.format)(env, env.typesPath, await env.fs.read(env.typesPath) ?? "");
|
|
377
|
-
await (0, _powerlines_core_lib_meta.writeMetaFile)(env);
|
|
378
|
-
env.persistedMeta = env.meta;
|
|
379
|
-
});
|
|
380
|
-
timer();
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
//#endregion
|
|
384
|
-
//#region src/helpers/rpc.ts
|
|
385
|
-
function createWsRpcClientMode(baseURL, connectionMeta, events, clientRpc, authToken = (0, human_id.humanId)({
|
|
386
|
-
separator: "-",
|
|
387
|
-
capitalize: false
|
|
388
|
-
}), rpcOptions = {}, wsOptions = {}) {
|
|
389
|
-
let isTrusted = false;
|
|
390
|
-
const trustedPromise = (0, devframe_utils_promise.promiseWithResolver)();
|
|
391
|
-
const url = (0, _stryke_type_checks_is_number.isNumber)(connectionMeta.websocket) || (0, _stryke_type_checks_is_set.isSet)(connectionMeta.websocket) && `${+connectionMeta.websocket}` === `${connectionMeta.websocket}` ? `${baseURL.protocol.replace("http", "ws")}//${baseURL.hostname}:${connectionMeta.websocket}` : connectionMeta.websocket;
|
|
392
|
-
const definitions = /* @__PURE__ */ new Map();
|
|
393
|
-
for (const name of connectionMeta.jsonSerializableMethods ?? []) definitions.set(name, { jsonSerializable: true });
|
|
394
|
-
const serverRpc = (0, devframe_rpc_client.createRpcClient)(clientRpc.functions, {
|
|
395
|
-
channel: (0, devframe_rpc_transports_ws_client.createWsRpcChannel)({
|
|
396
|
-
url,
|
|
397
|
-
authToken,
|
|
398
|
-
definitions,
|
|
399
|
-
...wsOptions
|
|
400
|
-
}),
|
|
401
|
-
rpcOptions
|
|
402
|
-
});
|
|
403
|
-
clientRpc.register({
|
|
404
|
-
name: "devframe:auth:revoked",
|
|
405
|
-
type: "event",
|
|
406
|
-
handler: () => {
|
|
407
|
-
isTrusted = false;
|
|
408
|
-
events.emit("rpc:is-trusted:updated", false);
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
let currentAuthToken = authToken;
|
|
412
|
-
async function requestTrustWithToken(token) {
|
|
413
|
-
currentAuthToken = token;
|
|
414
|
-
return true;
|
|
415
|
-
}
|
|
416
|
-
async function requestTrust() {
|
|
417
|
-
if (isTrusted) return true;
|
|
418
|
-
return requestTrustWithToken(currentAuthToken);
|
|
419
|
-
}
|
|
420
|
-
async function ensureTrusted(timeout = 6e4) {
|
|
421
|
-
if (isTrusted) trustedPromise.resolve(true);
|
|
422
|
-
if (timeout <= 0) return trustedPromise.promise;
|
|
423
|
-
let clear = () => {};
|
|
424
|
-
await Promise.race([trustedPromise.promise.then(clear), new Promise((resolve, reject) => {
|
|
425
|
-
const id = setTimeout(() => {
|
|
426
|
-
reject(/* @__PURE__ */ new Error("Timeout waiting for rpc to be trusted"));
|
|
427
|
-
}, timeout);
|
|
428
|
-
clear = () => clearTimeout(id);
|
|
429
|
-
})]);
|
|
430
|
-
return isTrusted;
|
|
431
|
-
}
|
|
432
|
-
return {
|
|
433
|
-
get isTrusted() {
|
|
434
|
-
return isTrusted;
|
|
435
|
-
},
|
|
436
|
-
requestTrust,
|
|
437
|
-
requestTrustWithToken,
|
|
438
|
-
ensureTrusted,
|
|
439
|
-
call: (...args) => {
|
|
440
|
-
return serverRpc.$call(...args);
|
|
441
|
-
},
|
|
442
|
-
callEvent: (...args) => {
|
|
443
|
-
return serverRpc.$callEvent(...args);
|
|
444
|
-
},
|
|
445
|
-
callOptional: (...args) => {
|
|
446
|
-
return serverRpc.$callOptional(...args);
|
|
447
|
-
}
|
|
448
|
-
};
|
|
449
|
-
}
|
|
450
|
-
const CONNECTION_AUTH_TOKEN_KEY = "__DEVTOOLS_CONNECTION_AUTH_TOKEN__";
|
|
451
|
-
function createRpcClient(options) {
|
|
452
|
-
const baseURL = new _stryke_url.StormURL(options.baseURL);
|
|
453
|
-
const cacheManager = new devframe_rpc.RpcCacheManager({
|
|
454
|
-
functions: [],
|
|
455
|
-
...typeof options.cacheOptions === "object" ? options.cacheOptions : {}
|
|
456
|
-
});
|
|
457
|
-
const context = { rpc: void 0 };
|
|
458
|
-
const clientRpc = new devframe_rpc.RpcFunctionsCollectorBase(context);
|
|
459
|
-
node_events.EventEmitter.setMaxListeners(100);
|
|
460
|
-
const events = (0, _powerlines_core_lib_events.createEventEmitter)();
|
|
461
|
-
const mode = createWsRpcClientMode(baseURL, options.connection, events, clientRpc, void 0, {
|
|
462
|
-
...options.rpcOptions,
|
|
463
|
-
async onRequest(req, next, resolve) {
|
|
464
|
-
await options.rpcOptions?.onRequest?.call(this, req, next, resolve);
|
|
465
|
-
if (options.cacheOptions && cacheManager?.validate(req.m)) {
|
|
466
|
-
const cached = cacheManager.cached(req.m, req.a);
|
|
467
|
-
if (cached) return resolve(cached);
|
|
468
|
-
else {
|
|
469
|
-
const res = await next(req);
|
|
470
|
-
cacheManager?.apply(req, res);
|
|
471
|
-
}
|
|
472
|
-
} else await next(req);
|
|
473
|
-
}
|
|
474
|
-
}, options.wsOptions);
|
|
475
|
-
const rpc = {
|
|
476
|
-
events,
|
|
477
|
-
get isTrusted() {
|
|
478
|
-
return mode.isTrusted;
|
|
479
|
-
},
|
|
480
|
-
connectionMeta: options.connection,
|
|
481
|
-
ensureTrusted: mode.ensureTrusted,
|
|
482
|
-
requestTrust: mode.requestTrust,
|
|
483
|
-
requestTrustWithToken: async (token) => {
|
|
484
|
-
localStorage.setItem(CONNECTION_AUTH_TOKEN_KEY, token);
|
|
485
|
-
globalThis[CONNECTION_AUTH_TOKEN_KEY] = token;
|
|
486
|
-
return mode.requestTrustWithToken(token);
|
|
487
|
-
},
|
|
488
|
-
call: mode.call,
|
|
489
|
-
callEvent: mode.callEvent,
|
|
490
|
-
callOptional: mode.callOptional,
|
|
491
|
-
client: clientRpc,
|
|
492
|
-
sharedState: void 0,
|
|
493
|
-
streaming: void 0,
|
|
494
|
-
cacheManager
|
|
495
|
-
};
|
|
496
|
-
rpc.streaming = (0, devframe_client.createRpcStreamingClientHost)(rpc);
|
|
497
|
-
context.rpc = rpc;
|
|
498
|
-
mode.requestTrust();
|
|
499
|
-
try {
|
|
500
|
-
const bc = new BroadcastChannel("vite-devtools-auth");
|
|
501
|
-
bc.onmessage = (event) => {
|
|
502
|
-
if (event.data?.type === "auth-update" && event.data.authToken) rpc.requestTrustWithToken(event.data.authToken);
|
|
503
|
-
};
|
|
504
|
-
} catch {}
|
|
505
|
-
return rpc;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
//#endregion
|
|
509
|
-
//#region src/helpers/create-execution-host.ts
|
|
510
|
-
/**
|
|
511
|
-
* Creates an execution host with the provided methods. Each method will be wrapped to create an execution context and handle errors appropriately.
|
|
512
|
-
*
|
|
513
|
-
* @param methods - An object where keys are method names and values are functions that take an execution context and return a promise.
|
|
514
|
-
* @returns An object with the same keys as the input methods, but each function is wrapped to create an execution context and handle errors.
|
|
515
|
-
*/
|
|
516
|
-
function createExecutionHost(methods) {
|
|
517
|
-
return Object.fromEntries(Object.entries(methods).map(([method, fn]) => [method, async (params) => {
|
|
518
|
-
const { options, inlineConfig } = params;
|
|
519
|
-
let rpc;
|
|
520
|
-
if (options.baseURL && options.connection) rpc = createRpcClient(options);
|
|
521
|
-
else throw new Error(`Execution RPC client could not be created - Missing ${!options.baseURL ? `baseURL${options.connection ? ` and connection information` : ""}` : "connection"} or connection information.`);
|
|
522
|
-
const logFn = (meta, message) => {
|
|
523
|
-
(0, _powerlines_core_plugin_utils.consoleLogger)(meta, message);
|
|
524
|
-
if (rpc) rpc.callEvent("powerlines:log", {
|
|
525
|
-
meta: {
|
|
526
|
-
category: "general",
|
|
527
|
-
...options,
|
|
528
|
-
...(0, _stryke_type_checks_is_set_object.isSetObject)(meta) ? meta : { type: meta },
|
|
529
|
-
logId: (0, _stryke_unique_id_uuid.uuid)(),
|
|
530
|
-
timestamp: Date.now()
|
|
531
|
-
},
|
|
532
|
-
message
|
|
533
|
-
});
|
|
534
|
-
};
|
|
535
|
-
const context = await _powerlines_core_context_execution_context.PowerlinesExecutionContext.from({
|
|
536
|
-
...options,
|
|
537
|
-
logFn
|
|
538
|
-
}, inlineConfig ?? {}, { rpc });
|
|
539
|
-
context.logger.info(`Starting ${(0, _stryke_string_format_title_case.titleCase)(options.framework?.name) || "Powerlines"} - ${(0, _stryke_string_format_title_case.titleCase)(method)} execution (${options.executionId})`);
|
|
540
|
-
await (0, _powerlines_core_lib_context_helpers.resolvePluginConfig)(context);
|
|
541
|
-
await fn(context);
|
|
542
|
-
}]));
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region src/execution-host.ts
|
|
547
|
-
const executionHost = createExecutionHost({
|
|
548
|
-
types: types$1,
|
|
549
|
-
prepare: prepare$1,
|
|
550
|
-
create: create$1,
|
|
551
|
-
clean: clean$1,
|
|
552
|
-
lint: lint$1,
|
|
553
|
-
test: test$1,
|
|
554
|
-
build: build$1,
|
|
555
|
-
docs: docs$1,
|
|
556
|
-
deploy: deploy$1
|
|
557
|
-
});
|
|
558
|
-
const types = executionHost.types;
|
|
559
|
-
const prepare = executionHost.prepare;
|
|
560
|
-
const create = executionHost.create;
|
|
561
|
-
const clean = executionHost.clean;
|
|
562
|
-
const lint = executionHost.lint;
|
|
563
|
-
const test = executionHost.test;
|
|
564
|
-
const build = executionHost.build;
|
|
565
|
-
const docs = executionHost.docs;
|
|
566
|
-
const deploy = executionHost.deploy;
|
|
567
|
-
|
|
568
|
-
//#endregion
|
|
569
|
-
exports.build = build;
|
|
570
|
-
exports.clean = clean;
|
|
571
|
-
exports.create = create;
|
|
572
|
-
exports.deploy = deploy;
|
|
573
|
-
exports.docs = docs;
|
|
574
|
-
exports.lint = lint;
|
|
575
|
-
exports.prepare = prepare;
|
|
576
|
-
exports.test = test;
|
|
577
|
-
exports.types = types;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { ExecutionOptions, InlineConfig, LogMeta } from "@powerlines/core";
|
|
2
|
-
import { BirpcOptions } from "birpc";
|
|
3
|
-
import { RpcCacheOptions } from "devframe/rpc";
|
|
4
|
-
import { WsRpcChannelOptions } from "devframe/rpc/transports/ws-client";
|
|
5
|
-
import { ConnectionMeta, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions } from "devframe/types";
|
|
6
|
-
//#region src/types/rpc.d.ts
|
|
7
|
-
/**
|
|
8
|
-
* Payload for write log Rpc messages.
|
|
9
|
-
*/
|
|
10
|
-
interface LogPayload {
|
|
11
|
-
/**
|
|
12
|
-
* Metadata associated with the log message, excluding fields that are automatically added by the engine such as executionId, configIndex, environment, and timestamp. This can include custom fields relevant to the log entry, such as category, name, command, hook, plugin, and source.
|
|
13
|
-
*/
|
|
14
|
-
meta: LogMeta;
|
|
15
|
-
/**
|
|
16
|
-
* The log message content, which can be a string or an array of strings representing the log entry. This field is required and should contain the actual message to be logged.
|
|
17
|
-
*/
|
|
18
|
-
message: string;
|
|
19
|
-
}
|
|
20
|
-
interface RpcServerFunctions extends DevToolsRpcServerFunctions {
|
|
21
|
-
"powerlines:log": (payload: LogPayload) => void;
|
|
22
|
-
}
|
|
23
|
-
interface RpcClientFunctions extends DevToolsRpcClientFunctions {}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/types/config.d.ts
|
|
26
|
-
interface EngineExecutionOptions extends ExecutionOptions {
|
|
27
|
-
/**
|
|
28
|
-
* The base URL for the dev server, which can be used by plugins to construct URLs for assets or API endpoints during development. This value is only relevant in "dev" mode and will be `undefined` in "build" mode.
|
|
29
|
-
*/
|
|
30
|
-
baseURL: string;
|
|
31
|
-
/**
|
|
32
|
-
* Metadata for the connection used by the dev server, including the backend type and websocket configuration.
|
|
33
|
-
*/
|
|
34
|
-
connection: ConnectionMeta;
|
|
35
|
-
/**
|
|
36
|
-
* Options for configuring the WebSocket RPC channel used for communication between the dev server and the client, which can be used by plugins to customize the behavior of the WebSocket connection, such as setting custom timeouts, retry strategies, or other options.
|
|
37
|
-
*/
|
|
38
|
-
wsOptions?: Partial<WsRpcChannelOptions>;
|
|
39
|
-
/**
|
|
40
|
-
* Options for configuring the RPC client used for communication between the dev server and the client, which can be used by plugins to customize the behavior of the RPC client, such as setting custom timeouts, retry strategies, or other options.
|
|
41
|
-
*/
|
|
42
|
-
rpcOptions?: Partial<BirpcOptions<RpcServerFunctions, RpcClientFunctions, boolean>>;
|
|
43
|
-
/**
|
|
44
|
-
* Options for configuring the RPC cache used for caching RPC responses between the dev server and the client, which can be used by plugins to customize the behavior of the RPC cache, such as setting custom cache keys, expiration times, or other options.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* This option can be set to `true` to enable caching with default options, or it can be set to a configuration object that allows for fine-grained control over the caching behavior.
|
|
48
|
-
*/
|
|
49
|
-
cacheOptions?: boolean | Partial<RpcCacheOptions>;
|
|
50
|
-
}
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/types/api.d.ts
|
|
53
|
-
interface ExecutionHostParams {
|
|
54
|
-
/**
|
|
55
|
-
* The execution options for the current execution instance
|
|
56
|
-
*/
|
|
57
|
-
options: EngineExecutionOptions;
|
|
58
|
-
/**
|
|
59
|
-
* The inline configuration for the current execution instance, which is the result of merging the user configuration with any configuration provided by plugins during the "config" hook.
|
|
60
|
-
*/
|
|
61
|
-
inlineConfig: InlineConfig;
|
|
62
|
-
}
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/execution-host.d.ts
|
|
65
|
-
declare const types: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
66
|
-
declare const prepare: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
67
|
-
declare const create: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
68
|
-
declare const clean: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
69
|
-
declare const lint: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
70
|
-
declare const test: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
71
|
-
declare const build: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
72
|
-
declare const docs: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
73
|
-
declare const deploy: ((params: ExecutionHostParams) => Promise<void>) | undefined;
|
|
74
|
-
//#endregion
|
|
75
|
-
export { build, clean, create, deploy, docs, lint, prepare, test, types };
|
|
76
|
-
//# sourceMappingURL=execution-host.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"execution-host.d.cts","names":[],"sources":["../../src/types/rpc.ts","../../src/types/config.ts","../../src/types/api.ts","../../src/execution-host.ts"],"mappings":";;;;;;;;;UAqGiB,UAAA;ECjBK;;;EDqBpB,IAAA,EAAM,OAAA;ECfS;;;EDoBf,OAAA;AAAA;AAAA,UAGe,kBAAA,SAA2B,0BAAA;EAE1C,gBAAA,GAAmB,OAAA,EAAS,UAAA;AAAA;AAAA,UAGb,kBAAA,SAA2B,0BAAA;;;UChD3B,sBAAA,SAA+B,gBAAA;;;AAAhD;EAIE,OAAA;;;;EAKA,UAAA,EAAY,cAAA;EAWG;;;EANf,SAAA,GAAY,OAAA,CAAQ,mBAAA;EAea;;;EAVjC,UAAA,GAAa,OAAA,CACX,YAAA,CAAa,kBAAA,EAAoB,kBAAA;EApB2B;;;;;;EA6B9D,YAAA,aAAyB,OAAA,CAAQ,eAAA;AAAA;;;UCyClB,mBAAA;EClGG;;;EDsGlB,OAAA,EAAS,sBAAA;ECrG+B;;;ED0GxC,YAAA,EAAc,YAAA;AAAA;;;cC5GH,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,OAAA,IAAO,MAAA,EAAwB,mBAAA,KAAxB,OAAA;AAAA,cACP,MAAA,IAAM,MAAA,EAAuB,mBAAA,KAAvB,OAAA;AAAA,cACN,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,KAAA,IAAK,MAAA,EAAsB,mBAAA,KAAtB,OAAA;AAAA,cACL,IAAA,IAAI,MAAA,EAAqB,mBAAA,KAArB,OAAA;AAAA,cACJ,MAAA,IAAM,MAAA,EAAuB,mBAAA,KAAvB,OAAA"}
|