Skip to content

Commit 1a0a929

Browse files
Add a build manifest build step
1 parent c7bb834 commit 1a0a929

File tree

9 files changed

+1186
-40
lines changed

9 files changed

+1186
-40
lines changed

packages/app/src/cli/models/extensions/extension-instance.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,19 +348,14 @@ export class ExtensionInstance<TConfiguration extends BaseConfigType = BaseConfi
348348
extension: this,
349349
options,
350350
stepResults: new Map(),
351-
signal: options.signal,
352351
}
353352

354-
const steps = buildConfig.mode === 'none' ? [] : buildConfig.steps
353+
const steps = buildConfig.steps ?? []
355354

356355
for (const step of steps) {
357356
// eslint-disable-next-line no-await-in-loop
358357
const result = await executeStep(step, context)
359358
context.stepResults.set(step.id, result)
360-
361-
if (!result.success && !step.continueOnError) {
362-
throw new Error(`Build step "${step.displayName}" failed: ${result.error?.message}`)
363-
}
364359
}
365360
}
366361

packages/app/src/cli/services/build/build-steps.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import {Writable} from 'stream'
99
function buildOptions(): ExtensionBuildOptions {
1010
return {
1111
stdout: new Writable({
12-
write(chunk, encoding, callback) {
12+
write(_chunk, _encoding, callback) {
1313
callback()
1414
},
1515
}),
1616
stderr: new Writable({
17-
write(chunk, encoding, callback) {
17+
write(_chunk, _encoding, callback) {
1818
callback()
1919
},
2020
}),

packages/app/src/cli/services/build/build-steps.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface BuildStep {
2525
/** Step type (determines which executor handles it) */
2626
readonly type:
2727
| 'copy_files'
28+
| 'build_manifest'
2829
| 'build_theme'
2930
| 'bundle_theme'
3031
| 'bundle_ui'
@@ -60,15 +61,12 @@ export interface BuildContext {
6061

6162
/** Results from previous steps (for step dependencies) */
6263
readonly stepResults: Map<string, StepResult>
63-
64-
/** Custom data that steps can write to (extensible) */
65-
[key: string]: unknown
6664
}
6765

6866
/**
6967
* Result of a step execution
7068
*/
71-
interface StepResult {
69+
export interface StepResult {
7270
readonly stepId: string
7371
readonly displayName: string
7472
readonly success: boolean

0 commit comments

Comments
 (0)