javascript-obfuscator 4.0.1 → 4.0.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.
Files changed (64) hide show
  1. package/.mocharc.json +3 -0
  2. package/CHANGELOG.md +5 -0
  3. package/dist/index.browser.js +1 -1
  4. package/dist/index.browser.js.map +1 -1
  5. package/dist/index.cli.js +1 -1
  6. package/dist/index.cli.js.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/package.json +40 -40
  10. package/typings/index.d.ts +1 -1
  11. package/typings/src/constants/EcmaVersion.d.ts +1 -1
  12. package/typings/src/types/TConstructor.d.ts +1 -1
  13. package/typings/src/types/TDictionary.d.ts +1 -1
  14. package/typings/src/types/TIdentifierNamesCache.d.ts +1 -1
  15. package/typings/src/types/TIdentifierNamesCacheDictionary.d.ts +1 -1
  16. package/typings/src/types/TInitialData.d.ts +1 -1
  17. package/typings/src/types/TObfuscationResultsObject.d.ts +1 -1
  18. package/typings/src/types/analyzers/calls-graph-analyzer/TObjectMembersCallsChain.d.ts +1 -1
  19. package/typings/src/types/analyzers/number-numerical-expression-analyzer/TNumberNumericalExpressionData.d.ts +1 -1
  20. package/typings/src/types/cli/TCLISanitizer.d.ts +1 -1
  21. package/typings/src/types/container/calls-graph-analyzer/TCalleeDataExtractorFactory.d.ts +1 -1
  22. package/typings/src/types/container/code-transformers/TCodeTransformerFactory.d.ts +1 -1
  23. package/typings/src/types/container/custom-code-helpers/TCustomCodeHelperFactory.d.ts +1 -1
  24. package/typings/src/types/container/custom-code-helpers/TCustomCodeHelperGroupFactory.d.ts +1 -1
  25. package/typings/src/types/container/custom-nodes/TControlFlowCustomNodeFactory.d.ts +1 -1
  26. package/typings/src/types/container/custom-nodes/TDeadNodeInjectionCustomNodeFactory.d.ts +1 -1
  27. package/typings/src/types/container/custom-nodes/TObjectExpressionKeysTransformerCustomNodeFactory.d.ts +1 -1
  28. package/typings/src/types/container/custom-nodes/TStringArrayCustomNodeFactory.d.ts +1 -1
  29. package/typings/src/types/container/custom-nodes/string-array-index-nodes/TStringArrayIndexNodeFactory.d.ts +1 -1
  30. package/typings/src/types/container/generators/TIdentifierNamesGeneratorFactory.d.ts +1 -1
  31. package/typings/src/types/container/node-transformers/TControlFlowReplacerFactory.d.ts +1 -1
  32. package/typings/src/types/container/node-transformers/TControlFlowStorageFactory.d.ts +1 -1
  33. package/typings/src/types/container/node-transformers/TControlFlowStorageFactoryCreator.d.ts +1 -1
  34. package/typings/src/types/container/node-transformers/TNodeTransformerFactory.d.ts +1 -1
  35. package/typings/src/types/container/node-transformers/TObfuscatingGuardFactory.d.ts +1 -1
  36. package/typings/src/types/container/node-transformers/TObjectExpressionExtractorFactory.d.ts +1 -1
  37. package/typings/src/types/container/source-code/TObfuscationResultFactory.d.ts +1 -1
  38. package/typings/src/types/custom-code-helpers/TCustomCodeHelpersGroupAppendMethodName.d.ts +1 -1
  39. package/typings/src/types/custom-code-helpers/TCustomCodeHelpersGroupAppendMethods.d.ts +1 -1
  40. package/typings/src/types/node/TNodeWithLexicalScope.d.ts +1 -1
  41. package/typings/src/types/node/TNodeWithLexicalScopeStatements.d.ts +1 -1
  42. package/typings/src/types/node/TNodeWithSingleStatementBody.d.ts +1 -1
  43. package/typings/src/types/node/TNodeWithStatements.d.ts +1 -1
  44. package/typings/src/types/node/TNumberLiteralNode.d.ts +1 -1
  45. package/typings/src/types/node/TNumericalExpressionDataToNodeConverterLiteralNodeGetter.d.ts +1 -1
  46. package/typings/src/types/node/TObfuscatingGuard.d.ts +1 -1
  47. package/typings/src/types/node/TScopeIdentifiersTraverserCallback.d.ts +1 -1
  48. package/typings/src/types/node/TStatement.d.ts +1 -1
  49. package/typings/src/types/node/TStringLiteralNode.d.ts +1 -1
  50. package/typings/src/types/node-transformers/TVisitorDirection.d.ts +1 -1
  51. package/typings/src/types/node-transformers/TVisitorFunction.d.ts +1 -1
  52. package/typings/src/types/node-transformers/TVisitorResult.d.ts +1 -1
  53. package/typings/src/types/node-transformers/string-array-transformers/TStringArrayScopeCallsWrappersDataByEncoding.d.ts +1 -1
  54. package/typings/src/types/options/TInputCLIOptions.d.ts +1 -1
  55. package/typings/src/types/options/TInputOptions.d.ts +1 -1
  56. package/typings/src/types/options/TOptionsNormalizerRule.d.ts +1 -1
  57. package/typings/src/types/options/TOptionsPreset.d.ts +1 -1
  58. package/typings/src/types/options/TRenamePropertiesMode.d.ts +1 -1
  59. package/typings/src/types/options/TStringArrayEncoding.d.ts +1 -1
  60. package/typings/src/types/options/TStringArrayIndexesType.d.ts +1 -1
  61. package/typings/src/types/options/TStringArrayWrappersType.d.ts +1 -1
  62. package/typings/src/types/storages/TCustomCodeHelperGroupStorage.d.ts +1 -1
  63. package/typings/src/types/utils/TTransformersRelationEdge.d.ts +1 -1
  64. package/typings/src/types/utils/TTypeFromEnum.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javascript-obfuscator",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "JavaScript obfuscator",
