jscrambler 6.4.14 → 6.4.16

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.
@@ -80,7 +80,9 @@ var protectionFields = {
80
80
  size: 1,
81
81
  startedAt: 1,
82
82
  finishedAt: 1,
83
- transformedSize: 1
83
+ transformedSize: 1,
84
+ hasForcedDateLock: 1,
85
+ parameters: 1
84
86
  };
85
87
  var deprecationFields = {
86
88
  type: 1,
package/dist/index.js CHANGED
@@ -496,6 +496,11 @@ var _default = {
496
496
  if (protection.growthWarning) {
497
497
  console.warn("Warning: Your protected application has surpassed a reasonable file growth.\nFor more information on what might have caused this, please see the Protection Report.\nLink: ".concat(APP_URL, "."));
498
498
  }
499
+ if (protection.hasForcedDateLock) {
500
+ console.warn("Warning: Since your plan is a Trial, your protected files will stop working on ".concat(protection.parameters.find(function (p) {
501
+ return p.name === 'dateLock' && p.options.endDate;
502
+ }).options.endDate));
503
+ }
499
504
  if (debug) {
500
505
  console.log('Finished protecting');
501
506
  }
@@ -519,7 +524,7 @@ var _default = {
519
524
  }
520
525
  });
521
526
  if (!(protection.state === 'errored')) {
522
- _context3.next = 14;
527
+ _context3.next = 15;
523
528
  break;
524
529
  }
525
530
  console.error('Global protection errors:');
@@ -529,36 +534,36 @@ var _default = {
529
534
  printSourcesErrors(sourcesErrors);
530
535
  }
531
536
  throw new Error("Protection failed. For more information visit: ".concat(APP_URL, "."));
532
- case 14:
537
+ case 15:
533
538
  if (!(sourcesErrors.length > 0)) {
534
- _context3.next = 21;
539
+ _context3.next = 22;
535
540
  break;
536
541
  }
537
542
  if (!protection.bail) {
538
- _context3.next = 20;
543
+ _context3.next = 21;
539
544
  break;
540
545
  }
541
546
  printSourcesErrors(sourcesErrors);
542
547
  throw new Error('Your protection has failed.');
543
- case 20:
548
+ case 21:
544
549
  sourcesErrors.forEach(function (e) {
545
550
  return console.warn("Non-fatal error: \"".concat(e.message, "\" in ").concat(e.filename));
546
551
  });
547
- case 21:
552
+ case 22:
548
553
  if (debug) {
549
554
  console.log('Downloading protection result');
550
555
  }
551
- _context3.next = 24;
556
+ _context3.next = 25;
552
557
  return _this2.downloadApplicationProtection(client, protection._id);
553
- case 24:
558
+ case 25:
554
559
  download = _context3.sent;
555
560
  errorHandler(download);
556
561
  if (debug) {
557
562
  console.log('Unzipping files');
558
563
  }
559
- _context3.next = 29;
564
+ _context3.next = 30;
560
565
  return (0, _zip.unzip)(download, (filesDest ? "".concat(filesDest).concat(outPrefix) : filesDest) || destCallback, stream);
561
- case 29:
566
+ case 30:
562
567
  if (debug) {
563
568
  console.log('Finished unzipping files');
564
569
  }
@@ -566,7 +571,7 @@ var _default = {
566
571
  console.log(protection._id);
567
572
  }
568
573
  return _context3.abrupt("return", protection._id);
569
- case 32:
574
+ case 33:
570
575
  case "end":
571
576
  return _context3.stop();
572
577
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "6.4.14",
4
+ "version": "6.4.16",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <code@jscrambler.com>",
7
7
  "repository": {