From 02da5f75e519a4e7e7d2c1269b48d258b9edff10 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Fri, 26 Apr 2024 18:49:53 +1000 Subject: [PATCH 01/14] updated node --- .github/workflows/setup-stackql.yml | 2 +- action.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index 696436d..584f758 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4.1.4 - name: Setup Stackql uses: ./ diff --git a/action.yml b/action.yml index 64846ff..2b81f82 100644 --- a/action.yml +++ b/action.yml @@ -8,8 +8,9 @@ inputs: required: false runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' + branding: icon: 'terminal' color: 'green' \ No newline at end of file From 2f1140a8be09e7851adfade4b2450f6c358622e5 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Fri, 26 Apr 2024 18:55:29 +1000 Subject: [PATCH 02/14] updated version --- README.md | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f90dac3..8f86b53 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Check the "Use GitHub Provider" step in [setup-stackql.yml](.github/workflows/se ```yaml - name: setup StackQL - uses: stackql/setup-stackql@v2.0.0 + uses: stackql/setup-stackql@v2.1.0 with: use_wrapper: true @@ -34,7 +34,7 @@ Check the "Use Google Provider" step in [setup-stackql.yml](.github/workflows/se ```yaml - name: setup StackQL - uses: stackql/setup-stackql@v2.0.0 + uses: stackql/setup-stackql@v2.1.0 with: use_wrapper: true diff --git a/package.json b/package.json index dca0ca1..e6a014a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-stackql", - "version": "2.0.0", + "version": "2.1.0", "description": "", "main": "index.js", "scripts": { From a5e562f843e60cf2daf668f8776e083117377a38 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Fri, 26 Apr 2024 19:06:07 +1000 Subject: [PATCH 03/14] updated version --- index.js | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index 012a20b..a80bfec 100644 --- a/index.js +++ b/index.js @@ -8,28 +8,56 @@ const io = require('@actions/io'); const urls = { 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip', - 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg', + // 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg', 'win32': 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.zip', } +// async function downloadCLI(osPlatform){ +// try { + +// core.info(`downloading stackql binary for ${osPlatform}`); +// const url = urls[osPlatform] +// core.debug(`binary location: ${url}`); + +// switch (osPlatform) { +// case 'win32': +// return await tc.extractZip(await tc.downloadTool(url)); +// case 'darwin': +// let tmpPath = await tc.downloadTool(url); +// core.info(`extracting mac pkg in ${tmpPath}...`); +// const installPath = '/Users/runner/work/_temp/stackql-pkg'; +// execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`); +// return `${installPath}/Payload`; +// case 'linux': +// return await tc.extractZip(await tc.downloadTool(url)); +// default: +// throw new Error(`Unsupported platform: ${osPlatform}`); +// } + +// } catch (error) { +// core.error(error); +// throw error; +// } +// } + async function downloadCLI(osPlatform){ try { core.info(`downloading stackql binary for ${osPlatform}`); - const url = urls[osPlatform] - core.debug(`binary location: ${url}`); + // const url = urls[osPlatform]; + // core.debug(`binary location: ${url}`); switch (osPlatform) { case 'win32': - return await tc.extractZip(await tc.downloadTool(url)); + return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); case 'darwin': - let tmpPath = await tc.downloadTool(url); - core.info(`extracting mac pkg in ${tmpPath}...`); - const installPath = '/Users/runner/work/_temp/stackql-pkg'; - execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`); - return `${installPath}/Payload`; + core.info(`installing stackql using Homebrew`); + execSync('brew install stackql', { stdio: 'inherit' }); + // Assuming stackql installs to a standard location accessible in the PATH + // No need to return a path since brew handles placing it in the PATH + return '/usr/local/bin'; // or wherever brew installs binaries case 'linux': - return await tc.extractZip(await tc.downloadTool(url)); + return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); default: throw new Error(`Unsupported platform: ${osPlatform}`); } @@ -40,6 +68,7 @@ async function downloadCLI(osPlatform){ } } + async function makeExecutable(cliPath, osPlatform){ try { if(osPlatform === 'win32'){ From a15810dc992887c99c5448b4e3283fae2fc73741 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Fri, 26 Apr 2024 19:08:11 +1000 Subject: [PATCH 04/14] updated version --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 2b81f82..865129d 100644 --- a/action.yml +++ b/action.yml @@ -9,7 +9,8 @@ inputs: runs: using: 'node20' - main: 'dist/index.js' + # main: 'dist/index.js' + main: 'index.js' branding: icon: 'terminal' From e774837b3736a0bab9a89b5546452b2bd909402b Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 07:31:58 +1000 Subject: [PATCH 05/14] updated to homebrew --- dist/index.js | 144 +++++++++++++++++++++++++++++++++++----------- package-lock.json | 16 +++--- 2 files changed, 118 insertions(+), 42 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3e89b04..6f9fea0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4603,8 +4603,11 @@ var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || // Max safe segment length for coercion. var MAX_SAFE_COMPONENT_LENGTH = 16 +var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 + // The actual regexps go on exports.re var re = exports.re = [] +var safeRe = exports.safeRe = [] var src = exports.src = [] var t = exports.tokens = {} var R = 0 @@ -4613,6 +4616,31 @@ function tok (n) { t[n] = R++ } +var LETTERDASHNUMBER = '[a-zA-Z0-9-]' + +// Replace some greedy regex tokens to prevent regex dos issues. These regex are +// used internally via the safeRe object since all inputs in this library get +// normalized first to trim and collapse all extra whitespace. The original +// regexes are exported for userland consumption and lower level usage. A +// future breaking change could export the safer regex only with a note that +// all input should have extra whitespace removed. +var safeRegexReplacements = [ + ['\\s', 1], + ['\\d', MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], +] + +function makeSafeRe (value) { + for (var i = 0; i < safeRegexReplacements.length; i++) { + var token = safeRegexReplacements[i][0] + var max = safeRegexReplacements[i][1] + value = value + .split(token + '*').join(token + '{0,' + max + '}') + .split(token + '+').join(token + '{1,' + max + '}') + } + return value +} + // The following Regular Expressions can be used for tokenizing, // validating, and parsing SemVer version strings. @@ -4622,14 +4650,14 @@ function tok (n) { tok('NUMERICIDENTIFIER') src[t.NUMERICIDENTIFIER] = '0|[1-9]\\d*' tok('NUMERICIDENTIFIERLOOSE') -src[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+' +src[t.NUMERICIDENTIFIERLOOSE] = '\\d+' // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. tok('NONNUMERICIDENTIFIER') -src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*' +src[t.NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*' // ## Main Version // Three dot-separated numeric identifiers. @@ -4671,7 +4699,7 @@ src[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] + // Any combination of digits, letters, or hyphens. tok('BUILDIDENTIFIER') -src[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+' +src[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+' // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata @@ -4751,6 +4779,7 @@ src[t.COERCE] = '(^|[^\\d])' + '(?:$|[^\\d])' tok('COERCERTL') re[t.COERCERTL] = new RegExp(src[t.COERCE], 'g') +safeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g') // Tilde ranges. // Meaning is "reasonably at or greater than" @@ -4760,6 +4789,7 @@ src[t.LONETILDE] = '(?:~>?)' tok('TILDETRIM') src[t.TILDETRIM] = '(\\s*)' + src[t.LONETILDE] + '\\s+' re[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g') +safeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g') var tildeTrimReplace = '$1~' tok('TILDE') @@ -4775,6 +4805,7 @@ src[t.LONECARET] = '(?:\\^)' tok('CARETTRIM') src[t.CARETTRIM] = '(\\s*)' + src[t.LONECARET] + '\\s+' re[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g') +safeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g') var caretTrimReplace = '$1^' tok('CARET') @@ -4796,6 +4827,7 @@ src[t.COMPARATORTRIM] = '(\\s*)' + src[t.GTLT] + // this one has to use the /g flag re[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g') +safeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g') var comparatorTrimReplace = '$1$2$3' // Something like `1.2.3 - 1.2.4` @@ -4824,6 +4856,14 @@ for (var i = 0; i < R; i++) { debug(i, src[i]) if (!re[i]) { re[i] = new RegExp(src[i]) + + // Replace all greedy whitespace to prevent regex dos issues. These regex are + // used internally via the safeRe object since all inputs in this library get + // normalized first to trim and collapse all extra whitespace. The original + // regexes are exported for userland consumption and lower level usage. A + // future breaking change could export the safer regex only with a note that + // all input should have extra whitespace removed. + safeRe[i] = new RegExp(makeSafeRe(src[i])) } } @@ -4848,7 +4888,7 @@ function parse (version, options) { return null } - var r = options.loose ? re[t.LOOSE] : re[t.FULL] + var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL] if (!r.test(version)) { return null } @@ -4903,7 +4943,7 @@ function SemVer (version, options) { this.options = options this.loose = !!options.loose - var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]) + var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]) if (!m) { throw new TypeError('Invalid Version: ' + version) @@ -5348,6 +5388,7 @@ function Comparator (comp, options) { return new Comparator(comp, options) } + comp = comp.trim().split(/\s+/).join(' ') debug('comparator', comp, options) this.options = options this.loose = !!options.loose @@ -5364,7 +5405,7 @@ function Comparator (comp, options) { var ANY = {} Comparator.prototype.parse = function (comp) { - var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR] var m = comp.match(r) if (!m) { @@ -5488,9 +5529,16 @@ function Range (range, options) { this.loose = !!options.loose this.includePrerelease = !!options.includePrerelease - // First, split based on boolean or || + // First reduce all whitespace as much as possible so we do not have to rely + // on potentially slow regexes like \s*. This is then stored and used for + // future error messages as well. this.raw = range - this.set = range.split(/\s*\|\|\s*/).map(function (range) { + .trim() + .split(/\s+/) + .join(' ') + + // First, split based on boolean or || + this.set = this.raw.split('||').map(function (range) { return this.parseRange(range.trim()) }, this).filter(function (c) { // throw out any that are not relevant for whatever reason @@ -5498,7 +5546,7 @@ function Range (range, options) { }) if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range) + throw new TypeError('Invalid SemVer Range: ' + this.raw) } this.format() @@ -5517,20 +5565,19 @@ Range.prototype.toString = function () { Range.prototype.parseRange = function (range) { var loose = this.options.loose - range = range.trim() // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE] + var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE] range = range.replace(hr, hyphenReplace) debug('hyphen replace', range) // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace) - debug('comparator trim', range, re[t.COMPARATORTRIM]) + range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace) + debug('comparator trim', range, safeRe[t.COMPARATORTRIM]) // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[t.TILDETRIM], tildeTrimReplace) + range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace) // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[t.CARETTRIM], caretTrimReplace) + range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace) // normalize spaces range = range.split(/\s+/).join(' ') @@ -5538,7 +5585,7 @@ Range.prototype.parseRange = function (range) { // At this point, the range is completely trimmed and // ready to be split into comparators. - var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR] + var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR] var set = range.split(' ').map(function (comp) { return parseComparator(comp, this.options) }, this).join(' ').split(/\s+/) @@ -5638,7 +5685,7 @@ function replaceTildes (comp, options) { } function replaceTilde (comp, options) { - var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] + var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE] return comp.replace(r, function (_, M, m, p, pr) { debug('tilde', comp, _, M, m, p, pr) var ret @@ -5679,7 +5726,7 @@ function replaceCarets (comp, options) { function replaceCaret (comp, options) { debug('caret', comp, options) - var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET] + var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET] return comp.replace(r, function (_, M, m, p, pr) { debug('caret', comp, _, M, m, p, pr) var ret @@ -5738,7 +5785,7 @@ function replaceXRanges (comp, options) { function replaceXRange (comp, options) { comp = comp.trim() - var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE] + var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE] return comp.replace(r, function (ret, gtlt, M, m, p, pr) { debug('xRange', comp, ret, gtlt, M, m, p, pr) var xM = isX(M) @@ -5813,7 +5860,7 @@ function replaceXRange (comp, options) { function replaceStars (comp, options) { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[t.STAR], '') + return comp.trim().replace(safeRe[t.STAR], '') } // This function is passed to string.replace(re[t.HYPHENRANGE]) @@ -6139,7 +6186,7 @@ function coerce (version, options) { var match = null if (!options.rtl) { - match = version.match(re[t.COERCE]) + match = version.match(safeRe[t.COERCE]) } else { // Find the right-most coercible string that does not share // a terminus with a more left-ward coercible string. @@ -6150,17 +6197,17 @@ function coerce (version, options) { // Stop when we get a match that ends at the string end, since no // coercible string can be more right-ward without the same terminus. var next - while ((next = re[t.COERCERTL].exec(version)) && + while ((next = safeRe[t.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length) ) { if (!match || next.index + next[0].length !== match.index + match[0].length) { match = next } - re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length + safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length } // leave it in a clean state - re[t.COERCERTL].lastIndex = -1 + safeRe[t.COERCERTL].lastIndex = -1 } if (match === null) { @@ -6710,28 +6757,56 @@ const io = __nccwpck_require__(7436); const urls = { 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip', - 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg', + // 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg', 'win32': 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.zip', } +// async function downloadCLI(osPlatform){ +// try { + +// core.info(`downloading stackql binary for ${osPlatform}`); +// const url = urls[osPlatform] +// core.debug(`binary location: ${url}`); + +// switch (osPlatform) { +// case 'win32': +// return await tc.extractZip(await tc.downloadTool(url)); +// case 'darwin': +// let tmpPath = await tc.downloadTool(url); +// core.info(`extracting mac pkg in ${tmpPath}...`); +// const installPath = '/Users/runner/work/_temp/stackql-pkg'; +// execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`); +// return `${installPath}/Payload`; +// case 'linux': +// return await tc.extractZip(await tc.downloadTool(url)); +// default: +// throw new Error(`Unsupported platform: ${osPlatform}`); +// } + +// } catch (error) { +// core.error(error); +// throw error; +// } +// } + async function downloadCLI(osPlatform){ try { core.info(`downloading stackql binary for ${osPlatform}`); - const url = urls[osPlatform] - core.debug(`binary location: ${url}`); + // const url = urls[osPlatform]; + // core.debug(`binary location: ${url}`); switch (osPlatform) { case 'win32': - return await tc.extractZip(await tc.downloadTool(url)); + return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); case 'darwin': - let tmpPath = await tc.downloadTool(url); - core.info(`extracting mac pkg in ${tmpPath}...`); - const installPath = '/Users/runner/work/_temp/stackql-pkg'; - execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`); - return `${installPath}/Payload`; + core.info(`installing stackql using Homebrew`); + execSync('brew install stackql', { stdio: 'inherit' }); + // Assuming stackql installs to a standard location accessible in the PATH + // No need to return a path since brew handles placing it in the PATH + return '/usr/local/bin'; // or wherever brew installs binaries case 'linux': - return await tc.extractZip(await tc.downloadTool(url)); + return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); default: throw new Error(`Unsupported platform: ${osPlatform}`); } @@ -6742,6 +6817,7 @@ async function downloadCLI(osPlatform){ } } + async function makeExecutable(cliPath, osPlatform){ try { if(osPlatform === 'win32'){ diff --git a/package-lock.json b/package-lock.json index 1927388..f9529e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "setup-stackql", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "setup-stackql", - "version": "2.0.0", + "version": "2.1.0", "hasInstallScript": true, "license": "ISC", "dependencies": { @@ -253,9 +253,9 @@ } }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "bin": { "semver": "bin/semver.js" } @@ -508,9 +508,9 @@ } }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==" }, "tr46": { "version": "0.0.3", From 871b7aa9d5759c5dbe1e2016d659e2ed50727594 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 07:36:04 +1000 Subject: [PATCH 06/14] updates --- dist/index.js | 195 +++++++++++++++++++++--------------------- index.js | 1 - wrapper/dist/index.js | 172 ++++++++++++++++++------------------- 3 files changed, 183 insertions(+), 185 deletions(-) diff --git a/dist/index.js b/dist/index.js index 6f9fea0..9f1ce38 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 7351: +/***/ 9526: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -28,7 +28,7 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; const os = __importStar(__nccwpck_require__(2037)); -const utils_1 = __nccwpck_require__(5278); +const utils_1 = __nccwpck_require__(1375); /** * Commands * @@ -100,7 +100,7 @@ function escapeProperty(s) { /***/ }), -/***/ 2186: +/***/ 70: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -135,12 +135,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(7351); -const file_command_1 = __nccwpck_require__(717); -const utils_1 = __nccwpck_require__(5278); +const command_1 = __nccwpck_require__(9526); +const file_command_1 = __nccwpck_require__(9868); +const utils_1 = __nccwpck_require__(1375); const os = __importStar(__nccwpck_require__(2037)); const path = __importStar(__nccwpck_require__(1017)); -const oidc_utils_1 = __nccwpck_require__(8041); +const oidc_utils_1 = __nccwpck_require__(138); /** * The code to exit an action */ @@ -425,17 +425,17 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(1327); +var summary_1 = __nccwpck_require__(264); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(1327); +var summary_2 = __nccwpck_require__(264); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports */ -var path_utils_1 = __nccwpck_require__(2981); +var path_utils_1 = __nccwpck_require__(3448); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); @@ -443,7 +443,7 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct /***/ }), -/***/ 717: +/***/ 9868: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -474,8 +474,8 @@ exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; /* eslint-disable @typescript-eslint/no-explicit-any */ const fs = __importStar(__nccwpck_require__(7147)); const os = __importStar(__nccwpck_require__(2037)); -const uuid_1 = __nccwpck_require__(8974); -const utils_1 = __nccwpck_require__(5278); +const uuid_1 = __nccwpck_require__(2077); +const utils_1 = __nccwpck_require__(1375); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -508,7 +508,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 8041: +/***/ 138: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -524,9 +524,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(6255); -const auth_1 = __nccwpck_require__(5526); -const core_1 = __nccwpck_require__(2186); +const http_client_1 = __nccwpck_require__(8468); +const auth_1 = __nccwpck_require__(8512); +const core_1 = __nccwpck_require__(70); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -592,7 +592,7 @@ exports.OidcClient = OidcClient; /***/ }), -/***/ 2981: +/***/ 3448: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -657,7 +657,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 1327: +/***/ 264: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -947,7 +947,7 @@ exports.summary = _summary; /***/ }), -/***/ 5278: +/***/ 1375: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -994,7 +994,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 8974: +/***/ 2077: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1058,29 +1058,29 @@ Object.defineProperty(exports, "parse", ({ } })); -var _v = _interopRequireDefault(__nccwpck_require__(1595)); +var _v = _interopRequireDefault(__nccwpck_require__(3830)); -var _v2 = _interopRequireDefault(__nccwpck_require__(6993)); +var _v2 = _interopRequireDefault(__nccwpck_require__(3143)); -var _v3 = _interopRequireDefault(__nccwpck_require__(1472)); +var _v3 = _interopRequireDefault(__nccwpck_require__(7217)); -var _v4 = _interopRequireDefault(__nccwpck_require__(6217)); +var _v4 = _interopRequireDefault(__nccwpck_require__(6577)); -var _nil = _interopRequireDefault(__nccwpck_require__(2381)); +var _nil = _interopRequireDefault(__nccwpck_require__(6907)); -var _version = _interopRequireDefault(__nccwpck_require__(427)); +var _version = _interopRequireDefault(__nccwpck_require__(6525)); -var _validate = _interopRequireDefault(__nccwpck_require__(2609)); +var _validate = _interopRequireDefault(__nccwpck_require__(3542)); -var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); +var _stringify = _interopRequireDefault(__nccwpck_require__(9022)); -var _parse = _interopRequireDefault(__nccwpck_require__(6385)); +var _parse = _interopRequireDefault(__nccwpck_require__(1354)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 5842: +/***/ 1099: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1110,7 +1110,7 @@ exports["default"] = _default; /***/ }), -/***/ 2381: +/***/ 6907: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1125,7 +1125,7 @@ exports["default"] = _default; /***/ }), -/***/ 6385: +/***/ 1354: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1136,7 +1136,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(2609)); +var _validate = _interopRequireDefault(__nccwpck_require__(3542)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1177,7 +1177,7 @@ exports["default"] = _default; /***/ }), -/***/ 6230: +/***/ 5719: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1192,7 +1192,7 @@ exports["default"] = _default; /***/ }), -/***/ 9784: +/***/ 9344: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1223,7 +1223,7 @@ function rng() { /***/ }), -/***/ 8844: +/***/ 2237: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1253,7 +1253,7 @@ exports["default"] = _default; /***/ }), -/***/ 1458: +/***/ 9022: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1264,7 +1264,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(2609)); +var _validate = _interopRequireDefault(__nccwpck_require__(3542)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1299,7 +1299,7 @@ exports["default"] = _default; /***/ }), -/***/ 1595: +/***/ 3830: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1310,9 +1310,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); +var _rng = _interopRequireDefault(__nccwpck_require__(9344)); -var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); +var _stringify = _interopRequireDefault(__nccwpck_require__(9022)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1413,7 +1413,7 @@ exports["default"] = _default; /***/ }), -/***/ 6993: +/***/ 3143: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1424,9 +1424,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _v = _interopRequireDefault(__nccwpck_require__(5920)); +var _v = _interopRequireDefault(__nccwpck_require__(7617)); -var _md = _interopRequireDefault(__nccwpck_require__(5842)); +var _md = _interopRequireDefault(__nccwpck_require__(1099)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1436,7 +1436,7 @@ exports["default"] = _default; /***/ }), -/***/ 5920: +/***/ 7617: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1448,9 +1448,9 @@ Object.defineProperty(exports, "__esModule", ({ exports["default"] = _default; exports.URL = exports.DNS = void 0; -var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); +var _stringify = _interopRequireDefault(__nccwpck_require__(9022)); -var _parse = _interopRequireDefault(__nccwpck_require__(6385)); +var _parse = _interopRequireDefault(__nccwpck_require__(1354)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1521,7 +1521,7 @@ function _default(name, version, hashfunc) { /***/ }), -/***/ 1472: +/***/ 7217: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1532,9 +1532,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(9784)); +var _rng = _interopRequireDefault(__nccwpck_require__(9344)); -var _stringify = _interopRequireDefault(__nccwpck_require__(1458)); +var _stringify = _interopRequireDefault(__nccwpck_require__(9022)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1565,7 +1565,7 @@ exports["default"] = _default; /***/ }), -/***/ 6217: +/***/ 6577: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1576,9 +1576,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _v = _interopRequireDefault(__nccwpck_require__(5920)); +var _v = _interopRequireDefault(__nccwpck_require__(7617)); -var _sha = _interopRequireDefault(__nccwpck_require__(8844)); +var _sha = _interopRequireDefault(__nccwpck_require__(2237)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1588,7 +1588,7 @@ exports["default"] = _default; /***/ }), -/***/ 2609: +/***/ 3542: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1599,7 +1599,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _regex = _interopRequireDefault(__nccwpck_require__(6230)); +var _regex = _interopRequireDefault(__nccwpck_require__(5719)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1612,7 +1612,7 @@ exports["default"] = _default; /***/ }), -/***/ 427: +/***/ 6525: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1623,7 +1623,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(2609)); +var _validate = _interopRequireDefault(__nccwpck_require__(3542)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1640,7 +1640,7 @@ exports["default"] = _default; /***/ }), -/***/ 1514: +/***/ 5589: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1676,7 +1676,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; const string_decoder_1 = __nccwpck_require__(1576); -const tr = __importStar(__nccwpck_require__(8159)); +const tr = __importStar(__nccwpck_require__(5601)); /** * Exec a command. * Output will be streamed to the live console. @@ -1750,7 +1750,7 @@ exports.getExecOutput = getExecOutput; /***/ }), -/***/ 8159: +/***/ 5601: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1789,8 +1789,8 @@ const os = __importStar(__nccwpck_require__(2037)); const events = __importStar(__nccwpck_require__(2361)); const child = __importStar(__nccwpck_require__(2081)); const path = __importStar(__nccwpck_require__(1017)); -const io = __importStar(__nccwpck_require__(7436)); -const ioUtil = __importStar(__nccwpck_require__(1962)); +const io = __importStar(__nccwpck_require__(9234)); +const ioUtil = __importStar(__nccwpck_require__(1764)); const timers_1 = __nccwpck_require__(9512); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; @@ -2375,7 +2375,7 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 5526: +/***/ 8512: /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -2463,7 +2463,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 6255: +/***/ 8468: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2501,8 +2501,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; const http = __importStar(__nccwpck_require__(3685)); const https = __importStar(__nccwpck_require__(5687)); -const pm = __importStar(__nccwpck_require__(9835)); -const tunnel = __importStar(__nccwpck_require__(4294)); +const pm = __importStar(__nccwpck_require__(7338)); +const tunnel = __importStar(__nccwpck_require__(5318)); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -3075,7 +3075,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), -/***/ 9835: +/***/ 7338: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -3143,7 +3143,7 @@ exports.checkBypass = checkBypass; /***/ }), -/***/ 1962: +/***/ 1764: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3327,7 +3327,7 @@ exports.getCmdPath = getCmdPath; /***/ }), -/***/ 7436: +/***/ 9234: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3366,7 +3366,7 @@ const assert_1 = __nccwpck_require__(9491); const childProcess = __importStar(__nccwpck_require__(2081)); const path = __importStar(__nccwpck_require__(1017)); const util_1 = __nccwpck_require__(3837); -const ioUtil = __importStar(__nccwpck_require__(1962)); +const ioUtil = __importStar(__nccwpck_require__(1764)); const exec = util_1.promisify(childProcess.exec); const execFile = util_1.promisify(childProcess.execFile); /** @@ -3675,7 +3675,7 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 2473: +/***/ 1176: /***/ (function(module, exports, __nccwpck_require__) { "use strict"; @@ -3710,8 +3710,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0; -const semver = __importStar(__nccwpck_require__(5911)); -const core_1 = __nccwpck_require__(2186); +const semver = __importStar(__nccwpck_require__(8109)); +const core_1 = __nccwpck_require__(70); // needs to be require for core node modules to be mocked /* eslint @typescript-eslint/no-require-imports: 0 */ const os = __nccwpck_require__(2037); @@ -3810,7 +3810,7 @@ exports._readLinuxVersionFile = _readLinuxVersionFile; /***/ }), -/***/ 8279: +/***/ 9328: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3845,7 +3845,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.RetryHelper = void 0; -const core = __importStar(__nccwpck_require__(2186)); +const core = __importStar(__nccwpck_require__(70)); /** * Internal class for retries */ @@ -3900,7 +3900,7 @@ exports.RetryHelper = RetryHelper; /***/ }), -/***/ 7784: +/***/ 5492: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3938,20 +3938,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0; -const core = __importStar(__nccwpck_require__(2186)); -const io = __importStar(__nccwpck_require__(7436)); +const core = __importStar(__nccwpck_require__(70)); +const io = __importStar(__nccwpck_require__(9234)); const fs = __importStar(__nccwpck_require__(7147)); -const mm = __importStar(__nccwpck_require__(2473)); +const mm = __importStar(__nccwpck_require__(1176)); const os = __importStar(__nccwpck_require__(2037)); const path = __importStar(__nccwpck_require__(1017)); -const httpm = __importStar(__nccwpck_require__(6255)); -const semver = __importStar(__nccwpck_require__(5911)); +const httpm = __importStar(__nccwpck_require__(8468)); +const semver = __importStar(__nccwpck_require__(8109)); const stream = __importStar(__nccwpck_require__(2781)); const util = __importStar(__nccwpck_require__(3837)); const assert_1 = __nccwpck_require__(9491); -const v4_1 = __importDefault(__nccwpck_require__(824)); -const exec_1 = __nccwpck_require__(1514); -const retry_helper_1 = __nccwpck_require__(8279); +const v4_1 = __importDefault(__nccwpck_require__(548)); +const exec_1 = __nccwpck_require__(5589); +const retry_helper_1 = __nccwpck_require__(9328); class HTTPError extends Error { constructor(httpStatusCode) { super(`Unexpected HTTP response: ${httpStatusCode}`); @@ -4572,7 +4572,7 @@ function _unique(values) { /***/ }), -/***/ 5911: +/***/ 8109: /***/ ((module, exports) => { exports = module.exports = SemVer @@ -6222,15 +6222,15 @@ function coerce (version, options) { /***/ }), -/***/ 4294: +/***/ 5318: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(4219); +module.exports = __nccwpck_require__(1209); /***/ }), -/***/ 4219: +/***/ 1209: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -6502,7 +6502,7 @@ exports.debug = debug; // for test /***/ }), -/***/ 2707: +/***/ 8206: /***/ ((module) => { /** @@ -6535,7 +6535,7 @@ module.exports = bytesToUuid; /***/ }), -/***/ 5859: +/***/ 8845: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { // Unique ID creation requires a high quality random # generator. In node.js @@ -6550,11 +6550,11 @@ module.exports = function nodeRNG() { /***/ }), -/***/ 824: +/***/ 548: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -var rng = __nccwpck_require__(5859); -var bytesToUuid = __nccwpck_require__(2707); +var rng = __nccwpck_require__(8845); +var bytesToUuid = __nccwpck_require__(8206); function v4(options, buf, offset) { var i = buf && offset || 0; @@ -6751,9 +6751,9 @@ const path = __nccwpck_require__(1017); const fs = __nccwpck_require__(7147); const os = __nccwpck_require__(2037); const { execSync } = __nccwpck_require__(2081); -const core = __nccwpck_require__(2186); -const tc = __nccwpck_require__(7784); -const io = __nccwpck_require__(7436); +const core = __nccwpck_require__(70); +const tc = __nccwpck_require__(5492); +const io = __nccwpck_require__(9234); const urls = { 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip', @@ -6832,7 +6832,6 @@ async function makeExecutable(cliPath, osPlatform){ } } - async function installWrapper (pathToCLI) { let source, target; diff --git a/index.js b/index.js index a80bfec..34ca988 100644 --- a/index.js +++ b/index.js @@ -83,7 +83,6 @@ async function makeExecutable(cliPath, osPlatform){ } } - async function installWrapper (pathToCLI) { let source, target; diff --git a/wrapper/dist/index.js b/wrapper/dist/index.js index c64821c..d427e9a 100755 --- a/wrapper/dist/index.js +++ b/wrapper/dist/index.js @@ -2,7 +2,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 190: +/***/ 795: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -29,7 +29,7 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; const os = __importStar(__nccwpck_require__(37)); -const utils_1 = __nccwpck_require__(861); +const utils_1 = __nccwpck_require__(732); /** * Commands * @@ -101,7 +101,7 @@ function escapeProperty(s) { /***/ }), -/***/ 316: +/***/ 100: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -136,12 +136,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0; -const command_1 = __nccwpck_require__(190); -const file_command_1 = __nccwpck_require__(685); -const utils_1 = __nccwpck_require__(861); +const command_1 = __nccwpck_require__(795); +const file_command_1 = __nccwpck_require__(833); +const utils_1 = __nccwpck_require__(732); const os = __importStar(__nccwpck_require__(37)); const path = __importStar(__nccwpck_require__(17)); -const oidc_utils_1 = __nccwpck_require__(419); +const oidc_utils_1 = __nccwpck_require__(295); /** * The code to exit an action */ @@ -426,17 +426,17 @@ exports.getIDToken = getIDToken; /** * Summary exports */ -var summary_1 = __nccwpck_require__(656); +var summary_1 = __nccwpck_require__(882); Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ -var summary_2 = __nccwpck_require__(656); +var summary_2 = __nccwpck_require__(882); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports */ -var path_utils_1 = __nccwpck_require__(989); +var path_utils_1 = __nccwpck_require__(552); Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } })); Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } })); Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } })); @@ -444,7 +444,7 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct /***/ }), -/***/ 685: +/***/ 833: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -475,8 +475,8 @@ exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; /* eslint-disable @typescript-eslint/no-explicit-any */ const fs = __importStar(__nccwpck_require__(147)); const os = __importStar(__nccwpck_require__(37)); -const uuid_1 = __nccwpck_require__(449); -const utils_1 = __nccwpck_require__(861); +const uuid_1 = __nccwpck_require__(562); +const utils_1 = __nccwpck_require__(732); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -509,7 +509,7 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), -/***/ 419: +/***/ 295: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -525,9 +525,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; -const http_client_1 = __nccwpck_require__(315); -const auth_1 = __nccwpck_require__(421); -const core_1 = __nccwpck_require__(316); +const http_client_1 = __nccwpck_require__(26); +const auth_1 = __nccwpck_require__(749); +const core_1 = __nccwpck_require__(100); class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -593,7 +593,7 @@ exports.OidcClient = OidcClient; /***/ }), -/***/ 989: +/***/ 552: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -658,7 +658,7 @@ exports.toPlatformPath = toPlatformPath; /***/ }), -/***/ 656: +/***/ 882: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -948,7 +948,7 @@ exports.summary = _summary; /***/ }), -/***/ 861: +/***/ 732: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -995,7 +995,7 @@ exports.toCommandProperties = toCommandProperties; /***/ }), -/***/ 449: +/***/ 562: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1059,29 +1059,29 @@ Object.defineProperty(exports, "parse", ({ } })); -var _v = _interopRequireDefault(__nccwpck_require__(869)); +var _v = _interopRequireDefault(__nccwpck_require__(512)); -var _v2 = _interopRequireDefault(__nccwpck_require__(398)); +var _v2 = _interopRequireDefault(__nccwpck_require__(674)); -var _v3 = _interopRequireDefault(__nccwpck_require__(736)); +var _v3 = _interopRequireDefault(__nccwpck_require__(777)); -var _v4 = _interopRequireDefault(__nccwpck_require__(938)); +var _v4 = _interopRequireDefault(__nccwpck_require__(411)); -var _nil = _interopRequireDefault(__nccwpck_require__(712)); +var _nil = _interopRequireDefault(__nccwpck_require__(663)); -var _version = _interopRequireDefault(__nccwpck_require__(760)); +var _version = _interopRequireDefault(__nccwpck_require__(656)); -var _validate = _interopRequireDefault(__nccwpck_require__(84)); +var _validate = _interopRequireDefault(__nccwpck_require__(42)); -var _stringify = _interopRequireDefault(__nccwpck_require__(150)); +var _stringify = _interopRequireDefault(__nccwpck_require__(444)); -var _parse = _interopRequireDefault(__nccwpck_require__(148)); +var _parse = _interopRequireDefault(__nccwpck_require__(270)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /***/ }), -/***/ 797: +/***/ 649: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1111,7 +1111,7 @@ exports["default"] = _default; /***/ }), -/***/ 712: +/***/ 663: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1126,7 +1126,7 @@ exports["default"] = _default; /***/ }), -/***/ 148: +/***/ 270: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1137,7 +1137,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(84)); +var _validate = _interopRequireDefault(__nccwpck_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1178,7 +1178,7 @@ exports["default"] = _default; /***/ }), -/***/ 393: +/***/ 501: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -1193,7 +1193,7 @@ exports["default"] = _default; /***/ }), -/***/ 934: +/***/ 825: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1224,7 +1224,7 @@ function rng() { /***/ }), -/***/ 247: +/***/ 723: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1254,7 +1254,7 @@ exports["default"] = _default; /***/ }), -/***/ 150: +/***/ 444: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1265,7 +1265,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(84)); +var _validate = _interopRequireDefault(__nccwpck_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1300,7 +1300,7 @@ exports["default"] = _default; /***/ }), -/***/ 869: +/***/ 512: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1311,9 +1311,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(934)); +var _rng = _interopRequireDefault(__nccwpck_require__(825)); -var _stringify = _interopRequireDefault(__nccwpck_require__(150)); +var _stringify = _interopRequireDefault(__nccwpck_require__(444)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1414,7 +1414,7 @@ exports["default"] = _default; /***/ }), -/***/ 398: +/***/ 674: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1425,9 +1425,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _v = _interopRequireDefault(__nccwpck_require__(313)); +var _v = _interopRequireDefault(__nccwpck_require__(910)); -var _md = _interopRequireDefault(__nccwpck_require__(797)); +var _md = _interopRequireDefault(__nccwpck_require__(649)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1437,7 +1437,7 @@ exports["default"] = _default; /***/ }), -/***/ 313: +/***/ 910: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1449,9 +1449,9 @@ Object.defineProperty(exports, "__esModule", ({ exports["default"] = _default; exports.URL = exports.DNS = void 0; -var _stringify = _interopRequireDefault(__nccwpck_require__(150)); +var _stringify = _interopRequireDefault(__nccwpck_require__(444)); -var _parse = _interopRequireDefault(__nccwpck_require__(148)); +var _parse = _interopRequireDefault(__nccwpck_require__(270)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1522,7 +1522,7 @@ function _default(name, version, hashfunc) { /***/ }), -/***/ 736: +/***/ 777: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1533,9 +1533,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(934)); +var _rng = _interopRequireDefault(__nccwpck_require__(825)); -var _stringify = _interopRequireDefault(__nccwpck_require__(150)); +var _stringify = _interopRequireDefault(__nccwpck_require__(444)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1566,7 +1566,7 @@ exports["default"] = _default; /***/ }), -/***/ 938: +/***/ 411: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1577,9 +1577,9 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _v = _interopRequireDefault(__nccwpck_require__(313)); +var _v = _interopRequireDefault(__nccwpck_require__(910)); -var _sha = _interopRequireDefault(__nccwpck_require__(247)); +var _sha = _interopRequireDefault(__nccwpck_require__(723)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1589,7 +1589,7 @@ exports["default"] = _default; /***/ }), -/***/ 84: +/***/ 42: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1600,7 +1600,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _regex = _interopRequireDefault(__nccwpck_require__(393)); +var _regex = _interopRequireDefault(__nccwpck_require__(501)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1613,7 +1613,7 @@ exports["default"] = _default; /***/ }), -/***/ 760: +/***/ 656: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -1624,7 +1624,7 @@ Object.defineProperty(exports, "__esModule", ({ })); exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(84)); +var _validate = _interopRequireDefault(__nccwpck_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } @@ -1641,7 +1641,7 @@ exports["default"] = _default; /***/ }), -/***/ 110: +/***/ 413: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1677,7 +1677,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getExecOutput = exports.exec = void 0; const string_decoder_1 = __nccwpck_require__(576); -const tr = __importStar(__nccwpck_require__(515)); +const tr = __importStar(__nccwpck_require__(670)); /** * Exec a command. * Output will be streamed to the live console. @@ -1751,7 +1751,7 @@ exports.getExecOutput = getExecOutput; /***/ }), -/***/ 515: +/***/ 670: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -1790,9 +1790,9 @@ const os = __importStar(__nccwpck_require__(37)); const events = __importStar(__nccwpck_require__(361)); const child = __importStar(__nccwpck_require__(81)); const path = __importStar(__nccwpck_require__(17)); -const io = __importStar(__nccwpck_require__(560)); -const ioUtil = __importStar(__nccwpck_require__(995)); -const timers_1 = __nccwpck_require__(512); +const io = __importStar(__nccwpck_require__(96)); +const ioUtil = __importStar(__nccwpck_require__(205)); +const timers_1 = __nccwpck_require__(784); /* eslint-disable @typescript-eslint/unbound-method */ const IS_WINDOWS = process.platform === 'win32'; /* @@ -2376,7 +2376,7 @@ class ExecState extends events.EventEmitter { /***/ }), -/***/ 421: +/***/ 749: /***/ (function(__unused_webpack_module, exports) { "use strict"; @@ -2464,7 +2464,7 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), -/***/ 315: +/***/ 26: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -2500,10 +2500,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0; -const http = __importStar(__nccwpck_require__(181)); +const http = __importStar(__nccwpck_require__(685)); const https = __importStar(__nccwpck_require__(687)); -const pm = __importStar(__nccwpck_require__(233)); -const tunnel = __importStar(__nccwpck_require__(220)); +const pm = __importStar(__nccwpck_require__(923)); +const tunnel = __importStar(__nccwpck_require__(812)); var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -3076,7 +3076,7 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), -/***/ 233: +/***/ 923: /***/ ((__unused_webpack_module, exports) => { "use strict"; @@ -3144,7 +3144,7 @@ exports.checkBypass = checkBypass; /***/ }), -/***/ 995: +/***/ 205: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3328,7 +3328,7 @@ exports.getCmdPath = getCmdPath; /***/ }), -/***/ 560: +/***/ 96: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; @@ -3367,7 +3367,7 @@ const assert_1 = __nccwpck_require__(491); const childProcess = __importStar(__nccwpck_require__(81)); const path = __importStar(__nccwpck_require__(17)); const util_1 = __nccwpck_require__(837); -const ioUtil = __importStar(__nccwpck_require__(995)); +const ioUtil = __importStar(__nccwpck_require__(205)); const exec = util_1.promisify(childProcess.exec); const execFile = util_1.promisify(childProcess.execFile); /** @@ -3676,15 +3676,15 @@ function copyFile(srcFile, destFile, force) { /***/ }), -/***/ 220: +/***/ 812: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(418); +module.exports = __nccwpck_require__(196); /***/ }), -/***/ 418: +/***/ 196: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -3692,7 +3692,7 @@ module.exports = __nccwpck_require__(418); var net = __nccwpck_require__(808); var tls = __nccwpck_require__(404); -var http = __nccwpck_require__(181); +var http = __nccwpck_require__(685); var https = __nccwpck_require__(687); var events = __nccwpck_require__(361); var assert = __nccwpck_require__(491); @@ -3956,7 +3956,7 @@ exports.debug = debug; // for test /***/ }), -/***/ 127: +/***/ 514: /***/ ((module) => { /** @@ -3999,7 +3999,7 @@ class OutputListener { /***/ }), -/***/ 183: +/***/ 529: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const os = __nccwpck_require__(37); @@ -4054,7 +4054,7 @@ module.exports = require("fs"); /***/ }), -/***/ 181: +/***/ 685: /***/ ((module) => { "use strict"; @@ -4102,7 +4102,7 @@ module.exports = require("string_decoder"); /***/ }), -/***/ 512: +/***/ 784: /***/ ((module) => { "use strict"; @@ -4167,12 +4167,12 @@ module.exports = require("util"); var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { -const io = __nccwpck_require__(560); -const core = __nccwpck_require__(316); -const { exec } = __nccwpck_require__(110); +const io = __nccwpck_require__(96); +const core = __nccwpck_require__(100); +const { exec } = __nccwpck_require__(413); -const OutputListener = __nccwpck_require__(127); -const pathToCLI = __nccwpck_require__(183); +const OutputListener = __nccwpck_require__(514); +const pathToCLI = __nccwpck_require__(529); async function checkStackQL () { // Setting check to `true` will cause `which` to throw if stackql isn't found From 36fd0838bb21a8785dfcd331e47cfd99ecb49c5c Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 07:40:12 +1000 Subject: [PATCH 07/14] updates --- .github/workflows/setup-stackql.yml | 2 +- action.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index 584f758..0e00490 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -1,4 +1,4 @@ -name: 'Setup StackQL' +name: 'setup stackql' on: push: diff --git a/action.yml b/action.yml index 865129d..2b81f82 100644 --- a/action.yml +++ b/action.yml @@ -9,8 +9,7 @@ inputs: runs: using: 'node20' - # main: 'dist/index.js' - main: 'index.js' + main: 'dist/index.js' branding: icon: 'terminal' From 40dc78317f55227591257af22aed1a7a44f485c5 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 07:47:51 +1000 Subject: [PATCH 08/14] updates --- dist/index.js | 34 +++++++++++++++------------------- index.js | 34 +++++++++++++++------------------- 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9f1ce38..873acbc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6789,35 +6789,31 @@ const urls = { // } // } -async function downloadCLI(osPlatform){ +async function downloadCLI(osPlatform) { try { - - core.info(`downloading stackql binary for ${osPlatform}`); - // const url = urls[osPlatform]; - // core.debug(`binary location: ${url}`); + core.info(`Preparing to download/install stackql for ${osPlatform}`); switch (osPlatform) { case 'win32': return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); case 'darwin': - core.info(`installing stackql using Homebrew`); + core.info(`Installing stackql using Homebrew`); execSync('brew install stackql', { stdio: 'inherit' }); - // Assuming stackql installs to a standard location accessible in the PATH - // No need to return a path since brew handles placing it in the PATH - return '/usr/local/bin'; // or wherever brew installs binaries + // Find the installation path using which + const stackqlPath = execSync('which stackql', { encoding: 'utf-8' }).trim(); + core.debug(`Stackql installed at: ${stackqlPath}`); + return path.dirname(stackqlPath); // Return the directory of the binary case 'linux': return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); default: throw new Error(`Unsupported platform: ${osPlatform}`); } - } catch (error) { - core.error(error); + core.error(`Failed to install Stackql: ${error}`); throw error; } } - async function makeExecutable(cliPath, osPlatform){ try { if(osPlatform === 'win32'){ @@ -6880,13 +6876,13 @@ async function setup() { core.debug(`path to cli: ${cliPath}`); // set perms and make executable - core.debug(`updating permissions for ${cliPath}`); - fs.chmodSync(cliPath, '777'); - - core.debug(`adding ${cliPath} to the path`); - core.addPath(cliPath) - - await makeExecutable(cliPath, osPlatform) + if(osPlatform != 'darwin'){ + core.debug(`updating permissions for ${cliPath}`); + fs.chmodSync(cliPath, '777'); + core.debug(`adding ${cliPath} to the path`); + core.addPath(cliPath) + await makeExecutable(cliPath, osPlatform) + } const wrapper = core.getInput('use_wrapper') === 'true'; diff --git a/index.js b/index.js index 34ca988..e45c680 100644 --- a/index.js +++ b/index.js @@ -40,35 +40,31 @@ const urls = { // } // } -async function downloadCLI(osPlatform){ +async function downloadCLI(osPlatform) { try { - - core.info(`downloading stackql binary for ${osPlatform}`); - // const url = urls[osPlatform]; - // core.debug(`binary location: ${url}`); + core.info(`Preparing to download/install stackql for ${osPlatform}`); switch (osPlatform) { case 'win32': return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); case 'darwin': - core.info(`installing stackql using Homebrew`); + core.info(`Installing stackql using Homebrew`); execSync('brew install stackql', { stdio: 'inherit' }); - // Assuming stackql installs to a standard location accessible in the PATH - // No need to return a path since brew handles placing it in the PATH - return '/usr/local/bin'; // or wherever brew installs binaries + // Find the installation path using which + const stackqlPath = execSync('which stackql', { encoding: 'utf-8' }).trim(); + core.debug(`Stackql installed at: ${stackqlPath}`); + return path.dirname(stackqlPath); // Return the directory of the binary case 'linux': return await tc.extractZip(await tc.downloadTool(urls[osPlatform])); default: throw new Error(`Unsupported platform: ${osPlatform}`); } - } catch (error) { - core.error(error); + core.error(`Failed to install Stackql: ${error}`); throw error; } } - async function makeExecutable(cliPath, osPlatform){ try { if(osPlatform === 'win32'){ @@ -131,13 +127,13 @@ async function setup() { core.debug(`path to cli: ${cliPath}`); // set perms and make executable - core.debug(`updating permissions for ${cliPath}`); - fs.chmodSync(cliPath, '777'); - - core.debug(`adding ${cliPath} to the path`); - core.addPath(cliPath) - - await makeExecutable(cliPath, osPlatform) + if(osPlatform != 'darwin'){ + core.debug(`updating permissions for ${cliPath}`); + fs.chmodSync(cliPath, '777'); + core.debug(`adding ${cliPath} to the path`); + core.addPath(cliPath) + await makeExecutable(cliPath, osPlatform) + } const wrapper = core.getInput('use_wrapper') === 'true'; From e8ff82b3225db5c86f357fe199f18d1ce7f880fa Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 07:55:13 +1000 Subject: [PATCH 09/14] updated test --- .github/workflows/setup-stackql.yml | 75 ++++++++++++++++++++++------- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index 0e00490..694621c 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -29,25 +29,64 @@ jobs: with: use_wrapper: ${{matrix.use_wrapper}} - - name: Validate Stackql Version + - name: Get Stackql Version + id: get-stackql-version run: | - stackql --version + echo "::set-output name=stackql_version::$(stackql --version)" - - name: Use GitHub Provider + - name: Validate Stackql Version run: | - stackql exec -i ./examples/github-example.iql - env: - STACKQL_GITHUB_USERNAME: ${{ secrets.STACKQL_GITHUB_USERNAME }} - STACKQL_GITHUB_PASSWORD: ${{ secrets.STACKQL_GITHUB_PASSWORD }} + # Retrieve the output from the previous step + VERSION_OUTPUT="${{ steps.get-stackql-version.outputs.stackql_version }}" + echo "Version output: $VERSION_OUTPUT" + + # Regex patterns to validate different parts + SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" + PLATFORM_REGEX="(Linux|Darwin|Windows)" + DATE_REGEX="\b\d{4}-\d{2}-\d{2}\b" + SHA_REGEX="\([0-9a-f]{7}\)" + + # Perform validation + if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then + echo "Semantic version does not match expected format" + exit 1 + fi + if ! [[ "$VERSION_OUTPUT" =~ $PLATFORM_REGEX ]]; then + echo "Platform information does not match expected formats" + exit 1 + fi + if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then + echo "Build date does not match expected format" + exit 1 + fi + if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then + echo "Commit SHA does not match expected format" + exit 1 + fi + + echo "All components of the version output are validated successfully." + + + + # - name: Validate Stackql Version + # run: | + # stackql --version + + # - name: Use GitHub Provider + # run: | + # stackql exec -i ./examples/github-example.iql + # env: + # STACKQL_GITHUB_USERNAME: ${{ secrets.STACKQL_GITHUB_USERNAME }} + # STACKQL_GITHUB_PASSWORD: ${{ secrets.STACKQL_GITHUB_PASSWORD }} - - name: Use Google Provider - run: | - stackql exec -i ./examples/google-example.iql - env: - GOOGLE_CREDENTIALS : ${{ secrets.GOOGLE_CREDENTIALS }} - - - name: Handle error - if: ${{ matrix.use_wrapper}} - continue-on-error: true - run: | ## specify a query file that doesnt exist - stackql exec -i ./examples/does-not-exist.iql + # - name: Use Google Provider + # run: | + # stackql exec -i ./examples/google-example.iql + # env: + # GOOGLE_CREDENTIALS : ${{ secrets.GOOGLE_CREDENTIALS }} + + # - name: Handle error + # if: ${{ matrix.use_wrapper}} + # continue-on-error: true + # run: | ## specify a query file that doesnt exist + # stackql exec -i ./examples/does-not-exist.iql From 4f99260b6945141d94971783f4bbb266d5920e36 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 07:57:54 +1000 Subject: [PATCH 10/14] updated test --- .github/workflows/setup-stackql.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index 694621c..dc7fa37 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -43,8 +43,8 @@ jobs: # Regex patterns to validate different parts SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" PLATFORM_REGEX="(Linux|Darwin|Windows)" - DATE_REGEX="\b\d{4}-\d{2}-\d{2}\b" - SHA_REGEX="\([0-9a-f]{7}\)" + # DATE_REGEX="\b\d{4}-\d{2}-\d{2}\b" + # SHA_REGEX="\([0-9a-f]{7}\)" # Perform validation if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then @@ -55,16 +55,16 @@ jobs: echo "Platform information does not match expected formats" exit 1 fi - if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then - echo "Build date does not match expected format" - exit 1 - fi - if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then - echo "Commit SHA does not match expected format" - exit 1 - fi + # if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then + # echo "Build date does not match expected format" + # exit 1 + # fi + # if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then + # echo "Commit SHA does not match expected format" + # exit 1 + # fi - echo "All components of the version output are validated successfully." + echo "stackql --version output validated successfully." From 01161af3e5c1973949271605735b76c59af79cb8 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 08:00:21 +1000 Subject: [PATCH 11/14] updated test --- .github/workflows/setup-stackql.yml | 35 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index dc7fa37..627e6ab 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -32,21 +32,21 @@ jobs: - name: Get Stackql Version id: get-stackql-version run: | - echo "::set-output name=stackql_version::$(stackql --version)" + echo "stackql_version<> $GITHUB_ENV + stackql --version >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV - name: Validate Stackql Version run: | - # Retrieve the output from the previous step - VERSION_OUTPUT="${{ steps.get-stackql-version.outputs.stackql_version }}" + # Extract only the relevant line containing version information + VERSION_OUTPUT=$(echo "${{ env.stackql_version }}" | grep -E 'stackql v[0-9]+\.[0-9]+\.[0-9]+') echo "Version output: $VERSION_OUTPUT" - # Regex patterns to validate different parts SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" PLATFORM_REGEX="(Linux|Darwin|Windows)" - # DATE_REGEX="\b\d{4}-\d{2}-\d{2}\b" - # SHA_REGEX="\([0-9a-f]{7}\)" + DATE_REGEX="BuildDate: \b\d{4}-\d{2}-\d{2}\b" + SHA_REGEX="\([0-9a-f]{7}\)" - # Perform validation if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then echo "Semantic version does not match expected format" exit 1 @@ -55,16 +55,17 @@ jobs: echo "Platform information does not match expected formats" exit 1 fi - # if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then - # echo "Build date does not match expected format" - # exit 1 - # fi - # if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then - # echo "Commit SHA does not match expected format" - # exit 1 - # fi - - echo "stackql --version output validated successfully." + if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then + echo "Build date does not match expected format" + exit 1 + fi + if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then + echo "Commit SHA does not match expected format" + exit 1 + fi + + echo "All components of the version output are validated successfully." + From 6874caa15c479dca59e3d56657ed78750803ee4f Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 08:06:52 +1000 Subject: [PATCH 12/14] updated test --- .github/workflows/setup-stackql.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index 627e6ab..f54d659 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -44,8 +44,8 @@ jobs: SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" PLATFORM_REGEX="(Linux|Darwin|Windows)" - DATE_REGEX="BuildDate: \b\d{4}-\d{2}-\d{2}\b" - SHA_REGEX="\([0-9a-f]{7}\)" + # DATE_REGEX="BuildDate: \b\d{4}-\d{2}-\d{2}\b" + # SHA_REGEX="\([0-9a-f]{7}\)" if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then echo "Semantic version does not match expected format" @@ -55,14 +55,14 @@ jobs: echo "Platform information does not match expected formats" exit 1 fi - if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then - echo "Build date does not match expected format" - exit 1 - fi - if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then - echo "Commit SHA does not match expected format" - exit 1 - fi + # if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then + # echo "Build date does not match expected format" + # exit 1 + # fi + # if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then + # echo "Commit SHA does not match expected format" + # exit 1 + # fi echo "All components of the version output are validated successfully." From 7b06d892b3ce25ff5383e1d90186589422f14211 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 08:09:53 +1000 Subject: [PATCH 13/14] updated test --- .github/workflows/setup-stackql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index f54d659..ff8d321 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -43,7 +43,7 @@ jobs: echo "Version output: $VERSION_OUTPUT" SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" - PLATFORM_REGEX="(Linux|Darwin|Windows)" + PLATFORM_REGEX="(Linux|Darwin|Windows|Homebrew)" # DATE_REGEX="BuildDate: \b\d{4}-\d{2}-\d{2}\b" # SHA_REGEX="\([0-9a-f]{7}\)" From 97ec72043eba2540643ca566ea27c21a78a2d1cf Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 27 Apr 2024 08:14:29 +1000 Subject: [PATCH 14/14] updated test --- .github/workflows/setup-stackql.yml | 38 +---------------------------- dist/index.js | 29 ---------------------- index.js | 29 ---------------------- 3 files changed, 1 insertion(+), 95 deletions(-) diff --git a/.github/workflows/setup-stackql.yml b/.github/workflows/setup-stackql.yml index ff8d321..888d515 100644 --- a/.github/workflows/setup-stackql.yml +++ b/.github/workflows/setup-stackql.yml @@ -44,8 +44,6 @@ jobs: SEMVER_REGEX="v[0-9]+\.[0-9]+\.[0-9]+" PLATFORM_REGEX="(Linux|Darwin|Windows|Homebrew)" - # DATE_REGEX="BuildDate: \b\d{4}-\d{2}-\d{2}\b" - # SHA_REGEX="\([0-9a-f]{7}\)" if ! [[ "$VERSION_OUTPUT" =~ $SEMVER_REGEX ]]; then echo "Semantic version does not match expected format" @@ -55,39 +53,5 @@ jobs: echo "Platform information does not match expected formats" exit 1 fi - # if ! [[ "$VERSION_OUTPUT" =~ $DATE_REGEX ]]; then - # echo "Build date does not match expected format" - # exit 1 - # fi - # if ! [[ "$VERSION_OUTPUT" =~ $SHA_REGEX ]]; then - # echo "Commit SHA does not match expected format" - # exit 1 - # fi - echo "All components of the version output are validated successfully." - - - - - # - name: Validate Stackql Version - # run: | - # stackql --version - - # - name: Use GitHub Provider - # run: | - # stackql exec -i ./examples/github-example.iql - # env: - # STACKQL_GITHUB_USERNAME: ${{ secrets.STACKQL_GITHUB_USERNAME }} - # STACKQL_GITHUB_PASSWORD: ${{ secrets.STACKQL_GITHUB_PASSWORD }} - - # - name: Use Google Provider - # run: | - # stackql exec -i ./examples/google-example.iql - # env: - # GOOGLE_CREDENTIALS : ${{ secrets.GOOGLE_CREDENTIALS }} - - # - name: Handle error - # if: ${{ matrix.use_wrapper}} - # continue-on-error: true - # run: | ## specify a query file that doesnt exist - # stackql exec -i ./examples/does-not-exist.iql + echo "version output validated successfully." \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 873acbc..8713439 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6757,38 +6757,9 @@ const io = __nccwpck_require__(9234); const urls = { 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip', - // 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg', 'win32': 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.zip', } -// async function downloadCLI(osPlatform){ -// try { - -// core.info(`downloading stackql binary for ${osPlatform}`); -// const url = urls[osPlatform] -// core.debug(`binary location: ${url}`); - -// switch (osPlatform) { -// case 'win32': -// return await tc.extractZip(await tc.downloadTool(url)); -// case 'darwin': -// let tmpPath = await tc.downloadTool(url); -// core.info(`extracting mac pkg in ${tmpPath}...`); -// const installPath = '/Users/runner/work/_temp/stackql-pkg'; -// execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`); -// return `${installPath}/Payload`; -// case 'linux': -// return await tc.extractZip(await tc.downloadTool(url)); -// default: -// throw new Error(`Unsupported platform: ${osPlatform}`); -// } - -// } catch (error) { -// core.error(error); -// throw error; -// } -// } - async function downloadCLI(osPlatform) { try { core.info(`Preparing to download/install stackql for ${osPlatform}`); diff --git a/index.js b/index.js index e45c680..6a1d920 100644 --- a/index.js +++ b/index.js @@ -8,38 +8,9 @@ const io = require('@actions/io'); const urls = { 'linux': 'https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip', - // 'darwin': 'https://storage.googleapis.com/stackql-public-releases/latest/stackql_darwin_multiarch.pkg', 'win32': 'https://releases.stackql.io/stackql/latest/stackql_windows_amd64.zip', } -// async function downloadCLI(osPlatform){ -// try { - -// core.info(`downloading stackql binary for ${osPlatform}`); -// const url = urls[osPlatform] -// core.debug(`binary location: ${url}`); - -// switch (osPlatform) { -// case 'win32': -// return await tc.extractZip(await tc.downloadTool(url)); -// case 'darwin': -// let tmpPath = await tc.downloadTool(url); -// core.info(`extracting mac pkg in ${tmpPath}...`); -// const installPath = '/Users/runner/work/_temp/stackql-pkg'; -// execSync(`pkgutil --expand-full ${tmpPath} ${installPath}`); -// return `${installPath}/Payload`; -// case 'linux': -// return await tc.extractZip(await tc.downloadTool(url)); -// default: -// throw new Error(`Unsupported platform: ${osPlatform}`); -// } - -// } catch (error) { -// core.error(error); -// throw error; -// } -// } - async function downloadCLI(osPlatform) { try { core.info(`Preparing to download/install stackql for ${osPlatform}`);