diff --git a/Tasks/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson index 4cdb7b7282de..e57b5e7684c0 100644 --- a/Tasks/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson @@ -36,5 +36,9 @@ "loc.input.label.production_branch": "Production Branch", "loc.input.help.production_branch": "Production branch. When specified and Deployment Environment is empty, deployments from other branches will be preview environments", "loc.input.label.data_api_location": "Data api location", - "loc.input.help.data_api_location": "Directory location of the Data API source files relative to working directory" -} \ No newline at end of file + "loc.input.help.data_api_location": "Directory location of the Data API source files relative to working directory", + "loc.input.label.azure_access_token": "Azure Access Token", + "loc.input.help.azure_access_token": "Access token used to authenticate and authorize the deployment", + "loc.input.label.default_hostname": "Default Hostname", + "loc.input.help.default_hostname": "Default Hostname of the app" +} diff --git a/Tasks/AzureStaticWebAppV0/envVarDenylist.json b/Tasks/AzureStaticWebAppV0/envVarDenylist.json index 7cf7327e85dd..e3de6be36ee2 100644 --- a/Tasks/AzureStaticWebAppV0/envVarDenylist.json +++ b/Tasks/AzureStaticWebAppV0/envVarDenylist.json @@ -34,5 +34,7 @@ "ROUTES_LOCATION", "ORIGINAL_PATH", "DEPLOYMENT_ACTION", - "NUGET_PACKAGES" + "NUGET_PACKAGES", + "AZURE_ACCESS_TOKEN", + "DEFAULT_HOSTNAME" ] \ No newline at end of file diff --git a/Tasks/AzureStaticWebAppV0/index.ts b/Tasks/AzureStaticWebAppV0/index.ts index 4970cd651483..4b1809baaf26 100644 --- a/Tasks/AzureStaticWebAppV0/index.ts +++ b/Tasks/AzureStaticWebAppV0/index.ts @@ -12,6 +12,8 @@ const routesLocationInputName = 'routes_location'; const buildTimeoutInMinutesInputName = 'build_timeout_in_minutes'; const configFileLocationInputName = 'config_file_location'; const apiTokenInputName = 'azure_static_web_apps_api_token'; +const accessTokenInputName = 'azure_access_token'; +const defaultHostnameInputName = 'default_hostname'; const deploymentEnvironmentInputName = 'deployment_environment'; const productionBranchInputName = 'production_branch'; const dataApiLocationInputName = 'data_api_location'; @@ -87,7 +89,9 @@ async function createDockerEnvVarFile(envVarFilePath: string) { const skipApiBuild: boolean = tl.getBoolInput('skip_api_build', false); const isStaticExport: boolean = tl.getBoolInput('is_static_export', false); const apiToken: string = process.env[apiTokenInputName] || tl.getInput(apiTokenInputName, false) || ""; - + const accessToken: string = process.env[accessTokenInputName] || tl.getInput(accessTokenInputName, false) || ""; + const defaultHostname: string = process.env[defaultHostnameInputName] || tl.getInput(defaultHostnameInputName, false) || ""; + const systemVerbose = getNullableBooleanFromString(process.env['SYSTEM_DEBUG']); const inputVerbose = getNullableBooleanFromString(tl.getInput('verbose', false)); @@ -114,7 +118,9 @@ async function createDockerEnvVarFile(envVarFilePath: string) { addSystemVariableToString("VERBOSE", verbose.toString()); addInputStringToString("DEPLOYMENT_TOKEN", apiToken, apiTokenInputName); - + addInputStringToString("AZURE_ACCESS_TOKEN", accessToken, accessTokenInputName); + addInputStringToString("DEFAULT_HOSTNAME", defaultHostname, defaultHostnameInputName); + process.env['SWA_DEPLOYMENT_CLIENT'] = deploymentClient; process.env['SWA_WORKING_DIR'] = workingDirectory; process.env['SWA_WORKSPACE_DIR'] = containerWorkingDir; diff --git a/Tasks/AzureStaticWebAppV0/package-lock.json b/Tasks/AzureStaticWebAppV0/package-lock.json index 13c49f843bf8..5643567218f3 100644 --- a/Tasks/AzureStaticWebAppV0/package-lock.json +++ b/Tasks/AzureStaticWebAppV0/package-lock.json @@ -227,6 +227,45 @@ "agent-base": "5", "debug": "4" } + }, + "msalv1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "requires": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "msalv2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } } } }, @@ -705,45 +744,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "msalv1": { - "version": "npm:@azure/msal-node@1.18.4", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", - "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", - "requires": { - "@azure/msal-common": "13.3.1", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } - }, - "msalv2": { - "version": "npm:@azure/msal-node@2.13.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.1.tgz", - "integrity": "sha512-sijfzPNorKt6+9g1/miHwhj6Iapff4mPQx1azmmZExgzUROqWTM1o3ACyxDja0g47VpowFy/sxTM/WsuCyXTiw==", - "requires": { - "@azure/msal-common": "14.14.2", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "@azure/msal-common": { - "version": "14.14.2", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.2.tgz", - "integrity": "sha512-XV0P5kSNwDwCA/SjIxTe9mEAsKB0NqGNSuaVrkCCE2lAyBr/D6YtD80Vkdp4tjWnPFwjzkwldjr1xU/facOJog==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } - }, "node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", diff --git a/Tasks/AzureStaticWebAppV0/task.json b/Tasks/AzureStaticWebAppV0/task.json index 03957139336d..1d751cac6396 100644 --- a/Tasks/AzureStaticWebAppV0/task.json +++ b/Tasks/AzureStaticWebAppV0/task.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": 0, - "Minor": 246, + "Minor": 247, "Patch": 0 }, "preview": true, @@ -160,6 +160,22 @@ "defaultValue": "", "required": false, "helpMarkDown": "Directory location of the Data API source files relative to working directory" + }, + { + "name": "azure_access_token", + "type": "string", + "label": "Azure Access Token", + "defaultValue": "", + "required": false, + "helpMarkDown": "Access Token used for deployment. Not required if passed as a variable" + }, + { + "name": "default_hostname", + "type": "string", + "label": "Default Hostname", + "defaultValue": "", + "required": false, + "helpMarkDown": "Default hostname for deployment. Not required if passed as an environment variable" } ], "execution": { @@ -172,4 +188,4 @@ "argumentFormat": "" } } -} \ No newline at end of file +} diff --git a/Tasks/AzureStaticWebAppV0/task.loc.json b/Tasks/AzureStaticWebAppV0/task.loc.json index 61673db9ba1d..e5dc20fb2e49 100644 --- a/Tasks/AzureStaticWebAppV0/task.loc.json +++ b/Tasks/AzureStaticWebAppV0/task.loc.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": 0, - "Minor": 246, + "Minor": 247, "Patch": 0 }, "preview": true, @@ -160,6 +160,22 @@ "defaultValue": "", "required": false, "helpMarkDown": "ms-resource:loc.input.help.data_api_location" + }, + { + "name": "azure_access_token", + "type": "string", + "label": "ms-resource:loc.input.label.azure_access_token", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.azure_access_token" + }, + { + "name": "default_hostname", + "type": "string", + "label": "ms-resource:loc.input.label.default_hostname", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.default_hostname" } ], "execution": { @@ -172,4 +188,4 @@ "argumentFormat": "" } } -} \ No newline at end of file +} diff --git a/_generated/AzureStaticWebAppV0.versionmap.txt b/_generated/AzureStaticWebAppV0.versionmap.txt index 2ffb637c28a0..a36e0c1203fc 100644 --- a/_generated/AzureStaticWebAppV0.versionmap.txt +++ b/_generated/AzureStaticWebAppV0.versionmap.txt @@ -1,2 +1,2 @@ -Default|0.246.0 -Node20_229_8|0.246.1 +Default|0.247.0 +Node20_229_8|0.247.1 diff --git a/_generated/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson b/_generated/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson index 4cdb7b7282de..3562e0e09675 100644 --- a/_generated/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/AzureStaticWebAppV0/Strings/resources.resjson/en-US/resources.resjson @@ -36,5 +36,9 @@ "loc.input.label.production_branch": "Production Branch", "loc.input.help.production_branch": "Production branch. When specified and Deployment Environment is empty, deployments from other branches will be preview environments", "loc.input.label.data_api_location": "Data api location", - "loc.input.help.data_api_location": "Directory location of the Data API source files relative to working directory" + "loc.input.help.data_api_location": "Directory location of the Data API source files relative to working directory", + "loc.input.label.azure_access_token": "Azure Access Token", + "loc.input.help.azure_access_token": "Access Token used for deployment. Not required if passed as a variable", + "loc.input.label.default_hostname": "Default Hostname", + "loc.input.help.default_hostname": "Default hostname for deployment. Not required if passed as an environment variable" } \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0/envVarDenylist.json b/_generated/AzureStaticWebAppV0/envVarDenylist.json index 7cf7327e85dd..e3de6be36ee2 100644 --- a/_generated/AzureStaticWebAppV0/envVarDenylist.json +++ b/_generated/AzureStaticWebAppV0/envVarDenylist.json @@ -34,5 +34,7 @@ "ROUTES_LOCATION", "ORIGINAL_PATH", "DEPLOYMENT_ACTION", - "NUGET_PACKAGES" + "NUGET_PACKAGES", + "AZURE_ACCESS_TOKEN", + "DEFAULT_HOSTNAME" ] \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0/index.ts b/_generated/AzureStaticWebAppV0/index.ts index 4970cd651483..4b1809baaf26 100644 --- a/_generated/AzureStaticWebAppV0/index.ts +++ b/_generated/AzureStaticWebAppV0/index.ts @@ -12,6 +12,8 @@ const routesLocationInputName = 'routes_location'; const buildTimeoutInMinutesInputName = 'build_timeout_in_minutes'; const configFileLocationInputName = 'config_file_location'; const apiTokenInputName = 'azure_static_web_apps_api_token'; +const accessTokenInputName = 'azure_access_token'; +const defaultHostnameInputName = 'default_hostname'; const deploymentEnvironmentInputName = 'deployment_environment'; const productionBranchInputName = 'production_branch'; const dataApiLocationInputName = 'data_api_location'; @@ -87,7 +89,9 @@ async function createDockerEnvVarFile(envVarFilePath: string) { const skipApiBuild: boolean = tl.getBoolInput('skip_api_build', false); const isStaticExport: boolean = tl.getBoolInput('is_static_export', false); const apiToken: string = process.env[apiTokenInputName] || tl.getInput(apiTokenInputName, false) || ""; - + const accessToken: string = process.env[accessTokenInputName] || tl.getInput(accessTokenInputName, false) || ""; + const defaultHostname: string = process.env[defaultHostnameInputName] || tl.getInput(defaultHostnameInputName, false) || ""; + const systemVerbose = getNullableBooleanFromString(process.env['SYSTEM_DEBUG']); const inputVerbose = getNullableBooleanFromString(tl.getInput('verbose', false)); @@ -114,7 +118,9 @@ async function createDockerEnvVarFile(envVarFilePath: string) { addSystemVariableToString("VERBOSE", verbose.toString()); addInputStringToString("DEPLOYMENT_TOKEN", apiToken, apiTokenInputName); - + addInputStringToString("AZURE_ACCESS_TOKEN", accessToken, accessTokenInputName); + addInputStringToString("DEFAULT_HOSTNAME", defaultHostname, defaultHostnameInputName); + process.env['SWA_DEPLOYMENT_CLIENT'] = deploymentClient; process.env['SWA_WORKING_DIR'] = workingDirectory; process.env['SWA_WORKSPACE_DIR'] = containerWorkingDir; diff --git a/_generated/AzureStaticWebAppV0/package-lock.json b/_generated/AzureStaticWebAppV0/package-lock.json index 13c49f843bf8..5643567218f3 100644 --- a/_generated/AzureStaticWebAppV0/package-lock.json +++ b/_generated/AzureStaticWebAppV0/package-lock.json @@ -227,6 +227,45 @@ "agent-base": "5", "debug": "4" } + }, + "msalv1": { + "version": "npm:@azure/msal-node@1.18.4", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", + "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", + "requires": { + "@azure/msal-common": "13.3.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } + }, + "msalv2": { + "version": "npm:@azure/msal-node@2.14.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.14.0.tgz", + "integrity": "sha512-rrfzIpG3Q1rHjVYZmHAEDidWAZZ2cgkxlIcMQ8dHebRISaZ2KCV33Q8Vs+uaV6lxweROabNxKFlR2lIKagZqYg==", + "requires": { + "@azure/msal-common": "14.15.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "dependencies": { + "@azure/msal-common": { + "version": "14.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.15.0.tgz", + "integrity": "sha512-ImAQHxmpMneJ/4S8BRFhjt1MZ3bppmpRPYYNyzeQPeFN288YKbb8TmmISQEbtfkQ1BPASvYZU5doIZOPBAqENQ==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + } + } } } }, @@ -705,45 +744,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "msalv1": { - "version": "npm:@azure/msal-node@1.18.4", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.18.4.tgz", - "integrity": "sha512-Kc/dRvhZ9Q4+1FSfsTFDME/v6+R2Y1fuMty/TfwqE5p9GTPw08BPbKgeWinE8JRHRp+LemjQbUZsn4Q4l6Lszg==", - "requires": { - "@azure/msal-common": "13.3.1", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } - }, - "msalv2": { - "version": "npm:@azure/msal-node@2.13.1", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.13.1.tgz", - "integrity": "sha512-sijfzPNorKt6+9g1/miHwhj6Iapff4mPQx1azmmZExgzUROqWTM1o3ACyxDja0g47VpowFy/sxTM/WsuCyXTiw==", - "requires": { - "@azure/msal-common": "14.14.2", - "jsonwebtoken": "^9.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "@azure/msal-common": { - "version": "14.14.2", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.14.2.tgz", - "integrity": "sha512-XV0P5kSNwDwCA/SjIxTe9mEAsKB0NqGNSuaVrkCCE2lAyBr/D6YtD80Vkdp4tjWnPFwjzkwldjr1xU/facOJog==" - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - } - } - }, "node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", diff --git a/_generated/AzureStaticWebAppV0/task.json b/_generated/AzureStaticWebAppV0/task.json index 320515c2ac70..5cd25a5f311b 100644 --- a/_generated/AzureStaticWebAppV0/task.json +++ b/_generated/AzureStaticWebAppV0/task.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": 0, - "Minor": 246, + "Minor": 247, "Patch": 0 }, "preview": true, @@ -160,6 +160,22 @@ "defaultValue": "", "required": false, "helpMarkDown": "Directory location of the Data API source files relative to working directory" + }, + { + "name": "azure_access_token", + "type": "string", + "label": "Azure Access Token", + "defaultValue": "", + "required": false, + "helpMarkDown": "Access Token used for deployment. Not required if passed as a variable" + }, + { + "name": "default_hostname", + "type": "string", + "label": "Default Hostname", + "defaultValue": "", + "required": false, + "helpMarkDown": "Default hostname for deployment. Not required if passed as an environment variable" } ], "execution": { @@ -173,7 +189,7 @@ } }, "_buildConfigMapping": { - "Default": "0.246.0", - "Node20_229_8": "0.246.1" + "Default": "0.247.0", + "Node20_229_8": "0.247.1" } } \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0/task.loc.json b/_generated/AzureStaticWebAppV0/task.loc.json index ff219b6b9801..f16c52ca943e 100644 --- a/_generated/AzureStaticWebAppV0/task.loc.json +++ b/_generated/AzureStaticWebAppV0/task.loc.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": 0, - "Minor": 246, + "Minor": 247, "Patch": 0 }, "preview": true, @@ -160,6 +160,22 @@ "defaultValue": "", "required": false, "helpMarkDown": "ms-resource:loc.input.help.data_api_location" + }, + { + "name": "azure_access_token", + "type": "string", + "label": "ms-resource:loc.input.label.azure_access_token", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.azure_access_token" + }, + { + "name": "default_hostname", + "type": "string", + "label": "ms-resource:loc.input.label.default_hostname", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.default_hostname" } ], "execution": { @@ -173,7 +189,7 @@ } }, "_buildConfigMapping": { - "Default": "0.246.0", - "Node20_229_8": "0.246.1" + "Default": "0.247.0", + "Node20_229_8": "0.247.1" } } \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0_Node20/Strings/resources.resjson/en-US/resources.resjson b/_generated/AzureStaticWebAppV0_Node20/Strings/resources.resjson/en-US/resources.resjson index 4cdb7b7282de..3562e0e09675 100644 --- a/_generated/AzureStaticWebAppV0_Node20/Strings/resources.resjson/en-US/resources.resjson +++ b/_generated/AzureStaticWebAppV0_Node20/Strings/resources.resjson/en-US/resources.resjson @@ -36,5 +36,9 @@ "loc.input.label.production_branch": "Production Branch", "loc.input.help.production_branch": "Production branch. When specified and Deployment Environment is empty, deployments from other branches will be preview environments", "loc.input.label.data_api_location": "Data api location", - "loc.input.help.data_api_location": "Directory location of the Data API source files relative to working directory" + "loc.input.help.data_api_location": "Directory location of the Data API source files relative to working directory", + "loc.input.label.azure_access_token": "Azure Access Token", + "loc.input.help.azure_access_token": "Access Token used for deployment. Not required if passed as a variable", + "loc.input.label.default_hostname": "Default Hostname", + "loc.input.help.default_hostname": "Default hostname for deployment. Not required if passed as an environment variable" } \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0_Node20/envVarDenylist.json b/_generated/AzureStaticWebAppV0_Node20/envVarDenylist.json index 7cf7327e85dd..e3de6be36ee2 100644 --- a/_generated/AzureStaticWebAppV0_Node20/envVarDenylist.json +++ b/_generated/AzureStaticWebAppV0_Node20/envVarDenylist.json @@ -34,5 +34,7 @@ "ROUTES_LOCATION", "ORIGINAL_PATH", "DEPLOYMENT_ACTION", - "NUGET_PACKAGES" + "NUGET_PACKAGES", + "AZURE_ACCESS_TOKEN", + "DEFAULT_HOSTNAME" ] \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0_Node20/index.ts b/_generated/AzureStaticWebAppV0_Node20/index.ts index 4970cd651483..4b1809baaf26 100644 --- a/_generated/AzureStaticWebAppV0_Node20/index.ts +++ b/_generated/AzureStaticWebAppV0_Node20/index.ts @@ -12,6 +12,8 @@ const routesLocationInputName = 'routes_location'; const buildTimeoutInMinutesInputName = 'build_timeout_in_minutes'; const configFileLocationInputName = 'config_file_location'; const apiTokenInputName = 'azure_static_web_apps_api_token'; +const accessTokenInputName = 'azure_access_token'; +const defaultHostnameInputName = 'default_hostname'; const deploymentEnvironmentInputName = 'deployment_environment'; const productionBranchInputName = 'production_branch'; const dataApiLocationInputName = 'data_api_location'; @@ -87,7 +89,9 @@ async function createDockerEnvVarFile(envVarFilePath: string) { const skipApiBuild: boolean = tl.getBoolInput('skip_api_build', false); const isStaticExport: boolean = tl.getBoolInput('is_static_export', false); const apiToken: string = process.env[apiTokenInputName] || tl.getInput(apiTokenInputName, false) || ""; - + const accessToken: string = process.env[accessTokenInputName] || tl.getInput(accessTokenInputName, false) || ""; + const defaultHostname: string = process.env[defaultHostnameInputName] || tl.getInput(defaultHostnameInputName, false) || ""; + const systemVerbose = getNullableBooleanFromString(process.env['SYSTEM_DEBUG']); const inputVerbose = getNullableBooleanFromString(tl.getInput('verbose', false)); @@ -114,7 +118,9 @@ async function createDockerEnvVarFile(envVarFilePath: string) { addSystemVariableToString("VERBOSE", verbose.toString()); addInputStringToString("DEPLOYMENT_TOKEN", apiToken, apiTokenInputName); - + addInputStringToString("AZURE_ACCESS_TOKEN", accessToken, accessTokenInputName); + addInputStringToString("DEFAULT_HOSTNAME", defaultHostname, defaultHostnameInputName); + process.env['SWA_DEPLOYMENT_CLIENT'] = deploymentClient; process.env['SWA_WORKING_DIR'] = workingDirectory; process.env['SWA_WORKSPACE_DIR'] = containerWorkingDir; diff --git a/_generated/AzureStaticWebAppV0_Node20/task.json b/_generated/AzureStaticWebAppV0_Node20/task.json index 3b075815172e..83be2c603f69 100644 --- a/_generated/AzureStaticWebAppV0_Node20/task.json +++ b/_generated/AzureStaticWebAppV0_Node20/task.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": 0, - "Minor": 246, + "Minor": 247, "Patch": 1 }, "preview": true, @@ -160,6 +160,22 @@ "defaultValue": "", "required": false, "helpMarkDown": "Directory location of the Data API source files relative to working directory" + }, + { + "name": "azure_access_token", + "type": "string", + "label": "Azure Access Token", + "defaultValue": "", + "required": false, + "helpMarkDown": "Access Token used for deployment. Not required if passed as a variable" + }, + { + "name": "default_hostname", + "type": "string", + "label": "Default Hostname", + "defaultValue": "", + "required": false, + "helpMarkDown": "Default hostname for deployment. Not required if passed as an environment variable" } ], "execution": { @@ -177,7 +193,7 @@ } }, "_buildConfigMapping": { - "Default": "0.246.0", - "Node20_229_8": "0.246.1" + "Default": "0.247.0", + "Node20_229_8": "0.247.1" } } \ No newline at end of file diff --git a/_generated/AzureStaticWebAppV0_Node20/task.loc.json b/_generated/AzureStaticWebAppV0_Node20/task.loc.json index 684e1705af6c..56856d8b8346 100644 --- a/_generated/AzureStaticWebAppV0_Node20/task.loc.json +++ b/_generated/AzureStaticWebAppV0_Node20/task.loc.json @@ -14,7 +14,7 @@ "demands": [], "version": { "Major": 0, - "Minor": 246, + "Minor": 247, "Patch": 1 }, "preview": true, @@ -160,6 +160,22 @@ "defaultValue": "", "required": false, "helpMarkDown": "ms-resource:loc.input.help.data_api_location" + }, + { + "name": "azure_access_token", + "type": "string", + "label": "ms-resource:loc.input.label.azure_access_token", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.azure_access_token" + }, + { + "name": "default_hostname", + "type": "string", + "label": "ms-resource:loc.input.label.default_hostname", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.default_hostname" } ], "execution": { @@ -177,7 +193,7 @@ } }, "_buildConfigMapping": { - "Default": "0.246.0", - "Node20_229_8": "0.246.1" + "Default": "0.247.0", + "Node20_229_8": "0.247.1" } } \ No newline at end of file