@wpkernel/pipeline 0.12.1-beta.0

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,15 @@
1
+ export { createHelper } from './helper';
2
+ export { createPipeline } from './createPipeline';
3
+ export { createPipelineExtension } from './createExtension';
4
+ export type { CreatePipelineExtensionOptions } from './createExtension';
5
+ export { executeHelpers } from './executor';
6
+ export type { ErrorFactory } from './error-factory';
7
+ export { createDefaultError, createErrorFactory } from './error-factory';
8
+ export { registerHelper, registerExtensionHook, handleExtensionRegisterResult, } from './registration';
9
+ export type { Pipeline, CreatePipelineOptions, PipelineReporter, PipelineExtension, PipelineExtensionHook, PipelineExtensionHookOptions, PipelineExtensionHookResult, PipelineDiagnostic, ConflictDiagnostic, MissingDependencyDiagnostic, UnusedHelperDiagnostic, Helper, HelperApplyFn, HelperDescriptor, HelperKind, HelperMode, CreateHelperOptions, HelperApplyOptions, MaybePromise, PipelineStep, PipelineRunState, HelperExecutionSnapshot, PipelineExecutionMetadata, FragmentFinalizationMetadata, PipelineExtensionRollbackErrorMetadata, } from './types';
10
+ export type { RegisteredHelper, MissingDependencyIssue, } from './dependency-graph';
11
+ export { createHelperId, compareHelpers } from './dependency-graph';
12
+ export { isPromiseLike, maybeThen, maybeTry, processSequentially, } from './async-utils';
13
+ export type { ExtensionHookEntry, ExtensionHookExecution, RollbackErrorArgs, } from './extensions';
14
+ export { createRollbackErrorMetadata } from './extensions';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACN,cAAc,EACd,qBAAqB,EACrB,6BAA6B,GAC7B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EAEX,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,kBAAkB,EAClB,kBAAkB,EAClB,2BAA2B,EAC3B,sBAAsB,EAGtB,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAGlB,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,sCAAsC,GACtC,MAAM,SAAS,CAAC;AAGjB,YAAY,EACX,gBAAgB,EAChB,sBAAsB,GACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpE,OAAO,EACN,aAAa,EACb,SAAS,EACT,QAAQ,EACR,mBAAmB,GACnB,MAAM,eAAe,CAAC;AAGvB,YAAY,EACX,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import { createHelper as o } from "./helper.js";
2
+ import { createPipeline as a } from "./createPipeline.js";
3
+ import { createPipelineExtension as i } from "./createExtension.js";
4
+ import { executeHelpers as m } from "./executor.js";
5
+ import { createDefaultError as x, createErrorFactory as c } from "./error-factory.js";
6
+ import { handleExtensionRegisterResult as f, registerExtensionHook as E, registerHelper as H } from "./registration.js";
7
+ import { compareHelpers as u, createHelperId as b } from "./dependency-graph.js";
8
+ import { isPromiseLike as g, maybeThen as k, maybeTry as P, processSequentially as R } from "./async-utils.js";
9
+ import { createRollbackErrorMetadata as T } from "./extensions.js";
10
+ /**
11
+ * @wpkernel/pipeline
12
+ * @license EUPL-1.2
13
+ */
14
+ export {
15
+ u as compareHelpers,
16
+ x as createDefaultError,
17
+ c as createErrorFactory,
18
+ o as createHelper,
19
+ b as createHelperId,
20
+ a as createPipeline,
21
+ i as createPipelineExtension,
22
+ T as createRollbackErrorMetadata,
23
+ m as executeHelpers,
24
+ f as handleExtensionRegisterResult,
25
+ g as isPromiseLike,
26
+ k as maybeThen,
27
+ P as maybeTry,
28
+ R as processSequentially,
29
+ E as registerExtensionHook,
30
+ H as registerHelper
31
+ };
@@ -0,0 +1,44 @@
1
+ import { Helper, HelperKind, PipelineExtensionHook, PipelineReporter } from './types';
2
+ import { RegisteredHelper } from './dependency-graph';
3
+ import { ExtensionHookEntry } from './extensions';
4
+ import { ErrorFactory } from './error-factory';
5
+ /**
6
+ * Registers a helper by validating its kind and checking for override conflicts.
7
+ *
8
+ * @param helper - The helper to register
9
+ * @param expectedKind - The expected helper kind
10
+ * @param entries - The array of registered helpers to add to
11
+ * @param kindName - Human-readable kind name for error messages
12
+ * @param onConflict - Callback invoked when an override conflict is detected
13
+ * @param createError - Error factory function
14
+ * @throws {Error} If kind mismatch or multiple overrides for the same key
15
+ *
16
+ * @internal
17
+ */
18
+ export declare function registerHelper<TContext, TInput, TOutput, TReporter extends PipelineReporter, TKind extends HelperKind, THelper extends Helper<TContext, TInput, TOutput, TReporter, TKind> = Helper<TContext, TInput, TOutput, TReporter, TKind>>(helper: THelper, expectedKind: HelperKind, entries: RegisteredHelper<THelper>[], kindName: string, onConflict: (helper: THelper, existing: THelper, message: string) => void, createError: ErrorFactory): void;
19
+ /**
20
+ * Registers an extension hook with an optional key.
21
+ *
22
+ * @param key - Optional unique key for the hook
23
+ * @param hook - The extension hook function
24
+ * @param extensionHooks - The array of registered extension hooks
25
+ * @returns The resolved key used for registration
26
+ *
27
+ * @internal
28
+ */
29
+ export declare function registerExtensionHook<TContext, TOptions, TArtifact>(key: string | undefined, hook: PipelineExtensionHook<TContext, TOptions, TArtifact>, extensionHooks: ExtensionHookEntry<TContext, TOptions, TArtifact>[]): string;
30
+ /**
31
+ * Handles the result of an extension's register() method.
32
+ *
33
+ * If the result is a function, registers it as an extension hook.
34
+ * Otherwise, returns the result unchanged.
35
+ *
36
+ * @param extensionKey - The extension's key
37
+ * @param result - The result from extension.register()
38
+ * @param extensionHooks - The array of registered extension hooks
39
+ * @returns The result if not a function, otherwise undefined
40
+ *
41
+ * @internal
42
+ */
43
+ export declare function handleExtensionRegisterResult<TContext, TOptions, TArtifact>(extensionKey: string | undefined, result: unknown, extensionHooks: ExtensionHookEntry<TContext, TOptions, TArtifact>[]): unknown;
44
+ //# sourceMappingURL=registration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registration.d.ts","sourceRoot":"","sources":["../src/registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,MAAM,EACN,UAAU,EACV,qBAAqB,EACrB,gBAAgB,EAChB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC7B,QAAQ,EACR,MAAM,EACN,OAAO,EACP,SAAS,SAAS,gBAAgB,EAClC,KAAK,SAAS,UAAU,EACxB,OAAO,SAAS,MAAM,CACrB,QAAQ,EACR,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,CACL,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,EAEvD,MAAM,EAAE,OAAO,EACf,YAAY,EAAE,UAAU,EACxB,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,EAAE,EACpC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,EACzE,WAAW,EAAE,YAAY,GACvB,IAAI,CA6BN;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAClE,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,IAAI,EAAE,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAC1D,cAAc,EAAE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,GACjE,MAAM,CAQR;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAC1E,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,MAAM,EAAE,OAAO,EACf,cAAc,EAAE,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,GACjE,OAAO,CAWT"}
@@ -0,0 +1,50 @@
1
+ import { createHelperId as u } from "./dependency-graph.js";
2
+ /**
3
+ * @wpkernel/pipeline
4
+ * @license EUPL-1.2
5
+ */
6
+ function k(e, t, i, o, f, r) {
7
+ if (e.kind !== t)
8
+ throw r(
9
+ "ValidationError",
10
+ `Attempted to register helper "${e.key}" as ${o} but received kind "${e.kind}".`
11
+ );
12
+ if (e.mode === "override") {
13
+ const s = i.find(
14
+ (n) => n.helper.key === e.key && n.helper.mode === "override"
15
+ );
16
+ if (s) {
17
+ const n = `Multiple overrides registered for helper "${e.key}".`;
18
+ throw f(e, s.helper, n), r("ValidationError", n);
19
+ }
20
+ }
21
+ const d = i.length;
22
+ i.push({
23
+ helper: e,
24
+ id: u(e, d),
25
+ index: d
26
+ });
27
+ }
28
+ function c(e, t, i) {
29
+ const o = e ?? `pipeline.extension#${i.length + 1}`;
30
+ return i.push({
31
+ key: o,
32
+ hook: t
33
+ }), o;
34
+ }
35
+ function p(e, t, i) {
36
+ if (typeof t == "function") {
37
+ c(
38
+ e,
39
+ t,
40
+ i
41
+ );
42
+ return;
43
+ }
44
+ return t;
45
+ }
46
+ export {
47
+ p as handleExtensionRegisterResult,
48
+ c as registerExtensionHook,
49
+ k as registerHelper
50
+ };
@@ -0,0 +1,332 @@
1
+ /**
2
+ * A type that can be either a value or a Promise of a value.
3
+ * @public
4
+ */
5
+ export type MaybePromise<T> = T | Promise<T>;
6
+ /**
7
+ * Helper kind identifier - can be 'fragment', 'builder', or any custom string.
8
+ * @public
9
+ */
10
+ export type HelperKind = 'fragment' | 'builder' | (string & {});
11
+ /**
12
+ * Helper execution mode - determines how it integrates with existing helpers.
13
+ *
14
+ * @remarks
15
+ * Currently only `extend` and `override` modes have implementation/validation logic.
16
+ * The `merge` mode is reserved for future use.
17
+ *
18
+ * @public
19
+ */
20
+ export type HelperMode = 'extend' | 'override' | 'merge';
21
+ /**
22
+ * Base error type for pipeline operations.
23
+ * Consumers can extend this to add framework-specific error codes.
24
+ * @public
25
+ */
26
+ export interface PipelineError extends Error {
27
+ readonly code: string;
28
+ readonly data?: Record<string, unknown>;
29
+ readonly context?: Record<string, unknown>;
30
+ }
31
+ /**
32
+ * Interface for reporting pipeline events and warnings.
33
+ * @public
34
+ */
35
+ export interface PipelineReporter {
36
+ warn?: (message: string, context?: unknown) => void;
37
+ }
38
+ /**
39
+ * Base descriptor for a pipeline helper.
40
+ * @public
41
+ */
42
+ export interface HelperDescriptor<TKind extends HelperKind = HelperKind> {
43
+ readonly key: string;
44
+ readonly kind: TKind;
45
+ readonly mode: HelperMode;
46
+ readonly priority: number;
47
+ readonly dependsOn: readonly string[];
48
+ readonly origin?: string;
49
+ /**
50
+ * Whether this helper is optional and may not execute.
51
+ * Optional helpers won't cause validation errors if they don't run.
52
+ * Useful for conditional/feature-flag helpers.
53
+ * @defaultValue false
54
+ */
55
+ readonly optional?: boolean;
56
+ }
57
+ /**
58
+ * Options passed to a helper's apply function.
59
+ * @public
60
+ */
61
+ export interface HelperApplyOptions<TContext, TInput, TOutput, TReporter extends PipelineReporter = PipelineReporter> {
62
+ readonly context: TContext;
63
+ readonly input: TInput;
64
+ readonly output: TOutput;
65
+ readonly reporter: TReporter;
66
+ }
67
+ /**
68
+ * Function signature for a pipeline helper's apply method.
69
+ *
70
+ * This function is responsible for transforming the pipeline's input and output.
71
+ * It can optionally call `next()` to pass control to the next helper in the pipeline.
72
+ *
73
+ * @template TContext - The type of the pipeline context.
74
+ * @template TInput - The type of the input artifact.
75
+ * @template TOutput - The type of the output artifact.
76
+ * @template TReporter - The type of the reporter used for logging.
77
+ * @param options - Options for the apply function, including context, input, output, and reporter.
78
+ * @param next - Optional function to call the next helper in the pipeline.
79
+ * @returns A promise that resolves when the helper has finished its work.
80
+ * @public
81
+ */
82
+ export type HelperApplyFn<TContext, TInput, TOutput, TReporter extends PipelineReporter = PipelineReporter> = (options: HelperApplyOptions<TContext, TInput, TOutput, TReporter>, next?: () => MaybePromise<void>) => MaybePromise<void>;
83
+ /**
84
+ * A complete pipeline helper with descriptor and apply function.
85
+ * @public
86
+ */
87
+ export interface Helper<TContext, TInput, TOutput, TReporter extends PipelineReporter = PipelineReporter, TKind extends HelperKind = HelperKind> extends HelperDescriptor<TKind> {
88
+ readonly apply: HelperApplyFn<TContext, TInput, TOutput, TReporter>;
89
+ }
90
+ /**
91
+ * Options for creating a new helper.
92
+ * @public
93
+ */
94
+ export interface CreateHelperOptions<TContext, TInput, TOutput, TReporter extends PipelineReporter = PipelineReporter, TKind extends HelperKind = HelperKind> {
95
+ readonly key: string;
96
+ readonly kind: TKind;
97
+ readonly mode?: HelperMode;
98
+ readonly priority?: number;
99
+ readonly dependsOn?: readonly string[];
100
+ readonly origin?: string;
101
+ readonly apply: HelperApplyFn<TContext, TInput, TOutput, TReporter>;
102
+ }
103
+ /**
104
+ * A pipeline step representing an executed helper.
105
+ * @public
106
+ */
107
+ export interface PipelineStep<TKind extends HelperKind = HelperKind> extends HelperDescriptor<TKind> {
108
+ readonly id: string;
109
+ readonly index: number;
110
+ }
111
+ /**
112
+ * Diagnostic for conflicting helper registrations.
113
+ * @public
114
+ */
115
+ export interface ConflictDiagnostic<TKind extends HelperKind = HelperKind> {
116
+ readonly type: 'conflict';
117
+ readonly key: string;
118
+ readonly mode: HelperMode;
119
+ readonly helpers: readonly string[];
120
+ readonly message: string;
121
+ readonly kind?: TKind;
122
+ }
123
+ /**
124
+ * Diagnostic for missing helper dependencies.
125
+ * @public
126
+ */
127
+ export interface MissingDependencyDiagnostic<TKind extends HelperKind = HelperKind> {
128
+ readonly type: 'missing-dependency';
129
+ readonly key: string;
130
+ readonly dependency: string;
131
+ readonly message: string;
132
+ readonly kind?: TKind;
133
+ readonly helper?: string;
134
+ }
135
+ /**
136
+ * Diagnostic for unused helpers.
137
+ * @public
138
+ */
139
+ export interface UnusedHelperDiagnostic<TKind extends HelperKind = HelperKind> {
140
+ readonly type: 'unused-helper';
141
+ readonly key: string;
142
+ readonly message: string;
143
+ readonly kind?: TKind;
144
+ readonly helper?: string;
145
+ readonly dependsOn?: readonly string[];
146
+ }
147
+ /**
148
+ * Union of all diagnostic types.
149
+ * @public
150
+ */
151
+ export type PipelineDiagnostic<TKind extends HelperKind = HelperKind> = ConflictDiagnostic<TKind> | MissingDependencyDiagnostic<TKind> | UnusedHelperDiagnostic<TKind>;
152
+ /**
153
+ * State returned from a pipeline run.
154
+ * @public
155
+ */
156
+ export interface PipelineRunState<TArtifact, TDiagnostic extends PipelineDiagnostic = PipelineDiagnostic> {
157
+ readonly artifact: TArtifact;
158
+ readonly diagnostics: readonly TDiagnostic[];
159
+ readonly steps: readonly PipelineStep[];
160
+ }
161
+ /**
162
+ * Snapshot of helper execution status.
163
+ * @public
164
+ */
165
+ export interface HelperExecutionSnapshot<TKind extends HelperKind = HelperKind> {
166
+ readonly kind: TKind;
167
+ readonly registered: readonly string[];
168
+ readonly executed: readonly string[];
169
+ readonly missing: readonly string[];
170
+ }
171
+ /**
172
+ * Metadata from fragment helper execution.
173
+ * @public
174
+ */
175
+ export interface FragmentFinalizationMetadata<TFragmentKind extends HelperKind = HelperKind> {
176
+ readonly fragments: HelperExecutionSnapshot<TFragmentKind>;
177
+ }
178
+ /**
179
+ * Complete execution metadata for all helper phases.
180
+ * @public
181
+ */
182
+ export interface PipelineExecutionMetadata<TFragmentKind extends HelperKind = HelperKind, TBuilderKind extends HelperKind = HelperKind> extends FragmentFinalizationMetadata<TFragmentKind> {
183
+ readonly builders: HelperExecutionSnapshot<TBuilderKind>;
184
+ }
185
+ /**
186
+ * Options passed to pipeline extension hooks.
187
+ * @public
188
+ */
189
+ export interface PipelineExtensionHookOptions<TContext, TOptions, TArtifact> {
190
+ readonly context: TContext;
191
+ readonly options: TOptions;
192
+ readonly artifact: TArtifact;
193
+ }
194
+ /**
195
+ * Result from a pipeline extension hook.
196
+ * @public
197
+ */
198
+ export interface PipelineExtensionHookResult<TArtifact> {
199
+ readonly artifact?: TArtifact;
200
+ readonly commit?: () => MaybePromise<void>;
201
+ readonly rollback?: () => MaybePromise<void>;
202
+ }
203
+ /**
204
+ * Metadata about an error during extension rollback.
205
+ * @public
206
+ */
207
+ export interface PipelineExtensionRollbackErrorMetadata {
208
+ readonly name?: string;
209
+ readonly message?: string;
210
+ readonly stack?: string;
211
+ readonly cause?: unknown;
212
+ }
213
+ /**
214
+ * A pipeline extension hook function.
215
+ * @public
216
+ */
217
+ export type PipelineExtensionHook<TContext, TOptions, TArtifact> = (options: PipelineExtensionHookOptions<TContext, TOptions, TArtifact>) => MaybePromise<PipelineExtensionHookResult<TArtifact> | void>;
218
+ /**
219
+ * A pipeline extension descriptor.
220
+ * @public
221
+ */
222
+ export interface PipelineExtension<TPipeline, TContext, TOptions, TArtifact> {
223
+ readonly key?: string;
224
+ register: (pipeline: TPipeline) => MaybePromise<void | PipelineExtensionHook<TContext, TOptions, TArtifact>>;
225
+ }
226
+ /**
227
+ * Options for creating a pipeline.
228
+ * @public
229
+ */
230
+ export interface CreatePipelineOptions<TRunOptions, TBuildOptions, TContext extends {
231
+ reporter: TReporter;
232
+ }, TReporter extends PipelineReporter = PipelineReporter, TDraft = unknown, TArtifact = unknown, TDiagnostic extends PipelineDiagnostic = PipelineDiagnostic, TRunResult = PipelineRunState<TArtifact, TDiagnostic>, TFragmentInput = unknown, TFragmentOutput = unknown, TBuilderInput = unknown, TBuilderOutput = unknown, TFragmentKind extends HelperKind = 'fragment', TBuilderKind extends HelperKind = 'builder', TFragmentHelper extends Helper<TContext, TFragmentInput, TFragmentOutput, TReporter, TFragmentKind> = Helper<TContext, TFragmentInput, TFragmentOutput, TReporter, TFragmentKind>, TBuilderHelper extends Helper<TContext, TBuilderInput, TBuilderOutput, TReporter, TBuilderKind> = Helper<TContext, TBuilderInput, TBuilderOutput, TReporter, TBuilderKind>> {
233
+ readonly fragmentKind?: TFragmentKind;
234
+ readonly builderKind?: TBuilderKind;
235
+ readonly createError?: (code: string, message: string) => Error;
236
+ readonly createBuildOptions: (options: TRunOptions) => TBuildOptions;
237
+ readonly createContext: (options: TRunOptions) => TContext;
238
+ readonly createFragmentState: (options: {
239
+ readonly options: TRunOptions;
240
+ readonly context: TContext;
241
+ readonly buildOptions: TBuildOptions;
242
+ }) => TDraft;
243
+ readonly createFragmentArgs: (options: {
244
+ readonly helper: TFragmentHelper;
245
+ readonly options: TRunOptions;
246
+ readonly context: TContext;
247
+ readonly buildOptions: TBuildOptions;
248
+ readonly draft: TDraft;
249
+ }) => HelperApplyOptions<TContext, TFragmentInput, TFragmentOutput, TReporter>;
250
+ readonly finalizeFragmentState: (options: {
251
+ readonly draft: TDraft;
252
+ readonly options: TRunOptions;
253
+ readonly context: TContext;
254
+ readonly buildOptions: TBuildOptions;
255
+ readonly helpers: FragmentFinalizationMetadata<TFragmentKind>;
256
+ }) => TArtifact;
257
+ readonly createBuilderArgs: (options: {
258
+ readonly helper: TBuilderHelper;
259
+ readonly options: TRunOptions;
260
+ readonly context: TContext;
261
+ readonly buildOptions: TBuildOptions;
262
+ readonly artifact: TArtifact;
263
+ }) => HelperApplyOptions<TContext, TBuilderInput, TBuilderOutput, TReporter>;
264
+ readonly createRunResult?: (options: {
265
+ readonly artifact: TArtifact;
266
+ readonly diagnostics: readonly TDiagnostic[];
267
+ readonly steps: readonly PipelineStep[];
268
+ readonly context: TContext;
269
+ readonly buildOptions: TBuildOptions;
270
+ readonly options: TRunOptions;
271
+ readonly helpers: PipelineExecutionMetadata<TFragmentKind, TBuilderKind>;
272
+ }) => TRunResult;
273
+ /**
274
+ * Optional hook invoked whenever a diagnostic is emitted during a run.
275
+ *
276
+ * Consumers can stream diagnostics to logs or UI shells while the
277
+ * pipeline executes instead of waiting for the final run result.
278
+ */
279
+ readonly onDiagnostic?: (options: {
280
+ readonly reporter: TReporter;
281
+ readonly diagnostic: TDiagnostic;
282
+ }) => void;
283
+ readonly createExtensionHookOptions?: (options: {
284
+ readonly context: TContext;
285
+ readonly options: TRunOptions;
286
+ readonly buildOptions: TBuildOptions;
287
+ readonly artifact: TArtifact;
288
+ }) => PipelineExtensionHookOptions<TContext, TRunOptions, TArtifact>;
289
+ readonly onExtensionRollbackError?: (options: {
290
+ readonly error: unknown;
291
+ readonly extensionKeys: readonly string[];
292
+ readonly hookSequence: readonly string[];
293
+ readonly errorMetadata: PipelineExtensionRollbackErrorMetadata;
294
+ readonly context: TContext;
295
+ }) => void;
296
+ readonly createConflictDiagnostic?: (options: {
297
+ readonly helper: TFragmentHelper | TBuilderHelper;
298
+ readonly existing: TFragmentHelper | TBuilderHelper;
299
+ readonly message: string;
300
+ }) => TDiagnostic;
301
+ readonly createMissingDependencyDiagnostic?: (options: {
302
+ readonly helper: TFragmentHelper | TBuilderHelper;
303
+ readonly dependency: string;
304
+ readonly message: string;
305
+ }) => TDiagnostic;
306
+ readonly createUnusedHelperDiagnostic?: (options: {
307
+ readonly helper: TFragmentHelper | TBuilderHelper;
308
+ readonly message: string;
309
+ }) => TDiagnostic;
310
+ }
311
+ /**
312
+ * A pipeline instance with helper registration and execution methods.
313
+ * @public
314
+ */
315
+ export interface Pipeline<TRunOptions, TRunResult, TContext extends {
316
+ reporter: TReporter;
317
+ }, TReporter extends PipelineReporter = PipelineReporter, TBuildOptions = unknown, TArtifact = unknown, TFragmentInput = unknown, TFragmentOutput = unknown, TBuilderInput = unknown, TBuilderOutput = unknown, TDiagnostic extends PipelineDiagnostic = PipelineDiagnostic, TFragmentKind extends HelperKind = 'fragment', TBuilderKind extends HelperKind = 'builder', TFragmentHelper extends Helper<TContext, TFragmentInput, TFragmentOutput, TReporter, TFragmentKind> = Helper<TContext, TFragmentInput, TFragmentOutput, TReporter, TFragmentKind>, TBuilderHelper extends Helper<TContext, TBuilderInput, TBuilderOutput, TReporter, TBuilderKind> = Helper<TContext, TBuilderInput, TBuilderOutput, TReporter, TBuilderKind>> {
318
+ readonly fragmentKind: TFragmentKind;
319
+ readonly builderKind: TBuilderKind;
320
+ readonly ir: {
321
+ use: (helper: TFragmentHelper) => void;
322
+ };
323
+ readonly builders: {
324
+ use: (helper: TBuilderHelper) => void;
325
+ };
326
+ readonly extensions: {
327
+ use: (extension: PipelineExtension<Pipeline<TRunOptions, TRunResult, TContext, TReporter, TBuildOptions, TArtifact, TFragmentInput, TFragmentOutput, TBuilderInput, TBuilderOutput, TDiagnostic, TFragmentKind, TBuilderKind, TFragmentHelper, TBuilderHelper>, TContext, TRunOptions, TArtifact>) => unknown | Promise<unknown>;
328
+ };
329
+ use: (helper: TFragmentHelper | TBuilderHelper) => void;
330
+ run: (options: TRunOptions) => MaybePromise<TRunResult>;
331
+ }
332
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mapp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AAQ,EACR,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,CACZ,GAAG,MAAM,CACT,QAAQ,EACR,aAAa,EACb,cAAc,EACd,SAAS,EACT,YAAY,CACZ;IAED,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,YAAY,CAAC;IACnC,QAAQ,CAAC,EAAE,EAAE;QACZ,GAAG,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;KACvC,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE;QAClB,GAAG,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;KACtC,CAAC;IACF,QAAQ,CAAC,UAAU,EAAE;QACpB,GAAG,EAAE,CACJ,SAAS,EAAE,iBAAiB,CAC3B,QAAQ,CACP,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,aAAa,EACb,SAAS,EACT,cAAc,EACd,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,CACd,EACD,QAAQ,EACR,WAAW,EACX,SAAS,CACT,KACG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;KAChC,CAAC;IACF,GAAG,EAAE,CAAC,MAAM,EAAE,eAAe,GAAG,cAAc,KAAK,IAAI,CAAC;IACxD,GAAG,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,YAAY,CAAC,UAAU,CAAC,CAAC;CACxD"}
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@wpkernel/pipeline",
3
+ "version": "0.12.1-beta.0",
4
+ "description": "Framework-agnostic pipeline orchestration primitives for WPKernel",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "registry": "https://registry.npmjs.org/",
10
+ "tag": "beta"
11
+ },
12
+ "main": "./dist/index.js",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "import": "./dist/index.js",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./package.json": "./package.json"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "devDependencies": {
27
+ "@wpkernel/scripts": "0.12.1-beta.0"
28
+ },
29
+ "scripts": {
30
+ "build": "vite build && tsc --project tsconfig.json",
31
+ "clean": "rm -rf dist dist-tests *.tsbuildinfo",
32
+ "lint": "eslint src/",
33
+ "lint:fix": "eslint src/ --fix",
34
+ "test": "wpk-run-jest",
35
+ "test:coverage": "wpk-run-jest coverage",
36
+ "test:integration": "wpk-run-jest integration",
37
+ "test:watch": "wpk-run-jest --watch",
38
+ "typecheck": "tsc --project tsconfig.json --noEmit",
39
+ "typecheck:tests": "wpk-run-typecheck-tests"
40
+ }
41
+ }