diff --git a/README.md b/README.md index b3a5e6c..c805e20 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # github-actions + Repository of generic reusable Github Actions #### [`build-workspace-matrix`](build-workspace-matrix) @@ -20,3 +21,7 @@ Wraps certain [`terraform`](https://www.terraform.io/docs/commands/index.html) c #### [`update-issue`](update-issue) Creates, updates, or closes an issue matching a given title based on other parameters. + +#### [`helmfile-dependency-check`](helmfile-dependency-check) + +Checks if there is a valid `helmfile.yaml` in the working directory. Executes `helmfile deps` and checks if there are any chart upgrades available. diff --git a/__mocks__/child_process.ts b/__mocks__/child_process.ts new file mode 100644 index 0000000..2c59695 --- /dev/null +++ b/__mocks__/child_process.ts @@ -0,0 +1,10 @@ +const child_process = jest.createMockFromModule("child_process") + +function execSync(command: string): Buffer { + const buffer = Buffer.from(`executed: ${command}`) + return buffer +} + +(child_process as any).execSync = execSync + +module.exports = child_process \ No newline at end of file diff --git a/__mocks__/fs.ts b/__mocks__/fs.ts new file mode 100644 index 0000000..d1af404 --- /dev/null +++ b/__mocks__/fs.ts @@ -0,0 +1,29 @@ +const fs = jest.genMockFromModule("fs"); + +let mockFiles: string[] | null = null; + +function __setMockFiles(newMockFiles: string[]): void { + mockFiles = newMockFiles +} + +function readFileSync(path: string, encoding: string): string { + if (mockFiles.length === 0) { + return "" + } + return mockFiles.shift() +} + +function existsSync(path: string): boolean { + if (RegExp(/helmfile-missing\/helmfile\.yaml/).exec(path)) { + return false + } else if (RegExp(/helmfile-lock-missing\/helmfile\.lock/).exec(path)) { + return false + } + return true +} + +(fs as any).__setMockFiles = __setMockFiles; +(fs as any).readFileSync = readFileSync; +(fs as any).existsSync = existsSync; + +module.exports = fs; \ No newline at end of file diff --git a/helmfile-dependency-check/README.md b/helmfile-dependency-check/README.md index 7e2ea4c..98a9dee 100644 --- a/helmfile-dependency-check/README.md +++ b/helmfile-dependency-check/README.md @@ -5,7 +5,7 @@ Simple action to check if there are updates available for charts defined in a `h Helmfile Lock States: - `missing` - helmfile.lock is missing (helmfile.yaml had repositories to check against) -- `update_available` - Chart updates were found in upstream repos +- `update_available` - Chart updates were found - `fresh` - Charts are all up to date ## Optional Inputs @@ -30,10 +30,102 @@ outputs: value: ${{ steps.main.outputs.helmfile-lock-updates }} ``` -## Example +## Example Usage ```yaml - uses: iStreamPlanet/github-actions/helmfile-dependency-check@main with: working_directory: . ``` + +## Update Available Example + +helmfile.lock: + +``` +version: v0.125.0 +dependencies: +- name: datadog + repository: https://helm.datadoghq.com + version: 2.4.39 +- name: external-dns + repository: https://charts.bitnami.com/bitnami + version: 2.24.1 +- name: kube-state-metrics + repository: https://charts.helm.sh/stable + version: 2.9.2 +- name: metrics-server + repository: https://charts.helm.sh/stable + version: 2.11.2 +- name: spotinst-kubernetes-cluster-controller + repository: https://spotinst.github.io/spotinst-kubernetes-helm-charts + version: 1.0.78 +digest: sha256:aa71df80f65944a2281269415dc193943f50d9d7bf2763017ee1d9d9539ac116 +generated: "2020-11-06T15:12:37.407096-08:00" +``` + +Raw output: + +``` +::set-output name=helmfile-lock-state::update_available +::set-output name=helmfile-lock-updates::[{"name":"kube-state-metrics","repository":"https://charts.helm.sh/stable","currentVer":"2.9.2","upgradeVer":"2.9.4"},{"name":"metrics-server","repository":"https://charts.helm.sh/stable","currentVer":"2.11.2","upgradeVer":"2.11.4"},{"name":"spotinst-kubernetes-cluster-controller","repository":"https://spotinst.github.io/spotinst-kubernetes-helm-charts","currentVer":"1.0.78","upgradeVer":"1.0.79"}] +``` + +Formatted: + +```yaml +[ + { + "name": "kube-state-metrics", + "repository": "https://charts.helm.sh/stable", + "currentVer": "2.9.2", + "upgradeVer": "2.9.4", + }, + { + "name": "metrics-server", + "repository": "https://charts.helm.sh/stable", + "currentVer": "2.11.2", + "upgradeVer": "2.11.4", + }, + { + "name": "spotinst-kubernetes-cluster-controller", + "repository": "https://spotinst.github.io/spotinst-kubernetes-helm-charts", + "currentVer": "1.0.78", + "upgradeVer": "1.0.79", + }, +] +``` + +## Fresh Example + +helmfile.lock + +``` +version: v0.125.0 +dependencies: +- name: datadog + repository: https://helm.datadoghq.com + version: 2.4.39 +- name: external-dns + repository: https://charts.bitnami.com/bitnami + version: 2.24.1 +- name: kube-state-metrics + repository: https://charts.helm.sh/stable + version: 2.9.4 +- name: metrics-server + repository: https://charts.helm.sh/stable + version: 2.11.4 +- name: spotinst-kubernetes-cluster-controller + repository: https://spotinst.github.io/spotinst-kubernetes-helm-charts + version: 1.0.79 +digest: sha256:ff3b0ad50accb9a12898773752efe2cbdc7004003be46506c68a3f70cb28ff34 +generated: "2020-11-30T13:15:00.561501952-08:00" +``` + +Raw output: + +``` +new helmfile.lock was not generated +::set-output name=helmfile-lock-state::fresh +::set-output name=helmfile-lock-updates::[] +``` diff --git a/helmfile-dependency-check/__test__/main.test.ts b/helmfile-dependency-check/__test__/main.test.ts index 78b3766..e359e89 100644 --- a/helmfile-dependency-check/__test__/main.test.ts +++ b/helmfile-dependency-check/__test__/main.test.ts @@ -1,18 +1,15 @@ -import * as core from "@actions/core" +jest.mock("fs") +jest.mock("child_process") + import * as path from "path" -import * as nock from "nock" -import { readFileSync } from "fs" -import { helmfileDepCheck } from "../helmfileDepCheck" const baseDir = "helmfile-dependency-check/__test__/test-data/" +const {readFileSync} = jest.requireActual("fs") + beforeEach(() => { jest.resetModules() - - // index.yaml will be returned for all https GET requests - const helmfilePath = path.join(baseDir, "index.yaml") - const helmfileContent = readFileSync(helmfilePath, "utf-8") - nock(/.*/).persist().get(/.*index.yaml/).reply(200, helmfileContent) + require("fs").__setMockFiles([]) }) afterEach(() => { @@ -20,53 +17,153 @@ afterEach(() => { }) describe("helmfile-dep-update", () => { - it("helmfile missing", async () => { - process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-missing") - const setOutputMock = jest.spyOn(core, "setOutput") + it("helmfile missing", () => { + const workingDir = path.join(baseDir, "helmfile-missing") + process.env["INPUT_WORKING_DIRECTORY"] = workingDir - await helmfileDepCheck() + const setOutputMock = jest.spyOn(require("@actions/core"), "setOutput") + + require("../helmfileDepCheck").helmfileDepCheck() expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-state", "fresh") expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", []) }) - it("helmfile missing repositories", async () => { - process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-no-repository") - const setOutputMock = jest.spyOn(core, "setOutput") + it("helmfile missing repositories", () => { + const workingDir = path.join(baseDir, "helmfile-no-repositories") + process.env["INPUT_WORKING_DIRECTORY"] = workingDir + + const helmfilePath = path.join(workingDir, "helmfile.yaml") + const helmfileContent = readFileSync(helmfilePath, "utf-8") - await helmfileDepCheck() + const mockFiles = [ + helmfileContent, + ] + require("fs").__setMockFiles(mockFiles) + + const setOutputMock = jest.spyOn(require("@actions/core"), "setOutput") + + require("../helmfileDepCheck").helmfileDepCheck() expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-state", "fresh") expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", []) }) - it("helmfile lock fresh", async () => { - process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-lock-fresh") - const setOutputMock = jest.spyOn(core, "setOutput") + it("helmfile lock fresh", () => { + const workingDir = path.join(baseDir, "helmfile-lock-fresh") + process.env["INPUT_WORKING_DIRECTORY"] = workingDir + + const helmfilePath = path.join(workingDir, "helmfile.yaml") + const helmfileContent = readFileSync(helmfilePath, "utf-8") + + const helmfileLockPath = path.join(workingDir, "helmfile.lock") + const helmfileLockContent = readFileSync(helmfileLockPath, "utf-8") - await helmfileDepCheck() + const freshHelmfileLockPath = path.join(workingDir, "helmfile_fresh.lock") + const freshHelmfileLockContent = readFileSync(freshHelmfileLockPath, "utf-8") + + const mockFiles = [ + helmfileContent, + helmfileLockContent, + freshHelmfileLockContent, + ] + require("fs").__setMockFiles(mockFiles) + + const setOutputMock = jest.spyOn(require("@actions/core"), "setOutput") + const logMock = jest.spyOn(global.console, "log") + + require("../helmfileDepCheck").helmfileDepCheck() expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-state", "fresh") expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", []) + expect(logMock).toHaveBeenCalledWith("executed: helmfile deps") }) - it("helmfile lock update", async () => { - process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-lock-update") - const setOutputMock = jest.spyOn(core, "setOutput") - - await helmfileDepCheck() - - const updateData = { - name: "datadog", - repository: "https://helm.datadoghq.com/index.yaml", - currentVer: "2.4.39", - latestVer: "2.5.1" - } + it("helmfile lock no updates", () => { + const workingDir = path.join(baseDir, "helmfile-lock-fresh") + process.env["INPUT_WORKING_DIRECTORY"] = workingDir + + const helmfilePath = path.join(workingDir, "helmfile.yaml") + const helmfileContent = readFileSync(helmfilePath, "utf-8") + + const helmfileLockPath = path.join(workingDir, "helmfile.lock") + const helmfileLockContent = readFileSync(helmfileLockPath, "utf-8") + + const freshHelmfileLockPath = path.join(workingDir, "helmfile.lock") + const freshHelmfileLockContent = readFileSync(freshHelmfileLockPath, "utf-8") + + const mockFiles = [ + helmfileContent, + helmfileLockContent, + freshHelmfileLockContent, + ] + require("fs").__setMockFiles(mockFiles) + + const setOutputMock = jest.spyOn(require("@actions/core"), "setOutput") + const logMock = jest.spyOn(global.console, "log") + + require("../helmfileDepCheck").helmfileDepCheck() + + expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-state", "fresh") + expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", []) + expect(logMock).toHaveBeenCalledWith("new helmfile.lock was not generated") + }) + it("helmfile lock update", () => { + const workingDir = path.join(baseDir, "helmfile-lock-update") + process.env["INPUT_WORKING_DIRECTORY"] = workingDir + + const helmfilePath = path.join(workingDir, "helmfile.yaml") + const helmfileContent = readFileSync(helmfilePath, "utf-8") + + const helmfileLockPath = path.join(workingDir, "helmfile.lock") + const helmfileLockContent = readFileSync(helmfileLockPath, "utf-8") + + const updatedHelmfileLockPath = path.join(workingDir, "helmfile_updated.lock") + const updatedHelmfileLockContent = readFileSync(updatedHelmfileLockPath, "utf-8") + + const mockFiles = [ + helmfileContent, + helmfileLockContent, + updatedHelmfileLockContent, + ] + require("fs").__setMockFiles(mockFiles) + + const setOutputMock = jest.spyOn(require("@actions/core"), "setOutput") + const logMock = jest.spyOn(global.console, "log") + + require("../helmfileDepCheck").helmfileDepCheck() + + const updateData = [ + { + name: "datadog", + repository: "https://helm.datadoghq.com", + currentVer: "2.4.39", + upgradeVer: "2.5.1" + }, + { + name: "spotinst-kubernetes-cluster-controller", + repository: "https://spotinst.github.io/spotinst-kubernetes-helm-charts", + currentVer: "1.0.78", + upgradeVer: "1.0.79" + } + ] + expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-state", "update_available") - expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", [updateData]) + expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", updateData) + expect(logMock).toHaveBeenCalledWith("executed: helmfile deps") }) - it("helmfile lock missing", async () => { - process.env["INPUT_WORKING_DIRECTORY"] = path.join(baseDir, "helmfile-lock-missing") - const setOutputMock = jest.spyOn(core, "setOutput") + it("helmfile lock missing", () => { + const workingDir = path.join(baseDir, "helmfile-lock-missing") + process.env["INPUT_WORKING_DIRECTORY"] = workingDir + + const helmfilePath = path.join(workingDir, "helmfile.yaml") + const helmfileContent = readFileSync(helmfilePath, "utf-8") + + const mockFiles = [ + helmfileContent, + ] + require("fs").__setMockFiles(mockFiles) + + const setOutputMock = jest.spyOn(require("@actions/core"), "setOutput") - await helmfileDepCheck() + require("../helmfileDepCheck").helmfileDepCheck() expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-state", "missing") expect(setOutputMock).toHaveBeenCalledWith("helmfile-lock-updates", []) diff --git a/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile.lock b/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile.lock index 07eefac..2f81b56 100644 --- a/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile.lock +++ b/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile.lock @@ -16,4 +16,4 @@ dependencies: repository: https://spotinst.github.io/spotinst-kubernetes-helm-charts version: 1.0.78 digest: sha256:aa71df80f65944a2281269415dc193943f50d9d7bf2763017ee1d9d9539ac116 -generated: "2020-11-06T15:12:37.407096-08:00" \ No newline at end of file +generated: "2019-11-06T15:12:37.407096-08:00" \ No newline at end of file diff --git a/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile_fresh.lock b/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile_fresh.lock new file mode 100644 index 0000000..07eefac --- /dev/null +++ b/helmfile-dependency-check/__test__/test-data/helmfile-lock-fresh/helmfile_fresh.lock @@ -0,0 +1,19 @@ +version: v0.125.0 +dependencies: +- name: datadog + repository: https://helm.datadoghq.com + version: 2.5.1 +- name: external-dns + repository: https://charts.bitnami.com/bitnami + version: 2.24.1 +- name: kube-state-metrics + repository: https://charts.helm.sh/stable + version: 2.9.2 +- name: metrics-server + repository: https://charts.helm.sh/stable + version: 2.11.2 +- name: spotinst-kubernetes-cluster-controller + repository: https://spotinst.github.io/spotinst-kubernetes-helm-charts + version: 1.0.78 +digest: sha256:aa71df80f65944a2281269415dc193943f50d9d7bf2763017ee1d9d9539ac116 +generated: "2020-11-06T15:12:37.407096-08:00" \ No newline at end of file diff --git a/helmfile-dependency-check/__test__/test-data/helmfile-lock-update/helmfile_updated.lock b/helmfile-dependency-check/__test__/test-data/helmfile-lock-update/helmfile_updated.lock new file mode 100644 index 0000000..51b3594 --- /dev/null +++ b/helmfile-dependency-check/__test__/test-data/helmfile-lock-update/helmfile_updated.lock @@ -0,0 +1,19 @@ +version: v0.125.0 +dependencies: +- name: datadog + repository: https://helm.datadoghq.com + version: 2.5.1 +- name: external-dns + repository: https://charts.bitnami.com/bitnami + version: 2.24.1 +- name: kube-state-metrics + repository: https://charts.helm.sh/stable + version: 2.9.2 +- name: metrics-server + repository: https://charts.helm.sh/stable + version: 2.11.2 +- name: spotinst-kubernetes-cluster-controller + repository: https://spotinst.github.io/spotinst-kubernetes-helm-charts + version: 1.0.79 +digest: sha256:aa71df80f65944a2281269415dc193943f50d9d7bf2763017ee1d9d9539ac116 +generated: "2020-11-06T15:12:37.407096-08:00" \ No newline at end of file diff --git a/helmfile-dependency-check/__test__/test-data/index.yaml b/helmfile-dependency-check/__test__/test-data/index.yaml deleted file mode 100644 index 177fcf5..0000000 --- a/helmfile-dependency-check/__test__/test-data/index.yaml +++ /dev/null @@ -1,77 +0,0 @@ -apiVersion: v1 -entries: - datadog: - - apiVersion: v1 - appVersion: "7" - created: "2020-11-09T13:34:31.121372087Z" - dependencies: - - condition: datadog.kubeStateMetricsEnabled - name: kube-state-metrics - repository: https://charts.helm.sh/stable - version: =2.8.11 - description: Datadog Agent - digest: 78f6be3a2aed7a3b2511c6bf99a36d4ac453d507c916746e140ce2cc2e95ab45 - home: https://www.datadoghq.com - icon: https://datadog-live.imgix.net/img/dd_logo_70x75.png - keywords: - - monitoring - - alerting - - metric - maintainers: - - email: support@datadoghq.com - name: Datadog - name: datadog - sources: - - https://app.datadoghq.com/account/settings#agent/kubernetes - - https://github.com/DataDog/datadog-agent - urls: - - https://github.com/DataDog/helm-charts/releases/download/datadog-2.5.1/datadog-2.5.1.tgz - version: 2.5.1 - - apiVersion: v1 - appVersion: "7" - created: "2020-11-06T16:59:54.198467615Z" - dependencies: - - condition: datadog.kubeStateMetricsEnabled - name: kube-state-metrics - repository: https://charts.helm.sh/stable - version: =2.8.11 - description: Datadog Agent - digest: a9f33a1f5404788904ad12e4869d0115071b9f0e8fe56c25ab7764a8fcd679f3 - home: https://www.datadoghq.com - icon: https://datadog-live.imgix.net/img/dd_logo_70x75.png - keywords: - - monitoring - - alerting - - metric - maintainers: - - email: support@datadoghq.com - name: Datadog - name: datadog - sources: - - https://app.datadoghq.com/account/settings#agent/kubernetes - - https://github.com/DataDog/datadog-agent - urls: - - https://github.com/DataDog/helm-charts/releases/download/datadog-2.5.0/datadog-2.5.0.tgz - version: 2.5.0 - synthetics-private-location: - - apiVersion: v2 - appVersion: 1.4.0 - created: "2020-10-27T13:52:42.263511255Z" - description: Datadog Synthetics Private Location - digest: ae8714fd2e404f25456b21eceb5d13b229bd4b9e154a97ceed69a7c174e16d43 - home: https://www.datadoghq.com - icon: https://datadog-live.imgix.net/img/dd_logo_70x75.png - keywords: - - monitoring - - synthetics - maintainers: - - email: support@datadoghq.com - name: Datadog - name: synthetics-private-location - sources: - - https://docs.datadoghq.com/synthetics/private_locations - - https://app.datadoghq.com/synthetics/settings/private-locations - urls: - - https://github.com/DataDog/helm-charts/releases/download/synthetics-private-location-0.1.0/synthetics-private-location-0.1.0.tgz - version: 0.1.0 -generated: "2020-07-29T11:03:41.153796856Z" diff --git a/helmfile-dependency-check/dist/index.js b/helmfile-dependency-check/dist/index.js index 12ba2b7..f7deea9 100644 --- a/helmfile-dependency-check/dist/index.js +++ b/helmfile-dependency-check/dist/index.js @@ -1 +1 @@ -module.exports=(()=>{var r={7351:function(r,n,i){"use strict";var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const e=o(i(2087));const f=i(5278);function issueCommand(r,n,i){const o=new Command(r,n,i);process.stdout.write(o.toString()+e.EOL)}n.issueCommand=issueCommand;function issue(r,n=""){issueCommand(r,{},n)}n.issue=issue;const s="::";class Command{constructor(r,n,i){if(!r){r="missing.command"}this.command=r;this.properties=n;this.message=i}toString(){let r=s+this.command;if(this.properties&&Object.keys(this.properties).length>0){r+=" ";let n=true;for(const i in this.properties){if(this.properties.hasOwnProperty(i)){const o=this.properties[i];if(o){if(n){n=false}else{r+=","}r+=`${i}=${escapeProperty(o)}`}}}}r+=`${s}${escapeData(this.message)}`;return r}}function escapeData(r){return f.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(r){return f.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(r,n,i){"use strict";var o=this&&this.__awaiter||function(r,n,i,o){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,e){function fulfilled(r){try{step(o.next(r))}catch(r){e(r)}}function rejected(r){try{step(o["throw"](r))}catch(r){e(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((o=o.apply(r,n||[])).next())})};var e=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const f=i(7351);const s=i(717);const u=i(5278);const c=e(i(2087));const l=e(i(5622));var t;(function(r){r[r["Success"]=0]="Success";r[r["Failure"]=1]="Failure"})(t=n.ExitCode||(n.ExitCode={}));function exportVariable(r,n){const i=u.toCommandValue(n);process.env[r]=i;const o=process.env["GITHUB_ENV"]||"";if(o){const n="_GitHubActionsFileCommandDelimeter_";const o=`${r}<<${n}${c.EOL}${i}${c.EOL}${n}`;s.issueCommand("ENV",o)}else{f.issueCommand("set-env",{name:r},i)}}n.exportVariable=exportVariable;function setSecret(r){f.issueCommand("add-mask",{},r)}n.setSecret=setSecret;function addPath(r){const n=process.env["GITHUB_PATH"]||"";if(n){s.issueCommand("PATH",r)}else{f.issueCommand("add-path",{},r)}process.env["PATH"]=`${r}${l.delimiter}${process.env["PATH"]}`}n.addPath=addPath;function getInput(r,n){const i=process.env[`INPUT_${r.replace(/ /g,"_").toUpperCase()}`]||"";if(n&&n.required&&!i){throw new Error(`Input required and not supplied: ${r}`)}return i.trim()}n.getInput=getInput;function setOutput(r,n){f.issueCommand("set-output",{name:r},n)}n.setOutput=setOutput;function setCommandEcho(r){f.issue("echo",r?"on":"off")}n.setCommandEcho=setCommandEcho;function setFailed(r){process.exitCode=t.Failure;error(r)}n.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}n.isDebug=isDebug;function debug(r){f.issueCommand("debug",{},r)}n.debug=debug;function error(r){f.issue("error",r instanceof Error?r.toString():r)}n.error=error;function warning(r){f.issue("warning",r instanceof Error?r.toString():r)}n.warning=warning;function info(r){process.stdout.write(r+c.EOL)}n.info=info;function startGroup(r){f.issue("group",r)}n.startGroup=startGroup;function endGroup(){f.issue("endgroup")}n.endGroup=endGroup;function group(r,n){return o(this,void 0,void 0,function*(){startGroup(r);let i;try{i=yield n()}finally{endGroup()}return i})}n.group=group;function saveState(r,n){f.issueCommand("save-state",{name:r},n)}n.saveState=saveState;function getState(r){return process.env[`STATE_${r}`]||""}n.getState=getState},717:function(r,n,i){"use strict";var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const e=o(i(5747));const f=o(i(2087));const s=i(5278);function issueCommand(r,n){const i=process.env[`GITHUB_${r}`];if(!i){throw new Error(`Unable to find environment variable for file command ${r}`)}if(!e.existsSync(i)){throw new Error(`Missing file at path: ${i}`)}e.appendFileSync(i,`${s.toCommandValue(n)}${f.EOL}`,{encoding:"utf8"})}n.issueCommand=issueCommand},5278:(r,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:true});function toCommandValue(r){if(r===null||r===undefined){return""}else if(typeof r==="string"||r instanceof String){return r}return JSON.stringify(r)}n.toCommandValue=toCommandValue},1917:(r,n,i)=>{"use strict";var o=i(916);r.exports=o},916:(r,n,i)=>{"use strict";var o=i(5190);var e=i(3034);function deprecated(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}r.exports.Type=i(967);r.exports.Schema=i(6514);r.exports.FAILSAFE_SCHEMA=i(6037);r.exports.JSON_SCHEMA=i(1571);r.exports.CORE_SCHEMA=i(2183);r.exports.DEFAULT_SAFE_SCHEMA=i(8949);r.exports.DEFAULT_FULL_SCHEMA=i(6874);r.exports.load=o.load;r.exports.loadAll=o.loadAll;r.exports.safeLoad=o.safeLoad;r.exports.safeLoadAll=o.safeLoadAll;r.exports.dump=e.dump;r.exports.safeDump=e.safeDump;r.exports.YAMLException=i(5199);r.exports.MINIMAL_SCHEMA=i(6037);r.exports.SAFE_SCHEMA=i(8949);r.exports.DEFAULT_SCHEMA=i(6874);r.exports.scan=deprecated("scan");r.exports.parse=deprecated("parse");r.exports.compose=deprecated("compose");r.exports.addConstructor=deprecated("addConstructor")},9136:r=>{"use strict";function isNothing(r){return typeof r==="undefined"||r===null}function isObject(r){return typeof r==="object"&&r!==null}function toArray(r){if(Array.isArray(r))return r;else if(isNothing(r))return[];return[r]}function extend(r,n){var i,o,e,f;if(n){f=Object.keys(n);for(i=0,o=f.length;i{"use strict";var o=i(9136);var e=i(5199);var f=i(6874);var s=i(8949);var u=Object.prototype.toString;var c=Object.prototype.hasOwnProperty;var l=9;var t=10;var p=13;var a=32;var h=33;var E=34;var A=35;var S=37;var w=38;var v=39;var O=42;var g=44;var $=45;var I=58;var F=61;var m=62;var L=63;var b=64;var R=91;var C=93;var D=96;var j=123;var d=124;var P=125;var T={};T[0]="\\0";T[7]="\\a";T[8]="\\b";T[9]="\\t";T[10]="\\n";T[11]="\\v";T[12]="\\f";T[13]="\\r";T[27]="\\e";T[34]='\\"';T[92]="\\\\";T[133]="\\N";T[160]="\\_";T[8232]="\\L";T[8233]="\\P";var Y=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(r,n){var i,o,e,f,s,u,l;if(n===null)return{};i={};o=Object.keys(n);for(e=0,f=o.length;e0?r.charCodeAt(f-1):null;h=h&&isPlainSafe(s,u)}}else{for(f=0;fo&&r[a+1]!==" ";a=f}}else if(!isPrintable(s)){return B}u=f>0?r.charCodeAt(f-1):null;h=h&&isPlainSafe(s,u)}l=l||p&&(f-a-1>o&&r[a+1]!==" ")}if(!c&&!l){return h&&!e(r)?U:_}if(i>9&&needIndentIndicator(r)){return B}return l?W:G}function writeScalar(r,n,i,o){r.dump=function(){if(n.length===0){return"''"}if(!r.noCompatMode&&Y.indexOf(n)!==-1){return"'"+n+"'"}var f=r.indent*Math.max(1,i);var s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-f);var u=o||r.flowLevel>-1&&i>=r.flowLevel;function testAmbiguity(n){return testImplicitResolving(r,n)}switch(chooseScalarStyle(n,u,r.indent,s,testAmbiguity)){case U:return n;case _:return"'"+n.replace(/'/g,"''")+"'";case G:return"|"+blockHeader(n,r.indent)+dropEndingNewline(indentString(n,f));case W:return">"+blockHeader(n,r.indent)+dropEndingNewline(indentString(foldString(n,s),f));case B:return'"'+escapeString(n,s)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function blockHeader(r,n){var i=needIndentIndicator(r)?String(n):"";var o=r[r.length-1]==="\n";var e=o&&(r[r.length-2]==="\n"||r==="\n");var f=e?"+":o?"":"-";return i+f+"\n"}function dropEndingNewline(r){return r[r.length-1]==="\n"?r.slice(0,-1):r}function foldString(r,n){var i=/(\n+)([^\n]*)/g;var o=function(){var o=r.indexOf("\n");o=o!==-1?o:r.length;i.lastIndex=o;return foldLine(r.slice(0,o),n)}();var e=r[0]==="\n"||r[0]===" ";var f;var s;while(s=i.exec(r)){var u=s[1],c=s[2];f=c[0]===" ";o+=u+(!e&&!f&&c!==""?"\n":"")+foldLine(c,n);e=f}return o}function foldLine(r,n){if(r===""||r[0]===" ")return r;var i=/ [^ ]/g;var o;var e=0,f,s=0,u=0;var c="";while(o=i.exec(r)){u=o.index;if(u-e>n){f=s>e?s:u;c+="\n"+r.slice(e,f);e=f+1}s=u}c+="\n";if(r.length-e>n&&s>e){c+=r.slice(e,s)+"\n"+r.slice(s+1)}else{c+=r.slice(e)}return c.slice(1)}function escapeString(r){var n="";var i,o;var e;for(var f=0;f=55296&&i<=56319){o=r.charCodeAt(f+1);if(o>=56320&&o<=57343){n+=encodeHex((i-55296)*1024+o-56320+65536);f++;continue}}e=T[i];n+=!e&&isPrintable(i)?r[f]:e||encodeHex(i)}return n}function writeFlowSequence(r,n,i){var o="",e=r.tag,f,s;for(f=0,s=i.length;f1024)t+="? ";t+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" ");if(!writeNode(r,n,l,false,false)){continue}t+=r.dump;o+=t}r.tag=e;r.dump="{"+o+"}"}function writeBlockMapping(r,n,i,o){var f="",s=r.tag,u=Object.keys(i),c,l,p,a,h,E;if(r.sortKeys===true){u.sort()}else if(typeof r.sortKeys==="function"){u.sort(r.sortKeys)}else if(r.sortKeys){throw new e("sortKeys must be a boolean or a function")}for(c=0,l=u.length;c1024;if(h){if(r.dump&&t===r.dump.charCodeAt(0)){E+="?"}else{E+="? "}}E+=r.dump;if(h){E+=generateNextLine(r,n)}if(!writeNode(r,n+1,a,true,h)){continue}if(r.dump&&t===r.dump.charCodeAt(0)){E+=":"}else{E+=": "}E+=r.dump;f+=E}r.tag=s;r.dump=f||"{}"}function detectType(r,n,i){var o,f,s,l,t,p;f=i?r.explicitTypes:r.implicitTypes;for(s=0,l=f.length;s tag resolver accepts not "'+p+'" style')}r.dump=o}return true}}return false}function writeNode(r,n,i,o,f,s){r.tag=null;r.dump=i;if(!detectType(r,i,false)){detectType(r,i,true)}var c=u.call(r.dump);if(o){o=r.flowLevel<0||r.flowLevel>n}var l=c==="[object Object]"||c==="[object Array]",t,p;if(l){t=r.duplicates.indexOf(i);p=t!==-1}if(r.tag!==null&&r.tag!=="?"||p||r.indent!==2&&n>0){f=false}if(p&&r.usedDuplicates[t]){r.dump="*ref_"+t}else{if(l&&p&&!r.usedDuplicates[t]){r.usedDuplicates[t]=true}if(c==="[object Object]"){if(o&&Object.keys(r.dump).length!==0){writeBlockMapping(r,n,r.dump,f);if(p){r.dump="&ref_"+t+r.dump}}else{writeFlowMapping(r,n,r.dump);if(p){r.dump="&ref_"+t+" "+r.dump}}}else if(c==="[object Array]"){var a=r.noArrayIndent&&n>0?n-1:n;if(o&&r.dump.length!==0){writeBlockSequence(r,a,r.dump,f);if(p){r.dump="&ref_"+t+r.dump}}else{writeFlowSequence(r,a,r.dump);if(p){r.dump="&ref_"+t+" "+r.dump}}}else if(c==="[object String]"){if(r.tag!=="?"){writeScalar(r,r.dump,n,s)}}else{if(r.skipInvalid)return false;throw new e("unacceptable kind of an object to dump "+c)}if(r.tag!==null&&r.tag!=="?"){r.dump="!<"+r.tag+"> "+r.dump}}return true}function getDuplicateReferences(r,n){var i=[],o=[],e,f;inspectNode(r,i,o);for(e=0,f=o.length;e{"use strict";function YAMLException(r,n){Error.call(this);this.name="YAMLException";this.reason=r;this.mark=n;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(r){var n=this.name+": ";n+=this.reason||"(unknown reason)";if(!r&&this.mark){n+=" "+this.mark.toString()}return n};r.exports=YAMLException},5190:(r,n,i)=>{"use strict";var o=i(9136);var e=i(5199);var f=i(5426);var s=i(8949);var u=i(6874);var c=Object.prototype.hasOwnProperty;var l=1;var t=2;var p=3;var a=4;var h=1;var E=2;var A=3;var S=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var w=/[\x85\u2028\u2029]/;var v=/[,\[\]\{\}]/;var O=/^(?:!|!!|![a-z\-]+!)$/i;var g=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(r){return Object.prototype.toString.call(r)}function is_EOL(r){return r===10||r===13}function is_WHITE_SPACE(r){return r===9||r===32}function is_WS_OR_EOL(r){return r===9||r===32||r===10||r===13}function is_FLOW_INDICATOR(r){return r===44||r===91||r===93||r===123||r===125}function fromHexCode(r){var n;if(48<=r&&r<=57){return r-48}n=r|32;if(97<=n&&n<=102){return n-97+10}return-1}function escapedHexLen(r){if(r===120){return 2}if(r===117){return 4}if(r===85){return 8}return 0}function fromDecimalCode(r){if(48<=r&&r<=57){return r-48}return-1}function simpleEscapeSequence(r){return r===48?"\0":r===97?"":r===98?"\b":r===116?"\t":r===9?"\t":r===110?"\n":r===118?"\v":r===102?"\f":r===114?"\r":r===101?"":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}function charFromCodepoint(r){if(r<=65535){return String.fromCharCode(r)}return String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var $=new Array(256);var I=new Array(256);for(var F=0;F<256;F++){$[F]=simpleEscapeSequence(F)?1:0;I[F]=simpleEscapeSequence(F)}function State(r,n){this.input=r;this.filename=n["filename"]||null;this.schema=n["schema"]||u;this.onWarning=n["onWarning"]||null;this.legacy=n["legacy"]||false;this.json=n["json"]||false;this.listener=n["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=r.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(r,n){return new e(n,new f(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function throwError(r,n){throw generateError(r,n)}function throwWarning(r,n){if(r.onWarning){r.onWarning.call(null,generateError(r,n))}}var m={YAML:function handleYamlDirective(r,n,i){var o,e,f;if(r.version!==null){throwError(r,"duplication of %YAML directive")}if(i.length!==1){throwError(r,"YAML directive accepts exactly one argument")}o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]);if(o===null){throwError(r,"ill-formed argument of the YAML directive")}e=parseInt(o[1],10);f=parseInt(o[2],10);if(e!==1){throwError(r,"unacceptable YAML version of the document")}r.version=i[0];r.checkLineBreaks=f<2;if(f!==1&&f!==2){throwWarning(r,"unsupported YAML version of the document")}},TAG:function handleTagDirective(r,n,i){var o,e;if(i.length!==2){throwError(r,"TAG directive accepts exactly two arguments")}o=i[0];e=i[1];if(!O.test(o)){throwError(r,"ill-formed tag handle (first argument) of the TAG directive")}if(c.call(r.tagMap,o)){throwError(r,'there is a previously declared suffix for "'+o+'" tag handle')}if(!g.test(e)){throwError(r,"ill-formed tag prefix (second argument) of the TAG directive")}r.tagMap[o]=e}};function captureSegment(r,n,i,o){var e,f,s,u;if(n1){r.result+=o.repeat("\n",n-1)}}function readPlainScalar(r,n,i){var o,e,f,s,u,c,l,t,p=r.kind,a=r.result,h;h=r.input.charCodeAt(r.position);if(is_WS_OR_EOL(h)||is_FLOW_INDICATOR(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96){return false}if(h===63||h===45){e=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(e)||i&&is_FLOW_INDICATOR(e)){return false}}r.kind="scalar";r.result="";f=s=r.position;u=false;while(h!==0){if(h===58){e=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(e)||i&&is_FLOW_INDICATOR(e)){break}}else if(h===35){o=r.input.charCodeAt(r.position-1);if(is_WS_OR_EOL(o)){break}}else if(r.position===r.lineStart&&testDocumentSeparator(r)||i&&is_FLOW_INDICATOR(h)){break}else if(is_EOL(h)){c=r.line;l=r.lineStart;t=r.lineIndent;skipSeparationSpace(r,false,-1);if(r.lineIndent>=n){u=true;h=r.input.charCodeAt(r.position);continue}else{r.position=s;r.line=c;r.lineStart=l;r.lineIndent=t;break}}if(u){captureSegment(r,f,s,false);writeFoldedLines(r,r.line-c);f=s=r.position;u=false}if(!is_WHITE_SPACE(h)){s=r.position+1}h=r.input.charCodeAt(++r.position)}captureSegment(r,f,s,false);if(r.result){return true}r.kind=p;r.result=a;return false}function readSingleQuotedScalar(r,n){var i,o,e;i=r.input.charCodeAt(r.position);if(i!==39){return false}r.kind="scalar";r.result="";r.position++;o=e=r.position;while((i=r.input.charCodeAt(r.position))!==0){if(i===39){captureSegment(r,o,r.position,true);i=r.input.charCodeAt(++r.position);if(i===39){o=r.position;r.position++;e=r.position}else{return true}}else if(is_EOL(i)){captureSegment(r,o,e,true);writeFoldedLines(r,skipSeparationSpace(r,false,n));o=e=r.position}else if(r.position===r.lineStart&&testDocumentSeparator(r)){throwError(r,"unexpected end of the document within a single quoted scalar")}else{r.position++;e=r.position}}throwError(r,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(r,n){var i,o,e,f,s,u;u=r.input.charCodeAt(r.position);if(u!==34){return false}r.kind="scalar";r.result="";r.position++;i=o=r.position;while((u=r.input.charCodeAt(r.position))!==0){if(u===34){captureSegment(r,i,r.position,true);r.position++;return true}else if(u===92){captureSegment(r,i,r.position,true);u=r.input.charCodeAt(++r.position);if(is_EOL(u)){skipSeparationSpace(r,false,n)}else if(u<256&&$[u]){r.result+=I[u];r.position++}else if((s=escapedHexLen(u))>0){e=s;f=0;for(;e>0;e--){u=r.input.charCodeAt(++r.position);if((s=fromHexCode(u))>=0){f=(f<<4)+s}else{throwError(r,"expected hexadecimal character")}}r.result+=charFromCodepoint(f);r.position++}else{throwError(r,"unknown escape sequence")}i=o=r.position}else if(is_EOL(u)){captureSegment(r,i,o,true);writeFoldedLines(r,skipSeparationSpace(r,false,n));i=o=r.position}else if(r.position===r.lineStart&&testDocumentSeparator(r)){throwError(r,"unexpected end of the document within a double quoted scalar")}else{r.position++;o=r.position}}throwError(r,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(r,n){var i=true,o,e=r.tag,f,s=r.anchor,u,c,t,p,a,h={},E,A,S,w;w=r.input.charCodeAt(r.position);if(w===91){c=93;a=false;f=[]}else if(w===123){c=125;a=true;f={}}else{return false}if(r.anchor!==null){r.anchorMap[r.anchor]=f}w=r.input.charCodeAt(++r.position);while(w!==0){skipSeparationSpace(r,true,n);w=r.input.charCodeAt(r.position);if(w===c){r.position++;r.tag=e;r.anchor=s;r.kind=a?"mapping":"sequence";r.result=f;return true}else if(!i){throwError(r,"missed comma between flow collection entries")}A=E=S=null;t=p=false;if(w===63){u=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(u)){t=p=true;r.position++;skipSeparationSpace(r,true,n)}}o=r.line;composeNode(r,n,l,false,true);A=r.tag;E=r.result;skipSeparationSpace(r,true,n);w=r.input.charCodeAt(r.position);if((p||r.line===o)&&w===58){t=true;w=r.input.charCodeAt(++r.position);skipSeparationSpace(r,true,n);composeNode(r,n,l,false,true);S=r.result}if(a){storeMappingPair(r,f,h,A,E,S)}else if(t){f.push(storeMappingPair(r,null,h,A,E,S))}else{f.push(E)}skipSeparationSpace(r,true,n);w=r.input.charCodeAt(r.position);if(w===44){i=true;w=r.input.charCodeAt(++r.position)}else{i=false}}throwError(r,"unexpected end of the stream within a flow collection")}function readBlockScalar(r,n){var i,e,f=h,s=false,u=false,c=n,l=0,t=false,p,a;a=r.input.charCodeAt(r.position);if(a===124){e=false}else if(a===62){e=true}else{return false}r.kind="scalar";r.result="";while(a!==0){a=r.input.charCodeAt(++r.position);if(a===43||a===45){if(h===f){f=a===43?A:E}else{throwError(r,"repeat of a chomping mode identifier")}}else if((p=fromDecimalCode(a))>=0){if(p===0){throwError(r,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!u){c=n+p-1;u=true}else{throwError(r,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(a)){do{a=r.input.charCodeAt(++r.position)}while(is_WHITE_SPACE(a));if(a===35){do{a=r.input.charCodeAt(++r.position)}while(!is_EOL(a)&&a!==0)}}while(a!==0){readLineBreak(r);r.lineIndent=0;a=r.input.charCodeAt(r.position);while((!u||r.lineIndentc){c=r.lineIndent}if(is_EOL(a)){l++;continue}if(r.lineIndentn)&&c!==0){throwError(r,"bad indentation of a sequence entry")}else if(r.lineIndentn){if(composeNode(r,n,a,true,e)){if(S){E=r.result}else{A=r.result}}if(!S){storeMappingPair(r,l,p,h,E,A,f,s);h=E=A=null}skipSeparationSpace(r,true,-1);v=r.input.charCodeAt(r.position)}if(r.lineIndent>n&&v!==0){throwError(r,"bad indentation of a mapping entry")}else if(r.lineIndentn){h=1}else if(r.lineIndent===n){h=0}else if(r.lineIndentn){h=1}else if(r.lineIndent===n){h=0}else if(r.lineIndent tag; it should be "scalar", not "'+r.kind+'"')}for(S=0,w=r.implicitTypes.length;S tag; it should be "'+v.kind+'", not "'+r.kind+'"')}if(!v.resolve(r.result)){throwError(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}else{r.result=v.construct(r.result);if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}}else{throwError(r,"unknown tag !<"+r.tag+">")}}if(r.listener!==null){r.listener("close",r)}return r.tag!==null||r.anchor!==null||A}function readDocument(r){var n=r.position,i,o,e,f=false,s;r.version=null;r.checkLineBreaks=r.legacy;r.tagMap={};r.anchorMap={};while((s=r.input.charCodeAt(r.position))!==0){skipSeparationSpace(r,true,-1);s=r.input.charCodeAt(r.position);if(r.lineIndent>0||s!==37){break}f=true;s=r.input.charCodeAt(++r.position);i=r.position;while(s!==0&&!is_WS_OR_EOL(s)){s=r.input.charCodeAt(++r.position)}o=r.input.slice(i,r.position);e=[];if(o.length<1){throwError(r,"directive name must not be less than one character in length")}while(s!==0){while(is_WHITE_SPACE(s)){s=r.input.charCodeAt(++r.position)}if(s===35){do{s=r.input.charCodeAt(++r.position)}while(s!==0&&!is_EOL(s));break}if(is_EOL(s))break;i=r.position;while(s!==0&&!is_WS_OR_EOL(s)){s=r.input.charCodeAt(++r.position)}e.push(r.input.slice(i,r.position))}if(s!==0)readLineBreak(r);if(c.call(m,o)){m[o](r,o,e)}else{throwWarning(r,'unknown document directive "'+o+'"')}}skipSeparationSpace(r,true,-1);if(r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45){r.position+=3;skipSeparationSpace(r,true,-1)}else if(f){throwError(r,"directives end mark is expected")}composeNode(r,r.lineIndent-1,a,false,true);skipSeparationSpace(r,true,-1);if(r.checkLineBreaks&&w.test(r.input.slice(n,r.position))){throwWarning(r,"non-ASCII line breaks are interpreted as content")}r.documents.push(r.result);if(r.position===r.lineStart&&testDocumentSeparator(r)){if(r.input.charCodeAt(r.position)===46){r.position+=3;skipSeparationSpace(r,true,-1)}return}if(r.position{"use strict";var o=i(9136);function Mark(r,n,i,o,e){this.name=r;this.buffer=n;this.position=i;this.line=o;this.column=e}Mark.prototype.getSnippet=function getSnippet(r,n){var i,e,f,s,u;if(!this.buffer)return null;r=r||4;n=n||75;i="";e=this.position;while(e>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(e-1))===-1){e-=1;if(this.position-e>n/2-1){i=" ... ";e+=5;break}}f="";s=this.position;while(sn/2-1){f=" ... ";s-=5;break}}u=this.buffer.slice(e,s);return o.repeat(" ",r)+i+u+f+"\n"+o.repeat(" ",r+this.position-e+i.length)+"^"};Mark.prototype.toString=function toString(r){var n,i="";if(this.name){i+='in "'+this.name+'" '}i+="at line "+(this.line+1)+", column "+(this.column+1);if(!r){n=this.getSnippet();if(n){i+=":\n"+n}}return i};r.exports=Mark},6514:(r,n,i)=>{"use strict";var o=i(9136);var e=i(5199);var f=i(967);function compileList(r,n,i){var o=[];r.include.forEach(function(r){i=compileList(r,n,i)});r[n].forEach(function(r){i.forEach(function(n,i){if(n.tag===r.tag&&n.kind===r.kind){o.push(i)}});i.push(r)});return i.filter(function(r,n){return o.indexOf(n)===-1})}function compileMap(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},n,i;function collectType(n){r[n.kind][n.tag]=r["fallback"][n.tag]=n}for(n=0,i=arguments.length;n{"use strict";var o=i(6514);r.exports=new o({include:[i(1571)]})},6874:(r,n,i)=>{"use strict";var o=i(6514);r.exports=o.DEFAULT=new o({include:[i(8949)],explicit:[i(5914),i(9242),i(7278)]})},8949:(r,n,i)=>{"use strict";var o=i(6514);r.exports=new o({include:[i(2183)],implicit:[i(3714),i(1393)],explicit:[i(2551),i(6668),i(6039),i(9237)]})},6037:(r,n,i)=>{"use strict";var o=i(6514);r.exports=new o({explicit:[i(2672),i(5490),i(1173)]})},1571:(r,n,i)=>{"use strict";var o=i(6514);r.exports=new o({include:[i(6037)],implicit:[i(2671),i(4675),i(9963),i(5564)]})},967:(r,n,i)=>{"use strict";var o=i(5199);var e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var f=["scalar","sequence","mapping"];function compileStyleAliases(r){var n={};if(r!==null){Object.keys(r).forEach(function(i){r[i].forEach(function(r){n[String(r)]=i})})}return n}function Type(r,n){n=n||{};Object.keys(n).forEach(function(n){if(e.indexOf(n)===-1){throw new o('Unknown option "'+n+'" is met in definition of "'+r+'" YAML type.')}});this.tag=r;this.kind=n["kind"]||null;this.resolve=n["resolve"]||function(){return true};this.construct=n["construct"]||function(r){return r};this.instanceOf=n["instanceOf"]||null;this.predicate=n["predicate"]||null;this.represent=n["represent"]||null;this.defaultStyle=n["defaultStyle"]||null;this.styleAliases=compileStyleAliases(n["styleAliases"]||null);if(f.indexOf(this.kind)===-1){throw new o('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}}r.exports=Type},2551:(r,n,i)=>{"use strict";var o;try{var e=require;o=e("buffer").Buffer}catch(r){}var f=i(967);var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(r){if(r===null)return false;var n,i,o=0,e=r.length,f=s;for(i=0;i64)continue;if(n<0)return false;o+=6}return o%8===0}function constructYamlBinary(r){var n,i,e=r.replace(/[\r\n=]/g,""),f=e.length,u=s,c=0,l=[];for(n=0;n>16&255);l.push(c>>8&255);l.push(c&255)}c=c<<6|u.indexOf(e.charAt(n))}i=f%4*6;if(i===0){l.push(c>>16&255);l.push(c>>8&255);l.push(c&255)}else if(i===18){l.push(c>>10&255);l.push(c>>2&255)}else if(i===12){l.push(c>>4&255)}if(o){return o.from?o.from(l):new o(l)}return l}function representYamlBinary(r){var n="",i=0,o,e,f=r.length,u=s;for(o=0;o>18&63];n+=u[i>>12&63];n+=u[i>>6&63];n+=u[i&63]}i=(i<<8)+r[o]}e=f%3;if(e===0){n+=u[i>>18&63];n+=u[i>>12&63];n+=u[i>>6&63];n+=u[i&63]}else if(e===2){n+=u[i>>10&63];n+=u[i>>4&63];n+=u[i<<2&63];n+=u[64]}else if(e===1){n+=u[i>>2&63];n+=u[i<<4&63];n+=u[64];n+=u[64]}return n}function isBinary(r){return o&&o.isBuffer(r)}r.exports=new f("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},4675:(r,n,i)=>{"use strict";var o=i(967);function resolveYamlBoolean(r){if(r===null)return false;var n=r.length;return n===4&&(r==="true"||r==="True"||r==="TRUE")||n===5&&(r==="false"||r==="False"||r==="FALSE")}function constructYamlBoolean(r){return r==="true"||r==="True"||r==="TRUE"}function isBoolean(r){return Object.prototype.toString.call(r)==="[object Boolean]"}r.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})},5564:(r,n,i)=>{"use strict";var o=i(9136);var e=i(967);var f=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(r){if(r===null)return false;if(!f.test(r)||r[r.length-1]==="_"){return false}return true}function constructYamlFloat(r){var n,i,o,e;n=r.replace(/_/g,"").toLowerCase();i=n[0]==="-"?-1:1;e=[];if("+-".indexOf(n[0])>=0){n=n.slice(1)}if(n===".inf"){return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(n===".nan"){return NaN}else if(n.indexOf(":")>=0){n.split(":").forEach(function(r){e.unshift(parseFloat(r,10))});n=0;o=1;e.forEach(function(r){n+=r*o;o*=60});return i*n}return i*parseFloat(n,10)}var s=/^[-+]?[0-9]+e/;function representYamlFloat(r,n){var i;if(isNaN(r)){switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===r){switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===r){switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(o.isNegativeZero(r)){return"-0.0"}i=r.toString(10);return s.test(i)?i.replace("e",".e"):i}function isFloat(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||o.isNegativeZero(r))}r.exports=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},9963:(r,n,i)=>{"use strict";var o=i(9136);var e=i(967);function isHexCode(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function isOctCode(r){return 48<=r&&r<=55}function isDecCode(r){return 48<=r&&r<=57}function resolveYamlInteger(r){if(r===null)return false;var n=r.length,i=0,o=false,e;if(!n)return false;e=r[i];if(e==="-"||e==="+"){e=r[++i]}if(e==="0"){if(i+1===n)return true;e=r[++i];if(e==="b"){i++;for(;i=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},7278:(r,n,i)=>{"use strict";var o;try{var e=require;o=e("esprima")}catch(r){if(typeof window!=="undefined")o=window.esprima}var f=i(967);function resolveJavascriptFunction(r){if(r===null)return false;try{var n="("+r+")",i=o.parse(n,{range:true});if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(r){return false}}function constructJavascriptFunction(r){var n="("+r+")",i=o.parse(n,{range:true}),e=[],f;if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}i.body[0].expression.params.forEach(function(r){e.push(r.name)});f=i.body[0].expression.body.range;if(i.body[0].expression.body.type==="BlockStatement"){return new Function(e,n.slice(f[0]+1,f[1]-1))}return new Function(e,"return "+n.slice(f[0],f[1]))}function representJavascriptFunction(r){return r.toString()}function isFunction(r){return Object.prototype.toString.call(r)==="[object Function]"}r.exports=new f("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},9242:(r,n,i)=>{"use strict";var o=i(967);function resolveJavascriptRegExp(r){if(r===null)return false;if(r.length===0)return false;var n=r,i=/\/([gim]*)$/.exec(r),o="";if(n[0]==="/"){if(i)o=i[1];if(o.length>3)return false;if(n[n.length-o.length-1]!=="/")return false}return true}function constructJavascriptRegExp(r){var n=r,i=/\/([gim]*)$/.exec(r),o="";if(n[0]==="/"){if(i)o=i[1];n=n.slice(1,n.length-o.length-1)}return new RegExp(n,o)}function representJavascriptRegExp(r){var n="/"+r.source+"/";if(r.global)n+="g";if(r.multiline)n+="m";if(r.ignoreCase)n+="i";return n}function isRegExp(r){return Object.prototype.toString.call(r)==="[object RegExp]"}r.exports=new o("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},5914:(r,n,i)=>{"use strict";var o=i(967);function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(r){return typeof r==="undefined"}r.exports=new o("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},1173:(r,n,i)=>{"use strict";var o=i(967);r.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})},1393:(r,n,i)=>{"use strict";var o=i(967);function resolveYamlMerge(r){return r==="<<"||r===null}r.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},2671:(r,n,i)=>{"use strict";var o=i(967);function resolveYamlNull(r){if(r===null)return true;var n=r.length;return n===1&&r==="~"||n===4&&(r==="null"||r==="Null"||r==="NULL")}function constructYamlNull(){return null}function isNull(r){return r===null}r.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},6668:(r,n,i)=>{"use strict";var o=i(967);var e=Object.prototype.hasOwnProperty;var f=Object.prototype.toString;function resolveYamlOmap(r){if(r===null)return true;var n=[],i,o,s,u,c,l=r;for(i=0,o=l.length;i{"use strict";var o=i(967);var e=Object.prototype.toString;function resolveYamlPairs(r){if(r===null)return true;var n,i,o,f,s,u=r;s=new Array(u.length);for(n=0,i=u.length;n{"use strict";var o=i(967);r.exports=new o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})},9237:(r,n,i)=>{"use strict";var o=i(967);var e=Object.prototype.hasOwnProperty;function resolveYamlSet(r){if(r===null)return true;var n,i=r;for(n in i){if(e.call(i,n)){if(i[n]!==null)return false}}return true}function constructYamlSet(r){return r!==null?r:{}}r.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},2672:(r,n,i)=>{"use strict";var o=i(967);r.exports=new o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})},3714:(r,n,i)=>{"use strict";var o=i(967);var e=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var f=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(r){if(r===null)return false;if(e.exec(r)!==null)return true;if(f.exec(r)!==null)return true;return false}function constructYamlTimestamp(r){var n,i,o,s,u,c,l,t=0,p=null,a,h,E;n=e.exec(r);if(n===null)n=f.exec(r);if(n===null)throw new Error("Date resolve error");i=+n[1];o=+n[2]-1;s=+n[3];if(!n[4]){return new Date(Date.UTC(i,o,s))}u=+n[4];c=+n[5];l=+n[6];if(n[7]){t=n[7].slice(0,3);while(t.length<3){t+="0"}t=+t}if(n[9]){a=+n[10];h=+(n[11]||0);p=(a*60+h)*6e4;if(n[9]==="-")p=-p}E=new Date(Date.UTC(i,o,s,u,c,l,t));if(p)E.setTime(E.getTime()-p);return E}function representYamlTimestamp(r){return r.toISOString()}r.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},1532:(r,n,i)=>{const o=Symbol("SemVer ANY");class Comparator{static get ANY(){return o}constructor(r,n){if(!n||typeof n!=="object"){n={loose:!!n,includePrerelease:false}}if(r instanceof Comparator){if(r.loose===!!n.loose){return r}else{r=r.value}}u("comparator",r,n);this.options=n;this.loose=!!n.loose;this.parse(r);if(this.semver===o){this.value=""}else{this.value=this.operator+this.semver.version}u("comp",this)}parse(r){const n=this.options.loose?e[f.COMPARATORLOOSE]:e[f.COMPARATOR];const i=r.match(n);if(!i){throw new TypeError(`Invalid comparator: ${r}`)}this.operator=i[1]!==undefined?i[1]:"";if(this.operator==="="){this.operator=""}if(!i[2]){this.semver=o}else{this.semver=new c(i[2],this.options.loose)}}toString(){return this.value}test(r){u("Comparator.test",r,this.options.loose);if(this.semver===o||r===o){return true}if(typeof r==="string"){try{r=new c(r,this.options)}catch(r){return false}}return s(r,this.operator,this.semver,this.options)}intersects(r,n){if(!(r instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!n||typeof n!=="object"){n={loose:!!n,includePrerelease:false}}if(this.operator===""){if(this.value===""){return true}return new l(r.value,n).test(this.value)}else if(r.operator===""){if(r.value===""){return true}return new l(this.value,n).test(r.semver)}const i=(this.operator===">="||this.operator===">")&&(r.operator===">="||r.operator===">");const o=(this.operator==="<="||this.operator==="<")&&(r.operator==="<="||r.operator==="<");const e=this.semver.version===r.semver.version;const f=(this.operator===">="||this.operator==="<=")&&(r.operator===">="||r.operator==="<=");const u=s(this.semver,"<",r.semver,n)&&(this.operator===">="||this.operator===">")&&(r.operator==="<="||r.operator==="<");const c=s(this.semver,">",r.semver,n)&&(this.operator==="<="||this.operator==="<")&&(r.operator===">="||r.operator===">");return i||o||e&&f||u||c}}r.exports=Comparator;const{re:e,t:f}=i(9523);const s=i(5098);const u=i(427);const c=i(8088);const l=i(9828)},9828:(r,n,i)=>{class Range{constructor(r,n){if(!n||typeof n!=="object"){n={loose:!!n,includePrerelease:false}}if(r instanceof Range){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease){return r}else{return new Range(r.raw,n)}}if(r instanceof o){this.raw=r.value;this.set=[[r]];this.format();return this}this.options=n;this.loose=!!n.loose;this.includePrerelease=!!n.includePrerelease;this.raw=r;this.set=r.split(/\s*\|\|\s*/).map(r=>this.parseRange(r.trim())).filter(r=>r.length);if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${r}`)}this.format()}format(){this.range=this.set.map(r=>{return r.join(" ").trim()}).join("||").trim();return this.range}toString(){return this.range}parseRange(r){const n=this.options.loose;r=r.trim();const i=n?s[u.HYPHENRANGELOOSE]:s[u.HYPHENRANGE];r=r.replace(i,I(this.options.includePrerelease));e("hyphen replace",r);r=r.replace(s[u.COMPARATORTRIM],c);e("comparator trim",r,s[u.COMPARATORTRIM]);r=r.replace(s[u.TILDETRIM],l);r=r.replace(s[u.CARETTRIM],t);r=r.split(/\s+/).join(" ");const f=n?s[u.COMPARATORLOOSE]:s[u.COMPARATOR];return r.split(" ").map(r=>a(r,this.options)).join(" ").split(/\s+/).map(r=>$(r,this.options)).filter(this.options.loose?r=>!!r.match(f):()=>true).map(r=>new o(r,this.options))}intersects(r,n){if(!(r instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(i=>{return p(i,n)&&r.set.some(r=>{return p(r,n)&&i.every(i=>{return r.every(r=>{return i.intersects(r,n)})})})})}test(r){if(!r){return false}if(typeof r==="string"){try{r=new f(r,this.options)}catch(r){return false}}for(let n=0;n{let i=true;const o=r.slice();let e=o.pop();while(i&&o.length){i=o.every(r=>{return e.intersects(r,n)});e=o.pop()}return i};const a=(r,n)=>{e("comp",r,n);r=S(r,n);e("caret",r);r=E(r,n);e("tildes",r);r=v(r,n);e("xrange",r);r=g(r,n);e("stars",r);return r};const h=r=>!r||r.toLowerCase()==="x"||r==="*";const E=(r,n)=>r.trim().split(/\s+/).map(r=>{return A(r,n)}).join(" ");const A=(r,n)=>{const i=n.loose?s[u.TILDELOOSE]:s[u.TILDE];return r.replace(i,(n,i,o,f,s)=>{e("tilde",r,n,i,o,f,s);let u;if(h(i)){u=""}else if(h(o)){u=`>=${i}.0.0 <${+i+1}.0.0-0`}else if(h(f)){u=`>=${i}.${o}.0 <${i}.${+o+1}.0-0`}else if(s){e("replaceTilde pr",s);u=`>=${i}.${o}.${f}-${s} <${i}.${+o+1}.0-0`}else{u=`>=${i}.${o}.${f} <${i}.${+o+1}.0-0`}e("tilde return",u);return u})};const S=(r,n)=>r.trim().split(/\s+/).map(r=>{return w(r,n)}).join(" ");const w=(r,n)=>{e("caret",r,n);const i=n.loose?s[u.CARETLOOSE]:s[u.CARET];const o=n.includePrerelease?"-0":"";return r.replace(i,(n,i,f,s,u)=>{e("caret",r,n,i,f,s,u);let c;if(h(i)){c=""}else if(h(f)){c=`>=${i}.0.0${o} <${+i+1}.0.0-0`}else if(h(s)){if(i==="0"){c=`>=${i}.${f}.0${o} <${i}.${+f+1}.0-0`}else{c=`>=${i}.${f}.0${o} <${+i+1}.0.0-0`}}else if(u){e("replaceCaret pr",u);if(i==="0"){if(f==="0"){c=`>=${i}.${f}.${s}-${u} <${i}.${f}.${+s+1}-0`}else{c=`>=${i}.${f}.${s}-${u} <${i}.${+f+1}.0-0`}}else{c=`>=${i}.${f}.${s}-${u} <${+i+1}.0.0-0`}}else{e("no pr");if(i==="0"){if(f==="0"){c=`>=${i}.${f}.${s}${o} <${i}.${f}.${+s+1}-0`}else{c=`>=${i}.${f}.${s}${o} <${i}.${+f+1}.0-0`}}else{c=`>=${i}.${f}.${s} <${+i+1}.0.0-0`}}e("caret return",c);return c})};const v=(r,n)=>{e("replaceXRanges",r,n);return r.split(/\s+/).map(r=>{return O(r,n)}).join(" ")};const O=(r,n)=>{r=r.trim();const i=n.loose?s[u.XRANGELOOSE]:s[u.XRANGE];return r.replace(i,(i,o,f,s,u,c)=>{e("xRange",r,i,o,f,s,u,c);const l=h(f);const t=l||h(s);const p=t||h(u);const a=p;if(o==="="&&a){o=""}c=n.includePrerelease?"-0":"";if(l){if(o===">"||o==="<"){i="<0.0.0-0"}else{i="*"}}else if(o&&a){if(t){s=0}u=0;if(o===">"){o=">=";if(t){f=+f+1;s=0;u=0}else{s=+s+1;u=0}}else if(o==="<="){o="<";if(t){f=+f+1}else{s=+s+1}}if(o==="<")c="-0";i=`${o+f}.${s}.${u}${c}`}else if(t){i=`>=${f}.0.0${c} <${+f+1}.0.0-0`}else if(p){i=`>=${f}.${s}.0${c} <${f}.${+s+1}.0-0`}e("xRange return",i);return i})};const g=(r,n)=>{e("replaceStars",r,n);return r.trim().replace(s[u.STAR],"")};const $=(r,n)=>{e("replaceGTE0",r,n);return r.trim().replace(s[n.includePrerelease?u.GTE0PRE:u.GTE0],"")};const I=r=>(n,i,o,e,f,s,u,c,l,t,p,a,E)=>{if(h(o)){i=""}else if(h(e)){i=`>=${o}.0.0${r?"-0":""}`}else if(h(f)){i=`>=${o}.${e}.0${r?"-0":""}`}else if(s){i=`>=${i}`}else{i=`>=${i}${r?"-0":""}`}if(h(l)){c=""}else if(h(t)){c=`<${+l+1}.0.0-0`}else if(h(p)){c=`<${l}.${+t+1}.0-0`}else if(a){c=`<=${l}.${t}.${p}-${a}`}else if(r){c=`<${l}.${t}.${+p+1}-0`}else{c=`<=${c}`}return`${i} ${c}`.trim()};const F=(r,n,i)=>{for(let i=0;i0){const o=r[i].semver;if(o.major===n.major&&o.minor===n.minor&&o.patch===n.patch){return true}}}return false}return true}},8088:(r,n,i)=>{const o=i(427);const{MAX_LENGTH:e,MAX_SAFE_INTEGER:f}=i(2293);const{re:s,t:u}=i(9523);const{compareIdentifiers:c}=i(2463);class SemVer{constructor(r,n){if(!n||typeof n!=="object"){n={loose:!!n,includePrerelease:false}}if(r instanceof SemVer){if(r.loose===!!n.loose&&r.includePrerelease===!!n.includePrerelease){return r}else{r=r.version}}else if(typeof r!=="string"){throw new TypeError(`Invalid Version: ${r}`)}if(r.length>e){throw new TypeError(`version is longer than ${e} characters`)}o("SemVer",r,n);this.options=n;this.loose=!!n.loose;this.includePrerelease=!!n.includePrerelease;const i=r.trim().match(n.loose?s[u.LOOSE]:s[u.FULL]);if(!i){throw new TypeError(`Invalid Version: ${r}`)}this.raw=r;this.major=+i[1];this.minor=+i[2];this.patch=+i[3];if(this.major>f||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>f||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>f||this.patch<0){throw new TypeError("Invalid patch version")}if(!i[4]){this.prerelease=[]}else{this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){const n=+r;if(n>=0&&n=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(n){if(this.prerelease[0]===n){if(isNaN(this.prerelease[1])){this.prerelease=[n,0]}}else{this.prerelease=[n,0]}}break;default:throw new Error(`invalid increment argument: ${r}`)}this.format();this.raw=this.version;return this}}r.exports=SemVer},8848:(r,n,i)=>{const o=i(5925);const e=(r,n)=>{const i=o(r.trim().replace(/^[=v]+/,""),n);return i?i.version:null};r.exports=e},5098:(r,n,i)=>{const o=i(1898);const e=i(6017);const f=i(4123);const s=i(5522);const u=i(194);const c=i(7520);const l=(r,n,i,l)=>{switch(n){case"===":if(typeof r==="object")r=r.version;if(typeof i==="object")i=i.version;return r===i;case"!==":if(typeof r==="object")r=r.version;if(typeof i==="object")i=i.version;return r!==i;case"":case"=":case"==":return o(r,i,l);case"!=":return e(r,i,l);case">":return f(r,i,l);case">=":return s(r,i,l);case"<":return u(r,i,l);case"<=":return c(r,i,l);default:throw new TypeError(`Invalid operator: ${n}`)}};r.exports=l},3466:(r,n,i)=>{const o=i(8088);const e=i(5925);const{re:f,t:s}=i(9523);const u=(r,n)=>{if(r instanceof o){return r}if(typeof r==="number"){r=String(r)}if(typeof r!=="string"){return null}n=n||{};let i=null;if(!n.rtl){i=r.match(f[s.COERCE])}else{let n;while((n=f[s.COERCERTL].exec(r))&&(!i||i.index+i[0].length!==r.length)){if(!i||n.index+n[0].length!==i.index+i[0].length){i=n}f[s.COERCERTL].lastIndex=n.index+n[1].length+n[2].length}f[s.COERCERTL].lastIndex=-1}if(i===null)return null;return e(`${i[2]}.${i[3]||"0"}.${i[4]||"0"}`,n)};r.exports=u},2156:(r,n,i)=>{const o=i(8088);const e=(r,n,i)=>{const e=new o(r,i);const f=new o(n,i);return e.compare(f)||e.compareBuild(f)};r.exports=e},2804:(r,n,i)=>{const o=i(4309);const e=(r,n)=>o(r,n,true);r.exports=e},4309:(r,n,i)=>{const o=i(8088);const e=(r,n,i)=>new o(r,i).compare(new o(n,i));r.exports=e},4297:(r,n,i)=>{const o=i(5925);const e=i(1898);const f=(r,n)=>{if(e(r,n)){return null}else{const i=o(r);const e=o(n);const f=i.prerelease.length||e.prerelease.length;const s=f?"pre":"";const u=f?"prerelease":"";for(const r in i){if(r==="major"||r==="minor"||r==="patch"){if(i[r]!==e[r]){return s+r}}}return u}};r.exports=f},1898:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(r,n,i)===0;r.exports=e},4123:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(r,n,i)>0;r.exports=e},5522:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(r,n,i)>=0;r.exports=e},900:(r,n,i)=>{const o=i(8088);const e=(r,n,i,e)=>{if(typeof i==="string"){e=i;i=undefined}try{return new o(r,i).inc(n,e).version}catch(r){return null}};r.exports=e},194:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(r,n,i)<0;r.exports=e},7520:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(r,n,i)<=0;r.exports=e},6688:(r,n,i)=>{const o=i(8088);const e=(r,n)=>new o(r,n).major;r.exports=e},8447:(r,n,i)=>{const o=i(8088);const e=(r,n)=>new o(r,n).minor;r.exports=e},6017:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(r,n,i)!==0;r.exports=e},5925:(r,n,i)=>{const{MAX_LENGTH:o}=i(2293);const{re:e,t:f}=i(9523);const s=i(8088);const u=(r,n)=>{if(!n||typeof n!=="object"){n={loose:!!n,includePrerelease:false}}if(r instanceof s){return r}if(typeof r!=="string"){return null}if(r.length>o){return null}const i=n.loose?e[f.LOOSE]:e[f.FULL];if(!i.test(r)){return null}try{return new s(r,n)}catch(r){return null}};r.exports=u},2866:(r,n,i)=>{const o=i(8088);const e=(r,n)=>new o(r,n).patch;r.exports=e},4016:(r,n,i)=>{const o=i(5925);const e=(r,n)=>{const i=o(r,n);return i&&i.prerelease.length?i.prerelease:null};r.exports=e},6417:(r,n,i)=>{const o=i(4309);const e=(r,n,i)=>o(n,r,i);r.exports=e},8701:(r,n,i)=>{const o=i(2156);const e=(r,n)=>r.sort((r,i)=>o(i,r,n));r.exports=e},6055:(r,n,i)=>{const o=i(9828);const e=(r,n,i)=>{try{n=new o(n,i)}catch(r){return false}return n.test(r)};r.exports=e},1426:(r,n,i)=>{const o=i(2156);const e=(r,n)=>r.sort((r,i)=>o(r,i,n));r.exports=e},9601:(r,n,i)=>{const o=i(5925);const e=(r,n)=>{const i=o(r,n);return i?i.version:null};r.exports=e},1383:(r,n,i)=>{const o=i(9523);r.exports={re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:i(2293).SEMVER_SPEC_VERSION,SemVer:i(8088),compareIdentifiers:i(2463).compareIdentifiers,rcompareIdentifiers:i(2463).rcompareIdentifiers,parse:i(5925),valid:i(9601),clean:i(8848),inc:i(900),diff:i(4297),major:i(6688),minor:i(8447),patch:i(2866),prerelease:i(4016),compare:i(4309),rcompare:i(6417),compareLoose:i(2804),compareBuild:i(2156),sort:i(1426),rsort:i(8701),gt:i(4123),lt:i(194),eq:i(1898),neq:i(6017),gte:i(5522),lte:i(7520),cmp:i(5098),coerce:i(3466),Comparator:i(1532),Range:i(9828),satisfies:i(6055),toComparators:i(2706),maxSatisfying:i(579),minSatisfying:i(832),minVersion:i(4179),validRange:i(2098),outside:i(420),gtr:i(9380),ltr:i(3323),intersects:i(7008),simplifyRange:i(5297),subset:i(7863)}},2293:r=>{const n="2.0.0";const i=256;const o=Number.MAX_SAFE_INTEGER||9007199254740991;const e=16;r.exports={SEMVER_SPEC_VERSION:n,MAX_LENGTH:i,MAX_SAFE_INTEGER:o,MAX_SAFE_COMPONENT_LENGTH:e}},427:r=>{const n=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};r.exports=n},2463:r=>{const n=/^[0-9]+$/;const i=(r,i)=>{const o=n.test(r);const e=n.test(i);if(o&&e){r=+r;i=+i}return r===i?0:o&&!e?-1:e&&!o?1:ri(n,r);r.exports={compareIdentifiers:i,rcompareIdentifiers:o}},9523:(r,n,i)=>{const{MAX_SAFE_COMPONENT_LENGTH:o}=i(2293);const e=i(427);n=r.exports={};const f=n.re=[];const s=n.src=[];const u=n.t={};let c=0;const l=(r,n,i)=>{const o=c++;e(o,n);u[r]=o;s[o]=n;f[o]=new RegExp(n,i?"g":undefined)};l("NUMERICIDENTIFIER","0|[1-9]\\d*");l("NUMERICIDENTIFIERLOOSE","[0-9]+");l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");l("MAINVERSION",`(${s[u.NUMERICIDENTIFIER]})\\.`+`(${s[u.NUMERICIDENTIFIER]})\\.`+`(${s[u.NUMERICIDENTIFIER]})`);l("MAINVERSIONLOOSE",`(${s[u.NUMERICIDENTIFIERLOOSE]})\\.`+`(${s[u.NUMERICIDENTIFIERLOOSE]})\\.`+`(${s[u.NUMERICIDENTIFIERLOOSE]})`);l("PRERELEASEIDENTIFIER",`(?:${s[u.NUMERICIDENTIFIER]}|${s[u.NONNUMERICIDENTIFIER]})`);l("PRERELEASEIDENTIFIERLOOSE",`(?:${s[u.NUMERICIDENTIFIERLOOSE]}|${s[u.NONNUMERICIDENTIFIER]})`);l("PRERELEASE",`(?:-(${s[u.PRERELEASEIDENTIFIER]}(?:\\.${s[u.PRERELEASEIDENTIFIER]})*))`);l("PRERELEASELOOSE",`(?:-?(${s[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[u.PRERELEASEIDENTIFIERLOOSE]})*))`);l("BUILDIDENTIFIER","[0-9A-Za-z-]+");l("BUILD",`(?:\\+(${s[u.BUILDIDENTIFIER]}(?:\\.${s[u.BUILDIDENTIFIER]})*))`);l("FULLPLAIN",`v?${s[u.MAINVERSION]}${s[u.PRERELEASE]}?${s[u.BUILD]}?`);l("FULL",`^${s[u.FULLPLAIN]}$`);l("LOOSEPLAIN",`[v=\\s]*${s[u.MAINVERSIONLOOSE]}${s[u.PRERELEASELOOSE]}?${s[u.BUILD]}?`);l("LOOSE",`^${s[u.LOOSEPLAIN]}$`);l("GTLT","((?:<|>)?=?)");l("XRANGEIDENTIFIERLOOSE",`${s[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);l("XRANGEIDENTIFIER",`${s[u.NUMERICIDENTIFIER]}|x|X|\\*`);l("XRANGEPLAIN",`[v=\\s]*(${s[u.XRANGEIDENTIFIER]})`+`(?:\\.(${s[u.XRANGEIDENTIFIER]})`+`(?:\\.(${s[u.XRANGEIDENTIFIER]})`+`(?:${s[u.PRERELEASE]})?${s[u.BUILD]}?`+`)?)?`);l("XRANGEPLAINLOOSE",`[v=\\s]*(${s[u.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${s[u.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${s[u.XRANGEIDENTIFIERLOOSE]})`+`(?:${s[u.PRERELEASELOOSE]})?${s[u.BUILD]}?`+`)?)?`);l("XRANGE",`^${s[u.GTLT]}\\s*${s[u.XRANGEPLAIN]}$`);l("XRANGELOOSE",`^${s[u.GTLT]}\\s*${s[u.XRANGEPLAINLOOSE]}$`);l("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${o}})`+`(?:\\.(\\d{1,${o}}))?`+`(?:\\.(\\d{1,${o}}))?`+`(?:$|[^\\d])`);l("COERCERTL",s[u.COERCE],true);l("LONETILDE","(?:~>?)");l("TILDETRIM",`(\\s*)${s[u.LONETILDE]}\\s+`,true);n.tildeTrimReplace="$1~";l("TILDE",`^${s[u.LONETILDE]}${s[u.XRANGEPLAIN]}$`);l("TILDELOOSE",`^${s[u.LONETILDE]}${s[u.XRANGEPLAINLOOSE]}$`);l("LONECARET","(?:\\^)");l("CARETTRIM",`(\\s*)${s[u.LONECARET]}\\s+`,true);n.caretTrimReplace="$1^";l("CARET",`^${s[u.LONECARET]}${s[u.XRANGEPLAIN]}$`);l("CARETLOOSE",`^${s[u.LONECARET]}${s[u.XRANGEPLAINLOOSE]}$`);l("COMPARATORLOOSE",`^${s[u.GTLT]}\\s*(${s[u.LOOSEPLAIN]})$|^$`);l("COMPARATOR",`^${s[u.GTLT]}\\s*(${s[u.FULLPLAIN]})$|^$`);l("COMPARATORTRIM",`(\\s*)${s[u.GTLT]}\\s*(${s[u.LOOSEPLAIN]}|${s[u.XRANGEPLAIN]})`,true);n.comparatorTrimReplace="$1$2$3";l("HYPHENRANGE",`^\\s*(${s[u.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${s[u.XRANGEPLAIN]})`+`\\s*$`);l("HYPHENRANGELOOSE",`^\\s*(${s[u.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${s[u.XRANGEPLAINLOOSE]})`+`\\s*$`);l("STAR","(<|>)?=?\\s*\\*");l("GTE0","^\\s*>=\\s*0.0.0\\s*$");l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9380:(r,n,i)=>{const o=i(420);const e=(r,n,i)=>o(r,n,">",i);r.exports=e},7008:(r,n,i)=>{const o=i(9828);const e=(r,n,i)=>{r=new o(r,i);n=new o(n,i);return r.intersects(n)};r.exports=e},3323:(r,n,i)=>{const o=i(420);const e=(r,n,i)=>o(r,n,"<",i);r.exports=e},579:(r,n,i)=>{const o=i(8088);const e=i(9828);const f=(r,n,i)=>{let f=null;let s=null;let u=null;try{u=new e(n,i)}catch(r){return null}r.forEach(r=>{if(u.test(r)){if(!f||s.compare(r)===-1){f=r;s=new o(f,i)}}});return f};r.exports=f},832:(r,n,i)=>{const o=i(8088);const e=i(9828);const f=(r,n,i)=>{let f=null;let s=null;let u=null;try{u=new e(n,i)}catch(r){return null}r.forEach(r=>{if(u.test(r)){if(!f||s.compare(r)===1){f=r;s=new o(f,i)}}});return f};r.exports=f},4179:(r,n,i)=>{const o=i(8088);const e=i(9828);const f=i(4123);const s=(r,n)=>{r=new e(r,n);let i=new o("0.0.0");if(r.test(i)){return i}i=new o("0.0.0-0");if(r.test(i)){return i}i=null;for(let n=0;n{const n=new o(r.semver.version);switch(r.operator){case">":if(n.prerelease.length===0){n.patch++}else{n.prerelease.push(0)}n.raw=n.format();case"":case">=":if(!i||f(i,n)){i=n}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${r.operator}`)}})}if(i&&r.test(i)){return i}return null};r.exports=s},420:(r,n,i)=>{const o=i(8088);const e=i(1532);const{ANY:f}=e;const s=i(9828);const u=i(6055);const c=i(4123);const l=i(194);const t=i(7520);const p=i(5522);const a=(r,n,i,a)=>{r=new o(r,a);n=new s(n,a);let h,E,A,S,w;switch(i){case">":h=c;E=t;A=l;S=">";w=">=";break;case"<":h=l;E=p;A=c;S="<";w="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(u(r,n,a)){return false}for(let i=0;i{if(r.semver===f){r=new e(">=0.0.0")}s=s||r;u=u||r;if(h(r.semver,s.semver,a)){s=r}else if(A(r.semver,u.semver,a)){u=r}});if(s.operator===S||s.operator===w){return false}if((!u.operator||u.operator===S)&&E(r,u.semver)){return false}else if(u.operator===w&&A(r,u.semver)){return false}}return true};r.exports=a},5297:(r,n,i)=>{const o=i(6055);const e=i(4309);r.exports=((r,n,i)=>{const f=[];let s=null;let u=null;const c=r.sort((r,n)=>e(r,n,i));for(const r of c){const e=o(r,n,i);if(e){u=r;if(!s)s=r}else{if(u){f.push([s,u])}u=null;s=null}}if(s)f.push([s,null]);const l=[];for(const[r,n]of f){if(r===n)l.push(r);else if(!n&&r===c[0])l.push("*");else if(!n)l.push(`>=${r}`);else if(r===c[0])l.push(`<=${n}`);else l.push(`${r} - ${n}`)}const t=l.join(" || ");const p=typeof n.raw==="string"?n.raw:String(n);return t.length{const o=i(9828);const{ANY:e}=i(1532);const f=i(6055);const s=i(4309);const u=(r,n,i)=>{r=new o(r,i);n=new o(n,i);let e=false;r:for(const o of r.set){for(const r of n.set){const n=c(o,r,i);e=e||n!==null;if(n)continue r}if(e)return false}return true};const c=(r,n,i)=>{if(r.length===1&&r[0].semver===e)return n.length===1&&n[0].semver===e;const o=new Set;let u,c;for(const n of r){if(n.operator===">"||n.operator===">=")u=l(u,n,i);else if(n.operator==="<"||n.operator==="<=")c=t(c,n,i);else o.add(n.semver)}if(o.size>1)return null;let p;if(u&&c){p=s(u.semver,c.semver,i);if(p>0)return null;else if(p===0&&(u.operator!==">="||c.operator!=="<="))return null}for(const r of o){if(u&&!f(r,String(u),i))return null;if(c&&!f(r,String(c),i))return null;for(const o of n){if(!f(r,String(o),i))return false}return true}let a,h;let E,A;for(const r of n){A=A||r.operator===">"||r.operator===">=";E=E||r.operator==="<"||r.operator==="<=";if(u){if(r.operator===">"||r.operator===">="){a=l(u,r,i);if(a===r)return false}else if(u.operator===">="&&!f(u.semver,String(r),i))return false}if(c){if(r.operator==="<"||r.operator==="<="){h=t(c,r,i);if(h===r)return false}else if(c.operator==="<="&&!f(c.semver,String(r),i))return false}if(!r.operator&&(c||u)&&p!==0)return false}if(u&&E&&!c&&p!==0)return false;if(c&&A&&!u&&p!==0)return false;return true};const l=(r,n,i)=>{if(!r)return n;const o=s(r.semver,n.semver,i);return o>0?r:o<0?n:n.operator===">"&&r.operator===">="?n:r};const t=(r,n,i)=>{if(!r)return n;const o=s(r.semver,n.semver,i);return o<0?r:o>0?n:n.operator==="<"&&r.operator==="<="?n:r};r.exports=u},2706:(r,n,i)=>{const o=i(9828);const e=(r,n)=>new o(r,n).set.map(r=>r.map(r=>r.value).join(" ").trim().split(" "));r.exports=e},2098:(r,n,i)=>{const o=i(9828);const e=(r,n)=>{try{return new o(r,n).range||"*"}catch(r){return null}};r.exports=e},482:(r,n,i)=>{"use strict";i.r(n);var o=i(2186);var e=i(5747);var f=i(1917);const s=require("https");var u=i(1383);var c=undefined&&undefined.__awaiter||function(r,n,i,o){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,e){function fulfilled(r){try{step(o.next(r))}catch(r){e(r)}}function rejected(r){try{step(o["throw"](r))}catch(r){e(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((o=o.apply(r,n||[])).next())})};var l;(function(r){r["FRESH"]="fresh";r["MISSING"]="missing";r["UPDATE_AVAILABLE"]="update_available"})(l||(l={}));function setOutputs({helmfileLockState:r,helmfileLockUpdates:n}){(0,o.setOutput)("helmfile-lock-state",r);(0,o.setOutput)("helmfile-lock-updates",n)}function getIndexYAMLData(r){return new Promise((n,i)=>{s.get(r,r=>{let i="";r.on("data",r=>{i+=r});r.on("end",()=>{n((0,f.safeLoad)(i))})}).on("error",r=>{i(r.message)})})}function helmfileDepCheck(){return c(this,void 0,void 0,function*(){try{const r={helmfileLockState:l.FRESH,helmfileLockUpdates:[]};const n=(0,o.getInput)("working_directory");const i=process.cwd()+"/"+n+"/helmfile.yaml";if(!(0,e.existsSync)(i)){setOutputs(r);return}const s=(0,e.readFileSync)(i,"utf-8");const c=(0,f.safeLoad)(s);if(!c["repositories"]){setOutputs(r);return}const t=process.cwd()+"/"+n+"/helmfile.lock";if((0,e.existsSync)(t)){const n=(0,e.readFileSync)(t,"utf-8");const i=(0,f.safeLoad)(n);for(const n of i["dependencies"]){const i=n["repository"]+"/index.yaml";const o=yield getIndexYAMLData(i);const e=n["name"];const f=n["version"];if(!o["entries"][e]){console.log(`Could not find list of versions for ${e}`);continue}const s=o["entries"][e][0]["version"];if(!u.valid(f)||!u.valid(s)){console.log(`Invalid semantic version found: ${f} or ${s}`);continue}const c=u.clean(f);const t=u.clean(s);if(u.lt(c,t)){const n={name:e,repository:i,currentVer:c,latestVer:t};r.helmfileLockUpdates.push(n);r.helmfileLockState=l.UPDATE_AVAILABLE}}}else{r.helmfileLockState=l.MISSING}setOutputs(r)}catch(r){console.error(r.message);(0,o.setFailed)(`Helmfile-dep-update failure: ${r}`)}})}var t=undefined&&undefined.__awaiter||function(r,n,i,o){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,e){function fulfilled(r){try{step(o.next(r))}catch(r){e(r)}}function rejected(r){try{step(o["throw"](r))}catch(r){e(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((o=o.apply(r,n||[])).next())})};function run(){return t(this,void 0,void 0,function*(){helmfileDepCheck()})}run()},5747:r=>{"use strict";r.exports=require("fs")},2087:r=>{"use strict";r.exports=require("os")},5622:r=>{"use strict";r.exports=require("path")}};var n={};function __webpack_require__(i){if(n[i]){return n[i].exports}var o=n[i]={exports:{}};var e=true;try{r[i].call(o.exports,o,o.exports,__webpack_require__);e=false}finally{if(e)delete n[i]}return o.exports}(()=>{__webpack_require__.r=(r=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(r,"__esModule",{value:true})})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(482)})(); \ No newline at end of file +module.exports=(()=>{"use strict";var r={351:function(r,n,i){var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const f=o(i(87));const u=i(278);function issueCommand(r,n,i){const o=new Command(r,n,i);process.stdout.write(o.toString()+f.EOL)}n.issueCommand=issueCommand;function issue(r,n=""){issueCommand(r,{},n)}n.issue=issue;const e="::";class Command{constructor(r,n,i){if(!r){r="missing.command"}this.command=r;this.properties=n;this.message=i}toString(){let r=e+this.command;if(this.properties&&Object.keys(this.properties).length>0){r+=" ";let n=true;for(const i in this.properties){if(this.properties.hasOwnProperty(i)){const o=this.properties[i];if(o){if(n){n=false}else{r+=","}r+=`${i}=${escapeProperty(o)}`}}}}r+=`${e}${escapeData(this.message)}`;return r}}function escapeData(r){return u.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(r){return u.toCommandValue(r).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(r,n,i){var o=this&&this.__awaiter||function(r,n,i,o){function adopt(r){return r instanceof i?r:new i(function(n){n(r)})}return new(i||(i=Promise))(function(i,f){function fulfilled(r){try{step(o.next(r))}catch(r){f(r)}}function rejected(r){try{step(o["throw"](r))}catch(r){f(r)}}function step(r){r.done?i(r.value):adopt(r.value).then(fulfilled,rejected)}step((o=o.apply(r,n||[])).next())})};var f=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const u=i(351);const e=i(717);const l=i(278);const c=f(i(87));const p=f(i(622));var s;(function(r){r[r["Success"]=0]="Success";r[r["Failure"]=1]="Failure"})(s=n.ExitCode||(n.ExitCode={}));function exportVariable(r,n){const i=l.toCommandValue(n);process.env[r]=i;const o=process.env["GITHUB_ENV"]||"";if(o){const n="_GitHubActionsFileCommandDelimeter_";const o=`${r}<<${n}${c.EOL}${i}${c.EOL}${n}`;e.issueCommand("ENV",o)}else{u.issueCommand("set-env",{name:r},i)}}n.exportVariable=exportVariable;function setSecret(r){u.issueCommand("add-mask",{},r)}n.setSecret=setSecret;function addPath(r){const n=process.env["GITHUB_PATH"]||"";if(n){e.issueCommand("PATH",r)}else{u.issueCommand("add-path",{},r)}process.env["PATH"]=`${r}${p.delimiter}${process.env["PATH"]}`}n.addPath=addPath;function getInput(r,n){const i=process.env[`INPUT_${r.replace(/ /g,"_").toUpperCase()}`]||"";if(n&&n.required&&!i){throw new Error(`Input required and not supplied: ${r}`)}return i.trim()}n.getInput=getInput;function setOutput(r,n){u.issueCommand("set-output",{name:r},n)}n.setOutput=setOutput;function setCommandEcho(r){u.issue("echo",r?"on":"off")}n.setCommandEcho=setCommandEcho;function setFailed(r){process.exitCode=s.Failure;error(r)}n.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}n.isDebug=isDebug;function debug(r){u.issueCommand("debug",{},r)}n.debug=debug;function error(r){u.issue("error",r instanceof Error?r.toString():r)}n.error=error;function warning(r){u.issue("warning",r instanceof Error?r.toString():r)}n.warning=warning;function info(r){process.stdout.write(r+c.EOL)}n.info=info;function startGroup(r){u.issue("group",r)}n.startGroup=startGroup;function endGroup(){u.issue("endgroup")}n.endGroup=endGroup;function group(r,n){return o(this,void 0,void 0,function*(){startGroup(r);let i;try{i=yield n()}finally{endGroup()}return i})}n.group=group;function saveState(r,n){u.issueCommand("save-state",{name:r},n)}n.saveState=saveState;function getState(r){return process.env[`STATE_${r}`]||""}n.getState=getState},717:function(r,n,i){var o=this&&this.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)if(Object.hasOwnProperty.call(r,i))n[i]=r[i];n["default"]=r;return n};Object.defineProperty(n,"__esModule",{value:true});const f=o(i(747));const u=o(i(87));const e=i(278);function issueCommand(r,n){const i=process.env[`GITHUB_${r}`];if(!i){throw new Error(`Unable to find environment variable for file command ${r}`)}if(!f.existsSync(i)){throw new Error(`Missing file at path: ${i}`)}f.appendFileSync(i,`${e.toCommandValue(n)}${u.EOL}`,{encoding:"utf8"})}n.issueCommand=issueCommand},278:(r,n)=>{Object.defineProperty(n,"__esModule",{value:true});function toCommandValue(r){if(r===null||r===undefined){return""}else if(typeof r==="string"||r instanceof String){return r}return JSON.stringify(r)}n.toCommandValue=toCommandValue},917:(r,n,i)=>{var o=i(916);r.exports=o},916:(r,n,i)=>{var o=i(190);var f=i(34);function deprecated(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}r.exports.Type=i(967);r.exports.Schema=i(514);r.exports.FAILSAFE_SCHEMA=i(37);r.exports.JSON_SCHEMA=i(571);r.exports.CORE_SCHEMA=i(183);r.exports.DEFAULT_SAFE_SCHEMA=i(949);r.exports.DEFAULT_FULL_SCHEMA=i(874);r.exports.load=o.load;r.exports.loadAll=o.loadAll;r.exports.safeLoad=o.safeLoad;r.exports.safeLoadAll=o.safeLoadAll;r.exports.dump=f.dump;r.exports.safeDump=f.safeDump;r.exports.YAMLException=i(199);r.exports.MINIMAL_SCHEMA=i(37);r.exports.SAFE_SCHEMA=i(949);r.exports.DEFAULT_SCHEMA=i(874);r.exports.scan=deprecated("scan");r.exports.parse=deprecated("parse");r.exports.compose=deprecated("compose");r.exports.addConstructor=deprecated("addConstructor")},136:r=>{function isNothing(r){return typeof r==="undefined"||r===null}function isObject(r){return typeof r==="object"&&r!==null}function toArray(r){if(Array.isArray(r))return r;else if(isNothing(r))return[];return[r]}function extend(r,n){var i,o,f,u;if(n){u=Object.keys(n);for(i=0,o=u.length;i{var o=i(136);var f=i(199);var u=i(874);var e=i(949);var l=Object.prototype.toString;var c=Object.prototype.hasOwnProperty;var p=9;var s=10;var h=13;var g=32;var A=33;var m=34;var w=35;var S=37;var v=38;var a=39;var O=42;var F=44;var b=45;var E=58;var j=61;var D=62;var Y=63;var C=64;var d=91;var M=93;var W=96;var U=123;var L=124;var $=125;var _={};_[0]="\\0";_[7]="\\a";_[8]="\\b";_[9]="\\t";_[10]="\\n";_[11]="\\v";_[12]="\\f";_[13]="\\r";_[27]="\\e";_[34]='\\"';_[92]="\\\\";_[133]="\\N";_[160]="\\_";_[8232]="\\L";_[8233]="\\P";var P=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function compileStyleMap(r,n){var i,o,f,u,e,l,p;if(n===null)return{};i={};o=Object.keys(n);for(f=0,u=o.length;f0?r.charCodeAt(u-1):null;A=A&&isPlainSafe(e,l)}}else{for(u=0;uo&&r[g+1]!==" ";g=u}}else if(!isPrintable(e)){return H}l=u>0?r.charCodeAt(u-1):null;A=A&&isPlainSafe(e,l)}p=p||h&&(u-g-1>o&&r[g+1]!==" ")}if(!c&&!p){return A&&!f(r)?B:J}if(i>9&&needIndentIndicator(r)){return H}return p?V:q}function writeScalar(r,n,i,o){r.dump=function(){if(n.length===0){return"''"}if(!r.noCompatMode&&P.indexOf(n)!==-1){return"'"+n+"'"}var u=r.indent*Math.max(1,i);var e=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-u);var l=o||r.flowLevel>-1&&i>=r.flowLevel;function testAmbiguity(n){return testImplicitResolving(r,n)}switch(chooseScalarStyle(n,l,r.indent,e,testAmbiguity)){case B:return n;case J:return"'"+n.replace(/'/g,"''")+"'";case q:return"|"+blockHeader(n,r.indent)+dropEndingNewline(indentString(n,u));case V:return">"+blockHeader(n,r.indent)+dropEndingNewline(indentString(foldString(n,e),u));case H:return'"'+escapeString(n,e)+'"';default:throw new f("impossible error: invalid scalar style")}}()}function blockHeader(r,n){var i=needIndentIndicator(r)?String(n):"";var o=r[r.length-1]==="\n";var f=o&&(r[r.length-2]==="\n"||r==="\n");var u=f?"+":o?"":"-";return i+u+"\n"}function dropEndingNewline(r){return r[r.length-1]==="\n"?r.slice(0,-1):r}function foldString(r,n){var i=/(\n+)([^\n]*)/g;var o=function(){var o=r.indexOf("\n");o=o!==-1?o:r.length;i.lastIndex=o;return foldLine(r.slice(0,o),n)}();var f=r[0]==="\n"||r[0]===" ";var u;var e;while(e=i.exec(r)){var l=e[1],c=e[2];u=c[0]===" ";o+=l+(!f&&!u&&c!==""?"\n":"")+foldLine(c,n);f=u}return o}function foldLine(r,n){if(r===""||r[0]===" ")return r;var i=/ [^ ]/g;var o;var f=0,u,e=0,l=0;var c="";while(o=i.exec(r)){l=o.index;if(l-f>n){u=e>f?e:l;c+="\n"+r.slice(f,u);f=u+1}e=l}c+="\n";if(r.length-f>n&&e>f){c+=r.slice(f,e)+"\n"+r.slice(e+1)}else{c+=r.slice(f)}return c.slice(1)}function escapeString(r){var n="";var i,o;var f;for(var u=0;u=55296&&i<=56319){o=r.charCodeAt(u+1);if(o>=56320&&o<=57343){n+=encodeHex((i-55296)*1024+o-56320+65536);u++;continue}}f=_[i];n+=!f&&isPrintable(i)?r[u]:f||encodeHex(i)}return n}function writeFlowSequence(r,n,i){var o="",f=r.tag,u,e;for(u=0,e=i.length;u1024)s+="? ";s+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" ");if(!writeNode(r,n,p,false,false)){continue}s+=r.dump;o+=s}r.tag=f;r.dump="{"+o+"}"}function writeBlockMapping(r,n,i,o){var u="",e=r.tag,l=Object.keys(i),c,p,h,g,A,m;if(r.sortKeys===true){l.sort()}else if(typeof r.sortKeys==="function"){l.sort(r.sortKeys)}else if(r.sortKeys){throw new f("sortKeys must be a boolean or a function")}for(c=0,p=l.length;c1024;if(A){if(r.dump&&s===r.dump.charCodeAt(0)){m+="?"}else{m+="? "}}m+=r.dump;if(A){m+=generateNextLine(r,n)}if(!writeNode(r,n+1,g,true,A)){continue}if(r.dump&&s===r.dump.charCodeAt(0)){m+=":"}else{m+=": "}m+=r.dump;u+=m}r.tag=e;r.dump=u||"{}"}function detectType(r,n,i){var o,u,e,p,s,h;u=i?r.explicitTypes:r.implicitTypes;for(e=0,p=u.length;e tag resolver accepts not "'+h+'" style')}r.dump=o}return true}}return false}function writeNode(r,n,i,o,u,e){r.tag=null;r.dump=i;if(!detectType(r,i,false)){detectType(r,i,true)}var c=l.call(r.dump);if(o){o=r.flowLevel<0||r.flowLevel>n}var p=c==="[object Object]"||c==="[object Array]",s,h;if(p){s=r.duplicates.indexOf(i);h=s!==-1}if(r.tag!==null&&r.tag!=="?"||h||r.indent!==2&&n>0){u=false}if(h&&r.usedDuplicates[s]){r.dump="*ref_"+s}else{if(p&&h&&!r.usedDuplicates[s]){r.usedDuplicates[s]=true}if(c==="[object Object]"){if(o&&Object.keys(r.dump).length!==0){writeBlockMapping(r,n,r.dump,u);if(h){r.dump="&ref_"+s+r.dump}}else{writeFlowMapping(r,n,r.dump);if(h){r.dump="&ref_"+s+" "+r.dump}}}else if(c==="[object Array]"){var g=r.noArrayIndent&&n>0?n-1:n;if(o&&r.dump.length!==0){writeBlockSequence(r,g,r.dump,u);if(h){r.dump="&ref_"+s+r.dump}}else{writeFlowSequence(r,g,r.dump);if(h){r.dump="&ref_"+s+" "+r.dump}}}else if(c==="[object String]"){if(r.tag!=="?"){writeScalar(r,r.dump,n,e)}}else{if(r.skipInvalid)return false;throw new f("unacceptable kind of an object to dump "+c)}if(r.tag!==null&&r.tag!=="?"){r.dump="!<"+r.tag+"> "+r.dump}}return true}function getDuplicateReferences(r,n){var i=[],o=[],f,u;inspectNode(r,i,o);for(f=0,u=o.length;f{function YAMLException(r,n){Error.call(this);this.name="YAMLException";this.reason=r;this.mark=n;this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"");if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack||""}}YAMLException.prototype=Object.create(Error.prototype);YAMLException.prototype.constructor=YAMLException;YAMLException.prototype.toString=function toString(r){var n=this.name+": ";n+=this.reason||"(unknown reason)";if(!r&&this.mark){n+=" "+this.mark.toString()}return n};r.exports=YAMLException},190:(r,n,i)=>{var o=i(136);var f=i(199);var u=i(426);var e=i(949);var l=i(874);var c=Object.prototype.hasOwnProperty;var p=1;var s=2;var h=3;var g=4;var A=1;var m=2;var w=3;var S=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;var v=/[\x85\u2028\u2029]/;var a=/[,\[\]\{\}]/;var O=/^(?:!|!!|![a-z\-]+!)$/i;var F=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function _class(r){return Object.prototype.toString.call(r)}function is_EOL(r){return r===10||r===13}function is_WHITE_SPACE(r){return r===9||r===32}function is_WS_OR_EOL(r){return r===9||r===32||r===10||r===13}function is_FLOW_INDICATOR(r){return r===44||r===91||r===93||r===123||r===125}function fromHexCode(r){var n;if(48<=r&&r<=57){return r-48}n=r|32;if(97<=n&&n<=102){return n-97+10}return-1}function escapedHexLen(r){if(r===120){return 2}if(r===117){return 4}if(r===85){return 8}return 0}function fromDecimalCode(r){if(48<=r&&r<=57){return r-48}return-1}function simpleEscapeSequence(r){return r===48?"\0":r===97?"":r===98?"\b":r===116?"\t":r===9?"\t":r===110?"\n":r===118?"\v":r===102?"\f":r===114?"\r":r===101?"":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"…":r===95?" ":r===76?"\u2028":r===80?"\u2029":""}function charFromCodepoint(r){if(r<=65535){return String.fromCharCode(r)}return String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var b=new Array(256);var E=new Array(256);for(var j=0;j<256;j++){b[j]=simpleEscapeSequence(j)?1:0;E[j]=simpleEscapeSequence(j)}function State(r,n){this.input=r;this.filename=n["filename"]||null;this.schema=n["schema"]||l;this.onWarning=n["onWarning"]||null;this.legacy=n["legacy"]||false;this.json=n["json"]||false;this.listener=n["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=r.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.documents=[]}function generateError(r,n){return new f(n,new u(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function throwError(r,n){throw generateError(r,n)}function throwWarning(r,n){if(r.onWarning){r.onWarning.call(null,generateError(r,n))}}var D={YAML:function handleYamlDirective(r,n,i){var o,f,u;if(r.version!==null){throwError(r,"duplication of %YAML directive")}if(i.length!==1){throwError(r,"YAML directive accepts exactly one argument")}o=/^([0-9]+)\.([0-9]+)$/.exec(i[0]);if(o===null){throwError(r,"ill-formed argument of the YAML directive")}f=parseInt(o[1],10);u=parseInt(o[2],10);if(f!==1){throwError(r,"unacceptable YAML version of the document")}r.version=i[0];r.checkLineBreaks=u<2;if(u!==1&&u!==2){throwWarning(r,"unsupported YAML version of the document")}},TAG:function handleTagDirective(r,n,i){var o,f;if(i.length!==2){throwError(r,"TAG directive accepts exactly two arguments")}o=i[0];f=i[1];if(!O.test(o)){throwError(r,"ill-formed tag handle (first argument) of the TAG directive")}if(c.call(r.tagMap,o)){throwError(r,'there is a previously declared suffix for "'+o+'" tag handle')}if(!F.test(f)){throwError(r,"ill-formed tag prefix (second argument) of the TAG directive")}r.tagMap[o]=f}};function captureSegment(r,n,i,o){var f,u,e,l;if(n1){r.result+=o.repeat("\n",n-1)}}function readPlainScalar(r,n,i){var o,f,u,e,l,c,p,s,h=r.kind,g=r.result,A;A=r.input.charCodeAt(r.position);if(is_WS_OR_EOL(A)||is_FLOW_INDICATOR(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96){return false}if(A===63||A===45){f=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(f)||i&&is_FLOW_INDICATOR(f)){return false}}r.kind="scalar";r.result="";u=e=r.position;l=false;while(A!==0){if(A===58){f=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(f)||i&&is_FLOW_INDICATOR(f)){break}}else if(A===35){o=r.input.charCodeAt(r.position-1);if(is_WS_OR_EOL(o)){break}}else if(r.position===r.lineStart&&testDocumentSeparator(r)||i&&is_FLOW_INDICATOR(A)){break}else if(is_EOL(A)){c=r.line;p=r.lineStart;s=r.lineIndent;skipSeparationSpace(r,false,-1);if(r.lineIndent>=n){l=true;A=r.input.charCodeAt(r.position);continue}else{r.position=e;r.line=c;r.lineStart=p;r.lineIndent=s;break}}if(l){captureSegment(r,u,e,false);writeFoldedLines(r,r.line-c);u=e=r.position;l=false}if(!is_WHITE_SPACE(A)){e=r.position+1}A=r.input.charCodeAt(++r.position)}captureSegment(r,u,e,false);if(r.result){return true}r.kind=h;r.result=g;return false}function readSingleQuotedScalar(r,n){var i,o,f;i=r.input.charCodeAt(r.position);if(i!==39){return false}r.kind="scalar";r.result="";r.position++;o=f=r.position;while((i=r.input.charCodeAt(r.position))!==0){if(i===39){captureSegment(r,o,r.position,true);i=r.input.charCodeAt(++r.position);if(i===39){o=r.position;r.position++;f=r.position}else{return true}}else if(is_EOL(i)){captureSegment(r,o,f,true);writeFoldedLines(r,skipSeparationSpace(r,false,n));o=f=r.position}else if(r.position===r.lineStart&&testDocumentSeparator(r)){throwError(r,"unexpected end of the document within a single quoted scalar")}else{r.position++;f=r.position}}throwError(r,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(r,n){var i,o,f,u,e,l;l=r.input.charCodeAt(r.position);if(l!==34){return false}r.kind="scalar";r.result="";r.position++;i=o=r.position;while((l=r.input.charCodeAt(r.position))!==0){if(l===34){captureSegment(r,i,r.position,true);r.position++;return true}else if(l===92){captureSegment(r,i,r.position,true);l=r.input.charCodeAt(++r.position);if(is_EOL(l)){skipSeparationSpace(r,false,n)}else if(l<256&&b[l]){r.result+=E[l];r.position++}else if((e=escapedHexLen(l))>0){f=e;u=0;for(;f>0;f--){l=r.input.charCodeAt(++r.position);if((e=fromHexCode(l))>=0){u=(u<<4)+e}else{throwError(r,"expected hexadecimal character")}}r.result+=charFromCodepoint(u);r.position++}else{throwError(r,"unknown escape sequence")}i=o=r.position}else if(is_EOL(l)){captureSegment(r,i,o,true);writeFoldedLines(r,skipSeparationSpace(r,false,n));i=o=r.position}else if(r.position===r.lineStart&&testDocumentSeparator(r)){throwError(r,"unexpected end of the document within a double quoted scalar")}else{r.position++;o=r.position}}throwError(r,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(r,n){var i=true,o,f=r.tag,u,e=r.anchor,l,c,s,h,g,A={},m,w,S,v;v=r.input.charCodeAt(r.position);if(v===91){c=93;g=false;u=[]}else if(v===123){c=125;g=true;u={}}else{return false}if(r.anchor!==null){r.anchorMap[r.anchor]=u}v=r.input.charCodeAt(++r.position);while(v!==0){skipSeparationSpace(r,true,n);v=r.input.charCodeAt(r.position);if(v===c){r.position++;r.tag=f;r.anchor=e;r.kind=g?"mapping":"sequence";r.result=u;return true}else if(!i){throwError(r,"missed comma between flow collection entries")}w=m=S=null;s=h=false;if(v===63){l=r.input.charCodeAt(r.position+1);if(is_WS_OR_EOL(l)){s=h=true;r.position++;skipSeparationSpace(r,true,n)}}o=r.line;composeNode(r,n,p,false,true);w=r.tag;m=r.result;skipSeparationSpace(r,true,n);v=r.input.charCodeAt(r.position);if((h||r.line===o)&&v===58){s=true;v=r.input.charCodeAt(++r.position);skipSeparationSpace(r,true,n);composeNode(r,n,p,false,true);S=r.result}if(g){storeMappingPair(r,u,A,w,m,S)}else if(s){u.push(storeMappingPair(r,null,A,w,m,S))}else{u.push(m)}skipSeparationSpace(r,true,n);v=r.input.charCodeAt(r.position);if(v===44){i=true;v=r.input.charCodeAt(++r.position)}else{i=false}}throwError(r,"unexpected end of the stream within a flow collection")}function readBlockScalar(r,n){var i,f,u=A,e=false,l=false,c=n,p=0,s=false,h,g;g=r.input.charCodeAt(r.position);if(g===124){f=false}else if(g===62){f=true}else{return false}r.kind="scalar";r.result="";while(g!==0){g=r.input.charCodeAt(++r.position);if(g===43||g===45){if(A===u){u=g===43?w:m}else{throwError(r,"repeat of a chomping mode identifier")}}else if((h=fromDecimalCode(g))>=0){if(h===0){throwError(r,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!l){c=n+h-1;l=true}else{throwError(r,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(g)){do{g=r.input.charCodeAt(++r.position)}while(is_WHITE_SPACE(g));if(g===35){do{g=r.input.charCodeAt(++r.position)}while(!is_EOL(g)&&g!==0)}}while(g!==0){readLineBreak(r);r.lineIndent=0;g=r.input.charCodeAt(r.position);while((!l||r.lineIndentc){c=r.lineIndent}if(is_EOL(g)){p++;continue}if(r.lineIndentn)&&c!==0){throwError(r,"bad indentation of a sequence entry")}else if(r.lineIndentn){if(composeNode(r,n,g,true,f)){if(S){m=r.result}else{w=r.result}}if(!S){storeMappingPair(r,p,h,A,m,w,u,e);A=m=w=null}skipSeparationSpace(r,true,-1);a=r.input.charCodeAt(r.position)}if(r.lineIndent>n&&a!==0){throwError(r,"bad indentation of a mapping entry")}else if(r.lineIndentn){A=1}else if(r.lineIndent===n){A=0}else if(r.lineIndentn){A=1}else if(r.lineIndent===n){A=0}else if(r.lineIndent tag; it should be "scalar", not "'+r.kind+'"')}for(S=0,v=r.implicitTypes.length;S tag; it should be "'+a.kind+'", not "'+r.kind+'"')}if(!a.resolve(r.result)){throwError(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")}else{r.result=a.construct(r.result);if(r.anchor!==null){r.anchorMap[r.anchor]=r.result}}}else{throwError(r,"unknown tag !<"+r.tag+">")}}if(r.listener!==null){r.listener("close",r)}return r.tag!==null||r.anchor!==null||w}function readDocument(r){var n=r.position,i,o,f,u=false,e;r.version=null;r.checkLineBreaks=r.legacy;r.tagMap={};r.anchorMap={};while((e=r.input.charCodeAt(r.position))!==0){skipSeparationSpace(r,true,-1);e=r.input.charCodeAt(r.position);if(r.lineIndent>0||e!==37){break}u=true;e=r.input.charCodeAt(++r.position);i=r.position;while(e!==0&&!is_WS_OR_EOL(e)){e=r.input.charCodeAt(++r.position)}o=r.input.slice(i,r.position);f=[];if(o.length<1){throwError(r,"directive name must not be less than one character in length")}while(e!==0){while(is_WHITE_SPACE(e)){e=r.input.charCodeAt(++r.position)}if(e===35){do{e=r.input.charCodeAt(++r.position)}while(e!==0&&!is_EOL(e));break}if(is_EOL(e))break;i=r.position;while(e!==0&&!is_WS_OR_EOL(e)){e=r.input.charCodeAt(++r.position)}f.push(r.input.slice(i,r.position))}if(e!==0)readLineBreak(r);if(c.call(D,o)){D[o](r,o,f)}else{throwWarning(r,'unknown document directive "'+o+'"')}}skipSeparationSpace(r,true,-1);if(r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45){r.position+=3;skipSeparationSpace(r,true,-1)}else if(u){throwError(r,"directives end mark is expected")}composeNode(r,r.lineIndent-1,g,false,true);skipSeparationSpace(r,true,-1);if(r.checkLineBreaks&&v.test(r.input.slice(n,r.position))){throwWarning(r,"non-ASCII line breaks are interpreted as content")}r.documents.push(r.result);if(r.position===r.lineStart&&testDocumentSeparator(r)){if(r.input.charCodeAt(r.position)===46){r.position+=3;skipSeparationSpace(r,true,-1)}return}if(r.position{var o=i(136);function Mark(r,n,i,o,f){this.name=r;this.buffer=n;this.position=i;this.line=o;this.column=f}Mark.prototype.getSnippet=function getSnippet(r,n){var i,f,u,e,l;if(!this.buffer)return null;r=r||4;n=n||75;i="";f=this.position;while(f>0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(f-1))===-1){f-=1;if(this.position-f>n/2-1){i=" ... ";f+=5;break}}u="";e=this.position;while(en/2-1){u=" ... ";e-=5;break}}l=this.buffer.slice(f,e);return o.repeat(" ",r)+i+l+u+"\n"+o.repeat(" ",r+this.position-f+i.length)+"^"};Mark.prototype.toString=function toString(r){var n,i="";if(this.name){i+='in "'+this.name+'" '}i+="at line "+(this.line+1)+", column "+(this.column+1);if(!r){n=this.getSnippet();if(n){i+=":\n"+n}}return i};r.exports=Mark},514:(r,n,i)=>{var o=i(136);var f=i(199);var u=i(967);function compileList(r,n,i){var o=[];r.include.forEach(function(r){i=compileList(r,n,i)});r[n].forEach(function(r){i.forEach(function(n,i){if(n.tag===r.tag&&n.kind===r.kind){o.push(i)}});i.push(r)});return i.filter(function(r,n){return o.indexOf(n)===-1})}function compileMap(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},n,i;function collectType(n){r[n.kind][n.tag]=r["fallback"][n.tag]=n}for(n=0,i=arguments.length;n{var o=i(514);r.exports=new o({include:[i(571)]})},874:(r,n,i)=>{var o=i(514);r.exports=o.DEFAULT=new o({include:[i(949)],explicit:[i(914),i(242),i(4)]})},949:(r,n,i)=>{var o=i(514);r.exports=new o({include:[i(183)],implicit:[i(714),i(393)],explicit:[i(551),i(668),i(39),i(237)]})},37:(r,n,i)=>{var o=i(514);r.exports=new o({explicit:[i(672),i(490),i(173)]})},571:(r,n,i)=>{var o=i(514);r.exports=new o({include:[i(37)],implicit:[i(671),i(675),i(963),i(564)]})},967:(r,n,i)=>{var o=i(199);var f=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"];var u=["scalar","sequence","mapping"];function compileStyleAliases(r){var n={};if(r!==null){Object.keys(r).forEach(function(i){r[i].forEach(function(r){n[String(r)]=i})})}return n}function Type(r,n){n=n||{};Object.keys(n).forEach(function(n){if(f.indexOf(n)===-1){throw new o('Unknown option "'+n+'" is met in definition of "'+r+'" YAML type.')}});this.tag=r;this.kind=n["kind"]||null;this.resolve=n["resolve"]||function(){return true};this.construct=n["construct"]||function(r){return r};this.instanceOf=n["instanceOf"]||null;this.predicate=n["predicate"]||null;this.represent=n["represent"]||null;this.defaultStyle=n["defaultStyle"]||null;this.styleAliases=compileStyleAliases(n["styleAliases"]||null);if(u.indexOf(this.kind)===-1){throw new o('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}}r.exports=Type},551:(r,n,i)=>{var o;try{var f=require;o=f("buffer").Buffer}catch(r){}var u=i(967);var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(r){if(r===null)return false;var n,i,o=0,f=r.length,u=e;for(i=0;i64)continue;if(n<0)return false;o+=6}return o%8===0}function constructYamlBinary(r){var n,i,f=r.replace(/[\r\n=]/g,""),u=f.length,l=e,c=0,p=[];for(n=0;n>16&255);p.push(c>>8&255);p.push(c&255)}c=c<<6|l.indexOf(f.charAt(n))}i=u%4*6;if(i===0){p.push(c>>16&255);p.push(c>>8&255);p.push(c&255)}else if(i===18){p.push(c>>10&255);p.push(c>>2&255)}else if(i===12){p.push(c>>4&255)}if(o){return o.from?o.from(p):new o(p)}return p}function representYamlBinary(r){var n="",i=0,o,f,u=r.length,l=e;for(o=0;o>18&63];n+=l[i>>12&63];n+=l[i>>6&63];n+=l[i&63]}i=(i<<8)+r[o]}f=u%3;if(f===0){n+=l[i>>18&63];n+=l[i>>12&63];n+=l[i>>6&63];n+=l[i&63]}else if(f===2){n+=l[i>>10&63];n+=l[i>>4&63];n+=l[i<<2&63];n+=l[64]}else if(f===1){n+=l[i>>2&63];n+=l[i<<4&63];n+=l[64];n+=l[64]}return n}function isBinary(r){return o&&o.isBuffer(r)}r.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary})},675:(r,n,i)=>{var o=i(967);function resolveYamlBoolean(r){if(r===null)return false;var n=r.length;return n===4&&(r==="true"||r==="True"||r==="TRUE")||n===5&&(r==="false"||r==="False"||r==="FALSE")}function constructYamlBoolean(r){return r==="true"||r==="True"||r==="TRUE"}function isBoolean(r){return Object.prototype.toString.call(r)==="[object Boolean]"}r.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:resolveYamlBoolean,construct:constructYamlBoolean,predicate:isBoolean,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})},564:(r,n,i)=>{var o=i(136);var f=i(967);var u=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(r){if(r===null)return false;if(!u.test(r)||r[r.length-1]==="_"){return false}return true}function constructYamlFloat(r){var n,i,o,f;n=r.replace(/_/g,"").toLowerCase();i=n[0]==="-"?-1:1;f=[];if("+-".indexOf(n[0])>=0){n=n.slice(1)}if(n===".inf"){return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(n===".nan"){return NaN}else if(n.indexOf(":")>=0){n.split(":").forEach(function(r){f.unshift(parseFloat(r,10))});n=0;o=1;f.forEach(function(r){n+=r*o;o*=60});return i*n}return i*parseFloat(n,10)}var e=/^[-+]?[0-9]+e/;function representYamlFloat(r,n){var i;if(isNaN(r)){switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===r){switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===r){switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(o.isNegativeZero(r)){return"-0.0"}i=r.toString(10);return e.test(i)?i.replace("e",".e"):i}function isFloat(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||o.isNegativeZero(r))}r.exports=new f("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"})},963:(r,n,i)=>{var o=i(136);var f=i(967);function isHexCode(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function isOctCode(r){return 48<=r&&r<=55}function isDecCode(r){return 48<=r&&r<=57}function resolveYamlInteger(r){if(r===null)return false;var n=r.length,i=0,o=false,f;if(!n)return false;f=r[i];if(f==="-"||f==="+"){f=r[++i]}if(f==="0"){if(i+1===n)return true;f=r[++i];if(f==="b"){i++;for(;i=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},4:(r,n,i)=>{var o;try{var f=require;o=f("esprima")}catch(r){if(typeof window!=="undefined")o=window.esprima}var u=i(967);function resolveJavascriptFunction(r){if(r===null)return false;try{var n="("+r+")",i=o.parse(n,{range:true});if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){return false}return true}catch(r){return false}}function constructJavascriptFunction(r){var n="("+r+")",i=o.parse(n,{range:true}),f=[],u;if(i.type!=="Program"||i.body.length!==1||i.body[0].type!=="ExpressionStatement"||i.body[0].expression.type!=="ArrowFunctionExpression"&&i.body[0].expression.type!=="FunctionExpression"){throw new Error("Failed to resolve function")}i.body[0].expression.params.forEach(function(r){f.push(r.name)});u=i.body[0].expression.body.range;if(i.body[0].expression.body.type==="BlockStatement"){return new Function(f,n.slice(u[0]+1,u[1]-1))}return new Function(f,"return "+n.slice(u[0],u[1]))}function representJavascriptFunction(r){return r.toString()}function isFunction(r){return Object.prototype.toString.call(r)==="[object Function]"}r.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:resolveJavascriptFunction,construct:constructJavascriptFunction,predicate:isFunction,represent:representJavascriptFunction})},242:(r,n,i)=>{var o=i(967);function resolveJavascriptRegExp(r){if(r===null)return false;if(r.length===0)return false;var n=r,i=/\/([gim]*)$/.exec(r),o="";if(n[0]==="/"){if(i)o=i[1];if(o.length>3)return false;if(n[n.length-o.length-1]!=="/")return false}return true}function constructJavascriptRegExp(r){var n=r,i=/\/([gim]*)$/.exec(r),o="";if(n[0]==="/"){if(i)o=i[1];n=n.slice(1,n.length-o.length-1)}return new RegExp(n,o)}function representJavascriptRegExp(r){var n="/"+r.source+"/";if(r.global)n+="g";if(r.multiline)n+="m";if(r.ignoreCase)n+="i";return n}function isRegExp(r){return Object.prototype.toString.call(r)==="[object RegExp]"}r.exports=new o("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:resolveJavascriptRegExp,construct:constructJavascriptRegExp,predicate:isRegExp,represent:representJavascriptRegExp})},914:(r,n,i)=>{var o=i(967);function resolveJavascriptUndefined(){return true}function constructJavascriptUndefined(){return undefined}function representJavascriptUndefined(){return""}function isUndefined(r){return typeof r==="undefined"}r.exports=new o("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:resolveJavascriptUndefined,construct:constructJavascriptUndefined,predicate:isUndefined,represent:representJavascriptUndefined})},173:(r,n,i)=>{var o=i(967);r.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})},393:(r,n,i)=>{var o=i(967);function resolveYamlMerge(r){return r==="<<"||r===null}r.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge})},671:(r,n,i)=>{var o=i(967);function resolveYamlNull(r){if(r===null)return true;var n=r.length;return n===1&&r==="~"||n===4&&(r==="null"||r==="Null"||r==="NULL")}function constructYamlNull(){return null}function isNull(r){return r===null}r.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:resolveYamlNull,construct:constructYamlNull,predicate:isNull,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},668:(r,n,i)=>{var o=i(967);var f=Object.prototype.hasOwnProperty;var u=Object.prototype.toString;function resolveYamlOmap(r){if(r===null)return true;var n=[],i,o,e,l,c,p=r;for(i=0,o=p.length;i{var o=i(967);var f=Object.prototype.toString;function resolveYamlPairs(r){if(r===null)return true;var n,i,o,u,e,l=r;e=new Array(l.length);for(n=0,i=l.length;n{var o=i(967);r.exports=new o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})},237:(r,n,i)=>{var o=i(967);var f=Object.prototype.hasOwnProperty;function resolveYamlSet(r){if(r===null)return true;var n,i=r;for(n in i){if(f.call(i,n)){if(i[n]!==null)return false}}return true}function constructYamlSet(r){return r!==null?r:{}}r.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:resolveYamlSet,construct:constructYamlSet})},672:(r,n,i)=>{var o=i(967);r.exports=new o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})},714:(r,n,i)=>{var o=i(967);var f=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var u=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(r){if(r===null)return false;if(f.exec(r)!==null)return true;if(u.exec(r)!==null)return true;return false}function constructYamlTimestamp(r){var n,i,o,e,l,c,p,s=0,h=null,g,A,m;n=f.exec(r);if(n===null)n=u.exec(r);if(n===null)throw new Error("Date resolve error");i=+n[1];o=+n[2]-1;e=+n[3];if(!n[4]){return new Date(Date.UTC(i,o,e))}l=+n[4];c=+n[5];p=+n[6];if(n[7]){s=n[7].slice(0,3);while(s.length<3){s+="0"}s=+s}if(n[9]){g=+n[10];A=+(n[11]||0);h=(g*60+A)*6e4;if(n[9]==="-")h=-h}m=new Date(Date.UTC(i,o,e,l,c,p,s));if(h)m.setTime(m.getTime()-h);return m}function representYamlTimestamp(r){return r.toISOString()}r.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp})},331:(r,n,i)=>{i.r(n);var o=i(186);var f=i(747);var u=i(917);const e=require("child_process");var l=i(622);var c;(function(r){r["FRESH"]="fresh";r["MISSING"]="missing";r["UPDATE_AVAILABLE"]="update_available"})(c||(c={}));function setOutputs({helmfileLockState:r,helmfileLockUpdates:n}){(0,o.setOutput)("helmfile-lock-state",r);(0,o.setOutput)("helmfile-lock-updates",n)}function helmfileDepCheck(){try{const r={helmfileLockState:c.FRESH,helmfileLockUpdates:[]};const n=(0,l.join)(process.cwd(),(0,o.getInput)("working_directory"));const i=n+"/helmfile.yaml";if(!(0,f.existsSync)(i)){setOutputs(r);return}const p=(0,f.readFileSync)(i,"utf-8");const s=(0,u.safeLoad)(p);if(!s["repositories"]){setOutputs(r);return}const h=n+"/helmfile.lock";if(!(0,f.existsSync)(h)){r.helmfileLockState=c.MISSING;setOutputs(r);return}const g=(0,f.readFileSync)(h,"utf-8");const A=(0,u.safeLoad)(g);const m=A["dependencies"];const w=A["generated"];try{const i=(0,e.execSync)("helmfile deps",{cwd:n}).toString();console.log(i)}catch(n){console.error(n.message);setOutputs(r);return}const S=(0,f.readFileSync)(h,"utf-8");const v=(0,u.safeLoad)(S);const a=v["dependencies"];const O=v["generated"];if(Date.parse(w)>=Date.parse(O)){console.log(`new helmfile.lock was not generated`);setOutputs(r);return}if(m.length!==a.length){console.log(`dependency length mismatch after running helmfile deps`);setOutputs(r);return}for(let n=0;n{r.exports=require("fs")},87:r=>{r.exports=require("os")},622:r=>{r.exports=require("path")}};var n={};function __webpack_require__(i){if(n[i]){return n[i].exports}var o=n[i]={exports:{}};var f=true;try{r[i].call(o.exports,o,o.exports,__webpack_require__);f=false}finally{if(f)delete n[i]}return o.exports}(()=>{__webpack_require__.r=(r=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(r,"__esModule",{value:true})})})();__webpack_require__.ab=__dirname+"/";return __webpack_require__(331)})(); \ No newline at end of file diff --git a/helmfile-dependency-check/helmfileDepCheck.ts b/helmfile-dependency-check/helmfileDepCheck.ts index b18f134..02b7b48 100644 --- a/helmfile-dependency-check/helmfileDepCheck.ts +++ b/helmfile-dependency-check/helmfileDepCheck.ts @@ -1,8 +1,8 @@ import { getInput, setOutput, setFailed } from "@actions/core" import { existsSync, readFileSync } from "fs" import { safeLoad } from "js-yaml" -import * as https from "https" -import * as semver from "semver" +import { execSync } from "child_process" +import { join } from "path" enum HelmfileLockState { FRESH = "fresh", @@ -14,7 +14,7 @@ interface HelmfileLockUpdate { name: string; repository: string; currentVer: string; - latestVer: string; + upgradeVer: string; } interface ActionOutputs { @@ -27,41 +27,21 @@ function setOutputs({helmfileLockState, helmfileLockUpdates}: ActionOutputs): vo setOutput("helmfile-lock-updates", helmfileLockUpdates) } -function getIndexYAMLData(indexURL: string) { - return new Promise((resolve, reject) => { - https.get(indexURL, resp => { - let data = "" - - resp.on("data", chunk => { - data += chunk - }) - - resp.on("end", () => { - resolve(safeLoad(data)) - }) - }).on("error", error => { - reject(error.message) - }) - }) -} - -export async function helmfileDepCheck() { +export function helmfileDepCheck() { try { const outputs: ActionOutputs = { helmfileLockState: HelmfileLockState.FRESH, helmfileLockUpdates: [] } - const workingDir = getInput("working_directory") - // path.join is not used, because of issues when building with ncc - const helmfilePath = process.cwd() + "/" + workingDir + "/helmfile.yaml" + const workingDir = join(process.cwd(), getInput("working_directory")) + const helmfilePath = workingDir + "/helmfile.yaml" if (!existsSync(helmfilePath)) { // Return early, because there is no helmfile setOutputs(outputs) return } - const helmfileContent = readFileSync(helmfilePath, "utf-8") const helmfileData = safeLoad(helmfileContent) @@ -71,48 +51,67 @@ export async function helmfileDepCheck() { return } - // path.join is not used, because of issues when building with ncc - const helmfileLockPath = process.cwd() + "/" + workingDir + "/helmfile.lock" + const helmfileLockPath = workingDir + "/helmfile.lock" - if (existsSync(helmfileLockPath)) { - const helmfileLockContent = readFileSync(helmfileLockPath, "utf-8") - const helmfileLockData = safeLoad(helmfileLockContent) + if (!existsSync(helmfileLockPath)) { + outputs.helmfileLockState = HelmfileLockState.MISSING + setOutputs(outputs) + return + } - // Check upstream repos for upgrades - for (const dependency of helmfileLockData["dependencies"]) { - const indexURL = dependency["repository"] + "/index.yaml" - const indexData = await getIndexYAMLData(indexURL) + const currentHelmfileLockContent = readFileSync(helmfileLockPath, "utf-8") + const currentHelmfileLockData = safeLoad(currentHelmfileLockContent) + const currentDependencies: Record[] = currentHelmfileLockData["dependencies"] + const currentGenerated: string = currentHelmfileLockData["generated"] - const dependencyName = dependency["name"] - const dependencyVer = dependency["version"] - if (!indexData["entries"][dependencyName]) { - console.log(`Could not find list of versions for ${dependencyName}`) - continue - } - const latestVer = indexData["entries"][dependencyName][0]["version"] + try { + const execResult = execSync("helmfile deps", { cwd: workingDir }).toString(); + console.log(execResult) + } catch (error) { + console.error(error.message) + setOutputs(outputs) + return + } - if (!semver.valid(dependencyVer) || !semver.valid(latestVer)) { - console.log(`Invalid semantic version found: ${dependencyVer} or ${latestVer}`) - continue - } + const newHelmfileLockContent = readFileSync(helmfileLockPath, "utf-8") + const newHelmfileLockData = safeLoad(newHelmfileLockContent) + const newDependencies: Record[] = newHelmfileLockData["dependencies"] + const newGenerated: string = newHelmfileLockData["generated"] + + if (Date.parse(currentGenerated) >= Date.parse(newGenerated)) { + console.log(`new helmfile.lock was not generated`) + setOutputs(outputs) + return + } + + if (currentDependencies.length !== newDependencies.length) { + console.log(`dependency length mismatch after running helmfile deps`) + setOutputs(outputs) + return + } - const dependencyVerClean = semver.clean(dependencyVer) - const latestVerClean = semver.clean(latestVer) - - if (semver.lt(dependencyVerClean, latestVerClean)) { - const updateData = { - name: dependencyName, - repository: indexURL, - currentVer: dependencyVerClean, - latestVer: latestVerClean - } - outputs.helmfileLockUpdates.push(updateData) - outputs.helmfileLockState = HelmfileLockState.UPDATE_AVAILABLE + for (let i = 0; i < currentDependencies.length; i++) { + const curDependency = currentDependencies[i] + const curRepo = curDependency["repository"] + const curDependencyName = curDependency["name"] + const curDependencyVer = curDependency["version"] + + const newDependency = newDependencies[i] + const newDependencyVer = newDependency["version"] + + if (curDependencyVer !== newDependencyVer) { + const updateData = { + name: curDependencyName, + repository: curRepo, + currentVer: curDependencyVer, + upgradeVer: newDependencyVer } + outputs.helmfileLockUpdates.push(updateData) } + } - } else { - outputs.helmfileLockState = HelmfileLockState.MISSING + if (outputs.helmfileLockUpdates.length) { + outputs.helmfileLockState = HelmfileLockState.UPDATE_AVAILABLE } setOutputs(outputs) diff --git a/helmfile-dependency-check/main.ts b/helmfile-dependency-check/main.ts index 7c73c5d..a179d19 100644 --- a/helmfile-dependency-check/main.ts +++ b/helmfile-dependency-check/main.ts @@ -1,6 +1,6 @@ import { helmfileDepCheck } from "./helmfileDepCheck"; -async function run() { +function run() { helmfileDepCheck() } diff --git a/jest.config.js b/jest.config.js index b617cff..9e37082 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,3 @@ -const nock = require('nock') -nock.disableNetConnect() - const processStdoutWrite = process.stdout.write.bind(process.stdout) process.stdout.write = (str, encoding, cb) => { if (str.match(/^::/)) { diff --git a/package-lock.json b/package-lock.json index c198c3c..f1d6f0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1170,15 +1170,6 @@ "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", "dev": true }, - "@types/nock": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/@types/nock/-/nock-11.1.0.tgz", - "integrity": "sha512-jI/ewavBQ7X5178262JQR0ewicPAcJhXS/iFaNJl0VHLfyosZ/kwSrsa6VNQNSO8i9d8SqdRgOtZSOKJ/+iNMw==", - "dev": true, - "requires": { - "nock": "*" - } - }, "@types/node": { "version": "14.6.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.6.2.tgz", @@ -1196,12 +1187,6 @@ "integrity": "sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ==", "dev": true }, - "@types/semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ==", - "dev": true - }, "@types/stack-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", @@ -4490,12 +4475,6 @@ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, - "lodash.set": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", - "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", - "dev": true - }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -4682,18 +4661,6 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, - "nock": { - "version": "13.0.5", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.0.5.tgz", - "integrity": "sha512-1ILZl0zfFm2G4TIeJFW0iHknxr2NyA+aGCMTjDVUsBY4CkMRispF1pfIYkTRdAR/3Bg+UzdEuK0B6HczMQZcCg==", - "dev": true, - "requires": { - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "lodash.set": "^4.3.2", - "propagate": "^2.0.0" - } - }, "node-fetch": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", @@ -5114,12 +5081,6 @@ "sisteransi": "^1.0.5" } }, - "propagate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", - "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", - "dev": true - }, "psl": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", @@ -5595,11 +5556,6 @@ "xmlchars": "^2.2.0" } }, - "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==" - }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", diff --git a/package.json b/package.json index 0313d4d..17e6515 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,8 @@ "@types/jest": "^26.0.16", "@types/js-yaml": "^3.12.5", "@types/minimatch": "^3.0.3", - "@types/nock": "^11.1.0", - "@types/semver": "^7.3.4", "@vercel/ncc": "^0.25.1", "jest": "^26.6.3", - "nock": "^13.0.5", "npm-run-all": "^4.1.5", "ts-jest": "^26.4.4", "typescript": "^4.1.2" @@ -32,7 +29,6 @@ "@actions/github": "^4.0.0", "@actions/glob": "^0.1.1", "js-yaml": "^3.14.0", - "minimatch": "^3.0.4", - "semver": "^7.3.2" + "minimatch": "^3.0.4" } }