trigger.dev 3.0.0-beta.20 → 3.0.0-beta.22

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/index.js CHANGED
@@ -792,15 +792,16 @@ import { execa as execa2 } from "execa";
792
792
  import { createHash } from "node:crypto";
793
793
  import { readFileSync as readFileSync2 } from "node:fs";
794
794
  import { copyFile, mkdir, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
795
- import { dirname, join as join6, relative as relative3, posix } from "node:path";
795
+ import { dirname, join as join6, posix, relative as relative3 } from "node:path";
796
796
  import { setTimeout as setTimeout2 } from "node:timers/promises";
797
797
  import terminalLink2 from "terminal-link";
798
798
  import invariant from "tiny-invariant";
799
799
  import { z as z4 } from "zod";
800
800
 
801
801
  // package.json
802
- var version = "3.0.0-beta.20";
802
+ var version = "3.0.0-beta.22";
803
803
  var dependencies = {
804
+ "@anatine/esbuild-decorators": "^0.2.19",
804
805
  "@clack/prompts": "^0.7.0",
805
806
  "@depot/cli": "0.0.1-cli.2.55.0",
806
807
  "@opentelemetry/api": "^1.8.0",
@@ -815,7 +816,7 @@ var dependencies = {
815
816
  "@opentelemetry/sdk-trace-base": "^1.22.0",
816
817
  "@opentelemetry/sdk-trace-node": "^1.22.0",
817
818
  "@opentelemetry/semantic-conventions": "^1.22.0",
818
- "@trigger.dev/core": "workspace:3.0.0-beta.20",
819
+ "@trigger.dev/core": "workspace:3.0.0-beta.22",
819
820
  "@types/degit": "^2.8.3",
820
821
  chalk: "^5.2.0",
821
822
  chokidar: "^3.5.3",
@@ -854,7 +855,8 @@ var dependencies = {
854
855
  url: "^0.11.1",
855
856
  ws: "^8.12.0",
856
857
  zod: "3.22.3",
857
- "zod-validation-error": "^1.5.0"
858
+ "zod-validation-error": "^1.5.0",
859
+ typescript: "^5.4.0"
858
860
  };
859
861
  var package_default = {
860
862
  name: "trigger.dev",
@@ -1596,6 +1598,7 @@ async function getTriggerDirectories(dirPath) {
1596
1598
 
1597
1599
  // src/utilities/configFiles.ts
1598
1600
  import { build } from "esbuild";
1601
+ import { esbuildDecorators } from "@anatine/esbuild-decorators";
1599
1602
  function getGlobalConfigFolderPath() {
1600
1603
  const configDir = mod_esm_default("trigger").config();
1601
1604
  return configDir;
@@ -1701,7 +1704,14 @@ async function readConfig(dir, options) {
1701
1704
  platform: "node",
1702
1705
  target: ["es2018", "node18"],
1703
1706
  outfile: builtConfigFilePath,
1704
- logLevel: "silent"
1707
+ logLevel: "silent",
1708
+ plugins: [
1709
+ esbuildDecorators({
1710
+ cwd: absoluteDir,
1711
+ tsx: false,
1712
+ force: false
1713
+ })
1714
+ ]
1705
1715
  });
1706
1716
  const userConfigModule = await import(builtConfigFileHref);
1707
1717
  const rawConfig = await normalizeConfig(
@@ -2840,6 +2850,7 @@ ${authorizationCodeResult.error}`
2840
2850
  }
2841
2851
 
2842
2852
  // src/commands/deploy.ts
2853
+ import { esbuildDecorators as esbuildDecorators2 } from "@anatine/esbuild-decorators";
2843
2854
  import { Glob } from "glob";
2844
2855
 
2845
2856
  // src/utilities/build.ts
@@ -3172,18 +3183,6 @@ ${chalkError("X Error:")} Failed to start. The following ${zodIssues.length ===
3172
3183
  }
3173
3184
  }
3174
3185
 
3175
- // src/utilities/safeJsonParse.ts
3176
- function safeJsonParse(json) {
3177
- if (!json) {
3178
- return void 0;
3179
- }
3180
- try {
3181
- return JSON.parse(json);
3182
- } catch {
3183
- return void 0;
3184
- }
3185
- }
3186
-
3187
3186
  // src/utilities/javascriptProject.ts
3188
3187
  import { $ } from "execa";
3189
3188
  import { join as join4 } from "node:path";
@@ -3455,6 +3454,18 @@ function cliRootPath() {
3455
3454
  return __dirname2;
3456
3455
  }
3457
3456
 
3457
+ // src/utilities/safeJsonParse.ts
3458
+ function safeJsonParse(json) {
3459
+ if (!json) {
3460
+ return void 0;
3461
+ }
3462
+ try {
3463
+ return JSON.parse(json);
3464
+ } catch {
3465
+ return void 0;
3466
+ }
3467
+ }
3468
+
3458
3469
  // src/commands/update.ts
3459
3470
  import { confirm, intro as intro3, isCancel, log as log4, outro as outro4 } from "@clack/prompts";
3460
3471
  import { join as join5, resolve as resolve2 } from "path";
@@ -4430,7 +4441,12 @@ async function compileProject(config, options, configPath) {
4430
4441
  config.dependenciesToBundle,
4431
4442
  config.tsconfigPath
4432
4443
  ),
4433
- workerSetupImportConfigPlugin(configPath)
4444
+ workerSetupImportConfigPlugin(configPath),
4445
+ esbuildDecorators2({
4446
+ tsconfig: config.tsconfigPath,
4447
+ tsx: true,
4448
+ force: false
4449
+ })
4434
4450
  ]
4435
4451
  });
4436
4452
  if (result.errors.length > 0) {
@@ -5492,6 +5508,7 @@ function runtimeCheck(minimumMajor, minimumMinor) {
5492
5508
 
5493
5509
  // src/commands/dev.tsx
5494
5510
  import { findUp as findUp3, pathExists as pathExists2 } from "find-up";
5511
+ import { esbuildDecorators as esbuildDecorators3 } from "@anatine/esbuild-decorators";
5495
5512
  var apiClient;
5496
5513
  var DevCommandOptions = CommonCommandOptions.extend({
5497
5514
  debugger: z5.boolean().default(false),
@@ -5770,6 +5787,11 @@ function useDev({
5770
5787
  config.tsconfigPath
5771
5788
  ),
5772
5789
  workerSetupImportConfigPlugin(configPath),
5790
+ esbuildDecorators3({
5791
+ tsconfig: config.tsconfigPath,
5792
+ tsx: true,
5793
+ force: false
5794
+ }),
5773
5795
  {
5774
5796
  name: "trigger.dev v3",
5775
5797
  setup(build3) {