jscrambler 6.2.2 → 6.2.5

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 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
  ```
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
 
4
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
5
+
4
6
  var _commander = _interopRequireDefault(require("commander"));
5
7
 
6
8
  var _lodash = _interopRequireDefault(require("lodash.defaults"));
@@ -19,9 +21,11 @@ var _utils = require("../utils");
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
24
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
25
+
26
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
23
27
 
24
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
28
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
25
29
 
26
30
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
31
 
@@ -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__*/regeneratorRuntime.mark(function _callee() {
282
- return regeneratorRuntime.wrap(function _callee$(_context) {
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__*/regeneratorRuntime.mark(function _callee2() {
314
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
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__*/regeneratorRuntime.mark(function _callee3() {
376
+ _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
371
377
  var protectAndDownloadOptions;
372
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
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
  });
@@ -24,6 +24,6 @@ function cleanupInputFields(args, fragments) {
24
24
  }
25
25
  }
26
26
 
27
- ['tolerateMinification', 'useProfilingData', 'useAppClassification', 'inputSymbolTable', 'entryPoint'].forEach(fieldCleanUp);
27
+ ['tolerateMinification', 'useProfilingData', 'useAppClassification', 'inputSymbolTable', 'entryPoint', 'ensureCodeAnnotation'].forEach(fieldCleanUp);
28
28
  return [options, cleanedUpFragments];
29
29
  }
package/dist/client.js CHANGED
@@ -30,17 +30,21 @@ var _package = require("../package.json");
30
30
 
31
31
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
32
32
 
33
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
33
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
34
34
 
35
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
35
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
36
36
 
37
37
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
38
38
 
39
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
39
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
40
+
41
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
42
+
43
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
40
44
 
41
45
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
42
46
 
43
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
47
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
44
48
 
45
49
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
46
50
 
@@ -50,15 +54,15 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
50
54
 
51
55
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
52
56
 
53
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
57
+ function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
54
58
 
55
59
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
56
60
 
57
61
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
58
62
 
59
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
63
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
60
64
 
61
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
65
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
62
66
 
63
67
  var debug = !!process.env.DEBUG;
64
68
  var metrics = !!process.env.METRICS;
@@ -79,7 +83,7 @@ var ClientError = /*#__PURE__*/function (_Error) {
79
83
  return _this;
80
84
  }
81
85
 
82
- return ClientError;
86
+ return _createClass(ClientError);
83
87
  }( /*#__PURE__*/_wrapNativeSuper(Error));
84
88
  /**
85
89
  * @class JScramblerClient
package/dist/constants.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CLIENT_PACKAGES = exports.CLIENT_IDS = exports.JSCRAMBLER_ERROR_CODES = exports.HTTP_STATUS_CODES = void 0;
6
+ exports.JSCRAMBLER_ERROR_CODES = exports.HTTP_STATUS_CODES = exports.CLIENT_PACKAGES = exports.CLIENT_IDS = void 0;
7
7
 
8
8
  var _Object$freeze;
9
9
 
@@ -15,7 +15,7 @@ var _lodash3 = _interopRequireDefault(require("lodash.keys"));
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
18
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
19
19
 
20
20
  var debug = !!process.env.DEBUG;
21
21
 
@@ -11,7 +11,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
11
11
 
12
12
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
13
 
14
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
14
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
15
+
16
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
15
17
 
16
18
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
17
19
 
@@ -22,10 +24,10 @@ function getIntrospection(_x, _x2) {
22
24
  }
23
25
 
24
26
  function _getIntrospection() {
25
- _getIntrospection = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(client, typeName) {
27
+ _getIntrospection = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(client, typeName) {
26
28
  var _introspection;
27
29
 
28
- return regeneratorRuntime.wrap(function _callee$(_context) {
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__*/regeneratorRuntime.mark(function _callee2(client) {
127
+ _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(client) {
126
128
  var appProtection, deprecation, source, errorMessage, fragments;
127
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
129
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
128
130
  while (1) {
129
131
  switch (_context2.prev = _context2.next) {
130
132
  case 0:
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
4
 
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
@@ -57,12 +57,14 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
57
57
 
58
58
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
59
59
 
60
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
60
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
61
61
 
62
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
62
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
63
63
 
64
64
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
65
65
 
66
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
67
+
66
68
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
67
69
 
68
70
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
@@ -156,10 +158,10 @@ var _default = {
156
158
  updateApplicationSources: function updateApplicationSources(client, applicationId, _ref) {
157
159
  var _this = this;
158
160
 
159
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
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 regeneratorRuntime.wrap(function _callee$(_context) {
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__*/regeneratorRuntime.mark(function _callee4() {
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 regeneratorRuntime.wrap(function _callee4$(_context4) {
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__*/regeneratorRuntime.mark(function _callee2() {
524
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
516
525
  var i, protectionId;
517
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
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__*/regeneratorRuntime.mark(function _callee3(protection) {
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 regeneratorRuntime.wrap(function _callee3$(_context3) {
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__*/regeneratorRuntime.mark(function _callee5() {
778
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
770
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 regeneratorRuntime.wrap(function _callee5$(_context5) {
781
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
773
782
  while (1) {
774
783
  switch (_context5.prev = _context5.next) {
775
784
  case 0:
@@ -907,9 +916,9 @@ var _default = {
907
916
  setProfilingState: function setProfilingState(configPathOrObject, state, label, nextStepMessage) {
908
917
  var _this4 = this;
909
918
 
910
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6() {
919
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
911
920
  var finalConfig, keys, host, port, basePath, protocol, cafile, applicationId, proxy, utc, jscramblerVersion, clientId, accessKey, secretKey, client, instrumentation, previousState;
912
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
921
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
913
922
  while (1) {
914
923
  switch (_context6.prev = _context6.next) {
915
924
  case 0:
@@ -977,10 +986,10 @@ var _default = {
977
986
  downloadSourceMaps: function downloadSourceMaps(configs, destCallback) {
978
987
  var _this5 = this;
979
988
 
980
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7() {
989
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
981
990
  var keys, host, port, basePath, protocol, cafile, _configs$stream, stream, filesDest, filesSrc, protectionId, jscramblerVersion, utc, proxy, accessKey, secretKey, client, download;
982
991
 
983
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
992
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
984
993
  while (1) {
985
994
  switch (_context7.prev = _context7.next) {
986
995
  case 0:
@@ -1048,10 +1057,10 @@ var _default = {
1048
1057
  downloadSymbolTable: function downloadSymbolTable(configs, destCallback) {
1049
1058
  var _this6 = this;
1050
1059
 
1051
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
1060
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
1052
1061
  var keys, host, port, basePath, protocol, cafile, _configs$stream2, stream, filesDest, filesSrc, protectionId, jscramblerVersion, utc, proxy, accessKey, secretKey, client, download;
1053
1062
 
1054
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
1063
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
1055
1064
  while (1) {
1056
1065
  switch (_context8.prev = _context8.next) {
1057
1066
  case 0:
@@ -1131,18 +1140,18 @@ var _default = {
1131
1140
  pollInstrumentation: function pollInstrumentation(client, instrumentationId) {
1132
1141
  var _this7 = this;
1133
1142
 
1134
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
1143
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
1135
1144
  var start, poll;
1136
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
1145
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
1137
1146
  while (1) {
1138
1147
  switch (_context10.prev = _context10.next) {
1139
1148
  case 0:
1140
1149
  start = Date.now();
1141
1150
 
1142
1151
  poll = /*#__PURE__*/function () {
1143
- var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
1152
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
1144
1153
  var instrumentation;
1145
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
1154
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
1146
1155
  while (1) {
1147
1156
  switch (_context9.prev = _context9.next) {
1148
1157
  case 0:
@@ -1202,9 +1211,9 @@ var _default = {
1202
1211
  }))();
1203
1212
  },
1204
1213
  withRetries: function withRetries(action) {
1205
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11() {
1214
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
1206
1215
  var retriesLeft;
1207
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
1216
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
1208
1217
  while (1) {
1209
1218
  switch (_context11.prev = _context11.next) {
1210
1219
  case 0:
@@ -1260,18 +1269,18 @@ var _default = {
1260
1269
  pollProtection: function pollProtection(client, applicationId, protectionId, fragments) {
1261
1270
  var _this8 = this;
1262
1271
 
1263
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
1272
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
1264
1273
  var start, poll;
1265
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
1274
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
1266
1275
  while (1) {
1267
1276
  switch (_context13.prev = _context13.next) {
1268
1277
  case 0:
1269
1278
  start = Date.now();
1270
1279
 
1271
1280
  poll = /*#__PURE__*/function () {
1272
- var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12() {
1281
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
1273
1282
  var applicationProtection, state;
1274
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
1283
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
1275
1284
  while (1) {
1276
1285
  switch (_context12.prev = _context12.next) {
1277
1286
  case 0:
@@ -1344,9 +1353,9 @@ var _default = {
1344
1353
  pollProtections: function pollProtections(client, applicationId, protectionIds, fragments) {
1345
1354
  var _this9 = this;
1346
1355
 
1347
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15() {
1356
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
1348
1357
  var start, seen, poll;
1349
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
1358
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
1350
1359
  while (1) {
1351
1360
  switch (_context15.prev = _context15.next) {
1352
1361
  case 0:
@@ -1367,9 +1376,9 @@ var _default = {
1367
1376
  seen = {};
1368
1377
 
1369
1378
  poll = /*#__PURE__*/function () {
1370
- var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
1379
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
1371
1380
  var applicationProtections, ended;
1372
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
1381
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
1373
1382
  while (1) {
1374
1383
  switch (_context14.prev = _context14.next) {
1375
1384
  case 0:
@@ -1451,8 +1460,8 @@ var _default = {
1451
1460
  },
1452
1461
  //
1453
1462
  createApplication: function createApplication(client, data, fragments) {
1454
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16() {
1455
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
1463
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
1464
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
1456
1465
  while (1) {
1457
1466
  switch (_context16.prev = _context16.next) {
1458
1467
  case 0:
@@ -1468,8 +1477,8 @@ var _default = {
1468
1477
  },
1469
1478
  //
1470
1479
  duplicateApplication: function duplicateApplication(client, data, fragments) {
1471
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17() {
1472
- return regeneratorRuntime.wrap(function _callee17$(_context17) {
1480
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1481
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1473
1482
  while (1) {
1474
1483
  switch (_context17.prev = _context17.next) {
1475
1484
  case 0:
@@ -1485,8 +1494,8 @@ var _default = {
1485
1494
  },
1486
1495
  //
1487
1496
  removeApplication: function removeApplication(client, id) {
1488
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18() {
1489
- return regeneratorRuntime.wrap(function _callee18$(_context18) {
1497
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
1498
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
1490
1499
  while (1) {
1491
1500
  switch (_context18.prev = _context18.next) {
1492
1501
  case 0:
@@ -1502,8 +1511,8 @@ var _default = {
1502
1511
  },
1503
1512
  //
1504
1513
  removeProtection: function removeProtection(client, id, appId, fragments) {
1505
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
1506
- return regeneratorRuntime.wrap(function _callee19$(_context19) {
1514
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
1515
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
1507
1516
  while (1) {
1508
1517
  switch (_context19.prev = _context19.next) {
1509
1518
  case 0:
@@ -1519,9 +1528,9 @@ var _default = {
1519
1528
  },
1520
1529
  //
1521
1530
  cancelProtection: function cancelProtection(client, id, appId, fragments) {
1522
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
1531
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
1523
1532
  var mutation;
1524
- return regeneratorRuntime.wrap(function _callee20$(_context20) {
1533
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1525
1534
  while (1) {
1526
1535
  switch (_context20.prev = _context20.next) {
1527
1536
  case 0:
@@ -1542,9 +1551,9 @@ var _default = {
1542
1551
  },
1543
1552
  //
1544
1553
  updateApplication: function updateApplication(client, application, fragments) {
1545
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21() {
1554
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
1546
1555
  var mutation;
1547
- return regeneratorRuntime.wrap(function _callee21$(_context21) {
1556
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
1548
1557
  while (1) {
1549
1558
  switch (_context21.prev = _context21.next) {
1550
1559
  case 0:
@@ -1565,9 +1574,9 @@ var _default = {
1565
1574
  },
1566
1575
  //
1567
1576
  unlockApplication: function unlockApplication(client, application, fragments) {
1568
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22() {
1577
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
1569
1578
  var mutation;
1570
- return regeneratorRuntime.wrap(function _callee22$(_context22) {
1579
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1571
1580
  while (1) {
1572
1581
  switch (_context22.prev = _context22.next) {
1573
1582
  case 0:
@@ -1588,9 +1597,9 @@ var _default = {
1588
1597
  },
1589
1598
  //
1590
1599
  getApplication: function getApplication(client, applicationId, fragments, params) {
1591
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee23() {
1600
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
1592
1601
  var query;
1593
- return regeneratorRuntime.wrap(function _callee23$(_context23) {
1602
+ return _regeneratorRuntime().wrap(function _callee23$(_context23) {
1594
1603
  while (1) {
1595
1604
  switch (_context23.prev = _context23.next) {
1596
1605
  case 0:
@@ -1611,9 +1620,9 @@ var _default = {
1611
1620
  },
1612
1621
  //
1613
1622
  getApplicationSource: function getApplicationSource(client, sourceId, fragments, limits) {
1614
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee24() {
1623
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
1615
1624
  var query;
1616
- return regeneratorRuntime.wrap(function _callee24$(_context24) {
1625
+ return _regeneratorRuntime().wrap(function _callee24$(_context24) {
1617
1626
  while (1) {
1618
1627
  switch (_context24.prev = _context24.next) {
1619
1628
  case 0:
@@ -1634,9 +1643,9 @@ var _default = {
1634
1643
  },
1635
1644
  //
1636
1645
  getApplicationProtections: function getApplicationProtections(client, applicationId, params, fragments, queryArgs) {
1637
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee25() {
1646
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
1638
1647
  var query;
1639
- return regeneratorRuntime.wrap(function _callee25$(_context25) {
1648
+ return _regeneratorRuntime().wrap(function _callee25$(_context25) {
1640
1649
  while (1) {
1641
1650
  switch (_context25.prev = _context25.next) {
1642
1651
  case 0:
@@ -1653,9 +1662,9 @@ var _default = {
1653
1662
  },
1654
1663
  //
1655
1664
  getApplicationProtectionsCount: function getApplicationProtectionsCount(client, applicationId, fragments) {
1656
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee26() {
1665
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
1657
1666
  var query;
1658
- return regeneratorRuntime.wrap(function _callee26$(_context26) {
1667
+ return _regeneratorRuntime().wrap(function _callee26$(_context26) {
1659
1668
  while (1) {
1660
1669
  switch (_context26.prev = _context26.next) {
1661
1670
  case 0:
@@ -1676,9 +1685,9 @@ var _default = {
1676
1685
  },
1677
1686
  //
1678
1687
  createTemplate: function createTemplate(client, template, fragments) {
1679
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee27() {
1688
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
1680
1689
  var mutation;
1681
- return regeneratorRuntime.wrap(function _callee27$(_context27) {
1690
+ return _regeneratorRuntime().wrap(function _callee27$(_context27) {
1682
1691
  while (1) {
1683
1692
  switch (_context27.prev = _context27.next) {
1684
1693
  case 0:
@@ -1699,9 +1708,9 @@ var _default = {
1699
1708
  },
1700
1709
  //
1701
1710
  removeTemplate: function removeTemplate(client, id) {
1702
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee28() {
1711
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
1703
1712
  var mutation;
1704
- return regeneratorRuntime.wrap(function _callee28$(_context28) {
1713
+ return _regeneratorRuntime().wrap(function _callee28$(_context28) {
1705
1714
  while (1) {
1706
1715
  switch (_context28.prev = _context28.next) {
1707
1716
  case 0:
@@ -1722,9 +1731,9 @@ var _default = {
1722
1731
  },
1723
1732
  //
1724
1733
  getTemplates: function getTemplates(client, fragments) {
1725
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee29() {
1734
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
1726
1735
  var query;
1727
- return regeneratorRuntime.wrap(function _callee29$(_context29) {
1736
+ return _regeneratorRuntime().wrap(function _callee29$(_context29) {
1728
1737
  while (1) {
1729
1738
  switch (_context29.prev = _context29.next) {
1730
1739
  case 0:
@@ -1745,9 +1754,9 @@ var _default = {
1745
1754
  },
1746
1755
  //
1747
1756
  getApplications: function getApplications(client, fragments, params) {
1748
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee30() {
1757
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
1749
1758
  var query;
1750
- return regeneratorRuntime.wrap(function _callee30$(_context30) {
1759
+ return _regeneratorRuntime().wrap(function _callee30$(_context30) {
1751
1760
  while (1) {
1752
1761
  switch (_context30.prev = _context30.next) {
1753
1762
  case 0:
@@ -1770,9 +1779,9 @@ var _default = {
1770
1779
  addApplicationSource: function addApplicationSource(client, applicationId, applicationSource, fragments) {
1771
1780
  var _this10 = this;
1772
1781
 
1773
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee31() {
1782
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
1774
1783
  var mutation;
1775
- return regeneratorRuntime.wrap(function _callee31$(_context31) {
1784
+ return _regeneratorRuntime().wrap(function _callee31$(_context31) {
1776
1785
  while (1) {
1777
1786
  switch (_context31.prev = _context31.next) {
1778
1787
  case 0:
@@ -1795,9 +1804,9 @@ var _default = {
1795
1804
  },
1796
1805
  //
1797
1806
  addApplicationSourceFromURL: function addApplicationSourceFromURL(client, applicationId, url, fragments) {
1798
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee32() {
1807
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
1799
1808
  var file, mutation;
1800
- return regeneratorRuntime.wrap(function _callee32$(_context32) {
1809
+ return _regeneratorRuntime().wrap(function _callee32$(_context32) {
1801
1810
  while (1) {
1802
1811
  switch (_context32.prev = _context32.next) {
1803
1812
  case 0:
@@ -1823,9 +1832,9 @@ var _default = {
1823
1832
  },
1824
1833
  //
1825
1834
  updateApplicationSource: function updateApplicationSource(client, applicationSource, fragments) {
1826
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee33() {
1835
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
1827
1836
  var mutation;
1828
- return regeneratorRuntime.wrap(function _callee33$(_context33) {
1837
+ return _regeneratorRuntime().wrap(function _callee33$(_context33) {
1829
1838
  while (1) {
1830
1839
  switch (_context33.prev = _context33.next) {
1831
1840
  case 0:
@@ -1848,9 +1857,9 @@ var _default = {
1848
1857
  removeSourceFromApplication: function removeSourceFromApplication(client, sourceId, applicationId, fragments) {
1849
1858
  var _this11 = this;
1850
1859
 
1851
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee34() {
1860
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
1852
1861
  var mutation;
1853
- return regeneratorRuntime.wrap(function _callee34$(_context34) {
1862
+ return _regeneratorRuntime().wrap(function _callee34$(_context34) {
1854
1863
  while (1) {
1855
1864
  switch (_context34.prev = _context34.next) {
1856
1865
  case 0:
@@ -1873,9 +1882,9 @@ var _default = {
1873
1882
  },
1874
1883
  //
1875
1884
  applyTemplate: function applyTemplate(client, templateId, appId, fragments) {
1876
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee35() {
1885
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
1877
1886
  var mutation;
1878
- return regeneratorRuntime.wrap(function _callee35$(_context35) {
1887
+ return _regeneratorRuntime().wrap(function _callee35$(_context35) {
1879
1888
  while (1) {
1880
1889
  switch (_context35.prev = _context35.next) {
1881
1890
  case 0:
@@ -1896,9 +1905,9 @@ var _default = {
1896
1905
  },
1897
1906
  //
1898
1907
  updateTemplate: function updateTemplate(client, template, fragments) {
1899
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee36() {
1908
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
1900
1909
  var mutation;
1901
- return regeneratorRuntime.wrap(function _callee36$(_context36) {
1910
+ return _regeneratorRuntime().wrap(function _callee36$(_context36) {
1902
1911
  while (1) {
1903
1912
  switch (_context36.prev = _context36.next) {
1904
1913
  case 0:
@@ -1918,8 +1927,8 @@ var _default = {
1918
1927
  }))();
1919
1928
  },
1920
1929
  getApplicationProfiling: function getApplicationProfiling(client, applicationId) {
1921
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee37() {
1922
- return regeneratorRuntime.wrap(function _callee37$(_context37) {
1930
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() {
1931
+ return _regeneratorRuntime().wrap(function _callee37$(_context37) {
1923
1932
  while (1) {
1924
1933
  switch (_context37.prev = _context37.next) {
1925
1934
  case 0:
@@ -1936,8 +1945,8 @@ var _default = {
1936
1945
  }))();
1937
1946
  },
1938
1947
  deleteProfiling: function deleteProfiling(client, profilingId) {
1939
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee38() {
1940
- return regeneratorRuntime.wrap(function _callee38$(_context38) {
1948
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
1949
+ return _regeneratorRuntime().wrap(function _callee38$(_context38) {
1941
1950
  while (1) {
1942
1951
  switch (_context38.prev = _context38.next) {
1943
1952
  case 0:
@@ -1964,9 +1973,9 @@ var _default = {
1964
1973
  startInstrumentation: function startInstrumentation(client, applicationId) {
1965
1974
  var _this12 = this;
1966
1975
 
1967
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee39() {
1976
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
1968
1977
  var instrumentation;
1969
- return regeneratorRuntime.wrap(function _callee39$(_context39) {
1978
+ return _regeneratorRuntime().wrap(function _callee39$(_context39) {
1970
1979
  while (1) {
1971
1980
  switch (_context39.prev = _context39.next) {
1972
1981
  case 0:
@@ -2001,10 +2010,10 @@ var _default = {
2001
2010
  },
2002
2011
  //
2003
2012
  createApplicationProtection: function createApplicationProtection(client, applicationId, protectionOptions, fragments) {
2004
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee40() {
2013
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
2005
2014
  var _yield$introspection$, args, mutation;
2006
2015
 
2007
- return regeneratorRuntime.wrap(function _callee40$(_context40) {
2016
+ return _regeneratorRuntime().wrap(function _callee40$(_context40) {
2008
2017
  while (1) {
2009
2018
  switch (_context40.prev = _context40.next) {
2010
2019
  case 0:
@@ -2042,9 +2051,9 @@ var _default = {
2042
2051
  createApplicationProtections: function createApplicationProtections(client, applicationId, protectionOptions, fragments) {
2043
2052
  var _this13 = this;
2044
2053
 
2045
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee41() {
2054
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() {
2046
2055
  var result, mutationType, mutation;
2047
- return regeneratorRuntime.wrap(function _callee41$(_context41) {
2056
+ return _regeneratorRuntime().wrap(function _callee41$(_context41) {
2048
2057
  while (1) {
2049
2058
  switch (_context41.prev = _context41.next) {
2050
2059
  case 0:
@@ -2115,8 +2124,8 @@ var _default = {
2115
2124
  * @returns {Promise<object>}
2116
2125
  */
2117
2126
  getInstrumentation: function getInstrumentation(client, instrumentationId) {
2118
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee42() {
2119
- return regeneratorRuntime.wrap(function _callee42$(_context42) {
2127
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42() {
2128
+ return _regeneratorRuntime().wrap(function _callee42$(_context42) {
2120
2129
  while (1) {
2121
2130
  switch (_context42.prev = _context42.next) {
2122
2131
  case 0:
@@ -2132,9 +2141,9 @@ var _default = {
2132
2141
  },
2133
2142
  //
2134
2143
  getApplicationProtection: function getApplicationProtection(client, applicationId, protectionId, fragments) {
2135
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee43() {
2144
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43() {
2136
2145
  var query;
2137
- return regeneratorRuntime.wrap(function _callee43$(_context43) {
2146
+ return _regeneratorRuntime().wrap(function _callee43$(_context43) {
2138
2147
  while (1) {
2139
2148
  switch (_context43.prev = _context43.next) {
2140
2149
  case 0:
@@ -2155,8 +2164,8 @@ var _default = {
2155
2164
  },
2156
2165
  //
2157
2166
  downloadSourceMapsRequest: function downloadSourceMapsRequest(client, protectionId) {
2158
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee44() {
2159
- return regeneratorRuntime.wrap(function _callee44$(_context44) {
2167
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44() {
2168
+ return _regeneratorRuntime().wrap(function _callee44$(_context44) {
2160
2169
  while (1) {
2161
2170
  switch (_context44.prev = _context44.next) {
2162
2171
  case 0:
@@ -2171,8 +2180,8 @@ var _default = {
2171
2180
  }))();
2172
2181
  },
2173
2182
  downloadSymbolTableRequest: function downloadSymbolTableRequest(client, protectionId) {
2174
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee45() {
2175
- return regeneratorRuntime.wrap(function _callee45$(_context45) {
2183
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45() {
2184
+ return _regeneratorRuntime().wrap(function _callee45$(_context45) {
2176
2185
  while (1) {
2177
2186
  switch (_context45.prev = _context45.next) {
2178
2187
  case 0:
@@ -2188,8 +2197,8 @@ var _default = {
2188
2197
  },
2189
2198
  //
2190
2199
  downloadApplicationProtection: function downloadApplicationProtection(client, protectionId) {
2191
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee46() {
2192
- return regeneratorRuntime.wrap(function _callee46$(_context46) {
2200
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46() {
2201
+ return _regeneratorRuntime().wrap(function _callee46$(_context46) {
2193
2202
  while (1) {
2194
2203
  switch (_context46.prev = _context46.next) {
2195
2204
  case 0:
@@ -2224,9 +2233,9 @@ var _default = {
2224
2233
  introspectFieldOnMethod: function introspectFieldOnMethod(config, queryOrMutation, methodName, field) {
2225
2234
  var _this14 = this;
2226
2235
 
2227
- return _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee47() {
2236
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
2228
2237
  var instrospectionType, client, result, dataArg, isFieldSupported;
2229
- return regeneratorRuntime.wrap(function _callee47$(_context47) {
2238
+ return _regeneratorRuntime().wrap(function _callee47$(_context47) {
2230
2239
  while (1) {
2231
2240
  switch (_context47.prev = _context47.next) {
2232
2241
  case 0:
@@ -3,15 +3,19 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.type = type;
6
+ exports.intoObjectType = intoObjectType;
7
7
  exports.mutation = mutation;
8
8
  exports.query = query;
9
- exports.intoObjectType = intoObjectType;
9
+ exports.type = type;
10
10
 
11
11
  var _lodash = _interopRequireDefault(require("lodash.clonedeep"));
12
12
 
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
 
15
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
16
+
17
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
18
+
15
19
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
16
20
 
17
21
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
@@ -23,10 +27,10 @@ function type(_x, _x2) {
23
27
  }
24
28
 
25
29
  function _type() {
26
- _type = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(client, name) {
30
+ _type = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(client, name) {
27
31
  var jscramblerVersion, query, res, __type;
28
32
 
29
- return regeneratorRuntime.wrap(function _callee$(_context) {
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__*/regeneratorRuntime.mark(function _callee2(client, name) {
81
+ _mutation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(client, name) {
78
82
  var rootMutation, mutationType;
79
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
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__*/regeneratorRuntime.mark(function _callee3(client, name) {
112
+ _query = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(client, name) {
109
113
  var rootQuery, queryType;
110
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
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__*/regeneratorRuntime.mark(function _callee5(client, obj, name) {
143
+ _intoObjectType = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(client, obj, name) {
140
144
  var fields, finalObj, keys;
141
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
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__*/regeneratorRuntime.mark(function _callee4(k) {
158
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(k) {
155
159
  var field;
156
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
160
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
157
161
  while (1) {
158
162
  switch (_context4.prev = _context4.next) {
159
163
  case 0:
package/dist/mutations.js CHANGED
@@ -3,22 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.addApplicationSource = addApplicationSource;
7
+ exports.applyTemplate = applyTemplate;
8
+ exports.cancelProtection = cancelProtection;
6
9
  exports.createApplication = createApplication;
10
+ exports.createApplicationProtection = createApplicationProtection;
11
+ exports.createApplicationProtections = createApplicationProtections;
12
+ exports.createTemplate = createTemplate;
7
13
  exports.duplicateApplication = duplicateApplication;
8
14
  exports.removeApplication = removeApplication;
9
15
  exports.removeProtection = removeProtection;
10
- exports.cancelProtection = cancelProtection;
11
- exports.updateApplication = updateApplication;
12
- exports.unlockApplication = unlockApplication;
13
- exports.addApplicationSource = addApplicationSource;
14
- exports.updateApplicationSource = updateApplicationSource;
15
16
  exports.removeSourceFromApplication = removeSourceFromApplication;
16
- exports.createTemplate = createTemplate;
17
17
  exports.removeTemplate = removeTemplate;
18
+ exports.unlockApplication = unlockApplication;
19
+ exports.updateApplication = updateApplication;
20
+ exports.updateApplicationSource = updateApplicationSource;
18
21
  exports.updateTemplate = updateTemplate;
19
- exports.createApplicationProtection = createApplicationProtection;
20
- exports.createApplicationProtections = createApplicationProtections;
21
- exports.applyTemplate = applyTemplate;
22
22
 
23
23
  var _cleanupInputFields3 = _interopRequireDefault(require("./cleanup-input-fields"));
24
24
 
package/dist/queries.js CHANGED
@@ -4,16 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getApplication = getApplication;
7
- exports.getApplicationSource = getApplicationSource;
8
7
  exports.getApplicationProtections = getApplicationProtections;
9
8
  exports.getApplicationProtectionsCount = getApplicationProtectionsCount;
10
- exports.getTemplates = getTemplates;
9
+ exports.getApplicationSource = getApplicationSource;
11
10
  exports.getApplications = getApplications;
12
11
  exports.getProtection = getProtection;
12
+ exports.getTemplates = getTemplates;
13
13
 
14
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
15
 
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
16
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
17
 
18
18
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19
19
 
package/dist/zip.js CHANGED
@@ -1,17 +1,19 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
- exports.zip = zip;
7
- exports.zipSources = zipSources;
8
- exports.unzip = unzip;
9
8
  Object.defineProperty(exports, "outputFileSync", {
10
9
  enumerable: true,
11
10
  get: function get() {
12
11
  return _fsExtra.outputFileSync;
13
12
  }
14
13
  });
14
+ exports.unzip = unzip;
15
+ exports.zip = zip;
16
+ exports.zipSources = zipSources;
15
17
 
16
18
  var _lodash = _interopRequireDefault(require("lodash.size"));
17
19
 
@@ -29,6 +31,8 @@ var _util = require("util");
29
31
 
30
32
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
31
33
 
34
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
35
+
32
36
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
37
 
34
38
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -52,10 +56,10 @@ function zip(_x, _x2) {
52
56
  }
53
57
 
54
58
  function _zip() {
55
- _zip = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(files, cwd) {
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 regeneratorRuntime.wrap(function _callee$(_context) {
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__*/regeneratorRuntime.mark(function _callee2(zipFile, dest) {
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 regeneratorRuntime.wrap(function _callee2$(_context2) {
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 = regeneratorRuntime.keys(zip.files);
243
+ _context2.t0 = _regeneratorRuntime().keys(zip.files);
240
244
 
241
245
  case 7:
242
246
  if ((_context2.t1 = _context2.t0()).done) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "6.2.2",
4
+ "version": "6.2.5",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <code@jscrambler.com>",
7
7
  "repository": {