@trigger.dev/core 0.0.0-v3-prerelease-20240624162135 → 0.0.0-v3-prerelease-20240628145956

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 (45) hide show
  1. package/dist/{catalog-Gjy5NtAB.d.mts → catalog-NpD1UPkO.d.mts} +1 -1
  2. package/dist/{catalog-EP9DGAGm.d.ts → catalog-gXIXpWTi.d.ts} +1 -1
  3. package/dist/{manager-S98VaLUy.d.mts → manager-ZZ3kQv68.d.mts} +23 -0
  4. package/dist/{manager-S98VaLUy.d.ts → manager-ZZ3kQv68.d.ts} +23 -0
  5. package/dist/{messages-xJbR1Vai.d.mts → messages-F5zEgkWj.d.mts} +134 -0
  6. package/dist/{messages-xJbR1Vai.d.ts → messages-F5zEgkWj.d.ts} +134 -0
  7. package/dist/v3/dev/index.d.mts +1 -1
  8. package/dist/v3/dev/index.d.ts +1 -1
  9. package/dist/v3/index.d.mts +18 -21
  10. package/dist/v3/index.d.ts +18 -21
  11. package/dist/v3/index.js +7 -4
  12. package/dist/v3/index.js.map +1 -1
  13. package/dist/v3/index.mjs +7 -4
  14. package/dist/v3/index.mjs.map +1 -1
  15. package/dist/v3/otel/index.js +1 -1
  16. package/dist/v3/otel/index.js.map +1 -1
  17. package/dist/v3/otel/index.mjs +1 -1
  18. package/dist/v3/otel/index.mjs.map +1 -1
  19. package/dist/v3/prod/index.d.mts +2 -2
  20. package/dist/v3/prod/index.d.ts +2 -2
  21. package/dist/v3/utils/durations.d.mts +15 -0
  22. package/dist/v3/utils/durations.d.ts +15 -0
  23. package/dist/v3/utils/durations.js +93 -0
  24. package/dist/v3/utils/durations.js.map +1 -0
  25. package/dist/v3/utils/durations.mjs +82 -0
  26. package/dist/v3/utils/durations.mjs.map +1 -0
  27. package/dist/v3/workers/index.d.mts +5 -5
  28. package/dist/v3/workers/index.d.ts +5 -5
  29. package/dist/v3/workers/index.js +9 -5
  30. package/dist/v3/workers/index.js.map +1 -1
  31. package/dist/v3/workers/index.mjs +9 -5
  32. package/dist/v3/workers/index.mjs.map +1 -1
  33. package/dist/v3/zodIpc.js.map +1 -1
  34. package/dist/v3/zodIpc.mjs.map +1 -1
  35. package/dist/v3/zodMessageHandler.d.mts +1 -1
  36. package/dist/v3/zodMessageHandler.d.ts +1 -1
  37. package/dist/v3/zodMessageHandler.js +18 -10
  38. package/dist/v3/zodMessageHandler.js.map +1 -1
  39. package/dist/v3/zodMessageHandler.mjs +18 -10
  40. package/dist/v3/zodMessageHandler.mjs.map +1 -1
  41. package/dist/v3/zodNamespace.js +18 -10
  42. package/dist/v3/zodNamespace.js.map +1 -1
  43. package/dist/v3/zodNamespace.mjs +18 -10
  44. package/dist/v3/zodNamespace.mjs.map +1 -1
  45. package/package.json +9 -1
