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

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.21";
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.21",
819
820
  "@types/degit": "^2.8.3",
820
821
  chalk: "^5.2.0",
821
822
  chokidar: "^3.5.3",
@@ -1596,6 +1597,7 @@ async function getTriggerDirectories(dirPath) {
1596
1597
 
1597
1598
  // src/utilities/configFiles.ts
1598
1599
  import { build } from "esbuild";
1600
+ import { esbuildDecorators } from "@anatine/esbuild-decorators";
1599
1601
  function getGlobalConfigFolderPath() {
1600
1602
  const configDir = mod_esm_default("trigger").config();
1601
1603
  return configDir;
@@ -1701,7 +1703,14 @@ async function readConfig(dir, options) {
1701
1703
  platform: "node",
1702
1704
  target: ["es2018", "node18"],
1703
1705
  outfile: builtConfigFilePath,
1704
- logLevel: "silent"
1706
+ logLevel: "silent",
1707
+ plugins: [
1708
+ esbuildDecorators({
1709
+ cwd: absoluteDir,
1710
+ tsx: false,
1711
+ force: false
1712
+ })
1713
+ ]
1705
1714
  });
1706
1715
  const userConfigModule = await import(builtConfigFileHref);
1707
1716
  const rawConfig = await normalizeConfig(
@@ -2840,6 +2849,7 @@ ${authorizationCodeResult.error}`
2840
2849
  }
2841
2850
 
2842
2851
  // src/commands/deploy.ts
2852
+ import { esbuildDecorators as esbuildDecorators2 } from "@anatine/esbuild-decorators";
2843
2853
  import { Glob } from "glob";
2844
2854
 
2845
2855
  // src/utilities/build.ts
@@ -3172,18 +3182,6 @@ ${chalkError("X Error:")} Failed to start. The following ${zodIssues.length ===
3172
3182
  }
3173
3183
  }
3174
3184
 
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
3185
  // src/utilities/javascriptProject.ts
3188
3186
  import { $ } from "execa";
3189
3187
  import { join as join4 } from "node:path";
@@ -3455,6 +3453,18 @@ function cliRootPath() {
3455
3453
  return __dirname2;
3456
3454
  }
3457
3455
 
3456
+ // src/utilities/safeJsonParse.ts
3457
+ function safeJsonParse(json) {
3458
+ if (!json) {
3459
+ return void 0;
3460
+ }
3461
+ try {
3462
+ return JSON.parse(json);
3463
+ } catch {
3464
+ return void 0;
3465
+ }
3466
+ }
3467
+
3458
3468
  // src/commands/update.ts
3459
3469
  import { confirm, intro as intro3, isCancel, log as log4, outro as outro4 } from "@clack/prompts";
3460
3470
  import { join as join5, resolve as resolve2 } from "path";
@@ -4430,7 +4440,12 @@ async function compileProject(config, options, configPath) {
4430
4440
  config.dependenciesToBundle,
4431
4441
  config.tsconfigPath
4432
4442
  ),
4433
- workerSetupImportConfigPlugin(configPath)
4443
+ workerSetupImportConfigPlugin(configPath),
4444
+ esbuildDecorators2({
4445
+ tsconfig: config.tsconfigPath,
4446
+ tsx: true,
4447
+ force: false
4448
+ })
4434
4449
  ]
4435
4450
  });
4436
4451
  if (result.errors.length > 0) {
@@ -5492,6 +5507,7 @@ function runtimeCheck(minimumMajor, minimumMinor) {
5492
5507
 
5493
5508
  // src/commands/dev.tsx
5494
5509
  import { findUp as findUp3, pathExists as pathExists2 } from "find-up";
5510
+ import { esbuildDecorators as esbuildDecorators3 } from "@anatine/esbuild-decorators";
5495
5511
  var apiClient;
5496
5512
  var DevCommandOptions = CommonCommandOptions.extend({
5497
5513
  debugger: z5.boolean().default(false),
@@ -5770,6 +5786,11 @@ function useDev({
5770
5786
  config.tsconfigPath
5771
5787
  ),
5772
5788
  workerSetupImportConfigPlugin(configPath),
5789
+ esbuildDecorators3({
5790
+ tsconfig: config.tsconfigPath,
5791
+ tsx: true,
5792
+ force: false
5793
+ }),
5773
5794
  {
5774
5795
  name: "trigger.dev v3",
5775
5796
  setup(build3) {