trigger.dev 0.0.0-v3-typescript-fix-20240426160144 → 0.0.0-v3-prerelease-20240427071154

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 = "0.0.0-v3-typescript-fix-20240426160144";
802
+ var version = "0.0.0-v3-prerelease-20240427071154";
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:0.0.0-v3-typescript-fix-20240426160144",
819
+ "@trigger.dev/core": "workspace:0.0.0-v3-prerelease-20240427071154",
820
820
  "@types/degit": "^2.8.3",
821
821
  chalk: "^5.2.0",
822
822
  chokidar: "^3.5.3",
@@ -3683,7 +3683,8 @@ var DeployCommandOptions = CommonCommandOptions.extend({
3683
3683
  outputMetafile: z4.string().optional(),
3684
3684
  apiUrl: z4.string().optional(),
3685
3685
  saveLogs: z4.boolean().default(false),
3686
- skipUpdateCheck: z4.boolean().default(false)
3686
+ skipUpdateCheck: z4.boolean().default(false),
3687
+ noCache: z4.boolean().default(false)
3687
3688
  });
3688
3689
  function configureDeployCommand(program2) {
3689
3690
  return commonOptions(
@@ -3700,6 +3701,11 @@ function configureDeployCommand(program2) {
3700
3701
  "--self-hosted",
3701
3702
  "Build and load the image using your local Docker. Use the --registry option to specify the registry to push the image to when using --self-hosted, or just use --push-image to push to the default registry."
3702
3703
  ).hideHelp()
3704
+ ).addOption(
3705
+ new CommandOption(
3706
+ "--no-cache",
3707
+ "Do not use the cache when building the image. This will slow down the build process but can be useful if you are experiencing issues with the cache."
3708
+ ).hideHelp()
3703
3709
  ).addOption(
3704
3710
  new CommandOption(
3705
3711
  "--push",
@@ -3836,7 +3842,8 @@ async function _deployCommand(dir, options) {
3836
3842
  projectRef: resolvedConfig.config.project,
3837
3843
  buildPlatform: options.buildPlatform,
3838
3844
  pushImage: options.push,
3839
- selfHostedRegistry: !!options.registry
3845
+ selfHostedRegistry: !!options.registry,
3846
+ noCache: options.noCache
3840
3847
  });
3841
3848
  }
3842
3849
  if (!deploymentResponse.data.externalBuildData) {
@@ -3859,7 +3866,8 @@ async function _deployCommand(dir, options) {
3859
3866
  contentHash: deploymentResponse.data.contentHash,
3860
3867
  projectRef: resolvedConfig.config.project,
3861
3868
  loadImage: options.loadImage,
3862
- buildPlatform: options.buildPlatform
3869
+ buildPlatform: options.buildPlatform,
3870
+ noCache: options.noCache
3863
3871
  },
3864
3872
  deploymentSpinner
3865
3873
  );
@@ -3912,7 +3920,8 @@ async function _deployCommand(dir, options) {
3912
3920
  const startIndexingResponse = await environmentClient.startDeploymentIndexing(
3913
3921
  deploymentResponse.data.id,
3914
3922
  {
3915
- imageReference
3923
+ imageReference,
3924
+ selfHosted: options.selfHosted
3916
3925
  }
3917
3926
  );
3918
3927
  if (!startIndexingResponse.success) {
@@ -4172,6 +4181,7 @@ async function buildAndPushImage(options, updater) {
4172
4181
  "build",
4173
4182
  "-f",
4174
4183
  "Containerfile",
4184
+ options.noCache ? "--no-cache" : void 0,
4175
4185
  "--platform",
4176
4186
  options.buildPlatform,
4177
4187
  "--provenance",
@@ -4263,6 +4273,7 @@ async function buildAndPushSelfHostedImage(options) {
4263
4273
  "build",
4264
4274
  "-f",
4265
4275
  "Containerfile",
4276
+ options.noCache ? "--no-cache" : void 0,
4266
4277
  "--platform",
4267
4278
  options.buildPlatform,
4268
4279
  "--build-arg",
@@ -4280,7 +4291,9 @@ async function buildAndPushSelfHostedImage(options) {
4280
4291
  "."
4281
4292
  // The build context
4282
4293
  ].filter(Boolean);
4283
- logger.debug(`docker ${buildArgs.join(" ")}`);
4294
+ logger.debug(`docker ${buildArgs.join(" ")}`, {
4295
+ cwd: options.cwd
4296
+ });
4284
4297
  span.setAttribute("docker.command.build", `docker ${buildArgs.join(" ")}`);
4285
4298
  const buildProcess = execa2("docker", buildArgs, {
4286
4299
  cwd: options.cwd
@@ -4431,6 +4444,9 @@ async function compileProject(config, options, configPath) {
4431
4444
  // This is needed to support opentelemetry instrumentation that uses module patching
4432
4445
  target: ["node18", "es2020"],
4433
4446
  outdir: "out",
4447
+ banner: {
4448
+ js: `process.on("uncaughtException", function(error, origin) { process.send && process.send({ type: "EVENT", message: { type: "UNCAUGHT_EXCEPTION", payload: { error: { name: error.name, message: error.message, stack: error.stack }, origin }, version: "v1" } }); });`
4449
+ },
4434
4450
  define: {
4435
4451
  TRIGGER_API_URL: `"${config.triggerUrl}"`,
4436
4452
  __PROJECT_CONFIG__: JSON.stringify(config)
@@ -5763,6 +5779,9 @@ function useDev({
5763
5779
  resolveDir: process.cwd(),
5764
5780
  sourcefile: "__entryPoint.ts"
5765
5781
  },
5782
+ banner: {
5783
+ js: `process.on("uncaughtException", function(error, origin) { process.send && process.send({ type: "UNCAUGHT_EXCEPTION", payload: { error: { name: error.name, message: error.message, stack: error.stack }, origin }, version: "v1" }); });`
5784
+ },
5766
5785
  bundle: true,
5767
5786
  metafile: true,
5768
5787
  write: false,