@async/pipeline 0.1.3

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.
Files changed (82) hide show
  1. package/README.md +68 -0
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +3 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/core.d.ts +2 -0
  7. package/dist/core.d.ts.map +1 -0
  8. package/dist/core.js +2 -0
  9. package/dist/core.js.map +1 -0
  10. package/dist/index.d.ts +4 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +4 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/internal/core/cache.d.ts +47 -0
  15. package/dist/internal/core/cache.d.ts.map +1 -0
  16. package/dist/internal/core/cache.js +81 -0
  17. package/dist/internal/core/cache.js.map +1 -0
  18. package/dist/internal/core/errors.d.ts +7 -0
  19. package/dist/internal/core/errors.d.ts.map +1 -0
  20. package/dist/internal/core/errors.js +14 -0
  21. package/dist/internal/core/errors.js.map +1 -0
  22. package/dist/internal/core/index.d.ts +347 -0
  23. package/dist/internal/core/index.d.ts.map +1 -0
  24. package/dist/internal/core/index.js +584 -0
  25. package/dist/internal/core/index.js.map +1 -0
  26. package/dist/internal/core/runtime.d.ts +111 -0
  27. package/dist/internal/core/runtime.d.ts.map +1 -0
  28. package/dist/internal/core/runtime.js +495 -0
  29. package/dist/internal/core/runtime.js.map +1 -0
  30. package/dist/internal/lima/index.d.ts +15 -0
  31. package/dist/internal/lima/index.d.ts.map +1 -0
  32. package/dist/internal/lima/index.js +65 -0
  33. package/dist/internal/lima/index.js.map +1 -0
  34. package/dist/internal/node/cli.d.ts +3 -0
  35. package/dist/internal/node/cli.d.ts.map +1 -0
  36. package/dist/internal/node/cli.js +410 -0
  37. package/dist/internal/node/cli.js.map +1 -0
  38. package/dist/internal/node/doctor.d.ts +7 -0
  39. package/dist/internal/node/doctor.d.ts.map +1 -0
  40. package/dist/internal/node/doctor.js +21 -0
  41. package/dist/internal/node/doctor.js.map +1 -0
  42. package/dist/internal/node/github.d.ts +48 -0
  43. package/dist/internal/node/github.d.ts.map +1 -0
  44. package/dist/internal/node/github.js +351 -0
  45. package/dist/internal/node/github.js.map +1 -0
  46. package/dist/internal/node/index.d.ts +8 -0
  47. package/dist/internal/node/index.d.ts.map +1 -0
  48. package/dist/internal/node/index.js +8 -0
  49. package/dist/internal/node/index.js.map +1 -0
  50. package/dist/internal/node/loader.d.ts +3 -0
  51. package/dist/internal/node/loader.d.ts.map +1 -0
  52. package/dist/internal/node/loader.js +10 -0
  53. package/dist/internal/node/loader.js.map +1 -0
  54. package/dist/internal/node/runner.d.ts +35 -0
  55. package/dist/internal/node/runner.d.ts.map +1 -0
  56. package/dist/internal/node/runner.js +527 -0
  57. package/dist/internal/node/runner.js.map +1 -0
  58. package/dist/internal/node/sources.d.ts +44 -0
  59. package/dist/internal/node/sources.d.ts.map +1 -0
  60. package/dist/internal/node/sources.js +187 -0
  61. package/dist/internal/node/sources.js.map +1 -0
  62. package/dist/internal/node/store.d.ts +23 -0
  63. package/dist/internal/node/store.d.ts.map +1 -0
  64. package/dist/internal/node/store.js +224 -0
  65. package/dist/internal/node/store.js.map +1 -0
  66. package/dist/internal/node/sync.d.ts +41 -0
  67. package/dist/internal/node/sync.d.ts.map +1 -0
  68. package/dist/internal/node/sync.js +332 -0
  69. package/dist/internal/node/sync.js.map +1 -0
  70. package/dist/lima.d.ts +2 -0
  71. package/dist/lima.d.ts.map +1 -0
  72. package/dist/lima.js +2 -0
  73. package/dist/lima.js.map +1 -0
  74. package/dist/node.d.ts +2 -0
  75. package/dist/node.d.ts.map +1 -0
  76. package/dist/node.js +2 -0
  77. package/dist/node.js.map +1 -0
  78. package/dist/runtime.d.ts +2 -0
  79. package/dist/runtime.d.ts.map +1 -0
  80. package/dist/runtime.js +2 -0
  81. package/dist/runtime.js.map +1 -0
  82. package/package.json +51 -0