5
5
  "keywords": [
6
6
  "obfuscator",
@@ -12,7 +12,7 @@
12
12
  "js obfuscator"
13
13
  ],
14
14
  "engines": {
15
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
15
+ "node": "^12.22.0 || ^14.0.0 || ^16.0.0 || ^17.0.0 || >=18.0.0"
16
16
  },
17
17
  "main": "dist/index.js",
18
18
  "browser": "dist/index.browser.js",
@@ -23,19 +23,19 @@
23
23
  "dependencies": {
24
24
  "@javascript-obfuscator/escodegen": "2.3.0",
25
25
  "@javascript-obfuscator/estraverse": "5.4.0",
26
- "acorn": "8.7.0",
26
+ "acorn": "8.8.2",
27
27
  "assert": "2.0.0",
28
28
  "chalk": "4.1.2",
29
- "chance": "1.1.8",
29
+ "chance": "1.1.9",
30
30
  "class-validator": "0.14.0",
31
- "commander": "9.0.0",
32
- "eslint-scope": "7.1.0",
33
- "eslint-visitor-keys": "3.2.0",
31
+ "commander": "10.0.0",
32
+ "eslint-scope": "7.1.1",
33
+ "eslint-visitor-keys": "3.3.0",
34
34
  "fast-deep-equal": "3.1.3",
35
35
  "inversify": "6.0.1",
36
36
  "js-string-escape": "1.0.1",
37
37
  "md5": "2.3.0",
38
- "mkdirp": "1.0.4",
38
+ "mkdirp": "2.1.3",
39
39
  "multimatch": "5.0.0",
40
40
  "opencollective-postinstall": "2.0.3",
41
41
  "process": "0.11.10",
@@ -43,57 +43,57 @@
43
43
  "source-map-support": "0.5.21",
44
44
  "string-template": "1.0.0",
45
45
  "stringz": "2.1.0",
46
- "tslib": "2.3.1"
46
+ "tslib": "2.5.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@istanbuljs/nyc-config-typescript": "1.0.2",
50
- "@types/chai": "4.3.0",
50
+ "@types/chai": "4.3.4",
51
51
  "@types/chance": "1.1.3",
52
52
  "@types/escodegen": "0.0.7",
53
- "@types/eslint-scope": "3.7.3",
53
+ "@types/eslint-scope": "3.7.4",
54
54
  "@types/eslint-visitor-keys": "1.0.0",
55
- "@types/estraverse": "5.1.1",
55
+ "@types/estraverse": "5.1.2",
56
56
  "@types/estree": "0.0.51",
57
57
  "@types/js-beautify": "1.13.3",
58
58
  "@types/js-string-escape": "1.0.1",
59
- "@types/md5": "2.3.1",
59
+ "@types/md5": "2.3.2",
60
60
  "@types/mkdirp": "1.0.2",
61
- "@types/mocha": "9.1.0",
61
+ "@types/mocha": "10.0.1",
62
62
  "@types/multimatch": "4.0.0",
63
- "@types/node": "17.0.15",
63
+ "@types/node": "18.13.0",
64
64
  "@types/rimraf": "3.0.2",
65
- "@types/sinon": "10.0.10",
65
+ "@types/sinon": "10.0.13",
66
66
  "@types/string-template": "1.0.2",
67
- "@types/webpack-env": "1.16.3",
68
- "@typescript-eslint/eslint-plugin": "5.10.2",
69
- "@typescript-eslint/parser": "5.10.2",
70
- "chai": "4.3.6",
67
+ "@types/webpack-env": "1.18.0",
68
+ "@typescript-eslint/eslint-plugin": "5.51.0",
69
+ "@typescript-eslint/parser": "5.51.0",
70
+ "chai": "4.3.7",
71
71
  "chai-exclude": "2.1.0",
72
72
  "cross-env": "7.0.3",
73
- "eslint": "8.8.0",
74
- "eslint-plugin-import": "2.25.4",
75
- "eslint-plugin-jsdoc": "37.7.1",
73
+ "eslint": "8.34.0",
74
+ "eslint-plugin-import": "2.27.5",
75
+ "eslint-plugin-jsdoc": "40.0.0",
76
76
  "eslint-plugin-no-null": "1.0.2",
77
77
  "eslint-plugin-prefer-arrow": "1.2.3",
78
- "eslint-plugin-unicorn": "40.1.0",
79
- "eslint-webpack-plugin": "3.1.1",
80
- "fork-ts-checker-notifier-webpack-plugin": "4.0.0",
81
- "fork-ts-checker-webpack-plugin": "7.0.0",
82
- "husky": "7.0.4",
83
- "js-beautify": "1.14.0",
84
- "mocha": "9.2.0",
78
+ "eslint-plugin-unicorn": "45.0.2",
79
+ "eslint-webpack-plugin": "4.0.0",
80
+ "fork-ts-checker-notifier-webpack-plugin": "6.0.0",
81
+ "fork-ts-checker-webpack-plugin": "7.3.0",
82
+ "husky": "8.0.3",
83
+ "js-beautify": "1.14.7",
84
+ "mocha": "10.2.0",
85
85
  "nyc": "15.1.0",
86
86
  "pjson": "1.0.9",
87
- "rimraf": "3.0.2",
88
- "sinon": "13.0.1",
87
+ "rimraf": "4.1.2",
88
+ "sinon": "15.0.1",
89
89
  "source-map-resolve": "0.6.0",
90
- "terser": "5.10.0",
90
+ "terser": "5.16.3",
91
91
  "threads": "1.7.0",
92
- "ts-loader": "9.2.6",
93
- "ts-node": "10.4.0",
94
- "typescript": "4.5.5",
95
- "webpack": "5.68.0",
96
- "webpack-cli": "4.9.2",
92
+ "ts-loader": "9.4.2",
93
+ "ts-node": "10.9.1",
94
+ "typescript": "4.9.5",
95
+ "webpack": "5.75.0",
96
+ "webpack-cli": "5.0.1",
97
97
  "webpack-node-externals": "3.0.0"
98
98
  },
