diff --git a/__tests__/ActionInputValidator/ValidatorFactory.test.ts b/__tests__/ActionInputValidator/ValidatorFactory.test.ts index 9009f6342..ffd293c99 100644 --- a/__tests__/ActionInputValidator/ValidatorFactory.test.ts +++ b/__tests__/ActionInputValidator/ValidatorFactory.test.ts @@ -26,8 +26,8 @@ describe('Test Validator Factory', () => { jest.spyOn(PublishProfile, 'getPublishProfile').mockImplementation(() => PublishProfile.prototype); jest.spyOn(PublishProfile.prototype, 'getAppOS').mockImplementation(async() => 'unix'); - let validator = await ValidatorFactory.getValidator(type); - expect(validator).toBeInstanceOf(PublishProfileWebAppValidator); + let validators = await ValidatorFactory.getValidator(type); + expect(validators[0]).toBeInstanceOf(PublishProfileWebAppValidator); }); it("Get Container Validator for Publish Profile auth flow", async() => { @@ -42,8 +42,8 @@ describe('Test Validator Factory', () => { jest.spyOn(PublishProfile, 'getPublishProfile').mockImplementation(() => PublishProfile.prototype); jest.spyOn(PublishProfile.prototype, 'getAppOS').mockImplementation(async() => 'unix'); - let validator = await ValidatorFactory.getValidator(type); - expect(validator).toBeInstanceOf(PublishProfileContainerWebAppValidator); + let validators = await ValidatorFactory.getValidator(type); + expect(validators[0]).toBeInstanceOf(PublishProfileContainerWebAppValidator); }); }); @@ -70,8 +70,8 @@ describe('Test Validator Factory', () => { }; }); - let validator = await ValidatorFactory.getValidator(type); - expect(validator).toBeInstanceOf(SpnLinuxContainerWebAppValidator); + let validators = await ValidatorFactory.getValidator(type); + expect(validators[0]).toBeInstanceOf(SpnLinuxContainerWebAppValidator); }); it("Get Linux/Kube Code Validator for SPN auth flow", async() => { @@ -90,8 +90,8 @@ describe('Test Validator Factory', () => { }; }); - let validator = await ValidatorFactory.getValidator(type); - expect(validator).toBeInstanceOf(SpnLinuxWebAppValidator); + let validators = await ValidatorFactory.getValidator(type); + expect(validators[0]).toBeInstanceOf(SpnLinuxWebAppValidator); }); it("Get Windows Container Validator for SPN auth flow", async() => { @@ -111,8 +111,8 @@ describe('Test Validator Factory', () => { }; }); - let validator = await ValidatorFactory.getValidator(type); - expect(validator).toBeInstanceOf(SpnWindowsContainerWebAppValidator); + let validators = await ValidatorFactory.getValidator(type); + expect(validators[0]).toBeInstanceOf(SpnWindowsContainerWebAppValidator); }); it("Get Windows Code Validator for SPN auth flow", async() => { @@ -131,8 +131,8 @@ describe('Test Validator Factory', () => { }; }); - let validator = await ValidatorFactory.getValidator(type); - expect(validator).toBeInstanceOf(SpnWindowsWebAppValidator); + let validators = await ValidatorFactory.getValidator(type); + expect(validators[0]).toBeInstanceOf(SpnWindowsWebAppValidator); }); }); diff --git a/__tests__/DeploymentProvider/DeploymentProviderFactory.test.ts b/__tests__/DeploymentProvider/DeploymentProviderFactory.test.ts index d2c3584db..8309e752b 100644 --- a/__tests__/DeploymentProvider/DeploymentProviderFactory.test.ts +++ b/__tests__/DeploymentProvider/DeploymentProviderFactory.test.ts @@ -19,8 +19,8 @@ describe('Test Deployment Provider Factory', () => { it("Get Code Deployment Provider for Publish Profile auth flow", async() => { let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE; - let provider = await DeploymentProviderFactory.getDeploymentProvider(type); - expect(provider).toBeInstanceOf(WebAppDeploymentProvider); + let providers = await DeploymentProviderFactory.getDeploymentProvider(type); + expect(providers[0]).toBeInstanceOf(WebAppDeploymentProvider); }); it("Get Container Deployment Provider for Publish Profile auth flow", async() => { @@ -32,8 +32,8 @@ describe('Test Deployment Provider Factory', () => { let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE; - let provider = await DeploymentProviderFactory.getDeploymentProvider(type); - expect(provider).toBeInstanceOf(PublishProfileWebAppContainerDeploymentProvider); + let providers = await DeploymentProviderFactory.getDeploymentProvider(type); + expect(providers[0]).toBeInstanceOf(PublishProfileWebAppContainerDeploymentProvider); }); }); @@ -48,8 +48,8 @@ describe('Test Deployment Provider Factory', () => { let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.SPN; - let provider = await DeploymentProviderFactory.getDeploymentProvider(type); - expect(provider).toBeInstanceOf(WebAppDeploymentProvider); + let providers = await DeploymentProviderFactory.getDeploymentProvider(type); + expect(providers[0]).toBeInstanceOf(WebAppDeploymentProvider); }); it("Get Container Deployment Provider for SPN auth flow", async() => { @@ -61,8 +61,8 @@ describe('Test Deployment Provider Factory', () => { let type: DEPLOYMENT_PROVIDER_TYPES = DEPLOYMENT_PROVIDER_TYPES.SPN; - let provider = await DeploymentProviderFactory.getDeploymentProvider(type); - expect(provider).toBeInstanceOf(WebAppContainerDeploymentProvider); + let providers = await DeploymentProviderFactory.getDeploymentProvider(type); + expect(providers[0]).toBeInstanceOf(WebAppContainerDeploymentProvider); }); }); diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index d2caff0c3..33d2dacca 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -35,9 +35,9 @@ describe('Test azure-webapps-deploy', () => { } return ''; }); - let getValidatorFactorySpy = jest.spyOn(ValidatorFactory, 'getValidator').mockImplementation(async _type => new PublishProfileWebAppValidator()); + let getValidatorFactorySpy = jest.spyOn(ValidatorFactory, 'getValidator').mockImplementation(async _type => [new PublishProfileWebAppValidator()]); let ValidatorFactoryValidateSpy = jest.spyOn(PublishProfileWebAppValidator.prototype, 'validate'); - let getDeploymentProviderSpy = jest.spyOn(DeploymentProviderFactory, 'getDeploymentProvider').mockImplementation(type => new WebAppDeploymentProvider(type)); + let getDeploymentProviderSpy = jest.spyOn(DeploymentProviderFactory, 'getDeploymentProvider').mockImplementation(type => [new WebAppDeploymentProvider(type)]); let deployWebAppStepSpy = jest.spyOn(WebAppDeploymentProvider.prototype, 'DeployWebAppStep'); let updateDeploymentStatusSpy = jest.spyOn(WebAppDeploymentProvider.prototype, 'UpdateDeploymentStatus'); diff --git a/action.yml b/action.yml index f5d2be5a9..d21392e56 100644 --- a/action.yml +++ b/action.yml @@ -40,7 +40,10 @@ inputs: restart: description: 'Restart the app service after deployment' required: false - + sitecontainers-config: + description: 'Applies to Sitecontainers, containes a list of siteContainer specs' + required: false + outputs: webapp-url: description: 'URL to work with your webapp' diff --git a/lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js b/lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js index eadc8d5d9..3b9213c69 100644 --- a/lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js +++ b/lib/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.js @@ -19,6 +19,7 @@ class PublishProfileContainerWebAppValidator { (0, Validations_1.packageNotAllowed)(actionParams.packageInput); (0, Validations_1.multiContainerNotAllowed)(actionParams.multiContainerConfigFile); (0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand); + (0, Validations_1.siteContainersConfigNotAllowed)(actionParams.siteContainers); (0, Validations_1.validateAppDetails)(); (0, Validations_1.validateSingleContainerInputs)(); }); diff --git a/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppSiteContainersValidator.js b/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppSiteContainersValidator.js new file mode 100644 index 000000000..ff511bddd --- /dev/null +++ b/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppSiteContainersValidator.js @@ -0,0 +1,20 @@ +"use strict"; +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) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PublishProfileWebAppSiteContainersValidator = void 0; +class PublishProfileWebAppSiteContainersValidator { + validate() { + return __awaiter(this, void 0, void 0, function* () { + throw new Error("publish-profile is not supported for Site Containers scenario"); + }); + } +} +exports.PublishProfileWebAppSiteContainersValidator = PublishProfileWebAppSiteContainersValidator; diff --git a/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.js b/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.js index 77174b4d8..37531c529 100644 --- a/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.js +++ b/lib/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.js @@ -19,6 +19,7 @@ class PublishProfileWebAppValidator { (0, Validations_1.containerInputsNotAllowed)(actionParams.images, actionParams.multiContainerConfigFile, true); (0, Validations_1.validateAppDetails)(); (0, Validations_1.startupCommandNotAllowed)(actionParams.startupCommand); + (0, Validations_1.siteContainersConfigNotAllowed)(actionParams.siteContainers); yield (0, Validations_1.validatePackageInput)(); }); } diff --git a/lib/ActionInputValidator/ActionValidators/SpnWebAppSiteContainersValidator.js b/lib/ActionInputValidator/ActionValidators/SpnWebAppSiteContainersValidator.js new file mode 100644 index 000000000..46f54d856 --- /dev/null +++ b/lib/ActionInputValidator/ActionValidators/SpnWebAppSiteContainersValidator.js @@ -0,0 +1,21 @@ +"use strict"; +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) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SpnWebAppSiteContainersValidator = void 0; +const Validations_1 = require("../Validations"); +class SpnWebAppSiteContainersValidator { + validate() { + return __awaiter(this, void 0, void 0, function* () { + (0, Validations_1.validateSiteContainersInputs)(); + }); + } +} +exports.SpnWebAppSiteContainersValidator = SpnWebAppSiteContainersValidator; diff --git a/lib/ActionInputValidator/Validations.js b/lib/ActionInputValidator/Validations.js index 65f4b7a36..6cc546713 100644 --- a/lib/ActionInputValidator/Validations.js +++ b/lib/ActionInputValidator/Validations.js @@ -51,6 +51,8 @@ exports.multiContainerNotAllowed = multiContainerNotAllowed; exports.validateSingleContainerInputs = validateSingleContainerInputs; exports.validateContainerInputs = validateContainerInputs; exports.validatePackageInput = validatePackageInput; +exports.siteContainersConfigNotAllowed = siteContainersConfigNotAllowed; +exports.validateSiteContainersInputs = validateSiteContainersInputs; const core = __importStar(require("@actions/core")); const packageUtility_1 = require("azure-actions-utility/packageUtility"); const PublishProfile_1 = require("../Utilities/PublishProfile"); @@ -146,3 +148,16 @@ function validatePackageInput() { } }); } +// Error if Sitecontainers configuration is provided +function siteContainersConfigNotAllowed(siteContainers) { + if (!!siteContainers) { + throw new Error("SiteContainers not valid input for this web app."); + } +} +// validate Sitecontainers inputs +function validateSiteContainersInputs() { + const actionParams = actionparameters_1.ActionParameters.getActionParams(); + if (!actionParams.siteContainers || actionParams.siteContainers.length === 0) { + throw new Error("Site containers not provided."); + } +} diff --git a/lib/ActionInputValidator/ValidatorFactory.js b/lib/ActionInputValidator/ValidatorFactory.js index d15b01453..14e4ec4dd 100644 --- a/lib/ActionInputValidator/ValidatorFactory.js +++ b/lib/ActionInputValidator/ValidatorFactory.js @@ -59,14 +59,20 @@ const SpnWindowsWebAppValidator_1 = require("./ActionValidators/SpnWindowsWebApp const Validations_1 = require("./Validations"); const PublishProfile_1 = require("../Utilities/PublishProfile"); const RuntimeConstants_1 = __importDefault(require("../RuntimeConstants")); +const SpnWebAppSiteContainersValidator_1 = require("./ActionValidators/SpnWebAppSiteContainersValidator"); +const PublishProfileWebAppSiteContainersValidator_1 = require("./ActionValidators/PublishProfileWebAppSiteContainersValidator"); +const azure_app_service_1 = require("azure-actions-appservice-rest/Arm/azure-app-service"); class ValidatorFactory { static getValidator(type) { return __awaiter(this, void 0, void 0, function* () { let actionParams = actionparameters_1.ActionParameters.getActionParams(); if (type === BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE) { - if (!!actionParams.images) { + if (!!actionParams.blessedAppSitecontainers || !!actionParams.siteContainers) { + return [new PublishProfileWebAppSiteContainersValidator_1.PublishProfileWebAppSiteContainersValidator()]; + } + else if (!!actionParams.images) { yield this.setResourceDetails(actionParams); - return new PublishProfileContainerWebAppValidator_1.PublishProfileContainerWebAppValidator(); + return [new PublishProfileContainerWebAppValidator_1.PublishProfileContainerWebAppValidator()]; } else { try { @@ -75,7 +81,7 @@ class ValidatorFactory { catch (error) { core.warning(`Failed to set resource details: ${error.message}`); } - return new PublishProfileWebAppValidator_1.PublishProfileWebAppValidator(); + return [new PublishProfileWebAppValidator_1.PublishProfileWebAppValidator()]; } } else if (type == BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.SPN) { @@ -83,19 +89,25 @@ class ValidatorFactory { (0, Validations_1.appNameIsRequired)(actionParams.appName); yield this.getResourceDetails(actionParams); if (!!actionParams.isLinux) { - if (!!actionParams.images || !!actionParams.multiContainerConfigFile) { - return new SpnLinuxContainerWebAppValidator_1.SpnLinuxContainerWebAppValidator(); + if (!!actionParams.siteContainers) { + if (yield this.isBlessedSitecontainerApp(actionParams)) { + return [new SpnLinuxWebAppValidator_1.SpnLinuxWebAppValidator(), new SpnWebAppSiteContainersValidator_1.SpnWebAppSiteContainersValidator()]; + } + return [new SpnWebAppSiteContainersValidator_1.SpnWebAppSiteContainersValidator()]; + } + else if (!!actionParams.images || !!actionParams.multiContainerConfigFile) { + return [new SpnLinuxContainerWebAppValidator_1.SpnLinuxContainerWebAppValidator()]; } else { - return new SpnLinuxWebAppValidator_1.SpnLinuxWebAppValidator(); + return [new SpnLinuxWebAppValidator_1.SpnLinuxWebAppValidator()]; } } else { if (!!actionParams.images) { - return new SpnWindowsContainerWebAppValidator_1.SpnWindowsContainerWebAppValidator(); + return [new SpnWindowsContainerWebAppValidator_1.SpnWindowsContainerWebAppValidator()]; } else { - return new SpnWindowsWebAppValidator_1.SpnWindowsWebAppValidator(); + return [new SpnWindowsWebAppValidator_1.SpnWindowsWebAppValidator()]; } } } @@ -121,5 +133,17 @@ class ValidatorFactory { actionParams.isLinux = appOS.includes(RuntimeConstants_1.default.Unix) || appOS.includes(RuntimeConstants_1.default.Unix.toLowerCase()); }); } + static isBlessedSitecontainerApp(actionParams) { + return __awaiter(this, void 0, void 0, function* () { + var _a, _b; + const appService = new azure_app_service_1.AzureAppService(actionParams.endpoint, actionParams.resourceGroupName, actionParams.appName, actionParams.slotName); + let config = yield appService.getConfiguration(); + core.debug(`LinuxFxVersion of app is: ${config.properties.linuxFxVersion}`); + actionParams.blessedAppSitecontainers = (((_a = config.properties.linuxFxVersion) === null || _a === void 0 ? void 0 : _a.startsWith("DOCKER|")) !== true + && ((_b = config.properties.linuxFxVersion) === null || _b === void 0 ? void 0 : _b.startsWith("COMPOSE|")) !== true + && config.properties.linuxFxVersion !== "SITECONTAINERS"); + return actionParams.blessedAppSitecontainers; + }); + } } exports.ValidatorFactory = ValidatorFactory; diff --git a/lib/DeploymentProvider/DeploymentProviderFactory.js b/lib/DeploymentProvider/DeploymentProviderFactory.js index b41de98ae..fc3f117c0 100644 --- a/lib/DeploymentProvider/DeploymentProviderFactory.js +++ b/lib/DeploymentProvider/DeploymentProviderFactory.js @@ -6,22 +6,29 @@ const BaseWebAppDeploymentProvider_1 = require("./Providers/BaseWebAppDeployment const WebAppContainerDeployment_1 = require("./Providers/WebAppContainerDeployment"); const WebAppDeploymentProvider_1 = require("./Providers/WebAppDeploymentProvider"); const PublishProfileWebAppContainerDeploymentProvider_1 = require("./Providers/PublishProfileWebAppContainerDeploymentProvider"); +const WebAppSiteContainersDeploymentProvider_1 = require("./Providers/WebAppSiteContainersDeploymentProvider"); class DeploymentProviderFactory { static getDeploymentProvider(type) { if (type === BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE) { if (!!actionparameters_1.ActionParameters.getActionParams().images) { - return new PublishProfileWebAppContainerDeploymentProvider_1.PublishProfileWebAppContainerDeploymentProvider(type); + return [new PublishProfileWebAppContainerDeploymentProvider_1.PublishProfileWebAppContainerDeploymentProvider(type)]; } else { - return new WebAppDeploymentProvider_1.WebAppDeploymentProvider(type); + return [new WebAppDeploymentProvider_1.WebAppDeploymentProvider(type)]; } } else if (type == BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.SPN) { - if (!!actionparameters_1.ActionParameters.getActionParams().images || (!!actionparameters_1.ActionParameters.getActionParams().isLinux && !!actionparameters_1.ActionParameters.getActionParams().multiContainerConfigFile)) { - return new WebAppContainerDeployment_1.WebAppContainerDeploymentProvider(type); + if (!!actionparameters_1.ActionParameters.getActionParams().blessedAppSitecontainers) { + return [new WebAppDeploymentProvider_1.WebAppDeploymentProvider(type), new WebAppSiteContainersDeploymentProvider_1.WebAppSiteContainersDeploymentProvider(type)]; + } + else if (!!actionparameters_1.ActionParameters.getActionParams().siteContainers) { + return [new WebAppSiteContainersDeploymentProvider_1.WebAppSiteContainersDeploymentProvider(type)]; + } + else if (!!actionparameters_1.ActionParameters.getActionParams().images || (!!actionparameters_1.ActionParameters.getActionParams().isLinux && !!actionparameters_1.ActionParameters.getActionParams().multiContainerConfigFile)) { + return [new WebAppContainerDeployment_1.WebAppContainerDeploymentProvider(type)]; } else { - return new WebAppDeploymentProvider_1.WebAppDeploymentProvider(type); + return [new WebAppDeploymentProvider_1.WebAppDeploymentProvider(type)]; } } else { diff --git a/lib/DeploymentProvider/Providers/WebAppSiteContainersDeploymentProvider.js b/lib/DeploymentProvider/Providers/WebAppSiteContainersDeploymentProvider.js new file mode 100644 index 000000000..2cb7df776 --- /dev/null +++ b/lib/DeploymentProvider/Providers/WebAppSiteContainersDeploymentProvider.js @@ -0,0 +1,63 @@ +"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 () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __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) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WebAppSiteContainersDeploymentProvider = void 0; +const BaseWebAppDeploymentProvider_1 = require("./BaseWebAppDeploymentProvider"); +const SiteContainerDeploymentUtility_1 = require("azure-actions-appservice-rest/Utilities/SiteContainerDeploymentUtility"); +const core = __importStar(require("@actions/core")); +class WebAppSiteContainersDeploymentProvider extends BaseWebAppDeploymentProvider_1.BaseWebAppDeploymentProvider { + DeployWebAppStep() { + return __awaiter(this, void 0, void 0, function* () { + let siteContainerDeploymentUtility = new SiteContainerDeploymentUtility_1.SiteContainerDeploymentUtility(this.appService); + let siteContainers = this.actionParams.siteContainers; + core.info("Updating site containers"); + for (let i = 0; i < siteContainers.length; i++) { + let siteContainer = siteContainers[i]; + core.info("updating site container: " + siteContainer.getName); + yield siteContainerDeploymentUtility.updateSiteContainer(siteContainer); + } + }); + } +} +exports.WebAppSiteContainersDeploymentProvider = WebAppSiteContainersDeploymentProvider; diff --git a/lib/actionparameters.js b/lib/actionparameters.js index 06495c463..97e957e90 100644 --- a/lib/actionparameters.js +++ b/lib/actionparameters.js @@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.ActionParameters = exports.appKindMap = exports.WebAppKind = void 0; const core = __importStar(require("@actions/core")); +const SiteContainer_1 = require("azure-actions-appservice-rest/Arm/SiteContainer"); const github = require('@actions/github'); var WebAppKind; (function (WebAppKind) { @@ -71,6 +72,16 @@ class ActionParameters { this._targetPath = core.getInput('target-path'); this._clean = core.getInput('clean'); this._restart = core.getInput('restart'); + // Used for Sitecontainers app. + const siteContainersConfigInput = core.getInput('sitecontainers-config'); + if (siteContainersConfigInput) { + const raw = JSON.parse(siteContainersConfigInput); + this._siteContainers = raw.map(SiteContainer_1.SiteContainer.fromJson); + } + else { + this._siteContainers = null; + } + this._blessedAppSitecontainers = false; } static getActionParams(endpoint) { if (!this.actionparams) { @@ -159,5 +170,17 @@ class ActionParameters { get restart() { return this._restart; } + get siteContainers() { + return this._siteContainers; + } + set siteContainers(siteContainers) { + this._siteContainers = siteContainers; + } + get blessedAppSitecontainers() { + return this._blessedAppSitecontainers; + } + set blessedAppSitecontainers(blessedAppSitecontainers) { + this._blessedAppSitecontainers = blessedAppSitecontainers; + } } exports.ActionParameters = ActionParameters; diff --git a/lib/main.js b/lib/main.js index 772032c8d..438e54438 100644 --- a/lib/main.js +++ b/lib/main.js @@ -71,13 +71,17 @@ function main() { type = BaseWebAppDeploymentProvider_1.DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE; } // Validate action inputs - let validator = yield ValidatorFactory_1.ValidatorFactory.getValidator(type); - yield validator.validate(); - var deploymentProvider = DeploymentProviderFactory_1.DeploymentProviderFactory.getDeploymentProvider(type); - core.debug("Predeployment Step Started"); - yield deploymentProvider.PreDeploymentStep(); - core.debug("Deployment Step Started"); - yield deploymentProvider.DeployWebAppStep(); + let validators = yield ValidatorFactory_1.ValidatorFactory.getValidator(type); + for (const validator of validators) { + yield validator.validate(); + } + var deploymentProviders = DeploymentProviderFactory_1.DeploymentProviderFactory.getDeploymentProvider(type); + for (const provider of deploymentProviders) { + core.info("Predeployment Step Started"); + yield provider.PreDeploymentStep(); + core.info("Deployment Step Started"); + yield provider.DeployWebAppStep(); + } } catch (error) { isDeploymentSuccess = false; @@ -91,8 +95,8 @@ function main() { } } finally { - if (deploymentProvider != null) { - yield deploymentProvider.UpdateDeploymentStatus(isDeploymentSuccess); + if (deploymentProviders != null) { + yield deploymentProviders[0].UpdateDeploymentStatus(isDeploymentSuccess); } // Reset AZURE_HTTP_USER_AGENT core.exportVariable('AZURE_HTTP_USER_AGENT', prefix); diff --git a/package-lock.json b/package-lock.json index 356dbc226..29d9cb5ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,8 @@ "@actions/core": "^1.10.0", "@actions/github": "^4.0.0", "actions-secret-parser": "^1.0.4", - "azure-actions-appservice-rest": "^1.3.16", - "azure-actions-utility": "1.0.3", + "azure-actions-appservice-rest": "^1.3.32", + "azure-actions-utility": "^1.0.3", "azure-actions-webclient": "^1.1.1" }, "devDependencies": { @@ -65,15 +65,6 @@ "tunnel": "0.0.6" } }, - "node_modules/@actions/github/node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, "node_modules/@actions/http-client": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", @@ -84,15 +75,6 @@ "undici": "^5.25.4" } }, - "node_modules/@actions/http-client/node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, "node_modules/@actions/io": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", @@ -169,32 +151,6 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.0.tgz", @@ -212,35 +168,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/generator/node_modules/jsesc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", - "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", - "dev": true, - "license": "MIT", - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", @@ -258,16 +185,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/helper-globals": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", @@ -351,19 +268,35 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.2.tgz", + "integrity": "sha512-/V9771t+EgXz62aCcyofnQhGM8DQACbRhvzKFsXKC9QM+5MadF8ZmIm0crDMaz3+o0h0zXfJnd4EhbYbxsrcFw==", "dev": true, "license": "MIT", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@babel/types": "^7.28.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/parser": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", + "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.0" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", @@ -618,22 +551,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/template/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/traverse": { "version": "7.28.0", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.0.tgz", @@ -653,26 +570,10 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/types": { - "version": "7.28.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.1.tgz", - "integrity": "sha512-x0LvFTekgSX+83TI28Y9wYPUfzrnl2aT5+5QLnO6v7mSJYtEEevuDRN0F0uSHRk1G1IWZC43o00Y0xDDrpBGPQ==", + "version": "7.28.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.2.tgz", + "integrity": "sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==", "dev": true, "license": "MIT", "dependencies": { @@ -740,34 +641,6 @@ "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -844,51 +717,6 @@ } } }, - "node_modules/@jest/core/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/core/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", @@ -932,51 +760,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/expect/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/expect/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jest/fake-timers": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", @@ -1055,52 +838,6 @@ } } }, - "node_modules/@jest/reporters/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", - "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@babel/core": "^7.23.9", - "@babel/parser": "^7.23.9", - "@istanbuljs/schema": "^0.1.3", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@jest/reporters/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@jest/schemas": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", @@ -1425,22 +1162,6 @@ "@types/babel__traverse": "*" } }, - "node_modules/@types/babel__core/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@types/babel__generator": { "version": "7.27.0", "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", @@ -1462,22 +1183,6 @@ "@babel/types": "^7.0.0" } }, - "node_modules/@types/babel__template/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@types/babel__traverse": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", @@ -1576,20 +1281,7 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "license": "ISC" }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-walk/node_modules/acorn": { + "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", @@ -1602,47 +1294,31 @@ "node": ">=0.4.0" } }, - "node_modules/actions-secret-parser": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/actions-secret-parser/-/actions-secret-parser-1.0.4.tgz", - "integrity": "sha512-gDAB8GK2Vj9CN5r97DZlmpxqrMcpAGKGWiIY3hpFhJMieLpl3K3ocVR49/Q4ANaA5a/2wNRE3Qng+x0K8mkmkQ==", + "node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, "license": "MIT", "dependencies": { - "@actions/core": "^1.1.10", - "jsonpath": "^1.0.2", - "xmldom": "^0.1.27", - "xpath": "0.0.27" - } - }, - "node_modules/actions-secret-parser/node_modules/esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "acorn": "^8.11.0" }, "engines": { "node": ">=0.4.0" - } - }, - "node_modules/actions-secret-parser/node_modules/jsonpath": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", - "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + } + }, + "node_modules/actions-secret-parser": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/actions-secret-parser/-/actions-secret-parser-1.0.4.tgz", + "integrity": "sha512-gDAB8GK2Vj9CN5r97DZlmpxqrMcpAGKGWiIY3hpFhJMieLpl3K3ocVR49/Q4ANaA5a/2wNRE3Qng+x0K8mkmkQ==", "license": "MIT", "dependencies": { - "esprima": "1.2.2", - "static-eval": "2.0.2", - "underscore": "1.12.1" + "@actions/core": "^1.1.10", + "jsonpath": "^1.0.2", + "xmldom": "^0.1.27", + "xpath": "0.0.27" } }, - "node_modules/actions-secret-parser/node_modules/underscore": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", - "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", - "license": "MIT" - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -1838,9 +1514,9 @@ } }, "node_modules/azure-actions-appservice-rest": { - "version": "1.3.29", - "resolved": "https://registry.npmjs.org/azure-actions-appservice-rest/-/azure-actions-appservice-rest-1.3.29.tgz", - "integrity": "sha512-UWEyHoBi1ve3hFLeLpfCHKUKR8AIUSABD8F5YK9Zc8nHqFshKNsBIEgE55MvMmmAkV3cynhNJi8/Ns1Cr/ktXw==", + "version": "1.3.32", + "resolved": "https://registry.npmjs.org/azure-actions-appservice-rest/-/azure-actions-appservice-rest-1.3.32.tgz", + "integrity": "sha512-GFj/HuhJCOePbP2YZcouqrt7i2Set2yyJ3mquM7fTnZzJu8uv3eNYNYMS7kEoyRTxSv9EePvEmLPKZOWRgGE+A==", "license": "MIT", "dependencies": { "@actions/core": "^1.1.10", @@ -1860,70 +1536,13 @@ "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", "license": "MIT" }, - "node_modules/azure-actions-appservice-rest/node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "license": "MIT" - }, - "node_modules/azure-actions-appservice-rest/node_modules/copy": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/copy/-/copy-0.3.2.tgz", - "integrity": "sha512-drDFuUZctIuvSuvL9dOF/v5GxrwB1Q8eMIRlYONC0lSMEq+L2xabXP3jme8cQFdDO8cgP8JsuYhQg7JtTwezmg==", - "license": "MIT", - "dependencies": { - "async-each": "^1.0.0", - "bluebird": "^3.4.1", - "extend-shallow": "^2.0.1", - "file-contents": "^0.3.1", - "glob-parent": "^2.0.0", - "graceful-fs": "^4.1.4", - "has-glob": "^0.1.1", - "is-absolute": "^0.2.5", - "lazy-cache": "^2.0.1", - "log-ok": "^0.1.1", - "matched": "^0.4.1", - "mkdirp": "^0.5.1", - "resolve-dir": "^0.1.0", - "to-file": "^0.2.0" - }, - "bin": { - "copy": "bin/cli.js", - "copy-cli": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/azure-actions-appservice-rest/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "license": "MIT", - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/azure-actions-appservice-rest/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/azure-actions-utility": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/azure-actions-utility/-/azure-actions-utility-1.0.3.tgz", - "integrity": "sha512-lLaarW71FBhSEvuN+UEQ4vidLDfcCl67wW6Zu95g+/rgeohRF/5vuVsABLtGmcw7eIjxMoDDfR3SSbBf5rvBKg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/azure-actions-utility/-/azure-actions-utility-1.0.6.tgz", + "integrity": "sha512-JFP7FOorw6u4g6Nuw8zCglztUJ9nJ3dQQT7qRTaLMp4vXIIL8ASnA/2JXQ+aOktO22JA4xu+x4mnZ+WhcMzOoQ==", "license": "MIT", "dependencies": { - "@actions/core": "^1.1.1", + "@actions/core": "^1.1.10", "@actions/io": "^1.0.1", "archiver": "^2.1.1", "decompress-zip": "^0.3.0", @@ -1934,102 +1553,6 @@ "shelljs": "^0.3.0" } }, - "node_modules/azure-actions-utility/node_modules/decompress-zip": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", - "integrity": "sha512-/fy1L4s+4jujqj3kNptWjilFw3E6De8U6XUFvqmh4npN3Vsypm3oT2V0bXcmbBWS+5j5tr4okYaFrOmyZkszEg==", - "license": "MIT", - "dependencies": { - "binary": "^0.3.0", - "graceful-fs": "^4.1.3", - "mkpath": "^0.1.0", - "nopt": "^3.0.1", - "q": "^1.1.2", - "readable-stream": "^1.1.8", - "touch": "0.0.3" - }, - "bin": { - "decompress-zip": "bin/decompress-zip" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/azure-actions-utility/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "license": "MIT" - }, - "node_modules/azure-actions-utility/node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "license": "ISC", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/azure-actions-utility/node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/azure-actions-utility/node_modules/shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha512-Ny0KN4dyT8ZSCE0frtcbAJGoM/HTArpyPkeli1/00aYfm0sbD/Gk/4x7N2DP9QKGpBsiQH7n6rpm1L79RtviEQ==", - "license": "BSD*", - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/azure-actions-utility/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "license": "MIT" - }, - "node_modules/azure-actions-utility/node_modules/touch": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", - "integrity": "sha512-/LQ54KM9rPf3rGXGo2UPQWx3ol242Zg6Whq27H5DEmZhCJo+pm9N5BzRGepO9vTVhYxpXJdcc1+3uaYt9NyeKg==", - "license": "ISC", - "dependencies": { - "nopt": "~1.0.10" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/azure-actions-utility/node_modules/touch/node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "license": "MIT", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "*" - } - }, "node_modules/azure-actions-webclient": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/azure-actions-webclient/-/azure-actions-webclient-1.1.1.tgz", @@ -2085,22 +1608,6 @@ "node": ">=8" } }, - "node_modules/babel-plugin-istanbul/node_modules/@babel/parser": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.0.tgz", - "integrity": "sha512-jVZGvOxOuNSsuQuLRTh13nU0AogFlw32w/MT+LV6D3sP5WdbW61E77RnkbaO2dUvmPAYrBDJXGn5gGS6tH4j8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.28.0" - }, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", @@ -2118,16 +1625,6 @@ "node": ">=8" } }, - "node_modules/babel-plugin-istanbul/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/babel-plugin-jest-hoist": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", @@ -2243,6 +1740,12 @@ "safe-buffer": "^5.1.1" } }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -2638,6 +2141,35 @@ "dev": true, "license": "MIT" }, + "node_modules/copy": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/copy/-/copy-0.3.2.tgz", + "integrity": "sha512-drDFuUZctIuvSuvL9dOF/v5GxrwB1Q8eMIRlYONC0lSMEq+L2xabXP3jme8cQFdDO8cgP8JsuYhQg7JtTwezmg==", + "license": "MIT", + "dependencies": { + "async-each": "^1.0.0", + "bluebird": "^3.4.1", + "extend-shallow": "^2.0.1", + "file-contents": "^0.3.1", + "glob-parent": "^2.0.0", + "graceful-fs": "^4.1.4", + "has-glob": "^0.1.1", + "is-absolute": "^0.2.5", + "lazy-cache": "^2.0.1", + "log-ok": "^0.1.1", + "matched": "^0.4.1", + "mkdirp": "^0.5.1", + "resolve-dir": "^0.1.0", + "to-file": "^0.2.0" + }, + "bin": { + "copy": "bin/cli.js", + "copy-cli": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", @@ -2666,6 +2198,28 @@ "node": ">= 0.10.0" } }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -2675,30 +2229,14 @@ }, "node_modules/cross-spawn": { "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { "node": ">= 8" @@ -2706,6 +2244,8 @@ }, "node_modules/debug": { "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2720,6 +2260,51 @@ } } }, + "node_modules/decompress-zip": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.3.tgz", + "integrity": "sha512-/fy1L4s+4jujqj3kNptWjilFw3E6De8U6XUFvqmh4npN3Vsypm3oT2V0bXcmbBWS+5j5tr4okYaFrOmyZkszEg==", + "license": "MIT", + "dependencies": { + "binary": "^0.3.0", + "graceful-fs": "^4.1.3", + "mkpath": "^0.1.0", + "nopt": "^3.0.1", + "q": "^1.1.2", + "readable-stream": "^1.1.8", + "touch": "0.0.3" + }, + "bin": { + "decompress-zip": "bin/decompress-zip" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decompress-zip/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "license": "MIT" + }, + "node_modules/decompress-zip/node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/decompress-zip/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", + "license": "MIT" + }, "node_modules/dedent": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", @@ -2831,9 +2416,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.190", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.190.tgz", - "integrity": "sha512-k4McmnB2091YIsdCgkS0fMVMPOJgxl93ltFzaryXqwip1AaxeDqKCGLxkXODDA5Ab/D+tV5EL5+aTx76RvLRxw==", + "version": "1.5.191", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.191.tgz", + "integrity": "sha512-xcwe9ELcuxYLUFqZZxL19Z6HVKcvNkIwhbHUz7L3us6u12yR+7uY89dSl570f/IqNthx8dAw3tojG7i4Ni4tDA==", "dev": true, "license": "ISC" }, @@ -2926,6 +2511,41 @@ "node": ">=8" } }, + "node_modules/escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "license": "BSD-2-Clause", + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=4.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", @@ -3148,21 +2768,6 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "license": "ISC" }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -3295,7 +2900,7 @@ "node": ">=0.10.0" } }, - "node_modules/global-modules/node_modules/global-prefix": { + "node_modules/global-prefix": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", "integrity": "sha512-gOPiyxcD9dJGCEArAhF4Hd0BAqvAe/JzERP7tYumE4yIkmIedPUVXcJFWbV3/p/ovIIvKjkrTk+f1UVkq7vvbw==", @@ -3310,7 +2915,7 @@ "node": ">=0.10.0" } }, - "node_modules/global-modules/node_modules/which": { + "node_modules/global-prefix/node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", @@ -3837,38 +3442,24 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.5.3" + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" }, "engines": { "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/istanbul-lib-report/node_modules/semver": { + "node_modules/istanbul-lib-instrument/node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", @@ -3881,6 +3472,21 @@ "node": ">=10" } }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-lib-source-maps": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", @@ -3984,51 +3590,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-cli": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", @@ -4063,28 +3624,6 @@ } } }, - "node_modules/jest-cli/node_modules/create-jest": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", - "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jest/types": "^29.6.3", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-config": "^29.7.0", - "jest-util": "^29.7.0", - "prompts": "^2.0.1" - }, - "bin": { - "create-jest": "bin/create-jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, "node_modules/jest-config": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", @@ -4353,77 +3892,11 @@ "dev": true, "license": "MIT", "dependencies": { - "jest-regex-util": "^29.6.3", - "jest-snapshot": "^29.7.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/jest-snapshot": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", - "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.7.0", - "@jest/transform": "^29.7.0", - "@jest/types": "^29.6.3", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.7.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.7.0", - "jest-get-type": "^29.6.3", - "jest-matcher-utils": "^29.7.0", - "jest-message-util": "^29.7.0", - "jest-util": "^29.7.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.7.0", - "semver": "^7.5.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jest-resolve/node_modules/resolve": { - "version": "1.22.10", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", - "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.16.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-runner": { @@ -4493,7 +3966,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/jest-snapshot": { + "node_modules/jest-snapshot": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", @@ -4525,7 +3998,7 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/semver": { + "node_modules/jest-snapshot/node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", @@ -4646,6 +4119,33 @@ "dev": true, "license": "MIT" }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -4666,6 +4166,29 @@ "node": ">=6" } }, + "node_modules/jsonpath": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", + "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", + "license": "MIT", + "dependencies": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.12.1" + } + }, + "node_modules/jsonpath/node_modules/esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -4791,6 +4314,35 @@ "yallist": "^3.0.2" } }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4889,12 +4441,31 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, "node_modules/mkpath": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz", "integrity": "sha512-bauHShmaxVQiEvlrAPWxSPn8spSL8gDVRl11r8vLT4r/KdnknLqtqwQbToZ2Oa8sJkExYY1z6/d+X7pNiqo4yg==", "license": "MIT" }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -4949,6 +4520,18 @@ "url": "https://github.com/sponsors/antelle" } }, + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, "node_modules/normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", @@ -5397,6 +4980,27 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -5472,6 +5076,16 @@ "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", "license": "ISC" }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -5524,6 +5138,18 @@ "node": ">=8" } }, + "node_modules/shelljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha512-Ny0KN4dyT8ZSCE0frtcbAJGoM/HTArpyPkeli1/00aYfm0sbD/Gk/4x7N2DP9QKGpBsiQH7n6rpm1L79RtviEQ==", + "license": "BSD*", + "bin": { + "shjs": "bin/shjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", @@ -5670,41 +5296,6 @@ "escodegen": "^1.8.1" } }, - "node_modules/static-eval/node_modules/escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "license": "BSD-2-Clause", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/static-eval/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -6030,6 +5621,33 @@ "node": ">=8.0" } }, + "node_modules/touch": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", + "integrity": "sha512-/LQ54KM9rPf3rGXGo2UPQWx3ol242Zg6Whq27H5DEmZhCJo+pm9N5BzRGepO9vTVhYxpXJdcc1+3uaYt9NyeKg==", + "license": "ISC", + "dependencies": { + "nopt": "~1.0.10" + }, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch/node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "license": "MIT", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -6146,17 +5764,13 @@ } } }, - "node_modules/ts-node/node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "dev": true, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, "engines": { - "node": ">=0.4.0" + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" } }, "node_modules/type-check": { @@ -6219,15 +5833,6 @@ "underscore": "^1.12.1" } }, - "node_modules/typed-rest-client/node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "license": "MIT", - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -6252,9 +5857,9 @@ } }, "node_modules/underscore": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", - "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", + "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==", "license": "MIT" }, "node_modules/undici": { @@ -6332,6 +5937,16 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "license": "MIT", + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", @@ -6394,6 +6009,22 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/which-typed-array": { "version": "1.1.19", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", diff --git a/package.json b/package.json index c9c554dd5..47bed6549 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "@actions/core": "^1.10.0", "@actions/github": "^4.0.0", "actions-secret-parser": "^1.0.4", - "azure-actions-appservice-rest": "^1.3.16", - "azure-actions-utility": "1.0.3", + "azure-actions-appservice-rest": "^1.3.32", + "azure-actions-utility": "^1.0.3", "azure-actions-webclient": "^1.1.1" } } diff --git a/src/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.ts b/src/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.ts index 89751daab..42b8b378d 100644 --- a/src/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.ts +++ b/src/ActionInputValidator/ActionValidators/PublishProfileContainerWebAppValidator.ts @@ -1,4 +1,4 @@ -import { packageNotAllowed, multiContainerNotAllowed, startupCommandNotAllowed, validateSingleContainerInputs, validateAppDetails } from "../Validations"; +import { packageNotAllowed, multiContainerNotAllowed, startupCommandNotAllowed, validateSingleContainerInputs, validateAppDetails, siteContainersConfigNotAllowed } from "../Validations"; import { ActionParameters } from "../../actionparameters"; import { IValidator } from "./IValidator"; @@ -12,6 +12,8 @@ export class PublishProfileContainerWebAppValidator implements IValidator { startupCommandNotAllowed(actionParams.startupCommand); + siteContainersConfigNotAllowed(actionParams.siteContainers); + validateAppDetails(); validateSingleContainerInputs(); diff --git a/src/ActionInputValidator/ActionValidators/PublishProfileWebAppSiteContainersValidator.ts b/src/ActionInputValidator/ActionValidators/PublishProfileWebAppSiteContainersValidator.ts new file mode 100644 index 000000000..096988b1d --- /dev/null +++ b/src/ActionInputValidator/ActionValidators/PublishProfileWebAppSiteContainersValidator.ts @@ -0,0 +1,7 @@ +import { IValidator } from "./IValidator"; + +export class PublishProfileWebAppSiteContainersValidator implements IValidator { + async validate(): Promise { + throw new Error("publish-profile is not supported for Site Containers scenario"); + } +} \ No newline at end of file diff --git a/src/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.ts b/src/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.ts index 5ead09b61..62fcf2f23 100644 --- a/src/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.ts +++ b/src/ActionInputValidator/ActionValidators/PublishProfileWebAppValidator.ts @@ -1,4 +1,4 @@ -import { containerInputsNotAllowed, startupCommandNotAllowed, validateAppDetails, validatePackageInput } from "../Validations"; +import { containerInputsNotAllowed, siteContainersConfigNotAllowed, startupCommandNotAllowed, validateAppDetails, validatePackageInput } from "../Validations"; import { ActionParameters } from "../../actionparameters"; import { IValidator } from "./IValidator"; @@ -15,6 +15,8 @@ export class PublishProfileWebAppValidator implements IValidator { startupCommandNotAllowed(actionParams.startupCommand); + siteContainersConfigNotAllowed(actionParams.siteContainers); + await validatePackageInput(); } diff --git a/src/ActionInputValidator/ActionValidators/SpnWebAppSiteContainersValidator.ts b/src/ActionInputValidator/ActionValidators/SpnWebAppSiteContainersValidator.ts new file mode 100644 index 000000000..71f049fea --- /dev/null +++ b/src/ActionInputValidator/ActionValidators/SpnWebAppSiteContainersValidator.ts @@ -0,0 +1,10 @@ +import { validateSiteContainersInputs } from "../Validations"; +import { IValidator } from "./IValidator"; + +export class SpnWebAppSiteContainersValidator implements IValidator { + async validate(): Promise { + + validateSiteContainersInputs(); + + } +} \ No newline at end of file diff --git a/src/ActionInputValidator/Validations.ts b/src/ActionInputValidator/Validations.ts index 750385674..a9bd90f16 100644 --- a/src/ActionInputValidator/Validations.ts +++ b/src/ActionInputValidator/Validations.ts @@ -4,6 +4,7 @@ import { Package, exist } from "azure-actions-utility/packageUtility"; import { PublishProfile, ScmCredentials } from "../Utilities/PublishProfile"; import RuntimeConstants from '../RuntimeConstants'; import { ActionParameters } from "../actionparameters"; +import { SiteContainer } from 'azure-actions-appservice-rest/Arm/SiteContainer'; import fs = require('fs'); @@ -109,4 +110,20 @@ export async function validatePackageInput() { if(isMSBuildPackage) { throw new Error(`Deployment of msBuild generated package is not supported. Please change package format.`); } +} + +// Error if Sitecontainers configuration is provided +export function siteContainersConfigNotAllowed(siteContainers: SiteContainer[]) { + if(!!siteContainers) { + throw new Error("SiteContainers not valid input for this web app."); + } +} + +// validate Sitecontainers inputs +export function validateSiteContainersInputs() { + const actionParams: ActionParameters = ActionParameters.getActionParams(); + + if (!actionParams.siteContainers || actionParams.siteContainers.length === 0) { + throw new Error("Site containers not provided."); + } } \ No newline at end of file diff --git a/src/ActionInputValidator/ValidatorFactory.ts b/src/ActionInputValidator/ValidatorFactory.ts index 9ae6facc5..3352c0dec 100644 --- a/src/ActionInputValidator/ValidatorFactory.ts +++ b/src/ActionInputValidator/ValidatorFactory.ts @@ -13,14 +13,20 @@ import { SpnWindowsWebAppValidator } from "./ActionValidators/SpnWindowsWebAppVa import { appNameIsRequired } from "./Validations"; import { PublishProfile } from "../Utilities/PublishProfile"; import RuntimeConstants from "../RuntimeConstants"; +import { SpnWebAppSiteContainersValidator } from "./ActionValidators/SpnWebAppSiteContainersValidator"; +import { PublishProfileWebAppSiteContainersValidator } from "./ActionValidators/PublishProfileWebAppSiteContainersValidator" +import { AzureAppService } from "azure-actions-appservice-rest/Arm/azure-app-service"; export class ValidatorFactory { - public static async getValidator(type: DEPLOYMENT_PROVIDER_TYPES) : Promise { + public static async getValidator(type: DEPLOYMENT_PROVIDER_TYPES) : Promise { let actionParams: ActionParameters = ActionParameters.getActionParams(); if(type === DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE) { - if (!!actionParams.images) { + if (!!actionParams.blessedAppSitecontainers || !!actionParams.siteContainers) { + return [new PublishProfileWebAppSiteContainersValidator()]; + } + else if (!!actionParams.images) { await this.setResourceDetails(actionParams); - return new PublishProfileContainerWebAppValidator(); + return [new PublishProfileContainerWebAppValidator()]; } else { try { @@ -29,7 +35,7 @@ export class ValidatorFactory { catch (error) { core.warning(`Failed to set resource details: ${error.message}`); } - return new PublishProfileWebAppValidator(); + return [new PublishProfileWebAppValidator()]; } } else if(type == DEPLOYMENT_PROVIDER_TYPES.SPN) { @@ -37,19 +43,26 @@ export class ValidatorFactory { appNameIsRequired(actionParams.appName); await this.getResourceDetails(actionParams); if (!!actionParams.isLinux) { - if (!!actionParams.images || !!actionParams.multiContainerConfigFile) { - return new SpnLinuxContainerWebAppValidator(); + if (!!actionParams.siteContainers) { + if (await this.isBlessedSitecontainerApp(actionParams)) { + return [new SpnLinuxWebAppValidator(), new SpnWebAppSiteContainersValidator()]; + } + + return [new SpnWebAppSiteContainersValidator()]; + } + else if (!!actionParams.images || !!actionParams.multiContainerConfigFile) { + return [new SpnLinuxContainerWebAppValidator()]; } else { - return new SpnLinuxWebAppValidator(); + return [new SpnLinuxWebAppValidator()]; } } else { if (!!actionParams.images) { - return new SpnWindowsContainerWebAppValidator(); + return [new SpnWindowsContainerWebAppValidator()]; } else { - return new SpnWindowsWebAppValidator(); + return [new SpnWindowsWebAppValidator()]; } } } @@ -72,4 +85,18 @@ export class ValidatorFactory { const appOS: string = await publishProfile.getAppOS(); actionParams.isLinux = appOS.includes(RuntimeConstants.Unix) || appOS.includes(RuntimeConstants.Unix.toLowerCase()); } + + private static async isBlessedSitecontainerApp(actionParams: ActionParameters): Promise { + const appService = new AzureAppService(actionParams.endpoint, actionParams.resourceGroupName, actionParams.appName, actionParams.slotName); + + let config = await appService.getConfiguration(); + + core.debug(`LinuxFxVersion of app is: ${config.properties.linuxFxVersion}`); + + actionParams.blessedAppSitecontainers = (config.properties.linuxFxVersion?.startsWith("DOCKER|") !== true + && config.properties.linuxFxVersion?.startsWith("COMPOSE|") !== true + && config.properties.linuxFxVersion !== "SITECONTAINERS"); + + return actionParams.blessedAppSitecontainers; + } } diff --git a/src/DeploymentProvider/DeploymentProviderFactory.ts b/src/DeploymentProvider/DeploymentProviderFactory.ts index b225abc4b..20adc724f 100644 --- a/src/DeploymentProvider/DeploymentProviderFactory.ts +++ b/src/DeploymentProvider/DeploymentProviderFactory.ts @@ -5,24 +5,31 @@ import { IWebAppDeploymentProvider } from "./Providers/IWebAppDeploymentProvider import { WebAppContainerDeploymentProvider } from "./Providers/WebAppContainerDeployment"; import { WebAppDeploymentProvider } from "./Providers/WebAppDeploymentProvider"; import { PublishProfileWebAppContainerDeploymentProvider } from "./Providers/PublishProfileWebAppContainerDeploymentProvider"; +import { WebAppSiteContainersDeploymentProvider } from "./Providers/WebAppSiteContainersDeploymentProvider"; export class DeploymentProviderFactory { - public static getDeploymentProvider(type: DEPLOYMENT_PROVIDER_TYPES) : IWebAppDeploymentProvider { + public static getDeploymentProvider(type: DEPLOYMENT_PROVIDER_TYPES) : IWebAppDeploymentProvider[] { if(type === DEPLOYMENT_PROVIDER_TYPES.PUBLISHPROFILE) { if (!!ActionParameters.getActionParams().images) { - return new PublishProfileWebAppContainerDeploymentProvider(type); + return [new PublishProfileWebAppContainerDeploymentProvider(type)]; } else { - return new WebAppDeploymentProvider(type); + return [new WebAppDeploymentProvider(type)]; } } else if(type == DEPLOYMENT_PROVIDER_TYPES.SPN) { - if(!!ActionParameters.getActionParams().images || (!!ActionParameters.getActionParams().isLinux && !!ActionParameters.getActionParams().multiContainerConfigFile)) { - return new WebAppContainerDeploymentProvider(type); + if (!!ActionParameters.getActionParams().blessedAppSitecontainers) { + return [new WebAppDeploymentProvider(type), new WebAppSiteContainersDeploymentProvider(type)]; + } + else if (!!ActionParameters.getActionParams().siteContainers) { + return [new WebAppSiteContainersDeploymentProvider(type)]; + } + else if(!!ActionParameters.getActionParams().images || (!!ActionParameters.getActionParams().isLinux && !!ActionParameters.getActionParams().multiContainerConfigFile)) { + return [new WebAppContainerDeploymentProvider(type)]; } else { - return new WebAppDeploymentProvider(type); + return [new WebAppDeploymentProvider(type)]; } } else { diff --git a/src/DeploymentProvider/Providers/WebAppSiteContainersDeploymentProvider.ts b/src/DeploymentProvider/Providers/WebAppSiteContainersDeploymentProvider.ts new file mode 100644 index 000000000..a280ace73 --- /dev/null +++ b/src/DeploymentProvider/Providers/WebAppSiteContainersDeploymentProvider.ts @@ -0,0 +1,18 @@ +import { BaseWebAppDeploymentProvider } from './BaseWebAppDeploymentProvider'; +import { SiteContainerDeploymentUtility } from 'azure-actions-appservice-rest/Utilities/SiteContainerDeploymentUtility'; +import * as core from '@actions/core'; + +export class WebAppSiteContainersDeploymentProvider extends BaseWebAppDeploymentProvider { + public async DeployWebAppStep() { + let siteContainerDeploymentUtility = new SiteContainerDeploymentUtility(this.appService); + let siteContainers = this.actionParams.siteContainers; + + core.info("Updating site containers"); + + for (let i = 0; i < siteContainers.length; i++) { + let siteContainer = siteContainers[i]; + core.info("updating site container: " + siteContainer.getName); + await siteContainerDeploymentUtility.updateSiteContainer(siteContainer); + } + } +} \ No newline at end of file diff --git a/src/actionparameters.ts b/src/actionparameters.ts index 8f9a67d2d..2309abaa1 100644 --- a/src/actionparameters.ts +++ b/src/actionparameters.ts @@ -1,6 +1,7 @@ import * as core from '@actions/core'; import { IAuthorizer } from "azure-actions-webclient/Authorizer/IAuthorizer"; import { Package } from 'azure-actions-utility/packageUtility'; +import { SiteContainer } from 'azure-actions-appservice-rest/Arm/SiteContainer'; const github = require('@actions/github'); export enum WebAppKind { @@ -42,6 +43,10 @@ export class ActionParameters { private _clean: string; private _restart: string; + // Used for Sitecontainers app. + private _siteContainers: SiteContainer[]; + private _blessedAppSitecontainers: boolean; + private constructor(endpoint: IAuthorizer) { this._publishProfileContent = core.getInput('publish-profile'); this._appName = core.getInput('app-name'); @@ -62,6 +67,17 @@ export class ActionParameters { this._targetPath = core.getInput('target-path'); this._clean = core.getInput('clean'); this._restart = core.getInput('restart'); + + // Used for Sitecontainers app. + const siteContainersConfigInput = core.getInput('sitecontainers-config'); + if (siteContainersConfigInput) { + const raw = JSON.parse(siteContainersConfigInput); + this._siteContainers = raw.map(SiteContainer.fromJson); + } else { + this._siteContainers = null; + } + + this._blessedAppSitecontainers = false; } public static getActionParams(endpoint?: IAuthorizer) { @@ -174,4 +190,20 @@ export class ActionParameters { public get restart() { return this._restart; } + + public get siteContainers(): SiteContainer[] { + return this._siteContainers; + } + + public set siteContainers(siteContainers: SiteContainer[]) { + this._siteContainers = siteContainers; + } + + public get blessedAppSitecontainers() { + return this._blessedAppSitecontainers; + } + + public set blessedAppSitecontainers(blessedAppSitecontainers: boolean) { + this._blessedAppSitecontainers = blessedAppSitecontainers; + } } \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index e36a92020..e8927cadc 100644 --- a/src/main.ts +++ b/src/main.ts @@ -34,16 +34,19 @@ export async function main() { } // Validate action inputs - let validator = await ValidatorFactory.getValidator(type); - await validator.validate(); - - var deploymentProvider = DeploymentProviderFactory.getDeploymentProvider(type); + let validators = await ValidatorFactory.getValidator(type); + for (const validator of validators) { + await validator.validate(); + } - core.debug("Predeployment Step Started"); - await deploymentProvider.PreDeploymentStep(); + var deploymentProviders = DeploymentProviderFactory.getDeploymentProvider(type); - core.debug("Deployment Step Started"); - await deploymentProvider.DeployWebAppStep(); + for (const provider of deploymentProviders) { + core.info("Predeployment Step Started"); + await provider.PreDeploymentStep(); + core.info("Deployment Step Started"); + await provider.DeployWebAppStep(); + } } catch(error) { isDeploymentSuccess = false; @@ -57,8 +60,8 @@ export async function main() { } } finally { - if(deploymentProvider != null) { - await deploymentProvider.UpdateDeploymentStatus(isDeploymentSuccess); + if(deploymentProviders != null) { + await deploymentProviders[0].UpdateDeploymentStatus(isDeploymentSuccess); } // Reset AZURE_HTTP_USER_AGENT