trigger.dev 0.0.0-v3-pnpm-fix-20240404112326 → 0.0.0-v3-pnpm-fix-20240404124258
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
|
@@ -801,7 +801,7 @@ import invariant from "tiny-invariant";
|
|
|
801
801
|
import { z as z4 } from "zod";
|
|
802
802
|
|
|
803
803
|
// package.json
|
|
804
|
-
var version = "0.0.0-v3-pnpm-fix-
|
|
804
|
+
var version = "0.0.0-v3-pnpm-fix-20240404124258";
|
|
805
805
|
var dependencies = {
|
|
806
806
|
"@clack/prompts": "^0.7.0",
|
|
807
807
|
"@depot/cli": "0.0.1-cli.2.55.0",
|
|
@@ -817,7 +817,7 @@ var dependencies = {
|
|
|
817
817
|
"@opentelemetry/sdk-trace-base": "^1.22.0",
|
|
818
818
|
"@opentelemetry/sdk-trace-node": "^1.22.0",
|
|
819
819
|
"@opentelemetry/semantic-conventions": "^1.22.0",
|
|
820
|
-
"@trigger.dev/core": "workspace:0.0.0-v3-pnpm-fix-
|
|
820
|
+
"@trigger.dev/core": "workspace:0.0.0-v3-pnpm-fix-20240404124258",
|
|
821
821
|
"@types/degit": "^2.8.3",
|
|
822
822
|
chalk: "^5.2.0",
|
|
823
823
|
chokidar: "^3.5.3",
|
|
@@ -851,7 +851,6 @@ var dependencies = {
|
|
|
851
851
|
"simple-git": "^3.19.0",
|
|
852
852
|
"socket.io-client": "^4.7.4",
|
|
853
853
|
"source-map-support": "^0.5.21",
|
|
854
|
-
"supports-color": "^9.4.0",
|
|
855
854
|
"terminal-link": "^3.0.0",
|
|
856
855
|
"tiny-invariant": "^1.2.0",
|
|
857
856
|
"tsconfig-paths": "^4.2.0",
|
|
@@ -1694,7 +1693,6 @@ async function normalizeConfig(config) {
|
|
|
1694
1693
|
// src/utilities/initialBanner.ts
|
|
1695
1694
|
import { spinner } from "@clack/prompts";
|
|
1696
1695
|
import chalk3 from "chalk";
|
|
1697
|
-
import supportsColor from "supports-color";
|
|
1698
1696
|
import checkForUpdate from "update-check";
|
|
1699
1697
|
|
|
1700
1698
|
// src/utilities/getVersion.ts
|
|
@@ -1743,7 +1741,7 @@ ${logo()} ${chalkGrey("(v3 Developer Preview)")}`;
|
|
|
1743
1741
|
text3 = `${text3} (update available ${chalk3.green(maybeNewVersion)})`;
|
|
1744
1742
|
}
|
|
1745
1743
|
}
|
|
1746
|
-
logger.log(text3 + "\n" +
|
|
1744
|
+
logger.log(text3 + "\n" + chalkGrey("-".repeat(54)));
|
|
1747
1745
|
}
|
|
1748
1746
|
function printDevBanner() {
|
|
1749
1747
|
logger.log(
|
|
@@ -4751,6 +4749,7 @@ function runtimeCheck(minimumMajor, minimumMinor) {
|
|
|
4751
4749
|
}
|
|
4752
4750
|
|
|
4753
4751
|
// src/commands/dev.tsx
|
|
4752
|
+
import { findUp as findUp2, pathExists as pathExists2 } from "find-up";
|
|
4754
4753
|
var apiClient;
|
|
4755
4754
|
var DevCommandOptions = CommonCommandOptions.extend({
|
|
4756
4755
|
debugger: z5.boolean().default(false),
|
|
@@ -5072,7 +5071,7 @@ function useDev({
|
|
|
5072
5071
|
await fs7.promises.writeFile(sourceMapPath2, sourceMapFile.text);
|
|
5073
5072
|
}
|
|
5074
5073
|
const environmentVariablesResponse = await environmentClient.getEnvironmentVariables(config.project);
|
|
5075
|
-
const processEnv = gatherProcessEnv();
|
|
5074
|
+
const processEnv = await gatherProcessEnv();
|
|
5076
5075
|
const backgroundWorker = new BackgroundWorker(fullPath, {
|
|
5077
5076
|
projectConfig: config,
|
|
5078
5077
|
dependencies: dependencies2,
|
|
@@ -5303,7 +5302,7 @@ ${task.filePath} -> ${task.exportName}`).join("")}`;
|
|
|
5303
5302
|
}).join("");
|
|
5304
5303
|
return `Duplicate ${chalkTask("task id")} detected:${duplicateTable}`;
|
|
5305
5304
|
}
|
|
5306
|
-
function gatherProcessEnv() {
|
|
5305
|
+
async function gatherProcessEnv() {
|
|
5307
5306
|
const env = {
|
|
5308
5307
|
NODE_ENV: process.env.NODE_ENV ?? "development",
|
|
5309
5308
|
PATH: process.env.PATH,
|
|
@@ -5314,12 +5313,37 @@ function gatherProcessEnv() {
|
|
|
5314
5313
|
NVM_BIN: process.env.NVM_BIN,
|
|
5315
5314
|
LANG: process.env.LANG,
|
|
5316
5315
|
TERM: process.env.TERM,
|
|
5317
|
-
NODE_PATH: process.env.NODE_PATH,
|
|
5316
|
+
NODE_PATH: await amendNodePathWithPnpmNodeModules(process.env.NODE_PATH),
|
|
5318
5317
|
HOME: process.env.HOME,
|
|
5319
5318
|
BUN_INSTALL: process.env.BUN_INSTALL
|
|
5320
5319
|
};
|
|
5321
5320
|
return Object.fromEntries(Object.entries(env).filter(([key, value]) => value !== void 0));
|
|
5322
5321
|
}
|
|
5322
|
+
async function amendNodePathWithPnpmNodeModules(nodePath) {
|
|
5323
|
+
const pnpmModulesPath = await findPnpmNodeModulesPath();
|
|
5324
|
+
if (!pnpmModulesPath) {
|
|
5325
|
+
return nodePath;
|
|
5326
|
+
}
|
|
5327
|
+
if (nodePath) {
|
|
5328
|
+
if (nodePath.includes(pnpmModulesPath)) {
|
|
5329
|
+
return nodePath;
|
|
5330
|
+
}
|
|
5331
|
+
return `${nodePath}:${pnpmModulesPath}`;
|
|
5332
|
+
}
|
|
5333
|
+
return pnpmModulesPath;
|
|
5334
|
+
}
|
|
5335
|
+
async function findPnpmNodeModulesPath() {
|
|
5336
|
+
return await findUp2(
|
|
5337
|
+
async (directory) => {
|
|
5338
|
+
const pnpmModules = join5(directory, "node_modules", ".pnpm", "node_modules");
|
|
5339
|
+
const hasPnpmNodeModules = await pathExists2(pnpmModules);
|
|
5340
|
+
if (hasPnpmNodeModules) {
|
|
5341
|
+
return pnpmModules;
|
|
5342
|
+
}
|
|
5343
|
+
},
|
|
5344
|
+
{ type: "directory" }
|
|
5345
|
+
);
|
|
5346
|
+
}
|
|
5323
5347
|
|
|
5324
5348
|
// src/commands/init.ts
|
|
5325
5349
|
import { intro as intro4, isCancel, log as log3, outro as outro4, select as select2, spinner as spinner5, text } from "@clack/prompts";
|