@@ -0,0 +1,93 @@
1
+ 'use strict';
2
+
3
+ var humanizeDuration = require('humanize-duration');
4
+
5
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
+
7
+ var humanizeDuration__default = /*#__PURE__*/_interopDefault(humanizeDuration);
8
+
9
+ var __defProp = Object.defineProperty;
10
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
11
+ function dateDifference(date1, date2) {
12
+ return Math.abs(date1.getTime() - date2.getTime());
13
+ }
14
+ __name(dateDifference, "dateDifference");
15
+ function formatDuration(start, end, options) {
16
+ if (!start || !end) {
17
+ return "\u2013";
18
+ }
19
+ return formatDurationMilliseconds(dateDifference(start, end), options);
20
+ }
21
+ __name(formatDuration, "formatDuration");
22
+ function nanosecondsToMilliseconds(nanoseconds) {
23
+ return nanoseconds / 1e6;
24
+ }
25
+ __name(nanosecondsToMilliseconds, "nanosecondsToMilliseconds");
26
+ function millisecondsToNanoseconds(milliseconds) {
27
+ return milliseconds * 1e6;
28
+ }
29
+ __name(millisecondsToNanoseconds, "millisecondsToNanoseconds");
30
+ function formatDurationNanoseconds(nanoseconds, options) {
31
+ return formatDurationMilliseconds(nanosecondsToMilliseconds(nanoseconds), options);
32
+ }
33
+ __name(formatDurationNanoseconds, "formatDurationNanoseconds");
34
+ var aboveOneSecondUnits = [
35
+ "d",
36
+ "h",
37
+ "m",
38
+ "s"
39
+ ];
40
+ var belowOneSecondUnits = [
41
+ "ms"
42
+ ];
43
+ function formatDurationMilliseconds(milliseconds, options) {
44
+ let duration = humanizeDuration__default.default(milliseconds, {
45
+ units: options?.units ? options.units : milliseconds < 1e3 ? belowOneSecondUnits : aboveOneSecondUnits,
46
+ maxDecimalPoints: options?.maxDecimalPoints ?? 1,
47
+ largest: 2
48
+ });
49
+ if (!options) {
50
+ return duration;
51
+ }
52
+ switch (options.style) {
53
+ case "short":
54
+ duration = duration.replace(" milliseconds", "ms");
55
+ duration = duration.replace(" millisecond", "ms");
56
+ duration = duration.replace(" seconds", "s");
57
+ duration = duration.replace(" second", "s");
58
+ duration = duration.replace(" minutes", "m");
59
+ duration = duration.replace(" minute", "m");
60
+ duration = duration.replace(" hours", "h");
61
+ duration = duration.replace(" hour", "h");
62
+ duration = duration.replace(" days", "d");
63
+ duration = duration.replace(" day", "d");
64
+ duration = duration.replace(" weeks", "w");
65
+ duration = duration.replace(" week", "w");
66
+ duration = duration.replace(" months", "mo");
67
+ duration = duration.replace(" month", "mo");
68
+ duration = duration.replace(" years", "y");
69
+ duration = duration.replace(" year", "y");
70
+ }
71
+ return duration;
72
+ }
73
+ __name(formatDurationMilliseconds, "formatDurationMilliseconds");
74
+ function formatDurationInDays(milliseconds) {
75
+ let duration = humanizeDuration__default.default(milliseconds, {
76
+ maxDecimalPoints: 0,
77
+ largest: 2,
78
+ units: [
79
+ "d"
80
+ ]
81
+ });
82
+ return duration;
83
+ }
84
+ __name(formatDurationInDays, "formatDurationInDays");
85
+
86
+ exports.formatDuration = formatDuration;
87
+ exports.formatDurationInDays = formatDurationInDays;
88
+ exports.formatDurationMilliseconds = formatDurationMilliseconds;
89
+ exports.formatDurationNanoseconds = formatDurationNanoseconds;
90
+ exports.millisecondsToNanoseconds = millisecondsToNanoseconds;
91
+ exports.nanosecondsToMilliseconds = nanosecondsToMilliseconds;
92
+ //# sourceMappingURL=out.js.map
93
+ //# sourceMappingURL=durations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/v3/utils/durations.ts"],"names":["humanizeDuration","dateDifference","date1","date2","Math","abs","getTime","formatDuration","start","end","options","formatDurationMilliseconds","nanosecondsToMilliseconds","nanoseconds","millisecondsToNanoseconds","milliseconds","formatDurationNanoseconds","aboveOneSecondUnits","belowOneSecondUnits","duration","units","maxDecimalPoints","largest","style","replace","formatDurationInDays"],"mappings":";;;;AAAA,OAAOA,sBAAgC;AAEvC,SAASC,eAAeC,OAAaC,OAAa;AAChD,SAAOC,KAAKC,IAAIH,MAAMI,QAAO,IAAKH,MAAMG,QAAO,CAAA;AACjD;AAFSL;AAUF,SAASM,eACdC,OACAC,KACAC,SACQ;AACR,MAAI,CAACF,SAAS,CAACC,KAAK;AAClB,WAAO;EACT;AAEA,SAAOE,2BAA2BV,eAAeO,OAAOC,GAAAA,GAAMC,OAAAA;AAChE;AAVgBH;AAYT,SAASK,0BAA0BC,aAA6B;AACrE,SAAOA,cAAc;AACvB;AAFgBD;AAIT,SAASE,0BAA0BC,cAA8B;AACtE,SAAOA,eAAe;AACxB;AAFgBD;AAIT,SAASE,0BAA0BH,aAAqBH,SAAmC;AAChG,SAAOC,2BAA2BC,0BAA0BC,WAAAA,GAAcH,OAAAA;AAC5E;AAFgBM;AAIhB,IAAMC,sBAAsB;EAAC;EAAK;EAAK;EAAK;;AAC5C,IAAMC,sBAAsB;EAAC;;AAEtB,SAASP,2BACdI,cACAL,SACQ;AACR,MAAIS,WAAWnB,iBAAiBe,cAAc;IAC5CK,OAAOV,SAASU,QACZV,QAAQU,QACRL,eAAe,MACfG,sBACAD;IACJI,kBAAkBX,SAASW,oBAAoB;IAC/CC,SAAS;EACX,CAAA;AAEA,MAAI,CAACZ,SAAS;AACZ,WAAOS;EACT;AAEA,UAAQT,QAAQa,OAAK;IACnB,KAAK;AACHJ,iBAAWA,SAASK,QAAQ,iBAAiB,IAAA;AAC7CL,iBAAWA,SAASK,QAAQ,gBAAgB,IAAA;AAC5CL,iBAAWA,SAASK,QAAQ,YAAY,GAAA;AACxCL,iBAAWA,SAASK,QAAQ,WAAW,GAAA;AACvCL,iBAAWA,SAASK,QAAQ,YAAY,GAAA;AACxCL,iBAAWA,SAASK,QAAQ,WAAW,GAAA;AACvCL,iBAAWA,SAASK,QAAQ,UAAU,GAAA;AACtCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;AACrCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;AACrCL,iBAAWA,SAASK,QAAQ,QAAQ,GAAA;AACpCL,iBAAWA,SAASK,QAAQ,UAAU,GAAA;AACtCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;AACrCL,iBAAWA,SAASK,QAAQ,WAAW,IAAA;AACvCL,iBAAWA,SAASK,QAAQ,UAAU,IAAA;AACtCL,iBAAWA,SAASK,QAAQ,UAAU,GAAA;AACtCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;EACzC;AAEA,SAAOL;AACT;AAvCgBR;AAyCT,SAASc,qBAAqBV,cAA8B;AACjE,MAAII,WAAWnB,iBAAiBe,cAAc;IAC5CM,kBAAkB;IAClBC,SAAS;IACTF,OAAO;MAAC;;EACV,CAAA;AAEA,SAAOD;AACT;AARgBM","sourcesContent":["import humanizeDuration, { Unit } from \"humanize-duration\";\n\nfunction dateDifference(date1: Date, date2: Date) {\n return Math.abs(date1.getTime() - date2.getTime());\n}\n\ntype DurationOptions = {\n style?: \"long\" | \"short\";\n maxDecimalPoints?: number;\n units?: Unit[];\n};\n\nexport function formatDuration(\n start?: Date | null,\n end?: Date | null,\n options?: DurationOptions\n): string {\n if (!start || !end) {\n return \"–\";\n }\n\n return formatDurationMilliseconds(dateDifference(start, end), options);\n}\n\nexport function nanosecondsToMilliseconds(nanoseconds: number): number {\n return nanoseconds / 1_000_000;\n}\n\nexport function millisecondsToNanoseconds(milliseconds: number): number {\n return milliseconds * 1_000_000;\n}\n\nexport function formatDurationNanoseconds(nanoseconds: number, options?: DurationOptions): string {\n return formatDurationMilliseconds(nanosecondsToMilliseconds(nanoseconds), options);\n}\n\nconst aboveOneSecondUnits = [\"d\", \"h\", \"m\", \"s\"] as Unit[];\nconst belowOneSecondUnits = [\"ms\"] as Unit[];\n\nexport function formatDurationMilliseconds(\n milliseconds: number,\n options?: DurationOptions\n): string {\n let duration = humanizeDuration(milliseconds, {\n units: options?.units\n ? options.units\n : milliseconds < 1000\n ? belowOneSecondUnits\n : aboveOneSecondUnits,\n maxDecimalPoints: options?.maxDecimalPoints ?? 1,\n largest: 2,\n });\n\n if (!options) {\n return duration;\n }\n\n switch (options.style) {\n case \"short\":\n duration = duration.replace(\" milliseconds\", \"ms\");\n duration = duration.replace(\" millisecond\", \"ms\");\n duration = duration.replace(\" seconds\", \"s\");\n duration = duration.replace(\" second\", \"s\");\n duration = duration.replace(\" minutes\", \"m\");\n duration = duration.replace(\" minute\", \"m\");\n duration = duration.replace(\" hours\", \"h\");\n duration = duration.replace(\" hour\", \"h\");\n duration = duration.replace(\" days\", \"d\");\n duration = duration.replace(\" day\", \"d\");\n duration = duration.replace(\" weeks\", \"w\");\n duration = duration.replace(\" week\", \"w\");\n duration = duration.replace(\" months\", \"mo\");\n duration = duration.replace(\" month\", \"mo\");\n duration = duration.replace(\" years\", \"y\");\n duration = duration.replace(\" year\", \"y\");\n }\n\n return duration;\n}\n\nexport function formatDurationInDays(milliseconds: number): string {\n let duration = humanizeDuration(milliseconds, {\n maxDecimalPoints: 0,\n largest: 2,\n units: [\"d\"],\n });\n\n return duration;\n}\n"]}
@@ -0,0 +1,82 @@
1
+ import humanizeDuration from 'humanize-duration';
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
5
+ function dateDifference(date1, date2) {
6
+ return Math.abs(date1.getTime() - date2.getTime());
7
+ }
8
+ __name(dateDifference, "dateDifference");
9
+ function formatDuration(start, end, options) {
10
+ if (!start || !end) {
11
+ return "\u2013";
12
+ }
13
+ return formatDurationMilliseconds(dateDifference(start, end), options);
14
+ }
15
+ __name(formatDuration, "formatDuration");
16
+ function nanosecondsToMilliseconds(nanoseconds) {
17
+ return nanoseconds / 1e6;
18
+ }
19
+ __name(nanosecondsToMilliseconds, "nanosecondsToMilliseconds");
20
+ function millisecondsToNanoseconds(milliseconds) {
21
+ return milliseconds * 1e6;
22
+ }
23
+ __name(millisecondsToNanoseconds, "millisecondsToNanoseconds");
24
+ function formatDurationNanoseconds(nanoseconds, options) {
25
+ return formatDurationMilliseconds(nanosecondsToMilliseconds(nanoseconds), options);
26
+ }
27
+ __name(formatDurationNanoseconds, "formatDurationNanoseconds");
28
+ var aboveOneSecondUnits = [
29
+ "d",
30
+ "h",
31
+ "m",
32
+ "s"
33
+ ];
34
+ var belowOneSecondUnits = [
35
+ "ms"
36
+ ];
37
+ function formatDurationMilliseconds(milliseconds, options) {
38
+ let duration = humanizeDuration(milliseconds, {
39
+ units: options?.units ? options.units : milliseconds < 1e3 ? belowOneSecondUnits : aboveOneSecondUnits,
40
+ maxDecimalPoints: options?.maxDecimalPoints ?? 1,
41
+ largest: 2
42
+ });
43
+ if (!options) {
44
+ return duration;
45
+ }
46
+ switch (options.style) {
47
+ case "short":
48
+ duration = duration.replace(" milliseconds", "ms");
49
+ duration = duration.replace(" millisecond", "ms");
50
+ duration = duration.replace(" seconds", "s");
51
+ duration = duration.replace(" second", "s");
52
+ duration = duration.replace(" minutes", "m");
53
+ duration = duration.replace(" minute", "m");
54
+ duration = duration.replace(" hours", "h");
55
+ duration = duration.replace(" hour", "h");
56
+ duration = duration.replace(" days", "d");
57
+ duration = duration.replace(" day", "d");
58
+ duration = duration.replace(" weeks", "w");
59
+ duration = duration.replace(" week", "w");
60
+ duration = duration.replace(" months", "mo");
61
+ duration = duration.replace(" month", "mo");
62
+ duration = duration.replace(" years", "y");
63
+ duration = duration.replace(" year", "y");
64
+ }
65
+ return duration;
66
+ }
67
+ __name(formatDurationMilliseconds, "formatDurationMilliseconds");
68
+ function formatDurationInDays(milliseconds) {
69
+ let duration = humanizeDuration(milliseconds, {
70
+ maxDecimalPoints: 0,
71
+ largest: 2,
72
+ units: [
73
+ "d"
74
+ ]
75
+ });
76
+ return duration;
77
+ }
78
+ __name(formatDurationInDays, "formatDurationInDays");
79
+
80
+ export { formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, millisecondsToNanoseconds, nanosecondsToMilliseconds };
81
+ //# sourceMappingURL=out.js.map
82
+ //# sourceMappingURL=durations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/v3/utils/durations.ts"],"names":["humanizeDuration","dateDifference","date1","date2","Math","abs","getTime","formatDuration","start","end","options","formatDurationMilliseconds","nanosecondsToMilliseconds","nanoseconds","millisecondsToNanoseconds","milliseconds","formatDurationNanoseconds","aboveOneSecondUnits","belowOneSecondUnits","duration","units","maxDecimalPoints","largest","style","replace","formatDurationInDays"],"mappings":";;;;AAAA,OAAOA,sBAAgC;AAEvC,SAASC,eAAeC,OAAaC,OAAa;AAChD,SAAOC,KAAKC,IAAIH,MAAMI,QAAO,IAAKH,MAAMG,QAAO,CAAA;AACjD;AAFSL;AAUF,SAASM,eACdC,OACAC,KACAC,SACQ;AACR,MAAI,CAACF,SAAS,CAACC,KAAK;AAClB,WAAO;EACT;AAEA,SAAOE,2BAA2BV,eAAeO,OAAOC,GAAAA,GAAMC,OAAAA;AAChE;AAVgBH;AAYT,SAASK,0BAA0BC,aAA6B;AACrE,SAAOA,cAAc;AACvB;AAFgBD;AAIT,SAASE,0BAA0BC,cAA8B;AACtE,SAAOA,eAAe;AACxB;AAFgBD;AAIT,SAASE,0BAA0BH,aAAqBH,SAAmC;AAChG,SAAOC,2BAA2BC,0BAA0BC,WAAAA,GAAcH,OAAAA;AAC5E;AAFgBM;AAIhB,IAAMC,sBAAsB;EAAC;EAAK;EAAK;EAAK;;AAC5C,IAAMC,sBAAsB;EAAC;;AAEtB,SAASP,2BACdI,cACAL,SACQ;AACR,MAAIS,WAAWnB,iBAAiBe,cAAc;IAC5CK,OAAOV,SAASU,QACZV,QAAQU,QACRL,eAAe,MACfG,sBACAD;IACJI,kBAAkBX,SAASW,oBAAoB;IAC/CC,SAAS;EACX,CAAA;AAEA,MAAI,CAACZ,SAAS;AACZ,WAAOS;EACT;AAEA,UAAQT,QAAQa,OAAK;IACnB,KAAK;AACHJ,iBAAWA,SAASK,QAAQ,iBAAiB,IAAA;AAC7CL,iBAAWA,SAASK,QAAQ,gBAAgB,IAAA;AAC5CL,iBAAWA,SAASK,QAAQ,YAAY,GAAA;AACxCL,iBAAWA,SAASK,QAAQ,WAAW,GAAA;AACvCL,iBAAWA,SAASK,QAAQ,YAAY,GAAA;AACxCL,iBAAWA,SAASK,QAAQ,WAAW,GAAA;AACvCL,iBAAWA,SAASK,QAAQ,UAAU,GAAA;AACtCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;AACrCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;AACrCL,iBAAWA,SAASK,QAAQ,QAAQ,GAAA;AACpCL,iBAAWA,SAASK,QAAQ,UAAU,GAAA;AACtCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;AACrCL,iBAAWA,SAASK,QAAQ,WAAW,IAAA;AACvCL,iBAAWA,SAASK,QAAQ,UAAU,IAAA;AACtCL,iBAAWA,SAASK,QAAQ,UAAU,GAAA;AACtCL,iBAAWA,SAASK,QAAQ,SAAS,GAAA;EACzC;AAEA,SAAOL;AACT;AAvCgBR;AAyCT,SAASc,qBAAqBV,cAA8B;AACjE,MAAII,WAAWnB,iBAAiBe,cAAc;IAC5CM,kBAAkB;IAClBC,SAAS;IACTF,OAAO;MAAC;;EACV,CAAA;AAEA,SAAOD;AACT;AARgBM","sourcesContent":["import humanizeDuration, { Unit } from \"humanize-duration\";\n\nfunction dateDifference(date1: Date, date2: Date) {\n return Math.abs(date1.getTime() - date2.getTime());\n}\n\ntype DurationOptions = {\n style?: \"long\" | \"short\";\n maxDecimalPoints?: number;\n units?: Unit[];\n};\n\nexport function formatDuration(\n start?: Date | null,\n end?: Date | null,\n options?: DurationOptions\n): string {\n if (!start || !end) {\n return \"–\";\n }\n\n return formatDurationMilliseconds(dateDifference(start, end), options);\n}\n\nexport function nanosecondsToMilliseconds(nanoseconds: number): number {\n return nanoseconds / 1_000_000;\n}\n\nexport function millisecondsToNanoseconds(milliseconds: number): number {\n return milliseconds * 1_000_000;\n}\n\nexport function formatDurationNanoseconds(nanoseconds: number, options?: DurationOptions): string {\n return formatDurationMilliseconds(nanosecondsToMilliseconds(nanoseconds), options);\n}\n\nconst aboveOneSecondUnits = [\"d\", \"h\", \"m\", \"s\"] as Unit[];\nconst belowOneSecondUnits = [\"ms\"] as Unit[];\n\nexport function formatDurationMilliseconds(\n milliseconds: number,\n options?: DurationOptions\n): string {\n let duration = humanizeDuration(milliseconds, {\n units: options?.units\n ? options.units\n : milliseconds < 1000\n ? belowOneSecondUnits\n : aboveOneSecondUnits,\n maxDecimalPoints: options?.maxDecimalPoints ?? 1,\n largest: 2,\n });\n\n if (!options) {\n return duration;\n }\n\n switch (options.style) {\n case \"short\":\n duration = duration.replace(\" milliseconds\", \"ms\");\n duration = duration.replace(\" millisecond\", \"ms\");\n duration = duration.replace(\" seconds\", \"s\");\n duration = duration.replace(\" second\", \"s\");\n duration = duration.replace(\" minutes\", \"m\");\n duration = duration.replace(\" minute\", \"m\");\n duration = duration.replace(\" hours\", \"h\");\n duration = duration.replace(\" hour\", \"h\");\n duration = duration.replace(\" days\", \"d\");\n duration = duration.replace(\" day\", \"d\");\n duration = duration.replace(\" weeks\", \"w\");\n duration = duration.replace(\" week\", \"w\");\n duration = duration.replace(\" months\", \"mo\");\n duration = duration.replace(\" month\", \"mo\");\n duration = duration.replace(\" years\", \"y\");\n duration = duration.replace(\" year\", \"y\");\n }\n\n return duration;\n}\n\nexport function formatDurationInDays(milliseconds: number): string {\n let duration = humanizeDuration(milliseconds, {\n maxDecimalPoints: 0,\n largest: 2,\n units: [\"d\"],\n });\n\n return duration;\n}\n"]}
@@ -1,12 +1,12 @@
1
1
  import * as logsAPI from '@opentelemetry/api-logs';
