Compare commits

..

1 Commits

Author SHA1 Message Date
github-actions[bot] 65240351f7 Automatic compilation 2024-05-23 14:58:49 +00:00
2 changed files with 4 additions and 19 deletions
-2
View File
@@ -51,5 +51,3 @@ 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"
+4 -17
View File
@@ -28699,22 +28699,18 @@ 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 = ".") {
@@ -28727,8 +28723,7 @@ 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")) ||
(0,external_node_fs_namespaceObject.existsSync)(external_node_path_namespaceObject.join(workingDirectory, "bun.lock"))) {
if ((0,external_node_fs_namespaceObject.existsSync)(external_node_path_namespaceObject.join(workingDirectory, "bun.lockb"))) {
return "bun";
}
return null;
@@ -28751,7 +28746,7 @@ function getPackageManager(name, { workingDirectory = "." } = {}) {
const DEFAULT_WRANGLER_VERSION = "3.78.10";
const DEFAULT_WRANGLER_VERSION = "3.13.2";
/**
* A configuration object that contains all the inputs & immutable state for the action.
*/
@@ -28814,9 +28809,7 @@ async function installWrangler() {
let installedVersion = "";
let installedVersionSatisfiesRequirement = false;
try {
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"], {
const { stdout } = await (0,exec.getExecOutput)(packageManager.exec, ["wrangler", "--version"], {
cwd: config["workingDirectory"],
silent: config.QUIET_MODE,
});
@@ -28825,7 +28818,7 @@ async function installWrangler() {
// and
// `3.48.0`
const versionMatch = stdout.match(/wrangler (\d+\.\d+\.\d+)/) ??
stdout.match(/^(\d+\.\d+\.\d+)/m);
stdout.match(/^(\d+\.\d+\.\d+)/);
if (versionMatch) {
installedVersion = versionMatch[1];
}
@@ -29012,12 +29005,6 @@ 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);
}
}
}
}