@simplysf/simply-utam 0.0.0 → 0.1.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.
@@ -0,0 +1,82 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Command, Flags } from '@oclif/core';
17
+ import { generateLwcRules } from '@simplysf/simply-utam-core';
18
+ /**
19
+ * CLI command to scan LWC components and generate UTAM .rules.json schemas.
20
+ */
21
+ export default class Rules extends Command {
22
+ static summary = 'Scan LWC component definitions and generate UTAM .rules.json files.';
23
+ static description = 'Discovers root components in package directories matching target page types and generates or updates corresponding *.rules.json schemas.';
24
+ static examples = [
25
+ '<%= config.bin %> <%= command.id %>',
26
+ '<%= config.bin %> <%= command.id %> --source force-app/main/default/lwc',
27
+ '<%= config.bin %> <%= command.id %> --dry-run',
28
+ ];
29
+ static enableJsonFlag = true;
30
+ static flags = {
31
+ source: Flags.string({
32
+ char: 's',
33
+ summary: 'Specific source directory or directories to scan (defaults to discovered package directories).',
34
+ multiple: true,
35
+ }),
36
+ namespace: Flags.string({
37
+ char: 'n',
38
+ summary: 'LWC namespace prefix for selector generation (defaults to c).',
39
+ }),
40
+ 'project-dir': Flags.string({
41
+ summary: 'Root directory of the project.',
42
+ default: '.',
43
+ }),
44
+ 'dry-run': Flags.boolean({
45
+ char: 'd',
46
+ summary: 'Preview generated rules without writing to disk.',
47
+ default: false,
48
+ }),
49
+ verbose: Flags.boolean({
50
+ char: 'v',
51
+ summary: 'Enable detailed output.',
52
+ default: false,
53
+ }),
54
+ };
55
+ async run() {
56
+ const { flags } = await this.parse(Rules);
57
+ const result = generateLwcRules({
58
+ rootDir: flags['project-dir'],
59
+ sourceDirs: flags.source,
60
+ namespace: flags.namespace,
61
+ dryRun: flags['dry-run'],
62
+ verbose: flags.verbose,
63
+ });
64
+ if (flags['dry-run']) {
65
+ this.log('[dry-run] Rules generation preview:');
66
+ }
67
+ this.log(`Scanned ${result.totalComponentsScanned} components; identified ${result.rootComponentsIdentified} root components.`);
68
+ if (result.filesCreated.length > 0) {
69
+ this.log(`Created ${result.filesCreated.length} rules files.`);
70
+ }
71
+ if (result.filesUpdated.length > 0) {
72
+ this.log(`Updated ${result.filesUpdated.length} rules files.`);
73
+ }
74
+ if (flags.verbose) {
75
+ for (const action of result.actions) {
76
+ this.log(` - ${action.componentName}: ${action.action} (${action.rulesFilePath})`);
77
+ }
78
+ }
79
+ return result;
80
+ }
81
+ }
82
+ //# sourceMappingURL=rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rules.js","sourceRoot":"","sources":["../../src/commands/rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAA4B,MAAM,4BAA4B,CAAC;AAExF;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACjC,MAAM,CAAU,OAAO,GAAG,qEAAqE,CAAC;IAEhG,MAAM,CAAU,WAAW,GAChC,0IAA0I,CAAC;IAEtI,MAAM,CAAU,QAAQ,GAAG;QAChC,qCAAqC;QACrC,yEAAyE;QACzE,+CAA+C;KAChD,CAAC;IAEK,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IAEtC,MAAM,CAAU,KAAK,GAAG;QAC7B,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,GAAG;YACT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,eAAe,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,WAAW,MAAM,CAAC,YAAY,CAAC,MAAM,eAAe,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;gBACpC,IAAI,CAAC,GAAG,CAAC,OAAO,MAAM,CAAC,aAAa,KAAK,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { Command } from '@oclif/core';
2
+ import { type GenerateStepsResult } from '@simplysf/simply-utam-core';
3
+ /**
4
+ * CLI command to detect missing Cucumber steps and scaffold definition templates.
5
+ */
6
+ export default class Steps extends Command {
7
+ static summary: string;
8
+ static description: string;
9
+ static examples: string[];
10
+ static enableJsonFlag: boolean;
11
+ static flags: {
12
+ features: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
13
+ steps: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
14
+ output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ 'project-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ 'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
17
+ verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ run(): Promise<GenerateStepsResult>;
20
+ }
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Command, Flags } from '@oclif/core';
17
+ import { generateCucumberSteps } from '@simplysf/simply-utam-core';
18
+ /**
19
+ * CLI command to detect missing Cucumber steps and scaffold definition templates.
20
+ */
21
+ export default class Steps extends Command {
22
+ static summary = 'Scaffold missing Cucumber step definitions based on Gherkin feature files.';
23
+ static description = 'Parses Gherkin .feature files, compiles registered step expressions from existing step definition files, detects true missing steps without false positives, and appends formatted snippet templates.';
24
+ static examples = [
25
+ '<%= config.bin %> <%= command.id %>',
26
+ '<%= config.bin %> <%= command.id %> --features "tests/**/*.feature" --steps "tests/**/*.steps.ts"',
27
+ '<%= config.bin %> <%= command.id %> --dry-run',
28
+ ];
29
+ static enableJsonFlag = true;
30
+ static flags = {
31
+ features: Flags.string({
32
+ char: 'f',
33
+ summary: 'Glob pattern(s) for Gherkin feature files.',
34
+ multiple: true,
35
+ default: ['**/test/*.feature', '**/test/**/*.feature'],
36
+ }),
37
+ steps: Flags.string({
38
+ char: 's',
39
+ summary: 'Glob pattern(s) for existing Cucumber step definitions.',
40
+ multiple: true,
41
+ default: ['**/test/*.steps.{js,mjs,ts}', '**/test/**/*.steps.{js,mjs,ts}'],
42
+ }),
43
+ output: Flags.string({
44
+ char: 'o',
45
+ summary: 'Target file path for scaffolded step definitions (defaults to first matched step file or new generated.steps.mjs).',
46
+ }),
47
+ 'project-dir': Flags.string({
48
+ summary: 'Root directory of the project.',
49
+ default: '.',
50
+ }),
51
+ 'dry-run': Flags.boolean({
52
+ char: 'd',
53
+ summary: 'Preview generated step snippets without modifying files on disk.',
54
+ default: false,
55
+ }),
56
+ verbose: Flags.boolean({
57
+ char: 'v',
58
+ summary: 'Enable detailed output.',
59
+ default: false,
60
+ }),
61
+ };
62
+ async run() {
63
+ const { flags } = await this.parse(Steps);
64
+ const result = await generateCucumberSteps({
65
+ rootDir: flags['project-dir'],
66
+ features: flags.features,
67
+ steps: flags.steps,
68
+ outputFile: flags.output,
69
+ dryRun: flags['dry-run'],
70
+ verbose: flags.verbose,
71
+ });
72
+ if (flags['dry-run']) {
73
+ this.log('[dry-run] Step scaffolding preview:');
74
+ }
75
+ this.log(`Scanned ${result.featureFilesScanned} feature files and ${result.stepFilesScanned} step files.`);
76
+ if (result.undefinedStepsCount === 0) {
77
+ this.log('All steps have matching definitions. No new step snippets needed.');
78
+ return result;
79
+ }
80
+ this.log(`Detected ${result.undefinedStepsCount} undefined step(s). Target: ${result.outputFile}`);
81
+ if ((flags.verbose || flags['dry-run']) && result.generatedCode) {
82
+ this.log('\n--- Generated Snippets ---');
83
+ this.log(result.generatedCode);
84
+ this.log('---------------------------\n');
85
+ }
86
+ return result;
87
+ }
88
+ }
89
+ //# sourceMappingURL=steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/commands/steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAA4B,MAAM,4BAA4B,CAAC;AAE7F;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,OAAO;IACjC,MAAM,CAAU,OAAO,GAAG,4EAA4E,CAAC;IAEvG,MAAM,CAAU,WAAW,GAChC,uMAAuM,CAAC;IAEnM,MAAM,CAAU,QAAQ,GAAG;QAChC,qCAAqC;QACrC,mGAAmG;QACnG,+CAA+C;KAChD,CAAC;IAEK,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IAEtC,MAAM,CAAU,KAAK,GAAG;QAC7B,QAAQ,EAAE,KAAK,CAAC,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AAC,EAAE,CAAC;YACrB,IAAI,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,WAAW,MAAM,CAAC,mBAAmB,sBAAsB,MAAM,CAAC,gBAAgB,cAAc,CAAC,CAAC;QAE3G,IAAI,MAAM,CAAC,mBAAmB,KAAK,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,mEAAmE,CAAC,CAAC;YAC9E,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,YAAY,MAAM,CAAC,mBAAmB,+BAA+B,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;QAEnG,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;YAChE,IAAI,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YACzC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;YAC/B,IAAI,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @simplysf/simply-utam
3
+ * Salesforce UTAM UI testing and build automation CLI.
4
+ */
5
+ export * from '@simplysf/simply-utam-core';
6
+ export { executeBuildPipeline, type BuildPipelineOptions, type BuildPipelineResult } from './pipeline-runner.js';
package/lib/index.js ADDED
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /**
17
+ * @simplysf/simply-utam
18
+ * Salesforce UTAM UI testing and build automation CLI.
19
+ */
20
+ export * from '@simplysf/simply-utam-core';
21
+ export { executeBuildPipeline } from './pipeline-runner.js';
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;GAGG;AAEH,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAuD,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,31 @@
1
+ export interface BuildPipelineOptions {
2
+ projectDir?: string;
3
+ sourceDirs?: string[];
4
+ generatorConfigPath?: string;
5
+ utamConfigPath?: string;
6
+ namespaceMapPath?: string;
7
+ dryRun?: boolean;
8
+ spawnCommand?: (command: string, args: string[], cwd: string) => Promise<{
9
+ code: number;
10
+ stdout: string;
11
+ stderr: string;
12
+ }>;
13
+ onStage?: (stage: string, status: 'start' | 'success' | 'skip' | 'error', message?: string) => void;
14
+ }
15
+ export interface BuildPipelineResult {
16
+ success: boolean;
17
+ rulesModified: number;
18
+ overridesApplied: number;
19
+ namespacesRewritten: number;
20
+ generatorExecuted: boolean;
21
+ compilerExecuted: boolean;
22
+ errors: string[];
23
+ }
24
+ /**
25
+ * Executes the complete SimplyUTAM compilation build pipeline sequentially:
26
+ * rules -> utam-generate -> overrides -> rewrite -> utam compiler.
27
+ *
28
+ * @param options - Build pipeline execution options.
29
+ * @returns Summary of execution results across all pipeline stages.
30
+ */
31
+ export declare function executeBuildPipeline(options?: BuildPipelineOptions): Promise<BuildPipelineResult>;
@@ -0,0 +1,241 @@
1
+ /*
2
+ * Copyright (c) 2026, SimplySF.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import * as fs from 'node:fs';
17
+ import * as path from 'node:path';
18
+ import { spawn } from 'node:child_process';
19
+ import { discoverProject, generateLwcRules, applyUtamOverrides, rewriteUtamNamespaces, } from '@simplysf/simply-utam-core';
20
+ function defaultSpawn(command, args, cwd) {
21
+ return new Promise((resolve) => {
22
+ const isWindows = process.platform === 'win32';
23
+ const proc = spawn(command, args, { cwd, shell: isWindows });
24
+ let stdout = '';
25
+ let stderr = '';
26
+ proc.stdout?.on('data', (chunk) => {
27
+ stdout += chunk.toString();
28
+ });
29
+ proc.stderr?.on('data', (chunk) => {
30
+ stderr += chunk.toString();
31
+ });
32
+ proc.on('close', (code) => {
33
+ resolve({ code: code ?? 0, stdout, stderr });
34
+ });
35
+ proc.on('error', (err) => {
36
+ resolve({ code: 1, stdout, stderr: err.message });
37
+ });
38
+ });
39
+ }
40
+ function resolveBinary(binaryName, projectDir) {
41
+ const localBin = path.join(projectDir, 'node_modules', '.bin', process.platform === 'win32' ? `${binaryName}.cmd` : binaryName);
42
+ if (fs.existsSync(localBin)) {
43
+ return localBin;
44
+ }
45
+ return binaryName;
46
+ }
47
+ function resolveSourceDirs(projectDir, explicitSourceDirs) {
48
+ if (explicitSourceDirs && explicitSourceDirs.length > 0) {
49
+ return explicitSourceDirs.map((d) => path.resolve(projectDir, d));
50
+ }
51
+ const discovery = discoverProject(projectDir);
52
+ if (discovery.packageDirectories.length > 0) {
53
+ return discovery.packageDirectories.map((d) => path.resolve(projectDir, d));
54
+ }
55
+ return [projectDir];
56
+ }
57
+ async function runStageProcess(binaryName, configPath, projectDir, runner) {
58
+ const bin = resolveBinary(binaryName, projectDir);
59
+ const res = await runner(bin, ['-c', configPath], projectDir);
60
+ if (res.code !== 0) {
61
+ const errorMsg = res.stderr || res.stdout || `Process exited with code ${res.code}`;
62
+ return { success: false, error: errorMsg };
63
+ }
64
+ return { success: true };
65
+ }
66
+ function executeRulesStage(projectDir, sourceDirs, dryRun, onStage) {
67
+ onStage?.('rules', 'start');
68
+ try {
69
+ const res = generateLwcRules({ rootDir: projectDir, sourceDirs, dryRun });
70
+ const count = res.filesCreated.length + res.filesUpdated.length;
71
+ onStage?.('rules', 'success', `Generated rules for ${count} components`);
72
+ return { modified: count };
73
+ }
74
+ catch (err) {
75
+ const msg = err.message;
76
+ onStage?.('rules', 'error', msg);
77
+ return { modified: 0, error: `Rules generation failed: ${msg}` };
78
+ }
79
+ }
80
+ async function executeGeneratorStage(projectDir, configRel, dryRun, runner, onStage) {
81
+ const configPath = path.resolve(projectDir, configRel);
82
+ if (!fs.existsSync(configPath)) {
83
+ onStage?.('utam-generate', 'skip', `Config '${configRel}' not found`);
84
+ return { executed: false };
85
+ }
86
+ onStage?.('utam-generate', 'start');
87
+ if (dryRun) {
88
+ onStage?.('utam-generate', 'success', '(dry-run: skipped process execution)');
89
+ return { executed: true };
90
+ }
91
+ const stageRes = await runStageProcess('utam-generate', configPath, projectDir, runner);
92
+ if (!stageRes.success) {
93
+ onStage?.('utam-generate', 'error', stageRes.error);
94
+ return { executed: false, error: `utam-generate failed: ${stageRes.error ?? ''}` };
95
+ }
96
+ onStage?.('utam-generate', 'success');
97
+ return { executed: true };
98
+ }
99
+ function executeOverridesStage(projectDir, sourceDirs, dryRun, onStage) {
100
+ onStage?.('overrides', 'start');
101
+ try {
102
+ const res = applyUtamOverrides({ rootDir: projectDir, sourceDirs, dryRun });
103
+ onStage?.('overrides', 'success', `Applied overrides to ${res.modifiedFilesCount} schemas`);
104
+ return { modified: res.modifiedFilesCount };
105
+ }
106
+ catch (err) {
107
+ const msg = err.message;
108
+ onStage?.('overrides', 'error', msg);
109
+ return { modified: 0, error: `Overrides failed: ${msg}` };
110
+ }
111
+ }
112
+ function executeRewriteStage(projectDir, sourceDirs, mapPathRel, dryRun, onStage) {
113
+ const mapPath = path.resolve(projectDir, mapPathRel);
114
+ if (!fs.existsSync(mapPath)) {
115
+ onStage?.('rewrite', 'skip', `Namespace map '${mapPathRel}' not found`);
116
+ return { modified: 0 };
117
+ }
118
+ onStage?.('rewrite', 'start');
119
+ try {
120
+ const res = rewriteUtamNamespaces({ rootDir: projectDir, sourceDirs, configFile: mapPath, dryRun });
121
+ if (res.configMissingOrEmpty) {
122
+ onStage?.('rewrite', 'skip', 'Namespace map is empty');
123
+ return { modified: 0 };
124
+ }
125
+ onStage?.('rewrite', 'success', `Rewrote namespaces in ${res.filesModified} schemas`);
126
+ return { modified: res.filesModified };
127
+ }
128
+ catch (err) {
129
+ const msg = err.message;
130
+ onStage?.('rewrite', 'error', msg);
131
+ return { modified: 0, error: `Namespace rewrite failed: ${msg}` };
132
+ }
133
+ }
134
+ async function executeCompilerStage(projectDir, configRel, dryRun, runner, onStage) {
135
+ const configPath = path.resolve(projectDir, configRel);
136
+ if (!fs.existsSync(configPath)) {
137
+ onStage?.('utam', 'skip', `Config '${configRel}' not found`);
138
+ return { executed: false };
139
+ }
140
+ onStage?.('utam', 'start');
141
+ if (dryRun) {
142
+ onStage?.('utam', 'success', '(dry-run: skipped process execution)');
143
+ return { executed: true };
144
+ }
145
+ const stageRes = await runStageProcess('utam', configPath, projectDir, runner);
146
+ if (!stageRes.success) {
147
+ onStage?.('utam', 'error', stageRes.error);
148
+ return { executed: false, error: `utam compiler failed: ${stageRes.error ?? ''}` };
149
+ }
150
+ onStage?.('utam', 'success');
151
+ return { executed: true };
152
+ }
153
+ /**
154
+ * Executes the complete SimplyUTAM compilation build pipeline sequentially:
155
+ * rules -> utam-generate -> overrides -> rewrite -> utam compiler.
156
+ *
157
+ * @param options - Build pipeline execution options.
158
+ * @returns Summary of execution results across all pipeline stages.
159
+ */
160
+ export async function executeBuildPipeline(options) {
161
+ const projectDir = path.resolve(options?.projectDir ?? process.cwd());
162
+ const dryRun = options?.dryRun ?? false;
163
+ const runner = options?.spawnCommand ?? defaultSpawn;
164
+ const onStage = options?.onStage;
165
+ const sourceDirs = resolveSourceDirs(projectDir, options?.sourceDirs);
166
+ // Stage 1: rules
167
+ const rules = executeRulesStage(projectDir, sourceDirs, dryRun, onStage);
168
+ if (rules.error) {
169
+ return {
170
+ success: false,
171
+ rulesModified: rules.modified,
172
+ overridesApplied: 0,
173
+ namespacesRewritten: 0,
174
+ generatorExecuted: false,
175
+ compilerExecuted: false,
176
+ errors: [rules.error],
177
+ };
178
+ }
179
+ // Stage 2: utam-generate
180
+ const gen = await executeGeneratorStage(projectDir, options?.generatorConfigPath ?? 'generator.config.json', dryRun, runner, onStage);
181
+ if (gen.error) {
182
+ return {
183
+ success: false,
184
+ rulesModified: rules.modified,
185
+ overridesApplied: 0,
186
+ namespacesRewritten: 0,
187
+ generatorExecuted: gen.executed,
188
+ compilerExecuted: false,
189
+ errors: [gen.error],
190
+ };
191
+ }
192
+ // Stage 3: overrides
193
+ const over = executeOverridesStage(projectDir, sourceDirs, dryRun, onStage);
194
+ if (over.error) {
195
+ return {
196
+ success: false,
197
+ rulesModified: rules.modified,
198
+ overridesApplied: over.modified,
199
+ namespacesRewritten: 0,
200
+ generatorExecuted: gen.executed,
201
+ compilerExecuted: false,
202
+ errors: [over.error],
203
+ };
204
+ }
205
+ // Stage 4: rewrite
206
+ const rew = executeRewriteStage(projectDir, sourceDirs, options?.namespaceMapPath ?? path.join('.utam', 'namespace-map.json'), dryRun, onStage);
207
+ if (rew.error) {
208
+ return {
209
+ success: false,
210
+ rulesModified: rules.modified,
211
+ overridesApplied: over.modified,
212
+ namespacesRewritten: rew.modified,
213
+ generatorExecuted: gen.executed,
214
+ compilerExecuted: false,
215
+ errors: [rew.error],
216
+ };
217
+ }
218
+ // Stage 5: utam compiler
219
+ const comp = await executeCompilerStage(projectDir, options?.utamConfigPath ?? 'utam.config.json', dryRun, runner, onStage);
220
+ if (comp.error) {
221
+ return {
222
+ success: false,
223
+ rulesModified: rules.modified,
224
+ overridesApplied: over.modified,
225
+ namespacesRewritten: rew.modified,
226
+ generatorExecuted: gen.executed,
227
+ compilerExecuted: comp.executed,
228
+ errors: [comp.error],
229
+ };
230
+ }
231
+ return {
232
+ success: true,
233
+ rulesModified: rules.modified,
234
+ overridesApplied: over.modified,
235
+ namespacesRewritten: rew.modified,
236
+ generatorExecuted: gen.executed,
237
+ compilerExecuted: comp.executed,
238
+ errors: [],
239
+ };
240
+ }
241
+ //# sourceMappingURL=pipeline-runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline-runner.js","sourceRoot":"","sources":["../src/pipeline-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,4BAA4B,CAAC;AAmCpC,SAAS,YAAY,CACnB,OAAe,EACf,IAAc,EACd,GAAW;IAEX,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;QAC/C,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAC7D,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,KAAsB,EAAE,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,QAAQ,E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