duron 0.2.2 → 0.3.0-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.
- package/dist/action-job.d.ts +2 -0
- package/dist/action-job.d.ts.map +1 -1
- package/dist/action-job.js +20 -1
- package/dist/action-manager.d.ts +2 -0
- package/dist/action-manager.d.ts.map +1 -1
- package/dist/action-manager.js +3 -0
- package/dist/action.d.ts +7 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +1 -0
- package/dist/adapters/adapter.d.ts +10 -2
- package/dist/adapters/adapter.d.ts.map +1 -1
- package/dist/adapters/adapter.js +59 -1
- package/dist/adapters/postgres/base.d.ts +9 -4
- package/dist/adapters/postgres/base.d.ts.map +1 -1
- package/dist/adapters/postgres/base.js +269 -19
- package/dist/adapters/postgres/schema.d.ts +249 -105
- package/dist/adapters/postgres/schema.d.ts.map +1 -1
- package/dist/adapters/postgres/schema.default.d.ts +249 -106
- package/dist/adapters/postgres/schema.default.d.ts.map +1 -1
- package/dist/adapters/postgres/schema.default.js +2 -2
- package/dist/adapters/postgres/schema.js +29 -1
- package/dist/adapters/schemas.d.ts +140 -7
- package/dist/adapters/schemas.d.ts.map +1 -1
- package/dist/adapters/schemas.js +52 -4
- package/dist/client.d.ts +8 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +28 -0
- package/dist/errors.d.ts +6 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +16 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/server.d.ts +220 -16
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +123 -8
- package/dist/step-manager.d.ts +8 -2
- package/dist/step-manager.d.ts.map +1 -1
- package/dist/step-manager.js +138 -15
- package/dist/telemetry/adapter.d.ts +85 -0
- package/dist/telemetry/adapter.d.ts.map +1 -0
- package/dist/telemetry/adapter.js +128 -0
- package/dist/telemetry/index.d.ts +5 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +4 -0
- package/dist/telemetry/local.d.ts +21 -0
- package/dist/telemetry/local.d.ts.map +1 -0
- package/dist/telemetry/local.js +180 -0
- package/dist/telemetry/noop.d.ts +16 -0
- package/dist/telemetry/noop.d.ts.map +1 -0
- package/dist/telemetry/noop.js +39 -0
- package/dist/telemetry/opentelemetry.d.ts +24 -0
- package/dist/telemetry/opentelemetry.d.ts.map +1 -0
- package/dist/telemetry/opentelemetry.js +202 -0
- package/migrations/postgres/20260117231749_clumsy_penance/migration.sql +3 -0
- package/migrations/postgres/20260117231749_clumsy_penance/snapshot.json +988 -0
- package/migrations/postgres/20260118202533_wealthy_mysterio/migration.sql +24 -0
- package/migrations/postgres/20260118202533_wealthy_mysterio/snapshot.json +1362 -0
- package/package.json +6 -4
- package/src/action-job.ts +35 -0
- package/src/action-manager.ts +5 -0
- package/src/action.ts +56 -0
- package/src/adapters/adapter.ts +151 -0
- package/src/adapters/postgres/base.ts +342 -23
- package/src/adapters/postgres/schema.default.ts +2 -2
- package/src/adapters/postgres/schema.ts +49 -1
- package/src/adapters/schemas.ts +81 -5
- package/src/client.ts +78 -0
- package/src/errors.ts +45 -1
- package/src/index.ts +3 -1
- package/src/server.ts +163 -8
- package/src/step-manager.ts +232 -13
- package/src/telemetry/adapter.ts +468 -0
- package/src/telemetry/index.ts +17 -0
- package/src/telemetry/local.ts +336 -0
- package/src/telemetry/noop.ts +95 -0
- package/src/telemetry/opentelemetry.ts +310 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import createSchema from './schema.js';
|
|
2
|
-
const { schema, jobsTable, jobStepsTable } = createSchema('duron');
|
|
3
|
-
export { schema, jobsTable, jobStepsTable };
|
|
2
|
+
const { schema, jobsTable, jobStepsTable, metricsTable } = createSchema('duron');
|
|
3
|
+
export { schema, jobsTable, jobStepsTable, metricsTable };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sql } from 'drizzle-orm';
|
|
2
|
-
import { check, index, integer, jsonb, pgSchema, text, timestamp, unique, uuid } from 'drizzle-orm/pg-core';
|
|
2
|
+
import { boolean, check, doublePrecision, index, integer, jsonb, pgSchema, text, timestamp, unique, uuid, } from 'drizzle-orm/pg-core';
|
|
3
3
|
import { JOB_STATUSES, STEP_STATUS_ACTIVE, STEP_STATUSES } from '../../constants.js';
|
|
4
4
|
export default function createSchema(schemaName) {
|
|
5
5
|
const schema = pgSchema(schemaName);
|
|
@@ -46,6 +46,8 @@ export default function createSchema(schemaName) {
|
|
|
46
46
|
job_id: uuid('job_id')
|
|
47
47
|
.notNull()
|
|
48
48
|
.references(() => jobsTable.id, { onDelete: 'cascade' }),
|
|
49
|
+
parent_step_id: uuid('parent_step_id'),
|
|
50
|
+
parallel: boolean('branch').notNull().default(false),
|
|
49
51
|
name: text('name').notNull(),
|
|
50
52
|
status: text('status').$type().notNull().default(STEP_STATUS_ACTIVE),
|
|
51
53
|
output: jsonb('output'),
|
|
@@ -73,15 +75,41 @@ export default function createSchema(schemaName) {
|
|
|
73
75
|
index('idx_job_steps_status').on(table.status),
|
|
74
76
|
index('idx_job_steps_name').on(table.name),
|
|
75
77
|
index('idx_job_steps_expires_at').on(table.expires_at),
|
|
78
|
+
index('idx_job_steps_parent_step_id').on(table.parent_step_id),
|
|
76
79
|
index('idx_job_steps_job_status').on(table.job_id, table.status),
|
|
77
80
|
index('idx_job_steps_job_name').on(table.job_id, table.name),
|
|
78
81
|
index('idx_job_steps_output_fts').using('gin', sql `to_tsvector('english', ${table.output}::text)`),
|
|
79
82
|
unique('unique_job_step_name').on(table.job_id, table.name),
|
|
80
83
|
check('job_steps_status_check', sql `${table.status} IN ${sql.raw(`(${STEP_STATUSES.map((s) => `'${s}'`).join(',')})`)}`),
|
|
81
84
|
]);
|
|
85
|
+
const metricsTable = schema.table('metrics', {
|
|
86
|
+
id: uuid('id').primaryKey().defaultRandom(),
|
|
87
|
+
job_id: uuid('job_id')
|
|
88
|
+
.notNull()
|
|
89
|
+
.references(() => jobsTable.id, { onDelete: 'cascade' }),
|
|
90
|
+
step_id: uuid('step_id').references(() => jobStepsTable.id, { onDelete: 'cascade' }),
|
|
91
|
+
name: text('name').notNull(),
|
|
92
|
+
value: doublePrecision('value').notNull(),
|
|
93
|
+
attributes: jsonb('attributes').$type().notNull().default({}),
|
|
94
|
+
type: text('type').$type().notNull(),
|
|
95
|
+
timestamp: timestamp('timestamp', { withTimezone: true }).notNull().defaultNow(),
|
|
96
|
+
created_at: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
|
|
97
|
+
}, (table) => [
|
|
98
|
+
index('idx_metrics_job_id').on(table.job_id),
|
|
99
|
+
index('idx_metrics_step_id').on(table.step_id),
|
|
100
|
+
index('idx_metrics_name').on(table.name),
|
|
101
|
+
index('idx_metrics_type').on(table.type),
|
|
102
|
+
index('idx_metrics_timestamp').on(table.timestamp),
|
|
103
|
+
index('idx_metrics_job_step').on(table.job_id, table.step_id),
|
|
104
|
+
index('idx_metrics_job_name').on(table.job_id, table.name),
|
|
105
|
+
index('idx_metrics_job_type').on(table.job_id, table.type),
|
|
106
|
+
index('idx_metrics_attributes').using('gin', table.attributes),
|
|
107
|
+
check('metrics_type_check', sql `${table.type} IN ('metric', 'span_event', 'span_attribute')`),
|
|
108
|
+
]);
|
|
82
109
|
return {
|
|
83
110
|
schema,
|
|
84
111
|
jobsTable,
|
|
85
112
|
jobStepsTable,
|
|
113
|
+
metricsTable,
|
|
86
114
|
};
|
|
87
115
|
}
|
|
@@ -44,6 +44,8 @@ export declare const JobSchema: z.ZodObject<{
|
|
|
44
44
|
export declare const JobStepSchema: z.ZodObject<{
|
|
45
45
|
id: z.ZodString;
|
|
46
46
|
jobId: z.ZodString;
|
|
47
|
+
parentStepId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
48
|
+
parallel: z.ZodDefault<z.ZodBoolean>;
|
|
47
49
|
name: z.ZodString;
|
|
48
50
|
output: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
49
51
|
status: z.ZodEnum<{
|
|
@@ -74,7 +76,6 @@ export declare const JobStepSchema: z.ZodObject<{
|
|
|
74
76
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
75
77
|
}, z.core.$strip>;
|
|
76
78
|
export declare const JobStepWithoutOutputSchema: z.ZodObject<{
|
|
77
|
-
error: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
78
79
|
name: z.ZodString;
|
|
79
80
|
status: z.ZodEnum<{
|
|
80
81
|
active: "active";
|
|
@@ -85,11 +86,14 @@ export declare const JobStepWithoutOutputSchema: z.ZodObject<{
|
|
|
85
86
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
86
87
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
87
88
|
id: z.ZodString;
|
|
89
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
88
90
|
timeoutMs: z.ZodCoercedNumber<unknown>;
|
|
89
91
|
expiresAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
90
92
|
startedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
91
93
|
finishedAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
92
94
|
jobId: z.ZodString;
|
|
95
|
+
parentStepId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
parallel: z.ZodDefault<z.ZodBoolean>;
|
|
93
97
|
retriesLimit: z.ZodCoercedNumber<unknown>;
|
|
94
98
|
retriesCount: z.ZodCoercedNumber<unknown>;
|
|
95
99
|
delayedMs: z.ZodDefault<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -213,8 +217,6 @@ export declare const GetJobsOptionsSchema: z.ZodObject<{
|
|
|
213
217
|
}, z.core.$strip>;
|
|
214
218
|
export declare const GetJobStepsOptionsSchema: z.ZodObject<{
|
|
215
219
|
jobId: z.ZodString;
|
|
216
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
217
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
218
220
|
search: z.ZodOptional<z.ZodString>;
|
|
219
221
|
updatedAfter: z.ZodOptional<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>;
|
|
220
222
|
}, z.core.$strip>;
|
|
@@ -307,8 +309,14 @@ export declare const DeleteJobsOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
307
309
|
}>;
|
|
308
310
|
}, z.core.$strip>>]>>;
|
|
309
311
|
}, z.core.$strip>>;
|
|
312
|
+
export declare const TimeTravelJobOptionsSchema: z.ZodObject<{
|
|
313
|
+
jobId: z.ZodString;
|
|
314
|
+
stepId: z.ZodString;
|
|
315
|
+
}, z.core.$strip>;
|
|
310
316
|
export declare const CreateOrRecoverJobStepOptionsSchema: z.ZodObject<{
|
|
311
317
|
jobId: z.ZodString;
|
|
318
|
+
parentStepId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
319
|
+
parallel: z.ZodDefault<z.ZodBoolean>;
|
|
312
320
|
name: z.ZodString;
|
|
313
321
|
timeoutMs: z.ZodNumber;
|
|
314
322
|
retriesLimit: z.ZodNumber;
|
|
@@ -415,7 +423,6 @@ export declare const GetJobsResultSchema: z.ZodObject<{
|
|
|
415
423
|
}, z.core.$strip>;
|
|
416
424
|
export declare const GetJobStepsResultSchema: z.ZodObject<{
|
|
417
425
|
steps: z.ZodArray<z.ZodObject<{
|
|
418
|
-
error: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
419
426
|
name: z.ZodString;
|
|
420
427
|
status: z.ZodEnum<{
|
|
421
428
|
active: "active";
|
|
@@ -426,11 +433,14 @@ export declare const GetJobStepsResultSchema: z.ZodObject<{
|
|
|
426
433
|
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
427
434
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
428
435
|
id: z.ZodString;
|
|
436
|
+
error: z.ZodDefault<z.ZodNullable<z.ZodAny>>;
|
|
429
437
|
timeoutMs: z.ZodCoercedNumber<unknown>;
|
|
430
438
|
expiresAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
431
439
|
startedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
432
440
|
finishedAt: z.ZodDefault<z.ZodNullable<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
433
441
|
jobId: z.ZodString;
|
|
442
|
+
parentStepId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
parallel: z.ZodDefault<z.ZodBoolean>;
|
|
434
444
|
retriesLimit: z.ZodCoercedNumber<unknown>;
|
|
435
445
|
retriesCount: z.ZodCoercedNumber<unknown>;
|
|
436
446
|
delayedMs: z.ZodDefault<z.ZodNullable<z.ZodCoercedNumber<unknown>>>;
|
|
@@ -446,8 +456,6 @@ export declare const GetJobStepsResultSchema: z.ZodObject<{
|
|
|
446
456
|
}, z.core.$strip>>;
|
|
447
457
|
}, z.core.$strip>>;
|
|
448
458
|
total: z.ZodNumber;
|
|
449
|
-
page: z.ZodNumber;
|
|
450
|
-
pageSize: z.ZodNumber;
|
|
451
459
|
}, z.core.$strip>;
|
|
452
460
|
export declare const ActionStatsSchema: z.ZodObject<{
|
|
453
461
|
name: z.ZodString;
|
|
@@ -486,6 +494,121 @@ export declare const JobStepStatusResultSchema: z.ZodObject<{
|
|
|
486
494
|
}>;
|
|
487
495
|
updatedAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
488
496
|
}, z.core.$strip>;
|
|
497
|
+
export declare const MetricTypeSchema: z.ZodEnum<{
|
|
498
|
+
metric: "metric";
|
|
499
|
+
span_event: "span_event";
|
|
500
|
+
span_attribute: "span_attribute";
|
|
501
|
+
}>;
|
|
502
|
+
export declare const MetricSchema: z.ZodObject<{
|
|
503
|
+
id: z.ZodString;
|
|
504
|
+
jobId: z.ZodString;
|
|
505
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
506
|
+
name: z.ZodString;
|
|
507
|
+
value: z.ZodNumber;
|
|
508
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
509
|
+
type: z.ZodEnum<{
|
|
510
|
+
metric: "metric";
|
|
511
|
+
span_event: "span_event";
|
|
512
|
+
span_attribute: "span_attribute";
|
|
513
|
+
}>;
|
|
514
|
+
timestamp: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
515
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
516
|
+
}, z.core.$strip>;
|
|
517
|
+
export declare const MetricSortFieldSchema: z.ZodEnum<{
|
|
518
|
+
name: "name";
|
|
519
|
+
createdAt: "createdAt";
|
|
520
|
+
value: "value";
|
|
521
|
+
timestamp: "timestamp";
|
|
522
|
+
}>;
|
|
523
|
+
export declare const MetricSortSchema: z.ZodObject<{
|
|
524
|
+
field: z.ZodEnum<{
|
|
525
|
+
name: "name";
|
|
526
|
+
createdAt: "createdAt";
|
|
527
|
+
value: "value";
|
|
528
|
+
timestamp: "timestamp";
|
|
529
|
+
}>;
|
|
530
|
+
order: z.ZodEnum<{
|
|
531
|
+
asc: "asc";
|
|
532
|
+
desc: "desc";
|
|
533
|
+
}>;
|
|
534
|
+
}, z.core.$strip>;
|
|
535
|
+
export declare const MetricFiltersSchema: z.ZodObject<{
|
|
536
|
+
name: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
537
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
538
|
+
metric: "metric";
|
|
539
|
+
span_event: "span_event";
|
|
540
|
+
span_attribute: "span_attribute";
|
|
541
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
542
|
+
metric: "metric";
|
|
543
|
+
span_event: "span_event";
|
|
544
|
+
span_attribute: "span_attribute";
|
|
545
|
+
}>>]>>;
|
|
546
|
+
attributesFilter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
547
|
+
timestampRange: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
548
|
+
}, z.core.$strip>;
|
|
549
|
+
export declare const InsertMetricOptionsSchema: z.ZodObject<{
|
|
550
|
+
jobId: z.ZodString;
|
|
551
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
552
|
+
name: z.ZodString;
|
|
553
|
+
value: z.ZodNumber;
|
|
554
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
555
|
+
type: z.ZodEnum<{
|
|
556
|
+
metric: "metric";
|
|
557
|
+
span_event: "span_event";
|
|
558
|
+
span_attribute: "span_attribute";
|
|
559
|
+
}>;
|
|
560
|
+
}, z.core.$strip>;
|
|
561
|
+
export declare const GetMetricsOptionsSchema: z.ZodObject<{
|
|
562
|
+
jobId: z.ZodOptional<z.ZodString>;
|
|
563
|
+
stepId: z.ZodOptional<z.ZodString>;
|
|
564
|
+
filters: z.ZodOptional<z.ZodObject<{
|
|
565
|
+
name: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
566
|
+
type: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
567
|
+
metric: "metric";
|
|
568
|
+
span_event: "span_event";
|
|
569
|
+
span_attribute: "span_attribute";
|
|
570
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
571
|
+
metric: "metric";
|
|
572
|
+
span_event: "span_event";
|
|
573
|
+
span_attribute: "span_attribute";
|
|
574
|
+
}>>]>>;
|
|
575
|
+
attributesFilter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
576
|
+
timestampRange: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>>>;
|
|
577
|
+
}, z.core.$strip>>;
|
|
578
|
+
sort: z.ZodOptional<z.ZodObject<{
|
|
579
|
+
field: z.ZodEnum<{
|
|
580
|
+
name: "name";
|
|
581
|
+
createdAt: "createdAt";
|
|
582
|
+
value: "value";
|
|
583
|
+
timestamp: "timestamp";
|
|
584
|
+
}>;
|
|
585
|
+
order: z.ZodEnum<{
|
|
586
|
+
asc: "asc";
|
|
587
|
+
desc: "desc";
|
|
588
|
+
}>;
|
|
589
|
+
}, z.core.$strip>>;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
export declare const GetMetricsResultSchema: z.ZodObject<{
|
|
592
|
+
metrics: z.ZodArray<z.ZodObject<{
|
|
593
|
+
id: z.ZodString;
|
|
594
|
+
jobId: z.ZodString;
|
|
595
|
+
stepId: z.ZodNullable<z.ZodString>;
|
|
596
|
+
name: z.ZodString;
|
|
597
|
+
value: z.ZodNumber;
|
|
598
|
+
attributes: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
599
|
+
type: z.ZodEnum<{
|
|
600
|
+
metric: "metric";
|
|
601
|
+
span_event: "span_event";
|
|
602
|
+
span_attribute: "span_attribute";
|
|
603
|
+
}>;
|
|
604
|
+
timestamp: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
605
|
+
createdAt: z.ZodUnion<readonly [z.ZodDate, z.ZodPipe<z.ZodString, z.ZodTransform<Date, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>]>;
|
|
606
|
+
}, z.core.$strip>>;
|
|
607
|
+
total: z.ZodNumber;
|
|
608
|
+
}, z.core.$strip>;
|
|
609
|
+
export declare const DeleteMetricsOptionsSchema: z.ZodObject<{
|
|
610
|
+
jobId: z.ZodString;
|
|
611
|
+
}, z.core.$strip>;
|
|
489
612
|
export type Job = z.infer<typeof JobSchema>;
|
|
490
613
|
export type JobStep = z.infer<typeof JobStepSchema>;
|
|
491
614
|
export type JobStepWithoutOutput = z.infer<typeof JobStepWithoutOutputSchema>;
|
|
@@ -510,10 +633,20 @@ export type CancelJobOptions = z.infer<typeof CancelJobOptionsSchema>;
|
|
|
510
633
|
export type RetryJobOptions = z.infer<typeof RetryJobOptionsSchema>;
|
|
511
634
|
export type DeleteJobOptions = z.infer<typeof DeleteJobOptionsSchema>;
|
|
512
635
|
export type DeleteJobsOptions = z.infer<typeof DeleteJobsOptionsSchema>;
|
|
513
|
-
export type CreateOrRecoverJobStepOptions = z.
|
|
636
|
+
export type CreateOrRecoverJobStepOptions = z.input<typeof CreateOrRecoverJobStepOptionsSchema>;
|
|
514
637
|
export type CompleteJobStepOptions = z.infer<typeof CompleteJobStepOptionsSchema>;
|
|
515
638
|
export type FailJobStepOptions = z.infer<typeof FailJobStepOptionsSchema>;
|
|
516
639
|
export type DelayJobStepOptions = z.infer<typeof DelayJobStepOptionsSchema>;
|
|
517
640
|
export type CancelJobStepOptions = z.infer<typeof CancelJobStepOptionsSchema>;
|
|
518
641
|
export type CreateOrRecoverJobStepResult = z.infer<typeof CreateOrRecoverJobStepResultSchema>;
|
|
642
|
+
export type TimeTravelJobOptions = z.infer<typeof TimeTravelJobOptionsSchema>;
|
|
643
|
+
export type MetricType = z.infer<typeof MetricTypeSchema>;
|
|
644
|
+
export type Metric = z.infer<typeof MetricSchema>;
|
|
645
|
+
export type MetricSortField = z.infer<typeof MetricSortFieldSchema>;
|
|
646
|
+
export type MetricSort = z.infer<typeof MetricSortSchema>;
|
|
647
|
+
export type MetricFilters = z.infer<typeof MetricFiltersSchema>;
|
|
648
|
+
export type InsertMetricOptions = z.infer<typeof InsertMetricOptionsSchema>;
|
|
649
|
+
export type GetMetricsOptions = z.infer<typeof GetMetricsOptionsSchema>;
|
|
650
|
+
export type GetMetricsResult = z.infer<typeof GetMetricsResultSchema>;
|
|
651
|
+
export type DeleteMetricsOptions = z.infer<typeof DeleteMetricsOptionsSchema>;
|
|
519
652
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/adapters/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,eAAe;;;;;;EAAuB,CAAA;AACnD,eAAO,MAAM,gBAAgB;;;;;EAAwB,CAAA;AAYrD,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAA;AAMF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;iBAgBpB,CAAA;AAMF,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/adapters/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAQvB,eAAO,MAAM,eAAe;;;;;;EAAuB,CAAA;AACnD,eAAO,MAAM,gBAAgB;;;;;EAAwB,CAAA;AAYrD,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAA;AAMF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;iBAgBpB,CAAA;AAMF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBxB,CAAA;AAGF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAuC,CAAA;AAM9E,eAAO,MAAM,eAAe;;;EAA0B,CAAA;AAEtD,eAAO,MAAM,kBAAkB;;;;;;;EAAwF,CAAA;AAEvH,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAGxB,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;iBAY3B,CAAA;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK/B,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAA;AAM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K,CAAC,OAAO,uBAAuB,CAAC,CAAA;AACvE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA"}
|
package/dist/adapters/schemas.js
CHANGED
|
@@ -33,6 +33,8 @@ export const JobSchema = z.object({
|
|
|
33
33
|
export const JobStepSchema = z.object({
|
|
34
34
|
id: z.string(),
|
|
35
35
|
jobId: z.string(),
|
|
36
|
+
parentStepId: z.string().nullable().default(null),
|
|
37
|
+
parallel: z.boolean().default(false),
|
|
36
38
|
name: z.string(),
|
|
37
39
|
output: z.any().nullable().default(null),
|
|
38
40
|
status: StepStatusSchema,
|
|
@@ -76,8 +78,6 @@ export const GetJobsOptionsSchema = z.object({
|
|
|
76
78
|
});
|
|
77
79
|
export const GetJobStepsOptionsSchema = z.object({
|
|
78
80
|
jobId: z.string(),
|
|
79
|
-
page: z.number().int().positive().optional(),
|
|
80
|
-
pageSize: z.number().int().positive().optional(),
|
|
81
81
|
search: z.string().optional(),
|
|
82
82
|
updatedAfter: DateSchema.optional(),
|
|
83
83
|
});
|
|
@@ -115,8 +115,14 @@ export const DeleteJobOptionsSchema = z.object({
|
|
|
115
115
|
jobId: z.string(),
|
|
116
116
|
});
|
|
117
117
|
export const DeleteJobsOptionsSchema = GetJobsOptionsSchema.optional();
|
|
118
|
+
export const TimeTravelJobOptionsSchema = z.object({
|
|
119
|
+
jobId: z.string(),
|
|
120
|
+
stepId: z.string(),
|
|
121
|
+
});
|
|
118
122
|
export const CreateOrRecoverJobStepOptionsSchema = z.object({
|
|
119
123
|
jobId: z.string(),
|
|
124
|
+
parentStepId: z.string().nullable().default(null),
|
|
125
|
+
parallel: z.boolean().default(false),
|
|
120
126
|
name: z.string(),
|
|
121
127
|
timeoutMs: z.number(),
|
|
122
128
|
retriesLimit: z.number(),
|
|
@@ -161,8 +167,6 @@ export const GetJobsResultSchema = z.object({
|
|
|
161
167
|
export const GetJobStepsResultSchema = z.object({
|
|
162
168
|
steps: z.array(JobStepWithoutOutputSchema),
|
|
163
169
|
total: z.number().int().nonnegative(),
|
|
164
|
-
page: z.number().int().positive(),
|
|
165
|
-
pageSize: z.number().int().positive(),
|
|
166
170
|
});
|
|
167
171
|
export const ActionStatsSchema = z.object({
|
|
168
172
|
name: z.string(),
|
|
@@ -183,3 +187,47 @@ export const JobStepStatusResultSchema = z.object({
|
|
|
183
187
|
status: StepStatusSchema,
|
|
184
188
|
updatedAt: DateSchema,
|
|
185
189
|
});
|
|
190
|
+
export const MetricTypeSchema = z.enum(['metric', 'span_event', 'span_attribute']);
|
|
191
|
+
export const MetricSchema = z.object({
|
|
192
|
+
id: z.string(),
|
|
193
|
+
jobId: z.string(),
|
|
194
|
+
stepId: z.string().nullable(),
|
|
195
|
+
name: z.string(),
|
|
196
|
+
value: z.number(),
|
|
197
|
+
attributes: z.record(z.string(), z.any()),
|
|
198
|
+
type: MetricTypeSchema,
|
|
199
|
+
timestamp: DateSchema,
|
|
200
|
+
createdAt: DateSchema,
|
|
201
|
+
});
|
|
202
|
+
export const MetricSortFieldSchema = z.enum(['name', 'value', 'timestamp', 'createdAt']);
|
|
203
|
+
export const MetricSortSchema = z.object({
|
|
204
|
+
field: MetricSortFieldSchema,
|
|
205
|
+
order: SortOrderSchema,
|
|
206
|
+
});
|
|
207
|
+
export const MetricFiltersSchema = z.object({
|
|
208
|
+
name: z.union([z.string(), z.array(z.string())]).optional(),
|
|
209
|
+
type: z.union([MetricTypeSchema, z.array(MetricTypeSchema)]).optional(),
|
|
210
|
+
attributesFilter: z.record(z.string(), z.any()).optional(),
|
|
211
|
+
timestampRange: z.array(DateSchema).length(2).optional(),
|
|
212
|
+
});
|
|
213
|
+
export const InsertMetricOptionsSchema = z.object({
|
|
214
|
+
jobId: z.string(),
|
|
215
|
+
stepId: z.string().optional(),
|
|
216
|
+
name: z.string(),
|
|
217
|
+
value: z.number(),
|
|
218
|
+
attributes: z.record(z.string(), z.any()).optional(),
|
|
219
|
+
type: MetricTypeSchema,
|
|
220
|
+
});
|
|
221
|
+
export const GetMetricsOptionsSchema = z.object({
|
|
222
|
+
jobId: z.string().optional(),
|
|
223
|
+
stepId: z.string().optional(),
|
|
224
|
+
filters: MetricFiltersSchema.optional(),
|
|
225
|
+
sort: MetricSortSchema.optional(),
|
|
226
|
+
});
|
|
227
|
+
export const GetMetricsResultSchema = z.object({
|
|
228
|
+
metrics: z.array(MetricSchema),
|
|
229
|
+
total: z.number().int().nonnegative(),
|
|
230
|
+
});
|
|
231
|
+
export const DeleteMetricsOptionsSchema = z.object({
|
|
232
|
+
jobId: z.string(),
|
|
233
|
+
});
|
package/dist/client.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import pino, { type Logger } from 'pino';
|
|
2
2
|
import * as z from 'zod';
|
|
3
3
|
import type { Action } from './action.js';
|
|
4
|
-
import type { Adapter, GetActionsResult, GetJobStepsOptions, GetJobStepsResult, GetJobsOptions, GetJobsResult, Job, JobStep } from './adapters/adapter.js';
|
|
4
|
+
import type { Adapter, GetActionsResult, GetJobStepsOptions, GetJobStepsResult, GetJobsOptions, GetJobsResult, GetMetricsOptions, GetMetricsResult, Job, JobStep } from './adapters/adapter.js';
|
|
5
5
|
import type { JobStatusResult, JobStepStatusResult } from './adapters/schemas.js';
|
|
6
|
+
import { type TelemetryAdapter } from './telemetry/index.js';
|
|
6
7
|
declare const BaseOptionsSchema: z.ZodObject<{
|
|
7
8
|
id: z.ZodOptional<z.ZodString>;
|
|
8
9
|
syncPattern: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"pull">, z.ZodLiteral<"push">, z.ZodLiteral<"hybrid">, z.ZodLiteral<false>]>>;
|
|
@@ -20,6 +21,7 @@ export interface ClientOptions<TActions extends Record<string, Action<any, any,
|
|
|
20
21
|
actions?: TActions;
|
|
21
22
|
logger?: Logger | 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace' | 'silent';
|
|
22
23
|
variables?: TVariables;
|
|
24
|
+
telemetry?: TelemetryAdapter;
|
|
23
25
|
}
|
|
24
26
|
interface FetchOptions {
|
|
25
27
|
batchSize?: number;
|
|
@@ -28,6 +30,9 @@ export declare class Client<TActions extends Record<string, Action<any, any, TVa
|
|
|
28
30
|
#private;
|
|
29
31
|
constructor(options: ClientOptions<TActions, TVariables>);
|
|
30
32
|
get logger(): pino.Logger;
|
|
33
|
+
get telemetry(): TelemetryAdapter;
|
|
34
|
+
get database(): Adapter;
|
|
35
|
+
get metricsEnabled(): boolean;
|
|
31
36
|
getConfig(): {
|
|
32
37
|
actions: TActions | null;
|
|
33
38
|
variables: Record<string, unknown>;
|
|
@@ -62,6 +67,7 @@ export declare class Client<TActions extends Record<string, Action<any, any, TVa
|
|
|
62
67
|
}[]>;
|
|
63
68
|
cancelJob(jobId: string): Promise<boolean>;
|
|
64
69
|
retryJob(jobId: string): Promise<string | null>;
|
|
70
|
+
timeTravelJob(jobId: string, stepId: string): Promise<boolean>;
|
|
65
71
|
deleteJob(jobId: string): Promise<boolean>;
|
|
66
72
|
deleteJobs(options?: GetJobsOptions): Promise<number>;
|
|
67
73
|
getJobById(jobId: string): Promise<Job | null>;
|
|
@@ -75,6 +81,7 @@ export declare class Client<TActions extends Record<string, Action<any, any, TVa
|
|
|
75
81
|
signal?: AbortSignal;
|
|
76
82
|
}): Promise<Job | null>;
|
|
77
83
|
getActions(): Promise<GetActionsResult>;
|
|
84
|
+
getMetrics(options: GetMetricsOptions): Promise<GetMetricsResult>;
|
|
78
85
|
getActionsMetadata(): Promise<Array<{
|
|
79
86
|
name: string;
|
|
80
87
|
mockInput: any;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,M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ANCELLED, JOB_STATUS_COMPLETED, JOB_STATUS_FAILED } from './constants.js';
|
|
6
|
+
import { LocalTelemetryAdapter, noopTelemetryAdapter } from './telemetry/index.js';
|
|
6
7
|
const BaseOptionsSchema = z.object({
|
|
7
8
|
id: z.string().optional(),
|
|
8
9
|
syncPattern: z.union([z.literal('pull'), z.literal('push'), z.literal('hybrid'), z.literal(false)]).default('hybrid'),
|
|
@@ -20,6 +21,7 @@ export class Client {
|
|
|
20
21
|
#id;
|
|
21
22
|
#actions;
|
|
22
23
|
#database;
|
|
24
|
+
#telemetry;
|
|
23
25
|
#variables;
|
|
24
26
|
#logger;
|
|
25
27
|
#started = false;
|
|
@@ -35,11 +37,14 @@ export class Client {
|
|
|
35
37
|
this.#options = BaseOptionsSchema.parse(options);
|
|
36
38
|
this.#id = options.id ?? globalThis.crypto.randomUUID();
|
|
37
39
|
this.#database = options.database;
|
|
40
|
+
this.#telemetry = options.telemetry ?? noopTelemetryAdapter();
|
|
38
41
|
this.#actions = options.actions ?? null;
|
|
39
42
|
this.#variables = options?.variables ?? {};
|
|
40
43
|
this.#logger = this.#normalizeLogger(options?.logger);
|
|
41
44
|
this.#database.setId(this.#id);
|
|
42
45
|
this.#database.setLogger(this.#logger);
|
|
46
|
+
this.#telemetry.setLogger(this.#logger);
|
|
47
|
+
this.#telemetry.setClient(this);
|
|
43
48
|
}
|
|
44
49
|
#normalizeLogger(logger) {
|
|
45
50
|
let pinoInstance = null;
|
|
@@ -57,6 +62,15 @@ export class Client {
|
|
|
57
62
|
get logger() {
|
|
58
63
|
return this.#logger;
|
|
59
64
|
}
|
|
65
|
+
get telemetry() {
|
|
66
|
+
return this.#telemetry;
|
|
67
|
+
}
|
|
68
|
+
get database() {
|
|
69
|
+
return this.#database;
|
|
70
|
+
}
|
|
71
|
+
get metricsEnabled() {
|
|
72
|
+
return this.#telemetry instanceof LocalTelemetryAdapter;
|
|
73
|
+
}
|
|
60
74
|
getConfig() {
|
|
61
75
|
return {
|
|
62
76
|
...this.#options,
|
|
@@ -134,6 +148,10 @@ export class Client {
|
|
|
134
148
|
await this.start();
|
|
135
149
|
return this.#database.retryJob({ jobId });
|
|
136
150
|
}
|
|
151
|
+
async timeTravelJob(jobId, stepId) {
|
|
152
|
+
await this.start();
|
|
153
|
+
return this.#database.timeTravelJob({ jobId, stepId });
|
|
154
|
+
}
|
|
137
155
|
async deleteJob(jobId) {
|
|
138
156
|
await this.start();
|
|
139
157
|
return this.#database.deleteJob({ jobId });
|
|
@@ -215,6 +233,13 @@ export class Client {
|
|
|
215
233
|
await this.start();
|
|
216
234
|
return this.#database.getActions();
|
|
217
235
|
}
|
|
236
|
+
async getMetrics(options) {
|
|
237
|
+
await this.start();
|
|
238
|
+
if (!this.metricsEnabled) {
|
|
239
|
+
throw new Error('Metrics are only available when using LocalTelemetryAdapter');
|
|
240
|
+
}
|
|
241
|
+
return this.#database.getMetrics(options);
|
|
242
|
+
}
|
|
218
243
|
async getActionsMetadata() {
|
|
219
244
|
await this.start();
|
|
220
245
|
if (!this.#actions) {
|
|
@@ -251,6 +276,7 @@ export class Client {
|
|
|
251
276
|
if (!dbStarted) {
|
|
252
277
|
return false;
|
|
253
278
|
}
|
|
279
|
+
await this.#telemetry.start();
|
|
254
280
|
if (this.#actions) {
|
|
255
281
|
if (this.#options.recoverJobsOnStart) {
|
|
256
282
|
await this.#database.recoverJobs({
|
|
@@ -299,6 +325,7 @@ export class Client {
|
|
|
299
325
|
await Promise.all(Array.from(this.#actionManagers.values()).map(async (manager) => {
|
|
300
326
|
await manager.stop();
|
|
301
327
|
}));
|
|
328
|
+
await this.#telemetry.stop();
|
|
302
329
|
const dbStopped = await this.#database.stop();
|
|
303
330
|
if (!dbStopped) {
|
|
304
331
|
return false;
|
|
@@ -372,6 +399,7 @@ export class Client {
|
|
|
372
399
|
actionManager = new ActionManager({
|
|
373
400
|
action,
|
|
374
401
|
database: this.#database,
|
|
402
|
+
telemetry: this.#telemetry,
|
|
375
403
|
variables: this.#variables,
|
|
376
404
|
logger: this.#logger,
|
|
377
405
|
concurrencyLimit: this.#options.actionConcurrencyLimit,
|
package/dist/errors.d.ts
CHANGED
|
@@ -24,8 +24,14 @@ export declare class ActionCancelError extends DuronError {
|
|
|
24
24
|
cause?: unknown;
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
+
export declare class UnhandledChildStepsError extends NonRetriableError {
|
|
28
|
+
readonly stepName: string;
|
|
29
|
+
readonly pendingCount: number;
|
|
30
|
+
constructor(stepName: string, pendingCount: number);
|
|
31
|
+
}
|
|
27
32
|
export declare function isDuronError(error: unknown): error is DuronError;
|
|
28
33
|
export declare function isNonRetriableError(error: unknown): error is NonRetriableError;
|
|
34
|
+
export declare function isUnhandledChildStepsError(error: unknown): error is UnhandledChildStepsError;
|
|
29
35
|
export declare function isTimeoutError(error: unknown): error is ActionTimeoutError | StepTimeoutError;
|
|
30
36
|
export declare function isCancelError(error: unknown): error is ActionCancelError;
|
|
31
37
|
export type SerializableError = {
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAIA,8BAAsB,UAAW,SAAQ,KAAK;IAM5C,SAAyB,KAAK,CAAC,EAAE,OAAO,CAAA;gBAGtC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAMR,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB;CAWJ;AAKD,qBAAa,wBAAyB,SAAQ,UAAU;gBAQ1C,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAGhE;AAQD,qBAAa,iBAAkB,SAAQ,UAAU;CAEhD;AAKD,qBAAa,kBAAmB,SAAQ,UAAU;gBAS9C,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB;CAIJ;AAKD,qB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AAKD,qBAAa,iBAAkB,SAAQ,UAAU;gBAS7C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB;CAIJ;AAQD,qBAAa,wBAAyB,SAAQ,iBAAiB;IAI7D,SAAgB,QAAQ,EAAE,MAAM,CAAA;IAKhC,SAAgB,YAAY,EAAE,MAAM,CAAA;gBAQxB,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAOnD;AAKD,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE;AAKD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAO9E;AAKD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,wBAAwB,CAE5F;AAKD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,GAAG,gBAAgB,CAE7F;AAKD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAExE;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAMD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG;IAC9C,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAgCA"}
|
package/dist/errors.js
CHANGED
|
@@ -31,11 +31,26 @@ export class ActionCancelError extends DuronError {
|
|
|
31
31
|
super(`Action "${actionName}" in job "${jobId}" was cancelled`, options);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
export class UnhandledChildStepsError extends NonRetriableError {
|
|
35
|
+
stepName;
|
|
36
|
+
pendingCount;
|
|
37
|
+
constructor(stepName, pendingCount) {
|
|
38
|
+
super(`Parent step "${stepName}" completed with ${pendingCount} unhandled child step(s). All child steps must be awaited before the parent returns.`);
|
|
39
|
+
this.stepName = stepName;
|
|
40
|
+
this.pendingCount = pendingCount;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
34
43
|
export function isDuronError(error) {
|
|
35
44
|
return error instanceof DuronError;
|
|
36
45
|
}
|
|
37
46
|
export function isNonRetriableError(error) {
|
|
38
|
-
return error instanceof NonRetriableError ||
|
|
47
|
+
return (error instanceof NonRetriableError ||
|
|
48
|
+
error instanceof ActionCancelError ||
|
|
49
|
+
error instanceof ActionTimeoutError ||
|
|
50
|
+
error instanceof UnhandledChildStepsError);
|
|
51
|
+
}
|
|
52
|
+
export function isUnhandledChildStepsError(error) {
|
|
53
|
+
return error instanceof UnhandledChildStepsError;
|
|
39
54
|
}
|
|
40
55
|
export function isTimeoutError(error) {
|
|
41
56
|
return error instanceof ActionTimeoutError || error instanceof StepTimeoutError;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { Action } from './action.js';
|
|
2
2
|
import { Client, type ClientOptions } from './client.js';
|
|
3
3
|
export { defineAction } from './action.js';
|
|
4
|
+
export * from './client.js';
|
|
4
5
|
export * from './constants.js';
|
|
5
|
-
export { NonRetriableError } from './errors.js';
|
|
6
|
+
export { NonRetriableError, UnhandledChildStepsError } from './errors.js';
|
|
6
7
|
export * from './server.js';
|
|
8
|
+
export * from './telemetry/index.js';
|
|
7
9
|
export declare const duron: <TActions extends Record<string, Action<any, any, TVariables>>, TVariables = Record<string, unknown>>(options: ClientOptions<TActions, TVariables>) => Client<TActions, TVariables>;
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AACzE,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AAEpC,eAAO,MAAM,KAAK,GAChB,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC,EAC7D,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAEpC,SAAS,aAAa,CAAC,QAAQ,EAAE,UAAU,CAAC,iCACA,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Client } from './client.js';
|
|
2
2
|
export { defineAction } from './action.js';
|
|
3
|
+
export * from './client.js';
|
|
3
4
|
export * from './constants.js';
|
|
4
|
-
export { NonRetriableError } from './errors.js';
|
|
5
|
+
export { NonRetriableError, UnhandledChildStepsError } from './errors.js';
|
|
5
6
|
export * from './server.js';
|
|
7
|
+
export * from './telemetry/index.js';
|
|
6
8
|
export const duron = (options) => new Client(options);
|