Skip to content

Commit

Permalink
Merge pull request #418 from Azure/shilpirachna1/update-nodeversion-r…
Browse files Browse the repository at this point in the history
…elv3

Updated node version to 20 as node 16 is deprecated
  • Loading branch information
surenderssm authored Apr 8, 2024
2 parents b2f8793 + 995019b commit de617f4
Show file tree
Hide file tree
Showing 7,811 changed files with 901,122 additions and 1,345,400 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ branding:
icon: 'webapp.svg'
color: 'blue'
runs:
using: 'node16'
using: 'node20'
main: 'lib/main.js'
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublishProfileContainerWebAppValidator = void 0;
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class PublishProfileContainerWebAppValidator {
validate() {
return __awaiter(this, void 0, void 0, function* () {
const actionParams = actionparameters_1.ActionParameters.getActionParams();
Validations_1.packageNotAllowed(actionParams.packageInput);
Validations_1.multiContainerNotAllowed(actionParams.multiContainerConfigFile);
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
Validations_1.validateAppDetails();
Validations_1.validateSingleContainerInputs();
(0, Validations_1.packageNotAllowed)(actionParams.packageInput);
(0, Validations_1.multiContainerNotAllowed)(actionParams.multiContainerConfigFile);
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
(0, Validations_1.validateAppDetails)();
(0, Validations_1.validateSingleContainerInputs)();
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublishProfileWebAppValidator = void 0;
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class PublishProfileWebAppValidator {
validate() {
return __awaiter(this, void 0, void 0, function* () {
let actionParams = actionparameters_1.ActionParameters.getActionParams();
Validations_1.containerInputsNotAllowed(actionParams.images, actionParams.multiContainerConfigFile, true);
Validations_1.validateAppDetails();
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
yield Validations_1.validatePackageInput();
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile, true);
(0, Validations_1.validateAppDetails)();
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
yield (0, Validations_1.validatePackageInput)();
});
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpnLinuxContainerWebAppValidator = void 0;
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class SpnLinuxContainerWebAppValidator {
validate() {
let actionParams = actionparameters_1.ActionParameters.getActionParams();
Validations_1.packageNotAllowed(actionParams.packageInput);
Validations_1.validateContainerInputs();
(0, Validations_1.packageNotAllowed)(actionParams.packageInput);
(0, Validations_1.validateContainerInputs)();
}
}
exports.SpnLinuxContainerWebAppValidator = SpnLinuxContainerWebAppValidator;
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpnLinuxWebAppValidator = void 0;
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class SpnLinuxWebAppValidator {
validate() {
return __awaiter(this, void 0, void 0, function* () {
let actionParams = actionparameters_1.ActionParameters.getActionParams();
Validations_1.containerInputsNotAllowed(actionParams.images, actionParams.multiContainerConfigFile);
yield Validations_1.validatePackageInput();
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile);
yield (0, Validations_1.validatePackageInput)();
});
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpnWindowsContainerWebAppValidator = void 0;
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class SpnWindowsContainerWebAppValidator {
validate() {
let actionParams = actionparameters_1.ActionParameters.getActionParams();
Validations_1.packageNotAllowed(actionParams.packageInput);
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
Validations_1.multiContainerNotAllowed(actionParams.multiContainerConfigFile);
Validations_1.validateContainerInputs();
(0, Validations_1.packageNotAllowed)(actionParams.packageInput);
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
(0, Validations_1.multiContainerNotAllowed)(actionParams.multiContainerConfigFile);
(0, Validations_1.validateContainerInputs)();
}
}
exports.SpnWindowsContainerWebAppValidator = SpnWindowsContainerWebAppValidator;
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpnWindowsWebAppValidator = void 0;
const Validations_1 = require("../Validations");
const actionparameters_1 = require("../../actionparameters");
class SpnWindowsWebAppValidator {
validate() {
return __awaiter(this, void 0, void 0, function* () {
let actionParams = actionparameters_1.ActionParameters.getActionParams();
Validations_1.containerInputsNotAllowed(actionParams.images, actionParams.multiContainerConfigFile);
Validations_1.startupCommandNotAllowed(actionParams.startupCommand);
yield Validations_1.validatePackageInput();
(0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile);
(0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand);
yield (0, Validations_1.validatePackageInput)();
});
}
}
Expand Down
33 changes: 25 additions & 8 deletions lib/ActionInputValidator/Validations.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -8,14 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.validatePackageInput = exports.validateContainerInputs = exports.validateSingleContainerInputs = exports.multiContainerNotAllowed = exports.packageNotAllowed = exports.startupCommandNotAllowed = exports.validateAppDetails = exports.containerInputsNotAllowed = exports.appNameIsRequired = void 0;
const core = __importStar(require("@actions/core"));
const packageUtility_1 = require("azure-actions-utility/packageUtility");
const PublishProfile_1 = require("../Utilities/PublishProfile");
Expand Down Expand Up @@ -83,7 +100,7 @@ exports.validateSingleContainerInputs = validateSingleContainerInputs;
function validateContainerInputs() {
let actionParams = actionparameters_1.ActionParameters.getActionParams();
actionParams.isMultiContainer = false;
if (!!actionParams.multiContainerConfigFile && packageUtility_1.exist(actionParams.multiContainerConfigFile)) {
if (!!actionParams.multiContainerConfigFile && (0, packageUtility_1.exist)(actionParams.multiContainerConfigFile)) {
let stats = fs.statSync(actionParams.multiContainerConfigFile);
if (!stats.isFile()) {
throw new Error("Docker-compose file path is incorrect.");
Expand Down
3 changes: 2 additions & 1 deletion lib/ActionInputValidator/ValidatorFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValidatorFactory = void 0;
const actionparameters_1 = require("../actionparameters");
const AzureResourceFilterUtility_1 = require("azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility");
const BaseWebAppDeploymentProvider_1 = require("../DeploymentProvider/Providers/BaseWebAppDeploymentProvider");
Expand Down Expand Up @@ -39,7 +40,7 @@ class ValidatorFactory {
}
else if (type == BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.SPN) {
// app-name is required to get resource details
Validations_1.appNameIsRequired(actionParams.appName);
(0, Validations_1.appNameIsRequired)(actionParams.appName);
yield this.getResourceDetails(actionParams);
if (!!actionParams.isLinux) {
if (!!actionParams.images || !!actionParams.multiContainerConfigFile) {
Expand Down
1 change: 1 addition & 0 deletions lib/DeploymentProvider/DeploymentProviderFactory.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeploymentProviderFactory = void 0;
const actionparameters_1 = require("../actionparameters");
const BaseWebAppDeploymentProvider_1 = require("./Providers/BaseWebAppDeploymentProvider");
const WebAppContainerDeployment_1 = require("./Providers/WebAppContainerDeployment");
Expand Down
35 changes: 26 additions & 9 deletions lib/DeploymentProvider/Providers/BaseWebAppDeploymentProvider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -8,14 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEPLOYMENT_PROVIDER_TYPES = exports.BaseWebAppDeploymentProvider = void 0;
const core = __importStar(require("@actions/core"));
const PublishProfile_1 = require("../../Utilities/PublishProfile");
const actionparameters_1 = require("../../actionparameters");
Expand Down Expand Up @@ -45,7 +62,7 @@ class BaseWebAppDeploymentProvider {
UpdateDeploymentStatus(isDeploymentSuccess) {
return __awaiter(this, void 0, void 0, function* () {
if (!!this.appService) {
yield AnnotationUtility_1.addAnnotation(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
yield (0, AnnotationUtility_1.addAnnotation)(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
}
this.activeDeploymentID = yield this.kuduServiceUtility.updateDeploymentStatus(isDeploymentSuccess, null, { 'type': 'Deployment', slotName: this.actionParams.slotName });
core.debug('Active DeploymentId :' + this.activeDeploymentID);
Expand Down Expand Up @@ -79,4 +96,4 @@ var DEPLOYMENT_PROVIDER_TYPES;
(function (DEPLOYMENT_PROVIDER_TYPES) {
DEPLOYMENT_PROVIDER_TYPES[DEPLOYMENT_PROVIDER_TYPES["SPN"] = 0] = "SPN";
DEPLOYMENT_PROVIDER_TYPES[DEPLOYMENT_PROVIDER_TYPES["PUBLISHPROFILE"] = 1] = "PUBLISHPROFILE";
})(DEPLOYMENT_PROVIDER_TYPES = exports.DEPLOYMENT_PROVIDER_TYPES || (exports.DEPLOYMENT_PROVIDER_TYPES = {}));
})(DEPLOYMENT_PROVIDER_TYPES || (exports.DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES = {}));
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublishProfileWebAppContainerDeploymentProvider = void 0;
const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider");
class PublishProfileWebAppContainerDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider {
DeployWebAppStep() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebAppContainerDeploymentProvider = void 0;
const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider");
const ContainerDeploymentUtility_1 = require("azure-actions-appservice-rest/Utilities/ContainerDeploymentUtility");
class WebAppContainerDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider {
Expand Down
33 changes: 25 additions & 8 deletions lib/DeploymentProvider/Providers/WebAppDeploymentProvider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
Expand All @@ -8,14 +31,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WebAppDeploymentProvider = void 0;
const core = __importStar(require("@actions/core"));
const utility = __importStar(require("azure-actions-utility/utility.js"));
const zipUtility = __importStar(require("azure-actions-utility/ziputility.js"));
Expand Down Expand Up @@ -84,7 +101,7 @@ class WebAppDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebApp
UpdateDeploymentStatus(isDeploymentSuccess) {
return __awaiter(this, void 0, void 0, function* () {
if (!!this.appService) {
yield AnnotationUtility_1.addAnnotation(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
yield (0, AnnotationUtility_1.addAnnotation)(this.actionParams.endpoint, this.appService, isDeploymentSuccess);
}
console.log('App Service Application URL: ' + this.applicationURL);
core.setOutput('webapp-url', this.applicationURL);
Expand Down
2 changes: 1 addition & 1 deletion lib/RuntimeConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
class RuntimeConstants {
}
exports.default = RuntimeConstants;
RuntimeConstants.system = "system";
RuntimeConstants.osName = "os_name";
RuntimeConstants.Windows = "Windows";
RuntimeConstants.Unix = "Unix";
exports.default = RuntimeConstants;
1 change: 1 addition & 0 deletions lib/Utilities/PublishProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PublishProfile = void 0;
var core = require("@actions/core");
const actions_secret_parser_1 = require("actions-secret-parser");
const azure_app_kudu_service_1 = require("azure-actions-appservice-rest/Kudu/azure-app-kudu-service");
Expand Down
Loading

0 comments on commit de617f4

Please sign in to comment.