trigger.dev 3.0.0-beta.31 → 3.0.0-beta.32

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
@@ -799,7 +799,7 @@ 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.31";
802
+ var version = "3.0.0-beta.32";
803
803
  var dependencies = {
804
804
  "@anatine/esbuild-decorators": "^0.2.19",
805
805
  "@clack/prompts": "^0.7.0",
@@ -816,7 +816,7 @@ var dependencies = {
816
816
  "@opentelemetry/sdk-trace-base": "^1.22.0",
817
817
  "@opentelemetry/sdk-trace-node": "^1.22.0",
818
818
  "@opentelemetry/semantic-conventions": "^1.22.0",
819
- "@trigger.dev/core": "workspace:3.0.0-beta.31",
819
+ "@trigger.dev/core": "workspace:3.0.0-beta.32",
820
820
  "@types/degit": "^2.8.3",
821
821
  chalk: "^5.2.0",
822
822
  chokidar: "^3.5.3",
@@ -826,7 +826,7 @@ var dependencies = {
826
826
  dotenv: "^16.4.4",
827
827
  esbuild: "^0.19.11",
828
828
  evt: "^2.4.13",
829
- execa: "^8.0.0",
829
+ execa: "^9.1.0",
830
830
  "find-up": "^7.0.0",
831
831
  glob: "^10.3.10",
832
832
  "gradient-string": "^2.0.2",
@@ -3461,8 +3461,7 @@ var PNPMCommands = class {
3461
3461
  }
3462
3462
  }
3463
3463
  async resolveDependencyVersions(packageNames, options) {
3464
- const { stdout } = await $({ cwd: options.cwd })`${this.cmd} list ${packageNames} -r --json`;
3465
- const result = JSON.parse(stdout);
3464
+ const result = await this.#listDependencies(packageNames, options);
3466
3465
  logger.debug(`Resolving ${packageNames.join(" ")} version using ${this.name}`);
3467
3466
  const results = {};
3468
3467
  for (const dep of result) {
@@ -3475,6 +3474,18 @@ var PNPMCommands = class {
3475
3474
  }
3476
3475
  return results;
3477
3476
  }
3477
+ async #listDependencies(packageNames, options) {
3478
+ const childProcess2 = await $({
3479
+ cwd: options.cwd,
3480
+ reject: false
3481
+ })`${this.cmd} list ${packageNames} -r --json`;
3482
+ if (childProcess2.failed) {
3483
+ logger.debug("Failed to list dependencies, using stdout anyway...", {
3484
+ error: childProcess2.stderr
3485
+ });
3486
+ }
3487
+ return JSON.parse(childProcess2.stdout);
3488
+ }
3478
3489
  };
3479
3490
  var NPMCommands = class {
3480
3491
  get name() {
@@ -3494,8 +3505,7 @@ var NPMCommands = class {
3494
3505
  return this.#recursivelySearchDependencies(output.dependencies, packageName);
3495
3506
  }
3496
3507
  async resolveDependencyVersions(packageNames, options) {
3497
- const { stdout } = await $({ cwd: options.cwd })`${this.cmd} list ${packageNames} --json`;
3498
- const output = JSON.parse(stdout);
3508
+ const output = await this.#listDependencies(packageNames, options);
3499
3509
  logger.debug(`Resolving ${packageNames.join(" ")} version using ${this.name}`, { output });
3500
3510
  const results = {};
3501
3511
  for (const packageName of packageNames) {
@@ -3506,6 +3516,18 @@ var NPMCommands = class {
3506
3516
  }
3507
3517
  return results;
3508
3518
  }
3519
+ async #listDependencies(packageNames, options) {
3520
+ const childProcess2 = await $({
3521
+ cwd: options.cwd,
3522
+ reject: false
3523
+ })`${this.cmd} list ${packageNames} --json`;
3524
+ if (childProcess2.failed) {
3525
+ logger.debug("Failed to list dependencies, using stdout anyway...", {
3526
+ error: childProcess2.stderr
3527
+ });
3528
+ }
3529
+ return JSON.parse(childProcess2.stdout);
3530
+ }
3509
3531
  #recursivelySearchDependencies(dependencies2, packageName) {
3510
3532
  for (const [name, dependency] of Object.entries(dependencies2)) {
3511
3533
  if (name === packageName) {
@@ -3543,7 +3565,7 @@ var YarnCommands = class {
3543
3565
  }
3544
3566
  }
3545
3567
  async resolveDependencyVersions(packageNames, options) {
3546
- const { stdout } = await $({ cwd: options.cwd })`${this.cmd} info ${packageNames} --json`;
3568
+ const stdout = await this.#listDependencies(packageNames, options);
3547
3569
  const lines = stdout.split("\n");
3548
3570
  logger.debug(`Resolving ${packageNames.join(" ")} version using ${this.name}`);
3549
3571
  const results = {};
@@ -3556,6 +3578,18 @@ var YarnCommands = class {
3556
3578
  }
3557
3579
  return results;
3558
3580
  }
3581
+ async #listDependencies(packageNames, options) {
3582
+ const childProcess2 = await $({
3583
+ cwd: options.cwd,
3584
+ reject: false
3585
+ })`${this.cmd} info ${packageNames} --json`;
3586
+ if (childProcess2.failed) {
3587
+ logger.debug("Failed to list dependencies, using stdout anyway...", {
3588
+ error: childProcess2.stderr
3589
+ });
3590
+ }
3591
+ return childProcess2.stdout;
3592
+ }
3559
3593
  // The "value" when doing yarn info is formatted like this:
3560
3594
  // "package-name@npm:version" or "package-name@workspace:version"
3561
3595
  // This function will parse the value into just the package name.