javascript-obfuscator 5.4.5 → 5.4.7
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/dist/index.browser.js +3 -3
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cli.js +1 -1
- package/dist/index.cli.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
- package/typings/src/analyzers/string-array-storage-analyzer/StringArrayStorageAnalyzer.d.ts +2 -0
- package/typings/src/cli/utils/CLIUtils.d.ts +1 -0
- package/typings/src/cli/utils/ObfuscatedCodeFileUtils.d.ts +2 -0
- package/typings/src/interfaces/storages/string-array-transformers/ILiteralNodesCacheStorage.d.ts +1 -1
- package/typings/src/interfaces/utils/IEscapeSequenceEncoder.d.ts +1 -0
- package/typings/src/storages/string-array-transformers/LiteralNodesCacheStorage.d.ts +1 -1
- package/typings/src/utils/EscapeSequenceEncoder.d.ts +10 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "javascript-obfuscator",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.7",
|
|
4
4
|
"description": "JavaScript obfuscator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"obfuscator",
|
|
@@ -100,6 +100,9 @@
|
|
|
100
100
|
"webpack-cli": "6.0.1",
|
|
101
101
|
"webpack-node-externals": "3.0.0"
|
|
102
102
|
},
|
|
103
|
+
"resolutions": {
|
|
104
|
+
"multimatch/minimatch/brace-expansion": "^1.1.12"
|
|
105
|
+
},
|
|
103
106
|
"repository": {
|
|
104
107
|
"type": "git",
|
|
105
108
|
"url": "git+https://github.com/javascript-obfuscator/javascript-obfuscator.git"
|
|
@@ -7,6 +7,7 @@ import { IStringArrayStorageAnalyzer } from '../../interfaces/analyzers/string-a
|
|
|
7
7
|
import { IStringArrayStorageItemData } from '../../interfaces/storages/string-array-transformers/IStringArrayStorageItem';
|
|
8
8
|
export declare class StringArrayStorageAnalyzer implements IStringArrayStorageAnalyzer {
|
|
9
9
|
private static readonly minimumLengthForStringArray;
|
|
10
|
+
private static readonly loneSurrogateRegExp;
|
|
10
11
|
private readonly options;
|
|
11
12
|
private readonly randomGenerator;
|
|
12
13
|
private readonly stringArrayStorage;
|
|
@@ -17,4 +18,5 @@ export declare class StringArrayStorageAnalyzer implements IStringArrayStorageAn
|
|
|
17
18
|
addItemDataForLiteralNode(literalNode: TStringLiteralNode): void;
|
|
18
19
|
getItemDataForLiteralNode(literalNode: ESTree.Literal): IStringArrayStorageItemData | undefined;
|
|
19
20
|
private shouldAddValueToStringArray;
|
|
21
|
+
private isProhibitedStringArrayValue;
|
|
20
22
|
}
|
|
@@ -6,4 +6,6 @@ export declare class ObfuscatedCodeFileUtils {
|
|
|
6
6
|
getOutputCodePath(filePath: string): string;
|
|
7
7
|
getOutputSourceMapPath(outputCodePath: string, sourceMapFileName?: string): string;
|
|
8
8
|
writeFile(outputPath: string, data: string): void;
|
|
9
|
+
private getUniqueSourceMapFileName;
|
|
10
|
+
private isDirectoryInputPath;
|
|
9
11
|
}
|
package/typings/src/interfaces/storages/string-array-transformers/ILiteralNodesCacheStorage.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ import * as ESTree from 'estree';
|
|
|
2
2
|
import { IMapStorage } from '../IMapStorage';
|
|
3
3
|
import { IStringArrayStorageItemData } from './IStringArrayStorageItem';
|
|
4
4
|
export interface ILiteralNodesCacheStorage extends IMapStorage<string, ESTree.Node> {
|
|
5
|
-
buildKey(
|
|
5
|
+
buildKey(literalNode: ESTree.Literal, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): string;
|
|
6
6
|
shouldUseCachedValue(key: string, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): boolean;
|
|
7
7
|
}
|
|
@@ -6,6 +6,6 @@ import { IStringArrayStorageItemData } from '../../interfaces/storages/string-ar
|
|
|
6
6
|
import { MapStorage } from '../MapStorage';
|
|
7
7
|
export declare class LiteralNodesCacheStorage extends MapStorage<string, ESTree.Node> implements ILiteralNodesCacheStorage {
|
|
8
8
|
constructor(randomGenerator: IRandomGenerator, options: IOptions);
|
|
9
|
-
buildKey(
|
|
9
|
+
buildKey(literalNode: ESTree.Literal, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): string;
|
|
10
10
|
shouldUseCachedValue(key: string, stringArrayStorageItemData: IStringArrayStorageItemData | undefined): boolean;
|
|
11
11
|
}
|
|
@@ -3,6 +3,16 @@ export declare class EscapeSequenceEncoder implements IEscapeSequenceEncoder {
|
|
|
3
3
|
private static readonly ASCIICharactersRegExp;
|
|
4
4
|
private static readonly forceEscapeCharactersRegExp;
|
|
5
5
|
private static readonly replaceRegExp;
|
|
6
|
+
private static readonly hexDigitRegExp;
|
|
7
|
+
private static readonly octalDigitRegExp;
|
|
6
8
|
private readonly stringsCache;
|
|
7
9
|
encode(string: string, encodeAllSymbols: boolean): string;
|
|
10
|
+
encodeLiteral(value: string, rawValue: string | undefined, encodeAllSymbols: boolean): string;
|
|
11
|
+
private encodeCharacter;
|
|
12
|
+
private encodePreservingUnicodeEscapes;
|
|
13
|
+
private readUnicodeEscapeSequence;
|
|
14
|
+
private readFixedLengthHexEscapeSequence;
|
|
15
|
+
private readCodePointEscapeSequence;
|
|
16
|
+
private readSimpleEscapeSequence;
|
|
17
|
+
private isHexString;
|
|
8
18
|
}
|