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 +1 -1
- package/README.md +1 -0
- package/dist/bin/jscrambler.js +5 -1
- package/dist/cli.js +1 -1
- package/dist/client.js +1 -1
- package/dist/get-protection-default-fragments.js +2 -0
- package/dist/index.js +894 -572
- package/dist/mutations.js +21 -3
- package/dist/queries.js +6 -1
- package/dist/utils.js +14 -0
- package/package.json +2 -5
package/LICENSE-MIT
CHANGED
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
|
|
package/dist/bin/jscrambler.js
CHANGED
|
@@ -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
|
|
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
|
|
87
|
+
* @author Jscrambler
|
|
88
88
|
* @license MIT <http://opensource.org/licenses/MIT>
|
|
89
89
|
*/
|
|
90
90
|
|