jscrambler 6.0.4 → 6.1.0

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/LICENSE-MIT CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 magalhas
1
+ Copyright (c) 2014 Jscrambler
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
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
+ -n <number> (version 7.2 and above) Create multiple protections at once.
132
133
  -h, --help output usage information
133
134
  ```
134
135
 
@@ -80,7 +80,7 @@ var validateForceAppEnvironment = function validateForceAppEnvironment(env) {
80
80
  return normalizeEnvironment;
81
81
  };
82
82
 
83
- _commander2.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: ' + availableEnvironments.toString(), validateForceAppEnvironment).parse(process.argv);
83
+ _commander2.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: ' + availableEnvironments.toString(), validateForceAppEnvironment).option('-n <number>', '(version 7.2 and above) Create multiple protections at once.').parse(process.argv);
84
84
 
85
85
  var globSrc = void 0,
86
86
  filesSrc = void 0,
@@ -154,6 +154,8 @@ if (_commander2.default.forceAppEnvironment) {
154
154
 
155
155
  config = (0, _lodash2.default)(config, _config4.default);
156
156
 
157
+ config.numberOfProtections = (0, _utils.validateNProtections)(_commander2.default.N);
158
+
157
159
  if (config.codeHardeningThreshold) {
158
160
  config.codeHardeningThreshold = validateCodeHardeningThreshold(config.codeHardeningThreshold);
159
161
  }
@@ -244,6 +246,7 @@ var _config2 = config,
244
246
  utc = _config2.utc,
245
247
  entryPoint = _config2.entryPoint,
246
248
  excludeList = _config2.excludeList,
249
+ numberOfProtections = _config2.numberOfProtections,
247
250
  forceAppEnvironment = _config2.forceAppEnvironment;
248
251
 
249
252
 
@@ -421,6 +424,7 @@ if (_commander2.default.sourceMaps) {
421
424
  inputSymbolTable: inputSymbolTable,
422
425
  entryPoint: entryPoint,
423
426
  excludeList: excludeList,
427
+ numberOfProtections: numberOfProtections,
424
428
  forceAppEnvironment: forceAppEnvironment
425
429
  });
426
430
  _context3.prev = 1;
package/dist/cli.js CHANGED
@@ -50,7 +50,7 @@ var isBoolFlag = {
50
50
  preserveAnnotations: true
51
51
  };
52
52
 
53
- // Convert from command line option format to JScrambler API format.
53
+ // Convert from command line option format to Jscrambler API format.
54
54
  function mergeAndParseParams(commander, params) {
55
55
  var finalParams = (0, _lodash2.default)(params || {});
56
56
 
package/dist/client.js CHANGED
@@ -84,7 +84,7 @@ var ClientError = function (_Error) {
84
84
  * @param {String} [options.port=443]
85
85
  * @param {String} [options.basePath]
86
86
  * @param {String} [options.clientId=0]
87
- * @author José Magalhães (magalhas@gmail.com)
87
+ * @author Jscrambler
88
88
  * @license MIT <http://opensource.org/licenses/MIT>
89
89
  */
90
90
 
@@ -92,6 +92,8 @@ var protectionFields = {
92
92
  growthWarning: 1,
93
93
  errorMessage: 1,
94
94
  size: 1,
95
+ startedAt: 1,
96
+ finishedAt: 1,
95
97
  transformedSize: 1
96
98
  };
97
99