2
2
  import { TracingSDK } from '../otel/index.mjs';
3
3
  export { TracingDiagnosticLogLevel, recordSpanException } from '../otel/index.mjs';
4
- import { b as TaskRunExecution, T as TaskRunExecutionResult } from '../../manager-S98VaLUy.mjs';
5
- export { R as RuntimeManager } from '../../manager-S98VaLUy.mjs';
6
- import { B as BackgroundWorkerProperties } from '../../messages-xJbR1Vai.mjs';
4
+ import { b as TaskRunExecution, T as TaskRunExecutionResult } from '../../manager-ZZ3kQv68.mjs';
5
+ export { R as RuntimeManager } from '../../manager-ZZ3kQv68.mjs';
6
+ import { B as BackgroundWorkerProperties } from '../../messages-F5zEgkWj.mjs';
7
7
  import { C as Config, T as TaskFileMetadata, a as TaskMetadataWithFilePath } from '../../schemas-Sb0sJcEt.mjs';
8
- import { T as TriggerTracer, P as ProjectConfig, H as HandleErrorFunction, a as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, b as ClockTime, c as TaskCatalog, d as UsageManager, e as UsageSample } from '../../catalog-Gjy5NtAB.mjs';
9
- export { O as OtelTaskLogger, l as logLevels, u as usage } from '../../catalog-Gjy5NtAB.mjs';
8
+ import { T as TriggerTracer, P as ProjectConfig, H as HandleErrorFunction, a as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, b as ClockTime, c as TaskCatalog, d as UsageManager, e as UsageSample } from '../../catalog-NpD1UPkO.mjs';
9
+ export { O as OtelTaskLogger, l as logLevels, u as usage } from '../../catalog-NpD1UPkO.mjs';
10
10
  import { PreciseDate } from '@google-cloud/precise-date';
