jscrambler 8.9.4 → 8.10.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/CHANGELOG.md +6 -0
- package/README.md +1 -0
- package/dist/bin/jscrambler.js +10 -3
- package/dist/config.js +2 -1
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -145,6 +145,7 @@ Options:
|
|
|
145
145
|
--save-src <bool> Protection should save application sources (default: true)
|
|
146
146
|
--protection-report <string> (version 8.4 and above) Protection id for the metadata report
|
|
147
147
|
--use-global-names-on-modules <bool> (version 8.5 and above) Force the usage of more complex names on modules (default: false)
|
|
148
|
+
--generate-alias <bool> Generate alias for the transformations (default: true)
|
|
148
149
|
-h, --help output usage information
|
|
149
150
|
```
|
|
150
151
|
|
package/dist/bin/jscrambler.js
CHANGED
|
@@ -106,7 +106,7 @@ const validateBeforeProtection = function () {
|
|
|
106
106
|
});
|
|
107
107
|
return beforeProtectionArray;
|
|
108
108
|
};
|
|
109
|
-
_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.").option('--delete-protection-on-success <bool>', 'Deletes the protection files after they have been protected and downloaded (default: false)', validateBool('--delete-protection-on-success')).option('--mode <mode>', "(version 8.4 and above) Define protection mode. Possible values: automatic, manual (default: manual)", validateMode).option('--save-src <bool>', 'Protection should save application sources (default: true)', validateBool('--save-src')).option('--protection-report <string>', '(version 8.4 and above) Protection id for the metadata report').option('--use-global-names-on-modules <bool>', '(version 8.5 and above) Force the usage of more complex names on modules').option('--balance', '(version 8.4 and above) Gets the balance of the user').parse(process.argv);
|
|
109
|
+
_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.").option('--delete-protection-on-success <bool>', 'Deletes the protection files after they have been protected and downloaded (default: false)', validateBool('--delete-protection-on-success')).option('--mode <mode>', "(version 8.4 and above) Define protection mode. Possible values: automatic, manual (default: manual)", validateMode).option('--save-src <bool>', 'Protection should save application sources (default: true)', validateBool('--save-src')).option('--protection-report <string>', '(version 8.4 and above) Protection id for the metadata report').option('--use-global-names-on-modules <bool>', '(version 8.5 and above) Force the usage of more complex names on modules').option('--balance', '(version 8.4 and above) Gets the balance of the user').option('--generate-alias <bool>', 'Generate alias for the transformations (default: true)', validateBool('--generate-alias')).parse(process.argv);
|
|
110
110
|
let globSrc, filesSrc, config;
|
|
111
111
|
|
|
112
112
|
// If -c, --config file was provided
|
|
@@ -193,6 +193,11 @@ if (_commander.default.saveSrc) {
|
|
|
193
193
|
} else {
|
|
194
194
|
config.saveSrc = config.saveSrc !== false;
|
|
195
195
|
}
|
|
196
|
+
if (_commander.default.generateAlias) {
|
|
197
|
+
config.generateAlias = _commander.default.generateAlias !== 'false';
|
|
198
|
+
} else {
|
|
199
|
+
config.generateAlias = config.generateAlias !== false;
|
|
200
|
+
}
|
|
196
201
|
globSrc = config.filesSrc;
|
|
197
202
|
// If src paths have been provided
|
|
198
203
|
if (_commander.default.args.length > 0) {
|
|
@@ -277,7 +282,8 @@ const {
|
|
|
277
282
|
mode,
|
|
278
283
|
saveSrc,
|
|
279
284
|
globalNamesPrefix,
|
|
280
|
-
useGlobalNamesOnModules
|
|
285
|
+
useGlobalNamesOnModules,
|
|
286
|
+
generateAlias
|
|
281
287
|
} = config;
|
|
282
288
|
const params = config.params;
|
|
283
289
|
const incompatibleOptions = ['sourceMaps', 'instrument', 'startProfiling', 'stopProfiling'];
|
|
@@ -420,7 +426,8 @@ if (_commander.default.balance) {
|
|
|
420
426
|
mode,
|
|
421
427
|
saveSrc,
|
|
422
428
|
globalNamesPrefix,
|
|
423
|
-
useGlobalNamesOnModules
|
|
429
|
+
useGlobalNamesOnModules,
|
|
430
|
+
generateAlias
|
|
424
431
|
});
|
|
425
432
|
try {
|
|
426
433
|
if (typeof werror !== 'undefined') {
|
package/dist/config.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -285,7 +285,8 @@ var _default = exports.default = {
|
|
|
285
285
|
mode,
|
|
286
286
|
saveSrc,
|
|
287
287
|
globalNamesPrefix,
|
|
288
|
-
useGlobalNamesOnModules
|
|
288
|
+
useGlobalNamesOnModules,
|
|
289
|
+
generateAlias
|
|
289
290
|
} = finalConfig;
|
|
290
291
|
const {
|
|
291
292
|
accessKey,
|
|
@@ -376,7 +377,8 @@ var _default = exports.default = {
|
|
|
376
377
|
ensureCodeAnnotation,
|
|
377
378
|
useProfilingData,
|
|
378
379
|
useRecommendedOrder,
|
|
379
|
-
mode
|
|
380
|
+
mode,
|
|
381
|
+
generateAlias
|
|
380
382
|
};
|
|
381
383
|
for (const prop in dataToValidate) {
|
|
382
384
|
const value = dataToValidate[prop];
|
|
@@ -411,7 +413,8 @@ var _default = exports.default = {
|
|
|
411
413
|
forceAppEnvironment,
|
|
412
414
|
mode,
|
|
413
415
|
globalNamesPrefix,
|
|
414
|
-
useGlobalNamesOnModules
|
|
416
|
+
useGlobalNamesOnModules,
|
|
417
|
+
generateAlias
|
|
415
418
|
});
|
|
416
419
|
if (finalConfig.inputSymbolTable) {
|
|
417
420
|
const inputSymbolTableContents = await _fs.default.promises.readFile(finalConfig.inputSymbolTable, 'utf-8');
|
package/package.json
CHANGED