kist 0.0.0 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +298 -3
- package/js/actions/CoreActions.d.ts +6 -0
- package/js/actions/CoreActions.js +47 -0
- package/js/actions/DirectoryCleanAction/DirectoryCleanAction.d.ts +36 -0
- package/js/actions/DirectoryCleanAction/DirectoryCleanAction.js +123 -0
- package/js/actions/DirectoryCleanAction/index.d.ts +2 -0
- package/js/actions/DirectoryCleanAction/index.js +8 -0
- package/js/actions/DirectoryCopyAction/DirectoryCopyAction.d.ts +42 -0
- package/js/actions/DirectoryCopyAction/DirectoryCopyAction.js +118 -0
- package/js/actions/DirectoryCopyAction/index.d.ts +2 -0
- package/js/actions/DirectoryCopyAction/index.js +8 -0
- package/js/actions/DirectoryCreateAction/DirectoryCreateAction.d.ts +30 -0
- package/js/actions/DirectoryCreateAction/DirectoryCreateAction.js +85 -0
- package/js/actions/DirectoryCreateAction/index.d.ts +2 -0
- package/js/actions/DirectoryCreateAction/index.js +8 -0
- package/js/actions/DocumentationAction/DocumentationAction.d.ts +23 -0
- package/js/actions/DocumentationAction/DocumentationAction.js +88 -0
- package/js/actions/DocumentationAction/index.d.ts +2 -0
- package/js/actions/DocumentationAction/index.js +8 -0
- package/js/actions/FileCopyAction/FileCopyAction.d.ts +42 -0
- package/js/actions/FileCopyAction/FileCopyAction.js +127 -0
- package/js/actions/FileCopyAction/index.d.ts +2 -0
- package/js/actions/FileCopyAction/index.js +8 -0
- package/js/actions/FileRenameAction/FileRenameAction.d.ts +30 -0
- package/js/actions/FileRenameAction/FileRenameAction.js +84 -0
- package/js/actions/FileRenameAction/index.d.ts +2 -0
- package/js/actions/FileRenameAction/index.js +8 -0
- package/js/actions/JavaScriptMinifyAction/JavaScriptMinifyAction.d.ts +31 -0
- package/js/actions/JavaScriptMinifyAction/JavaScriptMinifyAction.js +98 -0
- package/js/actions/JavaScriptMinifyAction/index.d.ts +2 -0
- package/js/actions/JavaScriptMinifyAction/index.js +8 -0
- package/js/actions/JavaScriptMinifyAction/terser.config.d.ts +27 -0
- package/js/actions/JavaScriptMinifyAction/terser.config.js +119 -0
- package/js/actions/LintAction/LintAction.d.ts +17 -0
- package/js/actions/LintAction/LintAction.js +63 -0
- package/js/actions/LintAction/index.d.ts +2 -0
- package/js/actions/LintAction/index.js +8 -0
- package/js/actions/PackageManagerAction/PackageManagerAction.d.ts +57 -0
- package/js/actions/PackageManagerAction/PackageManagerAction.js +161 -0
- package/js/actions/PackageManagerAction/index.d.ts +2 -0
- package/js/actions/PackageManagerAction/index.js +8 -0
- package/js/actions/PackageManagerAction/package.config.d.ts +16 -0
- package/js/actions/PackageManagerAction/package.config.js +91 -0
- package/js/actions/StyleProcessingAction/StyleProcessingAction.d.ts +34 -0
- package/js/actions/StyleProcessingAction/StyleProcessingAction.js +164 -0
- package/js/actions/StyleProcessingAction/index.d.ts +2 -0
- package/js/actions/StyleProcessingAction/index.js +8 -0
- package/js/actions/StyleProcessingAction/postcss.config.compressed.d.ts +10 -0
- package/js/actions/StyleProcessingAction/postcss.config.compressed.js +31 -0
- package/js/actions/StyleProcessingAction/postcss.config.expanded.d.ts +16 -0
- package/js/actions/StyleProcessingAction/postcss.config.expanded.js +45 -0
- package/js/actions/SvgPackagerAction/SvgPackagerAction.d.ts +68 -0
- package/js/actions/SvgPackagerAction/SvgPackagerAction.js +186 -0
- package/js/actions/SvgPackagerAction/index.d.ts +2 -0
- package/js/actions/SvgPackagerAction/index.js +8 -0
- package/js/actions/SvgReaderAction/SvgReaderAction.d.ts +32 -0
- package/js/actions/SvgReaderAction/SvgReaderAction.js +87 -0
- package/js/actions/SvgReaderAction/index.d.ts +2 -0
- package/js/actions/SvgReaderAction/index.js +8 -0
- package/js/actions/SvgSpriteAction/SvgSpriteAction.d.ts +37 -0
- package/js/actions/SvgSpriteAction/SvgSpriteAction.js +114 -0
- package/js/actions/SvgSpriteAction/index.d.ts +2 -0
- package/js/actions/SvgSpriteAction/index.js +8 -0
- package/js/actions/SvgSpriteAction/svgsprite.config.d.ts +3 -0
- package/js/actions/SvgSpriteAction/svgsprite.config.js +117 -0
- package/js/actions/SvgToPngAction/SvgToPngAction.d.ts +28 -0
- package/js/actions/SvgToPngAction/SvgToPngAction.js +108 -0
- package/js/actions/SvgToPngAction/index.d.ts +2 -0
- package/js/actions/SvgToPngAction/index.js +8 -0
- package/js/actions/TypeScriptCompilerAction/TypeScriptCompilerAction.d.ts +28 -0
- package/js/actions/TypeScriptCompilerAction/TypeScriptCompilerAction.js +96 -0
- package/js/actions/TypeScriptCompilerAction/index.d.ts +2 -0
- package/js/actions/TypeScriptCompilerAction/index.js +8 -0
- package/js/actions/VersionWriteAction/VersionWriteAction.d.ts +45 -0
- package/js/actions/VersionWriteAction/VersionWriteAction.js +147 -0
- package/js/actions/VersionWriteAction/index.d.ts +2 -0
- package/js/actions/VersionWriteAction/index.js +8 -0
- package/js/cli/ArgumentParser.d.ts +62 -0
- package/js/cli/ArgumentParser.js +118 -0
- package/js/cli.d.ts +6 -0
- package/js/cli.js +58 -0
- package/js/core/abstract/AbstractProcess.d.ts +62 -0
- package/js/core/abstract/AbstractProcess.js +96 -0
- package/js/core/abstract/AbstractValidator.d.ts +72 -0
- package/js/core/abstract/AbstractValidator.js +128 -0
- package/js/core/config/ConfigLoader.d.ts +47 -0
- package/js/core/config/ConfigLoader.js +130 -0
- package/js/core/config/ConfigStore.d.ts +53 -0
- package/js/core/config/ConfigStore.js +136 -0
- package/js/core/config/defaultConfig.d.ts +5 -0
- package/js/core/config/defaultConfig.js +131 -0
- package/js/core/pipeline/Action.d.ts +60 -0
- package/js/core/pipeline/Action.js +77 -0
- package/js/core/pipeline/ActionRegistry.d.ts +80 -0
- package/js/core/pipeline/ActionRegistry.js +180 -0
- package/js/core/pipeline/Pipeline.d.ts +42 -0
- package/js/core/pipeline/Pipeline.js +107 -0
- package/js/core/pipeline/PipelineManager.d.ts +55 -0
- package/js/core/pipeline/PipelineManager.js +164 -0
- package/js/core/pipeline/Stage.d.ts +45 -0
- package/js/core/pipeline/Stage.js +110 -0
- package/js/core/pipeline/Step.d.ts +26 -0
- package/js/core/pipeline/Step.js +85 -0
- package/js/core/validation/OptionsValidator.d.ts +43 -0
- package/js/core/validation/OptionsValidator.js +123 -0
- package/js/index.d.ts +3 -0
- package/js/index.js +36 -0
- package/js/interface/ActionInterface.d.ts +57 -0
- package/js/interface/ActionInterface.js +5 -0
- package/js/interface/ActionPlugin.d.ts +4 -0
- package/js/interface/ActionPlugin.js +5 -0
- package/js/interface/ConfigInterface.d.ts +43 -0
- package/js/interface/ConfigInterface.js +5 -0
- package/js/interface/LiveOptionsInterface.d.ts +42 -0
- package/js/interface/LiveOptionsInterface.js +2 -0
- package/js/interface/MetadataInterface.d.ts +95 -0
- package/js/interface/MetadataInterface.js +2 -0
- package/js/interface/OptionsInterface.d.ts +45 -0
- package/js/interface/OptionsInterface.js +5 -0
- package/js/interface/PipelineOptionsInterface.d.ts +66 -0
- package/js/interface/PipelineOptionsInterface.js +5 -0
- package/js/interface/StageInterface.d.ts +79 -0
- package/js/interface/StageInterface.js +5 -0
- package/js/interface/StepInterface.d.ts +66 -0
- package/js/interface/StepInterface.js +5 -0
- package/js/interface/StepOptionsInterface.d.ts +38 -0
- package/js/interface/StepOptionsInterface.js +21 -0
- package/js/interface/index.d.ts +7 -0
- package/js/interface/index.js +3 -0
- package/js/kist.d.ts +58 -0
- package/js/kist.js +145 -0
- package/js/live/LiveServer.d.ts +95 -0
- package/js/live/LiveServer.js +233 -0
- package/js/live/LiveWatcher.d.ts +45 -0
- package/js/live/LiveWatcher.js +140 -0
- package/js/logger/Logger.d.ts +94 -0
- package/js/logger/Logger.js +151 -0
- package/js/logger/LoggerStyles.d.ts +23 -0
- package/js/logger/LoggerStyles.js +30 -0
- package/js/types/ActionOptionsType.d.ts +8 -0
- package/js/types/ActionOptionsType.js +2 -0
- package/js/types/index.d.ts +1 -0
- package/js/types/index.js +3 -0
- package/package.json +93 -7
- package/ts/actions/CoreActions.ts +64 -0
- package/ts/actions/DirectoryCleanAction/DirectoryCleanAction.ts +121 -0
- package/ts/actions/DirectoryCleanAction/index.ts +11 -0
- package/ts/actions/DirectoryCopyAction/DirectoryCopyAction.ts +118 -0
- package/ts/actions/DirectoryCopyAction/index.ts +11 -0
- package/ts/actions/DirectoryCreateAction/DirectoryCreateAction.ts +81 -0
- package/ts/actions/DirectoryCreateAction/index.ts +11 -0
- package/ts/actions/DocumentationAction/DocumentationAction.ts +100 -0
- package/ts/actions/DocumentationAction/index.ts +11 -0
- package/ts/actions/FileCopyAction/FileCopyAction.ts +125 -0
- package/ts/actions/FileCopyAction/index.ts +11 -0
- package/ts/actions/FileRenameAction/FileRenameAction.ts +82 -0
- package/ts/actions/FileRenameAction/index.ts +11 -0
- package/ts/actions/JavaScriptMinifyAction/JavaScriptMinifyAction.ts +109 -0
- package/ts/actions/JavaScriptMinifyAction/index.ts +11 -0
- package/ts/actions/JavaScriptMinifyAction/terser.config.ts +177 -0
- package/ts/actions/LintAction/LintAction.ts +67 -0
- package/ts/actions/LintAction/index.ts +11 -0
- package/ts/actions/PackageManagerAction/PackageManagerAction.ts +176 -0
- package/ts/actions/PackageManagerAction/index.ts +11 -0
- package/ts/actions/PackageManagerAction/package.config.ts +94 -0
- package/ts/actions/SassDocAction/SassDocAction.ts +66 -0
- package/ts/actions/SassDocAction/index.ts +11 -0
- package/ts/actions/StyleProcessingAction/StyleProcessingAction.ts +142 -0
- package/ts/actions/StyleProcessingAction/index.ts +11 -0
- package/ts/actions/StyleProcessingAction/postcss.config.compressed.ts +31 -0
- package/ts/actions/StyleProcessingAction/postcss.config.expanded.ts +47 -0
- package/ts/actions/SvgPackagerAction/SvgPackagerAction.ts +187 -0
- package/ts/actions/SvgPackagerAction/index.ts +11 -0
- package/ts/actions/SvgReaderAction/SvgReaderAction.ts +77 -0
- package/ts/actions/SvgReaderAction/index.ts +11 -0
- package/ts/actions/SvgSpriteAction/SvgSpriteAction.ts +127 -0
- package/ts/actions/SvgSpriteAction/index.ts +11 -0
- package/ts/actions/SvgSpriteAction/svgsprite.config.ts +123 -0
- package/ts/actions/SvgToPngAction/SvgToPngAction.ts +113 -0
- package/ts/actions/SvgToPngAction/index.ts +11 -0
- package/ts/actions/TypeScriptCompilerAction/TypeScriptCompilerAction.ts +117 -0
- package/ts/actions/TypeScriptCompilerAction/index.ts +11 -0
- package/ts/actions/VersionWriteAction/VersionWriteAction.ts +174 -0
- package/ts/actions/VersionWriteAction/index.ts +11 -0
- package/ts/actions/index.ts +0 -0
- package/ts/cli/ArgumentParser.ts +150 -0
- package/ts/cli/index.ts +1 -0
- package/ts/cli.ts +56 -0
- package/ts/core/abstract/AbstractProcess.ts +109 -0
- package/ts/core/abstract/AbstractSingleton.ts +46 -0
- package/ts/core/abstract/AbstractValidator.ts +167 -0
- package/ts/core/abstract/index.ts +0 -0
- package/ts/core/config/ConfigLoader.ts +141 -0
- package/ts/core/config/ConfigStore copy.ts +201 -0
- package/ts/core/config/ConfigStore.ts +157 -0
- package/ts/core/config/defaultConfig.ts +154 -0
- package/ts/core/config/index.ts +0 -0
- package/ts/core/index.ts +34 -0
- package/ts/core/pipeline/Action.ts +101 -0
- package/ts/core/pipeline/ActionRegistry.ts +216 -0
- package/ts/core/pipeline/Pipeline.ts +121 -0
- package/ts/core/pipeline/PipelineManager.ts +170 -0
- package/ts/core/pipeline/Stage.ts +131 -0
- package/ts/core/pipeline/Step.ts +96 -0
- package/ts/core/pipeline/index.ts +0 -0
- package/ts/core/validation/ActionValidator.ts +97 -0
- package/ts/core/validation/ConfigValidator.ts +103 -0
- package/ts/core/validation/OptionsValidator.ts +179 -0
- package/ts/core/validation/StageValidator.ts +175 -0
- package/ts/core/validation/StepValidator.ts +203 -0
- package/ts/core/validation/index.ts +0 -0
- package/ts/index.ts +26 -0
- package/ts/interface/ActionInterface.ts +70 -0
- package/ts/interface/ActionPlugin.ts +14 -0
- package/ts/interface/ConfigInterface.ts +55 -0
- package/ts/interface/File.ts +24 -0
- package/ts/interface/LiveOptionsInterface.ts +46 -0
- package/ts/interface/MetadataInterface.ts +105 -0
- package/ts/interface/OptionsInterface.ts +58 -0
- package/ts/interface/PackageJson.ts +171 -0
- package/ts/interface/PipelineOptionsInterface.ts +74 -0
- package/ts/interface/SVG.ts +84 -0
- package/ts/interface/StageInterface.ts +96 -0
- package/ts/interface/StepInterface.ts +83 -0
- package/ts/interface/StepOptionsInterface.ts +57 -0
- package/ts/interface/index.ts +9 -0
- package/ts/kist.ts +161 -0
- package/ts/live/LiveServer.ts +311 -0
- package/ts/live/LiveWatcher.ts +150 -0
- package/ts/live/index.ts +11 -0
- package/ts/logger/Logger.ts +187 -0
- package/ts/logger/LoggerStyles.ts +28 -0
- package/ts/logger/index.ts +0 -0
- package/ts/types/ActionOptionsType.ts +10 -0
- package/ts/types/index.ts +3 -0
- package/index.js +0 -3
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Import
|
|
4
|
+
// ============================================================================
|
|
5
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
6
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
9
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
10
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
11
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ConfigLoader = void 0;
|
|
19
|
+
const fs_1 = __importDefault(require("fs"));
|
|
20
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
21
|
+
const path_1 = __importDefault(require("path"));
|
|
22
|
+
const AbstractProcess_1 = require("../abstract/AbstractProcess");
|
|
23
|
+
// ============================================================================
|
|
24
|
+
// Class
|
|
25
|
+
// ============================================================================
|
|
26
|
+
/**
|
|
27
|
+
* ConfigLoader is responsible for loading and parsing configuration files
|
|
28
|
+
* (`kist.yaml` or `kist.yml` by default). It validates the configuration
|
|
29
|
+
* structure and provides it in a usable format for the pipeline.
|
|
30
|
+
* Extends `AbstractProcess` for consistent logging.
|
|
31
|
+
*/
|
|
32
|
+
class ConfigLoader extends AbstractProcess_1.AbstractProcess {
|
|
33
|
+
// Constructor
|
|
34
|
+
// ========================================================================
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a ConfigLoader instance.
|
|
37
|
+
* Searches for `kist.yaml` or `kist.yml` in the working directory
|
|
38
|
+
* unless a custom path is provided.
|
|
39
|
+
*
|
|
40
|
+
* @param configPath - Optional custom configuration file path.
|
|
41
|
+
*/
|
|
42
|
+
constructor(configPath) {
|
|
43
|
+
super();
|
|
44
|
+
// Parameters
|
|
45
|
+
// ========================================================================
|
|
46
|
+
/**
|
|
47
|
+
* Resolved path to the configuration file, if found.
|
|
48
|
+
*/
|
|
49
|
+
this.configPath = null;
|
|
50
|
+
/**
|
|
51
|
+
* Default filenames to search for configuration files.
|
|
52
|
+
*/
|
|
53
|
+
this.defaultFilenames = ["kist.yaml", "kist.yml"];
|
|
54
|
+
if (configPath) {
|
|
55
|
+
this.configPath = path_1.default.resolve(process.cwd(), configPath);
|
|
56
|
+
this.logDebug(`Custom configuration path set: ${this.configPath}`);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.logDebug("ConfigLoader initialized without custom path.");
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Methods
|
|
63
|
+
// ========================================================================
|
|
64
|
+
/**
|
|
65
|
+
* Initializes the loader by locating the configuration file.
|
|
66
|
+
* Searches for `kist.yaml` or `kist.yml` by default.
|
|
67
|
+
*
|
|
68
|
+
* @param configPath - Optional custom configuration file path.
|
|
69
|
+
*/
|
|
70
|
+
initialize(configPath) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const searchPaths = configPath ? [configPath] : this.defaultFilenames;
|
|
73
|
+
this.logDebug(`Current working directory: ${process.cwd()}`);
|
|
74
|
+
this.logDebug("Searching for configuration files...");
|
|
75
|
+
for (const fileName of searchPaths) {
|
|
76
|
+
const resolvedPath = path_1.default.resolve(process.cwd(), fileName);
|
|
77
|
+
this.logDebug(`Checking: ${resolvedPath}`);
|
|
78
|
+
try {
|
|
79
|
+
yield fs_1.default.promises.access(resolvedPath, fs_1.default.constants.F_OK | fs_1.default.constants.R_OK);
|
|
80
|
+
this.configPath = resolvedPath;
|
|
81
|
+
this.logDebug(`Configuration file found: ${resolvedPath}`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
this.logDebug(`File not accessible: ${resolvedPath}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
this.logWarn("No configuration file found. Proceeding with default settings.");
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Loads and validates the configuration file.
|
|
93
|
+
*
|
|
94
|
+
* @returns Parsed and validated configuration object.
|
|
95
|
+
* @throws Error if the configuration file cannot be read or validated.
|
|
96
|
+
*/
|
|
97
|
+
loadConfig() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
if (!this.configPath) {
|
|
100
|
+
this.logWarn("No configuration file found. Using default configuration.");
|
|
101
|
+
return { stages: [] };
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
this.logDebug(`Loading configuration from: ${this.configPath}`);
|
|
105
|
+
const fileContents = yield fs_1.default.promises.readFile(this.configPath, "utf8");
|
|
106
|
+
const config = js_yaml_1.default.load(fileContents);
|
|
107
|
+
this.validateConfig(config);
|
|
108
|
+
this.logDebug(`Successfully loaded configuration from: ${this.configPath}`);
|
|
109
|
+
return config;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
this.logError("Failed to load configuration.", error);
|
|
113
|
+
throw new Error(`Failed to load configuration: ${error.message}`);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Validates the structure of the configuration.
|
|
119
|
+
*
|
|
120
|
+
* @param config - The configuration object to validate.
|
|
121
|
+
* @throws Error if validation fails.
|
|
122
|
+
*/
|
|
123
|
+
validateConfig(config) {
|
|
124
|
+
if (!Array.isArray(config.stages)) {
|
|
125
|
+
throw new Error("Invalid configuration: 'stages' must be an array.");
|
|
126
|
+
}
|
|
127
|
+
this.logDebug("Configuration structure validated successfully.");
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.ConfigLoader = ConfigLoader;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ConfigInterface } from "../../interface/ConfigInterface";
|
|
2
|
+
import { AbstractProcess } from "../abstract/AbstractProcess";
|
|
3
|
+
/**
|
|
4
|
+
* ConfigStore is a singleton that loads and manages the application's configuration.
|
|
5
|
+
* It prioritizes CLI arguments over configuration file values.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ConfigStore extends AbstractProcess {
|
|
8
|
+
private static instance;
|
|
9
|
+
private config;
|
|
10
|
+
private constructor();
|
|
11
|
+
/**
|
|
12
|
+
* Retrieves the singleton instance of ConfigStore.
|
|
13
|
+
* @returns The singleton instance of ConfigStore.
|
|
14
|
+
*/
|
|
15
|
+
static getInstance(): ConfigStore;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves a value from the configuration using dot notation.
|
|
18
|
+
*
|
|
19
|
+
* @param key - The key of the configuration to retrieve.
|
|
20
|
+
* @returns The configuration value or undefined if not found.
|
|
21
|
+
*/
|
|
22
|
+
get<T>(key: string): T | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Sets a value in the configuration using dot notation.
|
|
25
|
+
*
|
|
26
|
+
* @param key - The key of the configuration to set.
|
|
27
|
+
* @param value - The value to set.
|
|
28
|
+
*/
|
|
29
|
+
set(key: string, value: unknown): void;
|
|
30
|
+
/**
|
|
31
|
+
* Merges the provided configuration into the existing configuration using deep merge.
|
|
32
|
+
*
|
|
33
|
+
* @param newConfig - The new configuration to merge.
|
|
34
|
+
*/
|
|
35
|
+
merge(newConfig: Partial<ConfigInterface>): void;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves the current configuration object.
|
|
38
|
+
* @returns The current configuration.
|
|
39
|
+
*/
|
|
40
|
+
getConfig(): ConfigInterface;
|
|
41
|
+
/**
|
|
42
|
+
* Prints the current configuration to the console.
|
|
43
|
+
*/
|
|
44
|
+
print(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Deeply merges two objects, preventing prototype pollution.
|
|
47
|
+
*
|
|
48
|
+
* @param target - The target object.
|
|
49
|
+
* @param source - The source object.
|
|
50
|
+
* @returns The merged object.
|
|
51
|
+
*/
|
|
52
|
+
private deepMerge;
|
|
53
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Import
|
|
4
|
+
// ============================================================================
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ConfigStore = void 0;
|
|
7
|
+
const AbstractProcess_1 = require("../abstract/AbstractProcess");
|
|
8
|
+
const defaultConfig_1 = require("./defaultConfig");
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// Class
|
|
11
|
+
// ============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* ConfigStore is a singleton that loads and manages the application's configuration.
|
|
14
|
+
* It prioritizes CLI arguments over configuration file values.
|
|
15
|
+
*/
|
|
16
|
+
class ConfigStore extends AbstractProcess_1.AbstractProcess {
|
|
17
|
+
// Constructor (Private to enforce Singleton Pattern)
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.config = defaultConfig_1.defaultConfig;
|
|
21
|
+
this.logDebug("ConfigStore initialized with default configuration.");
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves the singleton instance of ConfigStore.
|
|
25
|
+
* @returns The singleton instance of ConfigStore.
|
|
26
|
+
*/
|
|
27
|
+
static getInstance() {
|
|
28
|
+
if (!ConfigStore.instance) {
|
|
29
|
+
ConfigStore.instance = new ConfigStore();
|
|
30
|
+
}
|
|
31
|
+
return ConfigStore.instance;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves a value from the configuration using dot notation.
|
|
35
|
+
*
|
|
36
|
+
* @param key - The key of the configuration to retrieve.
|
|
37
|
+
* @returns The configuration value or undefined if not found.
|
|
38
|
+
*/
|
|
39
|
+
get(key) {
|
|
40
|
+
const keys = key.split(".");
|
|
41
|
+
let current = this.config;
|
|
42
|
+
for (const k of keys) {
|
|
43
|
+
if (current[k] === undefined) {
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
current = current[k];
|
|
47
|
+
}
|
|
48
|
+
this.logDebug(`Configuration key "${key}" retrieved.`);
|
|
49
|
+
return current;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Sets a value in the configuration using dot notation.
|
|
53
|
+
*
|
|
54
|
+
* @param key - The key of the configuration to set.
|
|
55
|
+
* @param value - The value to set.
|
|
56
|
+
*/
|
|
57
|
+
set(key, value) {
|
|
58
|
+
const keys = key.split(".");
|
|
59
|
+
let current = this.config;
|
|
60
|
+
for (let i = 0; i < keys.length - 1; i++) {
|
|
61
|
+
const k = keys[i];
|
|
62
|
+
// Prevent prototype pollution by blocking reserved keywords
|
|
63
|
+
if (["__proto__", "constructor", "prototype"].includes(k)) {
|
|
64
|
+
this.logWarn(`Attempted prototype pollution detected: "${k}"`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// Ensure property exists and is an object
|
|
68
|
+
if (!Object.prototype.hasOwnProperty.call(current, k) || typeof current[k] !== "object") {
|
|
69
|
+
current[k] = Object.create(null); // Use a null prototype object
|
|
70
|
+
}
|
|
71
|
+
current = current[k];
|
|
72
|
+
}
|
|
73
|
+
const finalKey = keys[keys.length - 1];
|
|
74
|
+
// Prevent prototype pollution at the final assignment
|
|
75
|
+
if (["__proto__", "constructor", "prototype"].includes(finalKey)) {
|
|
76
|
+
this.logWarn(`Attempted prototype pollution detected: "${finalKey}"`);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
current[finalKey] = value;
|
|
80
|
+
this.logDebug(`Set configuration key "${key}" to: ${JSON.stringify(value)}`);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Merges the provided configuration into the existing configuration using deep merge.
|
|
84
|
+
*
|
|
85
|
+
* @param newConfig - The new configuration to merge.
|
|
86
|
+
*/
|
|
87
|
+
merge(newConfig) {
|
|
88
|
+
this.config = this.deepMerge(this.config, newConfig);
|
|
89
|
+
this.logDebug("Configuration successfully merged.");
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Retrieves the current configuration object.
|
|
93
|
+
* @returns The current configuration.
|
|
94
|
+
*/
|
|
95
|
+
getConfig() {
|
|
96
|
+
return this.config;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Prints the current configuration to the console.
|
|
100
|
+
*/
|
|
101
|
+
print() {
|
|
102
|
+
console.log("Current Configuration:", JSON.stringify(this.config, null, 2));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Deeply merges two objects, preventing prototype pollution.
|
|
106
|
+
*
|
|
107
|
+
* @param target - The target object.
|
|
108
|
+
* @param source - The source object.
|
|
109
|
+
* @returns The merged object.
|
|
110
|
+
*/
|
|
111
|
+
deepMerge(target, source) {
|
|
112
|
+
if (typeof target !== "object" || target === null) {
|
|
113
|
+
return source;
|
|
114
|
+
}
|
|
115
|
+
for (const key of Object.keys(source)) {
|
|
116
|
+
// Prevent prototype pollution
|
|
117
|
+
if (["__proto__", "constructor", "prototype"].includes(key)) {
|
|
118
|
+
this.logWarn(`Skipping unsafe key during merge: "${key}"`);
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
if (source[key] && typeof source[key] === "object" && !Array.isArray(source[key])) {
|
|
122
|
+
if (!Object.prototype.hasOwnProperty.call(target, key) || typeof target[key] !== "object") {
|
|
123
|
+
target[key] = Object.create(null);
|
|
124
|
+
}
|
|
125
|
+
target[key] = this.deepMerge(target[key], source[key]);
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
target[key] = source[key];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return target;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
exports.ConfigStore = ConfigStore;
|
|
135
|
+
// Singleton instance
|
|
136
|
+
ConfigStore.instance = null;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Import
|
|
4
|
+
// ============================================================================
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.defaultConfig = void 0;
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Constants
|
|
9
|
+
// ============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Default configuration for the kist pipeline.
|
|
12
|
+
*/
|
|
13
|
+
exports.defaultConfig = {
|
|
14
|
+
metadata: {
|
|
15
|
+
/**
|
|
16
|
+
* The name of the pipeline for identification and reporting.
|
|
17
|
+
*/
|
|
18
|
+
name: "kist pipeline",
|
|
19
|
+
/**
|
|
20
|
+
* Semantic version of the pipeline configuration for tracking changes.
|
|
21
|
+
*/
|
|
22
|
+
version: "1.0.0",
|
|
23
|
+
/**
|
|
24
|
+
* Detailed description outlining the purpose of the pipeline.
|
|
25
|
+
*/
|
|
26
|
+
description: "A generic pipeline configuration for kist.",
|
|
27
|
+
/**
|
|
28
|
+
* The author or owner of the pipeline configuration.
|
|
29
|
+
*/
|
|
30
|
+
author: "Anonymous",
|
|
31
|
+
/**
|
|
32
|
+
* Arbitrary key-value pairs to describe the pipeline.
|
|
33
|
+
*/
|
|
34
|
+
tags: {
|
|
35
|
+
category: "generic",
|
|
36
|
+
environment: "development",
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* Timestamp indicating when the configuration was created or last updated.
|
|
40
|
+
* Automatically set to the current date/time.
|
|
41
|
+
*/
|
|
42
|
+
timestamp: new Date().toISOString(),
|
|
43
|
+
/**
|
|
44
|
+
* License under which the pipeline configuration is shared or used.
|
|
45
|
+
*/
|
|
46
|
+
license: "MIT",
|
|
47
|
+
/**
|
|
48
|
+
* URL pointing to documentation or additional resources for the pipeline.
|
|
49
|
+
*/
|
|
50
|
+
documentation: "https://example.com/documentation",
|
|
51
|
+
/**
|
|
52
|
+
* Contact information for questions or support.
|
|
53
|
+
*/
|
|
54
|
+
contact: "support@example.com",
|
|
55
|
+
/**
|
|
56
|
+
* Dependencies or related systems required by the pipeline configuration.
|
|
57
|
+
*/
|
|
58
|
+
dependencies: ["Node.js >=14.0", "Docker >=20.10"],
|
|
59
|
+
/**
|
|
60
|
+
* Environments where the pipeline is intended to run.
|
|
61
|
+
*/
|
|
62
|
+
environments: ["local", "CI/CD", "staging", "production"],
|
|
63
|
+
},
|
|
64
|
+
options: {
|
|
65
|
+
/**
|
|
66
|
+
* Configuration settings for live reload functionality.
|
|
67
|
+
*/
|
|
68
|
+
live: {
|
|
69
|
+
/**
|
|
70
|
+
* Indicates whether live reload is enabled.
|
|
71
|
+
*/
|
|
72
|
+
enabled: false,
|
|
73
|
+
/**
|
|
74
|
+
* Port on which the live reload server listens.
|
|
75
|
+
*/
|
|
76
|
+
port: 3000,
|
|
77
|
+
/**
|
|
78
|
+
* Root directory for serving static files.
|
|
79
|
+
*/
|
|
80
|
+
root: "public",
|
|
81
|
+
/**
|
|
82
|
+
* Paths to watch for changes.
|
|
83
|
+
*/
|
|
84
|
+
watchPaths: ["src/**/*", "config/**/*", "kist.yaml"],
|
|
85
|
+
/**
|
|
86
|
+
* Paths or patterns to ignore while watching.
|
|
87
|
+
*/
|
|
88
|
+
ignoredPaths: ["node_modules/*"],
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* Configuration options for pipeline execution.
|
|
92
|
+
*/
|
|
93
|
+
pipeline: {
|
|
94
|
+
/**
|
|
95
|
+
* Default timeout in milliseconds for each step in the pipeline.
|
|
96
|
+
*/
|
|
97
|
+
stepTimeout: 30000,
|
|
98
|
+
/**
|
|
99
|
+
* Whether to halt the pipeline if a step fails.
|
|
100
|
+
*/
|
|
101
|
+
haltOnFailure: true,
|
|
102
|
+
/**
|
|
103
|
+
* Maximum number of concurrent stages allowed to run in parallel.
|
|
104
|
+
* Set to 0 for no limit.
|
|
105
|
+
*/
|
|
106
|
+
maxConcurrentStages: 0,
|
|
107
|
+
/**
|
|
108
|
+
* Retry strategy for steps that fail.
|
|
109
|
+
*/
|
|
110
|
+
retryStrategy: {
|
|
111
|
+
/**
|
|
112
|
+
* Number of retry attempts before marking a step as failed.
|
|
113
|
+
*/
|
|
114
|
+
retries: 3,
|
|
115
|
+
/**
|
|
116
|
+
* Delay in milliseconds between retry attempts.
|
|
117
|
+
*/
|
|
118
|
+
delay: 1000,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* Logging level for the pipeline.
|
|
123
|
+
*/
|
|
124
|
+
logLevel: "info",
|
|
125
|
+
},
|
|
126
|
+
/**
|
|
127
|
+
* Default stages for the pipeline. Initially set to an empty array.
|
|
128
|
+
* Users can define and add their own stages.
|
|
129
|
+
*/
|
|
130
|
+
stages: [],
|
|
131
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ActionInterface } from "../../interface/ActionInterface";
|
|
2
|
+
import { ActionOptionsType } from "../../types/ActionOptionsType";
|
|
3
|
+
import { AbstractProcess } from "../abstract/AbstractProcess";
|
|
4
|
+
/**
|
|
5
|
+
* Action is an abstract base class that serves as a foundation for all step
|
|
6
|
+
* actions in the pipeline. It provides a consistent structure and utility
|
|
7
|
+
* methods for derived action classes, making it easier to implement and
|
|
8
|
+
* integrate custom behaviors like `BuildAction`, `LintAction`, and more.
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class Action extends AbstractProcess implements ActionInterface {
|
|
11
|
+
/**
|
|
12
|
+
* Gets the unique name of the action.
|
|
13
|
+
* The name is derived from the class name of the concrete action.
|
|
14
|
+
*/
|
|
15
|
+
get name(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Constructs a new Action instance.
|
|
18
|
+
* Inherits the logger from the AbstractProcess base class.
|
|
19
|
+
*/
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Provides a basic validation mechanism for action options.
|
|
23
|
+
* Derived classes can override this method to implement specific
|
|
24
|
+
* validation logic.
|
|
25
|
+
*
|
|
26
|
+
* @param options - The options to validate, ensuring they meet the
|
|
27
|
+
* action"s specific requirements.
|
|
28
|
+
* @returns A boolean indicating whether the options are valid. Default
|
|
29
|
+
* implementation always returns true.
|
|
30
|
+
*/
|
|
31
|
+
validateOptions(options: ActionOptionsType): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Abstract method that must be implemented by derived classes to perform
|
|
34
|
+
* the action"s main logic.
|
|
35
|
+
* This method is invoked during the step execution process.
|
|
36
|
+
*
|
|
37
|
+
* @param options - A structured set of options specific to the action's
|
|
38
|
+
* configuration.
|
|
39
|
+
* @returns A Promise that resolves when the action completes successfully,
|
|
40
|
+
* or rejects with an error if the action fails.
|
|
41
|
+
*/
|
|
42
|
+
abstract execute(options: ActionOptionsType): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Provides a summary or description of the action.
|
|
45
|
+
* This method can be overridden by derived classes to provide more
|
|
46
|
+
* specific details about the action.
|
|
47
|
+
*
|
|
48
|
+
* @returns A string description of the action.
|
|
49
|
+
*/
|
|
50
|
+
describe(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Logs a message indicating the start of the action's execution.
|
|
53
|
+
* Useful for tracking progress in pipelines with multiple steps.
|
|
54
|
+
*/
|
|
55
|
+
protected logStart(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Logs a message indicating the successful completion of the action.
|
|
58
|
+
*/
|
|
59
|
+
protected logSuccess(): void;
|
|
60
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// ============================================================================
|
|
3
|
+
// Import
|
|
4
|
+
// ============================================================================
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Action = void 0;
|
|
7
|
+
const AbstractProcess_1 = require("../abstract/AbstractProcess");
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Class
|
|
10
|
+
// ============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Action is an abstract base class that serves as a foundation for all step
|
|
13
|
+
* actions in the pipeline. It provides a consistent structure and utility
|
|
14
|
+
* methods for derived action classes, making it easier to implement and
|
|
15
|
+
* integrate custom behaviors like `BuildAction`, `LintAction`, and more.
|
|
16
|
+
*/
|
|
17
|
+
class Action extends AbstractProcess_1.AbstractProcess {
|
|
18
|
+
// Parameters
|
|
19
|
+
// ========================================================================
|
|
20
|
+
/**
|
|
21
|
+
* Gets the unique name of the action.
|
|
22
|
+
* The name is derived from the class name of the concrete action.
|
|
23
|
+
*/
|
|
24
|
+
get name() {
|
|
25
|
+
return this.constructor.name;
|
|
26
|
+
}
|
|
27
|
+
// Constructor
|
|
28
|
+
// ========================================================================
|
|
29
|
+
/**
|
|
30
|
+
* Constructs a new Action instance.
|
|
31
|
+
* Inherits the logger from the AbstractProcess base class.
|
|
32
|
+
*/
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
}
|
|
36
|
+
// Methods
|
|
37
|
+
// ========================================================================
|
|
38
|
+
/**
|
|
39
|
+
* Provides a basic validation mechanism for action options.
|
|
40
|
+
* Derived classes can override this method to implement specific
|
|
41
|
+
* validation logic.
|
|
42
|
+
*
|
|
43
|
+
* @param options - The options to validate, ensuring they meet the
|
|
44
|
+
* action"s specific requirements.
|
|
45
|
+
* @returns A boolean indicating whether the options are valid. Default
|
|
46
|
+
* implementation always returns true.
|
|
47
|
+
*/
|
|
48
|
+
validateOptions(options) {
|
|
49
|
+
// Default validation: always returns true, can be overridden in
|
|
50
|
+
// derived classes
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Provides a summary or description of the action.
|
|
55
|
+
* This method can be overridden by derived classes to provide more
|
|
56
|
+
* specific details about the action.
|
|
57
|
+
*
|
|
58
|
+
* @returns A string description of the action.
|
|
59
|
+
*/
|
|
60
|
+
describe() {
|
|
61
|
+
return "Base action for executing steps in the pipeline.";
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Logs a message indicating the start of the action's execution.
|
|
65
|
+
* Useful for tracking progress in pipelines with multiple steps.
|
|
66
|
+
*/
|
|
67
|
+
logStart() {
|
|
68
|
+
this.logInfo(`Starting action: ${this.name}`);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Logs a message indicating the successful completion of the action.
|
|
72
|
+
*/
|
|
73
|
+
logSuccess() {
|
|
74
|
+
this.logInfo(`Successfully completed action: ${this.name}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.Action = Action;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ActionInterface } from "../../interface/ActionInterface";
|
|
2
|
+
import { AbstractProcess } from "../abstract/AbstractProcess";
|
|
3
|
+
/**
|
|
4
|
+
* ActionRegistry is a singleton registry for step actions, mapping action
|
|
5
|
+
* names to their corresponding classes. This registry allows dynamic
|
|
6
|
+
* resolution of step actions within the pipeline and supports custom
|
|
7
|
+
* developer integrations.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ActionRegistry extends AbstractProcess {
|
|
10
|
+
/**
|
|
11
|
+
* Singleton instance
|
|
12
|
+
*/
|
|
13
|
+
private static instance;
|
|
14
|
+
/**
|
|
15
|
+
* Map to store registered actions
|
|
16
|
+
*/
|
|
17
|
+
private registry;
|
|
18
|
+
/**
|
|
19
|
+
* Constructs an ActionRegistry instance and automatically registers core
|
|
20
|
+
* actions. The constructor is private to enforce the singleton pattern.
|
|
21
|
+
*/
|
|
22
|
+
constructor();
|
|
23
|
+
/**
|
|
24
|
+
* Initializes the singleton instance of ActionRegistry.
|
|
25
|
+
* Should only be called once during application startup.
|
|
26
|
+
*
|
|
27
|
+
* @throws Error if the registry has already been initialized.
|
|
28
|
+
*/
|
|
29
|
+
static initialize(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves the singleton instance of ActionRegistry, initializing it if
|
|
32
|
+
* necessary.
|
|
33
|
+
*
|
|
34
|
+
* @returns The ActionRegistry instance.
|
|
35
|
+
*/
|
|
36
|
+
static getInstance(): ActionRegistry;
|
|
37
|
+
/**
|
|
38
|
+
* Resets the singleton instance of ActionRegistry.
|
|
39
|
+
* This is useful for testing or resetting the registry state during
|
|
40
|
+
* runtime.
|
|
41
|
+
*/
|
|
42
|
+
static resetInstance(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Registers a new action in the registry.
|
|
45
|
+
*
|
|
46
|
+
* @param actionClass - The class implementing `ActionInterface`.
|
|
47
|
+
* @throws Error if the action name is already registered or missing.
|
|
48
|
+
*/
|
|
49
|
+
registerAction(actionClass: new () => ActionInterface): void;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves a step action class from the registry.
|
|
52
|
+
* This method looks up an action by name and returns the corresponding
|
|
53
|
+
* class that implements the ActionInterface.
|
|
54
|
+
*
|
|
55
|
+
* @param name - The name of the action to retrieve.
|
|
56
|
+
* @returns The action class constructor if found, or undefined if no such
|
|
57
|
+
* action is registered.
|
|
58
|
+
*/
|
|
59
|
+
getAction(name: string): (new () => ActionInterface) | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Lists all registered step actions.
|
|
62
|
+
* Provides a utility to view currently registered actions, useful for
|
|
63
|
+
* debugging and validation.
|
|
64
|
+
*
|
|
65
|
+
* @returns An array of registered action names.
|
|
66
|
+
*/
|
|
67
|
+
listRegisteredActions(): string[];
|
|
68
|
+
/**
|
|
69
|
+
* Pre-registers core actions that are included with the pipeline by
|
|
70
|
+
* default. Developers can extend this by registering additional custom
|
|
71
|
+
* actions as needed.
|
|
72
|
+
*/
|
|
73
|
+
private registerCoreActions;
|
|
74
|
+
private discoverPlugins;
|
|
75
|
+
/**
|
|
76
|
+
* Clears all registered actions in the registry.
|
|
77
|
+
* Useful for testing or resetting the pipeline.
|
|
78
|
+
*/
|
|
79
|
+
clearRegistry(): void;
|
|
80
|
+
}
|