11
11
  import { LogRecordProcessor, LogRecord } from '@opentelemetry/sdk-logs';
12
12
  import { SpanProcessor, Span } from '@opentelemetry/sdk-trace-base';
@@ -1,12 +1,12 @@
1
1
  import * as logsAPI from '@opentelemetry/api-logs';
2
2
  import { TracingSDK } from '../otel/index.js';
3
3
  export { TracingDiagnosticLogLevel, recordSpanException } from '../otel/index.js';
4
- import { b as TaskRunExecution, T as TaskRunExecutionResult } from '../../manager-S98VaLUy.js';
5
- export { R as RuntimeManager } from '../../manager-S98VaLUy.js';
6
- import { B as BackgroundWorkerProperties } from '../../messages-xJbR1Vai.js';
4
+ import { b as TaskRunExecution, T as TaskRunExecutionResult } from '../../manager-ZZ3kQv68.js';
5
+ export { R as RuntimeManager } from '../../manager-ZZ3kQv68.js';
6
+ import { B as BackgroundWorkerProperties } from '../../messages-F5zEgkWj.js';
7
7
  import { C as Config, T as TaskFileMetadata, a as TaskMetadataWithFilePath } from '../../schemas-Sb0sJcEt.js';
8
- import { T as TriggerTracer, P as ProjectConfig, H as HandleErrorFunction, a as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, b as ClockTime, c as TaskCatalog, d as UsageManager, e as UsageSample } from '../../catalog-EP9DGAGm.js';
9
- export { O as OtelTaskLogger, l as logLevels, u as usage } from '../../catalog-EP9DGAGm.js';
8
+ import { T as TriggerTracer, P as ProjectConfig, H as HandleErrorFunction, a as TaskMetadataWithFunctions, U as UsageMeasurement, C as Clock, b as ClockTime, c as TaskCatalog, d as UsageManager, e as UsageSample } from '../../catalog-gXIXpWTi.js';
9
+ export { O as OtelTaskLogger, l as logLevels, u as usage } from '../../catalog-gXIXpWTi.js';
10
10
  import { PreciseDate } from '@google-cloud/precise-date';
