jscrambler 6.2.1 → 6.2.4
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/README.md +1 -0
- package/dist/bin/jscrambler.js +14 -7
- package/dist/client.js +3 -3
- package/dist/get-protection-default-fragments.js +6 -4
- package/dist/index.js +120 -117
- package/dist/introspection.js +14 -10
- package/dist/zip.js +9 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -129,6 +129,7 @@ Options:
|
|
|
129
129
|
--debugMode Protect in debug mode
|
|
130
130
|
--skip-sources Prevent source files from being updated
|
|
131
131
|
--force-app-environment <environment> (version 7.1 and above) Override application's environment detected automatically. Possible values: node,browser,isomorphic,automatic
|
|
132
|
+
--ensure-code-annotation <bool> Fail protection if no annotations are found on the source code (default: false)
|
|
132
133
|
-n <number> (version 7.2 and above) Create multiple protections at once.
|
|
133
134
|
-h, --help output usage information
|
|
134
135
|
```
|
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,6 +21,8 @@ var _utils = require("../utils");
|
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
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
|
+
|
|
22
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
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; }
|
|
@@ -80,7 +84,7 @@ var validateForceAppEnvironment = function validateForceAppEnvironment(env) {
|
|
|
80
84
|
return normalizeEnvironment;
|
|
81
85
|
};
|
|
82
86
|
|
|
83
|
-
_commander.default.version(require('../../package.json').version).usage('[options] <file ...>').option('-a, --access-key <accessKey>', 'Access key').option('-c, --config <config>', 'Jscrambler configuration options').option('-H, --host <host>', 'Hostname').option('-i, --application-id <id>', 'Application ID').option('-o, --output-dir <dir>', 'Output directory').option('-p, --port <port>', 'Port').option('--base-path <path>', 'Base Path').option('--protocol <protocol>', 'Protocol (http or https)').option('--cafile <path>', 'Internal certificate authority').option('-C, --cwd <dir>', 'Current Working Directory').option('-s, --secret-key <secretKey>', 'Secret key').option('-m, --source-maps <id>', 'Download source maps').option('-R, --randomization-seed <seed>', 'Set randomization seed').option('--instrument', 'Instrument file(s) before start profiling. ATTENTION: previous profiling information will be deleted').option('--start-profiling', 'Starts profiling (assumes an already instrumented application)').option('--stop-profiling', 'Stops profiling').option('--code-hardening-threshold <threshold>', 'Set code hardening file size threshold. Format: {value}{unit="b,kb,mb"}. Example: 200kb', validateCodeHardeningThreshold).option('--recommended-order <bool>', 'Use recommended order', validateBool('recommended-order')).option('-W, --werror <bool>', 'Set werror flag value (default: true)', validateBool('werror')).option('--utc <bool>', 'Set UTC as the request time zone. Otherwise it uses the local time zone (default: true)', validateBool('utc')).option('--tolerate-minification <bool>', "Don't detect minification as malicious tampering (default: true)", validateBool('tolerate-minification')).option('--use-profiling-data <bool>', "(version 6.2 only) Protection should use the existing profiling data (default: true)", validateBool('use-profiling-data')).option('--profiling-data-mode <mode>', "(version 6.3 and above) Select profiling mode (default: automatic)", validateProfilingDataMode).option('--remove-profiling-data', "Removes the current application profiling information").option('--use-app-classification <bool>', '(version 6.3 and above) Protection should use Application Classification metadata when protecting (default: true)', validateBool('--use-app-classification')).option('--input-symbol-table <file>', '(version 6.3 and above) Protection should use symbol table when protecting. (default: no file)').option('--output-symbol-table <id>', '(version 6.3 and above) Download output symbol table (json)').option('--jscramblerVersion <version>', 'Use a specific Jscrambler version').option('--debugMode', 'Protect in debug mode').option('--skip-sources', 'Prevent source files from being updated').option('--force-app-environment <environment>', "(version 7.1 and above) Override application's environment detected automatically. Possible values: ".concat(availableEnvironments.toString()), validateForceAppEnvironment).option('-n <number>', "(version 7.2 and above) Create multiple protections at once.").parse(process.argv);
|
|
87
|
+
_commander.default.version(require('../../package.json').version).usage('[options] <file ...>').option('-a, --access-key <accessKey>', 'Access key').option('-c, --config <config>', 'Jscrambler configuration options').option('-H, --host <host>', 'Hostname').option('-i, --application-id <id>', 'Application ID').option('-o, --output-dir <dir>', 'Output directory').option('-p, --port <port>', 'Port').option('--base-path <path>', 'Base Path').option('--protocol <protocol>', 'Protocol (http or https)').option('--cafile <path>', 'Internal certificate authority').option('-C, --cwd <dir>', 'Current Working Directory').option('-s, --secret-key <secretKey>', 'Secret key').option('-m, --source-maps <id>', 'Download source maps').option('-R, --randomization-seed <seed>', 'Set randomization seed').option('--instrument', 'Instrument file(s) before start profiling. ATTENTION: previous profiling information will be deleted').option('--start-profiling', 'Starts profiling (assumes an already instrumented application)').option('--stop-profiling', 'Stops profiling').option('--code-hardening-threshold <threshold>', 'Set code hardening file size threshold. Format: {value}{unit="b,kb,mb"}. Example: 200kb', validateCodeHardeningThreshold).option('--recommended-order <bool>', 'Use recommended order', validateBool('recommended-order')).option('-W, --werror <bool>', 'Set werror flag value (default: true)', validateBool('werror')).option('--utc <bool>', 'Set UTC as the request time zone. Otherwise it uses the local time zone (default: true)', validateBool('utc')).option('--tolerate-minification <bool>', "Don't detect minification as malicious tampering (default: true)", validateBool('tolerate-minification')).option('--use-profiling-data <bool>', "(version 6.2 only) Protection should use the existing profiling data (default: true)", validateBool('use-profiling-data')).option('--profiling-data-mode <mode>', "(version 6.3 and above) Select profiling mode (default: automatic)", validateProfilingDataMode).option('--remove-profiling-data', "Removes the current application profiling information").option('--use-app-classification <bool>', '(version 6.3 and above) Protection should use Application Classification metadata when protecting (default: true)', validateBool('--use-app-classification')).option('--input-symbol-table <file>', '(version 6.3 and above) Protection should use symbol table when protecting. (default: no file)').option('--output-symbol-table <id>', '(version 6.3 and above) Download output symbol table (json)').option('--jscramblerVersion <version>', 'Use a specific Jscrambler version').option('--debugMode', 'Protect in debug mode').option('--skip-sources', 'Prevent source files from being updated').option('--force-app-environment <environment>', "(version 7.1 and above) Override application's environment detected automatically. Possible values: ".concat(availableEnvironments.toString()), validateForceAppEnvironment).option('--ensure-code-annotation <bool>', "Fail protection if no annotations are found on the source code (default: false)", validateBool('ensure-code-annotation')).option('-n <number>', "(version 7.2 and above) Create multiple protections at once.").parse(process.argv);
|
|
84
88
|
|
|
85
89
|
var globSrc, filesSrc, config; // If -c, --config file was provided
|
|
86
90
|
|
|
@@ -105,6 +109,7 @@ config.applicationId = _commander.default.applicationId || config.applicationId;
|
|
|
105
109
|
config.randomizationSeed = _commander.default.randomizationSeed || config.randomizationSeed;
|
|
106
110
|
config.cwd = _commander.default.cwd || config.cwd;
|
|
107
111
|
config.useRecommendedOrder = _commander.default.recommendedOrder ? _commander.default.recommendedOrder !== 'false' : config.useRecommendedOrder;
|
|
112
|
+
config.ensureCodeAnnotation = _commander.default.ensureCodeAnnotation ? _commander.default.ensureCodeAnnotation !== 'false' : config.ensureCodeAnnotation;
|
|
108
113
|
config.tolerateMinification = _commander.default.tolerateMinification ? _commander.default.tolerateMinification !== 'false' : config.tolerateMinification;
|
|
109
114
|
config.werror = _commander.default.werror ? _commander.default.werror !== 'false' : config.werror;
|
|
110
115
|
config.jscramblerVersion = _commander.default.jscramblerVersion || config.jscramblerVersion;
|
|
@@ -243,6 +248,7 @@ var _config2 = config,
|
|
|
243
248
|
entryPoint = _config2.entryPoint,
|
|
244
249
|
excludeList = _config2.excludeList,
|
|
245
250
|
numberOfProtections = _config2.numberOfProtections,
|
|
251
|
+
ensureCodeAnnotation = _config2.ensureCodeAnnotation,
|
|
246
252
|
forceAppEnvironment = _config2.forceAppEnvironment;
|
|
247
253
|
var params = (0, _cli.mergeAndParseParams)(_commander.default, config.params);
|
|
248
254
|
var incompatibleOptions = ['sourceMaps', 'instrument', 'startProfiling', 'stopProfiling'];
|
|
@@ -278,8 +284,8 @@ var clientSettings = {
|
|
|
278
284
|
|
|
279
285
|
if (_commander.default.sourceMaps) {
|
|
280
286
|
// Go, go, go download
|
|
281
|
-
_asyncToGenerator( /*#__PURE__*/
|
|
282
|
-
return
|
|
287
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
288
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
283
289
|
while (1) {
|
|
284
290
|
switch (_context.prev = _context.next) {
|
|
285
291
|
case 0:
|
|
@@ -310,8 +316,8 @@ if (_commander.default.sourceMaps) {
|
|
|
310
316
|
}))();
|
|
311
317
|
} else if (_commander.default.outputSymbolTable) {
|
|
312
318
|
// Go, go, go download
|
|
313
|
-
_asyncToGenerator( /*#__PURE__*/
|
|
314
|
-
return
|
|
319
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
320
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
315
321
|
while (1) {
|
|
316
322
|
switch (_context2.prev = _context2.next) {
|
|
317
323
|
case 0:
|
|
@@ -367,9 +373,9 @@ if (_commander.default.sourceMaps) {
|
|
|
367
373
|
});
|
|
368
374
|
} else {
|
|
369
375
|
// Go, go, go
|
|
370
|
-
_asyncToGenerator( /*#__PURE__*/
|
|
376
|
+
_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
371
377
|
var protectAndDownloadOptions;
|
|
372
|
-
return
|
|
378
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
373
379
|
while (1) {
|
|
374
380
|
switch (_context3.prev = _context3.next) {
|
|
375
381
|
case 0:
|
|
@@ -397,6 +403,7 @@ if (_commander.default.sourceMaps) {
|
|
|
397
403
|
inputSymbolTable: inputSymbolTable,
|
|
398
404
|
entryPoint: entryPoint,
|
|
399
405
|
excludeList: excludeList,
|
|
406
|
+
ensureCodeAnnotation: ensureCodeAnnotation,
|
|
400
407
|
numberOfProtections: numberOfProtections,
|
|
401
408
|
forceAppEnvironment: forceAppEnvironment
|
|
402
409
|
});
|
package/dist/client.js
CHANGED
|
@@ -54,15 +54,15 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
54
54
|
|
|
55
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); }
|
|
56
56
|
|
|
57
|
-
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); }
|
|
58
58
|
|
|
59
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; } }
|
|
60
60
|
|
|
61
61
|
function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
|
|
62
62
|
|
|
63
|
-
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); }
|
|
64
64
|
|
|
65
|
-
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); }
|
|
66
66
|
|
|
67
67
|
var debug = !!process.env.DEBUG;
|
|
68
68
|
var metrics = !!process.env.METRICS;
|
|
@@ -11,6 +11,8 @@ 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 _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
|
+
|
|
14
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); } }
|
|
@@ -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
|
@@ -63,6 +63,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
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,16 +324,16 @@ var _default = {
|
|
|
322
324
|
protectAndDownload: function protectAndDownload(configPathOrObject, destCallback) {
|
|
323
325
|
var _this2 = this;
|
|
324
326
|
|
|
325
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
326
|
-
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
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
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, _finalConfig$ensureCo, ensureCodeAnnotation, 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:
|
|
332
334
|
start = Date.now();
|
|
333
335
|
finalConfig = buildFinalConfig(configPathOrObject);
|
|
334
|
-
applicationId = finalConfig.applicationId, host = finalConfig.host, port = finalConfig.port, basePath = finalConfig.basePath, protocol = finalConfig.protocol, cafile = finalConfig.cafile, keys = finalConfig.keys, sources = finalConfig.sources, _finalConfig$stream = finalConfig.stream, stream = _finalConfig$stream === void 0 ? true : _finalConfig$stream, cwd = finalConfig.cwd, params = finalConfig.params, applicationTypes = finalConfig.applicationTypes, languageSpecifications = finalConfig.languageSpecifications, sourceMaps = finalConfig.sourceMaps, randomizationSeed = finalConfig.randomizationSeed, areSubscribersOrdered = finalConfig.areSubscribersOrdered, useRecommendedOrder = finalConfig.useRecommendedOrder, _finalConfig$bail = finalConfig.bail, bail = _finalConfig$bail === void 0 ? true : _finalConfig$bail, jscramblerVersion = finalConfig.jscramblerVersion, debugMode = finalConfig.debugMode, proxy = finalConfig.proxy, utc = finalConfig.utc, clientId = finalConfig.clientId, tolerateMinification = finalConfig.tolerateMinification, codeHardeningThreshold = finalConfig.codeHardeningThreshold, useProfilingData = finalConfig.useProfilingData, browsers = finalConfig.browsers, useAppClassification = finalConfig.useAppClassification, profilingDataMode = finalConfig.profilingDataMode, removeProfilingData = finalConfig.removeProfilingData, skipSources = finalConfig.skipSources, inputSymbolTable = finalConfig.inputSymbolTable, entryPoint = finalConfig.entryPoint, excludeList = finalConfig.excludeList, numberOfProtections = finalConfig.numberOfProtections, forceAppEnvironment = finalConfig.forceAppEnvironment;
|
|
336
|
+
applicationId = finalConfig.applicationId, host = finalConfig.host, port = finalConfig.port, basePath = finalConfig.basePath, protocol = finalConfig.protocol, cafile = finalConfig.cafile, keys = finalConfig.keys, sources = finalConfig.sources, _finalConfig$stream = finalConfig.stream, stream = _finalConfig$stream === void 0 ? true : _finalConfig$stream, cwd = finalConfig.cwd, params = finalConfig.params, applicationTypes = finalConfig.applicationTypes, languageSpecifications = finalConfig.languageSpecifications, sourceMaps = finalConfig.sourceMaps, randomizationSeed = finalConfig.randomizationSeed, areSubscribersOrdered = finalConfig.areSubscribersOrdered, useRecommendedOrder = finalConfig.useRecommendedOrder, _finalConfig$bail = finalConfig.bail, bail = _finalConfig$bail === void 0 ? true : _finalConfig$bail, jscramblerVersion = finalConfig.jscramblerVersion, debugMode = finalConfig.debugMode, proxy = finalConfig.proxy, utc = finalConfig.utc, clientId = finalConfig.clientId, tolerateMinification = finalConfig.tolerateMinification, codeHardeningThreshold = finalConfig.codeHardeningThreshold, useProfilingData = finalConfig.useProfilingData, browsers = finalConfig.browsers, useAppClassification = finalConfig.useAppClassification, profilingDataMode = finalConfig.profilingDataMode, removeProfilingData = finalConfig.removeProfilingData, skipSources = finalConfig.skipSources, inputSymbolTable = finalConfig.inputSymbolTable, entryPoint = finalConfig.entryPoint, excludeList = finalConfig.excludeList, numberOfProtections = finalConfig.numberOfProtections, _finalConfig$ensureCo = finalConfig.ensureCodeAnnotation, ensureCodeAnnotation = _finalConfig$ensureCo === void 0 ? false : _finalConfig$ensureCo, forceAppEnvironment = finalConfig.forceAppEnvironment;
|
|
335
337
|
accessKey = keys.accessKey, secretKey = keys.secretKey;
|
|
336
338
|
client = new _this2.Client({
|
|
337
339
|
accessKey: accessKey,
|
|
@@ -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:
|
|
@@ -435,6 +443,7 @@ var _default = {
|
|
|
435
443
|
profilingDataMode: profilingDataMode,
|
|
436
444
|
sourceMaps: sourceMaps,
|
|
437
445
|
useAppClassification: useAppClassification,
|
|
446
|
+
ensureCodeAnnotation: ensureCodeAnnotation,
|
|
438
447
|
useProfilingData: useProfilingData,
|
|
439
448
|
useRecommendedOrder: useRecommendedOrder
|
|
440
449
|
};
|
|
@@ -512,9 +521,9 @@ var _default = {
|
|
|
512
521
|
});
|
|
513
522
|
|
|
514
523
|
onExitCancelProtection = /*#__PURE__*/function () {
|
|
515
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
|
524
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
516
525
|
var i, protectionId;
|
|
517
|
-
return
|
|
526
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
518
527
|
while (1) {
|
|
519
528
|
switch (_context2.prev = _context2.next) {
|
|
520
529
|
case 0:
|
|
@@ -583,7 +592,7 @@ var _default = {
|
|
|
583
592
|
process.removeListener('SIGINT', onExitCancelProtection).removeListener('SIGTERM', onExitCancelProtection);
|
|
584
593
|
|
|
585
594
|
handleProtection = /*#__PURE__*/function () {
|
|
586
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
|
595
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(protection) {
|
|
587
596
|
var _ref5,
|
|
588
597
|
_ref5$outPrefix,
|
|
589
598
|
outPrefix,
|
|
@@ -593,7 +602,7 @@ var _default = {
|
|
|
593
602
|
download,
|
|
594
603
|
_args3 = arguments;
|
|
595
604
|
|
|
596
|
-
return
|
|
605
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
597
606
|
while (1) {
|
|
598
607
|
switch (_context3.prev = _context3.next) {
|
|
599
608
|
case 0:
|
|
@@ -766,10 +775,10 @@ var _default = {
|
|
|
766
775
|
instrumentAndDownload: function instrumentAndDownload(configPathOrObject, destCallback) {
|
|
767
776
|
var _this3 = this;
|
|
768
777
|
|
|
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,
|
|
778
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
779
|
+
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
780
|
|
|
772
|
-
return
|
|
781
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
773
782
|
while (1) {
|
|
774
783
|
switch (_context5.prev = _context5.next) {
|
|
775
784
|
case 0:
|
|
@@ -816,7 +825,7 @@ var _default = {
|
|
|
816
825
|
|
|
817
826
|
case 11:
|
|
818
827
|
if (skipSources) {
|
|
819
|
-
_context5.next =
|
|
828
|
+
_context5.next = 16;
|
|
820
829
|
break;
|
|
821
830
|
}
|
|
822
831
|
|
|
@@ -828,23 +837,17 @@ var _default = {
|
|
|
828
837
|
});
|
|
829
838
|
|
|
830
839
|
case 14:
|
|
831
|
-
|
|
832
|
-
updateApplicationSourcePromise = _yield$_this3$updateA.promise;
|
|
833
|
-
_context5.next = 18;
|
|
834
|
-
return updateApplicationSourcePromise;
|
|
835
|
-
|
|
836
|
-
case 18:
|
|
837
|
-
_context5.next = 21;
|
|
840
|
+
_context5.next = 17;
|
|
838
841
|
break;
|
|
839
842
|
|
|
840
|
-
case
|
|
843
|
+
case 16:
|
|
841
844
|
console.log('Update source files SKIPPED');
|
|
842
845
|
|
|
843
|
-
case
|
|
844
|
-
_context5.next =
|
|
846
|
+
case 17:
|
|
847
|
+
_context5.next = 19;
|
|
845
848
|
return _this3.startInstrumentation(client, applicationId);
|
|
846
849
|
|
|
847
|
-
case
|
|
850
|
+
case 19:
|
|
848
851
|
instrumentation = _context5.sent;
|
|
849
852
|
errorHandler(instrumentation);
|
|
850
853
|
|
|
@@ -859,10 +862,10 @@ var _default = {
|
|
|
859
862
|
};
|
|
860
863
|
|
|
861
864
|
process.once('SIGINT', onExitCancelInstrumentation).once('SIGTERM', onExitCancelInstrumentation);
|
|
862
|
-
_context5.next =
|
|
865
|
+
_context5.next = 25;
|
|
863
866
|
return _this3.pollInstrumentation(client, instrumentation.data.id);
|
|
864
867
|
|
|
865
|
-
case
|
|
868
|
+
case 25:
|
|
866
869
|
instrumentation = _context5.sent;
|
|
867
870
|
process.removeListener('SIGINT', onExitCancelInstrumentation).removeListener('SIGTERM', onExitCancelInstrumentation);
|
|
868
871
|
|
|
@@ -870,10 +873,10 @@ var _default = {
|
|
|
870
873
|
console.log("Finished instrumention with id ".concat(instrumentation.data.id, ". Downloading..."));
|
|
871
874
|
}
|
|
872
875
|
|
|
873
|
-
_context5.next =
|
|
876
|
+
_context5.next = 30;
|
|
874
877
|
return _this3.downloadApplicationInstrumented(client, instrumentation.data.id);
|
|
875
878
|
|
|
876
|
-
case
|
|
879
|
+
case 30:
|
|
877
880
|
download = _context5.sent;
|
|
878
881
|
errorHandler(download);
|
|
879
882
|
|
|
@@ -881,10 +884,10 @@ var _default = {
|
|
|
881
884
|
console.log('Unzipping files');
|
|
882
885
|
}
|
|
883
886
|
|
|
884
|
-
_context5.next =
|
|
887
|
+
_context5.next = 35;
|
|
885
888
|
return (0, _zip.unzip)(download, filesDest || destCallback, stream);
|
|
886
889
|
|
|
887
|
-
case
|
|
890
|
+
case 35:
|
|
888
891
|
if (debug) {
|
|
889
892
|
console.log('Finished unzipping files');
|
|
890
893
|
}
|
|
@@ -893,7 +896,7 @@ var _default = {
|
|
|
893
896
|
console.log("Application ".concat(applicationId, " was instrumented. Bootstrap your instrumented application and run *--start-profiling* command."));
|
|
894
897
|
return _context5.abrupt("return", instrumentation.data.id);
|
|
895
898
|
|
|
896
|
-
case
|
|
899
|
+
case 39:
|
|
897
900
|
case "end":
|
|
898
901
|
return _context5.stop();
|
|
899
902
|
}
|
|
@@ -913,9 +916,9 @@ var _default = {
|
|
|
913
916
|
setProfilingState: function setProfilingState(configPathOrObject, state, label, nextStepMessage) {
|
|
914
917
|
var _this4 = this;
|
|
915
918
|
|
|
916
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
919
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
|
917
920
|
var finalConfig, keys, host, port, basePath, protocol, cafile, applicationId, proxy, utc, jscramblerVersion, clientId, accessKey, secretKey, client, instrumentation, previousState;
|
|
918
|
-
return
|
|
921
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
919
922
|
while (1) {
|
|
920
923
|
switch (_context6.prev = _context6.next) {
|
|
921
924
|
case 0:
|
|
@@ -983,10 +986,10 @@ var _default = {
|
|
|
983
986
|
downloadSourceMaps: function downloadSourceMaps(configs, destCallback) {
|
|
984
987
|
var _this5 = this;
|
|
985
988
|
|
|
986
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
989
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
|
987
990
|
var keys, host, port, basePath, protocol, cafile, _configs$stream, stream, filesDest, filesSrc, protectionId, jscramblerVersion, utc, proxy, accessKey, secretKey, client, download;
|
|
988
991
|
|
|
989
|
-
return
|
|
992
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
990
993
|
while (1) {
|
|
991
994
|
switch (_context7.prev = _context7.next) {
|
|
992
995
|
case 0:
|
|
@@ -1054,10 +1057,10 @@ var _default = {
|
|
|
1054
1057
|
downloadSymbolTable: function downloadSymbolTable(configs, destCallback) {
|
|
1055
1058
|
var _this6 = this;
|
|
1056
1059
|
|
|
1057
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1060
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
|
1058
1061
|
var keys, host, port, basePath, protocol, cafile, _configs$stream2, stream, filesDest, filesSrc, protectionId, jscramblerVersion, utc, proxy, accessKey, secretKey, client, download;
|
|
1059
1062
|
|
|
1060
|
-
return
|
|
1063
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
1061
1064
|
while (1) {
|
|
1062
1065
|
switch (_context8.prev = _context8.next) {
|
|
1063
1066
|
case 0:
|
|
@@ -1137,18 +1140,18 @@ var _default = {
|
|
|
1137
1140
|
pollInstrumentation: function pollInstrumentation(client, instrumentationId) {
|
|
1138
1141
|
var _this7 = this;
|
|
1139
1142
|
|
|
1140
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1143
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
|
|
1141
1144
|
var start, poll;
|
|
1142
|
-
return
|
|
1145
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1143
1146
|
while (1) {
|
|
1144
1147
|
switch (_context10.prev = _context10.next) {
|
|
1145
1148
|
case 0:
|
|
1146
1149
|
start = Date.now();
|
|
1147
1150
|
|
|
1148
1151
|
poll = /*#__PURE__*/function () {
|
|
1149
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
|
1152
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
|
1150
1153
|
var instrumentation;
|
|
1151
|
-
return
|
|
1154
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
1152
1155
|
while (1) {
|
|
1153
1156
|
switch (_context9.prev = _context9.next) {
|
|
1154
1157
|
case 0:
|
|
@@ -1208,9 +1211,9 @@ var _default = {
|
|
|
1208
1211
|
}))();
|
|
1209
1212
|
},
|
|
1210
1213
|
withRetries: function withRetries(action) {
|
|
1211
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1214
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
|
|
1212
1215
|
var retriesLeft;
|
|
1213
|
-
return
|
|
1216
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1214
1217
|
while (1) {
|
|
1215
1218
|
switch (_context11.prev = _context11.next) {
|
|
1216
1219
|
case 0:
|
|
@@ -1266,18 +1269,18 @@ var _default = {
|
|
|
1266
1269
|
pollProtection: function pollProtection(client, applicationId, protectionId, fragments) {
|
|
1267
1270
|
var _this8 = this;
|
|
1268
1271
|
|
|
1269
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1272
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
|
|
1270
1273
|
var start, poll;
|
|
1271
|
-
return
|
|
1274
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1272
1275
|
while (1) {
|
|
1273
1276
|
switch (_context13.prev = _context13.next) {
|
|
1274
1277
|
case 0:
|
|
1275
1278
|
start = Date.now();
|
|
1276
1279
|
|
|
1277
1280
|
poll = /*#__PURE__*/function () {
|
|
1278
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
|
1281
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
|
|
1279
1282
|
var applicationProtection, state;
|
|
1280
|
-
return
|
|
1283
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
1281
1284
|
while (1) {
|
|
1282
1285
|
switch (_context12.prev = _context12.next) {
|
|
1283
1286
|
case 0:
|
|
@@ -1350,9 +1353,9 @@ var _default = {
|
|
|
1350
1353
|
pollProtections: function pollProtections(client, applicationId, protectionIds, fragments) {
|
|
1351
1354
|
var _this9 = this;
|
|
1352
1355
|
|
|
1353
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1356
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
|
|
1354
1357
|
var start, seen, poll;
|
|
1355
|
-
return
|
|
1358
|
+
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
|
|
1356
1359
|
while (1) {
|
|
1357
1360
|
switch (_context15.prev = _context15.next) {
|
|
1358
1361
|
case 0:
|
|
@@ -1373,9 +1376,9 @@ var _default = {
|
|
|
1373
1376
|
seen = {};
|
|
1374
1377
|
|
|
1375
1378
|
poll = /*#__PURE__*/function () {
|
|
1376
|
-
var _ref8 = _asyncToGenerator( /*#__PURE__*/
|
|
1379
|
+
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
|
|
1377
1380
|
var applicationProtections, ended;
|
|
1378
|
-
return
|
|
1381
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1379
1382
|
while (1) {
|
|
1380
1383
|
switch (_context14.prev = _context14.next) {
|
|
1381
1384
|
case 0:
|
|
@@ -1457,8 +1460,8 @@ var _default = {
|
|
|
1457
1460
|
},
|
|
1458
1461
|
//
|
|
1459
1462
|
createApplication: function createApplication(client, data, fragments) {
|
|
1460
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1461
|
-
return
|
|
1463
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
|
|
1464
|
+
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
|
|
1462
1465
|
while (1) {
|
|
1463
1466
|
switch (_context16.prev = _context16.next) {
|
|
1464
1467
|
case 0:
|
|
@@ -1474,8 +1477,8 @@ var _default = {
|
|
|
1474
1477
|
},
|
|
1475
1478
|
//
|
|
1476
1479
|
duplicateApplication: function duplicateApplication(client, data, fragments) {
|
|
1477
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1478
|
-
return
|
|
1480
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
|
|
1481
|
+
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
|
|
1479
1482
|
while (1) {
|
|
1480
1483
|
switch (_context17.prev = _context17.next) {
|
|
1481
1484
|
case 0:
|
|
@@ -1491,8 +1494,8 @@ var _default = {
|
|
|
1491
1494
|
},
|
|
1492
1495
|
//
|
|
1493
1496
|
removeApplication: function removeApplication(client, id) {
|
|
1494
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1495
|
-
return
|
|
1497
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
|
|
1498
|
+
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
|
|
1496
1499
|
while (1) {
|
|
1497
1500
|
switch (_context18.prev = _context18.next) {
|
|
1498
1501
|
case 0:
|
|
@@ -1508,8 +1511,8 @@ var _default = {
|
|
|
1508
1511
|
},
|
|
1509
1512
|
//
|
|
1510
1513
|
removeProtection: function removeProtection(client, id, appId, fragments) {
|
|
1511
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1512
|
-
return
|
|
1514
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
|
|
1515
|
+
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
|
|
1513
1516
|
while (1) {
|
|
1514
1517
|
switch (_context19.prev = _context19.next) {
|
|
1515
1518
|
case 0:
|
|
@@ -1525,9 +1528,9 @@ var _default = {
|
|
|
1525
1528
|
},
|
|
1526
1529
|
//
|
|
1527
1530
|
cancelProtection: function cancelProtection(client, id, appId, fragments) {
|
|
1528
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1531
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
|
|
1529
1532
|
var mutation;
|
|
1530
|
-
return
|
|
1533
|
+
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
|
|
1531
1534
|
while (1) {
|
|
1532
1535
|
switch (_context20.prev = _context20.next) {
|
|
1533
1536
|
case 0:
|
|
@@ -1548,9 +1551,9 @@ var _default = {
|
|
|
1548
1551
|
},
|
|
1549
1552
|
//
|
|
1550
1553
|
updateApplication: function updateApplication(client, application, fragments) {
|
|
1551
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1554
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
|
|
1552
1555
|
var mutation;
|
|
1553
|
-
return
|
|
1556
|
+
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
|
|
1554
1557
|
while (1) {
|
|
1555
1558
|
switch (_context21.prev = _context21.next) {
|
|
1556
1559
|
case 0:
|
|
@@ -1571,9 +1574,9 @@ var _default = {
|
|
|
1571
1574
|
},
|
|
1572
1575
|
//
|
|
1573
1576
|
unlockApplication: function unlockApplication(client, application, fragments) {
|
|
1574
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1577
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
|
|
1575
1578
|
var mutation;
|
|
1576
|
-
return
|
|
1579
|
+
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
|
|
1577
1580
|
while (1) {
|
|
1578
1581
|
switch (_context22.prev = _context22.next) {
|
|
1579
1582
|
case 0:
|
|
@@ -1594,9 +1597,9 @@ var _default = {
|
|
|
1594
1597
|
},
|
|
1595
1598
|
//
|
|
1596
1599
|
getApplication: function getApplication(client, applicationId, fragments, params) {
|
|
1597
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1600
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
|
|
1598
1601
|
var query;
|
|
1599
|
-
return
|
|
1602
|
+
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
|
|
1600
1603
|
while (1) {
|
|
1601
1604
|
switch (_context23.prev = _context23.next) {
|
|
1602
1605
|
case 0:
|
|
@@ -1617,9 +1620,9 @@ var _default = {
|
|
|
1617
1620
|
},
|
|
1618
1621
|
//
|
|
1619
1622
|
getApplicationSource: function getApplicationSource(client, sourceId, fragments, limits) {
|
|
1620
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1623
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
|
|
1621
1624
|
var query;
|
|
1622
|
-
return
|
|
1625
|
+
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
|
|
1623
1626
|
while (1) {
|
|
1624
1627
|
switch (_context24.prev = _context24.next) {
|
|
1625
1628
|
case 0:
|
|
@@ -1640,9 +1643,9 @@ var _default = {
|
|
|
1640
1643
|
},
|
|
1641
1644
|
//
|
|
1642
1645
|
getApplicationProtections: function getApplicationProtections(client, applicationId, params, fragments, queryArgs) {
|
|
1643
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1646
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
|
|
1644
1647
|
var query;
|
|
1645
|
-
return
|
|
1648
|
+
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
|
|
1646
1649
|
while (1) {
|
|
1647
1650
|
switch (_context25.prev = _context25.next) {
|
|
1648
1651
|
case 0:
|
|
@@ -1659,9 +1662,9 @@ var _default = {
|
|
|
1659
1662
|
},
|
|
1660
1663
|
//
|
|
1661
1664
|
getApplicationProtectionsCount: function getApplicationProtectionsCount(client, applicationId, fragments) {
|
|
1662
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1665
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
|
|
1663
1666
|
var query;
|
|
1664
|
-
return
|
|
1667
|
+
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
|
|
1665
1668
|
while (1) {
|
|
1666
1669
|
switch (_context26.prev = _context26.next) {
|
|
1667
1670
|
case 0:
|
|
@@ -1682,9 +1685,9 @@ var _default = {
|
|
|
1682
1685
|
},
|
|
1683
1686
|
//
|
|
1684
1687
|
createTemplate: function createTemplate(client, template, fragments) {
|
|
1685
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1688
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
|
|
1686
1689
|
var mutation;
|
|
1687
|
-
return
|
|
1690
|
+
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
|
|
1688
1691
|
while (1) {
|
|
1689
1692
|
switch (_context27.prev = _context27.next) {
|
|
1690
1693
|
case 0:
|
|
@@ -1705,9 +1708,9 @@ var _default = {
|
|
|
1705
1708
|
},
|
|
1706
1709
|
//
|
|
1707
1710
|
removeTemplate: function removeTemplate(client, id) {
|
|
1708
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1711
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
|
|
1709
1712
|
var mutation;
|
|
1710
|
-
return
|
|
1713
|
+
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
|
|
1711
1714
|
while (1) {
|
|
1712
1715
|
switch (_context28.prev = _context28.next) {
|
|
1713
1716
|
case 0:
|
|
@@ -1728,9 +1731,9 @@ var _default = {
|
|
|
1728
1731
|
},
|
|
1729
1732
|
//
|
|
1730
1733
|
getTemplates: function getTemplates(client, fragments) {
|
|
1731
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1734
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
|
|
1732
1735
|
var query;
|
|
1733
|
-
return
|
|
1736
|
+
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
|
|
1734
1737
|
while (1) {
|
|
1735
1738
|
switch (_context29.prev = _context29.next) {
|
|
1736
1739
|
case 0:
|
|
@@ -1751,9 +1754,9 @@ var _default = {
|
|
|
1751
1754
|
},
|
|
1752
1755
|
//
|
|
1753
1756
|
getApplications: function getApplications(client, fragments, params) {
|
|
1754
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1757
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
|
|
1755
1758
|
var query;
|
|
1756
|
-
return
|
|
1759
|
+
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
|
|
1757
1760
|
while (1) {
|
|
1758
1761
|
switch (_context30.prev = _context30.next) {
|
|
1759
1762
|
case 0:
|
|
@@ -1776,9 +1779,9 @@ var _default = {
|
|
|
1776
1779
|
addApplicationSource: function addApplicationSource(client, applicationId, applicationSource, fragments) {
|
|
1777
1780
|
var _this10 = this;
|
|
1778
1781
|
|
|
1779
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1782
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
|
|
1780
1783
|
var mutation;
|
|
1781
|
-
return
|
|
1784
|
+
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
|
|
1782
1785
|
while (1) {
|
|
1783
1786
|
switch (_context31.prev = _context31.next) {
|
|
1784
1787
|
case 0:
|
|
@@ -1801,9 +1804,9 @@ var _default = {
|
|
|
1801
1804
|
},
|
|
1802
1805
|
//
|
|
1803
1806
|
addApplicationSourceFromURL: function addApplicationSourceFromURL(client, applicationId, url, fragments) {
|
|
1804
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1807
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
|
|
1805
1808
|
var file, mutation;
|
|
1806
|
-
return
|
|
1809
|
+
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
|
|
1807
1810
|
while (1) {
|
|
1808
1811
|
switch (_context32.prev = _context32.next) {
|
|
1809
1812
|
case 0:
|
|
@@ -1829,9 +1832,9 @@ var _default = {
|
|
|
1829
1832
|
},
|
|
1830
1833
|
//
|
|
1831
1834
|
updateApplicationSource: function updateApplicationSource(client, applicationSource, fragments) {
|
|
1832
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1835
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
|
|
1833
1836
|
var mutation;
|
|
1834
|
-
return
|
|
1837
|
+
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
|
|
1835
1838
|
while (1) {
|
|
1836
1839
|
switch (_context33.prev = _context33.next) {
|
|
1837
1840
|
case 0:
|
|
@@ -1854,9 +1857,9 @@ var _default = {
|
|
|
1854
1857
|
removeSourceFromApplication: function removeSourceFromApplication(client, sourceId, applicationId, fragments) {
|
|
1855
1858
|
var _this11 = this;
|
|
1856
1859
|
|
|
1857
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1860
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
|
|
1858
1861
|
var mutation;
|
|
1859
|
-
return
|
|
1862
|
+
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
|
|
1860
1863
|
while (1) {
|
|
1861
1864
|
switch (_context34.prev = _context34.next) {
|
|
1862
1865
|
case 0:
|
|
@@ -1879,9 +1882,9 @@ var _default = {
|
|
|
1879
1882
|
},
|
|
1880
1883
|
//
|
|
1881
1884
|
applyTemplate: function applyTemplate(client, templateId, appId, fragments) {
|
|
1882
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1885
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
|
|
1883
1886
|
var mutation;
|
|
1884
|
-
return
|
|
1887
|
+
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
|
|
1885
1888
|
while (1) {
|
|
1886
1889
|
switch (_context35.prev = _context35.next) {
|
|
1887
1890
|
case 0:
|
|
@@ -1902,9 +1905,9 @@ var _default = {
|
|
|
1902
1905
|
},
|
|
1903
1906
|
//
|
|
1904
1907
|
updateTemplate: function updateTemplate(client, template, fragments) {
|
|
1905
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1908
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
|
|
1906
1909
|
var mutation;
|
|
1907
|
-
return
|
|
1910
|
+
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
|
|
1908
1911
|
while (1) {
|
|
1909
1912
|
switch (_context36.prev = _context36.next) {
|
|
1910
1913
|
case 0:
|
|
@@ -1924,8 +1927,8 @@ var _default = {
|
|
|
1924
1927
|
}))();
|
|
1925
1928
|
},
|
|
1926
1929
|
getApplicationProfiling: function getApplicationProfiling(client, applicationId) {
|
|
1927
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1928
|
-
return
|
|
1930
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() {
|
|
1931
|
+
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
|
|
1929
1932
|
while (1) {
|
|
1930
1933
|
switch (_context37.prev = _context37.next) {
|
|
1931
1934
|
case 0:
|
|
@@ -1942,8 +1945,8 @@ var _default = {
|
|
|
1942
1945
|
}))();
|
|
1943
1946
|
},
|
|
1944
1947
|
deleteProfiling: function deleteProfiling(client, profilingId) {
|
|
1945
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1946
|
-
return
|
|
1948
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
|
|
1949
|
+
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
|
|
1947
1950
|
while (1) {
|
|
1948
1951
|
switch (_context38.prev = _context38.next) {
|
|
1949
1952
|
case 0:
|
|
@@ -1970,9 +1973,9 @@ var _default = {
|
|
|
1970
1973
|
startInstrumentation: function startInstrumentation(client, applicationId) {
|
|
1971
1974
|
var _this12 = this;
|
|
1972
1975
|
|
|
1973
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
1976
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
|
|
1974
1977
|
var instrumentation;
|
|
1975
|
-
return
|
|
1978
|
+
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
|
|
1976
1979
|
while (1) {
|
|
1977
1980
|
switch (_context39.prev = _context39.next) {
|
|
1978
1981
|
case 0:
|
|
@@ -2007,10 +2010,10 @@ var _default = {
|
|
|
2007
2010
|
},
|
|
2008
2011
|
//
|
|
2009
2012
|
createApplicationProtection: function createApplicationProtection(client, applicationId, protectionOptions, fragments) {
|
|
2010
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2013
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
|
|
2011
2014
|
var _yield$introspection$, args, mutation;
|
|
2012
2015
|
|
|
2013
|
-
return
|
|
2016
|
+
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
|
|
2014
2017
|
while (1) {
|
|
2015
2018
|
switch (_context40.prev = _context40.next) {
|
|
2016
2019
|
case 0:
|
|
@@ -2048,9 +2051,9 @@ var _default = {
|
|
|
2048
2051
|
createApplicationProtections: function createApplicationProtections(client, applicationId, protectionOptions, fragments) {
|
|
2049
2052
|
var _this13 = this;
|
|
2050
2053
|
|
|
2051
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2054
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() {
|
|
2052
2055
|
var result, mutationType, mutation;
|
|
2053
|
-
return
|
|
2056
|
+
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
|
|
2054
2057
|
while (1) {
|
|
2055
2058
|
switch (_context41.prev = _context41.next) {
|
|
2056
2059
|
case 0:
|
|
@@ -2121,8 +2124,8 @@ var _default = {
|
|
|
2121
2124
|
* @returns {Promise<object>}
|
|
2122
2125
|
*/
|
|
2123
2126
|
getInstrumentation: function getInstrumentation(client, instrumentationId) {
|
|
2124
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2125
|
-
return
|
|
2127
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42() {
|
|
2128
|
+
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
|
|
2126
2129
|
while (1) {
|
|
2127
2130
|
switch (_context42.prev = _context42.next) {
|
|
2128
2131
|
case 0:
|
|
@@ -2138,9 +2141,9 @@ var _default = {
|
|
|
2138
2141
|
},
|
|
2139
2142
|
//
|
|
2140
2143
|
getApplicationProtection: function getApplicationProtection(client, applicationId, protectionId, fragments) {
|
|
2141
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2144
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43() {
|
|
2142
2145
|
var query;
|
|
2143
|
-
return
|
|
2146
|
+
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
|
|
2144
2147
|
while (1) {
|
|
2145
2148
|
switch (_context43.prev = _context43.next) {
|
|
2146
2149
|
case 0:
|
|
@@ -2161,8 +2164,8 @@ var _default = {
|
|
|
2161
2164
|
},
|
|
2162
2165
|
//
|
|
2163
2166
|
downloadSourceMapsRequest: function downloadSourceMapsRequest(client, protectionId) {
|
|
2164
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2165
|
-
return
|
|
2167
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44() {
|
|
2168
|
+
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
|
|
2166
2169
|
while (1) {
|
|
2167
2170
|
switch (_context44.prev = _context44.next) {
|
|
2168
2171
|
case 0:
|
|
@@ -2177,8 +2180,8 @@ var _default = {
|
|
|
2177
2180
|
}))();
|
|
2178
2181
|
},
|
|
2179
2182
|
downloadSymbolTableRequest: function downloadSymbolTableRequest(client, protectionId) {
|
|
2180
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2181
|
-
return
|
|
2183
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45() {
|
|
2184
|
+
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
|
|
2182
2185
|
while (1) {
|
|
2183
2186
|
switch (_context45.prev = _context45.next) {
|
|
2184
2187
|
case 0:
|
|
@@ -2194,8 +2197,8 @@ var _default = {
|
|
|
2194
2197
|
},
|
|
2195
2198
|
//
|
|
2196
2199
|
downloadApplicationProtection: function downloadApplicationProtection(client, protectionId) {
|
|
2197
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2198
|
-
return
|
|
2200
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46() {
|
|
2201
|
+
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
|
|
2199
2202
|
while (1) {
|
|
2200
2203
|
switch (_context46.prev = _context46.next) {
|
|
2201
2204
|
case 0:
|
|
@@ -2230,9 +2233,9 @@ var _default = {
|
|
|
2230
2233
|
introspectFieldOnMethod: function introspectFieldOnMethod(config, queryOrMutation, methodName, field) {
|
|
2231
2234
|
var _this14 = this;
|
|
2232
2235
|
|
|
2233
|
-
return _asyncToGenerator( /*#__PURE__*/
|
|
2236
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
|
|
2234
2237
|
var instrospectionType, client, result, dataArg, isFieldSupported;
|
|
2235
|
-
return
|
|
2238
|
+
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
|
|
2236
2239
|
while (1) {
|
|
2237
2240
|
switch (_context47.prev = _context47.next) {
|
|
2238
2241
|
case 0:
|
package/dist/introspection.js
CHANGED
|
@@ -12,6 +12,10 @@ 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/zip.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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
|
});
|
|
@@ -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) {
|