jscrambler 8.8.0 → 8.8.2
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 +12 -0
- package/README.md +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -25,6 +25,7 @@ If you're looking to gain control over third-party tags and achieve PCI DSS comp
|
|
|
25
25
|
- [Profiling Data Mode (default: **automatic**)](#profiling-data-mode-default-automatic)
|
|
26
26
|
- [Instrument (`--instrument`)](#instrument---instrument)
|
|
27
27
|
- [Symbol Table](#symbol-table)
|
|
28
|
+
- [Global Names Prefix](#global-names-prefix)
|
|
28
29
|
- [API](#api)
|
|
29
30
|
- [Quick example](#quick-example)
|
|
30
31
|
- [Jscrambler Parameters](#jscrambler-parameters)
|
|
@@ -392,6 +393,28 @@ Similarly, the resulting symbol table can be obtained using the `--output-symbol
|
|
|
392
393
|
|
|
393
394
|
**NOTE**: It only makes sense to use symbol tables on protections that use the identifiers renaming parameter.
|
|
394
395
|
|
|
396
|
+
## Global Names Prefix
|
|
397
|
+
|
|
398
|
+
If you need to make **separate obfuscation requests** for source code that belong to the same application instance, there is a small chance that you will encounter a **naming collision** on the generate global names.
|
|
399
|
+
|
|
400
|
+
To prevent **global naming collisions**, you can set the `globalNamesPrefix` parameter on each protection request:
|
|
401
|
+
|
|
402
|
+
```javascript
|
|
403
|
+
// jscrambler.json to protect micro-frontend 1
|
|
404
|
+
{
|
|
405
|
+
"globalNamesPrefix": "p1"
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// jscrambler.json to protect micro-frontend 2
|
|
409
|
+
{
|
|
410
|
+
"globalNamesPrefix": "p2"
|
|
411
|
+
}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
If apply the previous configuration, all generated global variable names will start with the letters *p1* for *micro-frontend 1* and *p2* for *micro-frontend 2*.
|
|
415
|
+
|
|
416
|
+
***Note***: The `globalNamesPrefix` parameter must be **short** and **unintelligible** to avoid code size increase and automated attacks
|
|
417
|
+
|
|
395
418
|
## API
|
|
396
419
|
```bash
|
|
397
420
|
npm install jscrambler
|
package/package.json
CHANGED