99
99
  "repository": {
@@ -111,10 +111,10 @@
111
111
  "test:devCompilePerformance": "ts-node test/dev/dev-compile-performance.ts",
112
112
  "test:devRuntimePerformance": "ts-node test/dev/dev-runtime-performance.ts",
113
113
  "test:full": "yarn run test:dev && yarn run test:mocha-coverage && yarn run test:mocha-memory-performance",
114
- "test:mocha": "mocha --require ts-node/register --require source-map-support/register test/index.spec.ts --exit",
114
+ "test:mocha": "mocha --require source-map-support/register test/index.spec.ts --exit",
115
115
  "test:mocha-coverage": "NODE_OPTIONS=--max-old-space-size=4096 nyc --reporter text-summary --no-clean yarn run test:mocha",
116
116
  "test:mocha-coverage:report": "nyc report --reporter=lcov",
117
- "test:mocha-memory-performance": "cross-env NODE_OPTIONS=--max-old-space-size=240 mocha --require ts-node/register test/performance-tests/JavaScriptObfuscatorMemory.spec.ts",
117
+ "test:mocha-memory-performance": "cross-env NODE_OPTIONS=--max-old-space-size=280 mocha test/performance-tests/JavaScriptObfuscatorMemory.spec.ts",
118
118
  "test": "yarn run test:full",
119
119
  "eslint": "eslint src/**/*.ts",
120
120
  "git:addFiles": "git add .",
@@ -3,7 +3,7 @@ import { TInputOptions } from './src/types/options/TInputOptions';
3
3
  import { TObfuscationResultsObject } from './src/types/TObfuscationResultsObject';
4
4
  import { TOptionsPreset } from './src/types/options/TOptionsPreset';
5
5
  import { IObfuscationResult } from './src/interfaces/source-code/IObfuscationResult';
6
- export declare type ObfuscatorOptions = TInputOptions;
6
+ export type ObfuscatorOptions = TInputOptions;
7
7
  export interface ObfuscationResult extends IObfuscationResult {
8
8
  }
9
9
  export declare function obfuscate(sourceCode: string, inputOptions?: ObfuscatorOptions): ObfuscationResult;
@@ -1 +1 @@
1
- export declare const ecmaVersion: 10 | 3 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022;
1
+ export declare const ecmaVersion: 10 | 3 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023;
@@ -1 +1 @@
1
- export declare type TConstructor<TArgs extends any[], TInstanceType> = new (...args: TArgs) => TInstanceType;
1
+ export type TConstructor<TArgs extends any[], TInstanceType> = new (...args: TArgs) => TInstanceType;
@@ -1,3 +1,3 @@
1
- export declare type TDictionary<T = unknown> = {
1
+ export type TDictionary<T = unknown> = {
2
2
  [key: string]: T;
3
3
  };
@@ -1,5 +1,5 @@
1
1
  import { TIdentifierNamesCacheDictionary } from './TIdentifierNamesCacheDictionary';
2
- export declare type TIdentifierNamesCache = {
2
+ export type TIdentifierNamesCache = {
3
3
  globalIdentifiers?: TIdentifierNamesCacheDictionary;
4
4
  propertyIdentifiers?: TIdentifierNamesCacheDictionary;
5
5
  } | null;
@@ -1,2 +1,2 @@
1
1
  import { TDictionary } from './TDictionary';
2
- export declare type TIdentifierNamesCacheDictionary = TDictionary<string>;
2
+ export type TIdentifierNamesCacheDictionary = TDictionary<string>;
@@ -1,2 +1,2 @@
1
1
  import { IInitializable } from '../interfaces/IInitializable';
2
- export declare type TInitialData<TClass extends IInitializable> = Parameters<TClass['initialize']>;
2
+ export type TInitialData<TClass extends IInitializable> = Parameters<TClass['initialize']>;
@@ -1,4 +1,4 @@
1
1
  import { IObfuscationResult } from '../interfaces/source-code/IObfuscationResult';
2
- export declare type TObfuscationResultsObject<TSourceCodesObject> = {
2
+ export type TObfuscationResultsObject<TSourceCodesObject> = {
3
3
  [key in keyof TSourceCodesObject]: IObfuscationResult;
4
4
  };
@@ -1 +1 @@
1
- export declare type TObjectMembersCallsChain = (string | number)[];
1
+ export type TObjectMembersCallsChain = (string | number)[];
@@ -1 +1 @@
1
- export declare type TNumberNumericalExpressionData = (number | number[])[];
1
+ export type TNumberNumericalExpressionData = (number | number[])[];
@@ -1 +1 @@
1
- export declare type TCLISanitizer<T> = (value: string) => T;
1
+ export type TCLISanitizer<T> = (value: string) => T;
@@ -1,3 +1,3 @@
1
1
  import { ICalleeDataExtractor } from '../../../interfaces/analyzers/calls-graph-analyzer/ICalleeDataExtractor';
2
2
  import { CalleeDataExtractor } from '../../../enums/analyzers/calls-graph-analyzer/CalleeDataExtractor';
3
- export declare type TCalleeDataExtractorFactory = (calleeDataExtractorName: CalleeDataExtractor) => ICalleeDataExtractor;
3
+ export type TCalleeDataExtractorFactory = (calleeDataExtractorName: CalleeDataExtractor) => ICalleeDataExtractor;
@@ -1,3 +1,3 @@
1
1
  import { ICodeTransformer } from '../../../interfaces/code-transformers/ICodeTransformer';
2
2
  import { CodeTransformer } from '../../../enums/code-transformers/CodeTransformer';
3
- export declare type TCodeTransformerFactory = (codeTransformerName: CodeTransformer) => ICodeTransformer;
3
+ export type TCodeTransformerFactory = (codeTransformerName: CodeTransformer) => ICodeTransformer;
@@ -1,3 +1,3 @@
1
1
  import { ICustomCodeHelper } from '../../../interfaces/custom-code-helpers/ICustomCodeHelper';
2
2
  import { CustomCodeHelper } from '../../../enums/custom-code-helpers/CustomCodeHelper';
3
- export declare type TCustomCodeHelperFactory = <TInitialData extends unknown[] = unknown[]>(customCodeHelperName: CustomCodeHelper) => ICustomCodeHelper<TInitialData>;
3
+ export type TCustomCodeHelperFactory = <TInitialData extends unknown[] = unknown[]>(customCodeHelperName: CustomCodeHelper) => ICustomCodeHelper<TInitialData>;
@@ -1,3 +1,3 @@
1
1
  import { ICustomCodeHelperGroup } from '../../../interfaces/custom-code-helpers/ICustomCodeHelperGroup';
2
2
  import { CustomCodeHelperGroup } from '../../../enums/custom-code-helpers/CustomCodeHelperGroup';
3
- export declare type TCustomCodeHelperGroupFactory = (customCodeHelperGroupName: CustomCodeHelperGroup) => ICustomCodeHelperGroup;
3
+ export type TCustomCodeHelperGroupFactory = (customCodeHelperGroupName: CustomCodeHelperGroup) => ICustomCodeHelperGroup;
@@ -1,3 +1,3 @@
1
1
  import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode';
2
2
  import { ControlFlowCustomNode } from '../../../enums/custom-nodes/ControlFlowCustomNode';
3
- export declare type TControlFlowCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(controlFlowCustomNodeName: ControlFlowCustomNode) => ICustomNode<TInitialData>;
3
+ export type TControlFlowCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(controlFlowCustomNodeName: ControlFlowCustomNode) => ICustomNode<TInitialData>;
@@ -1,3 +1,3 @@
1
1
  import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode';
2
2
  import { DeadCodeInjectionCustomNode } from '../../../enums/custom-nodes/DeadCodeInjectionCustomNode';
3
- export declare type TDeadNodeInjectionCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(deadCodeInjectionCustomNodeName: DeadCodeInjectionCustomNode) => ICustomNode<TInitialData>;
3
+ export type TDeadNodeInjectionCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(deadCodeInjectionCustomNodeName: DeadCodeInjectionCustomNode) => ICustomNode<TInitialData>;
@@ -1,3 +1,3 @@
1
1
  import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode';
2
2
  import { ObjectExpressionKeysTransformerCustomNode } from '../../../enums/custom-nodes/ObjectExpressionKeysTransformerCustomNode';
3
- export declare type TObjectExpressionKeysTransformerCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(objectExpressionKeysTransformerNodeName: ObjectExpressionKeysTransformerCustomNode) => ICustomNode<TInitialData>;
3
+ export type TObjectExpressionKeysTransformerCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(objectExpressionKeysTransformerNodeName: ObjectExpressionKeysTransformerCustomNode) => ICustomNode<TInitialData>;
@@ -1,3 +1,3 @@
1
1
  import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode';
2
2
  import { StringArrayCustomNode } from '../../../enums/custom-nodes/StringArrayCustomNode';
3
- export declare type TStringArrayCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(stringArrayCustomNodeName: StringArrayCustomNode) => ICustomNode<TInitialData>;
3
+ export type TStringArrayCustomNodeFactory = <TInitialData extends unknown[] = unknown[]>(stringArrayCustomNodeName: StringArrayCustomNode) => ICustomNode<TInitialData>;
@@ -1,3 +1,3 @@
1
1
  import { IStringArrayIndexNode } from '../../../../interfaces/custom-nodes/string-array-nodes/IStringArrayIndexNode';
2
2
  import { StringArrayIndexNode } from '../../../../enums/custom-nodes/string-array-index-nodes/StringArrayIndexNode';
3
- export declare type TStringArrayIndexNodeFactory = (stringArrayIndexNodeName: StringArrayIndexNode) => IStringArrayIndexNode;
3
+ export type TStringArrayIndexNodeFactory = (stringArrayIndexNodeName: StringArrayIndexNode) => IStringArrayIndexNode;
@@ -1,3 +1,3 @@
1
1
  import { IIdentifierNamesGenerator } from '../../../interfaces/generators/identifier-names-generators/IIdentifierNamesGenerator';
2
2
  import { IOptions } from '../../../interfaces/options/IOptions';
3
- export declare type TIdentifierNamesGeneratorFactory = (options: IOptions) => IIdentifierNamesGenerator;
3
+ export type TIdentifierNamesGeneratorFactory = (options: IOptions) => IIdentifierNamesGenerator;
@@ -1,3 +1,3 @@
1
1
  import { IControlFlowReplacer } from '../../../interfaces/node-transformers/control-flow-transformers/IControlFlowReplacer';
2
2
  import { ControlFlowReplacer } from '../../../enums/node-transformers/control-flow-transformers/control-flow-replacers/ControlFlowReplacer';
3
- export declare type TControlFlowReplacerFactory = (replacer: ControlFlowReplacer) => IControlFlowReplacer;
3
+ export type TControlFlowReplacerFactory = (replacer: ControlFlowReplacer) => IControlFlowReplacer;
@@ -1,2 +1,2 @@
1
1
  import { IControlFlowStorage } from '../../../interfaces/storages/control-flow-transformers/IControlFlowStorage';
2
- export declare type TControlFlowStorageFactory = () => IControlFlowStorage;
2
+ export type TControlFlowStorageFactory = () => IControlFlowStorage;
@@ -1,3 +1,3 @@
1
1
  import { TControlFlowStorageFactory } from './TControlFlowStorageFactory';
2
2
  import { ControlFlowStorage } from '../../../enums/storages/ControlFlowStorage';
3
- export declare type TControlFlowStorageFactoryCreator = (controlFlowStorageName: ControlFlowStorage) => TControlFlowStorageFactory;
3
+ export type TControlFlowStorageFactoryCreator = (controlFlowStorageName: ControlFlowStorage) => TControlFlowStorageFactory;
@@ -1,3 +1,3 @@
1
1
  import { INodeTransformer } from '../../../interfaces/node-transformers/INodeTransformer';
2
2
  import { NodeTransformer } from '../../../enums/node-transformers/NodeTransformer';
3
- export declare type TNodeTransformerFactory = (nodeTransformerName: NodeTransformer) => INodeTransformer;
3
+ export type TNodeTransformerFactory = (nodeTransformerName: NodeTransformer) => INodeTransformer;
@@ -1,3 +1,3 @@
1
1
  import { IObfuscatingGuard } from '../../../interfaces/node-transformers/preparing-transformers/obfuscating-guards/IObfuscatingGuard';
2
2
  import { ObfuscatingGuard } from '../../../enums/node-transformers/preparing-transformers/obfuscating-guards/ObfuscatingGuard';
3
- export declare type TObfuscatingGuardFactory = (nodeGuard: ObfuscatingGuard) => IObfuscatingGuard;
3
+ export type TObfuscatingGuardFactory = (nodeGuard: ObfuscatingGuard) => IObfuscatingGuard;
@@ -1,3 +1,3 @@
1
1
  import { IObjectExpressionExtractor } from '../../../interfaces/node-transformers/converting-transformers/object-expression-extractors/IObjectExpressionExtractor';
2
2
  import { ObjectExpressionExtractor } from '../../../enums/node-transformers/converting-transformers/properties-extractors/ObjectExpressionExtractor';
3
- export declare type TObjectExpressionExtractorFactory = (objectExpressionExtractorName: ObjectExpressionExtractor) => IObjectExpressionExtractor;
3
+ export type TObjectExpressionExtractorFactory = (objectExpressionExtractorName: ObjectExpressionExtractor) => IObjectExpressionExtractor;
@@ -1,2 +1,2 @@
1
1
  import { IObfuscationResult } from '../../../interfaces/source-code/IObfuscationResult';
2
- export declare type TObfuscationResultFactory = (obfuscatedCode: string, sourceMap: string) => IObfuscationResult;
2
+ export type TObfuscationResultFactory = (obfuscatedCode: string, sourceMap: string) => IObfuscationResult;
@@ -1,2 +1,2 @@
1
1
  import { NodeTransformationStage } from '../../enums/node-transformers/NodeTransformationStage';
2
- export declare type TCustomCodeHelpersGroupAppendMethodName = `appendOn${Capitalize<NodeTransformationStage>}Stage`;
2
+ export type TCustomCodeHelpersGroupAppendMethodName = `appendOn${Capitalize<NodeTransformationStage>}Stage`;
@@ -1,6 +1,6 @@
1
1
  import { TCustomCodeHelpersGroupAppendMethodName } from './TCustomCodeHelpersGroupAppendMethodName';
2
2
  import { TNodeWithStatements } from '../node/TNodeWithStatements';
3
3
  import { ICallsGraphData } from '../../interfaces/analyzers/calls-graph-analyzer/ICallsGraphData';
4
- export declare type TCustomCodeHelpersGroupAppendMethods = {
4
+ export type TCustomCodeHelpersGroupAppendMethods = {
5
5
  [key in TCustomCodeHelpersGroupAppendMethodName]?: (nodeWithStatements: TNodeWithStatements, callsGraphData: ICallsGraphData[]) => void;
6
6
  };
@@ -1,2 +1,2 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TNodeWithLexicalScope = ESTree.Program | ESTree.Function;
2
+ export type TNodeWithLexicalScope = ESTree.Program | ESTree.Function;
@@ -1,2 +1,2 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TNodeWithLexicalScopeStatements = ESTree.Program | ESTree.BlockStatement;
2
+ export type TNodeWithLexicalScopeStatements = ESTree.Program | ESTree.BlockStatement;
@@ -1,5 +1,5 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TNodeWithSingleStatementBody = (ESTree.LabeledStatement | ESTree.WithStatement | ESTree.WhileStatement | ESTree.DoWhileStatement | ESTree.ForStatement | ESTree.ForInStatement | ESTree.ForOfStatement & {
2
+ export type TNodeWithSingleStatementBody = (ESTree.LabeledStatement | ESTree.WithStatement | ESTree.WhileStatement | ESTree.DoWhileStatement | ESTree.ForStatement | ESTree.ForInStatement | ESTree.ForOfStatement & {
3
3
  body: Exclude<ESTree.Statement, ESTree.BlockStatement>;
4
4
  }) | (ESTree.IfStatement & {
5
5
  consequent: Exclude<ESTree.Statement, ESTree.BlockStatement>;
@@ -1,2 +1,2 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TNodeWithStatements = ESTree.Program | ESTree.BlockStatement | ESTree.SwitchCase;
2
+ export type TNodeWithStatements = ESTree.Program | ESTree.BlockStatement | ESTree.SwitchCase;
@@ -1,4 +1,4 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TNumberLiteralNode = ESTree.Literal & {
2
+ export type TNumberLiteralNode = ESTree.Literal & {
3
3
  value: number;
4
4
  };
@@ -1,2 +1,2 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TNumericalExpressionDataToNodeConverterLiteralNodeGetter = (number: number, isPositiveNumber: boolean) => ESTree.Expression;
2
+ export type TNumericalExpressionDataToNodeConverterLiteralNodeGetter = (number: number, isPositiveNumber: boolean) => ESTree.Expression;
@@ -1,3 +1,3 @@
1
1
  import * as ESTree from 'estree';
2
2
  import { ObfuscatingGuardResult } from '../../enums/node/ObfuscatingGuardResult';
3
- export declare type TObfuscatingGuard = (node: ESTree.Node) => ObfuscatingGuardResult;
3
+ export type TObfuscatingGuard = (node: ESTree.Node) => ObfuscatingGuardResult;
@@ -1 +1 @@
1
- export declare type TScopeIdentifiersTraverserCallback<TData> = (data: TData) => void;
1
+ export type TScopeIdentifiersTraverserCallback<TData> = (data: TData) => void;
@@ -1,2 +1,2 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TStatement = ESTree.Statement | ESTree.ModuleDeclaration;
2
+ export type TStatement = ESTree.Statement | ESTree.ModuleDeclaration;
@@ -1,4 +1,4 @@
1
1
  import * as ESTree from 'estree';
2
- export declare type TStringLiteralNode = ESTree.Literal & {
2
+ export type TStringLiteralNode = ESTree.Literal & {
3
3
  value: string;
4
4
  };
@@ -1 +1 @@
1
- export declare type TVisitorDirection = 'enter' | 'leave';
1
+ export type TVisitorDirection = 'enter' | 'leave';
@@ -1,3 +1,3 @@
1
1
  import * as ESTree from 'estree';
2
2
  import { TVisitorResult } from './TVisitorResult';
3
- export declare type TVisitorFunction = (node: ESTree.Node, parentNode: ESTree.Node | null) => TVisitorResult;
3
+ export type TVisitorFunction = (node: ESTree.Node, parentNode: ESTree.Node | null) => TVisitorResult;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="estraverse" />
2
2
  import * as estraverse from '@javascript-obfuscator/estraverse';
3
3
  import * as ESTree from 'estree';
4
- export declare type TVisitorResult = ESTree.Node | estraverse.VisitorOption | void;
4
+ export type TVisitorResult = ESTree.Node | estraverse.VisitorOption | void;
@@ -1,5 +1,5 @@
1
1
  import { TStringArrayEncoding } from '../../options/TStringArrayEncoding';
2
2
  import { IStringArrayScopeCallsWrappersData } from '../../../interfaces/node-transformers/string-array-transformers/IStringArrayScopeCallsWrappersData';
3
- export declare type TStringArrayScopeCallsWrappersDataByEncoding = Partial<{
3
+ export type TStringArrayScopeCallsWrappersDataByEncoding = Partial<{
4
4
  [key in TStringArrayEncoding]: IStringArrayScopeCallsWrappersData;
5
5
  }>;
@@ -1,3 +1,3 @@
1
1
  import { TDictionary } from '../TDictionary';
2
2
  import { ICLIOptions } from '../../interfaces/options/ICLIOptions';
3
- export declare type TInputCLIOptions = Partial<Pick<ICLIOptions, keyof ICLIOptions>> & TDictionary;
3
+ export type TInputCLIOptions = Partial<Pick<ICLIOptions, keyof ICLIOptions>> & TDictionary;
@@ -1,3 +1,3 @@
1
1
  import { TDictionary } from '../TDictionary';
2
2
  import { IOptions } from '../../interfaces/options/IOptions';
3
- export declare type TInputOptions = Partial<Pick<IOptions, keyof IOptions>> & TDictionary;
3
+ export type TInputOptions = Partial<Pick<IOptions, keyof IOptions>> & TDictionary;
@@ -1,2 +1,2 @@
1
1
  import { IOptions } from '../../interfaces/options/IOptions';
2
- export declare type TOptionsNormalizerRule = (options: IOptions) => IOptions;
2
+ export type TOptionsNormalizerRule = (options: IOptions) => IOptions;
@@ -1,3 +1,3 @@
1
1
  import { TTypeFromEnum } from '../utils/TTypeFromEnum';
2
2
  import { OptionsPreset } from '../../enums/options/presets/OptionsPreset';
3
- export declare type TOptionsPreset = TTypeFromEnum<typeof OptionsPreset>;
3
+ export type TOptionsPreset = TTypeFromEnum<typeof OptionsPreset>;
@@ -1,3 +1,3 @@
1
1
  import { TTypeFromEnum } from '../utils/TTypeFromEnum';
2
2
  import { RenamePropertiesMode } from '../../enums/node-transformers/rename-properties-transformers/RenamePropertiesMode';
3
- export declare type TRenamePropertiesMode = TTypeFromEnum<typeof RenamePropertiesMode>;
3
+ export type TRenamePropertiesMode = TTypeFromEnum<typeof RenamePropertiesMode>;
@@ -1,3 +1,3 @@
1
1
  import { TTypeFromEnum } from '../utils/TTypeFromEnum';
2
2
  import { StringArrayEncoding } from '../../enums/node-transformers/string-array-transformers/StringArrayEncoding';
3
- export declare type TStringArrayEncoding = TTypeFromEnum<typeof StringArrayEncoding>;
3
+ export type TStringArrayEncoding = TTypeFromEnum<typeof StringArrayEncoding>;
@@ -1,3 +1,3 @@
1
1
  import { TTypeFromEnum } from '../utils/TTypeFromEnum';
2
2
  import { StringArrayIndexesType } from '../../enums/node-transformers/string-array-transformers/StringArrayIndexesType';
3
- export declare type TStringArrayIndexesType = TTypeFromEnum<typeof StringArrayIndexesType>;
3
+ export type TStringArrayIndexesType = TTypeFromEnum<typeof StringArrayIndexesType>;
@@ -1,3 +1,3 @@
1
1
  import { TTypeFromEnum } from '../utils/TTypeFromEnum';
2
2
  import { StringArrayWrappersType } from '../../enums/node-transformers/string-array-transformers/StringArrayWrappersType';
3
- export declare type TStringArrayWrappersType = TTypeFromEnum<typeof StringArrayWrappersType>;
3
+ export type TStringArrayWrappersType = TTypeFromEnum<typeof StringArrayWrappersType>;
@@ -1,3 +1,3 @@
1
1
  import { ICustomCodeHelperGroup } from '../../interfaces/custom-code-helpers/ICustomCodeHelperGroup';
2
2
  import { IMapStorage } from '../../interfaces/storages/IMapStorage';
3
- export declare type TCustomCodeHelperGroupStorage = IMapStorage<string, ICustomCodeHelperGroup>;
3
+ export type TCustomCodeHelperGroupStorage = IMapStorage<string, ICustomCodeHelperGroup>;
@@ -1,4 +1,4 @@
1
- export declare type TTransformersRelationEdge<TTransformerName extends string> = [
1
+ export type TTransformersRelationEdge<TTransformerName extends string> = [
2
2
  transformerNameA: TTransformerName,
3
3
  transformerNameB: TTransformerName | null
4
4
  ];
@@ -1 +1 @@
1
- export declare type TTypeFromEnum<T extends object> = (T)[keyof T];
1
+ export type TTypeFromEnum<T extends object> = (T)[keyof T];