From 79c25f19db1aa02b2216818c2298b7db06e5f370 Mon Sep 17 00:00:00 2001 From: Martyn Janes Date: Fri, 20 Dec 2019 09:12:53 +0100 Subject: [PATCH] Pinned axios version #1 --- CODE_OF_CONDUCT.md | 76 ------- README.md | 2 +- action.yml | 31 +-- dist/index.js | 516 +++++++++++++++------------------------------ package-lock.json | 31 ++- package.json | 8 +- 6 files changed, 206 insertions(+), 458 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 8c1e784..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to make participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, nationality, personal -appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any contributor for other behaviors that they deem inappropriate, -threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies within all project spaces, and it also applies when -an individual is representing the project or its community in public spaces. -Examples of representing a project or community include using an official -project e-mail address, posting via an official social media account, or acting -as an appointed representative at an online or offline event. Representation of -a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported by contacting the project team at opensource+actions/create-release@github.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and appropriate to the circumstances. The project team is -obligated to maintain confidentiality with regard to the reporter of an incident. -Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good -faith may face temporary or permanent repercussions as determined by other -members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/README.md b/README.md index 87845ac..d59a24a 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ jobs: steps: - name: Tangle Release id: tangle_release - uses: obany/gh-tangle-release@v0.5.0 + uses: obany/gh-tangle-release@v0.5.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} IOTA_SEED: ${{ secrets.IOTA_SEED }} diff --git a/action.yml b/action.yml index d6ffabb..445a9d7 100644 --- a/action.yml +++ b/action.yml @@ -1,31 +1,18 @@ -name: 'Create a Release' -description: 'Create a release for a tag in your repository' -author: 'GitHub' +name: 'Create an Immutable Release' +description: 'Create an immutable release for a tag on the IOTA Tangle' +author: 'IOTA Foundation' inputs: tag_name: description: 'The name of the tag. This should come from the webhook payload, `github.GITHUB_REF` when a user pushes a new tag' required: true - release_name: - description: 'The name of the release. For example, `Release v1.0.1`' - required: true - body: - description: 'Text describing the contents of the tag.' + comment: + description: 'An optional comment to include in the Tangle payload' required: false - draft: - description: '`true` to create a draft (unpublished) release, `false` to create a published one. Default: `false`' - required: false - default: false - prerelease: - description: '`true` to identify the release as a prerelease. `false` to identify the release as a full release. Default: `false`' - required: false - default: false outputs: - id: - description: 'The ID of the created Release' - html_url: - description: 'The URL users can navigate to in order to view the release' - upload_url: - description: 'The URL for uploading assets to the release' + tx_hash: + description: 'The hash of the transaction on the Tangle' + tx_explore_url: + description: 'A url which can be used to explore the transaction on the Tangle' runs: using: 'node12' main: 'dist/index.js' diff --git a/dist/index.js b/dist/index.js index e01307c..204dea3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1668,13 +1668,9 @@ function trim(str) { * * react-native: * navigator.product -> 'ReactNative' - * nativescript - * navigator.product -> 'NativeScript' or 'NS' */ function isStandardBrowserEnv() { - if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || - navigator.product === 'NativeScript' || - navigator.product === 'NS')) { + if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( @@ -1755,32 +1751,6 @@ function merge(/* obj1, obj2, obj3, ... */) { return result; } -/** - * Function equal to merge with the difference being that no reference - * to original objects is kept. - * - * @see merge - * @param {Object} obj1 Object to merge - * @returns {Object} Result of all merge properties - */ -function deepMerge(/* obj1, obj2, obj3, ... */) { - var result = {}; - function assignValue(val, key) { - if (typeof result[key] === 'object' && typeof val === 'object') { - result[key] = deepMerge(result[key], val); - } else if (typeof val === 'object') { - result[key] = deepMerge({}, val); - } else { - result[key] = val; - } - } - - for (var i = 0, l = arguments.length; i < l; i++) { - forEach(arguments[i], assignValue); - } - return result; -} - /** * Extends object a by mutably adding to it the properties of object b. * @@ -1819,7 +1789,6 @@ module.exports = { isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, - deepMerge: deepMerge, extend: extend, trim: trim }; @@ -2583,22 +2552,7 @@ exports.createGetTransactionObjects = function (provider) { //# sourceMappingURL=createGetTransactionObjects.js.map /***/ }), -/* 72 */ -/***/ (function(module, __unusedexports, __webpack_require__) { - -/** - * Detect Electron renderer process, which is node, but we should - * treat as a browser. - */ - -if (typeof process === 'undefined' || process.type === 'renderer') { - module.exports = __webpack_require__(235); -} else { - module.exports = __webpack_require__(317); -} - - -/***/ }), +/* 72 */, /* 73 */, /* 74 */, /* 75 */, @@ -5012,11 +4966,6 @@ module.exports = function buildURL(url, params, paramsSerializer) { } if (serializedParams) { - var hashmarkIndex = url.indexOf('#'); - if (hashmarkIndex !== -1) { - url = url.slice(0, hashmarkIndex); - } - url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } @@ -7123,18 +7072,6 @@ module.exports = function xhrAdapter(config) { request = null; }; - // Handle browser request cancellation (as opposed to a manual cancellation) - request.onabort = function handleAbort() { - if (!request) { - return; - } - - reject(createError('Request aborted', config, 'ECONNABORTED', request)); - - // Clean up request - request = null; - }; - // Handle low level network errors request.onerror = function handleError() { // Real errors are hidden from us by the browser @@ -7162,8 +7099,8 @@ module.exports = function xhrAdapter(config) { // Add xsrf header var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? - cookies.read(config.xsrfCookieName) : - undefined; + cookies.read(config.xsrfCookieName) : + undefined; if (xsrfValue) { requestHeaders[config.xsrfHeaderName] = xsrfValue; @@ -14192,7 +14129,6 @@ function authenticationRequestError(state, error, options) { var utils = __webpack_require__(35); var bind = __webpack_require__(727); var Axios = __webpack_require__(779); -var mergeConfig = __webpack_require__(825); var defaults = __webpack_require__(774); /** @@ -14222,19 +14158,19 @@ axios.Axios = Axios; // Factory for creating new instances axios.create = function create(instanceConfig) { - return createInstance(mergeConfig(axios.defaults, instanceConfig)); + return createInstance(utils.merge(defaults, instanceConfig)); }; // Expose Cancel & CancelToken axios.Cancel = __webpack_require__(826); axios.CancelToken = __webpack_require__(137); -axios.isCancel = __webpack_require__(732); +axios.isCancel = __webpack_require__(492); // Expose all/spread axios.all = function all(promises) { return Promise.all(promises); }; -axios.spread = __webpack_require__(879); +axios.spread = __webpack_require__(825); module.exports = axios; @@ -14259,7 +14195,7 @@ module.exports = require("assert"); /* 361 */ /***/ (function(module) { -module.exports = {"_from":"axios","_id":"axios@0.19.0","_inBundle":false,"_integrity":"sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"tag","registry":true,"raw":"axios","name":"axios","escapedName":"axios","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.19.0.tgz","_shasum":"8e09bff3d9122e133f7b8101c8fbdd00ed3d2ab8","_spec":"axios","_where":"D:\\Workarea\\iota.org\\gh-tangle-release","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundleDependencies":false,"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.19.0"}; +module.exports = {"_from":"axios@0.18.1","_id":"axios@0.18.1","_inBundle":false,"_integrity":"sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.18.1","name":"axios","escapedName":"axios","rawSpec":"0.18.1","saveSpec":null,"fetchSpec":"0.18.1"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.18.1.tgz","_shasum":"ff3f0de2e7b5d180e757ad98000f1081b87bcea3","_spec":"axios@0.18.1","_where":"D:\\Workarea\\iota.org\\gh-tangle-release","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundleDependencies":false,"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"1.5.10","is-buffer":"^2.0.2"},"deprecated":false,"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.5.7","coveralls":"^2.11.9","es6-promise":"^4.0.5","grunt":"^1.0.1","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.0.0","grunt-contrib-nodeunit":"^1.0.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^19.0.0","grunt-karma":"^2.0.0","grunt-ts":"^6.0.0-beta.3","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.0.0","karma-coverage":"^1.0.0","karma-firefox-launcher":"^1.0.0","karma-jasmine":"^1.0.2","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.1.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","sinon":"^1.17.4","typescript":"^2.0.3","url-search-params":"^0.6.1","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","version":"0.18.1"}; /***/ }), /* 362 */, @@ -14610,29 +14546,8 @@ module.exports = function enhanceError(error, config, code, request, response) { if (code) { error.code = code; } - error.request = request; error.response = response; - error.isAxiosError = true; - - error.toJSON = function() { - return { - // Standard - message: this.message, - name: this.name, - // Microsoft - description: this.description, - number: this.number, - // Mozilla - fileName: this.fileName, - lineNumber: this.lineNumber, - columnNumber: this.columnNumber, - stack: this.stack, - // Axios - config: this.config, - code: this.code - }; - }; return error; }; @@ -19226,7 +19141,18 @@ module.exports = resolveCommand; /***/ }), /* 490 */, /* 491 */, -/* 492 */, +/* 492 */ +/***/ (function(module) { + +"use strict"; + + +module.exports = function isCancel(value) { + return !!(value && value.__CANCEL__); +}; + + +/***/ }), /* 493 */, /* 494 */, /* 495 */ @@ -21534,7 +21460,7 @@ var http = __webpack_require__(605); var https = __webpack_require__(211); var assert = __webpack_require__(357); var Writable = __webpack_require__(413).Writable; -var debug = __webpack_require__(72)("follow-redirects"); +var debug = __webpack_require__(732)("follow-redirects"); // RFC7231ยง4.2.1: Of the request methods defined by this specification, // the GET, HEAD, OPTIONS, and TRACE methods are defined to be safe. @@ -22275,7 +22201,8 @@ var createError = __webpack_require__(26); */ module.exports = function settle(resolve, reject, response) { var validateStatus = response.config.validateStatus; - if (!validateStatus || validateStatus(response.status)) { + // Note: status is not exposed by XDomainRequest + if (!response.status || !validateStatus || validateStatus(response.status)) { resolve(response); } else { reject(createError( @@ -23912,22 +23839,12 @@ var pkg = __webpack_require__(361); var createError = __webpack_require__(26); var enhanceError = __webpack_require__(369); -var isHttps = /https:?/; - /*eslint consistent-return:0*/ module.exports = function httpAdapter(config) { - return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) { - var timer; - var resolve = function resolve(value) { - clearTimeout(timer); - resolvePromise(value); - }; - var reject = function reject(value) { - clearTimeout(timer); - rejectPromise(value); - }; + return new Promise(function dispatchHttpRequest(resolve, reject) { var data = config.data; var headers = config.headers; + var timer; // Set User-Agent (required by some servers) // Only set header if it hasn't been set in config @@ -23940,9 +23857,9 @@ module.exports = function httpAdapter(config) { if (Buffer.isBuffer(data)) { // Nothing to do... } else if (utils.isArrayBuffer(data)) { - data = Buffer.from(new Uint8Array(data)); + data = new Buffer(new Uint8Array(data)); } else if (utils.isString(data)) { - data = Buffer.from(data, 'utf-8'); + data = new Buffer(data, 'utf-8'); } else { return reject(createError( 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', @@ -23977,12 +23894,12 @@ module.exports = function httpAdapter(config) { delete headers.Authorization; } - var isHttpsRequest = isHttps.test(protocol); - var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; + var isHttps = protocol === 'https:'; + var agent = isHttps ? config.httpsAgent : config.httpAgent; var options = { path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''), - method: config.method.toUpperCase(), + method: config.method, headers: headers, agent: agent, auth: auth @@ -24001,45 +23918,17 @@ module.exports = function httpAdapter(config) { var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()]; if (proxyUrl) { var parsedProxyUrl = url.parse(proxyUrl); - var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY; - var shouldProxy = true; + proxy = { + host: parsedProxyUrl.hostname, + port: parsedProxyUrl.port + }; - if (noProxyEnv) { - var noProxy = noProxyEnv.split(',').map(function trim(s) { - return s.trim(); - }); - - shouldProxy = !noProxy.some(function proxyMatch(proxyElement) { - if (!proxyElement) { - return false; - } - if (proxyElement === '*') { - return true; - } - if (proxyElement[0] === '.' && - parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement && - proxyElement.match(/\./g).length === parsed.hostname.match(/\./g).length) { - return true; - } - - return parsed.hostname === proxyElement; - }); - } - - - if (shouldProxy) { - proxy = { - host: parsedProxyUrl.hostname, - port: parsedProxyUrl.port + if (parsedProxyUrl.auth) { + var proxyUrlAuth = parsedProxyUrl.auth.split(':'); + proxy.auth = { + username: proxyUrlAuth[0], + password: proxyUrlAuth[1] }; - - if (parsedProxyUrl.auth) { - var proxyUrlAuth = parsedProxyUrl.auth.split(':'); - proxy.auth = { - username: proxyUrlAuth[0], - password: proxyUrlAuth[1] - }; - } } } } @@ -24053,22 +23942,21 @@ module.exports = function httpAdapter(config) { // Basic proxy authorization if (proxy.auth) { - var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); + var base64 = new Buffer(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); options.headers['Proxy-Authorization'] = 'Basic ' + base64; } } var transport; - var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true); if (config.transport) { transport = config.transport; } else if (config.maxRedirects === 0) { - transport = isHttpsProxy ? https : http; + transport = isHttps ? https : http; } else { if (config.maxRedirects) { options.maxRedirects = config.maxRedirects; } - transport = isHttpsProxy ? httpsFollow : httpFollow; + transport = isHttps ? httpsFollow : httpFollow; } if (config.maxContentLength && config.maxContentLength > -1) { @@ -24079,6 +23967,10 @@ module.exports = function httpAdapter(config) { var req = transport.request(options, function handleResponse(res) { if (req.aborted) return; + // Response has been received so kill timer that handles request timeout + clearTimeout(timer); + timer = null; + // uncompress the response body transparently if required var stream = res; switch (res.headers['content-encoding']) { @@ -24087,7 +23979,7 @@ module.exports = function httpAdapter(config) { case 'compress': case 'deflate': // add the unzipper to the body stream processing pipeline - stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip()); + stream = stream.pipe(zlib.createUnzip()); // remove the content-encoding in order to not confuse downstream operations delete res.headers['content-encoding']; @@ -24129,7 +24021,7 @@ module.exports = function httpAdapter(config) { stream.on('end', function handleStreamEnd() { var responseData = Buffer.concat(responseBuffer); if (config.responseType !== 'arraybuffer') { - responseData = responseData.toString(config.responseEncoding); + responseData = responseData.toString('utf8'); } response.data = responseData; @@ -24145,7 +24037,7 @@ module.exports = function httpAdapter(config) { }); // Handle request timeout - if (config.timeout) { + if (config.timeout && !timer) { timer = setTimeout(function handleRequestTimeout() { req.abort(); reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req)); @@ -24164,9 +24056,7 @@ module.exports = function httpAdapter(config) { // Send the request if (utils.isStream(data)) { - data.on('error', function handleStreamError(err) { - reject(enhanceError(err, config, null, req)); - }).pipe(req); + data.pipe(req); } else { req.end(data); } @@ -24348,64 +24238,64 @@ module.exports = ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. - (function standardBrowserEnv() { - var msie = /(msie|trident)/i.test(navigator.userAgent); - var urlParsingNode = document.createElement('a'); - var originURL; + (function standardBrowserEnv() { + var msie = /(msie|trident)/i.test(navigator.userAgent); + var urlParsingNode = document.createElement('a'); + var originURL; - /** + /** * Parse a URL to discover it's components * * @param {String} url The URL to be parsed * @returns {Object} */ - function resolveURL(url) { - var href = url; + function resolveURL(url) { + var href = url; - if (msie) { + if (msie) { // IE needs attribute set twice to normalize properties - urlParsingNode.setAttribute('href', href); - href = urlParsingNode.href; - } - urlParsingNode.setAttribute('href', href); - - // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils - return { - href: urlParsingNode.href, - protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', - host: urlParsingNode.host, - search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', - hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', - hostname: urlParsingNode.hostname, - port: urlParsingNode.port, - pathname: (urlParsingNode.pathname.charAt(0) === '/') ? - urlParsingNode.pathname : - '/' + urlParsingNode.pathname - }; + href = urlParsingNode.href; } - originURL = resolveURL(window.location.href); + urlParsingNode.setAttribute('href', href); - /** + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** * Determine if a URL shares the same origin as the current location * * @param {String} requestURL The URL to test * @returns {boolean} True if URL shares the same origin, otherwise false */ - return function isURLSameOrigin(requestURL) { - var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; - return (parsed.protocol === originURL.protocol && + return function isURLSameOrigin(requestURL) { + var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && parsed.host === originURL.host); - }; - })() : + }; + })() : // Non standard browser envs (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return function isURLSameOrigin() { - return true; - }; - })() + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })() ); @@ -25610,14 +25500,18 @@ module.exports = function bind(fn, thisArg) { /* 730 */, /* 731 */, /* 732 */ -/***/ (function(module) { +/***/ (function(module, __unusedexports, __webpack_require__) { -"use strict"; +/** + * Detect Electron renderer process, which is node, but we should + * treat as a browser. + */ - -module.exports = function isCancel(value) { - return !!(value && value.__CANCEL__); -}; +if (typeof process === 'undefined' || process.type === 'renderer') { + module.exports = __webpack_require__(235); +} else { + module.exports = __webpack_require__(317); +} /***/ }), @@ -26531,13 +26425,12 @@ function setContentTypeIfUnset(headers, value) { function getDefaultAdapter() { var adapter; - // Only Node.JS has a process variable that is of [[Class]] process - if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') { - // For node use HTTP adapter - adapter = __webpack_require__(670); - } else if (typeof XMLHttpRequest !== 'undefined') { + if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter adapter = __webpack_require__(219); + } else if (typeof process !== 'undefined') { + // For node use HTTP adapter + adapter = __webpack_require__(670); } return adapter; } @@ -26546,7 +26439,6 @@ var defaults = { adapter: getDefaultAdapter(), transformRequest: [function transformRequest(data, headers) { - normalizeHeaderName(headers, 'Accept'); normalizeHeaderName(headers, 'Content-Type'); if (utils.isFormData(data) || utils.isArrayBuffer(data) || @@ -26691,11 +26583,10 @@ exports.createRemoveNeighbors = function (_a) { "use strict"; +var defaults = __webpack_require__(774); var utils = __webpack_require__(35); -var buildURL = __webpack_require__(133); var InterceptorManager = __webpack_require__(283); var dispatchRequest = __webpack_require__(946); -var mergeConfig = __webpack_require__(825); /** * Create a new instance of Axios @@ -26719,14 +26610,13 @@ Axios.prototype.request = function request(config) { /*eslint no-param-reassign:0*/ // Allow for axios('example/url'[, config]) a la fetch API if (typeof config === 'string') { - config = arguments[1] || {}; - config.url = arguments[0]; - } else { - config = config || {}; + config = utils.merge({ + url: arguments[0] + }, arguments[1]); } - config = mergeConfig(this.defaults, config); - config.method = config.method ? config.method.toLowerCase() : 'get'; + config = utils.merge(defaults, {method: 'get'}, this.defaults, config); + config.method = config.method.toLowerCase(); // Hook up interceptors middleware var chain = [dispatchRequest, undefined]; @@ -26747,11 +26637,6 @@ Axios.prototype.request = function request(config) { return promise; }; -Axios.prototype.getUri = function getUri(config) { - config = mergeConfig(this.defaults, config); - return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, ''); -}; - // Provide aliases for supported request methods utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { /*eslint func-names:0*/ @@ -29046,59 +28931,35 @@ function sync (path, options) { /* 823 */, /* 824 */, /* 825 */ -/***/ (function(module, __unusedexports, __webpack_require__) { +/***/ (function(module) { "use strict"; -var utils = __webpack_require__(35); - /** - * Config-specific merge-function which creates a new config-object - * by merging two configuration objects together. + * Syntactic sugar for invoking a function and expanding an array for arguments. * - * @param {Object} config1 - * @param {Object} config2 - * @returns {Object} New object resulting from merging config2 to config1 + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * @returns {Function} */ -module.exports = function mergeConfig(config1, config2) { - // eslint-disable-next-line no-param-reassign - config2 = config2 || {}; - var config = {}; - - utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } - }); - - utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) { - if (utils.isObject(config2[prop])) { - config[prop] = utils.deepMerge(config1[prop], config2[prop]); - } else if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (utils.isObject(config1[prop])) { - config[prop] = utils.deepMerge(config1[prop]); - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); - - utils.forEach([ - 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer', - 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName', - 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength', - 'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken', - 'socketPath' - ], function defaultToConfig2(prop) { - if (typeof config2[prop] !== 'undefined') { - config[prop] = config2[prop]; - } else if (typeof config1[prop] !== 'undefined') { - config[prop] = config1[prop]; - } - }); - - return config; +module.exports = function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; }; @@ -30776,50 +30637,50 @@ module.exports = ( utils.isStandardBrowserEnv() ? // Standard browser envs support document.cookie - (function standardBrowserEnv() { - return { - write: function write(name, value, expires, path, domain, secure) { - var cookie = []; - cookie.push(name + '=' + encodeURIComponent(value)); + (function standardBrowserEnv() { + return { + write: function write(name, value, expires, path, domain, secure) { + var cookie = []; + cookie.push(name + '=' + encodeURIComponent(value)); - if (utils.isNumber(expires)) { - cookie.push('expires=' + new Date(expires).toGMTString()); - } - - if (utils.isString(path)) { - cookie.push('path=' + path); - } - - if (utils.isString(domain)) { - cookie.push('domain=' + domain); - } - - if (secure === true) { - cookie.push('secure'); - } - - document.cookie = cookie.join('; '); - }, - - read: function read(name) { - var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); - return (match ? decodeURIComponent(match[3]) : null); - }, - - remove: function remove(name) { - this.write(name, '', Date.now() - 86400000); + if (utils.isNumber(expires)) { + cookie.push('expires=' + new Date(expires).toGMTString()); } - }; - })() : + + if (utils.isString(path)) { + cookie.push('path=' + path); + } + + if (utils.isString(domain)) { + cookie.push('domain=' + domain); + } + + if (secure === true) { + cookie.push('secure'); + } + + document.cookie = cookie.join('; '); + }, + + read: function read(name) { + var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000); + } + }; + })() : // Non standard browser env (web workers, react-native) lack needed support. - (function nonStandardBrowserEnv() { - return { - write: function write() {}, - read: function read() { return null; }, - remove: function remove() {} - }; - })() + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { return null; }, + remove: function remove() {} + }; + })() ); @@ -30912,40 +30773,7 @@ module.exports = function required(port, protocol) { /* 876 */, /* 877 */, /* 878 */, -/* 879 */ -/***/ (function(module) { - -"use strict"; - - -/** - * Syntactic sugar for invoking a function and expanding an array for arguments. - * - * Common use case would be to use `Function.prototype.apply`. - * - * ```js - * function f(x, y, z) {} - * var args = [1, 2, 3]; - * f.apply(null, args); - * ``` - * - * With `spread` this example can be re-written. - * - * ```js - * spread(function(x, y, z) {})([1, 2, 3]); - * ``` - * - * @param {Function} callback - * @returns {Function} - */ -module.exports = function spread(callback) { - return function wrap(arr) { - return callback.apply(null, arr); - }; -}; - - -/***/ }), +/* 879 */, /* 880 */, /* 881 */ /***/ (function(module) { @@ -34612,7 +34440,7 @@ exports.INVALID_DELAY = 'Invalid delay.'; var utils = __webpack_require__(35); var transformData = __webpack_require__(589); -var isCancel = __webpack_require__(732); +var isCancel = __webpack_require__(492); var defaults = __webpack_require__(774); var isAbsoluteURL = __webpack_require__(590); var combineURLs = __webpack_require__(887); diff --git a/package-lock.json b/package-lock.json index 96e368f..459a320 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gh-tangle-release", - "version": "0.5.1", + "version": "0.5.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1011,9 +1011,9 @@ "dev": true }, "axios": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", - "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", + "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", "requires": { "follow-redirects": "1.5.10", "is-buffer": "^2.0.2" @@ -3316,9 +3316,9 @@ "dev": true }, "handlebars": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.1.tgz", - "integrity": "sha512-bqPIlDk06UWbVEIFoYj+LVo42WhK96J+b25l7hbFDpxrOXMphFM3fNIm+cluwg4Pk2jiLjWU5nHQY7igGE75NQ==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.3.tgz", + "integrity": "sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -6667,14 +6667,23 @@ "dev": true }, "uglify-js": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", - "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.7.2.tgz", + "integrity": "sha512-uhRwZcANNWVLrxLfNFEdltoPNhECUR3lc+UdJoG9CBpMcSnKyWA94tc3eAujB1GcMY5Uwq8ZMp4qWpxWYDQmaA==", "dev": true, "optional": true, "requires": { - "commander": "~2.20.0", + "commander": "~2.20.3", "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, + "optional": true + } } }, "union-value": { diff --git a/package.json b/package.json index d5d28d4..a8fa206 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "gh-tangle-release", - "version": "0.5.1", - "description": "Create a release and adds metadata to the tangle", + "version": "0.5.2", + "description": "Create a release and adds metadata to the IOTA Tangle", "main": "dist/index.js", "scripts": { "lint": "eslint src/**/*.js tests/**/*.js --fix", @@ -17,7 +17,7 @@ "actions", "node" ], - "author": "GitHub", + "author": "Martyn Janes ", "license": "MIT", "dependencies": { "@actions/core": "^1.2.0", @@ -25,7 +25,7 @@ "@actions/github": "^2.0.0", "@iota/converter": "^1.0.0-beta.23", "@iota/core": "^1.0.0-beta.24", - "axios": "^0.19.0" + "axios": "0.18.1" }, "devDependencies": { "@zeit/ncc": "^0.20.5",