trigger.dev 0.0.0-v3-update-command-20240423125505 → 0.0.0-v3-update-command-20240423145551

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
@@ -797,10 +797,10 @@ import { dirname, join as join6, relative as relative3, posix } from "node:path"
797
797
  import { setTimeout as setTimeout2 } from "node:timers/promises";
798
798
  import terminalLink2 from "terminal-link";
799
799
  import invariant from "tiny-invariant";
800
- import { z as z5 } from "zod";
800
+ import { z as z4 } from "zod";
801
801
 
802
802
  // package.json
803
- var version = "0.0.0-v3-update-command-20240423125505";
803
+ var version = "0.0.0-v3-update-command-20240423145551";
804
804
  var dependencies = {
805
805
  "@clack/prompts": "^0.7.0",
806
806
  "@depot/cli": "0.0.1-cli.2.55.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:0.0.0-v3-update-command-20240423125505",
819
+ "@trigger.dev/core": "workspace:0.0.0-v3-update-command-20240423145551",
820
820
  "@types/degit": "^2.8.3",
821
821
  chalk: "^5.2.0",
822
822
  chokidar: "^3.5.3",
@@ -837,7 +837,6 @@ var dependencies = {
837
837
  "mock-fs": "^5.2.0",
838
838
  nanoid: "^4.0.2",
839
839
  "node-fetch": "^3.3.0",
840
- "npm-check-updates": "^16.12.2",
841
840
  "object-hash": "^3.0.0",
842
841
  "p-debounce": "^4.0.0",
843
842
  "p-throttle": "^6.1.0",
@@ -3329,7 +3328,7 @@ var PNPMCommands = class {
3329
3328
  async resolveDependencyVersion(packageName, options) {
3330
3329
  const { stdout } = await $({ cwd: options.cwd })`${this.cmd} list ${packageName} -r --json`;
3331
3330
  const result = JSON.parse(stdout);
3332
- logger.debug(`Resolving ${packageName} version using pnpm`, { result });
3331
+ logger.debug(`Resolving ${packageName} version using ${this.name}`, { result });
3333
3332
  for (const dep of result) {
3334
3333
  const dependency = dep.dependencies?.[packageName];
3335
3334
  if (dependency) {
@@ -3343,7 +3342,7 @@ var NPMCommands = class {
3343
3342
  return "npm";
3344
3343
  }
3345
3344
  get cmd() {
3346
- return process.platform === "win32" ? "pnpm.cmd" : "pnpm";
3345
+ return process.platform === "win32" ? "npm.cmd" : "npm";
3347
3346
  }
3348
3347
  async installDependencies(options) {
3349
3348
  const { stdout, stderr } = await $({ cwd: options.cwd })`${this.cmd} install`;
@@ -3352,7 +3351,7 @@ var NPMCommands = class {
3352
3351
  async resolveDependencyVersion(packageName, options) {
3353
3352
  const { stdout } = await $({ cwd: options.cwd })`${this.cmd} list ${packageName} --json`;
3354
3353
  const output = JSON.parse(stdout);
3355
- logger.debug(`Resolving ${packageName} version using npm`, { output });
3354
+ logger.debug(`Resolving ${packageName} version using ${this.name}`, { output });
3356
3355
  return this.#recursivelySearchDependencies(output.dependencies, packageName);
3357
3356
  }
3358
3357
  #recursivelySearchDependencies(dependencies2, packageName) {
@@ -3374,7 +3373,7 @@ var YarnCommands = class {
3374
3373
  return "yarn";
3375
3374
  }
3376
3375
  get cmd() {
3377
- return process.platform === "win32" ? "pnpm.cmd" : "pnpm";
3376
+ return process.platform === "win32" ? "yarn.cmd" : "yarn";
3378
3377
  }
3379
3378
  async installDependencies(options) {
3380
3379
  const { stdout, stderr } = await $({ cwd: options.cwd })`${this.cmd} install`;
@@ -3383,7 +3382,7 @@ var YarnCommands = class {
3383
3382
  async resolveDependencyVersion(packageName, options) {
3384
3383
  const { stdout } = await $({ cwd: options.cwd })`${this.cmd} info ${packageName} --json`;
3385
3384
  const lines = stdout.split("\n");
3386
- logger.debug(`Resolving ${packageName} version using yarn`, { lines });
3385
+ logger.debug(`Resolving ${packageName} version using ${this.name}`, { lines });
3387
3386
  for (const line of lines) {
3388
3387
  const json = JSON.parse(line);
3389
3388
  if (json.value === packageName) {
@@ -3404,8 +3403,6 @@ function cliRootPath() {
3404
3403
 
3405
3404
  // src/commands/update.ts
3406
3405
  import { confirm, intro as intro3, isCancel, log as log4, outro as outro3 } from "@clack/prompts";
3407
- import { run as ncuRun } from "npm-check-updates";
3408
- import { z as z4 } from "zod";
3409
3406
  import { join as join5, resolve as resolve2 } from "path";
3410
3407
  var UpdateCommandOptions = CommonCommandOptions.pick({
3411
3408
  logLevel: true,
@@ -3423,7 +3420,6 @@ function configureUpdateCommand(program2) {
3423
3420
  });
3424
3421
  });
3425
3422
  }
3426
- var NcuRunResult = z4.record(z4.string());
3427
3423
  var triggerPackageFilter = /^@trigger\.dev/;
3428
3424
  async function updateCommand(dir, options) {
3429
3425
  await updateTriggerPackages(dir, options);
@@ -3443,8 +3439,9 @@ async function updateTriggerPackages(dir, options, embedded, requireUpdate) {
3443
3439
  if (newCliVersion) {
3444
3440
  prettyWarning(
3445
3441
  "You're not running the latest CLI version, please consider updating ASAP",
3446
- "To update, run: `(p)npm i trigger.dev@beta`\nOr run with: `(p)npx trigger.dev@beta`",
3447
- "Yarn works too!"
3442
+ `Current: ${cliVersion}
3443
+ Latest: ${newCliVersion}`,
3444
+ "Run latest: npx trigger.dev@beta"
3448
3445
  );
3449
3446
  }
3450
3447
  const triggerDependencies = getTriggerDependencies(packageJson);
@@ -3497,7 +3494,7 @@ ${versionMismatches.map((dep) => `- ${dep.name}@${dep.version}`).join("\n")}
3497
3494
  logger.log(
3498
3495
  `${chalkError(
3499
3496
  "X Error:"
3500
- )} Update required: Version mismatches will cause errors and headaches. Don't use \`--skip-update-check\`, just update, please.
3497
+ )} Update required: Version mismatches are a common source of bugs and errors. Please update or use \`--skip-update-check\` at your own risk.
3501
3498
  `
3502
3499
  );
3503
3500
  process.exit(1);
@@ -3560,6 +3557,10 @@ function getTriggerDependencies(packageJson) {
3560
3557
  if (!triggerPackageFilter.test(name)) {
3561
3558
  continue;
3562
3559
  }
3560
+ const ignoredPackages = ["@trigger.dev/companyicons"];
3561
+ if (ignoredPackages.includes(name)) {
3562
+ continue;
3563
+ }
3563
3564
  deps.push({ type, name, version: version2 });
3564
3565
  }
3565
3566
  }
@@ -3600,21 +3601,21 @@ async function getPackageJson(absoluteProjectPath) {
3600
3601
 
3601
3602
  // src/commands/deploy.ts
3602
3603
  var DeployCommandOptions = CommonCommandOptions.extend({
3603
- skipTypecheck: z5.boolean().default(false),
3604
- skipDeploy: z5.boolean().default(false),
3605
- ignoreEnvVarCheck: z5.boolean().default(false),
3606
- env: z5.enum(["prod", "staging"]),
3607
- loadImage: z5.boolean().default(false),
3608
- buildPlatform: z5.enum(["linux/amd64", "linux/arm64"]).default("linux/amd64"),
3609
- selfHosted: z5.boolean().default(false),
3610
- registry: z5.string().optional(),
3611
- push: z5.boolean().default(false),
3612
- config: z5.string().optional(),
3613
- projectRef: z5.string().optional(),
3614
- outputMetafile: z5.string().optional(),
3615
- apiUrl: z5.string().optional(),
3616
- saveLogs: z5.boolean().default(false),
3617
- skipUpdateCheck: z5.boolean().default(false)
3604
+ skipTypecheck: z4.boolean().default(false),
3605
+ skipDeploy: z4.boolean().default(false),
3606
+ ignoreEnvVarCheck: z4.boolean().default(false),
3607
+ env: z4.enum(["prod", "staging"]),
3608
+ loadImage: z4.boolean().default(false),
3609
+ buildPlatform: z4.enum(["linux/amd64", "linux/arm64"]).default("linux/amd64"),
3610
+ selfHosted: z4.boolean().default(false),
3611
+ registry: z4.string().optional(),
3612
+ push: z4.boolean().default(false),
3613
+ config: z4.string().optional(),
3614
+ projectRef: z4.string().optional(),
3615
+ outputMetafile: z4.string().optional(),
3616
+ apiUrl: z4.string().optional(),
3617
+ saveLogs: z4.boolean().default(false),
3618
+ skipUpdateCheck: z4.boolean().default(false)
3618
3619
  });
3619
3620
  function configureDeployCommand(program2) {
3620
3621
  return commonOptions(
@@ -4876,7 +4877,7 @@ import pDebounce from "p-debounce";
4876
4877
  import { WebSocket } from "partysocket";
4877
4878
  import React, { Suspense, useEffect } from "react";
4878
4879
  import { WebSocket as wsWebSocket } from "ws";
4879
- import { z as z6 } from "zod";
4880
+ import { z as z5 } from "zod";
4880
4881
 
4881
4882
  // src/workers/common/errors.ts
4882
4883
  var UncaughtExceptionError = class extends Error {
@@ -5517,11 +5518,11 @@ function runtimeCheck(minimumMajor, minimumMinor) {
5517
5518
  import { findUp as findUp3, pathExists as pathExists2 } from "find-up";
5518
5519
  var apiClient;
5519
5520
  var DevCommandOptions = CommonCommandOptions.extend({
5520
- debugger: z6.boolean().default(false),
5521
- debugOtel: z6.boolean().default(false),
5522
- config: z6.string().optional(),
5523
- projectRef: z6.string().optional(),
5524
- skipUpdateCheck: z6.boolean().default(false)
5521
+ debugger: z5.boolean().default(false),
5522
+ debugOtel: z5.boolean().default(false),
5523
+ config: z5.string().optional(),
5524
+ projectRef: z5.string().optional(),
5525
+ skipUpdateCheck: z5.boolean().default(false)
5525
5526
  });
5526
5527
  function configureDevCommand(program2) {
5527
5528
  return commonOptions(
@@ -6132,7 +6133,7 @@ import { applyEdits, modify } from "jsonc-parser";
6132
6133
  import { writeFile as writeFile3 } from "node:fs/promises";
6133
6134
  import { join as join8, relative as relative4, resolve as resolve4 } from "node:path";
6134
6135
  import terminalLink4 from "terminal-link";
6135
- import { z as z7 } from "zod";
6136
+ import { z as z6 } from "zod";
6136
6137
 
6137
6138
  // src/utilities/createFileFromTemplate.ts
6138
6139
  import fs8 from "fs/promises";
@@ -6177,10 +6178,10 @@ function replaceAll(input, replacements) {
6177
6178
 
6178
6179
  // src/commands/init.ts
6179
6180
  var InitCommandOptions = CommonCommandOptions.extend({
6180
- projectRef: z7.string().optional(),
6181
- overrideConfig: z7.boolean().default(false),
6182
- tag: z7.string().default("beta"),
6183
- skipPackageInstall: z7.boolean().default(false)
6181
+ projectRef: z6.string().optional(),
6182
+ overrideConfig: z6.boolean().default(false),
6183
+ tag: z6.string().default("beta"),
6184
+ skipPackageInstall: z6.boolean().default(false)
6184
6185
  });
6185
6186
  function configureInitCommand(program2) {
6186
6187
  return commonOptions(