@trigger.dev/core 0.0.0-v3-pnpm-fix-20240409132306 → 0.0.0-v3-schedules-beta-20240417103105

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/v3/index.js CHANGED
@@ -91,6 +91,7 @@ var TaskRunStringError = zod.z.object({
91
91
  });
92
92
  var TaskRunErrorCodes = {
93
93
  COULD_NOT_FIND_EXECUTOR: "COULD_NOT_FIND_EXECUTOR",
94
+ COULD_NOT_FIND_TASK: "COULD_NOT_FIND_TASK",
94
95
  CONFIGURED_INCORRECTLY: "CONFIGURED_INCORRECTLY",
95
96
  TASK_ALREADY_RUNNING: "TASK_ALREADY_RUNNING",
96
97
  TASK_EXECUTION_FAILED: "TASK_EXECUTION_FAILED",
@@ -104,6 +105,7 @@ var TaskRunInternalError = zod.z.object({
104
105
  type: zod.z.literal("INTERNAL_ERROR"),
105
106
  code: zod.z.enum([
106
107
  "COULD_NOT_FIND_EXECUTOR",
108
+ "COULD_NOT_FIND_TASK",
107
109
  "CONFIGURED_INCORRECTLY",
108
110
  "TASK_ALREADY_RUNNING",
109
111
  "TASK_EXECUTION_FAILED",
@@ -448,15 +450,17 @@ var QueueOptions = zod.z.object({
448
450
  });
449
451
  var TaskMetadata = zod.z.object({
450
452
  id: zod.z.string(),
451
- exportName: zod.z.string(),
452
453
  packageVersion: zod.z.string(),
453
454
  queue: QueueOptions.optional(),
454
455
  retry: RetryOptions.optional(),
455
- machine: Machine.partial().optional()
456
+ machine: Machine.partial().optional(),
457
+ triggerSource: zod.z.string().optional()
456
458
  });
457
- var TaskMetadataWithFilePath = TaskMetadata.extend({
458
- filePath: zod.z.string()
459
+ var TaskFileMetadata = zod.z.object({
460
+ filePath: zod.z.string(),
461
+ exportName: zod.z.string()
459
462
  });
463
+ var TaskMetadataWithFilePath = TaskMetadata.merge(TaskFileMetadata);
460
464
  var UncaughtExceptionMessage = zod.z.object({
461
465
  version: zod.z.literal("v1").default("v1"),
462
466
  error: zod.z.object({
@@ -608,7 +612,8 @@ var TaskResource = zod.z.object({
608
612
  exportName: zod.z.string(),
609
613
  queue: QueueOptions.optional(),
610
614
  retry: RetryOptions.optional(),
611
- machine: Machine.partial().optional()
615
+ machine: Machine.partial().optional(),
616
+ triggerSource: zod.z.string().optional()
612
617
  });
613
618
  var BackgroundWorkerMetadata = zod.z.object({
614
619
  packageVersion: zod.z.string(),
@@ -664,7 +669,9 @@ var TriggerTaskRequestBody = zod.z.object({
664
669
  lockToVersion: zod.z.string().optional(),
665
670
  queue: QueueOptions.optional(),
666
671
  concurrencyKey: zod.z.string().optional(),
667
- test: zod.z.boolean().optional()
672
+ idempotencyKey: zod.z.string().optional(),
673
+ test: zod.z.boolean().optional(),
674
+ payloadType: zod.z.string().optional()
668
675
  }).optional()
669
676
  });
670
677
  var TriggerTaskResponse = zod.z.object({
@@ -760,6 +767,53 @@ var ReplayRunResponse = zod.z.object({
760
767
  var CanceledRunResponse = zod.z.object({
761
768
  message: zod.z.string()
762
769
  });
770
+ var ScheduledTaskPayload = zod.z.object({
771
+ scheduleId: zod.z.string(),
772
+ timestamp: zod.z.date(),
773
+ lastTimestamp: zod.z.date().optional(),
774
+ externalId: zod.z.string().optional(),
775
+ upcoming: zod.z.array(zod.z.date())
776
+ });
777
+ var CreateScheduleOptions = zod.z.object({
778
+ task: zod.z.string(),
779
+ cron: zod.z.string(),
780
+ deduplicationKey: zod.z.string().optional(),
781
+ externalId: zod.z.string().optional()
782
+ });
783
+ var UpdateScheduleOptions = CreateScheduleOptions;
784
+ var ScheduleObject = zod.z.object({
785
+ id: zod.z.string(),
786
+ task: zod.z.string(),
787
+ active: zod.z.boolean(),
788
+ deduplicationKey: zod.z.string().optional(),
789
+ externalId: zod.z.string().optional(),
790
+ generator: zod.z.object({
791
+ type: zod.z.literal("CRON"),
792
+ expression: zod.z.string(),
793
+ description: zod.z.string()
794
+ }),
795
+ nextRun: zod.z.coerce.date().optional(),
796
+ environments: zod.z.array(zod.z.object({
797
+ id: zod.z.string(),
798
+ type: zod.z.string(),
799
+ userName: zod.z.string().optional()
800
+ }))
801
+ });
802
+ var DeletedScheduleObject = zod.z.object({
803
+ id: zod.z.string()
804
+ });
805
+ var ListSchedulesResult = zod.z.object({
806
+ data: zod.z.array(ScheduleObject),
807
+ pagination: zod.z.object({
808
+ currentPage: zod.z.number(),
809
+ totalPages: zod.z.number(),
810
+ count: zod.z.number()
811
+ })
812
+ });
813
+ var ListScheduleOptions = zod.z.object({
814
+ page: zod.z.number().optional(),
815
+ perPage: zod.z.number().optional()
816
+ });
763
817
  var PostStartCauses = zod.z.enum([
764
818
  "index",
765
819
  "create",
@@ -791,7 +845,8 @@ var Config = zod.z.object({
791
845
  zod.z.string(),
792
846
  RegexSchema
793
847
  ])).optional(),
794
- logLevel: zod.z.string().optional()
848
+ logLevel: zod.z.string().optional(),
849
+ enableConsoleLogging: zod.z.boolean().optional()
795
850
  });
796
851
  var WaitReason = zod.z.enum([
797
852
  "WAIT_FOR_DURATION",
@@ -1693,7 +1748,8 @@ var SemanticInternalAttributes = {
1693
1748
  SDK_LANGUAGE: "sdk.language",
1694
1749
  RETRY_AT: "retry.at",
1695
1750
  RETRY_DELAY: "retry.delay",
1696
- RETRY_COUNT: "retry.count"
1751
+ RETRY_COUNT: "retry.count",
1752
+ LINK_TITLE: "$link.title"
1697
1753
  };
1698
1754
 
1699
1755
  // src/v3/tasks/taskContextManager.ts
@@ -1881,6 +1937,57 @@ var _ApiClient = class _ApiClient {
1881
1937
  headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1882
1938
  }, zodFetchOptions);
1883
1939
  }
1940
+ createSchedule(options) {
1941
+ return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules`, {
1942
+ method: "POST",
1943
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false),
1944
+ body: JSON.stringify(options)
1945
+ });
1946
+ }
1947
+ listSchedules(options) {
1948
+ const searchParams = new URLSearchParams();
1949
+ if (options?.page) {
1950
+ searchParams.append("page", options.page.toString());
1951
+ }
1952
+ if (options?.perPage) {
1953
+ searchParams.append("perPage", options.perPage.toString());
1954
+ }
1955
+ return zodfetch(ListSchedulesResult, `${this.baseUrl}/api/v1/schedules${searchParams.size > 0 ? `?${searchParams}` : ""}`, {
1956
+ method: "GET",
1957
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1958
+ });
1959
+ }
1960
+ retrieveSchedule(scheduleId) {
1961
+ return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules/${scheduleId}`, {
1962
+ method: "GET",
1963
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1964
+ });
1965
+ }
1966
+ updateSchedule(scheduleId, options) {
1967
+ return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules/${scheduleId}`, {
1968
+ method: "PUT",
1969
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false),
1970
+ body: JSON.stringify(options)
1971
+ });
1972
+ }
1973
+ deactivateSchedule(scheduleId) {
1974
+ return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules/${scheduleId}/deactivate`, {
1975
+ method: "POST",
1976
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1977
+ });
1978
+ }
1979
+ activateSchedule(scheduleId) {
1980
+ return zodfetch(ScheduleObject, `${this.baseUrl}/api/v1/schedules/${scheduleId}/activate`, {
1981
+ method: "POST",
1982
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1983
+ });
1984
+ }
1985
+ deleteSchedule(scheduleId) {
1986
+ return zodfetch(DeletedScheduleObject, `${this.baseUrl}/api/v1/schedules/${scheduleId}`, {
1987
+ method: "DELETE",
1988
+ headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
1989
+ });
1990
+ }
1884
1991
  };
1885
1992
  _getHeaders = new WeakSet();
1886
1993
  getHeaders_fn = /* @__PURE__ */ __name(function(spanParentAsLink) {
@@ -2794,11 +2901,6 @@ __name(unregisterGlobal, "unregisterGlobal");
2794
2901
  var _NoopRuntimeManager = class _NoopRuntimeManager {
2795
2902
  disable() {
2796
2903
  }
2797
- registerTasks() {
2798
- }
2799
- getTaskMetadata(id) {
2800
- return void 0;
2801
- }
2802
2904
  waitForDuration(ms) {
2803
2905
  return Promise.resolve();
2804
2906
  }
@@ -2858,12 +2960,6 @@ var _RuntimeAPI = class _RuntimeAPI {
2858
2960
  __privateMethod(this, _getRuntimeManager, getRuntimeManager_fn).call(this).disable();
2859
2961
  unregisterGlobal(API_NAME);
2860
2962
  }
2861
- registerTasks(tasks) {
2862
- __privateMethod(this, _getRuntimeManager, getRuntimeManager_fn).call(this).registerTasks(tasks);
2863
- }
2864
- getTaskMetadata(id) {
2865
- return __privateMethod(this, _getRuntimeManager, getRuntimeManager_fn).call(this).getTaskMetadata(id);
2866
- }
2867
2963
  };
2868
2964
  _getRuntimeManager = new WeakSet();
2869
2965
  getRuntimeManager_fn = /* @__PURE__ */ __name(function() {
@@ -3009,7 +3105,7 @@ var _OtelTaskLogger = class _OtelTaskLogger {
3009
3105
  _emitLog = new WeakSet();
3010
3106
  emitLog_fn = /* @__PURE__ */ __name(function(message, timestamp, severityText, severityNumber, properties) {
3011
3107
  let attributes = {
3012
- ...flattenAttributes(properties)
3108
+ ...flattenAttributes(safeJsonProcess(properties))
3013
3109
  };
3014
3110
  const icon = iconStringForSeverity(severityNumber);
3015
3111
  if (icon !== void 0) {
@@ -3046,6 +3142,14 @@ var _NoopTaskLogger = class _NoopTaskLogger {
3046
3142
  };
3047
3143
  __name(_NoopTaskLogger, "NoopTaskLogger");
3048
3144
  var NoopTaskLogger = _NoopTaskLogger;
3145
+ function safeJsonProcess(value) {
3146
+ try {
3147
+ return JSON.parse(JSON.stringify(value));
3148
+ } catch {
3149
+ return value;
3150
+ }
3151
+ }
3152
+ __name(safeJsonProcess, "safeJsonProcess");
3049
3153
 
3050
3154
  // src/v3/logger/index.ts
3051
3155
  var API_NAME3 = "logger";
@@ -3096,6 +3200,78 @@ var LoggerAPI = _LoggerAPI;
3096
3200
  // src/v3/logger-api.ts
3097
3201
  var logger = LoggerAPI.getInstance();
3098
3202
 
3203
+ // src/v3/task-catalog/noopTaskCatalog.ts
3204
+ var _NoopTaskCatalog = class _NoopTaskCatalog {
3205
+ registerTaskMetadata(task) {
3206
+ }
3207
+ registerTaskFileMetadata(id, metadata) {
3208
+ }
3209
+ updateTaskMetadata(id, updates) {
3210
+ }
3211
+ getAllTaskMetadata() {
3212
+ return [];
3213
+ }
3214
+ getTaskMetadata(id) {
3215
+ return void 0;
3216
+ }
3217
+ getTask(id) {
3218
+ return void 0;
3219
+ }
3220
+ disable() {
3221
+ }
3222
+ };
3223
+ __name(_NoopTaskCatalog, "NoopTaskCatalog");
3224
+ var NoopTaskCatalog = _NoopTaskCatalog;
3225
+
3226
+ // src/v3/task-catalog/index.ts
3227
+ var API_NAME4 = "task-catalog";
3228
+ var NOOP_TASK_CATALOG = new NoopTaskCatalog();
3229
+ var _getCatalog, getCatalog_fn;
3230
+ var _TaskCatalogAPI = class _TaskCatalogAPI {
3231
+ constructor() {
3232
+ __privateAdd(this, _getCatalog);
3233
+ }
3234
+ static getInstance() {
3235
+ if (!this._instance) {
3236
+ this._instance = new _TaskCatalogAPI();
3237
+ }
3238
+ return this._instance;
3239
+ }
3240
+ setGlobalTaskCatalog(taskCatalog2) {
3241
+ return registerGlobal(API_NAME4, taskCatalog2);
3242
+ }
3243
+ disable() {
3244
+ unregisterGlobal(API_NAME4);
3245
+ }
3246
+ registerTaskMetadata(task) {
3247
+ __privateMethod(this, _getCatalog, getCatalog_fn).call(this).registerTaskMetadata(task);
3248
+ }
3249
+ updateTaskMetadata(id, updates) {
3250
+ __privateMethod(this, _getCatalog, getCatalog_fn).call(this).updateTaskMetadata(id, updates);
3251
+ }
3252
+ registerTaskFileMetadata(id, metadata) {
3253
+ __privateMethod(this, _getCatalog, getCatalog_fn).call(this).registerTaskFileMetadata(id, metadata);
3254
+ }
3255
+ getAllTaskMetadata() {
3256
+ return __privateMethod(this, _getCatalog, getCatalog_fn).call(this).getAllTaskMetadata();
3257
+ }
3258
+ getTaskMetadata(id) {
3259
+ return __privateMethod(this, _getCatalog, getCatalog_fn).call(this).getTaskMetadata(id);
3260
+ }
3261
+ getTask(id) {
3262
+ return __privateMethod(this, _getCatalog, getCatalog_fn).call(this).getTask(id);
3263
+ }
3264
+ };
3265
+ _getCatalog = new WeakSet();
3266
+ getCatalog_fn = /* @__PURE__ */ __name(function() {
3267
+ return getGlobal(API_NAME4) ?? NOOP_TASK_CATALOG;
3268
+ }, "#getCatalog");
3269
+ __name(_TaskCatalogAPI, "TaskCatalogAPI");
3270
+ var TaskCatalogAPI = _TaskCatalogAPI;
3271
+
3272
+ // src/v3/task-catalog-api.ts
3273
+ var taskCatalog = TaskCatalogAPI.getInstance();
3274
+
3099
3275
  // src/v3/limits.ts
3100
3276
  var OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT = 256;
3101
3277
  var OTEL_LOG_ATTRIBUTE_COUNT_LIMIT = 256;
@@ -3219,19 +3395,10 @@ var _DevRuntimeManager = class _DevRuntimeManager {
3219
3395
  constructor() {
3220
3396
  __publicField(this, "_taskWaits", /* @__PURE__ */ new Map());
3221
3397
  __publicField(this, "_batchWaits", /* @__PURE__ */ new Map());
3222
- __publicField(this, "_tasks", /* @__PURE__ */ new Map());
3223
3398
  __publicField(this, "_pendingCompletionNotifications", /* @__PURE__ */ new Map());
3224
3399
  }
3225
3400
  disable() {
3226
3401
  }
3227
- registerTasks(tasks) {
3228
- for (const task of tasks) {
3229
- this._tasks.set(task.id, task);
3230
- }
3231
- }
3232
- getTaskMetadata(id) {
3233
- return this._tasks.get(id);
3234
- }
3235
3402
  async waitForDuration(ms) {
3236
3403
  return new Promise((resolve) => {
3237
3404
  setTimeout(resolve, ms);
@@ -3309,18 +3476,9 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
3309
3476
  this.options = options;
3310
3477
  this._taskWaits = /* @__PURE__ */ new Map();
3311
3478
  this._batchWaits = /* @__PURE__ */ new Map();
3312
- this._tasks = /* @__PURE__ */ new Map();
3313
3479
  }
3314
3480
  disable() {
3315
3481
  }
3316
- registerTasks(tasks) {
3317
- for (const task of tasks) {
3318
- this._tasks.set(task.id, task);
3319
- }
3320
- }
3321
- getTaskMetadata(id) {
3322
- return this._tasks.get(id);
3323
- }
3324
3482
  async waitForDuration(ms) {
3325
3483
  const now = Date.now();
3326
3484
  const resolveAfterDuration = promises.setTimeout(ms, "duration");
@@ -3525,11 +3683,12 @@ __name(_TriggerTracer, "TriggerTracer");
3525
3683
  var TriggerTracer = _TriggerTracer;
3526
3684
  var _handleLog, handleLog_fn, _getTimestampInHrTime2, getTimestampInHrTime_fn2, _getAttributes, getAttributes_fn;
3527
3685
  var _ConsoleInterceptor = class _ConsoleInterceptor {
3528
- constructor(logger2) {
3686
+ constructor(logger2, sendToStdIO) {
3529
3687
  __privateAdd(this, _handleLog);
3530
3688
  __privateAdd(this, _getTimestampInHrTime2);
3531
3689
  __privateAdd(this, _getAttributes);
3532
3690
  this.logger = logger2;
3691
+ this.sendToStdIO = sendToStdIO;
3533
3692
  }
3534
3693
  // Intercept the console and send logs to the OpenTelemetry logger
3535
3694
  // during the execution of the callback
@@ -3538,12 +3697,14 @@ var _ConsoleInterceptor = class _ConsoleInterceptor {
3538
3697
  log: console2.log,
3539
3698
  info: console2.info,
3540
3699
  warn: console2.warn,
3541
- error: console2.error
3700
+ error: console2.error,
3701
+ debug: console2.debug
3542
3702
  };
3543
3703
  console2.log = this.log.bind(this);
3544
3704
  console2.info = this.info.bind(this);
3545
3705
  console2.warn = this.warn.bind(this);
3546
3706
  console2.error = this.error.bind(this);
3707
+ console2.debug = this.debug.bind(this);
3547
3708
  try {
3548
3709
  return await callback();
3549
3710
  } finally {
@@ -3551,8 +3712,12 @@ var _ConsoleInterceptor = class _ConsoleInterceptor {
3551
3712
  console2.info = originalConsole.info;
3552
3713
  console2.warn = originalConsole.warn;
3553
3714
  console2.error = originalConsole.error;
3715
+ console2.debug = originalConsole.debug;
3554
3716
  }
3555
3717
  }
3718
+ debug(...args) {
3719
+ __privateMethod(this, _handleLog, handleLog_fn).call(this, apiLogs.SeverityNumber.DEBUG, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Debug", ...args);
3720
+ }
3556
3721
  log(...args) {
3557
3722
  __privateMethod(this, _handleLog, handleLog_fn).call(this, apiLogs.SeverityNumber.INFO, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Log", ...args);
3558
3723
  }
@@ -3569,6 +3734,13 @@ var _ConsoleInterceptor = class _ConsoleInterceptor {
3569
3734
  _handleLog = new WeakSet();
3570
3735
  handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, timestamp, severityText, ...args) {
3571
3736
  const body = util__default.default.format(...args);
3737
+ if (this.sendToStdIO) {
3738
+ if (severityNumber === apiLogs.SeverityNumber.ERROR) {
3739
+ process.stderr.write(body);
3740
+ } else {
3741
+ process.stdout.write(body);
3742
+ }
3743
+ }
3572
3744
  const parsed = tryParseJSON(body);
3573
3745
  if (parsed.ok) {
3574
3746
  this.logger.emit({
@@ -4111,6 +4283,7 @@ async function stringifyIO(value) {
4111
4283
  };
4112
4284
  } catch {
4113
4285
  return {
4286
+ data: value,
4114
4287
  dataType: "application/json"
4115
4288
  };
4116
4289
  }
@@ -4279,10 +4452,16 @@ async function prettyPrintPacket(rawData, dataType) {
4279
4452
  return "";
4280
4453
  }
4281
4454
  if (dataType === "application/super+json") {
4455
+ if (typeof rawData === "string") {
4456
+ rawData = safeJsonParse(rawData);
4457
+ }
4282
4458
  const { deserialize } = await loadSuperJSON();
4283
4459
  return await prettyPrintPacket(deserialize(rawData), "application/json");
4284
4460
  }
4285
4461
  if (dataType === "application/json") {
4462
+ if (typeof rawData === "string") {
4463
+ rawData = safeJsonParse(rawData);
4464
+ }
4286
4465
  return JSON.stringify(rawData, safeReplacer, 2);
4287
4466
  }
4288
4467
  if (typeof rawData === "string") {
@@ -4616,6 +4795,84 @@ function detectDependencyVersion(dependency) {
4616
4795
  }
4617
4796
  __name(detectDependencyVersion, "detectDependencyVersion");
4618
4797
 
4798
+ // src/v3/task-catalog/standardTaskCatalog.ts
4799
+ var _StandardTaskCatalog = class _StandardTaskCatalog {
4800
+ constructor() {
4801
+ __publicField(this, "_taskMetadata", /* @__PURE__ */ new Map());
4802
+ __publicField(this, "_taskFunctions", /* @__PURE__ */ new Map());
4803
+ __publicField(this, "_taskFileMetadata", /* @__PURE__ */ new Map());
4804
+ }
4805
+ registerTaskMetadata(task) {
4806
+ const { fns, ...metadata } = task;
4807
+ this._taskMetadata.set(task.id, metadata);
4808
+ this._taskFunctions.set(task.id, fns);
4809
+ }
4810
+ updateTaskMetadata(id, updates) {
4811
+ const existingMetadata = this._taskMetadata.get(id);
4812
+ if (existingMetadata) {
4813
+ this._taskMetadata.set(id, {
4814
+ ...existingMetadata,
4815
+ ...updates
4816
+ });
4817
+ }
4818
+ if (updates.fns) {
4819
+ const existingFunctions = this._taskFunctions.get(id);
4820
+ if (existingFunctions) {
4821
+ this._taskFunctions.set(id, {
4822
+ ...existingFunctions,
4823
+ ...updates.fns
4824
+ });
4825
+ }
4826
+ }
4827
+ }
4828
+ registerTaskFileMetadata(id, metadata) {
4829
+ this._taskFileMetadata.set(id, metadata);
4830
+ }
4831
+ // Return all the tasks, without the functions
4832
+ getAllTaskMetadata() {
4833
+ const result = [];
4834
+ for (const [id, metadata] of this._taskMetadata) {
4835
+ const fileMetadata = this._taskFileMetadata.get(id);
4836
+ if (!fileMetadata) {
4837
+ continue;
4838
+ }
4839
+ result.push({
4840
+ ...metadata,
4841
+ ...fileMetadata
4842
+ });
4843
+ }
4844
+ return result;
4845
+ }
4846
+ getTaskMetadata(id) {
4847
+ const metadata = this._taskMetadata.get(id);
4848
+ const fileMetadata = this._taskFileMetadata.get(id);
4849
+ if (!metadata || !fileMetadata) {
4850
+ return void 0;
4851
+ }
4852
+ return {
4853
+ ...metadata,
4854
+ ...fileMetadata
4855
+ };
4856
+ }
4857
+ getTask(id) {
4858
+ const metadata = this._taskMetadata.get(id);
4859
+ const fileMetadata = this._taskFileMetadata.get(id);
4860
+ const fns = this._taskFunctions.get(id);
4861
+ if (!metadata || !fns || !fileMetadata) {
4862
+ return void 0;
4863
+ }
4864
+ return {
4865
+ ...metadata,
4866
+ ...fileMetadata,
4867
+ fns
4868
+ };
4869
+ }
4870
+ disable() {
4871
+ }
4872
+ };
4873
+ __name(_StandardTaskCatalog, "StandardTaskCatalog");
4874
+ var StandardTaskCatalog = _StandardTaskCatalog;
4875
+
4619
4876
  // src/v3/index.ts
4620
4877
  function parseTriggerTaskRequestBody(body) {
4621
4878
  return TriggerTaskRequestBody.safeParse(body);
@@ -4645,7 +4902,9 @@ exports.CoordinatorToProdWorkerMessages = CoordinatorToProdWorkerMessages;
4645
4902
  exports.CreateAuthorizationCodeResponseSchema = CreateAuthorizationCodeResponseSchema;
4646
4903
  exports.CreateBackgroundWorkerRequestBody = CreateBackgroundWorkerRequestBody;
4647
4904
  exports.CreateBackgroundWorkerResponse = CreateBackgroundWorkerResponse;
4905
+ exports.CreateScheduleOptions = CreateScheduleOptions;
4648
4906
  exports.CreateUploadPayloadUrlResponseBody = CreateUploadPayloadUrlResponseBody;
4907
+ exports.DeletedScheduleObject = DeletedScheduleObject;
4649
4908
  exports.DeploymentErrorData = DeploymentErrorData;
4650
4909
  exports.DevRuntimeManager = DevRuntimeManager;
4651
4910
  exports.DurableClock = PreciseWallClock;
@@ -4672,6 +4931,8 @@ exports.GetProjectsResponseBody = GetProjectsResponseBody;
4672
4931
  exports.ImageDetailsMetadata = ImageDetailsMetadata;
4673
4932
  exports.InitializeDeploymentRequestBody = InitializeDeploymentRequestBody;
4674
4933
  exports.InitializeDeploymentResponseBody = InitializeDeploymentResponseBody;
4934
+ exports.ListScheduleOptions = ListScheduleOptions;
4935
+ exports.ListSchedulesResult = ListSchedulesResult;
4675
4936
  exports.Machine = Machine;
4676
4937
  exports.MachineCpu = MachineCpu;
4677
4938
  exports.MachineMemory = MachineMemory;
@@ -4703,6 +4964,8 @@ exports.QueueOptions = QueueOptions;
4703
4964
  exports.RateLimitOptions = RateLimitOptions;
4704
4965
  exports.ReplayRunResponse = ReplayRunResponse;
4705
4966
  exports.RetryOptions = RetryOptions;
4967
+ exports.ScheduleObject = ScheduleObject;
4968
+ exports.ScheduledTaskPayload = ScheduledTaskPayload;
4706
4969
  exports.SemanticInternalAttributes = SemanticInternalAttributes;
4707
4970
  exports.SharedQueueToClientMessages = SharedQueueToClientMessages;
4708
4971
  exports.SimpleStructuredLogger = SimpleStructuredLogger;
@@ -4710,11 +4973,13 @@ exports.SlidingWindowRateLimit = SlidingWindowRateLimit;
4710
4973
  exports.SpanEvent = SpanEvent;
4711
4974
  exports.SpanEvents = SpanEvents;
4712
4975
  exports.SpanMessagingEvent = SpanMessagingEvent;
4976
+ exports.StandardTaskCatalog = StandardTaskCatalog;
4713
4977
  exports.StartDeploymentIndexingRequestBody = StartDeploymentIndexingRequestBody;
4714
4978
  exports.StartDeploymentIndexingResponseBody = StartDeploymentIndexingResponseBody;
4715
4979
  exports.TaskContextSpanProcessor = TaskContextSpanProcessor;
4716
4980
  exports.TaskEventStyle = TaskEventStyle;
4717
4981
  exports.TaskExecutor = TaskExecutor;
4982
+ exports.TaskFileMetadata = TaskFileMetadata;
4718
4983
  exports.TaskMetadata = TaskMetadata;
4719
4984
  exports.TaskMetadataFailedToParseData = TaskMetadataFailedToParseData;
4720
4985
  exports.TaskMetadataWithFilePath = TaskMetadataWithFilePath;
@@ -4745,6 +5010,7 @@ exports.TriggerTaskRequestBody = TriggerTaskRequestBody;
4745
5010
  exports.TriggerTaskResponse = TriggerTaskResponse;
4746
5011
  exports.TriggerTracer = TriggerTracer;
4747
5012
  exports.UncaughtExceptionMessage = UncaughtExceptionMessage;
5013
+ exports.UpdateScheduleOptions = UpdateScheduleOptions;
4748
5014
  exports.WaitReason = WaitReason;
4749
5015
  exports.WhoAmIResponseSchema = WhoAmIResponseSchema;
4750
5016
  exports.ZodIpcConnection = ZodIpcConnection;
@@ -4801,6 +5067,7 @@ exports.runtime = runtime;
4801
5067
  exports.serverWebsocketMessages = serverWebsocketMessages;
4802
5068
  exports.stringPatternMatchers = stringPatternMatchers;
4803
5069
  exports.stringifyIO = stringifyIO;
5070
+ exports.taskCatalog = taskCatalog;
4804
5071
  exports.taskContextManager = taskContextManager;
4805
5072
  exports.unflattenAttributes = unflattenAttributes;
4806
5073
  exports.workerToChildMessages = workerToChildMessages;