Skip to content

Commit 8e359a3

Browse files
Merge pull request #407 from Azure/shilpirachna1/update-nodeversion-relv2
Updated node version to 20 as node 16 is deprecated
2 parents fb998c9 + 49dc18a commit 8e359a3

File tree

4,598 files changed

+698853
-1307875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,598 files changed

+698853
-1307875
lines changed

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ branding:
3636
icon: 'webapp.svg'
3737
color: 'blue'
3838
runs:
39-
using: 'node16'
39+
using: 'node20'
4040
main: 'lib/main.js'

lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
12+
exports.PublishProfileContainerWebAppValidator = void 0;
1213
const Validations_1 = require("../Validations");
1314
const actionparameters_1 = require("../../actionparameters");
1415
class PublishProfileContainerWebAppValidator {
1516
validate() {
1617
return __awaiter(this, void 0, void 0, function* () {
1718
const actionParams = actionparameters_1.ActionParameters.getActionParams();
18-
Validations_1.packageNotAllowed(actionParams.packageInput);
19-
Validations_1.multiContainerNotAllowed(actionParams.multiContainerConfigFile);
20-
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
21-
Validations_1.validateAppDetails();
22-
Validations_1.validateSingleContainerInputs();
19+
(0, Validations_1.packageNotAllowed)(actionParams.packageInput);
20+
(0, Validations_1.multiContainerNotAllowed)(actionParams.multiContainerConfigFile);
21+
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
22+
(0, Validations_1.validateAppDetails)();
23+
(0, Validations_1.validateSingleContainerInputs)();
2324
});
2425
}
2526
}

lib/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
12+
exports.PublishProfileWebAppValidator = void 0;
1213
const Validations_1 = require("../Validations");
1314
const actionparameters_1 = require("../../actionparameters");
1415
class PublishProfileWebAppValidator {
1516
validate() {
1617
return __awaiter(this, void 0, void 0, function* () {
1718
let actionParams = actionparameters_1.ActionParameters.getActionParams();
18-
Validations_1.containerInputsNotAllowed(actionParams.images, actionParams.multiContainerConfigFile, true);
19-
Validations_1.validateAppDetails();
20-
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
21-
yield Validations_1.validatePackageInput();
19+
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile, true);
20+
(0, Validations_1.validateAppDetails)();
21+
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
22+
yield (0, Validations_1.validatePackageInput)();
2223
});
2324
}
2425
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.SpnLinuxContainerWebAppValidator = void 0;
34
const Validations_1 = require("../Validations");
45
const actionparameters_1 = require("../../actionparameters");
56
class SpnLinuxContainerWebAppValidator {
67
validate() {
78
let actionParams = actionparameters_1.ActionParameters.getActionParams();
8-
Validations_1.packageNotAllowed(actionParams.packageInput);
9-
Validations_1.validateContainerInputs();
9+
(0, Validations_1.packageNotAllowed)(actionParams.packageInput);
10+
(0, Validations_1.validateContainerInputs)();
1011
}
1112
}
1213
exports.SpnLinuxContainerWebAppValidator = SpnLinuxContainerWebAppValidator;

lib/ActionInputValidator/ActionValidators/SpnLinuxWebAppValidator.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
12+
exports.SpnLinuxWebAppValidator = void 0;
1213
const Validations_1 = require("../Validations");
1314
const actionparameters_1 = require("../../actionparameters");
1415
class SpnLinuxWebAppValidator {
1516
validate() {
1617
return __awaiter(this, void 0, void 0, function* () {
1718
let actionParams = actionparameters_1.ActionParameters.getActionParams();
18-
Validations_1.containerInputsNotAllowed(actionParams.images, actionParams.multiContainerConfigFile);
19-
yield Validations_1.validatePackageInput();
19+
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile);
20+
yield (0, Validations_1.validatePackageInput)();
2021
});
2122
}
2223
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.SpnWindowsContainerWebAppValidator = void 0;
34
const Validations_1 = require("../Validations");
45
const actionparameters_1 = require("../../actionparameters");
56
class SpnWindowsContainerWebAppValidator {
67
validate() {
78
let actionParams = actionparameters_1.ActionParameters.getActionParams();
8-
Validations_1.packageNotAllowed(actionParams.packageInput);
9-
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
10-
Validations_1.multiContainerNotAllowed(actionParams.multiContainerConfigFile);
11-
Validations_1.validateContainerInputs();
9+
(0, Validations_1.packageNotAllowed)(actionParams.packageInput);
10+
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
11+
(0, Validations_1.multiContainerNotAllowed)(actionParams.multiContainerConfigFile);
12+
(0, Validations_1.validateContainerInputs)();
1213
}
1314
}
1415
exports.SpnWindowsContainerWebAppValidator = SpnWindowsContainerWebAppValidator;