@@ -0,0 +1,527 @@
1
+ import { spawn } from "node:child_process";
2
+ import { randomUUID } from "node:crypto";
3
+ import { setTimeout as delay } from "node:timers/promises";
4
+ import { sh, tasksForJob } from "../core/index.js";
5
+ import { computeTaskCacheKey, createStore, readCacheEntry, writeCacheEntry, writeExecution, writeTaskLog } from "./store.js";
6
+ import { createRunPlan, sourceContext } from "./sources.js";
7
+ export class HostRunnerAdapter {
8
+ name = "host";
9
+ runShell(command, options) {
10
+ return runProcess(command, { cwd: options.cwd, env: options.env, timeoutMs: options.timeoutMs });
11
+ }
12
+ async checkTool(tool) {
13
+ const result = await runProcess(`command -v ${shellEscape(tool)}`, { cwd: process.cwd(), env: process.env, echo: false });
14
+ return result.code === 0;
15
+ }
16
+ }
17
+ const memoryCacheEntries = new Map();
18
+ export async function runJob(pipeline, options) {
19
+ const adapter = options.adapter ?? new HostRunnerAdapter();
20
+ const store = await createStore(options.cwd);
21
+ const plan = await createRunPlan(pipeline, options.cwd, store);
22
+ const graph = tasksForJob(plan.pipeline, options.jobId);
23
+ const record = {
24
+ id: `${new Date().toISOString().replaceAll(/[:.]/g, "-")}-${randomUUID().slice(0, 8)}`,
25
+ pipelineName: plan.pipeline.name,
26
+ jobId: options.jobId,
27
+ cwd: options.cwd,
28
+ startedAt: new Date().toISOString(),
29
+ status: "running",
30
+ mode: options.mode ?? "manual",
31
+ tasks: [],
32
+ sources: Object.fromEntries(Object.entries(plan.sources).map(([sourceId, resolved]) => [sourceId, resolved.record]))
33
+ };
34
+ await writeExecution(store, record);
35
+ const preparedSources = new Set();
36
+ const jobDefinition = plan.pipeline.jobs[options.jobId];
37
+ const envDefinitions = {
38
+ ...plan.pipeline.env,
39
+ ...(jobDefinition?.env ?? {})
40
+ };
41
+ for (const taskId of graph.executionOrder) {
42
+ const taskDefinition = plan.pipeline.tasks[taskId];
43
+ if (!taskDefinition)
44
+ continue;
45
+ const taskSource = taskDefinition.source?.name ? plan.sources[taskDefinition.source.name] : undefined;
46
+ if (taskSource && !preparedSources.has(taskSource.id)) {
47
+ const prepareResult = await runSourcePrepare(taskSource, {
48
+ adapter,
49
+ candidate: plan.candidate,
50
+ rootCwd: options.cwd,
51
+ runId: record.id,
52
+ store
53
+ });
54
+ preparedSources.add(taskSource.id);
55
+ if (prepareResult) {
56
+ record.tasks.push(prepareResult);
57
+ await writeExecution(store, record);
58
+ if (prepareResult.status === "failed") {
59
+ record.status = "failed";
60
+ record.finishedAt = new Date().toISOString();
61
+ await writeExecution(store, record);
62
+ return record;
63
+ }
64
+ }
65
+ }
66
+ const result = await runTask(plan.pipeline, taskDefinition, {
67
+ adapter,
68
+ candidate: plan.candidate,
69
+ cwd: taskDefinition.source?.dir || options.cwd,
70
+ rootCwd: options.cwd,
71
+ runId: record.id,
72
+ source: taskDefinition.source,
73
+ envDefinitions,
74
+ sourcePrepareCommands: taskSource ? await resolvePrepareCommands(taskSource, {
75
+ candidate: plan.candidate,
76
+ rootCwd: options.cwd,
77
+ runId: record.id
78
+ }) : [],
79
+ store
80
+ });
81
+ record.tasks.push(result);
82
+ await writeExecution(store, record);
83
+ if (result.status === "failed") {
84
+ record.status = "failed";
85
+ record.finishedAt = new Date().toISOString();
86
+ await writeExecution(store, record);
87
+ return record;
88
+ }
89
+ }
90
+ record.status = "passed";
91
+ record.finishedAt = new Date().toISOString();
92
+ await writeExecution(store, record);
93
+ return record;
94
+ }
95
+ export async function runSingleTask(pipeline, taskId, options) {
96
+ const syntheticJobId = `task:${taskId}`;
97
+ const syntheticPipeline = {
98
+ ...pipeline,
99
+ jobs: {
100
+ ...pipeline.jobs,
101
+ [syntheticJobId]: { id: syntheticJobId, target: [taskId], trigger: [], mode: options.mode }
102
+ }
103
+ };
104
+ return runJob(syntheticPipeline, { ...options, jobId: syntheticJobId });
105
+ }
106
+ async function runTask(pipeline, taskDefinition, options) {
107
+ const started = Date.now();
108
+ const startedAt = new Date().toISOString();
109
+ const metadata = {};
110
+ let combinedLog = "";
111
+ let taskEnv;
112
+ try {
113
+ taskEnv = buildTaskEnv(process.env, {
114
+ candidate: options.candidate,
115
+ envDefinitions: options.envDefinitions,
116
+ rootCwd: options.rootCwd,
117
+ source: options.source,
118
+ taskId: taskDefinition.id
119
+ });
120
+ }
121
+ catch (error) {
122
+ const lastError = error instanceof Error ? error.message : String(error);
123
+ await writeTaskLog(options.store, options.runId, taskDefinition.id, `[env] ${lastError}\n`);
124
+ return {
125
+ id: taskDefinition.id,
126
+ status: "failed",
127
+ startedAt,
128
+ finishedAt: new Date().toISOString(),
129
+ durationMs: Date.now() - started,
130
+ attempts: 0,
131
+ cacheHit: false,
132
+ error: lastError,
133
+ metadata
134
+ };
135
+ }
136
+ const context = createTaskContext(taskDefinition, {
137
+ candidate: options.candidate,
138
+ cwd: options.cwd,
139
+ env: taskEnv,
140
+ metadata,
141
+ rootCwd: options.rootCwd,
142
+ runId: options.runId,
143
+ source: options.source,
144
+ writeLog(message) {
145
+ combinedLog += `${message}\n`;
146
+ }
147
+ });
148
+ const resolvedSteps = await resolveTaskSteps(taskDefinition.steps, context);
149
+ const cacheKey = await computeTaskCacheKey(pipeline, taskDefinition, options.cwd, {
150
+ candidate: options.candidate,
151
+ prepareCommands: (options.sourcePrepareCommands ?? []).map((command) => command.command),
152
+ source: options.source,
153
+ steps: resolvedSteps
154
+ });
155
+ if (taskDefinition.cache.enabled) {
156
+ const cached = await readTaskCacheEntry(taskDefinition, options.store, cacheKey);
157
+ if (cached?.status === "passed") {
158
+ const result = {
159
+ ...cached,
160
+ id: taskDefinition.id,
161
+ status: "cached",
162
+ startedAt,
163
+ finishedAt: new Date().toISOString(),
164
+ attempts: 0,
165
+ cacheKey,
166
+ cacheHit: true,
167
+ durationMs: Date.now() - started
168
+ };
169
+ await writeTaskLog(options.store, options.runId, taskDefinition.id, `[cache hit] ${cacheKey}\n`);
170
+ return result;
171
+ }
172
+ }
173
+ let attempts = 0;
174
+ let lastError = "";
175
+ const maxAttempts = Math.max(1, taskDefinition.retry.attempts);
176
+ while (attempts < maxAttempts) {
177
+ attempts += 1;
178
+ try {
179
+ for (const requirement of taskDefinition.requires?.tools ?? []) {
180
+ const ok = await options.adapter.checkTool?.(requirement);
181
+ if (ok === false) {
182
+ throw new Error(`Required tool "${requirement}" is not available for task "${taskDefinition.id}".`);
183
+ }
184
+ }
185
+ for (const secret of taskDefinition.requires?.secrets ?? []) {
186
+ if (!process.env[secret]) {
187
+ throw new Error(`Required secret "${secret}" is not available for task "${taskDefinition.id}".`);
188
+ }
189
+ }
190
+ for (const step of resolvedSteps) {
191
+ if (typeof step === "function") {
192
+ await runFunctionStep(step, context, taskDefinition.timeoutMs);
193
+ continue;
194
+ }
195
+ if (!isShellCommand(step)) {
196
+ throw new Error(`Deferred shell step for task "${taskDefinition.id}" was not resolved.`);
197
+ }
198
+ const result = await runShellStep(step, taskDefinition, { ...options, env: taskEnv });
199
+ combinedLog += result.stdout;
200
+ combinedLog += result.stderr;
201
+ if (result.timedOut) {
202
+ throw new Error(`Task "${taskDefinition.id}" timed out after ${taskDefinition.timeoutMs}ms.`);
203
+ }
204
+ if (result.code !== 0) {
205
+ throw new Error(`Command failed with exit code ${result.code}: ${step.command}`);
206
+ }
207
+ }
208
+ const finishedAt = new Date().toISOString();
209
+ const result = {
210
+ id: taskDefinition.id,
211
+ status: "passed",
212
+ startedAt,
213
+ finishedAt,
214
+ durationMs: Date.now() - started,
215
+ attempts,
216
+ cacheKey,
217
+ cacheHit: false,
218
+ metadata
219
+ };
220
+ await writeTaskLog(options.store, options.runId, taskDefinition.id, combinedLog);
221
+ if (taskDefinition.cache.enabled) {
222
+ await writeTaskCacheEntry(taskDefinition, options.store, cacheKey, result);
223
+ }
224
+ return result;
225
+ }
226
+ catch (error) {
227
+ lastError = error instanceof Error ? error.message : String(error);
228
+ combinedLog += `[attempt ${attempts}] ${lastError}\n`;
229
+ if (attempts < maxAttempts && taskDefinition.retry.delayMs) {
230
+ await delay(taskDefinition.retry.delayMs);
231
+ }
232
+ }
233
+ }
234
+ const result = {
235
+ id: taskDefinition.id,
236
+ status: "failed",
237
+ startedAt,
238
+ finishedAt: new Date().toISOString(),
239
+ durationMs: Date.now() - started,
240
+ attempts,
241
+ cacheKey,
242
+ cacheHit: false,
243
+ error: lastError,
244
+ metadata
245
+ };
246
+ await writeTaskLog(options.store, options.runId, taskDefinition.id, combinedLog);
247
+ return result;
248
+ }
249
+ async function runShellStep(step, taskDefinition, options) {
250
+ return options.adapter.runShell(step.command, {
251
+ cwd: options.cwd,
252
+ env: options.env,
253
+ task: taskDefinition,
254
+ timeoutMs: taskDefinition.timeoutMs
255
+ });
256
+ }
257
+ async function runSourcePrepare(source, options) {
258
+ if (source.definition.prepare.length === 0)
259
+ return null;
260
+ const started = Date.now();
261
+ const startedAt = new Date().toISOString();
262
+ const taskId = `${source.id}:prepare`;
263
+ const sourceTaskContext = sourceContext(source);
264
+ let log = "";
265
+ const context = createTaskContext({ id: taskId }, {
266
+ candidate: options.candidate,
267
+ cwd: source.dir,
268
+ env: buildTaskEnv(process.env, {
269
+ candidate: options.candidate,
270
+ rootCwd: options.rootCwd,
271
+ source: sourceTaskContext
272
+ }),
273
+ metadata: {},
274
+ rootCwd: options.rootCwd,
275
+ runId: options.runId,
276
+ source: sourceTaskContext,
277
+ writeLog(message) {
278
+ log += `${message}\n`;
279
+ }
280
+ });
281
+ const steps = await resolveTaskSteps(source.definition.prepare, context);
282
+ try {
283
+ for (const step of steps) {
284
+ if (typeof step === "function") {
285
+ await runFunctionStep(step, context);
286
+ continue;
287
+ }
288
+ if (!isShellCommand(step)) {
289
+ throw new Error(`Deferred shell step for source "${source.id}" was not resolved.`);
290
+ }
291
+ const result = await options.adapter.runShell(step.command, {
292
+ cwd: source.dir,
293
+ env: buildTaskEnv(process.env, {
294
+ candidate: options.candidate,
295
+ rootCwd: options.rootCwd,
296
+ source: sourceTaskContext
297
+ }),
298
+ task: { id: taskId }
299
+ });
300
+ log += result.stdout;
301
+ log += result.stderr;
302
+ if (result.code !== 0) {
303
+ throw new Error(`Command failed with exit code ${result.code}: ${step.command}`);
304
+ }
305
+ }
306
+ const result = {
307
+ id: taskId,
308
+ status: "passed",
309
+ startedAt,
310
+ finishedAt: new Date().toISOString(),
311
+ durationMs: Date.now() - started,
312
+ attempts: 1,
313
+ cacheHit: false
314
+ };
315
+ await writeTaskLog(options.store, options.runId, taskId, log);
316
+ return result;
317
+ }
318
+ catch (error) {
319
+ const result = {
320
+ id: taskId,
321
+ status: "failed",
322
+ startedAt,
323
+ finishedAt: new Date().toISOString(),
324
+ durationMs: Date.now() - started,
325
+ attempts: 1,
326
+ cacheHit: false,
327
+ error: error instanceof Error ? error.message : String(error)
328
+ };
329
+ log += `[prepare] ${result.error}\n`;
330
+ await writeTaskLog(options.store, options.runId, taskId, log);
331
+ return result;
332
+ }
333
+ }
334
+ async function resolvePrepareCommands(source, options) {
335
+ const context = createTaskContext({ id: `${source.id}:prepare` }, {
336
+ candidate: options.candidate,
337
+ cwd: source.dir,
338
+ env: buildTaskEnv(process.env, {
339
+ candidate: options.candidate,
340
+ rootCwd: options.rootCwd,
341
+ source: sourceContext(source)
342
+ }),
343
+ metadata: {},
344
+ rootCwd: options.rootCwd,
345
+ runId: options.runId,
346
+ source: sourceContext(source),
347
+ writeLog() { }
348
+ });
349
+ const steps = await resolveTaskSteps(source.definition.prepare, context);
350
+ return steps.filter(isShellCommand);
351
+ }
352
+ async function resolveTaskSteps(steps, context) {
353
+ const resolved = [];
354
+ for (const step of steps) {
355
+ if (typeof step === "function" || step.kind === "shell") {
356
+ resolved.push(step);
357
+ continue;
358
+ }
359
+ const command = await step.command(context);
360
+ if (command.kind !== "shell") {
361
+ throw new Error(`Deferred shell step for task "${context.taskId}" must return sh\`...\`.`);
362
+ }
363
+ resolved.push(command);
364
+ }
365
+ return resolved;
366
+ }
367
+ function createTaskContext(taskDefinition, options) {
368
+ return {
369
+ taskId: taskDefinition.id,
370
+ runId: options.runId,
371
+ cwd: options.cwd,
372
+ env: options.env,
373
+ root: {
374
+ dir: options.rootCwd
375
+ },
376
+ candidate: options.candidate,
377
+ source: options.source,
378
+ meta(values) {
379
+ Object.assign(options.metadata, values);
380
+ },
381
+ log(message) {
382
+ options.writeLog(message);
383
+ },
384
+ sh
385
+ };
386
+ }
387
+ function buildTaskEnv(baseEnv, options) {
388
+ const resolvedEnv = resolveEnvDefinitions(options.envDefinitions ?? {}, baseEnv, options.taskId);
389
+ return {
390
+ ...baseEnv,
391
+ ...resolvedEnv,
392
+ ASYNC_PIPELINE_ROOT_DIR: options.rootCwd,
393
+ ASYNC_PIPELINE_CANDIDATE_DIR: options.candidate.dir,
394
+ ASYNC_PIPELINE_CANDIDATE_FINGERPRINT: options.candidate.fingerprint,
395
+ ASYNC_PIPELINE_SOURCE_NAME: options.source?.name,
396
+ ASYNC_PIPELINE_SOURCE_DIR: options.source?.dir,
397
+ ASYNC_PIPELINE_SOURCE_REF: options.source?.ref,
398
+ ASYNC_PIPELINE_SOURCE_COMMIT: options.source?.commit
399
+ };
400
+ }
401
+ function resolveEnvDefinitions(definitions, baseEnv, taskId = "unknown") {
402
+ const resolved = {};
403
+ for (const [key, value] of Object.entries(definitions)) {
404
+ if (typeof value === "string") {
405
+ resolved[key] = value;
406
+ continue;
407
+ }
408
+ if (value.kind === "async-pipeline.env.secret") {
409
+ const secretValue = baseEnv[value.name] ?? baseEnv[key];
410
+ if (secretValue === undefined || secretValue === "") {
411
+ throw new Error(`Required secret "${value.name}" for env "${key}" is not available for task "${taskId}".`);
412
+ }
413
+ resolved[key] = secretValue;
414
+ continue;
415
+ }
416
+ if (value.kind === "async-pipeline.env.var") {
417
+ const selector = baseEnv[value.name] ?? baseEnv[key] ?? value.default;
418
+ if (selector === undefined || selector === "") {
419
+ throw new Error(`Required variable "${value.name}" for env "${key}" is not available for task "${taskId}".`);
420
+ }
421
+ if (value.values) {
422
+ const mapped = value.values[selector];
423
+ if (mapped === undefined) {
424
+ throw new Error(`Variable "${value.name}" value "${selector}" is not mapped for env "${key}" in task "${taskId}".`);
425
+ }
426
+ resolved[key] = mapped;
427
+ }
428
+ else {
429
+ resolved[key] = selector;
430
+ }
431
+ continue;
432
+ }
433
+ }
434
+ return resolved;
435
+ }
436
+ function isShellCommand(step) {
437
+ return typeof step !== "function" && step.kind === "shell";
438
+ }
439
+ async function readTaskCacheEntry(taskDefinition, store, cacheKey) {
440
+ const storeName = taskDefinition.cache.store ?? "file";
441
+ if (storeName === "file")
442
+ return readCacheEntry(store, cacheKey);
443
+ if (storeName === "memory")
444
+ return memoryCacheEntries.get(cacheKey) ?? null;
445
+ throw new Error(`Cache store "${storeName}" is registered but this runner cannot execute it. Use "file" or "memory", or provide a runtime-specific adapter.`);
446
+ }
447
+ async function writeTaskCacheEntry(taskDefinition, store, cacheKey, result) {
448
+ const storeName = taskDefinition.cache.store ?? "file";
449
+ if (storeName === "file") {
450
+ await writeCacheEntry(store, cacheKey, result);
451
+ return;
452
+ }
453
+ if (storeName === "memory") {
454
+ memoryCacheEntries.set(cacheKey, result);
455
+ return;
456
+ }
457
+ throw new Error(`Cache store "${storeName}" is registered but this runner cannot execute it. Use "file" or "memory", or provide a runtime-specific adapter.`);
458
+ }
459
+ async function runFunctionStep(step, context, timeoutMs) {
460
+ if (!timeoutMs) {
461
+ await step(context);
462
+ return;
463
+ }
464
+ let timeout;
465
+ try {
466
+ await Promise.race([
467
+ Promise.resolve(step(context)),
468
+ new Promise((_, reject) => {
469
+ timeout = setTimeout(() => reject(new Error(`Task "${context.taskId}" timed out after ${timeoutMs}ms.`)), timeoutMs);
470
+ })
471
+ ]);
472
+ }
473
+ finally {
474
+ if (timeout)
475
+ clearTimeout(timeout);
476
+ }
477
+ }
478
+ function runProcess(command, options) {
479
+ return new Promise((resolve) => {
480
+ const child = spawn(command, {
481
+ cwd: options.cwd,
482
+ env: options.env,
483
+ shell: true,
484
+ stdio: ["ignore", "pipe", "pipe"]
485
+ });
486
+ let stdout = "";
487
+ let stderr = "";
488
+ let timedOut = false;
489
+ let timeout;
490
+ let forceKillTimeout;
491
+ if (options.timeoutMs) {
492
+ timeout = setTimeout(() => {
493
+ timedOut = true;
494
+ child.kill("SIGTERM");
495
+ forceKillTimeout = setTimeout(() => child.kill("SIGKILL"), 500);
496
+ }, options.timeoutMs);
497
+ }
498
+ child.stdout.setEncoding("utf8");
499
+ child.stderr.setEncoding("utf8");
500
+ child.stdout.on("data", (chunk) => {
501
+ stdout += chunk;
502
+ if (options.echo !== false)
503
+ process.stdout.write(chunk);
504
+ });
505
+ child.stderr.on("data", (chunk) => {
506
+ stderr += chunk;
507
+ if (options.echo !== false)
508
+ process.stderr.write(chunk);
509
+ });
510
+ child.on("close", (code) => {
511
+ if (timeout)
512
+ clearTimeout(timeout);
513
+ if (forceKillTimeout)
514
+ clearTimeout(forceKillTimeout);
515
+ if (timedOut) {
516
+ const timeoutMessage = `[timeout] Command timed out after ${options.timeoutMs}ms.\n`;
517
+ resolve({ code: 124, stdout, stderr: `${stderr}${timeoutMessage}`, timedOut: true });
518
+ return;
519
+ }
520
+ resolve({ code: code ?? 1, stdout, stderr });
521
+ });
522
+ });
523
+ }
524
+ function shellEscape(value) {
525
+ return `'${value.replaceAll("'", "'\\''")}'`;
526
+ }
527
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAsB,MAAM,YAAY,CAAC;AACjJ,OAAO,EAAE,aAAa,EAAE,aAAa,EAAuB,MAAM,cAAc,CAAC;AAejF,MAAM,OAAO,iBAAiB;IAC5B,I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CAAC,CAAC;QACH,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;YACxC,MAAM,IAAI,KAAK,CAAC;YAChB,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK;gBAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACzB,IAAI,OAAO;gBAAE,YAAY,CAAC,OAAO,CAAC,CAAC;YACnC,IAAI,gBAAgB;gBAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;YACrD,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,cAAc,GAAG,qCAAqC,OAAO,CAAC,SAAS,OAAO,CAAC;gBACrF,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;gBACrF,OAAO;YACT,CAAC;YACD,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { type CandidateContext, type ExecutionSourceRecord, type NormalizedPipeline, type NormalizedSource, type ShellCommand, type SourceId, type TaskSourceContext } from "../core/index.js";
2
+ import { type PipelineStore } from "./store.js";
3
+ export interface ResolvedSource {
4
+ id: SourceId;
5
+ definition: NormalizedSource;
6
+ dir: string;
7
+ pipelinePath: string;
8
+ record: ExecutionSourceRecord;
9
+ pipeline?: NormalizedPipeline;
10
+ }
11
+ export interface SourceResolveOptions {
12
+ sync?: boolean;
13
+ loadPipelines?: boolean;
14
+ requirePrepareWritable?: boolean;
15
+ }
16
+ export interface PipelineRunPlan {
17
+ rootPipeline: NormalizedPipeline;
18
+ pipeline: NormalizedPipeline;
19
+ candidate: CandidateContext;
20
+ sources: Record<SourceId, ResolvedSource>;
21
+ }
22
+ export interface MatrixRow {
23
+ task: string;
24
+ source: string;
25
+ taskId: string;
26
+ type: "git" | "path";
27
+ url?: string;
28
+ path?: string;
29
+ ref?: string;
30
+ }
31
+ export declare function createRunPlan(rootPipeline: NormalizedPipeline, cwd: string, store: PipelineStore): Promise<PipelineRunPlan>;
32
+ export declare function resolveSources(pipeline: NormalizedPipeline, cwd: string, store: PipelineStore, options?: SourceResolveOptions): Promise<Record<SourceId, ResolvedSource>>;
33
+ export declare function readPipelineMetadata(configPath: string, options?: {
34
+ includeSources?: boolean;
35
+ cwd?: string;
36
+ store?: PipelineStore;
37
+ }): Promise<unknown>;
38
+ export declare function matrixForJob(pipeline: NormalizedPipeline, jobId: string): {
39
+ include: MatrixRow[];
40
+ };
41
+ export declare function sourceContext(source: ResolvedSource): TaskSourceContext;
42
+ export declare function sourceCheckoutDir(store: PipelineStore, sourceDefinition: NormalizedSource): string;
43
+ export declare function shellCommandsFromSteps(steps: readonly ShellCommand[]): string[];
44
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../src/sources.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,WAAW,cAAc;IAC7B,EAAE,EA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