node-red-contrib-tak-registration 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +14 -0
- package/README.md +35 -0
- package/node_modules/adm-zip/LICENSE +21 -0
- package/node_modules/adm-zip/README.md +65 -0
- package/node_modules/adm-zip/adm-zip.js +783 -0
- package/node_modules/adm-zip/headers/entryHeader.js +338 -0
- package/node_modules/adm-zip/headers/index.js +2 -0
- package/node_modules/adm-zip/headers/mainHeader.js +129 -0
- package/node_modules/adm-zip/methods/deflater.js +33 -0
- package/node_modules/adm-zip/methods/index.js +3 -0
- package/node_modules/adm-zip/methods/inflater.js +31 -0
- package/node_modules/adm-zip/methods/zipcrypto.js +170 -0
- package/node_modules/adm-zip/package.json +77 -0
- package/node_modules/adm-zip/util/constants.js +142 -0
- package/node_modules/adm-zip/util/errors.js +35 -0
- package/node_modules/adm-zip/util/fattr.js +79 -0
- package/node_modules/adm-zip/util/fileSystem.js +11 -0
- package/node_modules/adm-zip/util/index.js +4 -0
- package/node_modules/adm-zip/util/utils.js +246 -0
- package/node_modules/adm-zip/zipEntry.js +333 -0
- package/node_modules/adm-zip/zipFile.js +384 -0
- package/node_modules/asynckit/LICENSE +21 -0
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +91 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/axios/CHANGELOG.md +836 -0
- package/node_modules/axios/LICENSE +19 -0
- package/node_modules/axios/README.md +892 -0
- package/node_modules/axios/SECURITY.md +5 -0
- package/node_modules/axios/UPGRADE_GUIDE.md +162 -0
- package/node_modules/axios/dist/axios.js +2275 -0
- package/node_modules/axios/dist/axios.map +1 -0
- package/node_modules/axios/dist/axios.min.js +2 -0
- package/node_modules/axios/dist/axios.min.map +1 -0
- package/node_modules/axios/index.d.ts +206 -0
- package/node_modules/axios/index.js +1 -0
- package/node_modules/axios/lib/adapters/README.md +37 -0
- package/node_modules/axios/lib/adapters/http.js +363 -0
- package/node_modules/axios/lib/adapters/xhr.js +212 -0
- package/node_modules/axios/lib/axios.js +57 -0
- package/node_modules/axios/lib/cancel/Cancel.js +19 -0
- package/node_modules/axios/lib/cancel/CancelToken.js +119 -0
- package/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/axios/lib/core/Axios.js +148 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +54 -0
- package/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/axios/lib/core/buildFullPath.js +20 -0
- package/node_modules/axios/lib/core/createError.js +18 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +87 -0
- package/node_modules/axios/lib/core/enhanceError.js +43 -0
- package/node_modules/axios/lib/core/mergeConfig.js +99 -0
- package/node_modules/axios/lib/core/settle.js +25 -0
- package/node_modules/axios/lib/core/transformData.js +22 -0
- package/node_modules/axios/lib/defaults.js +134 -0
- package/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/axios/lib/env/data.js +3 -0
- package/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/axios/lib/helpers/bind.js +11 -0
- package/node_modules/axios/lib/helpers/buildURL.js +70 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +14 -0
- package/node_modules/axios/lib/helpers/cookies.js +53 -0
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +24 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +14 -0
- package/node_modules/axios/lib/helpers/isAxiosError.js +11 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +68 -0
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +12 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +53 -0
- package/node_modules/axios/lib/helpers/spread.js +27 -0
- package/node_modules/axios/lib/helpers/validator.js +82 -0
- package/node_modules/axios/lib/utils.js +349 -0
- package/node_modules/axios/package.json +113 -0
- package/node_modules/axios/tsconfig.json +14 -0
- package/node_modules/axios/tslint.json +6 -0
- package/node_modules/combined-stream/License +19 -0
- package/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/node_modules/combined-stream/package.json +57 -0
- package/node_modules/combined-stream/yarn.lock +17 -0
- package/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/delayed-stream/License +19 -0
- package/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/delayed-stream/package.json +62 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +148 -0
- package/node_modules/follow-redirects/debug.js +15 -0
- package/node_modules/follow-redirects/http.js +1 -0
- package/node_modules/follow-redirects/https.js +1 -0
- package/node_modules/follow-redirects/index.js +569 -0
- package/node_modules/follow-redirects/package.json +95 -0
- package/node_modules/form-data/License +19 -0
- package/node_modules/form-data/README.md.bak +358 -0
- package/node_modules/form-data/Readme.md +358 -0
- package/node_modules/form-data/index.d.ts +62 -0
- package/node_modules/form-data/lib/browser.js +2 -0
- package/node_modules/form-data/lib/form_data.js +501 -0
- package/node_modules/form-data/lib/populate.js +10 -0
- package/node_modules/form-data/package.json +101 -0
- package/node_modules/mime-db/HISTORY.md +499 -0
- package/node_modules/mime-db/LICENSE +22 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8471 -0
- package/node_modules/mime-db/index.js +11 -0
- package/node_modules/mime-db/package.json +102 -0
- package/node_modules/mime-types/HISTORY.md +388 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +87 -0
- package/node_modules/uuid/CHANGELOG.md +229 -0
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +505 -0
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/uuid/dist/rng-browser.js +26 -0
- package/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/uuid/dist/stringify.js +39 -0
- package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/uuid/dist/v35.js +78 -0
- package/node_modules/uuid/dist/v4.js +37 -0
- package/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/uuid/package.json +164 -0
- package/node_modules/uuid/wrapper.mjs +10 -0
- package/package.json +32 -0
- package/tak-registration.html +111 -0
- package/tak-registration.js +169 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('./../utils');
|
|
4
|
+
|
|
5
|
+
module.exports = (
|
|
6
|
+
utils.isStandardBrowserEnv() ?
|
|
7
|
+
|
|
8
|
+
// Standard browser envs have full support of the APIs needed to test
|
|
9
|
+
// whether the request URL is of the same origin as current location.
|
|
10
|
+
(function standardBrowserEnv() {
|
|
11
|
+
var msie = /(msie|trident)/i.test(navigator.userAgent);
|
|
12
|
+
var urlParsingNode = document.createElement('a');
|
|
13
|
+
var originURL;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Parse a URL to discover it's components
|
|
17
|
+
*
|
|
18
|
+
* @param {String} url The URL to be parsed
|
|
19
|
+
* @returns {Object}
|
|
20
|
+
*/
|
|
21
|
+
function resolveURL(url) {
|
|
22
|
+
var href = url;
|
|
23
|
+
|
|
24
|
+
if (msie) {
|
|
25
|
+
// IE needs attribute set twice to normalize properties
|
|
26
|
+
urlParsingNode.setAttribute('href', href);
|
|
27
|
+
href = urlParsingNode.href;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
urlParsingNode.setAttribute('href', href);
|
|
31
|
+
|
|
32
|
+
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
33
|
+
return {
|
|
34
|
+
href: urlParsingNode.href,
|
|
35
|
+
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
36
|
+
host: urlParsingNode.host,
|
|
37
|
+
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
38
|
+
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
39
|
+
hostname: urlParsingNode.hostname,
|
|
40
|
+
port: urlParsingNode.port,
|
|
41
|
+
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
42
|
+
urlParsingNode.pathname :
|
|
43
|
+
'/' + urlParsingNode.pathname
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
originURL = resolveURL(window.location.href);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Determine if a URL shares the same origin as the current location
|
|
51
|
+
*
|
|
52
|
+
* @param {String} requestURL The URL to test
|
|
53
|
+
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
54
|
+
*/
|
|
55
|
+
return function isURLSameOrigin(requestURL) {
|
|
56
|
+
var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
57
|
+
return (parsed.protocol === originURL.protocol &&
|
|
58
|
+
parsed.host === originURL.host);
|
|
59
|
+
};
|
|
60
|
+
})() :
|
|
61
|
+
|
|
62
|
+
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
63
|
+
(function nonStandardBrowserEnv() {
|
|
64
|
+
return function isURLSameOrigin() {
|
|
65
|
+
return true;
|
|
66
|
+
};
|
|
67
|
+
})()
|
|
68
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('../utils');
|
|
4
|
+
|
|
5
|
+
module.exports = function normalizeHeaderName(headers, normalizedName) {
|
|
6
|
+
utils.forEach(headers, function processHeader(value, name) {
|
|
7
|
+
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
8
|
+
headers[normalizedName] = value;
|
|
9
|
+
delete headers[name];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('./../utils');
|
|
4
|
+
|
|
5
|
+
// Headers whose duplicates are ignored by node
|
|
6
|
+
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
7
|
+
var ignoreDuplicateOf = [
|
|
8
|
+
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
9
|
+
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
10
|
+
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
11
|
+
'referer', 'retry-after', 'user-agent'
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Parse headers into an object
|
|
16
|
+
*
|
|
17
|
+
* ```
|
|
18
|
+
* Date: Wed, 27 Aug 2014 08:58:49 GMT
|
|
19
|
+
* Content-Type: application/json
|
|
20
|
+
* Connection: keep-alive
|
|
21
|
+
* Transfer-Encoding: chunked
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param {String} headers Headers needing to be parsed
|
|
25
|
+
* @returns {Object} Headers parsed into an object
|
|
26
|
+
*/
|
|
27
|
+
module.exports = function parseHeaders(headers) {
|
|
28
|
+
var parsed = {};
|
|
29
|
+
var key;
|
|
30
|
+
var val;
|
|
31
|
+
var i;
|
|
32
|
+
|
|
33
|
+
if (!headers) { return parsed; }
|
|
34
|
+
|
|
35
|
+
utils.forEach(headers.split('\n'), function parser(line) {
|
|
36
|
+
i = line.indexOf(':');
|
|
37
|
+
key = utils.trim(line.substr(0, i)).toLowerCase();
|
|
38
|
+
val = utils.trim(line.substr(i + 1));
|
|
39
|
+
|
|
40
|
+
if (key) {
|
|
41
|
+
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (key === 'set-cookie') {
|
|
45
|
+
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
|
46
|
+
} else {
|
|
47
|
+
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return parsed;
|
|
53
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
5
|
+
*
|
|
6
|
+
* Common use case would be to use `Function.prototype.apply`.
|
|
7
|
+
*
|
|
8
|
+
* ```js
|
|
9
|
+
* function f(x, y, z) {}
|
|
10
|
+
* var args = [1, 2, 3];
|
|
11
|
+
* f.apply(null, args);
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* With `spread` this example can be re-written.
|
|
15
|
+
*
|
|
16
|
+
* ```js
|
|
17
|
+
* spread(function(x, y, z) {})([1, 2, 3]);
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @param {Function} callback
|
|
21
|
+
* @returns {Function}
|
|
22
|
+
*/
|
|
23
|
+
module.exports = function spread(callback) {
|
|
24
|
+
return function wrap(arr) {
|
|
25
|
+
return callback.apply(null, arr);
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var VERSION = require('../env/data').version;
|
|
4
|
+
|
|
5
|
+
var validators = {};
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line func-names
|
|
8
|
+
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
|
|
9
|
+
validators[type] = function validator(thing) {
|
|
10
|
+
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
var deprecatedWarnings = {};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Transitional option validator
|
|
18
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
19
|
+
* @param {string?} version - deprecated version / removed since version
|
|
20
|
+
* @param {string?} message - some message with additional info
|
|
21
|
+
* @returns {function}
|
|
22
|
+
*/
|
|
23
|
+
validators.transitional = function transitional(validator, version, message) {
|
|
24
|
+
function formatMessage(opt, desc) {
|
|
25
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line func-names
|
|
29
|
+
return function(value, opt, opts) {
|
|
30
|
+
if (validator === false) {
|
|
31
|
+
throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
35
|
+
deprecatedWarnings[opt] = true;
|
|
36
|
+
// eslint-disable-next-line no-console
|
|
37
|
+
console.warn(
|
|
38
|
+
formatMessage(
|
|
39
|
+
opt,
|
|
40
|
+
' has been deprecated since v' + version + ' and will be removed in the near future'
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return validator ? validator(value, opt, opts) : true;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Assert object's properties type
|
|
51
|
+
* @param {object} options
|
|
52
|
+
* @param {object} schema
|
|
53
|
+
* @param {boolean?} allowUnknown
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
function assertOptions(options, schema, allowUnknown) {
|
|
57
|
+
if (typeof options !== 'object') {
|
|
58
|
+
throw new TypeError('options must be an object');
|
|
59
|
+
}
|
|
60
|
+
var keys = Object.keys(options);
|
|
61
|
+
var i = keys.length;
|
|
62
|
+
while (i-- > 0) {
|
|
63
|
+
var opt = keys[i];
|
|
64
|
+
var validator = schema[opt];
|
|
65
|
+
if (validator) {
|
|
66
|
+
var value = options[opt];
|
|
67
|
+
var result = value === undefined || validator(value, opt, options);
|
|
68
|
+
if (result !== true) {
|
|
69
|
+
throw new TypeError('option ' + opt + ' must be ' + result);
|
|
70
|
+
}
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
if (allowUnknown !== true) {
|
|
74
|
+
throw Error('Unknown option ' + opt);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
module.exports = {
|
|
80
|
+
assertOptions: assertOptions,
|
|
81
|
+
validators: validators
|
|
82
|
+
};
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var bind = require('./helpers/bind');
|
|
4
|
+
|
|
5
|
+
// utils is a library of generic helper functions non-specific to axios
|
|
6
|
+
|
|
7
|
+
var toString = Object.prototype.toString;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Determine if a value is an Array
|
|
11
|
+
*
|
|
12
|
+
* @param {Object} val The value to test
|
|
13
|
+
* @returns {boolean} True if value is an Array, otherwise false
|
|
14
|
+
*/
|
|
15
|
+
function isArray(val) {
|
|
16
|
+
return toString.call(val) === '[object Array]';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Determine if a value is undefined
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} val The value to test
|
|
23
|
+
* @returns {boolean} True if the value is undefined, otherwise false
|
|
24
|
+
*/
|
|
25
|
+
function isUndefined(val) {
|
|
26
|
+
return typeof val === 'undefined';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Determine if a value is a Buffer
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} val The value to test
|
|
33
|
+
* @returns {boolean} True if value is a Buffer, otherwise false
|
|
34
|
+
*/
|
|
35
|
+
function isBuffer(val) {
|
|
36
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
37
|
+
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Determine if a value is an ArrayBuffer
|
|
42
|
+
*
|
|
43
|
+
* @param {Object} val The value to test
|
|
44
|
+
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
45
|
+
*/
|
|
46
|
+
function isArrayBuffer(val) {
|
|
47
|
+
return toString.call(val) === '[object ArrayBuffer]';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Determine if a value is a FormData
|
|
52
|
+
*
|
|
53
|
+
* @param {Object} val The value to test
|
|
54
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
|
55
|
+
*/
|
|
56
|
+
function isFormData(val) {
|
|
57
|
+
return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Determine if a value is a view on an ArrayBuffer
|
|
62
|
+
*
|
|
63
|
+
* @param {Object} val The value to test
|
|
64
|
+
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
|
|
65
|
+
*/
|
|
66
|
+
function isArrayBufferView(val) {
|
|
67
|
+
var result;
|
|
68
|
+
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
69
|
+
result = ArrayBuffer.isView(val);
|
|
70
|
+
} else {
|
|
71
|
+
result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Determine if a value is a String
|
|
78
|
+
*
|
|
79
|
+
* @param {Object} val The value to test
|
|
80
|
+
* @returns {boolean} True if value is a String, otherwise false
|
|
81
|
+
*/
|
|
82
|
+
function isString(val) {
|
|
83
|
+
return typeof val === 'string';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Determine if a value is a Number
|
|
88
|
+
*
|
|
89
|
+
* @param {Object} val The value to test
|
|
90
|
+
* @returns {boolean} True if value is a Number, otherwise false
|
|
91
|
+
*/
|
|
92
|
+
function isNumber(val) {
|
|
93
|
+
return typeof val === 'number';
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Determine if a value is an Object
|
|
98
|
+
*
|
|
99
|
+
* @param {Object} val The value to test
|
|
100
|
+
* @returns {boolean} True if value is an Object, otherwise false
|
|
101
|
+
*/
|
|
102
|
+
function isObject(val) {
|
|
103
|
+
return val !== null && typeof val === 'object';
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Determine if a value is a plain Object
|
|
108
|
+
*
|
|
109
|
+
* @param {Object} val The value to test
|
|
110
|
+
* @return {boolean} True if value is a plain Object, otherwise false
|
|
111
|
+
*/
|
|
112
|
+
function isPlainObject(val) {
|
|
113
|
+
if (toString.call(val) !== '[object Object]') {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
var prototype = Object.getPrototypeOf(val);
|
|
118
|
+
return prototype === null || prototype === Object.prototype;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Determine if a value is a Date
|
|
123
|
+
*
|
|
124
|
+
* @param {Object} val The value to test
|
|
125
|
+
* @returns {boolean} True if value is a Date, otherwise false
|
|
126
|
+
*/
|
|
127
|
+
function isDate(val) {
|
|
128
|
+
return toString.call(val) === '[object Date]';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Determine if a value is a File
|
|
133
|
+
*
|
|
134
|
+
* @param {Object} val The value to test
|
|
135
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
136
|
+
*/
|
|
137
|
+
function isFile(val) {
|
|
138
|
+
return toString.call(val) === '[object File]';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Determine if a value is a Blob
|
|
143
|
+
*
|
|
144
|
+
* @param {Object} val The value to test
|
|
145
|
+
* @returns {boolean} True if value is a Blob, otherwise false
|
|
146
|
+
*/
|
|
147
|
+
function isBlob(val) {
|
|
148
|
+
return toString.call(val) === '[object Blob]';
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Determine if a value is a Function
|
|
153
|
+
*
|
|
154
|
+
* @param {Object} val The value to test
|
|
155
|
+
* @returns {boolean} True if value is a Function, otherwise false
|
|
156
|
+
*/
|
|
157
|
+
function isFunction(val) {
|
|
158
|
+
return toString.call(val) === '[object Function]';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Determine if a value is a Stream
|
|
163
|
+
*
|
|
164
|
+
* @param {Object} val The value to test
|
|
165
|
+
* @returns {boolean} True if value is a Stream, otherwise false
|
|
166
|
+
*/
|
|
167
|
+
function isStream(val) {
|
|
168
|
+
return isObject(val) && isFunction(val.pipe);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Determine if a value is a URLSearchParams object
|
|
173
|
+
*
|
|
174
|
+
* @param {Object} val The value to test
|
|
175
|
+
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
176
|
+
*/
|
|
177
|
+
function isURLSearchParams(val) {
|
|
178
|
+
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Trim excess whitespace off the beginning and end of a string
|
|
183
|
+
*
|
|
184
|
+
* @param {String} str The String to trim
|
|
185
|
+
* @returns {String} The String freed of excess whitespace
|
|
186
|
+
*/
|
|
187
|
+
function trim(str) {
|
|
188
|
+
return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Determine if we're running in a standard browser environment
|
|
193
|
+
*
|
|
194
|
+
* This allows axios to run in a web worker, and react-native.
|
|
195
|
+
* Both environments support XMLHttpRequest, but not fully standard globals.
|
|
196
|
+
*
|
|
197
|
+
* web workers:
|
|
198
|
+
* typeof window -> undefined
|
|
199
|
+
* typeof document -> undefined
|
|
200
|
+
*
|
|
201
|
+
* react-native:
|
|
202
|
+
* navigator.product -> 'ReactNative'
|
|
203
|
+
* nativescript
|
|
204
|
+
* navigator.product -> 'NativeScript' or 'NS'
|
|
205
|
+
*/
|
|
206
|
+
function isStandardBrowserEnv() {
|
|
207
|
+
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
|
208
|
+
navigator.product === 'NativeScript' ||
|
|
209
|
+
navigator.product === 'NS')) {
|
|
210
|
+
return false;
|
|
211
|
+
}
|
|
212
|
+
return (
|
|
213
|
+
typeof window !== 'undefined' &&
|
|
214
|
+
typeof document !== 'undefined'
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Iterate over an Array or an Object invoking a function for each item.
|
|
220
|
+
*
|
|
221
|
+
* If `obj` is an Array callback will be called passing
|
|
222
|
+
* the value, index, and complete array for each item.
|
|
223
|
+
*
|
|
224
|
+
* If 'obj' is an Object callback will be called passing
|
|
225
|
+
* the value, key, and complete object for each property.
|
|
226
|
+
*
|
|
227
|
+
* @param {Object|Array} obj The object to iterate
|
|
228
|
+
* @param {Function} fn The callback to invoke for each item
|
|
229
|
+
*/
|
|
230
|
+
function forEach(obj, fn) {
|
|
231
|
+
// Don't bother if no value provided
|
|
232
|
+
if (obj === null || typeof obj === 'undefined') {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
// Force an array if not already something iterable
|
|
237
|
+
if (typeof obj !== 'object') {
|
|
238
|
+
/*eslint no-param-reassign:0*/
|
|
239
|
+
obj = [obj];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (isArray(obj)) {
|
|
243
|
+
// Iterate over array values
|
|
244
|
+
for (var i = 0, l = obj.length; i < l; i++) {
|
|
245
|
+
fn.call(null, obj[i], i, obj);
|
|
246
|
+
}
|
|
247
|
+
} else {
|
|
248
|
+
// Iterate over object keys
|
|
249
|
+
for (var key in obj) {
|
|
250
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
251
|
+
fn.call(null, obj[key], key, obj);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Accepts varargs expecting each argument to be an object, then
|
|
259
|
+
* immutably merges the properties of each object and returns result.
|
|
260
|
+
*
|
|
261
|
+
* When multiple objects contain the same key the later object in
|
|
262
|
+
* the arguments list will take precedence.
|
|
263
|
+
*
|
|
264
|
+
* Example:
|
|
265
|
+
*
|
|
266
|
+
* ```js
|
|
267
|
+
* var result = merge({foo: 123}, {foo: 456});
|
|
268
|
+
* console.log(result.foo); // outputs 456
|
|
269
|
+
* ```
|
|
270
|
+
*
|
|
271
|
+
* @param {Object} obj1 Object to merge
|
|
272
|
+
* @returns {Object} Result of all merge properties
|
|
273
|
+
*/
|
|
274
|
+
function merge(/* obj1, obj2, obj3, ... */) {
|
|
275
|
+
var result = {};
|
|
276
|
+
function assignValue(val, key) {
|
|
277
|
+
if (isPlainObject(result[key]) && isPlainObject(val)) {
|
|
278
|
+
result[key] = merge(result[key], val);
|
|
279
|
+
} else if (isPlainObject(val)) {
|
|
280
|
+
result[key] = merge({}, val);
|
|
281
|
+
} else if (isArray(val)) {
|
|
282
|
+
result[key] = val.slice();
|
|
283
|
+
} else {
|
|
284
|
+
result[key] = val;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
for (var i = 0, l = arguments.length; i < l; i++) {
|
|
289
|
+
forEach(arguments[i], assignValue);
|
|
290
|
+
}
|
|
291
|
+
return result;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Extends object a by mutably adding to it the properties of object b.
|
|
296
|
+
*
|
|
297
|
+
* @param {Object} a The object to be extended
|
|
298
|
+
* @param {Object} b The object to copy properties from
|
|
299
|
+
* @param {Object} thisArg The object to bind function to
|
|
300
|
+
* @return {Object} The resulting value of object a
|
|
301
|
+
*/
|
|
302
|
+
function extend(a, b, thisArg) {
|
|
303
|
+
forEach(b, function assignValue(val, key) {
|
|
304
|
+
if (thisArg && typeof val === 'function') {
|
|
305
|
+
a[key] = bind(val, thisArg);
|
|
306
|
+
} else {
|
|
307
|
+
a[key] = val;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
return a;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
|
|
315
|
+
*
|
|
316
|
+
* @param {string} content with BOM
|
|
317
|
+
* @return {string} content value without BOM
|
|
318
|
+
*/
|
|
319
|
+
function stripBOM(content) {
|
|
320
|
+
if (content.charCodeAt(0) === 0xFEFF) {
|
|
321
|
+
content = content.slice(1);
|
|
322
|
+
}
|
|
323
|
+
return content;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
module.exports = {
|
|
327
|
+
isArray: isArray,
|
|
328
|
+
isArrayBuffer: isArrayBuffer,
|
|
329
|
+
isBuffer: isBuffer,
|
|
330
|
+
isFormData: isFormData,
|
|
331
|
+
isArrayBufferView: isArrayBufferView,
|
|
332
|
+
isString: isString,
|
|
333
|
+
isNumber: isNumber,
|
|
334
|
+
isObject: isObject,
|
|
335
|
+
isPlainObject: isPlainObject,
|
|
336
|
+
isUndefined: isUndefined,
|
|
337
|
+
isDate: isDate,
|
|
338
|
+
isFile: isFile,
|
|
339
|
+
isBlob: isBlob,
|
|
340
|
+
isFunction: isFunction,
|
|
341
|
+
isStream: isStream,
|
|
342
|
+
isURLSearchParams: isURLSearchParams,
|
|
343
|
+
isStandardBrowserEnv: isStandardBrowserEnv,
|
|
344
|
+
forEach: forEach,
|
|
345
|
+
merge: merge,
|
|
346
|
+
extend: extend,
|
|
347
|
+
trim: trim,
|
|
348
|
+
stripBOM: stripBOM
|
|
349
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_from": "axios@^0.24.0",
|
|
3
|
+
"_id": "axios@0.24.0",
|
|
4
|
+
"_inBundle": false,
|
|
5
|
+
"_integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
|
|
6
|
+
"_location": "/node-red-contrib-takfiles/axios",
|
|
7
|
+
"_phantomChildren": {},
|
|
8
|
+
"_requested": {
|
|
9
|
+
"type": "range",
|
|
10
|
+
"registry": true,
|
|
11
|
+
"raw": "axios@^0.24.0",
|
|
12
|
+
"name": "axios",
|
|
13
|
+
"escapedName": "axios",
|
|
14
|
+
"rawSpec": "^0.24.0",
|
|
15
|
+
"saveSpec": null,
|
|
16
|
+
"fetchSpec": "^0.24.0"
|
|
17
|
+
},
|
|
18
|
+
"_requiredBy": [
|
|
19
|
+
"/node-red-contrib-takfiles"
|
|
20
|
+
],
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
|
|
22
|
+
"_shasum": "804e6fa1e4b9c5288501dd9dff56a7a0940d20d6",
|
|
23
|
+
"_spec": "axios@^0.24.0",
|
|
24
|
+
"_where": "/Users/conway/Projects/DCJNodes/takfile/",
|
|
25
|
+
"author": {
|
|
26
|
+
"name": "Matt Zabriskie"
|
|
27
|
+
},
|
|
28
|
+
"browser": {
|
|
29
|
+
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/axios/axios/issues"
|
|
33
|
+
},
|
|
34
|
+
"bundleDependencies": false,
|
|
35
|
+
"bundlesize": [
|
|
36
|
+
{
|
|
37
|
+
"path": "./dist/axios.min.js",
|
|
38
|
+
"threshold": "5kB"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"follow-redirects": "^1.14.4"
|
|
43
|
+
},
|
|
44
|
+
"deprecated": false,
|
|
45
|
+
"description": "Promise based HTTP client for the browser and node.js",
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"abortcontroller-polyfill": "^1.5.0",
|
|
48
|
+
"coveralls": "^3.0.0",
|
|
49
|
+
"dtslint": "^4.1.6",
|
|
50
|
+
"es6-promise": "^4.2.4",
|
|
51
|
+
"grunt": "^1.3.0",
|
|
52
|
+
"grunt-banner": "^0.6.0",
|
|
53
|
+
"grunt-cli": "^1.2.0",
|
|
54
|
+
"grunt-contrib-clean": "^1.1.0",
|
|
55
|
+
"grunt-contrib-watch": "^1.0.0",
|
|
56
|
+
"grunt-eslint": "^23.0.0",
|
|
57
|
+
"grunt-karma": "^4.0.0",
|
|
58
|
+
"grunt-mocha-test": "^0.13.3",
|
|
59
|
+
"grunt-webpack": "^4.0.2",
|
|
60
|
+
"istanbul-instrumenter-loader": "^1.0.0",
|
|
61
|
+
"jasmine-core": "^2.4.1",
|
|
62
|
+
"karma": "^6.3.2",
|
|
63
|
+
"karma-chrome-launcher": "^3.1.0",
|
|
64
|
+
"karma-firefox-launcher": "^2.1.0",
|
|
65
|
+
"karma-jasmine": "^1.1.1",
|
|
66
|
+
"karma-jasmine-ajax": "^0.1.13",
|
|
67
|
+
"karma-safari-launcher": "^1.0.0",
|
|
68
|
+
"karma-sauce-launcher": "^4.3.6",
|
|
69
|
+
"karma-sinon": "^1.0.5",
|
|
70
|
+
"karma-sourcemap-loader": "^0.3.8",
|
|
71
|
+
"karma-webpack": "^4.0.2",
|
|
72
|
+
"load-grunt-tasks": "^3.5.2",
|
|
73
|
+
"minimist": "^1.2.0",
|
|
74
|
+
"mocha": "^8.2.1",
|
|
75
|
+
"sinon": "^4.5.0",
|
|
76
|
+
"terser-webpack-plugin": "^4.2.3",
|
|
77
|
+
"typescript": "^4.0.5",
|
|
78
|
+
"url-search-params": "^0.10.0",
|
|
79
|
+
"webpack": "^4.44.2",
|
|
80
|
+
"webpack-dev-server": "^3.11.0"
|
|
81
|
+
},
|
|
82
|
+
"homepage": "https://axios-http.com",
|
|
83
|
+
"jsdelivr": "dist/axios.min.js",
|
|
84
|
+
"keywords": [
|
|
85
|
+
"xhr",
|
|
86
|
+
"http",
|
|
87
|
+
"ajax",
|
|
88
|
+
"promise",
|
|
89
|
+
"node"
|
|
90
|
+
],
|
|
91
|
+
"license": "MIT",
|
|
92
|
+
"main": "index.js",
|
|
93
|
+
"name": "axios",
|
|
94
|
+
"repository": {
|
|
95
|
+
"type": "git",
|
|
96
|
+
"url": "git+https://github.com/axios/axios.git"
|
|
97
|
+
},
|
|
98
|
+
"scripts": {
|
|
99
|
+
"build": "NODE_ENV=production grunt build",
|
|
100
|
+
"coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
101
|
+
"examples": "node ./examples/server.js",
|
|
102
|
+
"fix": "eslint --fix lib/**/*.js",
|
|
103
|
+
"postversion": "git push && git push --tags",
|
|
104
|
+
"preversion": "grunt version && npm test",
|
|
105
|
+
"start": "node ./sandbox/server.js",
|
|
106
|
+
"test": "grunt test && dtslint",
|
|
107
|
+
"version": "npm run build && git add -A dist && git add CHANGELOG.md bower.json package.json"
|
|
108
|
+
},
|
|
109
|
+
"types": "index.d.ts",
|
|
110
|
+
"typings": "./index.d.ts",
|
|
111
|
+
"unpkg": "dist/axios.min.js",
|
|
112
|
+
"version": "0.24.0"
|
|
113
|
+
}
|