Update the @actions/cache package to the latest version (#390)
* Update the @actions/cache package to the latest version Signed-off-by: Sora Morimoto <sora@morimoto.io>
This commit is contained in:
parent
d29c1df198
commit
ab48bf6f67
2003
dist/restore/index.js
vendored
2003
dist/restore/index.js
vendored
@ -1182,7 +1182,7 @@ eval("require")("encoding");
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -1306,6 +1306,21 @@ exports.PropagationAPI = PropagationAPI;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 24:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _default = '00000000-0000-0000-0000-000000000000';
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 40:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
@ -2635,6 +2650,34 @@ function regExpEscape (s) {
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 104:
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function version(uuid) {
|
||||
if (!(0, _validate.default)(uuid)) {
|
||||
throw TypeError('Invalid UUID');
|
||||
}
|
||||
|
||||
return parseInt(uuid.substr(14, 1), 16);
|
||||
}
|
||||
|
||||
var _default = version;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 106:
|
||||
@ -3486,44 +3529,33 @@ exports.debug = debug; // for test
|
||||
/***/ }),
|
||||
|
||||
/***/ 147:
|
||||
/***/ (function(module) {
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
// API
|
||||
module.exports = state;
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Creates initial state object
|
||||
* for iteration over list
|
||||
*
|
||||
* @param {array|object} list - list to iterate over
|
||||
* @param {function|null} sortMethod - function to use for keys sort,
|
||||
* or `null` to keep them as is
|
||||
* @returns {object} - initial state object
|
||||
*/
|
||||
function state(list, sortMethod)
|
||||
{
|
||||
var isNamedList = !Array.isArray(list)
|
||||
, initState =
|
||||
{
|
||||
index : 0,
|
||||
keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
|
||||
jobs : {},
|
||||
results : isNamedList ? {} : [],
|
||||
size : isNamedList ? Object.keys(list).length : list.length
|
||||
|
||||
exports.fromCallback = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
|
||||
else {
|
||||
return new Promise((resolve, reject) => {
|
||||
arguments[arguments.length] = (err, res) => {
|
||||
if (err) return reject(err)
|
||||
resolve(res)
|
||||
}
|
||||
;
|
||||
|
||||
if (sortMethod)
|
||||
{
|
||||
// sort array keys based on it's values
|
||||
// sort object's keys just on own merit
|
||||
initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
|
||||
{
|
||||
return sortMethod(list[a], list[b]);
|
||||
});
|
||||
arguments.length++
|
||||
fn.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
return initState;
|
||||
exports.fromPromise = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
const cb = arguments[arguments.length - 1]
|
||||
if (typeof cb !== 'function') return fn.apply(this, arguments)
|
||||
else fn.apply(this, arguments).then(r => cb(null, r), cb)
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
|
||||
@ -3821,7 +3853,7 @@ exports.default = void 0;
|
||||
|
||||
var _rng = _interopRequireDefault(__webpack_require__(733));
|
||||
|
||||
var _bytesToUuid = _interopRequireDefault(__webpack_require__(940));
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
@ -3914,7 +3946,7 @@ function v1(options, buf, offset) {
|
||||
b[i + n] = node[n];
|
||||
}
|
||||
|
||||
return buf || (0, _bytesToUuid.default)(b);
|
||||
return buf || (0, _stringify.default)(b);
|
||||
}
|
||||
|
||||
var _default = v1;
|
||||
@ -3922,6 +3954,58 @@ exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 197:
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function parse(uuid) {
|
||||
if (!(0, _validate.default)(uuid)) {
|
||||
throw TypeError('Invalid UUID');
|
||||
}
|
||||
|
||||
let v;
|
||||
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
||||
|
||||
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
||||
arr[1] = v >>> 16 & 0xff;
|
||||
arr[2] = v >>> 8 & 0xff;
|
||||
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
||||
|
||||
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
||||
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
||||
|
||||
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
||||
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
||||
|
||||
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
||||
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
||||
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
||||
|
||||
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
||||
arr[11] = v / 0x100000000 & 0xff;
|
||||
arr[12] = v >>> 24 & 0xff;
|
||||
arr[13] = v >>> 16 & 0xff;
|
||||
arr[14] = v >>> 8 & 0xff;
|
||||
arr[15] = v & 0xff;
|
||||
return arr;
|
||||
}
|
||||
|
||||
var _default = parse;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 210:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
@ -4095,6 +4179,21 @@ exports.isTokenCredential = isTokenCredential;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 238:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 241:
|
||||
@ -4109,19 +4208,12 @@ Object.defineProperty(exports, "__esModule", {
|
||||
exports.default = _default;
|
||||
exports.URL = exports.DNS = void 0;
|
||||
|
||||
var _bytesToUuid = _interopRequireDefault(__webpack_require__(940));
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
var _parse = _interopRequireDefault(__webpack_require__(197));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function uuidToBytes(uuid) {
|
||||
// Note: We assume we're being passed a valid uuid string
|
||||
const bytes = [];
|
||||
uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {
|
||||
bytes.push(parseInt(hex, 16));
|
||||
});
|
||||
return bytes;
|
||||
}
|
||||
|
||||
function stringToBytes(str) {
|
||||
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
||||
|
||||
@ -4146,19 +4238,20 @@ function _default(name, version, hashfunc) {
|
||||
}
|
||||
|
||||
if (typeof namespace === 'string') {
|
||||
namespace = uuidToBytes(namespace);
|
||||
namespace = (0, _parse.default)(namespace);
|
||||
}
|
||||
|
||||
if (!Array.isArray(value)) {
|
||||
throw TypeError('value must be an array of bytes');
|
||||
}
|
||||
|
||||
if (!Array.isArray(namespace) || namespace.length !== 16) {
|
||||
throw TypeError('namespace must be uuid string or an Array of 16 byte values');
|
||||
} // Per 4.3
|
||||
if (namespace.length !== 16) {
|
||||
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
||||
} // Compute hash of namespace and value, Per 4.3
|
||||
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
||||
// hashfunc([...namespace, ... value])`
|
||||
|
||||
|
||||
const bytes = hashfunc(namespace.concat(value));
|
||||
let bytes = new Uint8Array(16 + value.length);
|
||||
bytes.set(namespace);
|
||||
bytes.set(value, namespace.length);
|
||||
bytes = hashfunc(bytes);
|
||||
bytes[6] = bytes[6] & 0x0f | version;
|
||||
bytes[8] = bytes[8] & 0x3f | 0x80;
|
||||
|
||||
@ -4172,7 +4265,7 @@ function _default(name, version, hashfunc) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
return (0, _bytesToUuid.default)(bytes);
|
||||
return (0, _stringify.default)(bytes);
|
||||
} // Function#name is not settable on some platforms (#270)
|
||||
|
||||
|
||||
@ -4464,6 +4557,798 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
|
||||
exports.downloadCacheStorageSDK = downloadCacheStorageSDK;
|
||||
//# sourceMappingURL=downloadUtils.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 257:
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
(function() {
|
||||
var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;
|
||||
|
||||
XMLElement = null;
|
||||
|
||||
XMLCData = null;
|
||||
|
||||
XMLComment = null;
|
||||
|
||||
XMLDeclaration = null;
|
||||
|
||||
XMLDocType = null;
|
||||
|
||||
XMLRaw = null;
|
||||
|
||||
XMLText = null;
|
||||
|
||||
XMLProcessingInstruction = null;
|
||||
|
||||
XMLDummy = null;
|
||||
|
||||
NodeType = null;
|
||||
|
||||
XMLNodeList = null;
|
||||
|
||||
XMLNamedNodeMap = null;
|
||||
|
||||
DocumentPosition = null;
|
||||
|
||||
module.exports = XMLNode = (function() {
|
||||
function XMLNode(parent1) {
|
||||
this.parent = parent1;
|
||||
if (this.parent) {
|
||||
this.options = this.parent.options;
|
||||
this.stringify = this.parent.stringify;
|
||||
}
|
||||
this.value = null;
|
||||
this.children = [];
|
||||
this.baseURI = null;
|
||||
if (!XMLElement) {
|
||||
XMLElement = __webpack_require__(796);
|
||||
XMLCData = __webpack_require__(657);
|
||||
XMLComment = __webpack_require__(919);
|
||||
XMLDeclaration = __webpack_require__(738);
|
||||
XMLDocType = __webpack_require__(735);
|
||||
XMLRaw = __webpack_require__(660);
|
||||
XMLText = __webpack_require__(708);
|
||||
XMLProcessingInstruction = __webpack_require__(491);
|
||||
XMLDummy = __webpack_require__(956);
|
||||
NodeType = __webpack_require__(683);
|
||||
XMLNodeList = __webpack_require__(265);
|
||||
XMLNamedNodeMap = __webpack_require__(451);
|
||||
DocumentPosition = __webpack_require__(65);
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeName', {
|
||||
get: function() {
|
||||
return this.name;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeType', {
|
||||
get: function() {
|
||||
return this.type;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeValue', {
|
||||
get: function() {
|
||||
return this.value;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'parentNode', {
|
||||
get: function() {
|
||||
return this.parent;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'childNodes', {
|
||||
get: function() {
|
||||
if (!this.childNodeList || !this.childNodeList.nodes) {
|
||||
this.childNodeList = new XMLNodeList(this.children);
|
||||
}
|
||||
return this.childNodeList;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'firstChild', {
|
||||
get: function() {
|
||||
return this.children[0] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'lastChild', {
|
||||
get: function() {
|
||||
return this.children[this.children.length - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'previousSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nextSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i + 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
|
||||
get: function() {
|
||||
return this.document() || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'textContent', {
|
||||
get: function() {
|
||||
var child, j, len, ref2, str;
|
||||
if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
|
||||
str = '';
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (child.textContent) {
|
||||
str += child.textContent;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
set: function(value) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
}
|
||||
});
|
||||
|
||||
XMLNode.prototype.setParent = function(parent) {
|
||||
var child, j, len, ref2, results;
|
||||
this.parent = parent;
|
||||
if (parent) {
|
||||
this.options = parent.options;
|
||||
this.stringify = parent.stringify;
|
||||
}
|
||||
ref2 = this.children;
|
||||
results = [];
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
results.push(child.setParent(this));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
XMLNode.prototype.element = function(name, attributes, text) {
|
||||
var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;
|
||||
lastChild = null;
|
||||
if (attributes === null && (text == null)) {
|
||||
ref2 = [{}, null], attributes = ref2[0], text = ref2[1];
|
||||
}
|
||||
if (attributes == null) {
|
||||
attributes = {};
|
||||
}
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];
|
||||
}
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
if (Array.isArray(name)) {
|
||||
for (j = 0, len = name.length; j < len; j++) {
|
||||
item = name[j];
|
||||
lastChild = this.element(item);
|
||||
}
|
||||
} else if (isFunction(name)) {
|
||||
lastChild = this.element(name.apply());
|
||||
} else if (isObject(name)) {
|
||||
for (key in name) {
|
||||
if (!hasProp.call(name, key)) continue;
|
||||
val = name[key];
|
||||
if (isFunction(val)) {
|
||||
val = val.apply();
|
||||
}
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
|
||||
lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (isObject(val) && isEmpty(val)) {
|
||||
lastChild = this.element(key);
|
||||
} else if (!this.options.keepNullNodes && (val == null)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val)) {
|
||||
for (k = 0, len1 = val.length; k < len1; k++) {
|
||||
item = val[k];
|
||||
childNode = {};
|
||||
childNode[key] = item;
|
||||
lastChild = this.element(childNode);
|
||||
}
|
||||
} else if (isObject(val)) {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.element(val);
|
||||
} else {
|
||||
lastChild = this.element(key);
|
||||
lastChild.element(val);
|
||||
}
|
||||
} else {
|
||||
lastChild = this.element(key, val);
|
||||
}
|
||||
}
|
||||
} else if (!this.options.keepNullNodes && text === null) {
|
||||
lastChild = this.dummy();
|
||||
} else {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.text(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
|
||||
lastChild = this.cdata(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
|
||||
lastChild = this.comment(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
|
||||
lastChild = this.raw(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
|
||||
lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
|
||||
} else {
|
||||
lastChild = this.node(name, attributes, text);
|
||||
}
|
||||
}
|
||||
if (lastChild == null) {
|
||||
throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
|
||||
}
|
||||
return lastChild;
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertBefore = function(name, attributes, text) {
|
||||
var child, i, newChild, refChild, removed;
|
||||
if (name != null ? name.type : void 0) {
|
||||
newChild = name;
|
||||
refChild = attributes;
|
||||
newChild.setParent(this);
|
||||
if (refChild) {
|
||||
i = children.indexOf(refChild);
|
||||
removed = children.splice(i);
|
||||
children.push(newChild);
|
||||
Array.prototype.push.apply(children, removed);
|
||||
} else {
|
||||
children.push(newChild);
|
||||
}
|
||||
return newChild;
|
||||
} else {
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertAfter = function(name, attributes, text) {
|
||||
var child, i, removed;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.remove = function() {
|
||||
var i, ref2;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
[].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.node = function(name, attributes, text) {
|
||||
var child, ref2;
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
attributes || (attributes = {});
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];
|
||||
}
|
||||
child = new XMLElement(this, name, attributes);
|
||||
if (text != null) {
|
||||
child.text(text);
|
||||
}
|
||||
this.children.push(child);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.text = function(value) {
|
||||
var child;
|
||||
if (isObject(value)) {
|
||||
this.element(value);
|
||||
}
|
||||
child = new XMLText(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cdata = function(value) {
|
||||
var child;
|
||||
child = new XMLCData(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.comment = function(value) {
|
||||
var child;
|
||||
child = new XMLComment(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentBefore = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentAfter = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.raw = function(value) {
|
||||
var child;
|
||||
child = new XMLRaw(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dummy = function() {
|
||||
var child;
|
||||
child = new XMLDummy(this);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instruction = function(target, value) {
|
||||
var insTarget, insValue, instruction, j, len;
|
||||
if (target != null) {
|
||||
target = getValue(target);
|
||||
}
|
||||
if (value != null) {
|
||||
value = getValue(value);
|
||||
}
|
||||
if (Array.isArray(target)) {
|
||||
for (j = 0, len = target.length; j < len; j++) {
|
||||
insTarget = target[j];
|
||||
this.instruction(insTarget);
|
||||
}
|
||||
} else if (isObject(target)) {
|
||||
for (insTarget in target) {
|
||||
if (!hasProp.call(target, insTarget)) continue;
|
||||
insValue = target[insTarget];
|
||||
this.instruction(insTarget, insValue);
|
||||
}
|
||||
} else {
|
||||
if (isFunction(value)) {
|
||||
value = value.apply();
|
||||
}
|
||||
instruction = new XMLProcessingInstruction(this, target, value);
|
||||
this.children.push(instruction);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionBefore = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionAfter = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.declaration = function(version, encoding, standalone) {
|
||||
var doc, xmldec;
|
||||
doc = this.document();
|
||||
xmldec = new XMLDeclaration(doc, version, encoding, standalone);
|
||||
if (doc.children.length === 0) {
|
||||
doc.children.unshift(xmldec);
|
||||
} else if (doc.children[0].type === NodeType.Declaration) {
|
||||
doc.children[0] = xmldec;
|
||||
} else {
|
||||
doc.children.unshift(xmldec);
|
||||
}
|
||||
return doc.root() || doc;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dtd = function(pubID, sysID) {
|
||||
var child, doc, doctype, i, j, k, len, len1, ref2, ref3;
|
||||
doc = this.document();
|
||||
doctype = new XMLDocType(doc, pubID, sysID);
|
||||
ref2 = doc.children;
|
||||
for (i = j = 0, len = ref2.length; j < len; i = ++j) {
|
||||
child = ref2[i];
|
||||
if (child.type === NodeType.DocType) {
|
||||
doc.children[i] = doctype;
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
ref3 = doc.children;
|
||||
for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {
|
||||
child = ref3[i];
|
||||
if (child.isRoot) {
|
||||
doc.children.splice(i, 0, doctype);
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
doc.children.push(doctype);
|
||||
return doctype;
|
||||
};
|
||||
|
||||
XMLNode.prototype.up = function() {
|
||||
if (this.isRoot) {
|
||||
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
||||
}
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.root = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node.rootObject;
|
||||
} else if (node.isRoot) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.document = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.end = function(options) {
|
||||
return this.document().end(options);
|
||||
};
|
||||
|
||||
XMLNode.prototype.prev = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i < 1) {
|
||||
throw new Error("Already at the first node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i - 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.next = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i === -1 || i === this.parent.children.length - 1) {
|
||||
throw new Error("Already at the last node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i + 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.importDocument = function(doc) {
|
||||
var clonedRoot;
|
||||
clonedRoot = doc.root().clone();
|
||||
clonedRoot.parent = this;
|
||||
clonedRoot.isRoot = false;
|
||||
this.children.push(clonedRoot);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.debugInfo = function(name) {
|
||||
var ref2, ref3;
|
||||
name = name || this.name;
|
||||
if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {
|
||||
return "";
|
||||
} else if (name == null) {
|
||||
return "parent: <" + this.parent.name + ">";
|
||||
} else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {
|
||||
return "node: <" + name + ">";
|
||||
} else {
|
||||
return "node: <" + name + ">, parent: <" + this.parent.name + ">";
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.ele = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.nod = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.txt = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.dat = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.com = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.ins = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.doc = function() {
|
||||
return this.document();
|
||||
};
|
||||
|
||||
XMLNode.prototype.dec = function(version, encoding, standalone) {
|
||||
return this.declaration(version, encoding, standalone);
|
||||
};
|
||||
|
||||
XMLNode.prototype.e = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.n = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.t = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.d = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.c = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.r = function(value) {
|
||||
return this.raw(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.i = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.u = function() {
|
||||
return this.up();
|
||||
};
|
||||
|
||||
XMLNode.prototype.importXMLBuilder = function(doc) {
|
||||
return this.importDocument(doc);
|
||||
};
|
||||
|
||||
XMLNode.prototype.replaceChild = function(newChild, oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.removeChild = function(oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.appendChild = function(newChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasChildNodes = function() {
|
||||
return this.children.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cloneNode = function(deep) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.normalize = function() {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSupported = function(feature, version) {
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasAttributes = function() {
|
||||
return this.attribs.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.compareDocumentPosition = function(other) {
|
||||
var ref, res;
|
||||
ref = this;
|
||||
if (ref === other) {
|
||||
return 0;
|
||||
} else if (this.document() !== other.document()) {
|
||||
res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
|
||||
if (Math.random() < 0.5) {
|
||||
res |= DocumentPosition.Preceding;
|
||||
} else {
|
||||
res |= DocumentPosition.Following;
|
||||
}
|
||||
return res;
|
||||
} else if (ref.isAncestor(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Preceding;
|
||||
} else if (ref.isDescendant(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Following;
|
||||
} else if (ref.isPreceding(other)) {
|
||||
return DocumentPosition.Preceding;
|
||||
} else {
|
||||
return DocumentPosition.Following;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSameNode = function(other) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupPrefix = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupNamespaceURI = function(prefix) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isEqualNode = function(node) {
|
||||
var i, j, ref2;
|
||||
if (node.nodeType !== this.nodeType) {
|
||||
return false;
|
||||
}
|
||||
if (node.children.length !== this.children.length) {
|
||||
return false;
|
||||
}
|
||||
for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {
|
||||
if (!this.children[i].isEqualNode(node.children[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.getFeature = function(feature, version) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.setUserData = function(key, data, handler) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.getUserData = function(key) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.contains = function(other) {
|
||||
if (!other) {
|
||||
return false;
|
||||
}
|
||||
return other === this || this.isDescendant(other);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDescendant = function(node) {
|
||||
var child, isDescendantChild, j, len, ref2;
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (node === child) {
|
||||
return true;
|
||||
}
|
||||
isDescendantChild = child.isDescendant(node);
|
||||
if (isDescendantChild) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
XMLNode.prototype.isAncestor = function(node) {
|
||||
return node.isDescendant(this);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isPreceding = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos < thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isFollowing = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos > thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.treePosition = function(node) {
|
||||
var found, pos;
|
||||
pos = 0;
|
||||
found = false;
|
||||
this.foreachTreeNode(this.document(), function(childNode) {
|
||||
pos++;
|
||||
if (!found && childNode === node) {
|
||||
return found = true;
|
||||
}
|
||||
});
|
||||
if (found) {
|
||||
return pos;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.foreachTreeNode = function(node, func) {
|
||||
var child, j, len, ref2, res;
|
||||
node || (node = this.document());
|
||||
ref2 = node.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (res = func(child)) {
|
||||
return res;
|
||||
} else {
|
||||
res = this.foreachTreeNode(child, func);
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return XMLNode;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 263:
|
||||
@ -7386,7 +8271,7 @@ var MatchKind;
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const { fromCallback } = __webpack_require__(676);
|
||||
const { fromCallback } = __webpack_require__(147);
|
||||
const Store = __webpack_require__(338).Store;
|
||||
const permuteDomain = __webpack_require__(89).permuteDomain;
|
||||
const pathMatch = __webpack_require__(348).pathMatch;
|
||||
@ -27667,7 +28552,7 @@ const Store = __webpack_require__(338).Store;
|
||||
const MemoryCookieStore = __webpack_require__(332).MemoryCookieStore;
|
||||
const pathMatch = __webpack_require__(348).pathMatch;
|
||||
const VERSION = __webpack_require__(460);
|
||||
const { fromCallback } = __webpack_require__(676);
|
||||
const { fromCallback } = __webpack_require__(147);
|
||||
|
||||
// From RFC6265 S4.1.1
|
||||
// note that it excludes \x3B ";"
|
||||
@ -30048,7 +30933,7 @@ var __createBinding;
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
var iterate = __webpack_require__(157)
|
||||
, initState = __webpack_require__(147)
|
||||
, initState = __webpack_require__(903)
|
||||
, terminator = __webpack_require__(939)
|
||||
;
|
||||
|
||||
@ -30307,6 +31192,7 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
|
||||
}
|
||||
}
|
||||
const args = [
|
||||
'--posix',
|
||||
...getCompressionProgram(),
|
||||
'-cf',
|
||||
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||
@ -32449,7 +33335,7 @@ module.exports = '4.0.0'
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -34018,7 +34904,7 @@ CombinedStream.prototype._emitError = function(err) {
|
||||
|
||||
XMLDOMConfiguration = __webpack_require__(524);
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -34542,6 +35428,36 @@ Object.defineProperty(exports, "v5", {
|
||||
return _v4.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "NIL", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _nil.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "version", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _version.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "validate", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _validate.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "stringify", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _stringify.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "parse", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _parse.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _v = _interopRequireDefault(__webpack_require__(173));
|
||||
|
||||
@ -34551,6 +35467,16 @@ var _v3 = _interopRequireDefault(__webpack_require__(606));
|
||||
|
||||
var _v4 = _interopRequireDefault(__webpack_require__(90));
|
||||
|
||||
var _nil = _interopRequireDefault(__webpack_require__(24));
|
||||
|
||||
var _version = _interopRequireDefault(__webpack_require__(104));
|
||||
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
var _parse = _interopRequireDefault(__webpack_require__(197));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/***/ }),
|
||||
@ -34940,7 +35866,7 @@ exports.default = void 0;
|
||||
|
||||
var _rng = _interopRequireDefault(__webpack_require__(733));
|
||||
|
||||
var _bytesToUuid = _interopRequireDefault(__webpack_require__(940));
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
@ -34963,7 +35889,7 @@ function v4(options, buf, offset) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
return (0, _bytesToUuid.default)(rnds);
|
||||
return (0, _stringify.default)(rnds);
|
||||
}
|
||||
|
||||
var _default = v4;
|
||||
@ -35231,7 +36157,7 @@ module.exports = require("net");
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
module.exports = XMLCharacterData = (function(superClass) {
|
||||
extend(XMLCharacterData, superClass);
|
||||
@ -36934,7 +37860,7 @@ module.exports = require("net");
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
module.exports = XMLRaw = (function(superClass) {
|
||||
extend(XMLRaw, superClass);
|
||||
@ -36976,7 +37902,7 @@ module.exports = require("net");
|
||||
|
||||
isObject = __webpack_require__(582).isObject;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -37335,35 +38261,26 @@ function isUnixExecutable(stats) {
|
||||
/***/ }),
|
||||
|
||||
/***/ 676:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
exports.fromCallback = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
|
||||
else {
|
||||
return new Promise((resolve, reject) => {
|
||||
arguments[arguments.length] = (err, res) => {
|
||||
if (err) return reject(err)
|
||||
resolve(res)
|
||||
}
|
||||
arguments.length++
|
||||
fn.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
exports.fromPromise = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
const cb = arguments[arguments.length - 1]
|
||||
if (typeof cb !== 'function') return fn.apply(this, arguments)
|
||||
else fn.apply(this, arguments).then(r => cb(null, r), cb)
|
||||
}, 'name', { value: fn.name })
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _regex = _interopRequireDefault(__webpack_require__(238));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function validate(uuid) {
|
||||
return typeof uuid === 'string' && _regex.default.test(uuid);
|
||||
}
|
||||
|
||||
var _default = validate;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
@ -37767,7 +38684,7 @@ function rng() {
|
||||
|
||||
isObject = __webpack_require__(582).isObject;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -37960,7 +38877,7 @@ function rng() {
|
||||
|
||||
isObject = __webpack_require__(582).isObject;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -39913,7 +40830,7 @@ module.exports = require("stream");
|
||||
|
||||
ref = __webpack_require__(582), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -40216,7 +41133,7 @@ module.exports = require("stream");
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -40331,794 +41248,48 @@ module.exports = __webpack_require__(512)
|
||||
/***/ }),
|
||||
|
||||
/***/ 855:
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
(function() {
|
||||
var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
"use strict";
|
||||
|
||||
ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;
|
||||
|
||||
XMLElement = null;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
XMLCData = null;
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
XMLComment = null;
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
XMLDeclaration = null;
|
||||
/**
|
||||
* Convert array of 16 byte values to UUID string format of the form:
|
||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
*/
|
||||
const byteToHex = [];
|
||||
|
||||
XMLDocType = null;
|
||||
for (let i = 0; i < 256; ++i) {
|
||||
byteToHex.push((i + 0x100).toString(16).substr(1));
|
||||
}
|
||||
|
||||
XMLRaw = null;
|
||||
function stringify(arr, offset = 0) {
|
||||
// Note: Be careful editing this code! It's been tuned for performance
|
||||
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
||||
const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
||||
// of the following:
|
||||
// - One or more input array values don't map to a hex octet (leading to
|
||||
// "undefined" in the uuid)
|
||||
// - Invalid input values for the RFC `version` or `variant` fields
|
||||
|
||||
XMLText = null;
|
||||
|
||||
XMLProcessingInstruction = null;
|
||||
|
||||
XMLDummy = null;
|
||||
|
||||
NodeType = null;
|
||||
|
||||
XMLNodeList = null;
|
||||
|
||||
XMLNamedNodeMap = null;
|
||||
|
||||
DocumentPosition = null;
|
||||
|
||||
module.exports = XMLNode = (function() {
|
||||
function XMLNode(parent1) {
|
||||
this.parent = parent1;
|
||||
if (this.parent) {
|
||||
this.options = this.parent.options;
|
||||
this.stringify = this.parent.stringify;
|
||||
}
|
||||
this.value = null;
|
||||
this.children = [];
|
||||
this.baseURI = null;
|
||||
if (!XMLElement) {
|
||||
XMLElement = __webpack_require__(796);
|
||||
XMLCData = __webpack_require__(657);
|
||||
XMLComment = __webpack_require__(919);
|
||||
XMLDeclaration = __webpack_require__(738);
|
||||
XMLDocType = __webpack_require__(735);
|
||||
XMLRaw = __webpack_require__(660);
|
||||
XMLText = __webpack_require__(708);
|
||||
XMLProcessingInstruction = __webpack_require__(491);
|
||||
XMLDummy = __webpack_require__(956);
|
||||
NodeType = __webpack_require__(683);
|
||||
XMLNodeList = __webpack_require__(265);
|
||||
XMLNamedNodeMap = __webpack_require__(451);
|
||||
DocumentPosition = __webpack_require__(65);
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeName', {
|
||||
get: function() {
|
||||
return this.name;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeType', {
|
||||
get: function() {
|
||||
return this.type;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeValue', {
|
||||
get: function() {
|
||||
return this.value;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'parentNode', {
|
||||
get: function() {
|
||||
return this.parent;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'childNodes', {
|
||||
get: function() {
|
||||
if (!this.childNodeList || !this.childNodeList.nodes) {
|
||||
this.childNodeList = new XMLNodeList(this.children);
|
||||
}
|
||||
return this.childNodeList;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'firstChild', {
|
||||
get: function() {
|
||||
return this.children[0] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'lastChild', {
|
||||
get: function() {
|
||||
return this.children[this.children.length - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'previousSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nextSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i + 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
|
||||
get: function() {
|
||||
return this.document() || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'textContent', {
|
||||
get: function() {
|
||||
var child, j, len, ref2, str;
|
||||
if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
|
||||
str = '';
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (child.textContent) {
|
||||
str += child.textContent;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
set: function(value) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
}
|
||||
});
|
||||
|
||||
XMLNode.prototype.setParent = function(parent) {
|
||||
var child, j, len, ref2, results;
|
||||
this.parent = parent;
|
||||
if (parent) {
|
||||
this.options = parent.options;
|
||||
this.stringify = parent.stringify;
|
||||
}
|
||||
ref2 = this.children;
|
||||
results = [];
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
results.push(child.setParent(this));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
XMLNode.prototype.element = function(name, attributes, text) {
|
||||
var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;
|
||||
lastChild = null;
|
||||
if (attributes === null && (text == null)) {
|
||||
ref2 = [{}, null], attributes = ref2[0], text = ref2[1];
|
||||
}
|
||||
if (attributes == null) {
|
||||
attributes = {};
|
||||
}
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];
|
||||
}
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
if (Array.isArray(name)) {
|
||||
for (j = 0, len = name.length; j < len; j++) {
|
||||
item = name[j];
|
||||
lastChild = this.element(item);
|
||||
}
|
||||
} else if (isFunction(name)) {
|
||||
lastChild = this.element(name.apply());
|
||||
} else if (isObject(name)) {
|
||||
for (key in name) {
|
||||
if (!hasProp.call(name, key)) continue;
|
||||
val = name[key];
|
||||
if (isFunction(val)) {
|
||||
val = val.apply();
|
||||
}
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
|
||||
lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (isObject(val) && isEmpty(val)) {
|
||||
lastChild = this.element(key);
|
||||
} else if (!this.options.keepNullNodes && (val == null)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val)) {
|
||||
for (k = 0, len1 = val.length; k < len1; k++) {
|
||||
item = val[k];
|
||||
childNode = {};
|
||||
childNode[key] = item;
|
||||
lastChild = this.element(childNode);
|
||||
}
|
||||
} else if (isObject(val)) {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.element(val);
|
||||
} else {
|
||||
lastChild = this.element(key);
|
||||
lastChild.element(val);
|
||||
}
|
||||
} else {
|
||||
lastChild = this.element(key, val);
|
||||
}
|
||||
}
|
||||
} else if (!this.options.keepNullNodes && text === null) {
|
||||
lastChild = this.dummy();
|
||||
} else {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.text(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
|
||||
lastChild = this.cdata(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
|
||||
lastChild = this.comment(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
|
||||
lastChild = this.raw(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
|
||||
lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
|
||||
} else {
|
||||
lastChild = this.node(name, attributes, text);
|
||||
}
|
||||
}
|
||||
if (lastChild == null) {
|
||||
throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
|
||||
}
|
||||
return lastChild;
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertBefore = function(name, attributes, text) {
|
||||
var child, i, newChild, refChild, removed;
|
||||
if (name != null ? name.type : void 0) {
|
||||
newChild = name;
|
||||
refChild = attributes;
|
||||
newChild.setParent(this);
|
||||
if (refChild) {
|
||||
i = children.indexOf(refChild);
|
||||
removed = children.splice(i);
|
||||
children.push(newChild);
|
||||
Array.prototype.push.apply(children, removed);
|
||||
} else {
|
||||
children.push(newChild);
|
||||
}
|
||||
return newChild;
|
||||
} else {
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertAfter = function(name, attributes, text) {
|
||||
var child, i, removed;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.remove = function() {
|
||||
var i, ref2;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
[].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.node = function(name, attributes, text) {
|
||||
var child, ref2;
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
attributes || (attributes = {});
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];
|
||||
}
|
||||
child = new XMLElement(this, name, attributes);
|
||||
if (text != null) {
|
||||
child.text(text);
|
||||
}
|
||||
this.children.push(child);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.text = function(value) {
|
||||
var child;
|
||||
if (isObject(value)) {
|
||||
this.element(value);
|
||||
}
|
||||
child = new XMLText(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cdata = function(value) {
|
||||
var child;
|
||||
child = new XMLCData(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.comment = function(value) {
|
||||
var child;
|
||||
child = new XMLComment(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentBefore = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentAfter = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.raw = function(value) {
|
||||
var child;
|
||||
child = new XMLRaw(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dummy = function() {
|
||||
var child;
|
||||
child = new XMLDummy(this);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instruction = function(target, value) {
|
||||
var insTarget, insValue, instruction, j, len;
|
||||
if (target != null) {
|
||||
target = getValue(target);
|
||||
}
|
||||
if (value != null) {
|
||||
value = getValue(value);
|
||||
}
|
||||
if (Array.isArray(target)) {
|
||||
for (j = 0, len = target.length; j < len; j++) {
|
||||
insTarget = target[j];
|
||||
this.instruction(insTarget);
|
||||
}
|
||||
} else if (isObject(target)) {
|
||||
for (insTarget in target) {
|
||||
if (!hasProp.call(target, insTarget)) continue;
|
||||
insValue = target[insTarget];
|
||||
this.instruction(insTarget, insValue);
|
||||
}
|
||||
} else {
|
||||
if (isFunction(value)) {
|
||||
value = value.apply();
|
||||
}
|
||||
instruction = new XMLProcessingInstruction(this, target, value);
|
||||
this.children.push(instruction);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionBefore = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionAfter = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.declaration = function(version, encoding, standalone) {
|
||||
var doc, xmldec;
|
||||
doc = this.document();
|
||||
xmldec = new XMLDeclaration(doc, version, encoding, standalone);
|
||||
if (doc.children.length === 0) {
|
||||
doc.children.unshift(xmldec);
|
||||
} else if (doc.children[0].type === NodeType.Declaration) {
|
||||
doc.children[0] = xmldec;
|
||||
} else {
|
||||
doc.children.unshift(xmldec);
|
||||
}
|
||||
return doc.root() || doc;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dtd = function(pubID, sysID) {
|
||||
var child, doc, doctype, i, j, k, len, len1, ref2, ref3;
|
||||
doc = this.document();
|
||||
doctype = new XMLDocType(doc, pubID, sysID);
|
||||
ref2 = doc.children;
|
||||
for (i = j = 0, len = ref2.length; j < len; i = ++j) {
|
||||
child = ref2[i];
|
||||
if (child.type === NodeType.DocType) {
|
||||
doc.children[i] = doctype;
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
ref3 = doc.children;
|
||||
for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {
|
||||
child = ref3[i];
|
||||
if (child.isRoot) {
|
||||
doc.children.splice(i, 0, doctype);
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
doc.children.push(doctype);
|
||||
return doctype;
|
||||
};
|
||||
|
||||
XMLNode.prototype.up = function() {
|
||||
if (this.isRoot) {
|
||||
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
||||
}
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.root = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node.rootObject;
|
||||
} else if (node.isRoot) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.document = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.end = function(options) {
|
||||
return this.document().end(options);
|
||||
};
|
||||
|
||||
XMLNode.prototype.prev = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i < 1) {
|
||||
throw new Error("Already at the first node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i - 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.next = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i === -1 || i === this.parent.children.length - 1) {
|
||||
throw new Error("Already at the last node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i + 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.importDocument = function(doc) {
|
||||
var clonedRoot;
|
||||
clonedRoot = doc.root().clone();
|
||||
clonedRoot.parent = this;
|
||||
clonedRoot.isRoot = false;
|
||||
this.children.push(clonedRoot);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.debugInfo = function(name) {
|
||||
var ref2, ref3;
|
||||
name = name || this.name;
|
||||
if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {
|
||||
return "";
|
||||
} else if (name == null) {
|
||||
return "parent: <" + this.parent.name + ">";
|
||||
} else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {
|
||||
return "node: <" + name + ">";
|
||||
} else {
|
||||
return "node: <" + name + ">, parent: <" + this.parent.name + ">";
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.ele = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.nod = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.txt = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.dat = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.com = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.ins = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.doc = function() {
|
||||
return this.document();
|
||||
};
|
||||
|
||||
XMLNode.prototype.dec = function(version, encoding, standalone) {
|
||||
return this.declaration(version, encoding, standalone);
|
||||
};
|
||||
|
||||
XMLNode.prototype.e = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.n = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.t = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.d = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.c = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.r = function(value) {
|
||||
return this.raw(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.i = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.u = function() {
|
||||
return this.up();
|
||||
};
|
||||
|
||||
XMLNode.prototype.importXMLBuilder = function(doc) {
|
||||
return this.importDocument(doc);
|
||||
};
|
||||
|
||||
XMLNode.prototype.replaceChild = function(newChild, oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.removeChild = function(oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.appendChild = function(newChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasChildNodes = function() {
|
||||
return this.children.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cloneNode = function(deep) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.normalize = function() {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSupported = function(feature, version) {
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasAttributes = function() {
|
||||
return this.attribs.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.compareDocumentPosition = function(other) {
|
||||
var ref, res;
|
||||
ref = this;
|
||||
if (ref === other) {
|
||||
return 0;
|
||||
} else if (this.document() !== other.document()) {
|
||||
res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
|
||||
if (Math.random() < 0.5) {
|
||||
res |= DocumentPosition.Preceding;
|
||||
} else {
|
||||
res |= DocumentPosition.Following;
|
||||
}
|
||||
return res;
|
||||
} else if (ref.isAncestor(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Preceding;
|
||||
} else if (ref.isDescendant(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Following;
|
||||
} else if (ref.isPreceding(other)) {
|
||||
return DocumentPosition.Preceding;
|
||||
} else {
|
||||
return DocumentPosition.Following;
|
||||
if (!(0, _validate.default)(uuid)) {
|
||||
throw TypeError('Stringified UUID is invalid');
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSameNode = function(other) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupPrefix = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupNamespaceURI = function(prefix) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isEqualNode = function(node) {
|
||||
var i, j, ref2;
|
||||
if (node.nodeType !== this.nodeType) {
|
||||
return false;
|
||||
}
|
||||
if (node.children.length !== this.children.length) {
|
||||
return false;
|
||||
}
|
||||
for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {
|
||||
if (!this.children[i].isEqualNode(node.children[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.getFeature = function(feature, version) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.setUserData = function(key, data, handler) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.getUserData = function(key) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.contains = function(other) {
|
||||
if (!other) {
|
||||
return false;
|
||||
}
|
||||
return other === this || this.isDescendant(other);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDescendant = function(node) {
|
||||
var child, isDescendantChild, j, len, ref2;
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (node === child) {
|
||||
return true;
|
||||
}
|
||||
isDescendantChild = child.isDescendant(node);
|
||||
if (isDescendantChild) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
XMLNode.prototype.isAncestor = function(node) {
|
||||
return node.isDescendant(this);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isPreceding = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos < thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isFollowing = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos > thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.treePosition = function(node) {
|
||||
var found, pos;
|
||||
pos = 0;
|
||||
found = false;
|
||||
this.foreachTreeNode(this.document(), function(childNode) {
|
||||
pos++;
|
||||
if (!found && childNode === node) {
|
||||
return found = true;
|
||||
}
|
||||
});
|
||||
if (found) {
|
||||
return pos;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.foreachTreeNode = function(node, func) {
|
||||
var child, j, len, ref2, res;
|
||||
node || (node = this.document());
|
||||
ref2 = node.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (res = func(child)) {
|
||||
return res;
|
||||
} else {
|
||||
res = this.foreachTreeNode(child, func);
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return XMLNode;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
return uuid;
|
||||
}
|
||||
|
||||
var _default = stringify;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
@ -41492,7 +41663,7 @@ exports.TraceAPI = TraceAPI;
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
module.exports = XMLAttribute = (function() {
|
||||
function XMLAttribute(parent, name, value) {
|
||||
@ -42464,7 +42635,7 @@ exports.PollerStoppedError = PollerStoppedError;
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
var iterate = __webpack_require__(157)
|
||||
, initState = __webpack_require__(147)
|
||||
, initState = __webpack_require__(903)
|
||||
, terminator = __webpack_require__(939)
|
||||
;
|
||||
|
||||
@ -42673,6 +42844,50 @@ function retryHttpClientResponse(name, method, maxAttempts = 2) {
|
||||
exports.retryHttpClientResponse = retryHttpClientResponse;
|
||||
//# sourceMappingURL=requestUtils.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 903:
|
||||
/***/ (function(module) {
|
||||
|
||||
// API
|
||||
module.exports = state;
|
||||
|
||||
/**
|
||||
* Creates initial state object
|
||||
* for iteration over list
|
||||
*
|
||||
* @param {array|object} list - list to iterate over
|
||||
* @param {function|null} sortMethod - function to use for keys sort,
|
||||
* or `null` to keep them as is
|
||||
* @returns {object} - initial state object
|
||||
*/
|
||||
function state(list, sortMethod)
|
||||
{
|
||||
var isNamedList = !Array.isArray(list)
|
||||
, initState =
|
||||
{
|
||||
index : 0,
|
||||
keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
|
||||
jobs : {},
|
||||
results : isNamedList ? {} : [],
|
||||
size : isNamedList ? Object.keys(list).length : list.length
|
||||
}
|
||||
;
|
||||
|
||||
if (sortMethod)
|
||||
{
|
||||
// sort array keys based on it's values
|
||||
// sort object's keys just on own merit
|
||||
initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
|
||||
{
|
||||
return sortMethod(list[a], list[b]);
|
||||
});
|
||||
}
|
||||
|
||||
return initState;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 919:
|
||||
@ -43467,39 +43682,6 @@ function terminator(callback)
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 940:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
/**
|
||||
* Convert array of 16 byte values to UUID string format of the form:
|
||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
*/
|
||||
const byteToHex = [];
|
||||
|
||||
for (let i = 0; i < 256; ++i) {
|
||||
byteToHex.push((i + 0x100).toString(16).substr(1));
|
||||
}
|
||||
|
||||
function bytesToUuid(buf, offset_) {
|
||||
const offset = offset_ || 0; // Note: Be careful editing this code! It's been tuned for performance
|
||||
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
||||
|
||||
return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase();
|
||||
}
|
||||
|
||||
var _default = bytesToUuid;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 950:
|
||||
@ -43577,7 +43759,7 @@ exports.checkBypass = checkBypass;
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -43937,7 +44119,7 @@ var tslib = __webpack_require__(865);
|
||||
var tough = __webpack_require__(393);
|
||||
var http = __webpack_require__(605);
|
||||
var https = __webpack_require__(211);
|
||||
__webpack_require__(454);
|
||||
var node_fetch = _interopDefault(__webpack_require__(454));
|
||||
var abortController = __webpack_require__(106);
|
||||
var FormData = _interopDefault(__webpack_require__(790));
|
||||
var util = __webpack_require__(669);
|
||||
@ -44124,7 +44306,7 @@ var Constants = {
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
coreHttpVersion: "1.1.4",
|
||||
coreHttpVersion: "1.1.5",
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
*
|
||||
@ -46431,11 +46613,6 @@ function isValidPort(port) {
|
||||
}
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
var globalWithFetch = global;
|
||||
if (typeof globalWithFetch.fetch !== "function") {
|
||||
var fetch_1 = __webpack_require__(454).default;
|
||||
globalWithFetch.fetch = fetch_1;
|
||||
}
|
||||
function getCachedAgent(isHttps, agentCache) {
|
||||
return isHttps ? agentCache.httpsAgent : agentCache.httpAgent;
|
||||
}
|
||||
@ -46492,7 +46669,7 @@ var NodeFetchHttpClient = /** @class */ (function (_super) {
|
||||
NodeFetchHttpClient.prototype.fetch = function (input, init) {
|
||||
return tslib.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib.__generator(this, function (_a) {
|
||||
return [2 /*return*/, fetch(input, init)];
|
||||
return [2 /*return*/, node_fetch(input, init)];
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
2003
dist/save/index.js
vendored
2003
dist/save/index.js
vendored
@ -1182,7 +1182,7 @@ eval("require")("encoding");
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -1306,6 +1306,21 @@ exports.PropagationAPI = PropagationAPI;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 24:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _default = '00000000-0000-0000-0000-000000000000';
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 40:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
@ -2635,6 +2650,34 @@ function regExpEscape (s) {
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 104:
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function version(uuid) {
|
||||
if (!(0, _validate.default)(uuid)) {
|
||||
throw TypeError('Invalid UUID');
|
||||
}
|
||||
|
||||
return parseInt(uuid.substr(14, 1), 16);
|
||||
}
|
||||
|
||||
var _default = version;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 106:
|
||||
@ -3486,44 +3529,33 @@ exports.debug = debug; // for test
|
||||
/***/ }),
|
||||
|
||||
/***/ 147:
|
||||
/***/ (function(module) {
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
// API
|
||||
module.exports = state;
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Creates initial state object
|
||||
* for iteration over list
|
||||
*
|
||||
* @param {array|object} list - list to iterate over
|
||||
* @param {function|null} sortMethod - function to use for keys sort,
|
||||
* or `null` to keep them as is
|
||||
* @returns {object} - initial state object
|
||||
*/
|
||||
function state(list, sortMethod)
|
||||
{
|
||||
var isNamedList = !Array.isArray(list)
|
||||
, initState =
|
||||
{
|
||||
index : 0,
|
||||
keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
|
||||
jobs : {},
|
||||
results : isNamedList ? {} : [],
|
||||
size : isNamedList ? Object.keys(list).length : list.length
|
||||
|
||||
exports.fromCallback = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
|
||||
else {
|
||||
return new Promise((resolve, reject) => {
|
||||
arguments[arguments.length] = (err, res) => {
|
||||
if (err) return reject(err)
|
||||
resolve(res)
|
||||
}
|
||||
;
|
||||
|
||||
if (sortMethod)
|
||||
{
|
||||
// sort array keys based on it's values
|
||||
// sort object's keys just on own merit
|
||||
initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
|
||||
{
|
||||
return sortMethod(list[a], list[b]);
|
||||
});
|
||||
arguments.length++
|
||||
fn.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
return initState;
|
||||
exports.fromPromise = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
const cb = arguments[arguments.length - 1]
|
||||
if (typeof cb !== 'function') return fn.apply(this, arguments)
|
||||
else fn.apply(this, arguments).then(r => cb(null, r), cb)
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
|
||||
@ -3821,7 +3853,7 @@ exports.default = void 0;
|
||||
|
||||
var _rng = _interopRequireDefault(__webpack_require__(733));
|
||||
|
||||
var _bytesToUuid = _interopRequireDefault(__webpack_require__(940));
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
@ -3914,7 +3946,7 @@ function v1(options, buf, offset) {
|
||||
b[i + n] = node[n];
|
||||
}
|
||||
|
||||
return buf || (0, _bytesToUuid.default)(b);
|
||||
return buf || (0, _stringify.default)(b);
|
||||
}
|
||||
|
||||
var _default = v1;
|
||||
@ -3922,6 +3954,58 @@ exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 197:
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function parse(uuid) {
|
||||
if (!(0, _validate.default)(uuid)) {
|
||||
throw TypeError('Invalid UUID');
|
||||
}
|
||||
|
||||
let v;
|
||||
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
||||
|
||||
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
||||
arr[1] = v >>> 16 & 0xff;
|
||||
arr[2] = v >>> 8 & 0xff;
|
||||
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
||||
|
||||
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
||||
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
||||
|
||||
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
||||
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
||||
|
||||
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
||||
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
||||
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
||||
|
||||
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
||||
arr[11] = v / 0x100000000 & 0xff;
|
||||
arr[12] = v >>> 24 & 0xff;
|
||||
arr[13] = v >>> 16 & 0xff;
|
||||
arr[14] = v >>> 8 & 0xff;
|
||||
arr[15] = v & 0xff;
|
||||
return arr;
|
||||
}
|
||||
|
||||
var _default = parse;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 210:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
@ -4095,6 +4179,21 @@ exports.isTokenCredential = isTokenCredential;
|
||||
//# sourceMappingURL=index.js.map
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 238:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 241:
|
||||
@ -4109,19 +4208,12 @@ Object.defineProperty(exports, "__esModule", {
|
||||
exports.default = _default;
|
||||
exports.URL = exports.DNS = void 0;
|
||||
|
||||
var _bytesToUuid = _interopRequireDefault(__webpack_require__(940));
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
var _parse = _interopRequireDefault(__webpack_require__(197));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function uuidToBytes(uuid) {
|
||||
// Note: We assume we're being passed a valid uuid string
|
||||
const bytes = [];
|
||||
uuid.replace(/[a-fA-F0-9]{2}/g, function (hex) {
|
||||
bytes.push(parseInt(hex, 16));
|
||||
});
|
||||
return bytes;
|
||||
}
|
||||
|
||||
function stringToBytes(str) {
|
||||
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
||||
|
||||
@ -4146,19 +4238,20 @@ function _default(name, version, hashfunc) {
|
||||
}
|
||||
|
||||
if (typeof namespace === 'string') {
|
||||
namespace = uuidToBytes(namespace);
|
||||
namespace = (0, _parse.default)(namespace);
|
||||
}
|
||||
|
||||
if (!Array.isArray(value)) {
|
||||
throw TypeError('value must be an array of bytes');
|
||||
}
|
||||
|
||||
if (!Array.isArray(namespace) || namespace.length !== 16) {
|
||||
throw TypeError('namespace must be uuid string or an Array of 16 byte values');
|
||||
} // Per 4.3
|
||||
if (namespace.length !== 16) {
|
||||
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
||||
} // Compute hash of namespace and value, Per 4.3
|
||||
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
||||
// hashfunc([...namespace, ... value])`
|
||||
|
||||
|
||||
const bytes = hashfunc(namespace.concat(value));
|
||||
let bytes = new Uint8Array(16 + value.length);
|
||||
bytes.set(namespace);
|
||||
bytes.set(value, namespace.length);
|
||||
bytes = hashfunc(bytes);
|
||||
bytes[6] = bytes[6] & 0x0f | version;
|
||||
bytes[8] = bytes[8] & 0x3f | 0x80;
|
||||
|
||||
@ -4172,7 +4265,7 @@ function _default(name, version, hashfunc) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
return (0, _bytesToUuid.default)(bytes);
|
||||
return (0, _stringify.default)(bytes);
|
||||
} // Function#name is not settable on some platforms (#270)
|
||||
|
||||
|
||||
@ -4464,6 +4557,798 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
|
||||
exports.downloadCacheStorageSDK = downloadCacheStorageSDK;
|
||||
//# sourceMappingURL=downloadUtils.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 257:
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
(function() {
|
||||
var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;
|
||||
|
||||
XMLElement = null;
|
||||
|
||||
XMLCData = null;
|
||||
|
||||
XMLComment = null;
|
||||
|
||||
XMLDeclaration = null;
|
||||
|
||||
XMLDocType = null;
|
||||
|
||||
XMLRaw = null;
|
||||
|
||||
XMLText = null;
|
||||
|
||||
XMLProcessingInstruction = null;
|
||||
|
||||
XMLDummy = null;
|
||||
|
||||
NodeType = null;
|
||||
|
||||
XMLNodeList = null;
|
||||
|
||||
XMLNamedNodeMap = null;
|
||||
|
||||
DocumentPosition = null;
|
||||
|
||||
module.exports = XMLNode = (function() {
|
||||
function XMLNode(parent1) {
|
||||
this.parent = parent1;
|
||||
if (this.parent) {
|
||||
this.options = this.parent.options;
|
||||
this.stringify = this.parent.stringify;
|
||||
}
|
||||
this.value = null;
|
||||
this.children = [];
|
||||
this.baseURI = null;
|
||||
if (!XMLElement) {
|
||||
XMLElement = __webpack_require__(796);
|
||||
XMLCData = __webpack_require__(657);
|
||||
XMLComment = __webpack_require__(919);
|
||||
XMLDeclaration = __webpack_require__(738);
|
||||
XMLDocType = __webpack_require__(735);
|
||||
XMLRaw = __webpack_require__(660);
|
||||
XMLText = __webpack_require__(708);
|
||||
XMLProcessingInstruction = __webpack_require__(491);
|
||||
XMLDummy = __webpack_require__(956);
|
||||
NodeType = __webpack_require__(683);
|
||||
XMLNodeList = __webpack_require__(265);
|
||||
XMLNamedNodeMap = __webpack_require__(451);
|
||||
DocumentPosition = __webpack_require__(65);
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeName', {
|
||||
get: function() {
|
||||
return this.name;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeType', {
|
||||
get: function() {
|
||||
return this.type;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeValue', {
|
||||
get: function() {
|
||||
return this.value;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'parentNode', {
|
||||
get: function() {
|
||||
return this.parent;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'childNodes', {
|
||||
get: function() {
|
||||
if (!this.childNodeList || !this.childNodeList.nodes) {
|
||||
this.childNodeList = new XMLNodeList(this.children);
|
||||
}
|
||||
return this.childNodeList;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'firstChild', {
|
||||
get: function() {
|
||||
return this.children[0] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'lastChild', {
|
||||
get: function() {
|
||||
return this.children[this.children.length - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'previousSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nextSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i + 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
|
||||
get: function() {
|
||||
return this.document() || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'textContent', {
|
||||
get: function() {
|
||||
var child, j, len, ref2, str;
|
||||
if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
|
||||
str = '';
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (child.textContent) {
|
||||
str += child.textContent;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
set: function(value) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
}
|
||||
});
|
||||
|
||||
XMLNode.prototype.setParent = function(parent) {
|
||||
var child, j, len, ref2, results;
|
||||
this.parent = parent;
|
||||
if (parent) {
|
||||
this.options = parent.options;
|
||||
this.stringify = parent.stringify;
|
||||
}
|
||||
ref2 = this.children;
|
||||
results = [];
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
results.push(child.setParent(this));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
XMLNode.prototype.element = function(name, attributes, text) {
|
||||
var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;
|
||||
lastChild = null;
|
||||
if (attributes === null && (text == null)) {
|
||||
ref2 = [{}, null], attributes = ref2[0], text = ref2[1];
|
||||
}
|
||||
if (attributes == null) {
|
||||
attributes = {};
|
||||
}
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];
|
||||
}
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
if (Array.isArray(name)) {
|
||||
for (j = 0, len = name.length; j < len; j++) {
|
||||
item = name[j];
|
||||
lastChild = this.element(item);
|
||||
}
|
||||
} else if (isFunction(name)) {
|
||||
lastChild = this.element(name.apply());
|
||||
} else if (isObject(name)) {
|
||||
for (key in name) {
|
||||
if (!hasProp.call(name, key)) continue;
|
||||
val = name[key];
|
||||
if (isFunction(val)) {
|
||||
val = val.apply();
|
||||
}
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
|
||||
lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (isObject(val) && isEmpty(val)) {
|
||||
lastChild = this.element(key);
|
||||
} else if (!this.options.keepNullNodes && (val == null)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val)) {
|
||||
for (k = 0, len1 = val.length; k < len1; k++) {
|
||||
item = val[k];
|
||||
childNode = {};
|
||||
childNode[key] = item;
|
||||
lastChild = this.element(childNode);
|
||||
}
|
||||
} else if (isObject(val)) {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.element(val);
|
||||
} else {
|
||||
lastChild = this.element(key);
|
||||
lastChild.element(val);
|
||||
}
|
||||
} else {
|
||||
lastChild = this.element(key, val);
|
||||
}
|
||||
}
|
||||
} else if (!this.options.keepNullNodes && text === null) {
|
||||
lastChild = this.dummy();
|
||||
} else {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.text(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
|
||||
lastChild = this.cdata(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
|
||||
lastChild = this.comment(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
|
||||
lastChild = this.raw(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
|
||||
lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
|
||||
} else {
|
||||
lastChild = this.node(name, attributes, text);
|
||||
}
|
||||
}
|
||||
if (lastChild == null) {
|
||||
throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
|
||||
}
|
||||
return lastChild;
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertBefore = function(name, attributes, text) {
|
||||
var child, i, newChild, refChild, removed;
|
||||
if (name != null ? name.type : void 0) {
|
||||
newChild = name;
|
||||
refChild = attributes;
|
||||
newChild.setParent(this);
|
||||
if (refChild) {
|
||||
i = children.indexOf(refChild);
|
||||
removed = children.splice(i);
|
||||
children.push(newChild);
|
||||
Array.prototype.push.apply(children, removed);
|
||||
} else {
|
||||
children.push(newChild);
|
||||
}
|
||||
return newChild;
|
||||
} else {
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertAfter = function(name, attributes, text) {
|
||||
var child, i, removed;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.remove = function() {
|
||||
var i, ref2;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
[].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.node = function(name, attributes, text) {
|
||||
var child, ref2;
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
attributes || (attributes = {});
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];
|
||||
}
|
||||
child = new XMLElement(this, name, attributes);
|
||||
if (text != null) {
|
||||
child.text(text);
|
||||
}
|
||||
this.children.push(child);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.text = function(value) {
|
||||
var child;
|
||||
if (isObject(value)) {
|
||||
this.element(value);
|
||||
}
|
||||
child = new XMLText(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cdata = function(value) {
|
||||
var child;
|
||||
child = new XMLCData(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.comment = function(value) {
|
||||
var child;
|
||||
child = new XMLComment(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentBefore = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentAfter = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.raw = function(value) {
|
||||
var child;
|
||||
child = new XMLRaw(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dummy = function() {
|
||||
var child;
|
||||
child = new XMLDummy(this);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instruction = function(target, value) {
|
||||
var insTarget, insValue, instruction, j, len;
|
||||
if (target != null) {
|
||||
target = getValue(target);
|
||||
}
|
||||
if (value != null) {
|
||||
value = getValue(value);
|
||||
}
|
||||
if (Array.isArray(target)) {
|
||||
for (j = 0, len = target.length; j < len; j++) {
|
||||
insTarget = target[j];
|
||||
this.instruction(insTarget);
|
||||
}
|
||||
} else if (isObject(target)) {
|
||||
for (insTarget in target) {
|
||||
if (!hasProp.call(target, insTarget)) continue;
|
||||
insValue = target[insTarget];
|
||||
this.instruction(insTarget, insValue);
|
||||
}
|
||||
} else {
|
||||
if (isFunction(value)) {
|
||||
value = value.apply();
|
||||
}
|
||||
instruction = new XMLProcessingInstruction(this, target, value);
|
||||
this.children.push(instruction);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionBefore = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionAfter = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.declaration = function(version, encoding, standalone) {
|
||||
var doc, xmldec;
|
||||
doc = this.document();
|
||||
xmldec = new XMLDeclaration(doc, version, encoding, standalone);
|
||||
if (doc.children.length === 0) {
|
||||
doc.children.unshift(xmldec);
|
||||
} else if (doc.children[0].type === NodeType.Declaration) {
|
||||
doc.children[0] = xmldec;
|
||||
} else {
|
||||
doc.children.unshift(xmldec);
|
||||
}
|
||||
return doc.root() || doc;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dtd = function(pubID, sysID) {
|
||||
var child, doc, doctype, i, j, k, len, len1, ref2, ref3;
|
||||
doc = this.document();
|
||||
doctype = new XMLDocType(doc, pubID, sysID);
|
||||
ref2 = doc.children;
|
||||
for (i = j = 0, len = ref2.length; j < len; i = ++j) {
|
||||
child = ref2[i];
|
||||
if (child.type === NodeType.DocType) {
|
||||
doc.children[i] = doctype;
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
ref3 = doc.children;
|
||||
for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {
|
||||
child = ref3[i];
|
||||
if (child.isRoot) {
|
||||
doc.children.splice(i, 0, doctype);
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
doc.children.push(doctype);
|
||||
return doctype;
|
||||
};
|
||||
|
||||
XMLNode.prototype.up = function() {
|
||||
if (this.isRoot) {
|
||||
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
||||
}
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.root = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node.rootObject;
|
||||
} else if (node.isRoot) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.document = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.end = function(options) {
|
||||
return this.document().end(options);
|
||||
};
|
||||
|
||||
XMLNode.prototype.prev = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i < 1) {
|
||||
throw new Error("Already at the first node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i - 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.next = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i === -1 || i === this.parent.children.length - 1) {
|
||||
throw new Error("Already at the last node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i + 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.importDocument = function(doc) {
|
||||
var clonedRoot;
|
||||
clonedRoot = doc.root().clone();
|
||||
clonedRoot.parent = this;
|
||||
clonedRoot.isRoot = false;
|
||||
this.children.push(clonedRoot);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.debugInfo = function(name) {
|
||||
var ref2, ref3;
|
||||
name = name || this.name;
|
||||
if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {
|
||||
return "";
|
||||
} else if (name == null) {
|
||||
return "parent: <" + this.parent.name + ">";
|
||||
} else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {
|
||||
return "node: <" + name + ">";
|
||||
} else {
|
||||
return "node: <" + name + ">, parent: <" + this.parent.name + ">";
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.ele = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.nod = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.txt = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.dat = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.com = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.ins = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.doc = function() {
|
||||
return this.document();
|
||||
};
|
||||
|
||||
XMLNode.prototype.dec = function(version, encoding, standalone) {
|
||||
return this.declaration(version, encoding, standalone);
|
||||
};
|
||||
|
||||
XMLNode.prototype.e = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.n = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.t = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.d = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.c = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.r = function(value) {
|
||||
return this.raw(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.i = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.u = function() {
|
||||
return this.up();
|
||||
};
|
||||
|
||||
XMLNode.prototype.importXMLBuilder = function(doc) {
|
||||
return this.importDocument(doc);
|
||||
};
|
||||
|
||||
XMLNode.prototype.replaceChild = function(newChild, oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.removeChild = function(oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.appendChild = function(newChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasChildNodes = function() {
|
||||
return this.children.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cloneNode = function(deep) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.normalize = function() {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSupported = function(feature, version) {
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasAttributes = function() {
|
||||
return this.attribs.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.compareDocumentPosition = function(other) {
|
||||
var ref, res;
|
||||
ref = this;
|
||||
if (ref === other) {
|
||||
return 0;
|
||||
} else if (this.document() !== other.document()) {
|
||||
res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
|
||||
if (Math.random() < 0.5) {
|
||||
res |= DocumentPosition.Preceding;
|
||||
} else {
|
||||
res |= DocumentPosition.Following;
|
||||
}
|
||||
return res;
|
||||
} else if (ref.isAncestor(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Preceding;
|
||||
} else if (ref.isDescendant(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Following;
|
||||
} else if (ref.isPreceding(other)) {
|
||||
return DocumentPosition.Preceding;
|
||||
} else {
|
||||
return DocumentPosition.Following;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSameNode = function(other) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupPrefix = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupNamespaceURI = function(prefix) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isEqualNode = function(node) {
|
||||
var i, j, ref2;
|
||||
if (node.nodeType !== this.nodeType) {
|
||||
return false;
|
||||
}
|
||||
if (node.children.length !== this.children.length) {
|
||||
return false;
|
||||
}
|
||||
for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {
|
||||
if (!this.children[i].isEqualNode(node.children[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.getFeature = function(feature, version) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.setUserData = function(key, data, handler) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.getUserData = function(key) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.contains = function(other) {
|
||||
if (!other) {
|
||||
return false;
|
||||
}
|
||||
return other === this || this.isDescendant(other);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDescendant = function(node) {
|
||||
var child, isDescendantChild, j, len, ref2;
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (node === child) {
|
||||
return true;
|
||||
}
|
||||
isDescendantChild = child.isDescendant(node);
|
||||
if (isDescendantChild) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
XMLNode.prototype.isAncestor = function(node) {
|
||||
return node.isDescendant(this);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isPreceding = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos < thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isFollowing = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos > thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.treePosition = function(node) {
|
||||
var found, pos;
|
||||
pos = 0;
|
||||
found = false;
|
||||
this.foreachTreeNode(this.document(), function(childNode) {
|
||||
pos++;
|
||||
if (!found && childNode === node) {
|
||||
return found = true;
|
||||
}
|
||||
});
|
||||
if (found) {
|
||||
return pos;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.foreachTreeNode = function(node, func) {
|
||||
var child, j, len, ref2, res;
|
||||
node || (node = this.document());
|
||||
ref2 = node.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (res = func(child)) {
|
||||
return res;
|
||||
} else {
|
||||
res = this.foreachTreeNode(child, func);
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return XMLNode;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 263:
|
||||
@ -7386,7 +8271,7 @@ var MatchKind;
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
const { fromCallback } = __webpack_require__(676);
|
||||
const { fromCallback } = __webpack_require__(147);
|
||||
const Store = __webpack_require__(338).Store;
|
||||
const permuteDomain = __webpack_require__(89).permuteDomain;
|
||||
const pathMatch = __webpack_require__(348).pathMatch;
|
||||
@ -27667,7 +28552,7 @@ const Store = __webpack_require__(338).Store;
|
||||
const MemoryCookieStore = __webpack_require__(332).MemoryCookieStore;
|
||||
const pathMatch = __webpack_require__(348).pathMatch;
|
||||
const VERSION = __webpack_require__(460);
|
||||
const { fromCallback } = __webpack_require__(676);
|
||||
const { fromCallback } = __webpack_require__(147);
|
||||
|
||||
// From RFC6265 S4.1.1
|
||||
// note that it excludes \x3B ";"
|
||||
@ -30048,7 +30933,7 @@ var __createBinding;
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
var iterate = __webpack_require__(157)
|
||||
, initState = __webpack_require__(147)
|
||||
, initState = __webpack_require__(903)
|
||||
, terminator = __webpack_require__(939)
|
||||
;
|
||||
|
||||
@ -30307,6 +31192,7 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
|
||||
}
|
||||
}
|
||||
const args = [
|
||||
'--posix',
|
||||
...getCompressionProgram(),
|
||||
'-cf',
|
||||
cacheFileName.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
|
||||
@ -32449,7 +33335,7 @@ module.exports = '4.0.0'
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -34018,7 +34904,7 @@ CombinedStream.prototype._emitError = function(err) {
|
||||
|
||||
XMLDOMConfiguration = __webpack_require__(524);
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -34542,6 +35428,36 @@ Object.defineProperty(exports, "v5", {
|
||||
return _v4.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "NIL", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _nil.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "version", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _version.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "validate", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _validate.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "stringify", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _stringify.default;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, "parse", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _parse.default;
|
||||
}
|
||||
});
|
||||
|
||||
var _v = _interopRequireDefault(__webpack_require__(173));
|
||||
|
||||
@ -34551,6 +35467,16 @@ var _v3 = _interopRequireDefault(__webpack_require__(606));
|
||||
|
||||
var _v4 = _interopRequireDefault(__webpack_require__(90));
|
||||
|
||||
var _nil = _interopRequireDefault(__webpack_require__(24));
|
||||
|
||||
var _version = _interopRequireDefault(__webpack_require__(104));
|
||||
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
var _parse = _interopRequireDefault(__webpack_require__(197));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/***/ }),
|
||||
@ -34940,7 +35866,7 @@ exports.default = void 0;
|
||||
|
||||
var _rng = _interopRequireDefault(__webpack_require__(733));
|
||||
|
||||
var _bytesToUuid = _interopRequireDefault(__webpack_require__(940));
|
||||
var _stringify = _interopRequireDefault(__webpack_require__(855));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
@ -34963,7 +35889,7 @@ function v4(options, buf, offset) {
|
||||
return buf;
|
||||
}
|
||||
|
||||
return (0, _bytesToUuid.default)(rnds);
|
||||
return (0, _stringify.default)(rnds);
|
||||
}
|
||||
|
||||
var _default = v4;
|
||||
@ -35231,7 +36157,7 @@ module.exports = require("net");
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
module.exports = XMLCharacterData = (function(superClass) {
|
||||
extend(XMLCharacterData, superClass);
|
||||
@ -36934,7 +37860,7 @@ module.exports = require("net");
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
module.exports = XMLRaw = (function(superClass) {
|
||||
extend(XMLRaw, superClass);
|
||||
@ -36976,7 +37902,7 @@ module.exports = require("net");
|
||||
|
||||
isObject = __webpack_require__(582).isObject;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -37335,35 +38261,26 @@ function isUnixExecutable(stats) {
|
||||
/***/ }),
|
||||
|
||||
/***/ 676:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
exports.fromCallback = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
if (typeof arguments[arguments.length - 1] === 'function') fn.apply(this, arguments)
|
||||
else {
|
||||
return new Promise((resolve, reject) => {
|
||||
arguments[arguments.length] = (err, res) => {
|
||||
if (err) return reject(err)
|
||||
resolve(res)
|
||||
}
|
||||
arguments.length++
|
||||
fn.apply(this, arguments)
|
||||
})
|
||||
}
|
||||
}, 'name', { value: fn.name })
|
||||
}
|
||||
|
||||
exports.fromPromise = function (fn) {
|
||||
return Object.defineProperty(function () {
|
||||
const cb = arguments[arguments.length - 1]
|
||||
if (typeof cb !== 'function') return fn.apply(this, arguments)
|
||||
else fn.apply(this, arguments).then(r => cb(null, r), cb)
|
||||
}, 'name', { value: fn.name })
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _regex = _interopRequireDefault(__webpack_require__(238));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function validate(uuid) {
|
||||
return typeof uuid === 'string' && _regex.default.test(uuid);
|
||||
}
|
||||
|
||||
var _default = validate;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
@ -37852,7 +38769,7 @@ function rng() {
|
||||
|
||||
isObject = __webpack_require__(582).isObject;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -38045,7 +38962,7 @@ function rng() {
|
||||
|
||||
isObject = __webpack_require__(582).isObject;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -39910,7 +40827,7 @@ module.exports = require("stream");
|
||||
|
||||
ref = __webpack_require__(582), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -40213,7 +41130,7 @@ module.exports = require("stream");
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -40328,794 +41245,48 @@ module.exports = __webpack_require__(512)
|
||||
/***/ }),
|
||||
|
||||
/***/ 855:
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||
|
||||
// Generated by CoffeeScript 1.12.7
|
||||
(function() {
|
||||
var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,
|
||||
hasProp = {}.hasOwnProperty;
|
||||
"use strict";
|
||||
|
||||
ref1 = __webpack_require__(582), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;
|
||||
|
||||
XMLElement = null;
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
XMLCData = null;
|
||||
var _validate = _interopRequireDefault(__webpack_require__(676));
|
||||
|
||||
XMLComment = null;
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
XMLDeclaration = null;
|
||||
/**
|
||||
* Convert array of 16 byte values to UUID string format of the form:
|
||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
*/
|
||||
const byteToHex = [];
|
||||
|
||||
XMLDocType = null;
|
||||
for (let i = 0; i < 256; ++i) {
|
||||
byteToHex.push((i + 0x100).toString(16).substr(1));
|
||||
}
|
||||
|
||||
XMLRaw = null;
|
||||
function stringify(arr, offset = 0) {
|
||||
// Note: Be careful editing this code! It's been tuned for performance
|
||||
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
||||
const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
||||
// of the following:
|
||||
// - One or more input array values don't map to a hex octet (leading to
|
||||
// "undefined" in the uuid)
|
||||
// - Invalid input values for the RFC `version` or `variant` fields
|
||||
|
||||
XMLText = null;
|
||||
|
||||
XMLProcessingInstruction = null;
|
||||
|
||||
XMLDummy = null;
|
||||
|
||||
NodeType = null;
|
||||
|
||||
XMLNodeList = null;
|
||||
|
||||
XMLNamedNodeMap = null;
|
||||
|
||||
DocumentPosition = null;
|
||||
|
||||
module.exports = XMLNode = (function() {
|
||||
function XMLNode(parent1) {
|
||||
this.parent = parent1;
|
||||
if (this.parent) {
|
||||
this.options = this.parent.options;
|
||||
this.stringify = this.parent.stringify;
|
||||
}
|
||||
this.value = null;
|
||||
this.children = [];
|
||||
this.baseURI = null;
|
||||
if (!XMLElement) {
|
||||
XMLElement = __webpack_require__(796);
|
||||
XMLCData = __webpack_require__(657);
|
||||
XMLComment = __webpack_require__(919);
|
||||
XMLDeclaration = __webpack_require__(738);
|
||||
XMLDocType = __webpack_require__(735);
|
||||
XMLRaw = __webpack_require__(660);
|
||||
XMLText = __webpack_require__(708);
|
||||
XMLProcessingInstruction = __webpack_require__(491);
|
||||
XMLDummy = __webpack_require__(956);
|
||||
NodeType = __webpack_require__(683);
|
||||
XMLNodeList = __webpack_require__(265);
|
||||
XMLNamedNodeMap = __webpack_require__(451);
|
||||
DocumentPosition = __webpack_require__(65);
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeName', {
|
||||
get: function() {
|
||||
return this.name;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeType', {
|
||||
get: function() {
|
||||
return this.type;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nodeValue', {
|
||||
get: function() {
|
||||
return this.value;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'parentNode', {
|
||||
get: function() {
|
||||
return this.parent;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'childNodes', {
|
||||
get: function() {
|
||||
if (!this.childNodeList || !this.childNodeList.nodes) {
|
||||
this.childNodeList = new XMLNodeList(this.children);
|
||||
}
|
||||
return this.childNodeList;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'firstChild', {
|
||||
get: function() {
|
||||
return this.children[0] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'lastChild', {
|
||||
get: function() {
|
||||
return this.children[this.children.length - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'previousSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i - 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'nextSibling', {
|
||||
get: function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
return this.parent.children[i + 1] || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'ownerDocument', {
|
||||
get: function() {
|
||||
return this.document() || null;
|
||||
}
|
||||
});
|
||||
|
||||
Object.defineProperty(XMLNode.prototype, 'textContent', {
|
||||
get: function() {
|
||||
var child, j, len, ref2, str;
|
||||
if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {
|
||||
str = '';
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (child.textContent) {
|
||||
str += child.textContent;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
set: function(value) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
}
|
||||
});
|
||||
|
||||
XMLNode.prototype.setParent = function(parent) {
|
||||
var child, j, len, ref2, results;
|
||||
this.parent = parent;
|
||||
if (parent) {
|
||||
this.options = parent.options;
|
||||
this.stringify = parent.stringify;
|
||||
}
|
||||
ref2 = this.children;
|
||||
results = [];
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
results.push(child.setParent(this));
|
||||
}
|
||||
return results;
|
||||
};
|
||||
|
||||
XMLNode.prototype.element = function(name, attributes, text) {
|
||||
var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;
|
||||
lastChild = null;
|
||||
if (attributes === null && (text == null)) {
|
||||
ref2 = [{}, null], attributes = ref2[0], text = ref2[1];
|
||||
}
|
||||
if (attributes == null) {
|
||||
attributes = {};
|
||||
}
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];
|
||||
}
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
if (Array.isArray(name)) {
|
||||
for (j = 0, len = name.length; j < len; j++) {
|
||||
item = name[j];
|
||||
lastChild = this.element(item);
|
||||
}
|
||||
} else if (isFunction(name)) {
|
||||
lastChild = this.element(name.apply());
|
||||
} else if (isObject(name)) {
|
||||
for (key in name) {
|
||||
if (!hasProp.call(name, key)) continue;
|
||||
val = name[key];
|
||||
if (isFunction(val)) {
|
||||
val = val.apply();
|
||||
}
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {
|
||||
lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (isObject(val) && isEmpty(val)) {
|
||||
lastChild = this.element(key);
|
||||
} else if (!this.options.keepNullNodes && (val == null)) {
|
||||
lastChild = this.dummy();
|
||||
} else if (!this.options.separateArrayItems && Array.isArray(val)) {
|
||||
for (k = 0, len1 = val.length; k < len1; k++) {
|
||||
item = val[k];
|
||||
childNode = {};
|
||||
childNode[key] = item;
|
||||
lastChild = this.element(childNode);
|
||||
}
|
||||
} else if (isObject(val)) {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.element(val);
|
||||
} else {
|
||||
lastChild = this.element(key);
|
||||
lastChild.element(val);
|
||||
}
|
||||
} else {
|
||||
lastChild = this.element(key, val);
|
||||
}
|
||||
}
|
||||
} else if (!this.options.keepNullNodes && text === null) {
|
||||
lastChild = this.dummy();
|
||||
} else {
|
||||
if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {
|
||||
lastChild = this.text(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {
|
||||
lastChild = this.cdata(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {
|
||||
lastChild = this.comment(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {
|
||||
lastChild = this.raw(text);
|
||||
} else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {
|
||||
lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);
|
||||
} else {
|
||||
lastChild = this.node(name, attributes, text);
|
||||
}
|
||||
}
|
||||
if (lastChild == null) {
|
||||
throw new Error("Could not create any elements with: " + name + ". " + this.debugInfo());
|
||||
}
|
||||
return lastChild;
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertBefore = function(name, attributes, text) {
|
||||
var child, i, newChild, refChild, removed;
|
||||
if (name != null ? name.type : void 0) {
|
||||
newChild = name;
|
||||
refChild = attributes;
|
||||
newChild.setParent(this);
|
||||
if (refChild) {
|
||||
i = children.indexOf(refChild);
|
||||
removed = children.splice(i);
|
||||
children.push(newChild);
|
||||
Array.prototype.push.apply(children, removed);
|
||||
} else {
|
||||
children.push(newChild);
|
||||
}
|
||||
return newChild;
|
||||
} else {
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.insertAfter = function(name, attributes, text) {
|
||||
var child, i, removed;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot insert elements at root level. " + this.debugInfo(name));
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.element(name, attributes, text);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.remove = function() {
|
||||
var i, ref2;
|
||||
if (this.isRoot) {
|
||||
throw new Error("Cannot remove the root element. " + this.debugInfo());
|
||||
}
|
||||
i = this.parent.children.indexOf(this);
|
||||
[].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.node = function(name, attributes, text) {
|
||||
var child, ref2;
|
||||
if (name != null) {
|
||||
name = getValue(name);
|
||||
}
|
||||
attributes || (attributes = {});
|
||||
attributes = getValue(attributes);
|
||||
if (!isObject(attributes)) {
|
||||
ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];
|
||||
}
|
||||
child = new XMLElement(this, name, attributes);
|
||||
if (text != null) {
|
||||
child.text(text);
|
||||
}
|
||||
this.children.push(child);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.text = function(value) {
|
||||
var child;
|
||||
if (isObject(value)) {
|
||||
this.element(value);
|
||||
}
|
||||
child = new XMLText(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cdata = function(value) {
|
||||
var child;
|
||||
child = new XMLCData(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.comment = function(value) {
|
||||
var child;
|
||||
child = new XMLComment(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentBefore = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.commentAfter = function(value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.comment(value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.raw = function(value) {
|
||||
var child;
|
||||
child = new XMLRaw(this, value);
|
||||
this.children.push(child);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dummy = function() {
|
||||
var child;
|
||||
child = new XMLDummy(this);
|
||||
return child;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instruction = function(target, value) {
|
||||
var insTarget, insValue, instruction, j, len;
|
||||
if (target != null) {
|
||||
target = getValue(target);
|
||||
}
|
||||
if (value != null) {
|
||||
value = getValue(value);
|
||||
}
|
||||
if (Array.isArray(target)) {
|
||||
for (j = 0, len = target.length; j < len; j++) {
|
||||
insTarget = target[j];
|
||||
this.instruction(insTarget);
|
||||
}
|
||||
} else if (isObject(target)) {
|
||||
for (insTarget in target) {
|
||||
if (!hasProp.call(target, insTarget)) continue;
|
||||
insValue = target[insTarget];
|
||||
this.instruction(insTarget, insValue);
|
||||
}
|
||||
} else {
|
||||
if (isFunction(value)) {
|
||||
value = value.apply();
|
||||
}
|
||||
instruction = new XMLProcessingInstruction(this, target, value);
|
||||
this.children.push(instruction);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionBefore = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.instructionAfter = function(target, value) {
|
||||
var child, i, removed;
|
||||
i = this.parent.children.indexOf(this);
|
||||
removed = this.parent.children.splice(i + 1);
|
||||
child = this.parent.instruction(target, value);
|
||||
Array.prototype.push.apply(this.parent.children, removed);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.declaration = function(version, encoding, standalone) {
|
||||
var doc, xmldec;
|
||||
doc = this.document();
|
||||
xmldec = new XMLDeclaration(doc, version, encoding, standalone);
|
||||
if (doc.children.length === 0) {
|
||||
doc.children.unshift(xmldec);
|
||||
} else if (doc.children[0].type === NodeType.Declaration) {
|
||||
doc.children[0] = xmldec;
|
||||
} else {
|
||||
doc.children.unshift(xmldec);
|
||||
}
|
||||
return doc.root() || doc;
|
||||
};
|
||||
|
||||
XMLNode.prototype.dtd = function(pubID, sysID) {
|
||||
var child, doc, doctype, i, j, k, len, len1, ref2, ref3;
|
||||
doc = this.document();
|
||||
doctype = new XMLDocType(doc, pubID, sysID);
|
||||
ref2 = doc.children;
|
||||
for (i = j = 0, len = ref2.length; j < len; i = ++j) {
|
||||
child = ref2[i];
|
||||
if (child.type === NodeType.DocType) {
|
||||
doc.children[i] = doctype;
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
ref3 = doc.children;
|
||||
for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {
|
||||
child = ref3[i];
|
||||
if (child.isRoot) {
|
||||
doc.children.splice(i, 0, doctype);
|
||||
return doctype;
|
||||
}
|
||||
}
|
||||
doc.children.push(doctype);
|
||||
return doctype;
|
||||
};
|
||||
|
||||
XMLNode.prototype.up = function() {
|
||||
if (this.isRoot) {
|
||||
throw new Error("The root node has no parent. Use doc() if you need to get the document object.");
|
||||
}
|
||||
return this.parent;
|
||||
};
|
||||
|
||||
XMLNode.prototype.root = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node.rootObject;
|
||||
} else if (node.isRoot) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.document = function() {
|
||||
var node;
|
||||
node = this;
|
||||
while (node) {
|
||||
if (node.type === NodeType.Document) {
|
||||
return node;
|
||||
} else {
|
||||
node = node.parent;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.end = function(options) {
|
||||
return this.document().end(options);
|
||||
};
|
||||
|
||||
XMLNode.prototype.prev = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i < 1) {
|
||||
throw new Error("Already at the first node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i - 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.next = function() {
|
||||
var i;
|
||||
i = this.parent.children.indexOf(this);
|
||||
if (i === -1 || i === this.parent.children.length - 1) {
|
||||
throw new Error("Already at the last node. " + this.debugInfo());
|
||||
}
|
||||
return this.parent.children[i + 1];
|
||||
};
|
||||
|
||||
XMLNode.prototype.importDocument = function(doc) {
|
||||
var clonedRoot;
|
||||
clonedRoot = doc.root().clone();
|
||||
clonedRoot.parent = this;
|
||||
clonedRoot.isRoot = false;
|
||||
this.children.push(clonedRoot);
|
||||
return this;
|
||||
};
|
||||
|
||||
XMLNode.prototype.debugInfo = function(name) {
|
||||
var ref2, ref3;
|
||||
name = name || this.name;
|
||||
if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {
|
||||
return "";
|
||||
} else if (name == null) {
|
||||
return "parent: <" + this.parent.name + ">";
|
||||
} else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {
|
||||
return "node: <" + name + ">";
|
||||
} else {
|
||||
return "node: <" + name + ">, parent: <" + this.parent.name + ">";
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.ele = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.nod = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.txt = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.dat = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.com = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.ins = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.doc = function() {
|
||||
return this.document();
|
||||
};
|
||||
|
||||
XMLNode.prototype.dec = function(version, encoding, standalone) {
|
||||
return this.declaration(version, encoding, standalone);
|
||||
};
|
||||
|
||||
XMLNode.prototype.e = function(name, attributes, text) {
|
||||
return this.element(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.n = function(name, attributes, text) {
|
||||
return this.node(name, attributes, text);
|
||||
};
|
||||
|
||||
XMLNode.prototype.t = function(value) {
|
||||
return this.text(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.d = function(value) {
|
||||
return this.cdata(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.c = function(value) {
|
||||
return this.comment(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.r = function(value) {
|
||||
return this.raw(value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.i = function(target, value) {
|
||||
return this.instruction(target, value);
|
||||
};
|
||||
|
||||
XMLNode.prototype.u = function() {
|
||||
return this.up();
|
||||
};
|
||||
|
||||
XMLNode.prototype.importXMLBuilder = function(doc) {
|
||||
return this.importDocument(doc);
|
||||
};
|
||||
|
||||
XMLNode.prototype.replaceChild = function(newChild, oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.removeChild = function(oldChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.appendChild = function(newChild) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasChildNodes = function() {
|
||||
return this.children.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.cloneNode = function(deep) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.normalize = function() {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSupported = function(feature, version) {
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.hasAttributes = function() {
|
||||
return this.attribs.length !== 0;
|
||||
};
|
||||
|
||||
XMLNode.prototype.compareDocumentPosition = function(other) {
|
||||
var ref, res;
|
||||
ref = this;
|
||||
if (ref === other) {
|
||||
return 0;
|
||||
} else if (this.document() !== other.document()) {
|
||||
res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;
|
||||
if (Math.random() < 0.5) {
|
||||
res |= DocumentPosition.Preceding;
|
||||
} else {
|
||||
res |= DocumentPosition.Following;
|
||||
}
|
||||
return res;
|
||||
} else if (ref.isAncestor(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Preceding;
|
||||
} else if (ref.isDescendant(other)) {
|
||||
return DocumentPosition.Contains | DocumentPosition.Following;
|
||||
} else if (ref.isPreceding(other)) {
|
||||
return DocumentPosition.Preceding;
|
||||
} else {
|
||||
return DocumentPosition.Following;
|
||||
if (!(0, _validate.default)(uuid)) {
|
||||
throw TypeError('Stringified UUID is invalid');
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isSameNode = function(other) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupPrefix = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.lookupNamespaceURI = function(prefix) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.isEqualNode = function(node) {
|
||||
var i, j, ref2;
|
||||
if (node.nodeType !== this.nodeType) {
|
||||
return false;
|
||||
}
|
||||
if (node.children.length !== this.children.length) {
|
||||
return false;
|
||||
}
|
||||
for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {
|
||||
if (!this.children[i].isEqualNode(node.children[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
XMLNode.prototype.getFeature = function(feature, version) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.setUserData = function(key, data, handler) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.getUserData = function(key) {
|
||||
throw new Error("This DOM method is not implemented." + this.debugInfo());
|
||||
};
|
||||
|
||||
XMLNode.prototype.contains = function(other) {
|
||||
if (!other) {
|
||||
return false;
|
||||
}
|
||||
return other === this || this.isDescendant(other);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isDescendant = function(node) {
|
||||
var child, isDescendantChild, j, len, ref2;
|
||||
ref2 = this.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (node === child) {
|
||||
return true;
|
||||
}
|
||||
isDescendantChild = child.isDescendant(node);
|
||||
if (isDescendantChild) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
XMLNode.prototype.isAncestor = function(node) {
|
||||
return node.isDescendant(this);
|
||||
};
|
||||
|
||||
XMLNode.prototype.isPreceding = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos < thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.isFollowing = function(node) {
|
||||
var nodePos, thisPos;
|
||||
nodePos = this.treePosition(node);
|
||||
thisPos = this.treePosition(this);
|
||||
if (nodePos === -1 || thisPos === -1) {
|
||||
return false;
|
||||
} else {
|
||||
return nodePos > thisPos;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.treePosition = function(node) {
|
||||
var found, pos;
|
||||
pos = 0;
|
||||
found = false;
|
||||
this.foreachTreeNode(this.document(), function(childNode) {
|
||||
pos++;
|
||||
if (!found && childNode === node) {
|
||||
return found = true;
|
||||
}
|
||||
});
|
||||
if (found) {
|
||||
return pos;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
||||
XMLNode.prototype.foreachTreeNode = function(node, func) {
|
||||
var child, j, len, ref2, res;
|
||||
node || (node = this.document());
|
||||
ref2 = node.children;
|
||||
for (j = 0, len = ref2.length; j < len; j++) {
|
||||
child = ref2[j];
|
||||
if (res = func(child)) {
|
||||
return res;
|
||||
} else {
|
||||
res = this.foreachTreeNode(child, func);
|
||||
if (res) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return XMLNode;
|
||||
|
||||
})();
|
||||
|
||||
}).call(this);
|
||||
return uuid;
|
||||
}
|
||||
|
||||
var _default = stringify;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
@ -41489,7 +41660,7 @@ exports.TraceAPI = TraceAPI;
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
module.exports = XMLAttribute = (function() {
|
||||
function XMLAttribute(parent, name, value) {
|
||||
@ -42461,7 +42632,7 @@ exports.PollerStoppedError = PollerStoppedError;
|
||||
/***/ (function(module, __unusedexports, __webpack_require__) {
|
||||
|
||||
var iterate = __webpack_require__(157)
|
||||
, initState = __webpack_require__(147)
|
||||
, initState = __webpack_require__(903)
|
||||
, terminator = __webpack_require__(939)
|
||||
;
|
||||
|
||||
@ -42670,6 +42841,50 @@ function retryHttpClientResponse(name, method, maxAttempts = 2) {
|
||||
exports.retryHttpClientResponse = retryHttpClientResponse;
|
||||
//# sourceMappingURL=requestUtils.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 903:
|
||||
/***/ (function(module) {
|
||||
|
||||
// API
|
||||
module.exports = state;
|
||||
|
||||
/**
|
||||
* Creates initial state object
|
||||
* for iteration over list
|
||||
*
|
||||
* @param {array|object} list - list to iterate over
|
||||
* @param {function|null} sortMethod - function to use for keys sort,
|
||||
* or `null` to keep them as is
|
||||
* @returns {object} - initial state object
|
||||
*/
|
||||
function state(list, sortMethod)
|
||||
{
|
||||
var isNamedList = !Array.isArray(list)
|
||||
, initState =
|
||||
{
|
||||
index : 0,
|
||||
keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
|
||||
jobs : {},
|
||||
results : isNamedList ? {} : [],
|
||||
size : isNamedList ? Object.keys(list).length : list.length
|
||||
}
|
||||
;
|
||||
|
||||
if (sortMethod)
|
||||
{
|
||||
// sort array keys based on it's values
|
||||
// sort object's keys just on own merit
|
||||
initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
|
||||
{
|
||||
return sortMethod(list[a], list[b]);
|
||||
});
|
||||
}
|
||||
|
||||
return initState;
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 919:
|
||||
@ -43464,39 +43679,6 @@ function terminator(callback)
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 940:
|
||||
/***/ (function(__unusedmodule, exports) {
|
||||
|
||||
"use strict";
|
||||
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
/**
|
||||
* Convert array of 16 byte values to UUID string format of the form:
|
||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
||||
*/
|
||||
const byteToHex = [];
|
||||
|
||||
for (let i = 0; i < 256; ++i) {
|
||||
byteToHex.push((i + 0x100).toString(16).substr(1));
|
||||
}
|
||||
|
||||
function bytesToUuid(buf, offset_) {
|
||||
const offset = offset_ || 0; // Note: Be careful editing this code! It's been tuned for performance
|
||||
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
||||
|
||||
return (byteToHex[buf[offset + 0]] + byteToHex[buf[offset + 1]] + byteToHex[buf[offset + 2]] + byteToHex[buf[offset + 3]] + '-' + byteToHex[buf[offset + 4]] + byteToHex[buf[offset + 5]] + '-' + byteToHex[buf[offset + 6]] + byteToHex[buf[offset + 7]] + '-' + byteToHex[buf[offset + 8]] + byteToHex[buf[offset + 9]] + '-' + byteToHex[buf[offset + 10]] + byteToHex[buf[offset + 11]] + byteToHex[buf[offset + 12]] + byteToHex[buf[offset + 13]] + byteToHex[buf[offset + 14]] + byteToHex[buf[offset + 15]]).toLowerCase();
|
||||
}
|
||||
|
||||
var _default = bytesToUuid;
|
||||
exports.default = _default;
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 950:
|
||||
@ -43574,7 +43756,7 @@ exports.checkBypass = checkBypass;
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
XMLNode = __webpack_require__(855);
|
||||
XMLNode = __webpack_require__(257);
|
||||
|
||||
NodeType = __webpack_require__(683);
|
||||
|
||||
@ -43934,7 +44116,7 @@ var tslib = __webpack_require__(865);
|
||||
var tough = __webpack_require__(393);
|
||||
var http = __webpack_require__(605);
|
||||
var https = __webpack_require__(211);
|
||||
__webpack_require__(454);
|
||||
var node_fetch = _interopDefault(__webpack_require__(454));
|
||||
var abortController = __webpack_require__(106);
|
||||
var FormData = _interopDefault(__webpack_require__(790));
|
||||
var util = __webpack_require__(669);
|
||||
@ -44121,7 +44303,7 @@ var Constants = {
|
||||
* @const
|
||||
* @type {string}
|
||||
*/
|
||||
coreHttpVersion: "1.1.4",
|
||||
coreHttpVersion: "1.1.5",
|
||||
/**
|
||||
* Specifies HTTP.
|
||||
*
|
||||
@ -46428,11 +46610,6 @@ function isValidPort(port) {
|
||||
}
|
||||
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
var globalWithFetch = global;
|
||||
if (typeof globalWithFetch.fetch !== "function") {
|
||||
var fetch_1 = __webpack_require__(454).default;
|
||||
globalWithFetch.fetch = fetch_1;
|
||||
}
|
||||
function getCachedAgent(isHttps, agentCache) {
|
||||
return isHttps ? agentCache.httpsAgent : agentCache.httpAgent;
|
||||
}
|
||||
@ -46489,7 +46666,7 @@ var NodeFetchHttpClient = /** @class */ (function (_super) {
|
||||
NodeFetchHttpClient.prototype.fetch = function (input, init) {
|
||||
return tslib.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib.__generator(this, function (_a) {
|
||||
return [2 /*return*/, fetch(input, init)];
|
||||
return [2 /*return*/, node_fetch(input, init)];
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
30
package-lock.json
generated
30
package-lock.json
generated
@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@actions/cache": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.1.tgz",
|
||||
"integrity": "sha512-QyMKGZTVB6bRBIMNEoW74LeqYtbY7cSaWNvaT1uqhzjredaW+vNFxv9XF/cyipzwZBVZgizOF2zpdVYnP0UVYg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.2.tgz",
|
||||
"integrity": "sha512-CzAseaJ4cKmOI58EIWUb/LfeYdM7Y25s39OEMtWAhEPrPPzrbSEjGHCLaYjJ0V8C4iojo8vBYh5B3OIJ37EiJw==",
|
||||
"requires": {
|
||||
"@actions/core": "^1.2.4",
|
||||
"@actions/exec": "^1.0.1",
|
||||
@ -87,9 +87,9 @@
|
||||
}
|
||||
},
|
||||
"@azure/core-http": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.1.4.tgz",
|
||||
"integrity": "sha512-81cNvyT51MfYBVIscPwC7Sl1n/xWimqho+R2eOQLw6Qqtfxs5dYlFWfLr9HbYX7QEXZdc5xdsyYTjvfJkjA7Hg==",
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-1.1.5.tgz",
|
||||
"integrity": "sha512-4nrA7SzfPxoyTF7hzmN6Zi2RJf57/ZE5rKTSb2oCOrzxKqTRNZrBm0mCDxTLktxsRN1xbNUTxFy5dm/Irb1RCQ==",
|
||||
"requires": {
|
||||
"@azure/abort-controller": "^1.0.0",
|
||||
"@azure/core-auth": "^1.1.3",
|
||||
@ -134,9 +134,9 @@
|
||||
"integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g=="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.2.0.tgz",
|
||||
"integrity": "sha512-CYpGiFTUrmI6OBMkAdjSDM0k5h8SkkiTP4WAjQgDgNB1S3Ou9VBEvr6q0Kv2H1mMk7IWfxYGpMH5sd5AvcIV2Q=="
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
|
||||
"integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -178,9 +178,9 @@
|
||||
}
|
||||
},
|
||||
"@azure/ms-rest-js": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.0.7.tgz",
|
||||
"integrity": "sha512-rQpNxDhyOIyS4E+4sUCBMvjrtbNwB32wH06cC2SFoQM4TR29bIKaTlIC1tMe0K07w9c5tNk/2uUHs6/ld/Z3+A==",
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.0.8.tgz",
|
||||
"integrity": "sha512-PO4pnYaF66IAB/RWbhrTprGyhOzDzsgcbT7z8k3O38JKlwifbrhW+8M0fzx0ScZnaacP8rZyBazYMUF9P12c0g==",
|
||||
"requires": {
|
||||
"@types/node-fetch": "^2.3.7",
|
||||
"@types/tunnel": "0.0.1",
|
||||
@ -2153,9 +2153,9 @@
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"events": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.1.0.tgz",
|
||||
"integrity": "sha512-Rv+u8MLHNOdMjTAFeT3nCjHn2aGlx435FP/sDHNaRhDEMwyI/aB22Kj2qIN8R0cw3z28psEQLYwxVKLsKrMgWg=="
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
|
||||
"integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg=="
|
||||
},
|
||||
"exec-sh": {
|
||||
"version": "0.3.4",
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
"@actions/core": "^1.2.0",
|
||||
"@actions/exec": "^1.0.1",
|
||||
"@actions/io": "^1.0.1",
|
||||
"@actions/cache": "^1.0.1"
|
||||
"@actions/cache": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^24.0.13",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user