11
11
  import { LogRecordProcessor, LogRecord } from '@opentelemetry/sdk-logs';
12
12
  import { SpanProcessor, Span } from '@opentelemetry/sdk-trace-base';
@@ -370,7 +370,7 @@ function getEnvVar(name) {
370
370
  __name(getEnvVar, "getEnvVar");
371
371
 
372
372
  // package.json
373
- var version = "0.0.0-v3-prerelease-20240624162135";
373
+ var version = "0.0.0-v3-prerelease-20240628145956";
374
374
 
375
375
  // src/v3/otel/tracingSDK.ts
376
376
  var _a;
@@ -602,7 +602,8 @@ var TaskRunInternalError = zod.z.object({
602
602
  "GRACEFUL_EXIT_TIMEOUT",
603
603
  "TASK_RUN_HEARTBEAT_TIMEOUT"
604
604
  ]),
605
- message: zod.z.string().optional()
605
+ message: zod.z.string().optional(),
606
+ stackTrace: zod.z.string().optional()
606
607
  });
607
608
  var TaskRunError = zod.z.discriminatedUnion("type", [
608
609
  TaskRunBuiltInError,
@@ -1256,7 +1257,9 @@ var CommonRunFields = {
1256
1257
  var RetrieveRunResponse = zod.z.object({
1257
1258
  ...CommonRunFields,
1258
1259
  payload: zod.z.any().optional(),
1260
+ payloadPresignedUrl: zod.z.string().optional(),
1259
1261
  output: zod.z.any().optional(),
1262
+ outputPresignedUrl: zod.z.string().optional(),
1260
1263
  schedule: RunScheduleDetails.optional(),
1261
1264
  attempts: zod.z.array(zod.z.object({
1262
1265
  id: zod.z.string(),
@@ -2240,7 +2243,7 @@ async function conditionallyExportPacket(packet, pathPrefix, tracer) {
2240
2243
  return packet;
2241
2244
  }
2242
2245
  __name(conditionallyExportPacket, "conditionallyExportPacket");
2243
- function packetRequiresOffloading(packet) {
2246
+ function packetRequiresOffloading(packet, lengthLimit) {
2244
2247
  if (!packet.data) {
2245
2248
  return {
2246
2249
  needsOffloading: false,
@@ -2249,7 +2252,7 @@ function packetRequiresOffloading(packet) {
2249
2252
  }
2250
2253
  const byteSize = Buffer.byteLength(packet.data, "utf8");
2251
2254
  return {
2252
- needsOffloading: byteSize >= OFFLOAD_IO_PACKET_LENGTH_LIMIT,
2255
+ needsOffloading: byteSize >= (lengthLimit ?? OFFLOAD_IO_PACKET_LENGTH_LIMIT),
2253
2256
  size: byteSize
2254
2257
  };
2255
2258
  }
@@ -2534,7 +2537,8 @@ callRun_fn = /* @__PURE__ */ __name(async function(payload, ctx, init) {
2534
2537
  }
2535
2538
  if (!middlewareFn) {
2536
2539
  return runFn(payload, {
2537
- ctx
2540
+ ctx,
2541
+ init
2538
2542
  });
2539
2543
  }
2540
2544
  return middlewareFn(payload, {