trigger.dev 0.0.0-v3-prerelease-20240513155118 → 0.0.0-v3-prerelease-20240515122634
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-prerelease-
|
|
802
|
+
var version = "0.0.0-v3-prerelease-20240515122634";
|
|
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-prerelease-
|
|
819
|
+
"@trigger.dev/core": "workspace:0.0.0-v3-prerelease-20240515122634",
|
|
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: "^
|
|
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",
|
|
@@ -1887,14 +1887,27 @@ function stripWorkspaceFromVersion(version2) {
|
|
|
1887
1887
|
return version2.replace(/^workspace:/, "");
|
|
1888
1888
|
}
|
|
1889
1889
|
function parsePackageName(packageSpecifier) {
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1890
|
+
let name;
|
|
1891
|
+
let version2;
|
|
1892
|
+
if (packageSpecifier.startsWith("@")) {
|
|
1893
|
+
const atIndex = packageSpecifier.indexOf("@", 1);
|
|
1894
|
+
if (atIndex !== -1) {
|
|
1895
|
+
name = packageSpecifier.slice(0, atIndex);
|
|
1896
|
+
version2 = packageSpecifier.slice(atIndex + 1);
|
|
1897
|
+
} else {
|
|
1898
|
+
name = packageSpecifier;
|
|
1899
|
+
}
|
|
1900
|
+
} else {
|
|
1901
|
+
const [packageName, packageVersion] = packageSpecifier.split("@");
|
|
1902
|
+
if (typeof packageName === "string") {
|
|
1903
|
+
name = packageName;
|
|
1904
|
+
}
|
|
1905
|
+
version2 = packageVersion;
|
|
1893
1906
|
}
|
|
1894
|
-
if (
|
|
1895
|
-
return { name:
|
|
1907
|
+
if (!name) {
|
|
1908
|
+
return { name: packageSpecifier };
|
|
1896
1909
|
}
|
|
1897
|
-
return { name:
|
|
1910
|
+
return { name, version: version2 };
|
|
1898
1911
|
}
|
|
1899
1912
|
async function setPackageJsonDeps(path7, deps) {
|
|
1900
1913
|
try {
|
|
@@ -3448,8 +3461,7 @@ var PNPMCommands = class {
|
|
|
3448
3461
|
}
|
|
3449
3462
|
}
|
|
3450
3463
|
async resolveDependencyVersions(packageNames, options) {
|
|
3451
|
-
const
|
|
3452
|
-
const result = JSON.parse(stdout);
|
|
3464
|
+
const result = await this.#listDependencies(packageNames, options);
|
|
3453
3465
|
logger.debug(`Resolving ${packageNames.join(" ")} version using ${this.name}`);
|
|
3454
3466
|
const results = {};
|
|
3455
3467
|
for (const dep of result) {
|
|
@@ -3462,6 +3474,18 @@ var PNPMCommands = class {
|
|
|
3462
3474
|
}
|
|
3463
3475
|
return results;
|
|
3464
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
|
+
}
|
|
3465
3489
|
};
|
|
3466
3490
|
var NPMCommands = class {
|
|
3467
3491
|
get name() {
|
|
@@ -3481,8 +3505,7 @@ var NPMCommands = class {
|
|
|
3481
3505
|
return this.#recursivelySearchDependencies(output.dependencies, packageName);
|
|
3482
3506
|
}
|
|
3483
3507
|
async resolveDependencyVersions(packageNames, options) {
|
|
3484
|
-
const
|
|
3485
|
-
const output = JSON.parse(stdout);
|
|
3508
|
+
const output = await this.#listDependencies(packageNames, options);
|
|
3486
3509
|
logger.debug(`Resolving ${packageNames.join(" ")} version using ${this.name}`, { output });
|
|
3487
3510
|
const results = {};
|
|
3488
3511
|
for (const packageName of packageNames) {
|
|
@@ -3493,6 +3516,18 @@ var NPMCommands = class {
|
|
|
3493
3516
|
}
|
|
3494
3517
|
return results;
|
|
3495
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
|
+
}
|
|
3496
3531
|
#recursivelySearchDependencies(dependencies2, packageName) {
|
|
3497
3532
|
for (const [name, dependency] of Object.entries(dependencies2)) {
|
|
3498
3533
|
if (name === packageName) {
|
|
@@ -3530,7 +3565,7 @@ var YarnCommands = class {
|
|
|
3530
3565
|
}
|
|
3531
3566
|
}
|
|
3532
3567
|
async resolveDependencyVersions(packageNames, options) {
|
|
3533
|
-
const
|
|
3568
|
+
const stdout = await this.#listDependencies(packageNames, options);
|
|
3534
3569
|
const lines = stdout.split("\n");
|
|
3535
3570
|
logger.debug(`Resolving ${packageNames.join(" ")} version using ${this.name}`);
|
|
3536
3571
|
const results = {};
|
|
@@ -3543,6 +3578,18 @@ var YarnCommands = class {
|
|
|
3543
3578
|
}
|
|
3544
3579
|
return results;
|
|
3545
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
|
+
}
|
|
3546
3593
|
// The "value" when doing yarn info is formatted like this:
|
|
3547
3594
|
// "package-name@npm:version" or "package-name@workspace:version"
|
|
3548
3595
|
// This function will parse the value into just the package name.
|