lib/ActionInputValidator/ActionValidators/SpnWindowsWebAppValidator.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
12+
exports.SpnWindowsWebAppValidator = void 0;
1213
const Validations_1 = require("../Validations");
1314
const actionparameters_1 = require("../../actionparameters");
1415
class SpnWindowsWebAppValidator {
1516
validate() {
1617
return __awaiter(this, void 0, void 0, function* () {
1718
let actionParams = actionparameters_1.ActionParameters.getActionParams();
18-
Validations_1.containerInputsNotAllowed(actionParams.images, actionParams.multiContainerConfigFile);
19-
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
20-
yield Validations_1.validatePackageInput();
19+
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile);
20+
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
21+
yield (0, Validations_1.validatePackageInput)();
2122
});
2223
}
2324
}

lib/ActionInputValidator/Validations.js

+25-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
var desc = Object.getOwnPropertyDescriptor(m, k);
5+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6+
desc = { enumerable: true, get: function() { return m[k]; } };
7+
}
8+
Object.defineProperty(o, k2, desc);
9+
}) : (function(o, m, k, k2) {
10+
if (k2 === undefined) k2 = k;
11+
o[k2] = m[k];
12+
}));
13+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14+
Object.defineProperty(o, "default", { enumerable: true, value: v });
15+
}) : function(o, v) {
16+
o["default"] = v;
17+
});
18+
var __importStar = (this && this.__importStar) || function (mod) {
19+
if (mod && mod.__esModule) return mod;
20+
var result = {};
21+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22+
__setModuleDefault(result, mod);
23+
return result;
24+
};
225
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
326
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
427
return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,14 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
831
step((generator = generator.apply(thisArg, _arguments || [])).next());
932
});
1033
};
11-
var __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
var result = {};
14-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
17-
};
1834
Object.defineProperty(exports, "__esModule", { value: true });
35+
exports.validatePackageInput = exports.validateContainerInputs = exports.validateSingleContainerInputs = exports.multiContainerNotAllowed = exports.packageNotAllowed = exports.startupCommandNotAllowed = exports.validateAppDetails = exports.containerInputsNotAllowed = exports.appNameIsRequired = void 0;
1936
const core = __importStar(require("@actions/core"));
2037
const packageUtility_1 = require("azure-actions-utility/packageUtility");
2138
const PublishProfile_1 = require("../Utilities/PublishProfile");
@@ -83,7 +100,7 @@ exports.validateSingleContainerInputs = validateSingleContainerInputs;
83100
function validateContainerInputs() {
84101
let actionParams = actionparameters_1.ActionParameters.getActionParams();
85102
actionParams.isMultiContainer = false;
86-
if (!!actionParams.multiContainerConfigFile && packageUtility_1.exist(actionParams.multiContainerConfigFile)) {
103+
if (!!actionParams.multiContainerConfigFile && (0, packageUtility_1.exist)(actionParams.multiContainerConfigFile)) {
87104
let stats = fs.statSync(actionParams.multiContainerConfigFile);
88105
if (!stats.isFile()) {
89106
throw new Error("Docker-compose file path is incorrect.");

lib/ActionInputValidator/ValidatorFactory.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
1212
return (mod && mod.__esModule) ? mod : { "default": mod };
1313
};
1414
Object.defineProperty(exports, "__esModule", { value: true });
15+
exports.ValidatorFactory = void 0;
1516
const actionparameters_1 = require("../actionparameters");
1617
const AzureResourceFilterUtility_1 = require("azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility");
1718
const BaseWebAppDeploymentProvider_1 = require("../DeploymentProvider/Providers/BaseWebAppDeploymentProvider");
@@ -39,7 +40,7 @@ class ValidatorFactory {
3940
}
4041
else if (type == BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.SPN) {
4142
// app-name is required to get resource details
42-
Validations_1.appNameIsRequired(actionParams.appName);
43+
(0, Validations_1.appNameIsRequired)(actionParams.appName);
4344
yield this.getResourceDetails(actionParams);
4445
if (!!actionParams.isLinux) {
4546
if (!!actionParams.images || !!actionParams.multiContainerConfigFile) {

lib/DeploymentProvider/DeploymentProviderFactory.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.DeploymentProviderFactory = void 0;
34
const actionparameters_1 = require("../actionparameters");
45
const BaseWebAppDeploymentProvider_1 = require("./Providers/BaseWebAppDeploymentProvider");
56
const WebAppContainerDeployment_1 = require("./Providers/WebAppContainerDeployment");

lib/DeploymentProvider/Providers/BaseWebAppDeploymentProvider.js

+26-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
var desc = Object.getOwnPropertyDescriptor(m, k);
5+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6+
desc = { enumerable: true, get: function() { return m[k]; } };
7+
}
8+
Object.defineProperty(o, k2, desc);
9+
}) : (function(o, m, k, k2) {
10+
if (k2 === undefined) k2 = k;
11+
o[k2] = m[k];
12+
}));
13+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14+
Object.defineProperty(o, "default", { enumerable: true, value: v });
15+
}) : function(o, v) {
16+
o["default"] = v;
17+
});
18+
var __importStar = (this && this.__importStar) || function (mod) {
19+
if (mod && mod.__esModule) return mod;
20+
var result = {};
21+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22+
__setModuleDefault(result, mod);
23+
return result;
24+
};
225
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
326
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
427
return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,14 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
831
step((generator = generator.apply(thisArg, _arguments || [])).next());
932
});
1033
};
11-
var __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
var result = {};
14-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
17-
};
1834
Object.defineProperty(exports, "__esModule", { value: true });
35+
exports.DEPLOYMENT_PROVIDER_TYPES = exports.BaseWebAppDeploymentProvider = void 0;
1936
const core = __importStar(require("@actions/core"));
2037
const PublishProfile_1 = require("../../Utilities/PublishProfile");
2138
const actionparameters_1 = require("../../actionparameters");
@@ -45,7 +62,7 @@ class BaseWebAppDeploymentProvider {
4562
UpdateDeploymentStatus(isDeploymentSuccess) {
4663
return __awaiter(this, void 0, void 0, function* () {
4764
if (!!this.appService) {
48-
yield AnnotationUtility_1.addAnnotation(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
65+
yield (0, AnnotationUtility_1.addAnnotation)(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
4966
}
5067
this.activeDeploymentID = yield this.kuduServiceUtility.updateDeploymentStatus(isDeploymentSuccess, null, { 'type': 'Deployment', slotName: this.actionParams.slotName });
5168
core.debug('Active DeploymentId :' + this.activeDeploymentID);
@@ -79,4 +96,4 @@ var DEPLOYMENT_PROVIDER_TYPES;
7996
(function (DEPLOYMENT_PROVIDER_TYPES) {
8097
DEPLOYMENT_PROVIDER_TYPES[DEPLOYMENT_PROVIDER_TYPES["SPN"] = 0] = "SPN";
8198
DEPLOYMENT_PROVIDER_TYPES[DEPLOYMENT_PROVIDER_TYPES["PUBLISHPROFILE"] = 1] = "PUBLISHPROFILE";
82-
})(DEPLOYMENT_PROVIDER_TYPES = exports.DEPLOYMENT_PROVIDER_TYPES || (exports.DEPLOYMENT_PROVIDER_TYPES = {}));
99+
})(DEPLOYMENT_PROVIDER_TYPES || (exports.DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES = {}));

lib/DeploymentProvider/Providers/PublishProfileWebAppContainerDeploymentProvider.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
12+
exports.PublishProfileWebAppContainerDeploymentProvider = void 0;
1213
const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider");
1314
class PublishProfileWebAppContainerDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider {
1415
DeployWebAppStep() {

lib/DeploymentProvider/Providers/WebAppContainerDeployment.js

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
99
});
1010
};
1111
Object.defineProperty(exports, "__esModule", { value: true });
12+
exports.WebAppContainerDeploymentProvider = void 0;
1213
const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider");
1314
const ContainerDeploymentUtility_1 = require("azure-actions-appservice-rest/Utilities/ContainerDeploymentUtility");
1415
class WebAppContainerDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider {

lib/DeploymentProvider/Providers/WebAppDeploymentProvider.js

+25-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11
"use strict";
2+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3+
if (k2 === undefined) k2 = k;
4+
var desc = Object.getOwnPropertyDescriptor(m, k);
5+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6+
desc = { enumerable: true, get: function() { return m[k]; } };
7+
}
8+
Object.defineProperty(o, k2, desc);
9+
}) : (function(o, m, k, k2) {
10+
if (k2 === undefined) k2 = k;
11+
o[k2] = m[k];
12+
}));
13+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14+
Object.defineProperty(o, "default", { enumerable: true, value: v });
15+
}) : function(o, v) {
16+
o["default"] = v;
17+
});
18+
var __importStar = (this && this.__importStar) || function (mod) {
19+
if (mod && mod.__esModule) return mod;
20+
var result = {};
21+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22+
__setModuleDefault(result, mod);
23+
return result;
24+
};
225
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
326
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
427
return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,14 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
831
step((generator = generator.apply(thisArg, _arguments || [])).next());
932
});
1033
};
11-
var __importStar = (this && this.__importStar) || function (mod) {
12-
if (mod && mod.__esModule) return mod;
13-
var result = {};
14-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
15-
result["default"] = mod;
16-
return result;
17-
};
1834
Object.defineProperty(exports, "__esModule", { value: true });
35+
exports.WebAppDeploymentProvider = void 0;
1936
const core = __importStar(require("@actions/core"));
2037
const utility = __importStar(require("azure-actions-utility/utility.js"));
2138
const zipUtility = __importStar(require("azure-actions-utility/ziputility.js"));
@@ -79,7 +96,7 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
7996
UpdateDeploymentStatus(isDeploymentSuccess) {
8097
return __awaiter(this, void 0, void 0, function* () {
8198
if (!!this.appService) {
82-
yield AnnotationUtility_1.addAnnotation(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
99+
yield (0, AnnotationUtility_1.addAnnotation)(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
83100
}
84101
console.log('App Service Application URL: ' + this.applicationURL);
85102
core.setOutput('webapp-url', this.applicationURL);

lib/RuntimeConstants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Object.defineProperty(exports, "__esModule", { value: true });
33
class RuntimeConstants {
44
}
5-
exports.default = RuntimeConstants;
65
RuntimeConstants.system = "system";
76
RuntimeConstants.osName = "os_name";
87
RuntimeConstants.Windows = "Windows";
98
RuntimeConstants.Unix = "Unix";
9+
exports.default = RuntimeConstants;

lib/Utilities/PublishProfile.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
1212
return (mod && mod.__esModule) ? mod : { "default": mod };
1313
};
1414
Object.defineProperty(exports, "__esModule", { value: true });
15+
exports.PublishProfile = void 0;
1516
var core = require("@actions/core");
1617
const actions_secret_parser_1 = require("actions-secret-parser");
1718
const azure_app_kudu_service_1 = require("azure-actions-appservice-rest/Kudu/azure-app-kudu-service");

0 commit comments

Comments
 (0)