trigger.dev 0.0.0-v3-canary-20240322112439 → 0.0.0-v3-canary-20240322141522

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
@@ -800,7 +800,7 @@ import invariant from "tiny-invariant";
800
800
  import { z as z4 } from "zod";
801
801
 
802
802
  // package.json
803
- var version = "0.0.0-v3-canary-20240322112439";
803
+ var version = "0.0.0-v3-canary-20240322141522";
804
804
  var dependencies = {
805
805
  "@baselime/node-opentelemetry": "^0.4.6",
806
806
  "@clack/prompts": "^0.7.0",
@@ -821,7 +821,7 @@ var dependencies = {
821
821
  "@opentelemetry/sdk-trace-node": "^1.21.0",
822
822
  "@opentelemetry/semantic-conventions": "^1.21.0",
823
823
  "@traceloop/instrumentation-openai": "^0.3.9",
824
- "@trigger.dev/core": "workspace:0.0.0-v3-canary-20240322112439",
824
+ "@trigger.dev/core": "workspace:0.0.0-v3-canary-20240322141522",
825
825
  "@types/degit": "^2.8.3",
826
826
  chalk: "^5.2.0",
827
827
  chokidar: "^3.5.3",
@@ -3413,12 +3413,20 @@ async function compileProject(config, options, configPath) {
3413
3413
  await writeFile2(join4(tempDir, "worker.js.map"), workerSourcemapFile.text);
3414
3414
  await writeFile2(join4(tempDir, "index.js"), entryPointOutputFile.text);
3415
3415
  const allImports = [...metaOutput.imports, ...entryPointMetaOutput.imports];
3416
- const dependencies2 = await gatherRequiredDependencies(allImports, config);
3416
+ const externalPackageJson = await readJSONFile(join4(config.projectDir, "package.json"));
3417
+ const dependencies2 = await gatherRequiredDependencies(
3418
+ allImports,
3419
+ config,
3420
+ externalPackageJson
3421
+ );
3417
3422
  const packageJsonContents = {
3418
3423
  name: "trigger-worker",
3419
3424
  version: "0.0.0",
3420
3425
  description: "",
3421
- dependencies: dependencies2
3426
+ dependencies: dependencies2,
3427
+ scripts: {
3428
+ postinstall: externalPackageJson?.scripts?.postinstall
3429
+ }
3422
3430
  };
3423
3431
  await writeJSONFile(join4(tempDir, "package.json"), packageJsonContents);
3424
3432
  compileSpinner.stop("Project built successfully");
@@ -3557,8 +3565,7 @@ async function typecheckProject(config, options) {
3557
3565
  }
3558
3566
  });
3559
3567
  }
3560
- async function gatherRequiredDependencies(imports, config) {
3561
- const externalPackageJson = await readJSONFile(join4(config.projectDir, "package.json"));
3568
+ async function gatherRequiredDependencies(imports, config, projectPackageJson) {
3562
3569
  const dependencies2 = {};
3563
3570
  for (const file of imports) {
3564
3571
  if (file.kind !== "require-call" || !file.external) {
@@ -3568,7 +3575,7 @@ async function gatherRequiredDependencies(imports, config) {
3568
3575
  if (dependencies2[packageName]) {
3569
3576
  continue;
3570
3577
  }
3571
- const externalDependencyVersion = (externalPackageJson?.dependencies ?? {})[packageName];
3578
+ const externalDependencyVersion = (projectPackageJson?.dependencies ?? {})[packageName];
3572
3579
  if (externalDependencyVersion) {
3573
3580
  dependencies2[packageName] = stripWorkspaceFromVersion(externalDependencyVersion);
3574
3581
  continue;
@@ -3589,8 +3596,8 @@ async function gatherRequiredDependencies(imports, config) {
3589
3596
  continue;
3590
3597
  } else {
3591
3598
  const externalDependencyVersion = {
3592
- ...externalPackageJson?.devDependencies,
3593
- ...externalPackageJson?.dependencies
3599
+ ...projectPackageJson?.devDependencies,
3600
+ ...projectPackageJson?.dependencies
3594
3601
  }[packageName];
3595
3602
  if (externalDependencyVersion) {
3596
3603
  dependencies2[packageParts.name] = externalDependencyVersion;
@@ -4050,7 +4057,6 @@ var TaskRunProcess = class {
4050
4057
  schema: workerToChildMessages,
4051
4058
  sender: async (message) => {
4052
4059
  if (this._child?.connected && !this._isBeingKilled && !this._child.killed) {
4053
- logger.debug(`[${this.runId}] sending message to task run process`, { message });
4054
4060
  this._child.send(message);
4055
4061
  }
4056
4062
  }