@delance/builder 0.2.3 → 0.2.5
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/README.md +11 -9
- package/dist/cli.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +126 -79
- package/dist/transform/delance/antifeature.d.ts +19 -0
- package/dist/transform/delance/index.d.ts +5 -0
- package/dist/transform/delance/stringaes.d.ts +11 -0
- package/dist/transform/esmodule/esmodule-flag.d.ts +17 -0
- package/dist/transform/esmodule/index.d.ts +5 -0
- package/dist/transform/esmodule/indirect-call.d.ts +20 -0
- package/dist/transform/esmodule/module-helper.d.ts +12 -0
- package/dist/transform/index.d.ts +2 -0
- package/dist/transform/syntactic/early-init.d.ts +11 -0
- package/dist/transform/syntactic/index.d.ts +5 -0
- package/dist/transform/syntactic/template-literal.d.ts +8 -0
- package/dist/transform/webcrack/index.d.ts +5 -0
- package/dist/utils/ast.d.ts +12 -0
- package/dist/utils/colors.d.ts +26 -0
- package/dist/utils/crypto.d.ts +4 -0
- package/dist/utils/matchers/chunk.d.ts +9 -0
- package/dist/utils/matchers/createBinding.d.ts +39 -0
- package/dist/utils/matchers/exportStar.d.ts +12 -0
- package/dist/utils/matchers/importDefault.d.ts +24 -0
- package/dist/utils/matchers/importStar.d.ts +16 -0
- package/dist/utils/matchers/setModuleDefault.d.ts +15 -0
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
[][
|
|
1
|
+
[][npm]
|
|
2
2
|
[][license]
|
|
3
3
|
[][builds]
|
|
4
|
-

|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
@delance/builder
|
|
7
|
+
================
|
|
8
8
|
A spear to the Python language server built with black magic.
|
|
9
9
|
|
|
10
10
|
**If you were trying to run the language server, see [@delance/runtime].**
|
|
@@ -12,12 +12,14 @@ A spear to the Python language server built with black magic.
|
|
|
12
12
|
## Usage
|
|
13
13
|
|
|
14
14
|
- API
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
```typescript
|
|
16
|
+
import run from '@delance/builder';
|
|
17
|
+
```
|
|
17
18
|
|
|
18
19
|
- CLI
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
```shell
|
|
21
|
+
bunx @delance/builder /path/to/extension/dist
|
|
22
|
+
```
|
|
21
23
|
|
|
22
24
|
## Contributing
|
|
23
25
|
|
|
@@ -88,6 +90,6 @@ SPDX-License-Identifier: 0BSD
|
|
|
88
90
|
PERFORMANCE OF THIS SOFTWARE.
|
|
89
91
|
|
|
90
92
|
[@delance/runtime]: https://npm.im/@delance/runtime
|
|
91
|
-
[
|
|
93
|
+
[npm]: https://npm.im/@delance/builder
|
|
92
94
|
[builds]: https://builds.sr.ht/~self/delance-builder?
|
|
93
95
|
[license]: ./LICENSE
|
package/dist/cli.d.ts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {getQuickJS, shouldInterruptAfterDeadline} from "quickjs-emscripten";
|
|
|
15
15
|
// /home/mochaa/ghq/git.sr.ht/~self/delance-builder/node_modules/webcrack/src/deobfuscate/index.ts
|
|
16
16
|
import debug3 from "debug";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
18
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/ast.ts
|
|
19
19
|
import * as t from "@babel/types";
|
|
20
20
|
function getPropName(node) {
|
|
21
21
|
if (t.isIdentifier(node)) {
|
|
@@ -28,7 +28,7 @@ function getPropName(node) {
|
|
|
28
28
|
return node.value.toString();
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
31
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/generator.ts
|
|
32
32
|
import babelGenerate from "@babel/generator";
|
|
33
33
|
function generate(ast, options = defaultOptions) {
|
|
34
34
|
return babelGenerate(ast, options).code;
|
|
@@ -45,14 +45,14 @@ function codePreview(node) {
|
|
|
45
45
|
return code;
|
|
46
46
|
}
|
|
47
47
|
var defaultOptions = { jsescOption: { minimal: true } };
|
|
48
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
48
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/inline.ts
|
|
49
49
|
import traverse4 from "@babel/traverse";
|
|
50
50
|
import * as t13 from "@babel/types";
|
|
51
51
|
|
|
52
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
52
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anyExpression.ts
|
|
53
53
|
import * as t2 from "@babel/types";
|
|
54
54
|
|
|
55
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
55
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/Matcher.ts
|
|
56
56
|
class Matcher {
|
|
57
57
|
match(value, keys = []) {
|
|
58
58
|
return this.matchValue(value, keys);
|
|
@@ -62,7 +62,7 @@ class Matcher {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
65
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anyExpression.ts
|
|
66
66
|
function anyExpression() {
|
|
67
67
|
return new AnyExpressionMatcher;
|
|
68
68
|
}
|
|
@@ -75,7 +75,7 @@ class AnyExpressionMatcher extends Matcher {
|
|
|
75
75
|
return t2.isNode(value) && t2.isExpression(value);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
78
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/utils/distributeAcrossSlices.ts
|
|
79
79
|
function* distributeAcrossSlices(slices, available) {
|
|
80
80
|
if (slices.length === 0) {
|
|
81
81
|
yield [];
|
|
@@ -95,7 +95,7 @@ function* distributeAcrossSlices(slices, available) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
98
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anything.ts
|
|
99
99
|
function anything() {
|
|
100
100
|
return new AnythingMatcher;
|
|
101
101
|
}
|
|
@@ -109,7 +109,7 @@ class AnythingMatcher extends Matcher {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
112
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/slice.ts
|
|
113
113
|
function zeroOrMore(matcher = anything()) {
|
|
114
114
|
return new SliceMatcher(0, Infinity, matcher);
|
|
115
115
|
}
|
|
@@ -148,7 +148,7 @@ class SliceMatcher extends Matcher {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
151
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anyList.ts
|
|
152
152
|
function anyList(...elements) {
|
|
153
153
|
return new AnyListMatcher(elements);
|
|
154
154
|
}
|
|
@@ -206,11 +206,11 @@ class AnyListMatcher extends Matcher {
|
|
|
206
206
|
return false;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
209
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anyNode.ts
|
|
210
210
|
import * as t3 from "@babel/types";
|
|
211
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
211
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anyStatement.ts
|
|
212
212
|
import * as t4 from "@babel/types";
|
|
213
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
213
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/anyString.ts
|
|
214
214
|
function anyString() {
|
|
215
215
|
return new StringMatcher;
|
|
216
216
|
}
|
|
@@ -223,7 +223,7 @@ class StringMatcher extends Matcher {
|
|
|
223
223
|
return typeof value === "string" || value instanceof String;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
226
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/arrayOf.ts
|
|
227
227
|
function arrayOf(elementMatcher) {
|
|
228
228
|
return new ArrayOfMatcher(elementMatcher);
|
|
229
229
|
}
|
|
@@ -246,7 +246,7 @@ class ArrayOfMatcher extends Matcher {
|
|
|
246
246
|
return true;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
249
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/capture.ts
|
|
250
250
|
function capture(matcher) {
|
|
251
251
|
return new CapturedMatcher(matcher);
|
|
252
252
|
}
|
|
@@ -278,7 +278,7 @@ class CapturedMatcher extends Matcher {
|
|
|
278
278
|
this._currentKeys = keys;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
281
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/containerOf.ts
|
|
282
282
|
import * as t5 from "@babel/types";
|
|
283
283
|
function containerOf(containedMatcher) {
|
|
284
284
|
return new ContainerOfMatcher(containedMatcher);
|
|
@@ -317,10 +317,10 @@ class ContainerOfMatcher extends CapturedMatcher {
|
|
|
317
317
|
import * as Babel from "@babel/core";
|
|
318
318
|
import * as t9 from "@babel/types";
|
|
319
319
|
|
|
320
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@utils&commit=
|
|
320
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@utils&commit=c39500f305f11f7fa_maxus7tddv3lwsqwoimmrkxkba/node_modules/@codemod/utils/src/NodeTypes.ts
|
|
321
321
|
import * as t6 from "@babel/types";
|
|
322
322
|
var { BUILDER_KEYS, NODE_FIELDS } = t6;
|
|
323
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@utils&commit=
|
|
323
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@utils&commit=c39500f305f11f7fa_maxus7tddv3lwsqwoimmrkxkba/node_modules/@codemod/utils/src/builders.ts
|
|
324
324
|
import traverse2 from "@babel/traverse";
|
|
325
325
|
import * as t7 from "@babel/types";
|
|
326
326
|
|
|
@@ -329,7 +329,7 @@ import {
|
|
|
329
329
|
parse as babelParse
|
|
330
330
|
} from "@babel/parser";
|
|
331
331
|
|
|
332
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@parser&commit=
|
|
332
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@parser&commit=c39500f305f11f7f_brbiajd6ladsmb4ocu2g3hzuam/node_modules/@codemod/parser/src/options.ts
|
|
333
333
|
var DefaultParserPlugins = new Set([
|
|
334
334
|
"asyncGenerators",
|
|
335
335
|
"bigInt",
|
|
@@ -359,7 +359,7 @@ var DefaultParserPlugins = new Set([
|
|
|
359
359
|
["pipelineOperator", { proposal: "minimal" }],
|
|
360
360
|
["recordAndTuple", { syntaxType: "hash" }]
|
|
361
361
|
]);
|
|
362
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@utils&commit=
|
|
362
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@utils&commit=c39500f305f11f7fa_maxus7tddv3lwsqwoimmrkxkba/node_modules/@codemod/utils/src/nodesEquivalent.ts
|
|
363
363
|
import * as t8 from "@babel/types";
|
|
364
364
|
function nodesEquivalent(a, b) {
|
|
365
365
|
if (a === b) {
|
|
@@ -405,7 +405,7 @@ function nodesEquivalent(a, b) {
|
|
|
405
405
|
}
|
|
406
406
|
return true;
|
|
407
407
|
}
|
|
408
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
408
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/fromCapture.ts
|
|
409
409
|
function fromCapture(capturedMatcher) {
|
|
410
410
|
return new FromCaptureMatcher(capturedMatcher);
|
|
411
411
|
}
|
|
@@ -423,10 +423,10 @@ class FromCaptureMatcher extends Matcher {
|
|
|
423
423
|
return this.capturedMatcher.current === value;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
426
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/function.ts
|
|
427
427
|
import * as t10 from "@babel/types";
|
|
428
428
|
|
|
429
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
429
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/tupleOf.ts
|
|
430
430
|
function tupleOf(...matchers) {
|
|
431
431
|
return new TupleOfMatcher(...matchers);
|
|
432
432
|
}
|
|
@@ -454,7 +454,7 @@ class TupleOfMatcher extends Matcher {
|
|
|
454
454
|
return true;
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
457
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/generated.ts
|
|
458
458
|
import * as t11 from "@babel/types";
|
|
459
459
|
function arrayExpression(elements) {
|
|
460
460
|
return new ArrayExpressionMatcher(elements);
|
|
@@ -815,6 +815,8 @@ class BreakStatementMatcher extends Matcher {
|
|
|
815
815
|
if (node.label !== null) {
|
|
816
816
|
return false;
|
|
817
817
|
}
|
|
818
|
+
} else if (node.label === null) {
|
|
819
|
+
return false;
|
|
818
820
|
} else if (!this.label.matchValue(node.label, [...keys, "label"])) {
|
|
819
821
|
return false;
|
|
820
822
|
}
|
|
@@ -967,6 +969,8 @@ class ClassPropertyMatcher extends Matcher {
|
|
|
967
969
|
if (node.value !== null) {
|
|
968
970
|
return false;
|
|
969
971
|
}
|
|
972
|
+
} else if (node.value === null) {
|
|
973
|
+
return false;
|
|
970
974
|
} else if (!this.value.matchValue(node.value, [...keys, "value"])) {
|
|
971
975
|
return false;
|
|
972
976
|
}
|
|
@@ -975,6 +979,8 @@ class ClassPropertyMatcher extends Matcher {
|
|
|
975
979
|
if (node.typeAnnotation !== null) {
|
|
976
980
|
return false;
|
|
977
981
|
}
|
|
982
|
+
} else if (node.typeAnnotation === null) {
|
|
983
|
+
return false;
|
|
978
984
|
} else if (!this.typeAnnotation.matchValue(node.typeAnnotation, [
|
|
979
985
|
...keys,
|
|
980
986
|
"typeAnnotation"
|
|
@@ -986,6 +992,8 @@ class ClassPropertyMatcher extends Matcher {
|
|
|
986
992
|
if (node.decorators !== null) {
|
|
987
993
|
return false;
|
|
988
994
|
}
|
|
995
|
+
} else if (node.decorators === null) {
|
|
996
|
+
return false;
|
|
989
997
|
} else if (Array.isArray(this.decorators)) {
|
|
990
998
|
if (!tupleOf(...this.decorators).matchValue(node.decorators, [
|
|
991
999
|
...keys,
|
|
@@ -1061,6 +1069,8 @@ class ContinueStatementMatcher extends Matcher {
|
|
|
1061
1069
|
if (node.label !== null) {
|
|
1062
1070
|
return false;
|
|
1063
1071
|
}
|
|
1072
|
+
} else if (node.label === null) {
|
|
1073
|
+
return false;
|
|
1064
1074
|
} else if (!this.label.matchValue(node.label, [...keys, "label"])) {
|
|
1065
1075
|
return false;
|
|
1066
1076
|
}
|
|
@@ -1134,6 +1144,8 @@ class ForStatementMatcher extends Matcher {
|
|
|
1134
1144
|
if (node.init !== null) {
|
|
1135
1145
|
return false;
|
|
1136
1146
|
}
|
|
1147
|
+
} else if (node.init === null) {
|
|
1148
|
+
return false;
|
|
1137
1149
|
} else if (!this.init.matchValue(node.init, [...keys, "init"])) {
|
|
1138
1150
|
return false;
|
|
1139
1151
|
}
|
|
@@ -1142,6 +1154,8 @@ class ForStatementMatcher extends Matcher {
|
|
|
1142
1154
|
if (node.test !== null) {
|
|
1143
1155
|
return false;
|
|
1144
1156
|
}
|
|
1157
|
+
} else if (node.test === null) {
|
|
1158
|
+
return false;
|
|
1145
1159
|
} else if (!this.test.matchValue(node.test, [...keys, "test"])) {
|
|
1146
1160
|
return false;
|
|
1147
1161
|
}
|
|
@@ -1150,6 +1164,8 @@ class ForStatementMatcher extends Matcher {
|
|
|
1150
1164
|
if (node.update !== null) {
|
|
1151
1165
|
return false;
|
|
1152
1166
|
}
|
|
1167
|
+
} else if (node.update === null) {
|
|
1168
|
+
return false;
|
|
1153
1169
|
} else if (!this.update.matchValue(node.update, [...keys, "update"])) {
|
|
1154
1170
|
return false;
|
|
1155
1171
|
}
|
|
@@ -1184,6 +1200,8 @@ class FunctionDeclarationMatcher extends Matcher {
|
|
|
1184
1200
|
if (node.id !== null) {
|
|
1185
1201
|
return false;
|
|
1186
1202
|
}
|
|
1203
|
+
} else if (node.id === null) {
|
|
1204
|
+
return false;
|
|
1187
1205
|
} else if (!this.id.matchValue(node.id, [...keys, "id"])) {
|
|
1188
1206
|
return false;
|
|
1189
1207
|
}
|
|
@@ -1245,6 +1263,8 @@ class FunctionExpressionMatcher extends Matcher {
|
|
|
1245
1263
|
if (node.id !== null) {
|
|
1246
1264
|
return false;
|
|
1247
1265
|
}
|
|
1266
|
+
} else if (node.id === null) {
|
|
1267
|
+
return false;
|
|
1248
1268
|
} else if (!this.id.matchValue(node.id, [...keys, "id"])) {
|
|
1249
1269
|
return false;
|
|
1250
1270
|
}
|
|
@@ -1331,6 +1351,8 @@ class IfStatementMatcher extends Matcher {
|
|
|
1331
1351
|
if (node.alternate !== null) {
|
|
1332
1352
|
return false;
|
|
1333
1353
|
}
|
|
1354
|
+
} else if (node.alternate === null) {
|
|
1355
|
+
return false;
|
|
1334
1356
|
} else if (!this.alternate.matchValue(node.alternate, [...keys, "alternate"])) {
|
|
1335
1357
|
return false;
|
|
1336
1358
|
}
|
|
@@ -1412,6 +1434,8 @@ class MemberExpressionMatcher extends Matcher {
|
|
|
1412
1434
|
if (node.optional !== null) {
|
|
1413
1435
|
return false;
|
|
1414
1436
|
}
|
|
1437
|
+
} else if (node.optional === null) {
|
|
1438
|
+
return false;
|
|
1415
1439
|
} else if (!this.optional.matchValue(node.optional, [...keys, "optional"])) {
|
|
1416
1440
|
return false;
|
|
1417
1441
|
}
|
|
@@ -1625,6 +1649,8 @@ class ObjectPropertyMatcher extends Matcher {
|
|
|
1625
1649
|
if (node.decorators !== null) {
|
|
1626
1650
|
return false;
|
|
1627
1651
|
}
|
|
1652
|
+
} else if (node.decorators === null) {
|
|
1653
|
+
return false;
|
|
1628
1654
|
} else if (Array.isArray(this.decorators)) {
|
|
1629
1655
|
if (!tupleOf(...this.decorators).matchValue(node.decorators, [
|
|
1630
1656
|
...keys,
|
|
@@ -1714,6 +1740,8 @@ class ReturnStatementMatcher extends Matcher {
|
|
|
1714
1740
|
if (node.argument !== null) {
|
|
1715
1741
|
return false;
|
|
1716
1742
|
}
|
|
1743
|
+
} else if (node.argument === null) {
|
|
1744
|
+
return false;
|
|
1717
1745
|
} else if (!this.argument.matchValue(node.argument, [...keys, "argument"])) {
|
|
1718
1746
|
return false;
|
|
1719
1747
|
}
|
|
@@ -1801,6 +1829,8 @@ class SwitchCaseMatcher extends Matcher {
|
|
|
1801
1829
|
if (node.test !== null) {
|
|
1802
1830
|
return false;
|
|
1803
1831
|
}
|
|
1832
|
+
} else if (node.test === null) {
|
|
1833
|
+
return false;
|
|
1804
1834
|
} else if (!this.test.matchValue(node.test, [...keys, "test"])) {
|
|
1805
1835
|
return false;
|
|
1806
1836
|
}
|
|
@@ -1924,6 +1954,8 @@ class TryStatementMatcher extends Matcher {
|
|
|
1924
1954
|
if (node.handler !== null) {
|
|
1925
1955
|
return false;
|
|
1926
1956
|
}
|
|
1957
|
+
} else if (node.handler === null) {
|
|
1958
|
+
return false;
|
|
1927
1959
|
} else if (!this.handler.matchValue(node.handler, [...keys, "handler"])) {
|
|
1928
1960
|
return false;
|
|
1929
1961
|
}
|
|
@@ -1932,6 +1964,8 @@ class TryStatementMatcher extends Matcher {
|
|
|
1932
1964
|
if (node.finalizer !== null) {
|
|
1933
1965
|
return false;
|
|
1934
1966
|
}
|
|
1967
|
+
} else if (node.finalizer === null) {
|
|
1968
|
+
return false;
|
|
1935
1969
|
} else if (!this.finalizer.matchValue(node.finalizer, [...keys, "finalizer"])) {
|
|
1936
1970
|
return false;
|
|
1937
1971
|
}
|
|
@@ -2071,6 +2105,8 @@ class VariableDeclaratorMatcher extends Matcher {
|
|
|
2071
2105
|
if (node.init !== null) {
|
|
2072
2106
|
return false;
|
|
2073
2107
|
}
|
|
2108
|
+
} else if (node.init === null) {
|
|
2109
|
+
return false;
|
|
2074
2110
|
} else if (!this.init.matchValue(node.init, [...keys, "init"])) {
|
|
2075
2111
|
return false;
|
|
2076
2112
|
}
|
|
@@ -2100,7 +2136,7 @@ class WhileStatementMatcher extends Matcher {
|
|
|
2100
2136
|
return true;
|
|
2101
2137
|
}
|
|
2102
2138
|
}
|
|
2103
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
2139
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/or.ts
|
|
2104
2140
|
function or(...matchersOrValues) {
|
|
2105
2141
|
return new OrMatcher(...matchersOrValues);
|
|
2106
2142
|
}
|
|
@@ -2124,7 +2160,7 @@ class OrMatcher extends Matcher {
|
|
|
2124
2160
|
return false;
|
|
2125
2161
|
}
|
|
2126
2162
|
}
|
|
2127
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=
|
|
2163
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=codemod-js+codemod+packages@matchers&commit=c39500f305f11f_3iorb4w7n35tk7jnwavk63eqh4/node_modules/@codemod/matchers/src/matchers/predicate.ts
|
|
2128
2164
|
function predicate(predicate2) {
|
|
2129
2165
|
return new PredicateMatcher(predicate2);
|
|
2130
2166
|
}
|
|
@@ -2139,7 +2175,7 @@ class PredicateMatcher extends Matcher {
|
|
|
2139
2175
|
return this.predicate(value);
|
|
2140
2176
|
}
|
|
2141
2177
|
}
|
|
2142
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2178
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/matcher.ts
|
|
2143
2179
|
import * as t12 from "@babel/types";
|
|
2144
2180
|
function infiniteLoop(body) {
|
|
2145
2181
|
return or(forStatement(undefined, null, undefined, body), forStatement(undefined, truthyMatcher, undefined, body), whileStatement(truthyMatcher, body));
|
|
@@ -2186,11 +2222,12 @@ function isTemporaryVariable(binding, references, kind = "var") {
|
|
|
2186
2222
|
var safeLiteral = predicate((node) => t12.isLiteral(node) && (!t12.isTemplateLiteral(node) || node.expressions.length === 0));
|
|
2187
2223
|
var iife = matchIife();
|
|
2188
2224
|
var emptyIife = matchIife([]);
|
|
2225
|
+
var undefinedMatcher = or(identifier("undefined"), unaryExpression("void", numericLiteral(0)));
|
|
2189
2226
|
var trueMatcher = or(booleanLiteral(true), unaryExpression("!", numericLiteral(0)), unaryExpression("!", unaryExpression("!", numericLiteral(1))), unaryExpression("!", unaryExpression("!", arrayExpression([]))));
|
|
2190
2227
|
var falseMatcher = or(booleanLiteral(false), unaryExpression("!", arrayExpression([])));
|
|
2191
2228
|
var truthyMatcher = or(trueMatcher, arrayExpression([]));
|
|
2192
2229
|
|
|
2193
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2230
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/inline.ts
|
|
2194
2231
|
function inlineVariable(binding, value = anyExpression(), unsafeAssignments = false) {
|
|
2195
2232
|
const varDeclarator = binding.path.node;
|
|
2196
2233
|
const varMatcher = variableDeclarator(identifier(binding.identifier.name), value);
|
|
@@ -2320,7 +2357,7 @@ function inlineVariableAliases(binding, targetName = binding.identifier.name) {
|
|
|
2320
2357
|
}
|
|
2321
2358
|
return state;
|
|
2322
2359
|
}
|
|
2323
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2360
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/rename.ts
|
|
2324
2361
|
import traverse6 from "@babel/traverse";
|
|
2325
2362
|
import * as t14 from "@babel/types";
|
|
2326
2363
|
function renameFast(binding, newName) {
|
|
@@ -2353,6 +2390,8 @@ function renameFast(binding, newName) {
|
|
|
2353
2390
|
},
|
|
2354
2391
|
noScope: true
|
|
2355
2392
|
});
|
|
2393
|
+
} else if (ref.isFunctionDeclaration() && t14.isIdentifier(ref.node.id)) {
|
|
2394
|
+
ref.node.id.name = newName;
|
|
2356
2395
|
} else {
|
|
2357
2396
|
throw new Error(`Unexpected constant violation (${ref.type}): ${codePreview(ref.node)}`);
|
|
2358
2397
|
}
|
|
@@ -2361,10 +2400,8 @@ function renameFast(binding, newName) {
|
|
|
2361
2400
|
binding.scope.bindings[newName] = binding;
|
|
2362
2401
|
binding.identifier.name = newName;
|
|
2363
2402
|
}
|
|
2364
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2365
|
-
import traverse8, {
|
|
2366
|
-
visitors
|
|
2367
|
-
} from "@babel/traverse";
|
|
2403
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/ast-utils/transform.ts
|
|
2404
|
+
import traverse8, {visitors} from "@babel/traverse";
|
|
2368
2405
|
import debug from "debug";
|
|
2369
2406
|
async function applyTransformAsync(ast, transform, options2) {
|
|
2370
2407
|
logger(`${transform.name}: started`);
|
|
@@ -2417,7 +2454,7 @@ function mergeTransforms(options2) {
|
|
|
2417
2454
|
};
|
|
2418
2455
|
}
|
|
2419
2456
|
var logger = debug("webcrack:transforms");
|
|
2420
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2457
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/merge-strings.ts
|
|
2421
2458
|
import * as t15 from "@babel/types";
|
|
2422
2459
|
var merge_strings_default = {
|
|
2423
2460
|
name: "merge-strings",
|
|
@@ -2449,7 +2486,7 @@ var merge_strings_default = {
|
|
|
2449
2486
|
}
|
|
2450
2487
|
};
|
|
2451
2488
|
|
|
2452
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2489
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/array-rotator.ts
|
|
2453
2490
|
function findArrayRotator(stringArray) {
|
|
2454
2491
|
const arrayIdentifier = capture(identifier());
|
|
2455
2492
|
const pushShift = callExpression(constMemberExpression(arrayIdentifier, "push"), [
|
|
@@ -2469,7 +2506,7 @@ function findArrayRotator(stringArray) {
|
|
|
2469
2506
|
}
|
|
2470
2507
|
}
|
|
2471
2508
|
|
|
2472
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2509
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/control-flow-object.ts
|
|
2473
2510
|
import * as t16 from "@babel/types";
|
|
2474
2511
|
var control_flow_object_default = {
|
|
2475
2512
|
name: "control-flow-object",
|
|
@@ -2589,7 +2626,7 @@ var control_flow_object_default = {
|
|
|
2589
2626
|
}
|
|
2590
2627
|
};
|
|
2591
2628
|
|
|
2592
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2629
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/control-flow-switch.ts
|
|
2593
2630
|
import * as t17 from "@babel/types";
|
|
2594
2631
|
var control_flow_switch_default = {
|
|
2595
2632
|
name: "control-flow-switch",
|
|
@@ -2624,7 +2661,7 @@ var control_flow_switch_default = {
|
|
|
2624
2661
|
}
|
|
2625
2662
|
};
|
|
2626
2663
|
|
|
2627
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2664
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/dead-code.ts
|
|
2628
2665
|
import * as t18 from "@babel/types";
|
|
2629
2666
|
var replace = function(path, node) {
|
|
2630
2667
|
if (t18.isBlockStatement(node)) {
|
|
@@ -2672,7 +2709,7 @@ var dead_code_default = {
|
|
|
2672
2709
|
}
|
|
2673
2710
|
};
|
|
2674
2711
|
|
|
2675
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2712
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/decoder.ts
|
|
2676
2713
|
import {expression} from "@babel/template";
|
|
2677
2714
|
function findDecoders(stringArray) {
|
|
2678
2715
|
const decoders = [];
|
|
@@ -2741,7 +2778,7 @@ class Decoder {
|
|
|
2741
2778
|
}
|
|
2742
2779
|
}
|
|
2743
2780
|
|
|
2744
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2781
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/inline-decoded-strings.ts
|
|
2745
2782
|
import * as t19 from "@babel/types";
|
|
2746
2783
|
var inline_decoded_strings_default = {
|
|
2747
2784
|
name: "inline-decoded-strings",
|
|
@@ -2763,7 +2800,7 @@ var inline_decoded_strings_default = {
|
|
|
2763
2800
|
}
|
|
2764
2801
|
};
|
|
2765
2802
|
|
|
2766
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2803
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/inline-decoder-wrappers.ts
|
|
2767
2804
|
var inline_decoder_wrappers_default = {
|
|
2768
2805
|
name: "inline-decoder-wrappers",
|
|
2769
2806
|
tags: ["unsafe"],
|
|
@@ -2780,7 +2817,7 @@ var inline_decoder_wrappers_default = {
|
|
|
2780
2817
|
}
|
|
2781
2818
|
};
|
|
2782
2819
|
|
|
2783
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2820
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/inline-object-props.ts
|
|
2784
2821
|
var inline_object_props_default = {
|
|
2785
2822
|
name: "inline-object-props",
|
|
2786
2823
|
tags: ["safe"],
|
|
@@ -2807,13 +2844,13 @@ var inline_object_props_default = {
|
|
|
2807
2844
|
}
|
|
2808
2845
|
};
|
|
2809
2846
|
|
|
2810
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2847
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/string-array.ts
|
|
2811
2848
|
import traverse10 from "@babel/traverse";
|
|
2812
2849
|
function findStringArray(ast2) {
|
|
2813
2850
|
let result;
|
|
2814
2851
|
const functionName = capture(anyString());
|
|
2815
2852
|
const arrayIdentifier = capture(identifier());
|
|
2816
|
-
const arrayExpression2 = capture(arrayExpression(arrayOf(stringLiteral())));
|
|
2853
|
+
const arrayExpression2 = capture(arrayExpression(arrayOf(or(stringLiteral(), undefinedMatcher))));
|
|
2817
2854
|
const functionAssignment = assignmentExpression("=", identifier(fromCapture(functionName)), functionExpression(undefined, [], blockStatement([returnStatement(fromCapture(arrayIdentifier))])));
|
|
2818
2855
|
const variableDeclaration2 = variableDeclaration(undefined, [
|
|
2819
2856
|
variableDeclarator(arrayIdentifier, arrayExpression2)
|
|
@@ -2857,7 +2894,7 @@ function findStringArray(ast2) {
|
|
|
2857
2894
|
return result;
|
|
2858
2895
|
}
|
|
2859
2896
|
|
|
2860
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2897
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/deobfuscate/vm.ts
|
|
2861
2898
|
import debug2 from "debug";
|
|
2862
2899
|
class VMDecoder {
|
|
2863
2900
|
decoders;
|
|
@@ -2916,10 +2953,12 @@ var deobfuscate_default = {
|
|
|
2916
2953
|
}
|
|
2917
2954
|
const vm2 = new VMDecoder(sandbox, stringArray, decoders, rotator);
|
|
2918
2955
|
state.changes += (await applyTransformAsync(ast2, inline_decoded_strings_default, { vm: vm2 })).changes;
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2956
|
+
if (decoders.length > 0) {
|
|
2957
|
+
stringArray.path.remove();
|
|
2958
|
+
rotator?.remove();
|
|
2959
|
+
decoders.forEach((decoder2) => decoder2.path.remove());
|
|
2960
|
+
state.changes += 2 + decoders.length;
|
|
2961
|
+
}
|
|
2923
2962
|
state.changes += applyTransforms(ast2, [merge_strings_default, dead_code_default, control_flow_object_default, control_flow_switch_default], { noScope: true }).changes;
|
|
2924
2963
|
}
|
|
2925
2964
|
};
|
|
@@ -3099,7 +3138,7 @@ __export(exports_transforms, {
|
|
|
3099
3138
|
}
|
|
3100
3139
|
});
|
|
3101
3140
|
|
|
3102
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3141
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/block-statements.ts
|
|
3103
3142
|
import * as t22 from "@babel/types";
|
|
3104
3143
|
var block_statements_default = {
|
|
3105
3144
|
name: "block-statements",
|
|
@@ -3137,7 +3176,7 @@ var block_statements_default = {
|
|
|
3137
3176
|
}
|
|
3138
3177
|
})
|
|
3139
3178
|
};
|
|
3140
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3179
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/computed-properties.ts
|
|
3141
3180
|
import {isIdentifierName} from "@babel/helper-validator-identifier";
|
|
3142
3181
|
import * as t23 from "@babel/types";
|
|
3143
3182
|
var computed_properties_default = {
|
|
@@ -3171,7 +3210,7 @@ var computed_properties_default = {
|
|
|
3171
3210
|
};
|
|
3172
3211
|
}
|
|
3173
3212
|
};
|
|
3174
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3213
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/for-to-while.ts
|
|
3175
3214
|
import * as t24 from "@babel/types";
|
|
3176
3215
|
var for_to_while_default = {
|
|
3177
3216
|
name: "for-to-while",
|
|
@@ -3190,7 +3229,7 @@ var for_to_while_default = {
|
|
|
3190
3229
|
};
|
|
3191
3230
|
}
|
|
3192
3231
|
};
|
|
3193
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3232
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/infinity.ts
|
|
3194
3233
|
import * as t25 from "@babel/types";
|
|
3195
3234
|
var infinity_default = {
|
|
3196
3235
|
name: "infinity",
|
|
@@ -3216,7 +3255,7 @@ var infinity_default = {
|
|
|
3216
3255
|
};
|
|
3217
3256
|
}
|
|
3218
3257
|
};
|
|
3219
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3258
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/invert-boolean-logic.ts
|
|
3220
3259
|
import * as t26 from "@babel/types";
|
|
3221
3260
|
var INVERTED_BINARY_OPERATORS = {
|
|
3222
3261
|
"==": "!=",
|
|
@@ -3266,7 +3305,7 @@ var invert_boolean_logic_default = {
|
|
|
3266
3305
|
};
|
|
3267
3306
|
}
|
|
3268
3307
|
};
|
|
3269
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3308
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/json-parse.ts
|
|
3270
3309
|
import {parseExpression} from "@babel/parser";
|
|
3271
3310
|
var json_parse_default = {
|
|
3272
3311
|
name: "json-parse",
|
|
@@ -3294,7 +3333,7 @@ var json_parse_default = {
|
|
|
3294
3333
|
};
|
|
3295
3334
|
}
|
|
3296
3335
|
};
|
|
3297
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3336
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/logical-to-if.ts
|
|
3298
3337
|
import {statement} from "@babel/template";
|
|
3299
3338
|
var logical_to_if_default = {
|
|
3300
3339
|
name: "logical-to-if",
|
|
@@ -3326,7 +3365,7 @@ var logical_to_if_default = {
|
|
|
3326
3365
|
};
|
|
3327
3366
|
}
|
|
3328
3367
|
};
|
|
3329
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3368
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/merge-else-if.ts
|
|
3330
3369
|
var merge_else_if_default = {
|
|
3331
3370
|
name: "merge-else-if",
|
|
3332
3371
|
tags: ["safe"],
|
|
@@ -3345,7 +3384,7 @@ var merge_else_if_default = {
|
|
|
3345
3384
|
};
|
|
3346
3385
|
}
|
|
3347
3386
|
};
|
|
3348
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3387
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/number-expressions.ts
|
|
3349
3388
|
import * as t27 from "@babel/types";
|
|
3350
3389
|
var number_expressions_default = {
|
|
3351
3390
|
name: "number-expressions",
|
|
@@ -3369,7 +3408,7 @@ var number_expressions_default = {
|
|
|
3369
3408
|
})
|
|
3370
3409
|
};
|
|
3371
3410
|
var matcher3 = or(binaryExpression(or("+", "-", "*", "/"), predicate((node) => matcher3.match(node)), predicate((node) => matcher3.match(node))), binaryExpression("-", or(stringLiteral(), predicate((node) => matcher3.match(node))), or(stringLiteral(), predicate((node) => matcher3.match(node)))), unaryExpression("-", or(stringLiteral(), predicate((node) => matcher3.match(node)))), numericLiteral());
|
|
3372
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3411
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/raw-literals.ts
|
|
3373
3412
|
var raw_literals_default = {
|
|
3374
3413
|
name: "raw-literals",
|
|
3375
3414
|
tags: ["safe"],
|
|
@@ -3388,7 +3427,7 @@ var raw_literals_default = {
|
|
|
3388
3427
|
}
|
|
3389
3428
|
})
|
|
3390
3429
|
};
|
|
3391
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3430
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/sequence.ts
|
|
3392
3431
|
import * as t28 from "@babel/types";
|
|
3393
3432
|
var sequence_default = {
|
|
3394
3433
|
name: "sequence",
|
|
@@ -3520,7 +3559,7 @@ var sequence_default = {
|
|
|
3520
3559
|
};
|
|
3521
3560
|
}
|
|
3522
3561
|
};
|
|
3523
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3562
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/split-variable-declarations.ts
|
|
3524
3563
|
import * as t29 from "@babel/types";
|
|
3525
3564
|
var split_variable_declarations_default = {
|
|
3526
3565
|
name: "split-variable-declarations",
|
|
@@ -3528,19 +3567,27 @@ var split_variable_declarations_default = {
|
|
|
3528
3567
|
visitor: () => ({
|
|
3529
3568
|
VariableDeclaration: {
|
|
3530
3569
|
exit(path) {
|
|
3531
|
-
if (path.node.declarations.length > 1
|
|
3532
|
-
if (path.parentPath.
|
|
3533
|
-
path.parentPath.
|
|
3570
|
+
if (path.node.declarations.length > 1) {
|
|
3571
|
+
if (path.key === "init" && path.parentPath.isForStatement()) {
|
|
3572
|
+
if (!path.parentPath.node.test && !path.parentPath.node.update && path.node.kind === "var") {
|
|
3573
|
+
path.parentPath.insertBefore(path.node.declarations.map((declaration) => t29.variableDeclaration(path.node.kind, [declaration])));
|
|
3574
|
+
path.remove();
|
|
3575
|
+
this.changes++;
|
|
3576
|
+
}
|
|
3534
3577
|
} else {
|
|
3535
|
-
|
|
3578
|
+
if (path.parentPath.isExportNamedDeclaration()) {
|
|
3579
|
+
path.parentPath.replaceWithMultiple(path.node.declarations.map((declaration) => t29.exportNamedDeclaration(t29.variableDeclaration(path.node.kind, [declaration]))));
|
|
3580
|
+
} else {
|
|
3581
|
+
path.replaceWithMultiple(path.node.declarations.map((declaration) => t29.variableDeclaration(path.node.kind, [declaration])));
|
|
3582
|
+
}
|
|
3583
|
+
this.changes++;
|
|
3536
3584
|
}
|
|
3537
|
-
this.changes++;
|
|
3538
3585
|
}
|
|
3539
3586
|
}
|
|
3540
3587
|
}
|
|
3541
3588
|
})
|
|
3542
3589
|
};
|
|
3543
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3590
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/ternary-to-if.ts
|
|
3544
3591
|
import {statement as statement2} from "@babel/template";
|
|
3545
3592
|
var ternary_to_if_default = {
|
|
3546
3593
|
name: "ternary-to-if",
|
|
@@ -3580,7 +3627,7 @@ var ternary_to_if_default = {
|
|
|
3580
3627
|
};
|
|
3581
3628
|
}
|
|
3582
3629
|
};
|
|
3583
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3630
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/typeof-undefined.ts
|
|
3584
3631
|
import * as t30 from "@babel/types";
|
|
3585
3632
|
var OPERATOR_MAP = {
|
|
3586
3633
|
">": "===",
|
|
@@ -3605,7 +3652,7 @@ var typeof_undefined_default = {
|
|
|
3605
3652
|
};
|
|
3606
3653
|
}
|
|
3607
3654
|
};
|
|
3608
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3655
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/unary-expressions.ts
|
|
3609
3656
|
import * as t31 from "@babel/types";
|
|
3610
3657
|
var unary_expressions_default = {
|
|
3611
3658
|
name: "unary-expressions",
|
|
@@ -3635,7 +3682,7 @@ var unary_expressions_default = {
|
|
|
3635
3682
|
};
|
|
3636
3683
|
}
|
|
3637
3684
|
};
|
|
3638
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3685
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/unminify-booleans.ts
|
|
3639
3686
|
import * as t32 from "@babel/types";
|
|
3640
3687
|
var unminify_booleans_default = {
|
|
3641
3688
|
name: "unminify-booleans",
|
|
@@ -3654,7 +3701,7 @@ var unminify_booleans_default = {
|
|
|
3654
3701
|
};
|
|
3655
3702
|
var trueMatcher2 = or(unaryExpression("!", numericLiteral(0)), unaryExpression("!", unaryExpression("!", numericLiteral(1))), unaryExpression("!", unaryExpression("!", arrayExpression([]))));
|
|
3656
3703
|
var falseMatcher2 = or(unaryExpression("!", numericLiteral(1)), unaryExpression("!", arrayExpression([])));
|
|
3657
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3704
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/void-to-undefined.ts
|
|
3658
3705
|
import * as t33 from "@babel/types";
|
|
3659
3706
|
var void_to_undefined_default = {
|
|
3660
3707
|
name: "void-to-undefined",
|
|
@@ -3674,7 +3721,7 @@ var void_to_undefined_default = {
|
|
|
3674
3721
|
};
|
|
3675
3722
|
}
|
|
3676
3723
|
};
|
|
3677
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3724
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/unminify/transforms/yoda.ts
|
|
3678
3725
|
import * as t34 from "@babel/types";
|
|
3679
3726
|
var FLIPPED_OPERATORS = {
|
|
3680
3727
|
"==": "==",
|
|
@@ -4145,7 +4192,7 @@ function transform4(ast2) {
|
|
|
4145
4192
|
return ast2;
|
|
4146
4193
|
}
|
|
4147
4194
|
|
|
4148
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4195
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/transpile/transforms/index.ts
|
|
4149
4196
|
var exports_transforms2 = {};
|
|
4150
4197
|
__export(exports_transforms2, {
|
|
4151
4198
|
templateLiterals: () => {
|
|
@@ -4175,7 +4222,7 @@ __export(exports_transforms2, {
|
|
|
4175
4222
|
}
|
|
4176
4223
|
});
|
|
4177
4224
|
|
|
4178
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4225
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/transpile/transforms/logical-assignments.ts
|
|
4179
4226
|
import * as t38 from "@babel/types";
|
|
4180
4227
|
var logical_assignments_default = {
|
|
4181
4228
|
name: "logical-assignments",
|
|
@@ -4230,7 +4277,7 @@ var logical_assignments_default = {
|
|
|
4230
4277
|
};
|
|
4231
4278
|
}
|
|
4232
4279
|
};
|
|
4233
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4280
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/transpile/transforms/nullish-coalescing.ts
|
|
4234
4281
|
import * as t39 from "@babel/types";
|
|
4235
4282
|
var nullish_coalescing_default = {
|
|
4236
4283
|
name: "nullish-coalescing",
|
|
@@ -4273,7 +4320,7 @@ var nullish_coalescing_default = {
|
|
|
4273
4320
|
};
|
|
4274
4321
|
}
|
|
4275
4322
|
};
|
|
4276
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4323
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/transpile/transforms/nullish-coalescing-assignment.ts
|
|
4277
4324
|
import * as t40 from "@babel/types";
|
|
4278
4325
|
var nullish_coalescing_assignment_default = {
|
|
4279
4326
|
name: "nullish-coalescing-assignment",
|
|
@@ -4307,7 +4354,7 @@ var nullish_coalescing_assignment_default = {
|
|
|
4307
4354
|
};
|
|
4308
4355
|
}
|
|
4309
4356
|
};
|
|
4310
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4357
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/transpile/transforms/optional-chaining.ts
|
|
4311
4358
|
import * as t41 from "@babel/types";
|
|
4312
4359
|
var optional_chaining_default = {
|
|
4313
4360
|
name: "optional-chaining",
|
|
@@ -4341,10 +4388,10 @@ var optional_chaining_default = {
|
|
|
4341
4388
|
};
|
|
4342
4389
|
}
|
|
4343
4390
|
};
|
|
4344
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4391
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=3aeada5740a8a66f6_fibkxvf52utnboh2vnokkt2eci/node_modules/webcrack/src/transpile/transforms/template-literals.ts
|
|
4345
4392
|
import * as t42 from "@babel/types";
|
|
4346
4393
|
var escape2 = function(str) {
|
|
4347
|
-
return str.
|
|
4394
|
+
return str.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("$", "\\$").replaceAll("\0", "\\0").replaceAll("\b", "\\b").replaceAll("\f", "\\f").replaceAll("\r", "\\r").replaceAll("\t", "\\t").replaceAll("\v", "\\v");
|
|
4348
4395
|
};
|
|
4349
4396
|
var push = function(template9, value) {
|
|
4350
4397
|
if (value.type === "StringLiteral") {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { NodePath } from '@babel/traverse';
|
|
2
|
+
import * as t from '@babel/types';
|
|
3
|
+
/** Remove unwanted features e.g. License check and Telemetry */
|
|
4
|
+
declare const _default: {
|
|
5
|
+
name: string;
|
|
6
|
+
tags: "unsafe"[];
|
|
7
|
+
visitor: () => {
|
|
8
|
+
CallExpression: {
|
|
9
|
+
exit(this: import("webcrack/src/ast-utils").TransformState, $: NodePath<t.CallExpression>): void;
|
|
10
|
+
};
|
|
11
|
+
AssignmentExpression: {
|
|
12
|
+
exit(this: import("webcrack/src/ast-utils").TransformState, $: NodePath<t.AssignmentExpression>): void;
|
|
13
|
+
};
|
|
14
|
+
IfStatement: {
|
|
15
|
+
exit(this: import("webcrack/src/ast-utils").TransformState, $: NodePath<t.IfStatement>): void;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TraverseOptions } from '@babel/traverse';
|
|
2
|
+
import type { TransformState } from 'webcrack/ast-utils';
|
|
3
|
+
import * as t from '@babel/types';
|
|
4
|
+
/** Decrypt AES encrypted string constants. */
|
|
5
|
+
declare const _default: {
|
|
6
|
+
name: string;
|
|
7
|
+
tags: "safe"[];
|
|
8
|
+
run(ast: t.Node): void;
|
|
9
|
+
visitor(): TraverseOptions<TransformState>;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { TraverseOptions } from '@babel/traverse';
|
|
2
|
+
import type { TransformState } from 'webcrack/ast-utils';
|
|
3
|
+
/**
|
|
4
|
+
* Removes the `__esModule` flag from the module.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```diff
|
|
8
|
+
* - Object.defineProperty(exports, '__esModule', { value: true })
|
|
9
|
+
* ```
|
|
10
|
+
* @link <https://github.com/pionxzh/wakaru/tree/main/packages/unminify/src/transformations/un-esmodule-flag.ts>
|
|
11
|
+
*/
|
|
12
|
+
declare const _default: {
|
|
13
|
+
name: string;
|
|
14
|
+
tags: "unsafe"[];
|
|
15
|
+
visitor(): TraverseOptions<TransformState>;
|
|
16
|
+
};
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as t from '@babel/types';
|
|
2
|
+
/**
|
|
3
|
+
* Simplify function calls between modules that discard reference bindings
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* `(0, someModule.someFunction)(args)` -> `someModule.someFunction(args)`
|
|
7
|
+
*
|
|
8
|
+
* @link <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_operator#discarding_reference_binding>
|
|
9
|
+
* @link <https://github.com/pionxzh/wakaru/blob/main/packages/unminify/src/transformations/un-indirect-call.ts>
|
|
10
|
+
*/
|
|
11
|
+
declare const _default: {
|
|
12
|
+
name: string;
|
|
13
|
+
tags: "unsafe"[];
|
|
14
|
+
visitor: () => {
|
|
15
|
+
CallExpression: {
|
|
16
|
+
exit(this: import("webcrack/src/ast-utils").TransformState, $: import("@babel/traverse").NodePath<t.CallExpression>): void;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TraverseOptions } from '@babel/traverse';
|
|
2
|
+
import type { TransformState } from 'webcrack/ast-utils';
|
|
3
|
+
/** Rename webpack RequireJS shims and tsc esmodule helpers.
|
|
4
|
+
* @link <https://www.typescriptlang.org/tsconfig#esModuleInterop>
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: {
|
|
7
|
+
name: string;
|
|
8
|
+
tags: "safe"[];
|
|
9
|
+
scope: true;
|
|
10
|
+
visitor: () => TraverseOptions<TransformState>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NodePath } from '@babel/traverse';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
name: string;
|
|
4
|
+
tags: "unsafe"[];
|
|
5
|
+
visitor(): {
|
|
6
|
+
BinaryExpression: {
|
|
7
|
+
exit(this: import("webcrack/src/ast-utils").TransformState, $: NodePath<import("@babel/types").BinaryExpression>): void;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as t from '@babel/types';
|
|
2
|
+
import { type Node } from '@babel/traverse';
|
|
3
|
+
import type { TransformState, Transform, AsyncTransform } from 'webcrack/ast-utils';
|
|
4
|
+
export declare function parse(code: string): import("@babel/parser").ParseResult<t.File>;
|
|
5
|
+
export declare function generate(ast: t.Node): string;
|
|
6
|
+
export declare function applyTransformAsync<TOptions>(ast: Node, transform: AsyncTransform<TOptions>, options?: TOptions): Promise<TransformState>;
|
|
7
|
+
export declare function applyTransform<TOptions>(ast: Node, transform: Transform<TOptions>, options?: TOptions, noScopeOverride?: boolean): TransformState;
|
|
8
|
+
export declare function applyTransforms(ast: Node, transforms: Transform[], options?: {
|
|
9
|
+
noScope?: boolean;
|
|
10
|
+
name?: string;
|
|
11
|
+
log?: boolean;
|
|
12
|
+
}): TransformState;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*! modified from picocolors v1.0.0 | ISC License | github.com/alexeyraspopov/picocolors */
|
|
2
|
+
export declare const reset: (s: string) => string;
|
|
3
|
+
export declare const bold: (input: string) => string;
|
|
4
|
+
export declare const dim: (input: string) => string;
|
|
5
|
+
export declare const italic: (input: string) => string;
|
|
6
|
+
export declare const underline: (input: string) => string;
|
|
7
|
+
export declare const inverse: (input: string) => string;
|
|
8
|
+
export declare const hidden: (input: string) => string;
|
|
9
|
+
export declare const strikethrough: (input: string) => string;
|
|
10
|
+
export declare const black: (input: string) => string;
|
|
11
|
+
export declare const red: (input: string) => string;
|
|
12
|
+
export declare const green: (input: string) => string;
|
|
13
|
+
export declare const yellow: (input: string) => string;
|
|
14
|
+
export declare const blue: (input: string) => string;
|
|
15
|
+
export declare const magenta: (input: string) => string;
|
|
16
|
+
export declare const cyan: (input: string) => string;
|
|
17
|
+
export declare const white: (input: string) => string;
|
|
18
|
+
export declare const gray: (input: string) => string;
|
|
19
|
+
export declare const bgBlack: (input: string) => string;
|
|
20
|
+
export declare const bgRed: (input: string) => string;
|
|
21
|
+
export declare const bgGreen: (input: string) => string;
|
|
22
|
+
export declare const bgYellow: (input: string) => string;
|
|
23
|
+
export declare const bgBlue: (input: string) => string;
|
|
24
|
+
export declare const bgMagenta: (input: string) => string;
|
|
25
|
+
export declare const bgCyan: (input: string) => string;
|
|
26
|
+
export declare const bgWhite: (input: string) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as t from '@babel/types';
|
|
2
|
+
import * as m from '@codemod/matchers';
|
|
3
|
+
/** Match a module chunk, optionally by ID. */
|
|
4
|
+
export declare function chunk(id?: number): m.Matcher<t.ObjectProperty>;
|
|
5
|
+
/** Match a list of module chunks. */
|
|
6
|
+
export declare const chunks: m.Matcher<t.ObjectExpression>;
|
|
7
|
+
/** Match any module chunk. */
|
|
8
|
+
declare const _default: m.Matcher<t.ObjectProperty>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as m from '@codemod/matchers';
|
|
2
|
+
export declare const __createBinding: import("@babel/types").Expression;
|
|
3
|
+
/** Match `__createBinding`.
|
|
4
|
+
* @example
|
|
5
|
+
* ```javascript
|
|
6
|
+
* var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
* if (k2 === undefined) k2 = k;
|
|
8
|
+
* var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
* if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
* desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
* }
|
|
12
|
+
* Object.defineProperty(o, k2, desc);
|
|
13
|
+
* }) : (function(o, m, k, k2) {
|
|
14
|
+
* if (k2 === undefined) k2 = k;
|
|
15
|
+
* o[k2] = m[k];
|
|
16
|
+
* }));
|
|
17
|
+
* ```
|
|
18
|
+
* @example
|
|
19
|
+
* ```javascript
|
|
20
|
+
* var _v183 = this && this.__createBinding || (Object.create ? function (_a171, _a172, _a173, _a174) {
|
|
21
|
+
* if (_a174 === undefined) {
|
|
22
|
+
* _a174 = _a173;
|
|
23
|
+
* }
|
|
24
|
+
* Object.defineProperty(_a171, _a174, {
|
|
25
|
+
* enumerable: true,
|
|
26
|
+
* get: function () {
|
|
27
|
+
* return _a172[_a173];
|
|
28
|
+
* }
|
|
29
|
+
* });
|
|
30
|
+
* } : function (_a175, _a176, _a177, _a178) {
|
|
31
|
+
* if (_a178 === undefined) {
|
|
32
|
+
* _a178 = _a177;
|
|
33
|
+
* }
|
|
34
|
+
* _a175[_a178] = _a176[_a177];
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare const _default: m.Matcher<import("@babel/types").VariableDeclaration>;
|
|
39
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as m from '@codemod/matchers';
|
|
2
|
+
export declare const __exportStar: import("@babel/types").Expression;
|
|
3
|
+
/** Match `__exportStar`.
|
|
4
|
+
* @example
|
|
5
|
+
* ```javascript
|
|
6
|
+
* var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
7
|
+
* for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
8
|
+
* };
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
declare const _default: m.Matcher<import("@babel/types").VariableDeclaration>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as m from '@codemod/matchers';
|
|
2
|
+
export declare const __importDefault: import("@babel/types").Expression;
|
|
3
|
+
/** Match `__importDefault`.
|
|
4
|
+
* @example
|
|
5
|
+
* ```javascript
|
|
6
|
+
* var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
* return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
* };
|
|
9
|
+
* ```
|
|
10
|
+
* @example
|
|
11
|
+
* ```javascript
|
|
12
|
+
* var data_55311B = this && this.__importDefault || function (_a1) {
|
|
13
|
+
* if (_a1 && _a1.__esModule) {
|
|
14
|
+
* return _a1;
|
|
15
|
+
* } else {
|
|
16
|
+
* return {
|
|
17
|
+
* default: _a1
|
|
18
|
+
* };
|
|
19
|
+
* }
|
|
20
|
+
* };
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const _default: m.Matcher<import("@babel/types").VariableDeclaration>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as m from '@codemod/matchers';
|
|
2
|
+
export declare const __importStar: import("@babel/types").Expression;
|
|
3
|
+
/** Match `__importStar`.
|
|
4
|
+
* @example
|
|
5
|
+
* ```javascript
|
|
6
|
+
* var __importStar = (this && this.__importStar) || function (mod) {
|
|
7
|
+
* if (mod && mod.__esModule) return mod;
|
|
8
|
+
* var result = {};
|
|
9
|
+
* if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
10
|
+
* __setModuleDefault(result, mod);
|
|
11
|
+
* return result;
|
|
12
|
+
* };
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare const _default: m.Matcher<import("@babel/types").VariableDeclaration>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as m from '@codemod/matchers';
|
|
2
|
+
export declare const __setModuleDefault: import("@babel/types").Expression;
|
|
3
|
+
/** Match `__setModuleDefault`.
|
|
4
|
+
* @example
|
|
5
|
+
* ```javascript
|
|
6
|
+
* var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
7
|
+
* // this inline ObjectExpression could be emitted as an isolated VariableDeclarator in the scope
|
|
8
|
+
* Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
9
|
+
* }) : function(o, v) {
|
|
10
|
+
* o["default"] = v;
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare const _default: m.Matcher<import("@babel/types").VariableDeclaration>;
|
|
15
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delance/builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "A spear to the Python language server built with black magic",
|
|
5
5
|
"license": "0BSD",
|
|
6
6
|
"author": "mochaaP <npm@mochaa.ws>",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"quickjs-emscripten": "^0.25.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@codemod/core": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/core&commit=
|
|
70
|
-
"@codemod/matchers": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/matchers&commit=
|
|
71
|
-
"@codemod/parser": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/parser&commit=
|
|
72
|
-
"@codemod/utils": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/utils&commit=
|
|
69
|
+
"@codemod/core": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/core&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
70
|
+
"@codemod/matchers": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/matchers&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
71
|
+
"@codemod/parser": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/parser&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
72
|
+
"@codemod/utils": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/utils&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
73
73
|
"@types/babel__core": "^7",
|
|
74
74
|
"@types/babel__generator": "^7",
|
|
75
75
|
"@types/babel__helper-validator-identifier": "^7",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"bun": "^1.0.20",
|
|
81
81
|
"rimraf": "^5.0.5",
|
|
82
82
|
"typescript": "^5.3",
|
|
83
|
-
"webcrack": "https://gitpkg.vercel.app/api/pkg.tgz?url=j4k0xb/webcrack/packages/webcrack&commit=
|
|
83
|
+
"webcrack": "https://gitpkg.vercel.app/api/pkg.tgz?url=j4k0xb/webcrack/packages/webcrack&commit=3aeada5740a8a66f64ec8a8a5375218aa0bf8016&scripts.postinstall=rimraf tsconfig.json",
|
|
84
84
|
"xo": "^0.56.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
@@ -109,6 +109,7 @@
|
|
|
109
109
|
"scripts": {
|
|
110
110
|
"build": "bun build index.ts cli.ts --target=node --splitting -e=isolated-vm -e=quickjs-emscripten -e=@babel -e=debug --outdir=dist",
|
|
111
111
|
"build:minify": "bun run build --minify --entry-naming [dir]/[name].min.[ext]",
|
|
112
|
+
"build:types": "tsc -p tsconfig.build.json || exit 0",
|
|
112
113
|
"lint": "eslint .",
|
|
113
114
|
"lint:fix": "eslint . --fix",
|
|
114
115
|
"start": "bun cli.ts"
|