javascript-obfuscator 2.19.1 → 3.0.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 +7 -0
- package/README.md +28 -28
- package/dist/index.browser.js +1 -1
- 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 +1 -1
- package/typings/src/enums/node/NodeType.d.ts +1 -0
- package/typings/src/enums/node-transformers/preparing-transformers/obfuscating-guards/ObfuscatingGuard.d.ts +1 -1
- package/typings/src/interfaces/options/IOptions.d.ts +3 -3
- package/typings/src/node/NodeGuards.d.ts +1 -0
- package/typings/src/node-transformers/preparing-transformers/obfuscating-guards/{IgnoredRequireImportObfuscatingGuard.d.ts → IgnoredImportObfuscatingGuard.d.ts} +3 -1
- package/typings/src/options/Options.d.ts +3 -3
package/package.json
CHANGED
|
@@ -28,6 +28,7 @@ export declare enum NodeType {
|
|
|
28
28
|
Identifier = "Identifier",
|
|
29
29
|
IfStatement = "IfStatement",
|
|
30
30
|
ImportDeclaration = "ImportDeclaration",
|
|
31
|
+
ImportExpression = "ImportExpression",
|
|
31
32
|
ImportDefaultSpecifier = "ImportDefaultSpecifier",
|
|
32
33
|
ImportNamespaceSpecifier = "ImportNamespaceSpecifier",
|
|
33
34
|
ImportSpecifier = "ImportSpecifier",
|
|
@@ -2,6 +2,6 @@ export declare enum ObfuscatingGuard {
|
|
|
2
2
|
BlackListObfuscatingGuard = "BlackListObfuscatingGuard",
|
|
3
3
|
ConditionalCommentObfuscatingGuard = "ConditionalCommentObfuscatingGuard",
|
|
4
4
|
ForceTransformStringObfuscatingGuard = "ForceTransformStringObfuscatingGuard",
|
|
5
|
-
|
|
5
|
+
IgnoredImportObfuscatingGuard = "IgnoredImportObfuscatingGuard",
|
|
6
6
|
ReservedStringObfuscatingGuard = "ReservedStringObfuscatingGuard"
|
|
7
7
|
}
|
|
@@ -25,7 +25,7 @@ export interface IOptions {
|
|
|
25
25
|
readonly identifierNamesGenerator: TTypeFromEnum<typeof IdentifierNamesGenerator>;
|
|
26
26
|
readonly identifiersDictionary: string[];
|
|
27
27
|
readonly identifiersPrefix: string;
|
|
28
|
-
readonly
|
|
28
|
+
readonly ignoreImports: boolean;
|
|
29
29
|
readonly inputFileName: string;
|
|
30
30
|
readonly log: boolean;
|
|
31
31
|
readonly numbersToExpressions: boolean;
|
|
@@ -35,10 +35,8 @@ export interface IOptions {
|
|
|
35
35
|
readonly renamePropertiesMode: TRenamePropertiesMode;
|
|
36
36
|
readonly reservedNames: string[];
|
|
37
37
|
readonly reservedStrings: string[];
|
|
38
|
-
readonly rotateStringArray: boolean;
|
|
39
38
|
readonly seed: string | number;
|
|
40
39
|
readonly selfDefending: boolean;
|
|
41
|
-
readonly shuffleStringArray: boolean;
|
|
42
40
|
readonly simplify: boolean;
|
|
43
41
|
readonly sourceMap: boolean;
|
|
44
42
|
readonly sourceMapBaseUrl: string;
|
|
@@ -51,6 +49,8 @@ export interface IOptions {
|
|
|
51
49
|
readonly stringArrayEncoding: TStringArrayEncoding[];
|
|
52
50
|
readonly stringArrayIndexesType: TStringArrayIndexesType[];
|
|
53
51
|
readonly stringArrayIndexShift: boolean;
|
|
52
|
+
readonly stringArrayRotate: boolean;
|
|
53
|
+
readonly stringArrayShuffle: boolean;
|
|
54
54
|
readonly stringArrayWrappersChainedCalls: boolean;
|
|
55
55
|
readonly stringArrayWrappersCount: number;
|
|
56
56
|
readonly stringArrayWrappersParametersMaxCount: number;
|
|
@@ -38,6 +38,7 @@ export declare class NodeGuards {
|
|
|
38
38
|
static isIfStatementNode(node: ESTree.Node): node is ESTree.IfStatement;
|
|
39
39
|
static isIfStatementNodeWithSingleStatementBody(node: ESTree.Node): node is ESTree.IfStatement;
|
|
40
40
|
static isImportDeclarationNode(node: ESTree.Node): node is ESTree.ImportDeclaration;
|
|
41
|
+
static isImportExpressionNode(node: ESTree.Node): node is ESTree.ImportExpression;
|
|
41
42
|
static isImportSpecifierNode(node: ESTree.Node): node is ESTree.ImportSpecifier;
|
|
42
43
|
static isLabelIdentifierNode(node: ESTree.Node, parentNode: ESTree.Node): node is ESTree.Identifier;
|
|
43
44
|
static isLabeledStatementNode(node: ESTree.Node): node is ESTree.LabeledStatement;
|
|
@@ -2,8 +2,10 @@ import * as ESTree from 'estree';
|
|
|
2
2
|
import { IObfuscatingGuard } from '../../../interfaces/node-transformers/preparing-transformers/obfuscating-guards/IObfuscatingGuard';
|
|
3
3
|
import { IOptions } from '../../../interfaces/options/IOptions';
|
|
4
4
|
import { ObfuscatingGuardResult } from '../../../enums/node/ObfuscatingGuardResult';
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class IgnoredImportObfuscatingGuard implements IObfuscatingGuard {
|
|
6
6
|
private readonly options;
|
|
7
7
|
constructor(options: IOptions);
|
|
8
|
+
private static isDynamicImport;
|
|
9
|
+
private static isRequireImport;
|
|
8
10
|
check(node: ESTree.Node): ObfuscatingGuardResult;
|
|
9
11
|
}
|
|
@@ -30,7 +30,7 @@ export declare class Options implements IOptions {
|
|
|
30
30
|
readonly identifierNamesGenerator: TTypeFromEnum<typeof IdentifierNamesGenerator>;
|
|
31
31
|
readonly identifiersPrefix: string;
|
|
32
32
|
readonly identifiersDictionary: string[];
|
|
33
|
-
readonly
|
|
33
|
+
readonly ignoreImports: boolean;
|
|
34
34
|
readonly inputFileName: string;
|
|
35
35
|
readonly log: boolean;
|
|
36
36
|
readonly numbersToExpressions: boolean;
|
|
@@ -40,9 +40,7 @@ export declare class Options implements IOptions {
|
|
|
40
40
|
readonly renamePropertiesMode: TRenamePropertiesMode;
|
|
41
41
|
readonly reservedNames: string[];
|
|
42
42
|
readonly reservedStrings: string[];
|
|
43
|
-
readonly rotateStringArray: boolean;
|
|
44
43
|
readonly selfDefending: boolean;
|
|
45
|
-
readonly shuffleStringArray: boolean;
|
|
46
44
|
readonly simplify: boolean;
|
|
47
45
|
readonly sourceMap: boolean;
|
|
48
46
|
readonly sourceMapBaseUrl: string;
|
|
@@ -55,6 +53,8 @@ export declare class Options implements IOptions {
|
|
|
55
53
|
readonly stringArrayEncoding: TStringArrayEncoding[];
|
|
56
54
|
readonly stringArrayIndexesType: TStringArrayIndexesType[];
|
|
57
55
|
readonly stringArrayIndexShift: boolean;
|
|
56
|
+
readonly stringArrayRotate: boolean;
|
|
57
|
+
readonly stringArrayShuffle: boolean;
|
|
58
58
|
readonly stringArrayWrappersChainedCalls: boolean;
|
|
59
59
|
readonly stringArrayWrappersCount: number;
|
|
60
60
|
readonly stringArrayWrappersParametersMaxCount: number;
|