Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 168bc28b70 | |||
| 66334dff0a | |||
| 9966912c1b | |||
| 7b9aec5185 | |||
| bcff5386ec | |||
| c15498da36 | |||
| 8bc5c5f050 | |||
| ac21b71592 | |||
| f111269956 | |||
| 570d521df6 | |||
| 174337b3b4 | |||
| a1467a0c8f | |||
| 3ea6e3f132 | |||
| ea11499226 | |||
| 8f2f89521c | |||
| 66efca2cbb | |||
| aa5d18dd1e | |||
| b84268f0e0 | |||
| d1b97ebf4d | |||
| baf8bc61f1 | |||
| 8edd152f63 | |||
| 2d275a8f2d |
@@ -51,3 +51,5 @@ outputs:
|
||||
description: "The error output of the Wrangler command (comes from stderr)"
|
||||
deployment-url:
|
||||
description: "If the command was a Workers or Pages deployment, this will be the URL of the deployment"
|
||||
deployment-alias-url:
|
||||
description: "If the command was a Workers or Pages deployment, this can be the URL of the deployment alias (if it exists) - needs wrangler >= 3.78.0"
|
||||
|
||||
Vendored
+15
-2
@@ -28699,18 +28699,22 @@ const PACKAGE_MANAGERS = {
|
||||
npm: {
|
||||
install: "npm i",
|
||||
exec: "npx",
|
||||
execNoInstall: "npx --no-install",
|
||||
},
|
||||
yarn: {
|
||||
install: "yarn add",
|
||||
exec: "yarn",
|
||||
execNoInstall: "yarn",
|
||||
},
|
||||
pnpm: {
|
||||
install: "pnpm add",
|
||||
exec: "pnpm exec",
|
||||
execNoInstall: "pnpm exec",
|
||||
},
|
||||
bun: {
|
||||
install: "bun i",
|
||||
exec: "bunx",
|
||||
execNoInstall: "bun run",
|
||||
},
|
||||
};
|
||||
function detectPackageManager(workingDirectory = ".") {
|
||||
@@ -28723,7 +28727,8 @@ function detectPackageManager(workingDirectory = ".") {
|
||||
if ((0,external_node_fs_namespaceObject.existsSync)(external_node_path_namespaceObject.join(workingDirectory, "pnpm-lock.yaml"))) {
|
||||
return "pnpm";
|
||||
}
|
||||
if ((0,external_node_fs_namespaceObject.existsSync)(external_node_path_namespaceObject.join(workingDirectory, "bun.lockb"))) {
|
||||
if ((0,external_node_fs_namespaceObject.existsSync)(external_node_path_namespaceObject.join(workingDirectory, "bun.lockb")) ||
|
||||
(0,external_node_fs_namespaceObject.existsSync)(external_node_path_namespaceObject.join(workingDirectory, "bun.lock"))) {
|
||||
return "bun";
|
||||
}
|
||||
return null;
|
||||
@@ -28809,7 +28814,9 @@ async function installWrangler() {
|
||||
let installedVersion = "";
|
||||
let installedVersionSatisfiesRequirement = false;
|
||||
try {
|
||||
const { stdout } = await (0,exec.getExecOutput)(packageManager.exec, ["wrangler", "--version"], {
|
||||
const { stdout } = await (0,exec.getExecOutput)(
|
||||
// We want to simply invoke wrangler to check if it's installed, but don't want to auto-install it at this stage
|
||||
packageManager.execNoInstall, ["wrangler", "--version"], {
|
||||
cwd: config["workingDirectory"],
|
||||
silent: config.QUIET_MODE,
|
||||
});
|
||||
@@ -29005,6 +29012,12 @@ async function wranglerCommands() {
|
||||
deploymentUrl = deploymentUrlMatch[0].trim();
|
||||
(0,core.setOutput)("deployment-url", deploymentUrl);
|
||||
}
|
||||
// And also try to extract the alias URL (since wrangler@3.78.0)
|
||||
const aliasUrlMatch = stdOut.match(/alias URL: (https?:\/\/[a-zA-Z0-9-./]+)/);
|
||||
if (aliasUrlMatch && aliasUrlMatch.length == 2 && aliasUrlMatch[1]) {
|
||||
const aliasUrl = aliasUrlMatch[1].trim();
|
||||
(0,core.setOutput)("deployment-alias-url", aliasUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user