jscrambler 6.2.5 → 6.2.6

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.
@@ -84,7 +84,7 @@ var validateForceAppEnvironment = function validateForceAppEnvironment(env) {
84
84
  return normalizeEnvironment;
85
85
  };
86
86
 
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);
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>', "(version 7.3 and above) 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);
88
88
 
89
89
  var globSrc, filesSrc, config; // If -c, --config file was provided
90
90
 
@@ -109,7 +109,6 @@ config.applicationId = _commander.default.applicationId || config.applicationId;
109
109
  config.randomizationSeed = _commander.default.randomizationSeed || config.randomizationSeed;
110
110
  config.cwd = _commander.default.cwd || config.cwd;
111
111
  config.useRecommendedOrder = _commander.default.recommendedOrder ? _commander.default.recommendedOrder !== 'false' : config.useRecommendedOrder;
112
- config.ensureCodeAnnotation = _commander.default.ensureCodeAnnotation ? _commander.default.ensureCodeAnnotation !== 'false' : config.ensureCodeAnnotation;
113
112
  config.tolerateMinification = _commander.default.tolerateMinification ? _commander.default.tolerateMinification !== 'false' : config.tolerateMinification;
114
113
  config.werror = _commander.default.werror ? _commander.default.werror !== 'false' : config.werror;
115
114
  config.jscramblerVersion = _commander.default.jscramblerVersion || config.jscramblerVersion;
@@ -142,6 +141,10 @@ if (_commander.default.useAppClassification) {
142
141
  config.useAppClassification = _commander.default.useAppClassification !== 'false';
143
142
  }
144
143
 
144
+ if (_commander.default.ensureCodeAnnotation) {
145
+ config.ensureCodeAnnotation = _commander.default.ensureCodeAnnotation === 'true';
146
+ }
147
+
145
148
  if (config.jscramblerVersion && !/^(?:\d+\.\d+(?:-f)?|stable|latest)$/.test(config.jscramblerVersion)) {
146
149
  console.error('The Jscrambler version must be in the form of $major.$minor or the words stable and latest. (e.g. 5.2, stable, latest)');
147
150
  process.exit(1);
package/dist/index.js CHANGED
@@ -325,7 +325,7 @@ var _default = {
325
325
  var _this2 = this;
326
326
 
327
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;
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, ensureCodeAnnotation, forceAppEnvironment, accessKey, secretKey, client, filesSrc, filesDest, source, appProfiling, updateData, dataToValidate, prop, value, applicationUpdate, updateApplicationRes, protectionOptions, inputSymbolTableContents, createApplicationProtectionRes, protectionIds, onExitCancelProtection, processedProtections, handleProtection, i, protection;
329
329
 
330
330
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
331
331
  while (1) {
@@ -333,7 +333,7 @@ var _default = {
333
333
  case 0:
334
334
  start = Date.now();
335
335
  finalConfig = buildFinalConfig(configPathOrObject);
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;
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, ensureCodeAnnotation = finalConfig.ensureCodeAnnotation, forceAppEnvironment = finalConfig.forceAppEnvironment;
337
337
  accessKey = keys.accessKey, secretKey = keys.secretKey;
338
338
  client = new _this2.Client({
339
339
  accessKey: accessKey,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jscrambler",
3
3
  "description": "Jscrambler API client.",
4
- "version": "6.2.5",
4
+ "version": "6.2.6",
5
5
  "homepage": "https://github.com/jscrambler/jscrambler",
6
6
  "author": "Jscrambler <code@jscrambler.com>",
7
7
  "repository": {