jscrambler 6.2.0 → 6.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/jscrambler.js +12 -8
- package/dist/client.js +13 -9
- package/dist/constants.js +1 -1
- package/dist/generate-signed-params.js +1 -1
- package/dist/get-protection-default-fragments.js +7 -5
- package/dist/index.js +120 -118
- package/dist/introspection.js +16 -12
- package/dist/mutations.js +9 -9
- package/dist/queries.js +4 -4
- package/dist/zip.js +12 -8
- package/package.json +1 -1
package/dist/bin/jscrambler.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
|
+
|
|
4
6
|
var _commander = _interopRequireDefault(require("commander"));
|
|
5
7
|
|
|
6
8
|
var _lodash = _interopRequireDefault(require("lodash.defaults"));
|
|
@@ -19,9 +21,11 @@ var _utils = require("../utils");
|
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
24
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
25
|
+
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
27
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
29
|
|
|
26
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
31
|
|
|
@@ -278,8 +282,8 @@ var clientSettings = {
|
|
|
278
282
|
|
|
279
283
|
if (_commander.default.sourceMaps) {
|
|
280
284
|
// Go, go, go download
|
|
281
|
-
_asyncToGenerator( /*#__PURE__*/
|
|
282
|
-
return
|
|
285
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
286
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
283
287
|
while (1) {
|
|
284
288
|
switch (_context.prev = _context.next) {
|
|
285
289
|
case 0:
|
|
@@ -310,8 +314,8 @@ if (_commander.default.sourceMaps) {
|
|
|
310
314
|
}))();
|
|
311
315
|
} else if (_commander.default.outputSymbolTable) {
|
|
312
316
|
// Go, go, go download
|
|
313
|
-
_asyncToGenerator( /*#__PURE__*/
|
|
314
|
-
return
|
|
317
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
318
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
315
319
|
while (1) {
|
|
316
320
|
switch (_context2.prev = _context2.next) {
|
|
317
321
|
case 0:
|
|
@@ -367,9 +371,9 @@ if (_commander.default.sourceMaps) {
|
|
|
367
371
|
});
|
|
368
372
|
} else {
|
|
369
373
|
// Go, go, go
|
|
370
|
-
_asyncToGenerator( /*#__PURE__*/
|
|
374
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
371
375
|
var protectAndDownloadOptions;
|
|
372
|
-
return
|
|
376
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
373
377
|
while (1) {
|
|
374
378
|
switch (_context3.prev = _context3.next) {
|
|
375
379
|
case 0:
|
package/dist/client.js
CHANGED
|
@@ -30,17 +30,21 @@ var _package = require("../package.json");
|
|
|
30
30
|
|
|
31
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
32
|
|
|
33
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
34
34
|
|
|
35
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
35
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
36
36
|
|
|
37
37
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
38
38
|
|
|
39
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
39
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
40
|
+
|
|
41
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
42
|
+
|
|
43
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
40
44
|
|
|
41
45
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
42
46
|
|
|
43
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
47
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
44
48
|
|
|
45
49
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
46
50
|
|
|
@@ -50,15 +54,15 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
50
54
|
|
|
51
55
|
function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
|
|
52
56
|
|
|
53
|
-
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
57
|
+
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
54
58
|
|
|
55
59
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
56
60
|
|
|
57
61
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
58
62
|
|
|
59
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
63
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
60
64
|
|
|
61
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
65
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
62
66
|
|
|
63
67
|
var debug = !!process.env.DEBUG;
|
|
64
68
|
var metrics = !!process.env.METRICS;
|
|
@@ -79,7 +83,7 @@ var ClientError = /*#__PURE__*/function (_Error) {
|
|
|
79
83
|
return _this;
|
|
80
84
|
}
|
|
81
85
|
|
|
82
|
-
return ClientError;
|
|
86
|
+
return _createClass(ClientError);
|
|
83
87
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
84
88
|
/**
|
|
85
89
|
* @class JScramblerClient
|
|
@@ -327,7 +331,7 @@ JScramblerClient.prototype.request = function (method, path) {
|
|
|
327
331
|
statusCode = err.response.status;
|
|
328
332
|
var incompatibleApi = false;
|
|
329
333
|
|
|
330
|
-
if (statusCode === _constants.HTTP_STATUS_CODES.UNAUTHORIZED) {
|
|
334
|
+
if (statusCode === _constants.HTTP_STATUS_CODES.UNAUTHORIZED && /Invalid Signature/i.test(err.response.data.message)) {
|
|
331
335
|
incompatibleApi = err.response.data.errorCode !== _constants.JSCRAMBLER_ERROR_CODES.INVALID_SIGNATURE;
|
|
332
336
|
}
|
|
333
337
|
|
package/dist/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.JSCRAMBLER_ERROR_CODES = exports.HTTP_STATUS_CODES = exports.CLIENT_PACKAGES = exports.CLIENT_IDS = void 0;
|
|
7
7
|
|
|
8
8
|
var _Object$freeze;
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ var _lodash3 = _interopRequireDefault(require("lodash.keys"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
18
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
19
19
|
|
|
20
20
|
var debug = !!process.env.DEBUG;
|
|
21
21
|
|
|
@@ -11,7 +11,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
13
13
|
|
|
14
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
14
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
15
|
+
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
15
17
|
|
|
16
18
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
17
19
|
|
|
@@ -22,10 +24,10 @@ function getIntrospection(_x, _x2) {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
function _getIntrospection() {
|
|
25
|
-
_getIntrospection = _asyncToGenerator( /*#__PURE__*/
|
|
27
|
+
_getIntrospection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(client, typeName) {
|
|
26
28
|
var _introspection;
|
|
27
29
|
|
|
28
|
-
return
|
|
30
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29
31
|
while (1) {
|
|
30
32
|
switch (_context.prev = _context.next) {
|
|
31
33
|
case 0:
|
|
@@ -122,9 +124,9 @@ function _default(_x3) {
|
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
function _ref() {
|
|
125
|
-
_ref = _asyncToGenerator( /*#__PURE__*/
|
|
127
|
+
_ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(client) {
|
|
126
128
|
var appProtection, deprecation, source, errorMessage, fragments;
|
|
127
|
-
return
|
|
129
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
128
130
|
while (1) {
|
|
129
131
|
switch (_context2.prev = _context2.next) {
|
|
130
132
|
case 0:
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -57,12 +57,14 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
57
57
|
|
|
58
58
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
59
59
|
|
|
60
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
60
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
61
61
|
|
|
62
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
62
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
63
63
|
|
|
64
64
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
65
65
|
|
|
66
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
67
|
+
|
|
66
68
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
67
69
|
|
|
68
70
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -156,10 +158,10 @@ var _default = {
|
|
|
156
158
|
updateApplicationSources: function updateApplicationSources(client, applicationId, _ref) {
|
|
157
159
|
var _this = this;
|
|
158
160
|
|
|
159
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
161
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
160
162
|
var sources, filesSrc, cwd, appProfiling, removeSourceRes, zipped, source, _filesSrc, i, l, content;
|
|
161
163
|
|
|
162
|
-
return
|
|
164
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
163
165
|
while (1) {
|
|
164
166
|
switch (_context.prev = _context.next) {
|
|
165
167
|
case 0:
|
|
@@ -322,10 +324,10 @@ var _default = {
|
|
|
322
324
|
protectAndDownload: function protectAndDownload(configPathOrObject, destCallback) {
|
|
323
325
|
var _this2 = this;
|
|
324
326
|
|
|
325
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
327
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
326
328
|
var start, finalConfig, applicationId, host, port, basePath, protocol, cafile, keys, sources, _finalConfig$stream, stream, cwd, params, applicationTypes, languageSpecifications, sourceMaps, randomizationSeed, areSubscribersOrdered, useRecommendedOrder, _finalConfig$bail, bail, jscramblerVersion, debugMode, proxy, utc, clientId, tolerateMinification, codeHardeningThreshold, useProfilingData, browsers, useAppClassification, profilingDataMode, removeProfilingData, skipSources, inputSymbolTable, entryPoint, excludeList, numberOfProtections, forceAppEnvironment, accessKey, secretKey, client, filesSrc, filesDest, source, appProfiling, updateData, dataToValidate, prop, value, applicationUpdate, updateApplicationRes, protectionOptions, inputSymbolTableContents, createApplicationProtectionRes, protectionIds, onExitCancelProtection, processedProtections, handleProtection, i, protection;
|
|
327
329
|
|
|
328
|
-
return
|
|
330
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
329
331
|
while (1) {
|
|
330
332
|
switch (_context4.prev = _context4.next) {
|
|
331
333
|
case 0:
|
|
@@ -380,7 +382,13 @@ var _default = {
|
|
|
380
382
|
|
|
381
383
|
_context4.next = 16;
|
|
382
384
|
return _this2.getApplicationProfiling(client, applicationId).catch(function (e) {
|
|
383
|
-
if (![_constants.HTTP_STATUS_CODES.NOT_FOUND, _constants.HTTP_STATUS_CODES.FORBIDDEN, _constants.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE].includes(e.statusCode)) throw e;
|
|
385
|
+
if (![_constants.HTTP_STATUS_CODES.NOT_FOUND, _constants.HTTP_STATUS_CODES.FORBIDDEN, _constants.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE].includes(e.statusCode)) throw e;else if (_constants.HTTP_STATUS_CODES.NOT_FOUND === e.statusCode) {
|
|
386
|
+
// if applicationProfiling is not found then then it hasn't been done yet
|
|
387
|
+
// profiling cannot be done with automatic mode if it has never been done before
|
|
388
|
+
if (profilingDataMode === 'automatic') {
|
|
389
|
+
throw new Error('You can not use the automatic mode without previous profiling having been done.');
|
|
390
|
+
}
|
|
391
|
+
}
|
|
384
392
|
});
|
|
385
393
|
|
|
386
394
|
case 16:
|
|
@@ -512,9 +520,9 @@ var _default = {
|
|
|
512
520
|
});
|
|
513
521
|
|
|
514
522
|
onExitCancelProtection = /*#__PURE__*/function () {
|
|
515
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
|
523
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
516
524
|
var i, protectionId;
|
|
517
|
-
return
|
|
525
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
518
526
|
while (1) {
|
|
519
527
|
switch (_context2.prev = _context2.next) {
|
|
520
528
|
case 0:
|
|
@@ -583,7 +591,7 @@ var _default = {
|
|
|
583
591
|
process.removeListener('SIGINT', onExitCancelProtection).removeListener('SIGTERM', onExitCancelProtection);
|
|
584
592
|
|
|
585
593
|
handleProtection = /*#__PURE__*/function () {
|
|
586
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
|
594
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(protection) {
|
|
587
595
|
var _ref5,
|
|
588
596
|
_ref5$outPrefix,
|
|
589
597
|
outPrefix,
|
|
@@ -593,7 +601,7 @@ var _default = {
|
|
|
593
601
|
download,
|
|
594
602
|
_args3 = arguments;
|
|
595
603
|
|
|
596
|
-
return
|
|
604
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
597
605
|
while (1) {
|
|
598
606
|
switch (_context3.prev = _context3.next) {
|
|
599
607
|
case 0:
|
|
@@ -766,10 +774,10 @@ var _default = {
|
|
|
766
774
|
instrumentAndDownload: function instrumentAndDownload(configPathOrObject, destCallback) {
|
|
767
775
|
var _this3 = this;
|
|
768
776
|
|
|
769
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
770
|
-
var finalConfig, applicationId, host, port, basePath, protocol, cafile, keys, sources, _finalConfig$stream2, stream, cwd, jscramblerVersion, proxy, utc, skipSources, clientId, accessKey, secretKey, client, filesSrc, filesDest,
|
|
777
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
778
|
+
var finalConfig, applicationId, host, port, basePath, protocol, cafile, keys, sources, _finalConfig$stream2, stream, cwd, jscramblerVersion, proxy, utc, skipSources, clientId, accessKey, secretKey, client, filesSrc, filesDest, instrumentation, onExitCancelInstrumentation, download;
|
|
771
779
|
|
|
772
|
-
return
|
|
780
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
773
781
|
while (1) {
|
|
774
782
|
switch (_context5.prev = _context5.next) {
|
|
775
783
|
case 0:
|
|
@@ -816,7 +824,7 @@ var _default = {
|
|
|
816
824
|
|
|
817
825
|
case 11:
|
|
818
826
|
if (skipSources) {
|
|
819
|
-
_context5.next =
|
|
827
|
+
_context5.next = 16;
|
|
820
828
|
break;
|
|
821
829
|
}
|
|
822
830
|
|
|
@@ -828,23 +836,17 @@ var _default = {
|
|
|
828
836
|
});
|
|
829
837
|
|
|
830
838
|
case 14:
|
|
831
|
-
|
|
832
|
-
updateApplicationSourcePromise = _yield$_this3$updateA.promise;
|
|
833
|
-
_context5.next = 18;
|
|
834
|
-
return updateApplicationSourcePromise;
|
|
835
|
-
|
|
836
|
-
case 18:
|
|
837
|
-
_context5.next = 21;
|
|
839
|
+
_context5.next = 17;
|
|
838
840
|
break;
|
|
839
841
|
|
|
840
|
-
case
|
|
842
|
+
case 16:
|
|
841
843
|
console.log('Update source files SKIPPED');
|
|
842
844
|
|
|
843
|
-
case
|
|
844
|
-
_context5.next =
|
|
845
|
+
case 17:
|
|
846
|
+
_context5.next = 19;
|
|
845
847
|
return _this3.startInstrumentation(client, applicationId);
|
|
846
848
|
|
|
847
|
-
case
|
|
849
|
+
case 19:
|
|
848
850
|
instrumentation = _context5.sent;
|
|
849
851
|
errorHandler(instrumentation);
|
|
850
852
|
|
|
@@ -859,10 +861,10 @@ var _default = {
|
|
|
859
861
|
};
|
|
860
862
|
|
|
861
863
|
process.once('SIGINT', onExitCancelInstrumentation).once('SIGTERM', onExitCancelInstrumentation);
|
|
862
|
-
_context5.next =
|
|
864
|
+
_context5.next = 25;
|
|
863
865
|
return _this3.pollInstrumentation(client, instrumentation.data.id);
|
|
864
866
|
|
|
865
|
-
case
|
|
867
|
+
case 25:
|
|
866
868
|
instrumentation = _context5.sent;
|
|
867
869
|
process.removeListener('SIGINT', onExitCancelInstrumentation).removeListener('SIGTERM', onExitCancelInstrumentation);
|
|
868
870
|
|
|
@@ -870,10 +872,10 @@ var _default = {
|
|
|
870
872
|
console.log("Finished instrumention with id ".concat(instrumentation.data.id, ". Downloading..."));
|
|
871
873
|
}
|
|
872
874
|
|
|
873
|
-
_context5.next =
|
|
875
|
+
_context5.next = 30;
|
|
874
876
|
return _this3.downloadApplicationInstrumented(client, instrumentation.data.id);
|
|
875
877
|
|
|
876
|
-
case
|
|
878
|
+
case 30:
|
|
877
879
|
download = _context5.sent;
|
|
878
880
|
errorHandler(download);
|
|
879
881
|
|
|
@@ -881,10 +883,10 @@ var _default = {
|
|
|
881
883
|
console.log('Unzipping files');
|
|
882
884
|
}
|
|
883
885
|
|
|
884
|
-
_context5.next =
|
|
886
|
+
_context5.next = 35;
|
|
885
887
|
return (0, _zip.unzip)(download, filesDest || destCallback, stream);
|
|
886
888
|
|
|
887
|
-
case
|
|
889
|
+
case 35:
|
|
888
890
|
if (debug) {
|
|
889
891
|
console.log('Finished unzipping files');
|
|
890
892
|
}
|
|
@@ -893,7 +895,7 @@ var _default = {
|
|
|
893
895
|
console.log("Application ".concat(applicationId, " was instrumented. Bootstrap your instrumented application and run *--start-profiling* command."));
|
|
894
896
|
return _context5.abrupt("return", instrumentation.data.id);
|
|
895
897
|
|
|
896
|
-
case
|
|
898
|
+
case 39:
|
|
897
899
|
case "end":
|
|
898
900
|
return _context5.stop();
|
|
899
901
|
}
|
|
@@ -913,9 +915,9 @@ var _default = {
|
|
|
913
915
|
setProfilingState: function setProfilingState(configPathOrObject, state, label, nextStepMessage) {
|
|
914
916
|
var _this4 = this;
|
|
915
917
|
|
|
916
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
918
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
917
919
|
var finalConfig, keys, host, port, basePath, protocol, cafile, applicationId, proxy, utc, jscramblerVersion, clientId, accessKey, secretKey, client, instrumentation, previousState;
|
|
918
|
-
return
|
|
920
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
919
921
|
while (1) {
|
|
920
922
|
switch (_context6.prev = _context6.next) {
|
|
921
923
|
case 0:
|
|
@@ -983,10 +985,10 @@ var _default = {
|
|
|
983
985
|
downloadSourceMaps: function downloadSourceMaps(configs, destCallback) {
|
|
984
986
|
var _this5 = this;
|
|
985
987
|
|
|
986
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
988
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
987
989
|
var keys, host, port, basePath, protocol, cafile, _configs$stream, stream, filesDest, filesSrc, protectionId, jscramblerVersion, utc, proxy, accessKey, secretKey, client, download;
|
|
988
990
|
|
|
989
|
-
return
|
|
991
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
990
992
|
while (1) {
|
|
991
993
|
switch (_context7.prev = _context7.next) {
|
|
992
994
|
case 0:
|
|
@@ -1054,10 +1056,10 @@ var _default = {
|
|
|
1054
1056
|
downloadSymbolTable: function downloadSymbolTable(configs, destCallback) {
|
|
1055
1057
|
var _this6 = this;
|
|
1056
1058
|
|
|
1057
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1059
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
1058
1060
|
var keys, host, port, basePath, protocol, cafile, _configs$stream2, stream, filesDest, filesSrc, protectionId, jscramblerVersion, utc, proxy, accessKey, secretKey, client, download;
|
|
1059
1061
|
|
|
1060
|
-
return
|
|
1062
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
1061
1063
|
while (1) {
|
|
1062
1064
|
switch (_context8.prev = _context8.next) {
|
|
1063
1065
|
case 0:
|
|
@@ -1137,18 +1139,18 @@ var _default = {
|
|
|
1137
1139
|
pollInstrumentation: function pollInstrumentation(client, instrumentationId) {
|
|
1138
1140
|
var _this7 = this;
|
|
1139
1141
|
|
|
1140
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1142
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
1141
1143
|
var start, poll;
|
|
1142
|
-
return
|
|
1144
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1143
1145
|
while (1) {
|
|
1144
1146
|
switch (_context10.prev = _context10.next) {
|
|
1145
1147
|
case 0:
|
|
1146
1148
|
start = Date.now();
|
|
1147
1149
|
|
|
1148
1150
|
poll = /*#__PURE__*/function () {
|
|
1149
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
|
1151
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
1150
1152
|
var instrumentation;
|
|
1151
|
-
return
|
|
1153
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1152
1154
|
while (1) {
|
|
1153
1155
|
switch (_context9.prev = _context9.next) {
|
|
1154
1156
|
case 0:
|
|
@@ -1208,9 +1210,9 @@ var _default = {
|
|
|
1208
1210
|
}))();
|
|
1209
1211
|
},
|
|
1210
1212
|
withRetries: function withRetries(action) {
|
|
1211
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1213
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
1212
1214
|
var retriesLeft;
|
|
1213
|
-
return
|
|
1215
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1214
1216
|
while (1) {
|
|
1215
1217
|
switch (_context11.prev = _context11.next) {
|
|
1216
1218
|
case 0:
|
|
@@ -1266,18 +1268,18 @@ var _default = {
|
|
|
1266
1268
|
pollProtection: function pollProtection(client, applicationId, protectionId, fragments) {
|
|
1267
1269
|
var _this8 = this;
|
|
1268
1270
|
|
|
1269
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1271
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
1270
1272
|
var start, poll;
|
|
1271
|
-
return
|
|
1273
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1272
1274
|
while (1) {
|
|
1273
1275
|
switch (_context13.prev = _context13.next) {
|
|
1274
1276
|
case 0:
|
|
1275
1277
|
start = Date.now();
|
|
1276
1278
|
|
|
1277
1279
|
poll = /*#__PURE__*/function () {
|
|
1278
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
|
1280
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
1279
1281
|
var applicationProtection, state;
|
|
1280
|
-
return
|
|
1282
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
1281
1283
|
while (1) {
|
|
1282
1284
|
switch (_context12.prev = _context12.next) {
|
|
1283
1285
|
case 0:
|
|
@@ -1350,9 +1352,9 @@ var _default = {
|
|
|
1350
1352
|
pollProtections: function pollProtections(client, applicationId, protectionIds, fragments) {
|
|
1351
1353
|
var _this9 = this;
|
|
1352
1354
|
|
|
1353
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1355
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
1354
1356
|
var start, seen, poll;
|
|
1355
|
-
return
|
|
1357
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
1356
1358
|
while (1) {
|
|
1357
1359
|
switch (_context15.prev = _context15.next) {
|
|
1358
1360
|
case 0:
|
|
@@ -1373,9 +1375,9 @@ var _default = {
|
|
|
1373
1375
|
seen = {};
|
|
1374
1376
|
|
|
1375
1377
|
poll = /*#__PURE__*/function () {
|
|
1376
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/
|
|
1378
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
1377
1379
|
var applicationProtections, ended;
|
|
1378
|
-
return
|
|
1380
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1379
1381
|
while (1) {
|
|
1380
1382
|
switch (_context14.prev = _context14.next) {
|
|
1381
1383
|
case 0:
|
|
@@ -1457,8 +1459,8 @@ var _default = {
|
|
|
1457
1459
|
},
|
|
1458
1460
|
//
|
|
1459
1461
|
createApplication: function createApplication(client, data, fragments) {
|
|
1460
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1461
|
-
return
|
|
1462
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
1463
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
1462
1464
|
while (1) {
|
|
1463
1465
|
switch (_context16.prev = _context16.next) {
|
|
1464
1466
|
case 0:
|
|
@@ -1474,8 +1476,8 @@ var _default = {
|
|
|
1474
1476
|
},
|
|
1475
1477
|
//
|
|
1476
1478
|
duplicateApplication: function duplicateApplication(client, data, fragments) {
|
|
1477
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1478
|
-
return
|
|
1479
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
1480
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
1479
1481
|
while (1) {
|
|
1480
1482
|
switch (_context17.prev = _context17.next) {
|
|
1481
1483
|
case 0:
|
|
@@ -1491,8 +1493,8 @@ var _default = {
|
|
|
1491
1493
|
},
|
|
1492
1494
|
//
|
|
1493
1495
|
removeApplication: function removeApplication(client, id) {
|
|
1494
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1495
|
-
return
|
|
1496
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1497
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1496
1498
|
while (1) {
|
|
1497
1499
|
switch (_context18.prev = _context18.next) {
|
|
1498
1500
|
case 0:
|
|
@@ -1508,8 +1510,8 @@ var _default = {
|
|
|
1508
1510
|
},
|
|
1509
1511
|
//
|
|
1510
1512
|
removeProtection: function removeProtection(client, id, appId, fragments) {
|
|
1511
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1512
|
-
return
|
|
1513
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
1514
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
1513
1515
|
while (1) {
|
|
1514
1516
|
switch (_context19.prev = _context19.next) {
|
|
1515
1517
|
case 0:
|
|
@@ -1525,9 +1527,9 @@ var _default = {
|
|
|
1525
1527
|
},
|
|
1526
1528
|
//
|
|
1527
1529
|
cancelProtection: function cancelProtection(client, id, appId, fragments) {
|
|
1528
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1530
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
1529
1531
|
var mutation;
|
|
1530
|
-
return
|
|
1532
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
1531
1533
|
while (1) {
|
|
1532
1534
|
switch (_context20.prev = _context20.next) {
|
|
1533
1535
|
case 0:
|
|
@@ -1548,9 +1550,9 @@ var _default = {
|
|
|
1548
1550
|
},
|
|
1549
1551
|
//
|
|
1550
1552
|
updateApplication: function updateApplication(client, application, fragments) {
|
|
1551
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1553
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
1552
1554
|
var mutation;
|
|
1553
|
-
return
|
|
1555
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
1554
1556
|
while (1) {
|
|
1555
1557
|
switch (_context21.prev = _context21.next) {
|
|
1556
1558
|
case 0:
|
|
@@ -1571,9 +1573,9 @@ var _default = {
|
|
|
1571
1573
|
},
|
|
1572
1574
|
//
|
|
1573
1575
|
unlockApplication: function unlockApplication(client, application, fragments) {
|
|
1574
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1576
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
1575
1577
|
var mutation;
|
|
1576
|
-
return
|
|
1578
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
1577
1579
|
while (1) {
|
|
1578
1580
|
switch (_context22.prev = _context22.next) {
|
|
1579
1581
|
case 0:
|
|
@@ -1594,9 +1596,9 @@ var _default = {
|
|
|
1594
1596
|
},
|
|
1595
1597
|
//
|
|
1596
1598
|
getApplication: function getApplication(client, applicationId, fragments, params) {
|
|
1597
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1599
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
1598
1600
|
var query;
|
|
1599
|
-
return
|
|
1601
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
1600
1602
|
while (1) {
|
|
1601
1603
|
switch (_context23.prev = _context23.next) {
|
|
1602
1604
|
case 0:
|
|
@@ -1617,9 +1619,9 @@ var _default = {
|
|
|
1617
1619
|
},
|
|
1618
1620
|
//
|
|
1619
1621
|
getApplicationSource: function getApplicationSource(client, sourceId, fragments, limits) {
|
|
1620
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1622
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
1621
1623
|
var query;
|
|
1622
|
-
return
|
|
1624
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
1623
1625
|
while (1) {
|
|
1624
1626
|
switch (_context24.prev = _context24.next) {
|
|
1625
1627
|
case 0:
|
|
@@ -1640,9 +1642,9 @@ var _default = {
|
|
|
1640
1642
|
},
|
|
1641
1643
|
//
|
|
1642
1644
|
getApplicationProtections: function getApplicationProtections(client, applicationId, params, fragments, queryArgs) {
|
|
1643
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1645
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
1644
1646
|
var query;
|
|
1645
|
-
return
|
|
1647
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
1646
1648
|
while (1) {
|
|
1647
1649
|
switch (_context25.prev = _context25.next) {
|
|
1648
1650
|
case 0:
|
|
@@ -1659,9 +1661,9 @@ var _default = {
|
|
|
1659
1661
|
},
|
|
1660
1662
|
//
|
|
1661
1663
|
getApplicationProtectionsCount: function getApplicationProtectionsCount(client, applicationId, fragments) {
|
|
1662
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1664
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
1663
1665
|
var query;
|
|
1664
|
-
return
|
|
1666
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
1665
1667
|
while (1) {
|
|
1666
1668
|
switch (_context26.prev = _context26.next) {
|
|
1667
1669
|
case 0:
|
|
@@ -1682,9 +1684,9 @@ var _default = {
|
|
|
1682
1684
|
},
|
|
1683
1685
|
//
|
|
1684
1686
|
createTemplate: function createTemplate(client, template, fragments) {
|
|
1685
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1687
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
1686
1688
|
var mutation;
|
|
1687
|
-
return
|
|
1689
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
1688
1690
|
while (1) {
|
|
1689
1691
|
switch (_context27.prev = _context27.next) {
|
|
1690
1692
|
case 0:
|
|
@@ -1705,9 +1707,9 @@ var _default = {
|
|
|
1705
1707
|
},
|
|
1706
1708
|
//
|
|
1707
1709
|
removeTemplate: function removeTemplate(client, id) {
|
|
1708
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1710
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
1709
1711
|
var mutation;
|
|
1710
|
-
return
|
|
1712
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
1711
1713
|
while (1) {
|
|
1712
1714
|
switch (_context28.prev = _context28.next) {
|
|
1713
1715
|
case 0:
|
|
@@ -1728,9 +1730,9 @@ var _default = {
|
|
|
1728
1730
|
},
|
|
1729
1731
|
//
|
|
1730
1732
|
getTemplates: function getTemplates(client, fragments) {
|
|
1731
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1733
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
1732
1734
|
var query;
|
|
1733
|
-
return
|
|
1735
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
1734
1736
|
while (1) {
|
|
1735
1737
|
switch (_context29.prev = _context29.next) {
|
|
1736
1738
|
case 0:
|
|
@@ -1751,9 +1753,9 @@ var _default = {
|
|
|
1751
1753
|
},
|
|
1752
1754
|
//
|
|
1753
1755
|
getApplications: function getApplications(client, fragments, params) {
|
|
1754
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1756
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
1755
1757
|
var query;
|
|
1756
|
-
return
|
|
1758
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
1757
1759
|
while (1) {
|
|
1758
1760
|
switch (_context30.prev = _context30.next) {
|
|
1759
1761
|
case 0:
|
|
@@ -1776,9 +1778,9 @@ var _default = {
|
|
|
1776
1778
|
addApplicationSource: function addApplicationSource(client, applicationId, applicationSource, fragments) {
|
|
1777
1779
|
var _this10 = this;
|
|
1778
1780
|
|
|
1779
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1781
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
1780
1782
|
var mutation;
|
|
1781
|
-
return
|
|
1783
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
1782
1784
|
while (1) {
|
|
1783
1785
|
switch (_context31.prev = _context31.next) {
|
|
1784
1786
|
case 0:
|
|
@@ -1801,9 +1803,9 @@ var _default = {
|
|
|
1801
1803
|
},
|
|
1802
1804
|
//
|
|
1803
1805
|
addApplicationSourceFromURL: function addApplicationSourceFromURL(client, applicationId, url, fragments) {
|
|
1804
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1806
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
1805
1807
|
var file, mutation;
|
|
1806
|
-
return
|
|
1808
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
1807
1809
|
while (1) {
|
|
1808
1810
|
switch (_context32.prev = _context32.next) {
|
|
1809
1811
|
case 0:
|
|
@@ -1829,9 +1831,9 @@ var _default = {
|
|
|
1829
1831
|
},
|
|
1830
1832
|
//
|
|
1831
1833
|
updateApplicationSource: function updateApplicationSource(client, applicationSource, fragments) {
|
|
1832
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1834
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
|
|
1833
1835
|
var mutation;
|
|
1834
|
-
return
|
|
1836
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
1835
1837
|
while (1) {
|
|
1836
1838
|
switch (_context33.prev = _context33.next) {
|
|
1837
1839
|
case 0:
|
|
@@ -1854,9 +1856,9 @@ var _default = {
|
|
|
1854
1856
|
removeSourceFromApplication: function removeSourceFromApplication(client, sourceId, applicationId, fragments) {
|
|
1855
1857
|
var _this11 = this;
|
|
1856
1858
|
|
|
1857
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1859
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
|
|
1858
1860
|
var mutation;
|
|
1859
|
-
return
|
|
1861
|
+
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
|
|
1860
1862
|
while (1) {
|
|
1861
1863
|
switch (_context34.prev = _context34.next) {
|
|
1862
1864
|
case 0:
|
|
@@ -1879,9 +1881,9 @@ var _default = {
|
|
|
1879
1881
|
},
|
|
1880
1882
|
//
|
|
1881
1883
|
applyTemplate: function applyTemplate(client, templateId, appId, fragments) {
|
|
1882
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1884
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
|
|
1883
1885
|
var mutation;
|
|
1884
|
-
return
|
|
1886
|
+
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
|
|
1885
1887
|
while (1) {
|
|
1886
1888
|
switch (_context35.prev = _context35.next) {
|
|
1887
1889
|
case 0:
|
|
@@ -1902,9 +1904,9 @@ var _default = {
|
|
|
1902
1904
|
},
|
|
1903
1905
|
//
|
|
1904
1906
|
updateTemplate: function updateTemplate(client, template, fragments) {
|
|
1905
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1907
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
|
|
1906
1908
|
var mutation;
|
|
1907
|
-
return
|
|
1909
|
+
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
|
|
1908
1910
|
while (1) {
|
|
1909
1911
|
switch (_context36.prev = _context36.next) {
|
|
1910
1912
|
case 0:
|
|
@@ -1924,8 +1926,8 @@ var _default = {
|
|
|
1924
1926
|
}))();
|
|
1925
1927
|
},
|
|
1926
1928
|
getApplicationProfiling: function getApplicationProfiling(client, applicationId) {
|
|
1927
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1928
|
-
return
|
|
1929
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() {
|
|
1930
|
+
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
|
|
1929
1931
|
while (1) {
|
|
1930
1932
|
switch (_context37.prev = _context37.next) {
|
|
1931
1933
|
case 0:
|
|
@@ -1942,8 +1944,8 @@ var _default = {
|
|
|
1942
1944
|
}))();
|
|
1943
1945
|
},
|
|
1944
1946
|
deleteProfiling: function deleteProfiling(client, profilingId) {
|
|
1945
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1946
|
-
return
|
|
1947
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
|
|
1948
|
+
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
|
|
1947
1949
|
while (1) {
|
|
1948
1950
|
switch (_context38.prev = _context38.next) {
|
|
1949
1951
|
case 0:
|
|
@@ -1970,9 +1972,9 @@ var _default = {
|
|
|
1970
1972
|
startInstrumentation: function startInstrumentation(client, applicationId) {
|
|
1971
1973
|
var _this12 = this;
|
|
1972
1974
|
|
|
1973
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1975
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
|
|
1974
1976
|
var instrumentation;
|
|
1975
|
-
return
|
|
1977
|
+
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
|
|
1976
1978
|
while (1) {
|
|
1977
1979
|
switch (_context39.prev = _context39.next) {
|
|
1978
1980
|
case 0:
|
|
@@ -2007,10 +2009,10 @@ var _default = {
|
|
|
2007
2009
|
},
|
|
2008
2010
|
//
|
|
2009
2011
|
createApplicationProtection: function createApplicationProtection(client, applicationId, protectionOptions, fragments) {
|
|
2010
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2012
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
|
|
2011
2013
|
var _yield$introspection$, args, mutation;
|
|
2012
2014
|
|
|
2013
|
-
return
|
|
2015
|
+
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
|
|
2014
2016
|
while (1) {
|
|
2015
2017
|
switch (_context40.prev = _context40.next) {
|
|
2016
2018
|
case 0:
|
|
@@ -2048,9 +2050,9 @@ var _default = {
|
|
|
2048
2050
|
createApplicationProtections: function createApplicationProtections(client, applicationId, protectionOptions, fragments) {
|
|
2049
2051
|
var _this13 = this;
|
|
2050
2052
|
|
|
2051
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2053
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() {
|
|
2052
2054
|
var result, mutationType, mutation;
|
|
2053
|
-
return
|
|
2055
|
+
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
|
|
2054
2056
|
while (1) {
|
|
2055
2057
|
switch (_context41.prev = _context41.next) {
|
|
2056
2058
|
case 0:
|
|
@@ -2121,8 +2123,8 @@ var _default = {
|
|
|
2121
2123
|
* @returns {Promise<object>}
|
|
2122
2124
|
*/
|
|
2123
2125
|
getInstrumentation: function getInstrumentation(client, instrumentationId) {
|
|
2124
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2125
|
-
return
|
|
2126
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42() {
|
|
2127
|
+
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
|
|
2126
2128
|
while (1) {
|
|
2127
2129
|
switch (_context42.prev = _context42.next) {
|
|
2128
2130
|
case 0:
|
|
@@ -2138,9 +2140,9 @@ var _default = {
|
|
|
2138
2140
|
},
|
|
2139
2141
|
//
|
|
2140
2142
|
getApplicationProtection: function getApplicationProtection(client, applicationId, protectionId, fragments) {
|
|
2141
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2143
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43() {
|
|
2142
2144
|
var query;
|
|
2143
|
-
return
|
|
2145
|
+
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
|
|
2144
2146
|
while (1) {
|
|
2145
2147
|
switch (_context43.prev = _context43.next) {
|
|
2146
2148
|
case 0:
|
|
@@ -2161,8 +2163,8 @@ var _default = {
|
|
|
2161
2163
|
},
|
|
2162
2164
|
//
|
|
2163
2165
|
downloadSourceMapsRequest: function downloadSourceMapsRequest(client, protectionId) {
|
|
2164
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2165
|
-
return
|
|
2166
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44() {
|
|
2167
|
+
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
|
|
2166
2168
|
while (1) {
|
|
2167
2169
|
switch (_context44.prev = _context44.next) {
|
|
2168
2170
|
case 0:
|
|
@@ -2177,8 +2179,8 @@ var _default = {
|
|
|
2177
2179
|
}))();
|
|
2178
2180
|
},
|
|
2179
2181
|
downloadSymbolTableRequest: function downloadSymbolTableRequest(client, protectionId) {
|
|
2180
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2181
|
-
return
|
|
2182
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45() {
|
|
2183
|
+
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
|
|
2182
2184
|
while (1) {
|
|
2183
2185
|
switch (_context45.prev = _context45.next) {
|
|
2184
2186
|
case 0:
|
|
@@ -2194,8 +2196,8 @@ var _default = {
|
|
|
2194
2196
|
},
|
|
2195
2197
|
//
|
|
2196
2198
|
downloadApplicationProtection: function downloadApplicationProtection(client, protectionId) {
|
|
2197
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2198
|
-
return
|
|
2199
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46() {
|
|
2200
|
+
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
|
|
2199
2201
|
while (1) {
|
|
2200
2202
|
switch (_context46.prev = _context46.next) {
|
|
2201
2203
|
case 0:
|
|
@@ -2230,9 +2232,9 @@ var _default = {
|
|
|
2230
2232
|
introspectFieldOnMethod: function introspectFieldOnMethod(config, queryOrMutation, methodName, field) {
|
|
2231
2233
|
var _this14 = this;
|
|
2232
2234
|
|
|
2233
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2235
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
|
|
2234
2236
|
var instrospectionType, client, result, dataArg, isFieldSupported;
|
|
2235
|
-
return
|
|
2237
|
+
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
|
|
2236
2238
|
while (1) {
|
|
2237
2239
|
switch (_context47.prev = _context47.next) {
|
|
2238
2240
|
case 0:
|
package/dist/introspection.js
CHANGED
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.intoObjectType = intoObjectType;
|
|
7
7
|
exports.mutation = mutation;
|
|
8
8
|
exports.query = query;
|
|
9
|
-
exports.
|
|
9
|
+
exports.type = type;
|
|
10
10
|
|
|
11
11
|
var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
|
|
12
12
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
|
|
15
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
16
|
+
|
|
17
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
18
|
+
|
|
15
19
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
16
20
|
|
|
17
21
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -23,10 +27,10 @@ function type(_x, _x2) {
|
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
function _type() {
|
|
26
|
-
_type = _asyncToGenerator( /*#__PURE__*/
|
|
30
|
+
_type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(client, name) {
|
|
27
31
|
var jscramblerVersion, query, res, __type;
|
|
28
32
|
|
|
29
|
-
return
|
|
33
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
30
34
|
while (1) {
|
|
31
35
|
switch (_context.prev = _context.next) {
|
|
32
36
|
case 0:
|
|
@@ -74,9 +78,9 @@ function mutation(_x3, _x4) {
|
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
function _mutation() {
|
|
77
|
-
_mutation = _asyncToGenerator( /*#__PURE__*/
|
|
81
|
+
_mutation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(client, name) {
|
|
78
82
|
var rootMutation, mutationType;
|
|
79
|
-
return
|
|
83
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
80
84
|
while (1) {
|
|
81
85
|
switch (_context2.prev = _context2.next) {
|
|
82
86
|
case 0:
|
|
@@ -105,9 +109,9 @@ function query(_x5, _x6) {
|
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
function _query() {
|
|
108
|
-
_query = _asyncToGenerator( /*#__PURE__*/
|
|
112
|
+
_query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(client, name) {
|
|
109
113
|
var rootQuery, queryType;
|
|
110
|
-
return
|
|
114
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
111
115
|
while (1) {
|
|
112
116
|
switch (_context3.prev = _context3.next) {
|
|
113
117
|
case 0:
|
|
@@ -136,9 +140,9 @@ function intoObjectType(_x7, _x8, _x9) {
|
|
|
136
140
|
}
|
|
137
141
|
|
|
138
142
|
function _intoObjectType() {
|
|
139
|
-
_intoObjectType = _asyncToGenerator( /*#__PURE__*/
|
|
143
|
+
_intoObjectType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(client, obj, name) {
|
|
140
144
|
var fields, finalObj, keys;
|
|
141
|
-
return
|
|
145
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
142
146
|
while (1) {
|
|
143
147
|
switch (_context5.prev = _context5.next) {
|
|
144
148
|
case 0:
|
|
@@ -151,9 +155,9 @@ function _intoObjectType() {
|
|
|
151
155
|
keys = Object.keys(obj);
|
|
152
156
|
_context5.next = 7;
|
|
153
157
|
return Promise.all(keys.map( /*#__PURE__*/function () {
|
|
154
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
|
158
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(k) {
|
|
155
159
|
var field;
|
|
156
|
-
return
|
|
160
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
157
161
|
while (1) {
|
|
158
162
|
switch (_context4.prev = _context4.next) {
|
|
159
163
|
case 0:
|
package/dist/mutations.js
CHANGED
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.addApplicationSource = addApplicationSource;
|
|
7
|
+
exports.applyTemplate = applyTemplate;
|
|
8
|
+
exports.cancelProtection = cancelProtection;
|
|
6
9
|
exports.createApplication = createApplication;
|
|
10
|
+
exports.createApplicationProtection = createApplicationProtection;
|
|
11
|
+
exports.createApplicationProtections = createApplicationProtections;
|
|
12
|
+
exports.createTemplate = createTemplate;
|
|
7
13
|
exports.duplicateApplication = duplicateApplication;
|
|
8
14
|
exports.removeApplication = removeApplication;
|
|
9
15
|
exports.removeProtection = removeProtection;
|
|
10
|
-
exports.cancelProtection = cancelProtection;
|
|
11
|
-
exports.updateApplication = updateApplication;
|
|
12
|
-
exports.unlockApplication = unlockApplication;
|
|
13
|
-
exports.addApplicationSource = addApplicationSource;
|
|
14
|
-
exports.updateApplicationSource = updateApplicationSource;
|
|
15
16
|
exports.removeSourceFromApplication = removeSourceFromApplication;
|
|
16
|
-
exports.createTemplate = createTemplate;
|
|
17
17
|
exports.removeTemplate = removeTemplate;
|
|
18
|
+
exports.unlockApplication = unlockApplication;
|
|
19
|
+
exports.updateApplication = updateApplication;
|
|
20
|
+
exports.updateApplicationSource = updateApplicationSource;
|
|
18
21
|
exports.updateTemplate = updateTemplate;
|
|
19
|
-
exports.createApplicationProtection = createApplicationProtection;
|
|
20
|
-
exports.createApplicationProtections = createApplicationProtections;
|
|
21
|
-
exports.applyTemplate = applyTemplate;
|
|
22
22
|
|
|
23
23
|
var _cleanupInputFields3 = _interopRequireDefault(require("./cleanup-input-fields"));
|
|
24
24
|
|
package/dist/queries.js
CHANGED
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getApplication = getApplication;
|
|
7
|
-
exports.getApplicationSource = getApplicationSource;
|
|
8
7
|
exports.getApplicationProtections = getApplicationProtections;
|
|
9
8
|
exports.getApplicationProtectionsCount = getApplicationProtectionsCount;
|
|
10
|
-
exports.
|
|
9
|
+
exports.getApplicationSource = getApplicationSource;
|
|
11
10
|
exports.getApplications = getApplications;
|
|
12
11
|
exports.getProtection = getProtection;
|
|
12
|
+
exports.getTemplates = getTemplates;
|
|
13
13
|
|
|
14
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
14
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
15
15
|
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
16
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
17
|
|
|
18
18
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
19
|
|
package/dist/zip.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.zip = zip;
|
|
7
|
-
exports.zipSources = zipSources;
|
|
8
|
-
exports.unzip = unzip;
|
|
9
8
|
Object.defineProperty(exports, "outputFileSync", {
|
|
10
9
|
enumerable: true,
|
|
11
10
|
get: function get() {
|
|
12
11
|
return _fsExtra.outputFileSync;
|
|
13
12
|
}
|
|
14
13
|
});
|
|
14
|
+
exports.unzip = unzip;
|
|
15
|
+
exports.zip = zip;
|
|
16
|
+
exports.zipSources = zipSources;
|
|
15
17
|
|
|
16
18
|
var _lodash = _interopRequireDefault(require("lodash.size"));
|
|
17
19
|
|
|
@@ -29,6 +31,8 @@ var _util = require("util");
|
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
34
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
35
|
+
|
|
32
36
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
33
37
|
|
|
34
38
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -52,10 +56,10 @@ function zip(_x, _x2) {
|
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
function _zip() {
|
|
55
|
-
_zip = _asyncToGenerator( /*#__PURE__*/
|
|
59
|
+
_zip = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(files, cwd) {
|
|
56
60
|
var deferred, hasFiles, _zip2, zipFile, _zip3, i, l, buffer, name, sPath;
|
|
57
61
|
|
|
58
|
-
return
|
|
62
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
59
63
|
while (1) {
|
|
60
64
|
switch (_context.prev = _context.next) {
|
|
61
65
|
case 0:
|
|
@@ -212,7 +216,7 @@ function unzip(_x3, _x4) {
|
|
|
212
216
|
}
|
|
213
217
|
|
|
214
218
|
function _unzip() {
|
|
215
|
-
_unzip = _asyncToGenerator( /*#__PURE__*/
|
|
219
|
+
_unzip = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(zipFile, dest) {
|
|
216
220
|
var stream,
|
|
217
221
|
zip,
|
|
218
222
|
_size,
|
|
@@ -224,7 +228,7 @@ function _unzip() {
|
|
|
224
228
|
_file,
|
|
225
229
|
_args2 = arguments;
|
|
226
230
|
|
|
227
|
-
return
|
|
231
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
228
232
|
while (1) {
|
|
229
233
|
switch (_context2.prev = _context2.next) {
|
|
230
234
|
case 0:
|
|
@@ -236,7 +240,7 @@ function _unzip() {
|
|
|
236
240
|
case 4:
|
|
237
241
|
_size = (0, _lodash.default)(zip.files);
|
|
238
242
|
results = [];
|
|
239
|
-
_context2.t0 =
|
|
243
|
+
_context2.t0 = _regeneratorRuntime().keys(zip.files);
|
|
240
244
|
|
|
241
245
|
case 7:
|
|
242
246
|
if ((_context2.t1 = _context2.t0()).done) {
|