@trigger.dev/core 0.0.0-prerelease-20240603154820 → 0.0.0-prerelease-20240718194312
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/api-Pl9fxB8v.d.mts +13879 -0
- package/dist/api-sNoooMbT.d.ts +13879 -0
- package/dist/{catalog-dRKTgwQ7.d.ts → catalog-H7yFiZ60.d.mts} +52 -52
- package/dist/{catalog-XTlJQaMn.d.mts → catalog-h79CG5Wy.d.ts} +52 -52
- package/dist/{manager-JkbddlcO.d.mts → common-CLW82lkt.d.mts} +280 -16
- package/dist/{manager-JkbddlcO.d.ts → common-CLW82lkt.d.ts} +280 -16
- package/dist/{eventFilterMatches-2kHImluE.d.mts → eventFilter-66NaBAMi.d.mts} +1 -3
- package/dist/{eventFilterMatches-2kHImluE.d.ts → eventFilter-66NaBAMi.d.ts} +1 -3
- package/dist/eventFilterMatches.d.mts +6 -0
- package/dist/eventFilterMatches.d.ts +6 -0
- package/dist/eventFilterMatches.js +165 -0
- package/dist/eventFilterMatches.js.map +1 -0
- package/dist/eventFilterMatches.mjs +163 -0
- package/dist/eventFilterMatches.mjs.map +1 -0
- package/dist/index.d.mts +14 -16716
- package/dist/index.d.ts +14 -16716
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/json-DBPEJQRe.d.mts +16 -0
- package/dist/json-DBPEJQRe.d.ts +16 -0
- package/dist/manager-KvCabW1a.d.mts +18 -0
- package/dist/manager-OBA35PzR.d.ts +18 -0
- package/dist/{messages-6_-q72KG.d.mts → messages-JvHJ83wv.d.mts} +2978 -291
- package/dist/{messages-6_-q72KG.d.ts → messages-JvHJ83wv.d.ts} +2978 -291
- package/dist/replacements.d.mts +22 -0
- package/dist/replacements.d.ts +22 -0
- package/dist/replacements.js +33 -0
- package/dist/replacements.js.map +1 -0
- package/dist/replacements.mjs +28 -0
- package/dist/replacements.mjs.map +1 -0
- package/dist/requestFilter-HNZQEpQb.d.ts +180 -0
- package/dist/requestFilter-b5W2_1oP.d.mts +180 -0
- package/dist/requestFilterMatches.d.mts +13 -0
- package/dist/requestFilterMatches.d.ts +13 -0
- package/dist/requestFilterMatches.js +238 -0
- package/dist/requestFilterMatches.js.map +1 -0
- package/dist/requestFilterMatches.mjs +235 -0
- package/dist/requestFilterMatches.mjs.map +1 -0
- package/dist/retry.d.mts +10 -0
- package/dist/retry.d.ts +10 -0
- package/dist/retry.js +100 -0
- package/dist/retry.js.map +1 -0
- package/dist/retry.mjs +97 -0
- package/dist/retry.mjs.map +1 -0
- package/dist/schemas/index.d.mts +2611 -0
- package/dist/schemas/index.d.ts +2611 -0
- package/dist/schemas/index.js +1630 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/index.mjs +1463 -0
- package/dist/schemas/index.mjs.map +1 -0
- package/dist/{schemas-r4ZP9S-F.d.mts → schemas-C9ssfehv.d.mts} +270 -33
- package/dist/{schemas-r4ZP9S-F.d.ts → schemas-C9ssfehv.d.ts} +270 -33
- package/dist/taskLogger-CzADe4je.d.ts +33 -0
- package/dist/taskLogger-r_AFTX45.d.mts +33 -0
- package/dist/tracer-N0p2Fuuv.d.mts +23 -0
- package/dist/tracer-N0p2Fuuv.d.ts +23 -0
- package/dist/types.d.mts +11 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +3 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.d.mts +7 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +33 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +30 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/v3/dev/index.d.mts +2 -1
- package/dist/v3/dev/index.d.ts +2 -1
- package/dist/v3/dev/index.js.map +1 -1
- package/dist/v3/dev/index.mjs.map +1 -1
- package/dist/v3/errors.d.mts +39 -0
- package/dist/v3/errors.d.ts +39 -0
- package/dist/v3/errors.js +204 -0
- package/dist/v3/errors.js.map +1 -0
- package/dist/v3/errors.mjs +195 -0
- package/dist/v3/errors.mjs.map +1 -0
- package/dist/v3/index.d.mts +143 -4720
- package/dist/v3/index.d.ts +143 -4720
- package/dist/v3/index.js +837 -624
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +824 -624
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/logger-api.d.mts +24 -0
- package/dist/v3/logger-api.d.ts +24 -0
- package/dist/v3/logger-api.js +118 -0
- package/dist/v3/logger-api.js.map +1 -0
- package/dist/v3/logger-api.mjs +116 -0
- package/dist/v3/logger-api.mjs.map +1 -0
- package/dist/v3/otel/index.js +36 -12
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +36 -12
- package/dist/v3/otel/index.mjs.map +1 -1
- package/dist/v3/prod/index.d.mts +4 -3
- package/dist/v3/prod/index.d.ts +4 -3
- package/dist/v3/prod/index.js +7 -131
- package/dist/v3/prod/index.js.map +1 -1
- package/dist/v3/prod/index.mjs +7 -131
- package/dist/v3/prod/index.mjs.map +1 -1
- package/dist/v3/schemas/index.d.mts +4741 -0
- package/dist/v3/schemas/index.d.ts +4741 -0
- package/dist/v3/schemas/index.js +2039 -0
- package/dist/v3/schemas/index.js.map +1 -0
- package/dist/v3/schemas/index.mjs +1900 -0
- package/dist/v3/schemas/index.mjs.map +1 -0
- package/dist/v3/semanticInternalAttributes.d.mts +56 -0
- package/dist/v3/semanticInternalAttributes.d.ts +56 -0
- package/dist/v3/semanticInternalAttributes.js +61 -0
- package/dist/v3/semanticInternalAttributes.js.map +1 -0
- package/dist/v3/semanticInternalAttributes.mjs +59 -0
- package/dist/v3/semanticInternalAttributes.mjs.map +1 -0
- package/dist/v3/utils/durations.d.mts +15 -0
- package/dist/v3/utils/durations.d.ts +15 -0
- package/dist/v3/utils/durations.js +93 -0
- package/dist/v3/utils/durations.js.map +1 -0
- package/dist/v3/utils/durations.mjs +82 -0
- package/dist/v3/utils/durations.mjs.map +1 -0
- package/dist/v3/utils/flattenAttributes.d.mts +8 -0
- package/dist/v3/utils/flattenAttributes.d.ts +8 -0
- package/dist/v3/utils/flattenAttributes.js +131 -0
- package/dist/v3/utils/flattenAttributes.js.map +1 -0
- package/dist/v3/utils/flattenAttributes.mjs +126 -0
- package/dist/v3/utils/flattenAttributes.mjs.map +1 -0
- package/dist/v3/utils/ioSerialization.d.mts +21 -0
- package/dist/v3/utils/ioSerialization.d.ts +21 -0
- package/dist/v3/utils/ioSerialization.js +2367 -0
- package/dist/v3/utils/ioSerialization.js.map +1 -0
- package/dist/v3/utils/ioSerialization.mjs +2358 -0
- package/dist/v3/utils/ioSerialization.mjs.map +1 -0
- package/dist/v3/utils/omit.d.mts +3 -0
- package/dist/v3/utils/omit.d.ts +3 -0
- package/dist/v3/utils/omit.js +20 -0
- package/dist/v3/utils/omit.js.map +1 -0
- package/dist/v3/utils/omit.mjs +18 -0
- package/dist/v3/utils/omit.mjs.map +1 -0
- package/dist/v3/utils/retries.d.mts +46 -0
- package/dist/v3/utils/retries.d.ts +46 -0
- package/dist/v3/utils/retries.js +118 -0
- package/dist/v3/utils/retries.js.map +1 -0
- package/dist/v3/utils/retries.mjs +113 -0
- package/dist/v3/utils/retries.mjs.map +1 -0
- package/dist/v3/utils/timers.d.mts +6 -0
- package/dist/v3/utils/timers.d.ts +6 -0
- package/dist/v3/utils/timers.js +31 -0
- package/dist/v3/utils/timers.js.map +1 -0
- package/dist/v3/utils/timers.mjs +28 -0
- package/dist/v3/utils/timers.mjs.map +1 -0
- package/dist/v3/workers/index.d.mts +56 -8
- package/dist/v3/workers/index.d.ts +56 -8
- package/dist/v3/workers/index.js +719 -279
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +717 -280
- package/dist/v3/workers/index.mjs.map +1 -1
- package/dist/v3/zodIpc.js.map +1 -1
- package/dist/v3/zodIpc.mjs.map +1 -1
- package/dist/v3/zodMessageHandler.d.mts +16 -3
- package/dist/v3/zodMessageHandler.d.ts +16 -3
- package/dist/v3/zodMessageHandler.js +77 -23
- package/dist/v3/zodMessageHandler.js.map +1 -1
- package/dist/v3/zodMessageHandler.mjs +77 -23
- package/dist/v3/zodMessageHandler.mjs.map +1 -1
- package/dist/v3/zodNamespace.js +59 -28
- package/dist/v3/zodNamespace.js.map +1 -1
- package/dist/v3/zodNamespace.mjs +60 -29
- package/dist/v3/zodNamespace.mjs.map +1 -1
- package/dist/v3/zodSocket.d.mts +8 -3
- package/dist/v3/zodSocket.d.ts +8 -3
- package/dist/v3/zodSocket.js +56 -25
- package/dist/v3/zodSocket.js.map +1 -1
- package/dist/v3/zodSocket.mjs +57 -26
- package/dist/v3/zodSocket.mjs.map +1 -1
- package/dist/v3/zodfetch.d.mts +15 -58
- package/dist/v3/zodfetch.d.ts +15 -58
- package/dist/v3/zodfetch.js +246 -156
- package/dist/v3/zodfetch.js.map +1 -1
- package/dist/v3/zodfetch.mjs +244 -149
- package/dist/v3/zodfetch.mjs.map +1 -1
- package/dist/versions.d.mts +11 -0
- package/dist/versions.d.ts +11 -0
- package/dist/versions.js +31 -0
- package/dist/versions.js.map +1 -0
- package/dist/versions.mjs +27 -0
- package/dist/versions.mjs.map +1 -0
- package/package.json +152 -8
|
@@ -1,55 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { R as RetryOptions, P as Prettify,
|
|
1
|
+
import { L as LogLevel } from './taskLogger-r_AFTX45.mjs';
|
|
2
|
+
import { M as MachinePresetName, a as TaskRunContext } from './common-CLW82lkt.mjs';
|
|
3
|
+
import { R as RetryOptions, P as Prettify, T as TaskMetadata, a as TaskFileMetadata, b as TaskMetadataWithFilePath } from './schemas-C9ssfehv.mjs';
|
|
4
4
|
import { InstrumentationOption } from '@opentelemetry/instrumentation';
|
|
5
|
-
import { a as TaskRunContext } from './manager-JkbddlcO.js';
|
|
6
|
-
|
|
7
|
-
type TriggerTracerConfig = {
|
|
8
|
-
name: string;
|
|
9
|
-
version: string;
|
|
10
|
-
} | {
|
|
11
|
-
tracer: Tracer;
|
|
12
|
-
logger: Logger;
|
|
13
|
-
};
|
|
14
|
-
declare class TriggerTracer {
|
|
15
|
-
private readonly _config;
|
|
16
|
-
constructor(_config: TriggerTracerConfig);
|
|
17
|
-
private _tracer;
|
|
18
|
-
private get tracer();
|
|
19
|
-
private _logger;
|
|
20
|
-
private get logger();
|
|
21
|
-
extractContext(traceContext?: Record<string, unknown>): Context$1;
|
|
22
|
-
startActiveSpan<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions, ctx?: Context$1): Promise<T>;
|
|
23
|
-
startSpan(name: string, options?: SpanOptions, ctx?: Context$1): Span;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type LogLevel = "none" | "error" | "warn" | "info" | "debug" | "log";
|
|
27
|
-
declare const logLevels: Array<LogLevel>;
|
|
28
|
-
type TaskLoggerConfig = {
|
|
29
|
-
logger: Logger;
|
|
30
|
-
tracer: TriggerTracer;
|
|
31
|
-
level: LogLevel;
|
|
32
|
-
};
|
|
33
|
-
interface TaskLogger {
|
|
34
|
-
debug(message: string, properties?: Record<string, unknown>): void;
|
|
35
|
-
log(message: string, properties?: Record<string, unknown>): void;
|
|
36
|
-
info(message: string, properties?: Record<string, unknown>): void;
|
|
37
|
-
warn(message: string, properties?: Record<string, unknown>): void;
|
|
38
|
-
error(message: string, properties?: Record<string, unknown>): void;
|
|
39
|
-
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
40
|
-
}
|
|
41
|
-
declare class OtelTaskLogger implements TaskLogger {
|
|
42
|
-
#private;
|
|
43
|
-
private readonly _config;
|
|
44
|
-
private readonly _level;
|
|
45
|
-
constructor(_config: TaskLoggerConfig);
|
|
46
|
-
debug(message: string, properties?: Record<string, unknown>): void;
|
|
47
|
-
log(message: string, properties?: Record<string, unknown>): void;
|
|
48
|
-
info(message: string, properties?: Record<string, unknown>): void;
|
|
49
|
-
warn(message: string, properties?: Record<string, unknown>): void;
|
|
50
|
-
error(message: string, properties?: Record<string, unknown>): void;
|
|
51
|
-
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
52
|
-
}
|
|
53
5
|
|
|
54
6
|
interface ProjectConfig {
|
|
55
7
|
project: string;
|
|
@@ -60,6 +12,11 @@ interface ProjectConfig {
|
|
|
60
12
|
default?: RetryOptions;
|
|
61
13
|
};
|
|
62
14
|
additionalPackages?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* The default machine preset to use for your deployed trigger.dev tasks. You can override this on a per-task basis.
|
|
17
|
+
* @default "small-1x"
|
|
18
|
+
*/
|
|
19
|
+
machine?: MachinePresetName;
|
|
63
20
|
/**
|
|
64
21
|
* List of additional files to include in your trigger.dev bundle. e.g. ["./prisma/schema.prisma"]
|
|
65
22
|
*
|
|
@@ -114,6 +71,14 @@ interface ProjectConfig {
|
|
|
114
71
|
* @example "prisma generate"
|
|
115
72
|
*/
|
|
116
73
|
postInstall?: string;
|
|
74
|
+
/**
|
|
75
|
+
* CA Cert file to be added to NODE_EXTRA_CA_CERT environment variable in, useful in use with self signed cert in the trigger.dev environment.
|
|
76
|
+
*
|
|
77
|
+
* @example "./certs/ca.crt"
|
|
78
|
+
* Note: must start with "./" and be relative to the project root.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
extraCACerts?: string;
|
|
117
82
|
}
|
|
118
83
|
|
|
119
84
|
type InitOutput = Record<string, any> | void | undefined;
|
|
@@ -183,12 +148,47 @@ type TaskMetadataWithFunctions = TaskMetadata & {
|
|
|
183
148
|
};
|
|
184
149
|
};
|
|
185
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Contains two parts: the first part is the seconds, the second part is the nanoseconds.
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
186
155
|
type ClockTime = [number, number];
|
|
187
156
|
interface Clock {
|
|
188
157
|
preciseNow(): ClockTime;
|
|
189
158
|
reset(): void;
|
|
190
159
|
}
|
|
191
160
|
|
|
161
|
+
type UsageSample = {
|
|
162
|
+
cpuTime: number;
|
|
163
|
+
wallTime: number;
|
|
164
|
+
};
|
|
165
|
+
interface UsageMeasurement {
|
|
166
|
+
sample(): UsageSample;
|
|
167
|
+
}
|
|
168
|
+
interface UsageManager {
|
|
169
|
+
disable(): void;
|
|
170
|
+
start(): UsageMeasurement;
|
|
171
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
172
|
+
sample(): UsageSample | undefined;
|
|
173
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare class UsageAPI implements UsageManager {
|
|
177
|
+
#private;
|
|
178
|
+
private static _instance?;
|
|
179
|
+
private constructor();
|
|
180
|
+
static getInstance(): UsageAPI;
|
|
181
|
+
setGlobalUsageManager(manager: UsageManager): boolean;
|
|
182
|
+
disable(): void;
|
|
183
|
+
start(): UsageMeasurement;
|
|
184
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
185
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
186
|
+
sample(): UsageSample | undefined;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Entrypoint for usage API */
|
|
190
|
+
declare const usage: UsageAPI;
|
|
191
|
+
|
|
192
192
|
interface TaskCatalog {
|
|
193
193
|
registerTaskMetadata(task: TaskMetadataWithFunctions): void;
|
|
194
194
|
updateTaskMetadata(id: string, task: Partial<TaskMetadataWithFunctions>): void;
|
|
@@ -199,4 +199,4 @@ interface TaskCatalog {
|
|
|
199
199
|
taskExists(id: string): boolean;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
export { type Clock as C, type FailureFnParams as F, type HandleErrorFunction as H, type InitOutput as I, type
|
|
202
|
+
export { type Clock as C, type FailureFnParams as F, type HandleErrorFunction as H, type InitOutput as I, type MiddlewareFnParams as M, type ProjectConfig as P, type RunFnParams as R, type StartFnParams as S, type TaskMetadataWithFunctions as T, type UsageMeasurement as U, type ClockTime as a, type TaskCatalog as b, type UsageManager as c, type UsageSample as d, type InitFnParams as e, type Context as f, type SuccessFnParams as g, type HandleErrorFnParams as h, type HandleErrorModificationOptions as i, type HandleErrorResult as j, type HandleErrorArgs as k, type ResolveEnvironmentVariablesResult as l, type ResolveEnvironmentVariablesParams as m, type ResolveEnvironmentVariablesFunction as n, usage as u };
|
|
@@ -1,55 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { R as RetryOptions, P as Prettify,
|
|
1
|
+
import { L as LogLevel } from './taskLogger-CzADe4je.js';
|
|
2
|
+
import { M as MachinePresetName, a as TaskRunContext } from './common-CLW82lkt.js';
|
|
3
|
+
import { R as RetryOptions, P as Prettify, T as TaskMetadata, a as TaskFileMetadata, b as TaskMetadataWithFilePath } from './schemas-C9ssfehv.js';
|
|
4
4
|
import { InstrumentationOption } from '@opentelemetry/instrumentation';
|
|
5
|
-
import { a as TaskRunContext } from './manager-JkbddlcO.mjs';
|
|
6
|
-
|
|
7
|
-
type TriggerTracerConfig = {
|
|
8
|
-
name: string;
|
|
9
|
-
version: string;
|
|
10
|
-
} | {
|
|
11
|
-
tracer: Tracer;
|
|
12
|
-
logger: Logger;
|
|
13
|
-
};
|
|
14
|
-
declare class TriggerTracer {
|
|
15
|
-
private readonly _config;
|
|
16
|
-
constructor(_config: TriggerTracerConfig);
|
|
17
|
-
private _tracer;
|
|
18
|
-
private get tracer();
|
|
19
|
-
private _logger;
|
|
20
|
-
private get logger();
|
|
21
|
-
extractContext(traceContext?: Record<string, unknown>): Context$1;
|
|
22
|
-
startActiveSpan<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions, ctx?: Context$1): Promise<T>;
|
|
23
|
-
startSpan(name: string, options?: SpanOptions, ctx?: Context$1): Span;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
type LogLevel = "none" | "error" | "warn" | "info" | "debug" | "log";
|
|
27
|
-
declare const logLevels: Array<LogLevel>;
|
|
28
|
-
type TaskLoggerConfig = {
|
|
29
|
-
logger: Logger;
|
|
30
|
-
tracer: TriggerTracer;
|
|
31
|
-
level: LogLevel;
|
|
32
|
-
};
|
|
33
|
-
interface TaskLogger {
|
|
34
|
-
debug(message: string, properties?: Record<string, unknown>): void;
|
|
35
|
-
log(message: string, properties?: Record<string, unknown>): void;
|
|
36
|
-
info(message: string, properties?: Record<string, unknown>): void;
|
|
37
|
-
warn(message: string, properties?: Record<string, unknown>): void;
|
|
38
|
-
error(message: string, properties?: Record<string, unknown>): void;
|
|
39
|
-
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
40
|
-
}
|
|
41
|
-
declare class OtelTaskLogger implements TaskLogger {
|
|
42
|
-
#private;
|
|
43
|
-
private readonly _config;
|
|
44
|
-
private readonly _level;
|
|
45
|
-
constructor(_config: TaskLoggerConfig);
|
|
46
|
-
debug(message: string, properties?: Record<string, unknown>): void;
|
|
47
|
-
log(message: string, properties?: Record<string, unknown>): void;
|
|
48
|
-
info(message: string, properties?: Record<string, unknown>): void;
|
|
49
|
-
warn(message: string, properties?: Record<string, unknown>): void;
|
|
50
|
-
error(message: string, properties?: Record<string, unknown>): void;
|
|
51
|
-
trace<T>(name: string, fn: (span: Span) => Promise<T>, options?: SpanOptions): Promise<T>;
|
|
52
|
-
}
|
|
53
5
|
|
|
54
6
|
interface ProjectConfig {
|
|
55
7
|
project: string;
|
|
@@ -60,6 +12,11 @@ interface ProjectConfig {
|
|
|
60
12
|
default?: RetryOptions;
|
|
61
13
|
};
|
|
62
14
|
additionalPackages?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* The default machine preset to use for your deployed trigger.dev tasks. You can override this on a per-task basis.
|
|
17
|
+
* @default "small-1x"
|
|
18
|
+
*/
|
|
19
|
+
machine?: MachinePresetName;
|
|
63
20
|
/**
|
|
64
21
|
* List of additional files to include in your trigger.dev bundle. e.g. ["./prisma/schema.prisma"]
|
|
65
22
|
*
|
|
@@ -114,6 +71,14 @@ interface ProjectConfig {
|
|
|
114
71
|
* @example "prisma generate"
|
|
115
72
|
*/
|
|
116
73
|
postInstall?: string;
|
|
74
|
+
/**
|
|
75
|
+
* CA Cert file to be added to NODE_EXTRA_CA_CERT environment variable in, useful in use with self signed cert in the trigger.dev environment.
|
|
76
|
+
*
|
|
77
|
+
* @example "./certs/ca.crt"
|
|
78
|
+
* Note: must start with "./" and be relative to the project root.
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
extraCACerts?: string;
|
|
117
82
|
}
|
|
118
83
|
|
|
119
84
|
type InitOutput = Record<string, any> | void | undefined;
|
|
@@ -183,12 +148,47 @@ type TaskMetadataWithFunctions = TaskMetadata & {
|
|
|
183
148
|
};
|
|
184
149
|
};
|
|
185
150
|
|
|
151
|
+
/**
|
|
152
|
+
* Contains two parts: the first part is the seconds, the second part is the nanoseconds.
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
186
155
|
type ClockTime = [number, number];
|
|
187
156
|
interface Clock {
|
|
188
157
|
preciseNow(): ClockTime;
|
|
189
158
|
reset(): void;
|
|
190
159
|
}
|
|
191
160
|
|
|
161
|
+
type UsageSample = {
|
|
162
|
+
cpuTime: number;
|
|
163
|
+
wallTime: number;
|
|
164
|
+
};
|
|
165
|
+
interface UsageMeasurement {
|
|
166
|
+
sample(): UsageSample;
|
|
167
|
+
}
|
|
168
|
+
interface UsageManager {
|
|
169
|
+
disable(): void;
|
|
170
|
+
start(): UsageMeasurement;
|
|
171
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
172
|
+
sample(): UsageSample | undefined;
|
|
173
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare class UsageAPI implements UsageManager {
|
|
177
|
+
#private;
|
|
178
|
+
private static _instance?;
|
|
179
|
+
private constructor();
|
|
180
|
+
static getInstance(): UsageAPI;
|
|
181
|
+
setGlobalUsageManager(manager: UsageManager): boolean;
|
|
182
|
+
disable(): void;
|
|
183
|
+
start(): UsageMeasurement;
|
|
184
|
+
stop(measurement: UsageMeasurement): UsageSample;
|
|
185
|
+
pauseAsync<T>(cb: () => Promise<T>): Promise<T>;
|
|
186
|
+
sample(): UsageSample | undefined;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Entrypoint for usage API */
|
|
190
|
+
declare const usage: UsageAPI;
|
|
191
|
+
|
|
192
192
|
interface TaskCatalog {
|
|
193
193
|
registerTaskMetadata(task: TaskMetadataWithFunctions): void;
|
|
194
194
|
updateTaskMetadata(id: string, task: Partial<TaskMetadataWithFunctions>): void;
|
|
@@ -199,4 +199,4 @@ interface TaskCatalog {
|
|
|
199
199
|
taskExists(id: string): boolean;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
export { type Clock as C, type FailureFnParams as F, type HandleErrorFunction as H, type InitOutput as I, type
|
|
202
|
+
export { type Clock as C, type FailureFnParams as F, type HandleErrorFunction as H, type InitOutput as I, type MiddlewareFnParams as M, type ProjectConfig as P, type RunFnParams as R, type StartFnParams as S, type TaskMetadataWithFunctions as T, type UsageMeasurement as U, type ClockTime as a, type TaskCatalog as b, type UsageManager as c, type UsageSample as d, type InitFnParams as e, type Context as f, type SuccessFnParams as g, type HandleErrorFnParams as h, type HandleErrorModificationOptions as i, type HandleErrorResult as j, type HandleErrorArgs as k, type ResolveEnvironmentVariablesResult as l, type ResolveEnvironmentVariablesParams as m, type ResolveEnvironmentVariablesFunction as n, usage as u };
|