11import {
2- debug ,
32 getBooleanInput ,
43 getInput ,
54 getMultilineInput ,
65 endGroup as originalEndGroup ,
76 error as originalError ,
87 info as originalInfo ,
8+ debug ,
99 startGroup as originalStartGroup ,
1010 setFailed ,
1111 setOutput ,
1212} from "@actions/core" ;
1313import { getExecOutput } from "@actions/exec" ;
1414import semverEq from "semver/functions/eq" ;
1515import { exec , execShell } from "./exec" ;
16- import { getPackageManager } from "./packageManagers" ;
1716import { checkWorkingDirectory , semverCompare } from "./utils" ;
18- import { getDetailedPagesDeployOutput } from "./wranglerArtifactManager " ;
17+ import { getPackageManager } from "./packageManagers " ;
1918
20- const DEFAULT_WRANGLER_VERSION = "3.81.0 " ;
19+ const DEFAULT_WRANGLER_VERSION = "3.78.10 " ;
2120
2221/**
2322 * A configuration object that contains all the inputs & immutable state for the action.
@@ -314,9 +313,6 @@ async function wranglerCommands() {
314313 let stdErr = "" ;
315314
316315 // Construct the options for the exec command
317- const wranglerOutputDir = "/opt/wranglerArtifacts" ;
318- process . env . WRANGLER_OUTPUT_FILE_DIRECTORY = wranglerOutputDir ;
319-
320316 const options = {
321317 cwd : config [ "workingDirectory" ] ,
322318 silent : config [ "QUIET_MODE" ] ,
@@ -337,9 +333,14 @@ async function wranglerCommands() {
337333 setOutput ( "command-output" , stdOut ) ;
338334 setOutput ( "command-stderr" , stdErr ) ;
339335
340- // Check if this command is a workers deployment
341- if ( command . startsWith ( "deploy" ) || command . startsWith ( "publish" ) ) {
342- // Try to extract the deployment URL
336+ // Check if this command is a workers or pages deployment
337+ if (
338+ command . startsWith ( "deploy" ) ||
339+ command . startsWith ( "publish" ) ||
340+ command . startsWith ( "pages publish" ) ||
341+ command . startsWith ( "pages deploy" )
342+ ) {
343+ // If this is a workers or pages deployment, try to extract the deployment URL
343344 let deploymentUrl = "" ;
344345 const deploymentUrlMatch = stdOut . match ( / h t t p s ? : \/ \/ [ a - z A - Z 0 - 9 - ./ ] + / ) ;
345346 if ( deploymentUrlMatch && deploymentUrlMatch [ 0 ] ) {
@@ -356,26 +357,6 @@ async function wranglerCommands() {
356357 setOutput ( "deployment-alias-url" , aliasUrl ) ;
357358 }
358359 }
359- // Check if this command is a pages deployment
360- if (
361- command . startsWith ( "pages publish" ) ||
362- command . startsWith ( "pages deploy" )
363- ) {
364- const pagesArtifactFields =
365- await getDetailedPagesDeployOutput ( wranglerOutputDir ) ;
366-
367- if ( pagesArtifactFields ) {
368- setOutput ( "id" , pagesArtifactFields . deployment_id ) ;
369- setOutput ( "url" , pagesArtifactFields . url ) ;
370- // To ensure parity with pages-action, display url for alias if there is no alias
371- setOutput ( "alias" , pagesArtifactFields . alias ) ;
372- setOutput ( "environment" , pagesArtifactFields . environment ) ;
373- } else {
374- info (
375- "No fields available for output. Have you updated wrangler to version >=3.81.0?" ,
376- ) ;
377- }
378- }
379360 }
380361 } finally {
381362 endGroup ( ) ;
0 commit comments