@delance/builder 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +309 -213
- package/package.json +16 -13
package/README.md
CHANGED
|
@@ -91,5 +91,5 @@ SPDX-License-Identifier: 0BSD
|
|
|
91
91
|
|
|
92
92
|
[@delance/runtime]: https://npm.im/@delance/runtime
|
|
93
93
|
[npm]: https://npm.im/@delance/builder
|
|
94
|
-
[builds]: https://builds.sr.ht/~self/delance-builder
|
|
94
|
+
[builds]: https://builds.sr.ht/~self/delance-builder
|
|
95
95
|
[license]: ./LICENSE
|
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=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/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=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/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,7 +45,7 @@ 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=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/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
|
|
|
@@ -2175,7 +2175,7 @@ class PredicateMatcher extends Matcher {
|
|
|
2175
2175
|
return this.predicate(value);
|
|
2176
2176
|
}
|
|
2177
2177
|
}
|
|
2178
|
-
// 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=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/ast-utils/matcher.ts
|
|
2179
2179
|
import * as t12 from "@babel/types";
|
|
2180
2180
|
function infiniteLoop(body) {
|
|
2181
2181
|
return or(forStatement(undefined, null, undefined, body), forStatement(undefined, truthyMatcher, undefined, body), whileStatement(truthyMatcher, body));
|
|
@@ -2227,7 +2227,7 @@ var trueMatcher = or(booleanLiteral(true), unaryExpression("!", numericLiteral(0
|
|
|
2227
2227
|
var falseMatcher = or(booleanLiteral(false), unaryExpression("!", arrayExpression([])));
|
|
2228
2228
|
var truthyMatcher = or(trueMatcher, arrayExpression([]));
|
|
2229
2229
|
|
|
2230
|
-
// 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=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/ast-utils/inline.ts
|
|
2231
2231
|
function inlineVariable(binding, value = anyExpression(), unsafeAssignments = false) {
|
|
2232
2232
|
const varDeclarator = binding.path.node;
|
|
2233
2233
|
const varMatcher = variableDeclarator(identifier(binding.identifier.name), value);
|
|
@@ -2338,6 +2338,8 @@ function inlineVariableAliases(binding, targetName = binding.identifier.name) {
|
|
|
2338
2338
|
const varBinding = varScope.getBinding(varName.current);
|
|
2339
2339
|
if (!varBinding)
|
|
2340
2340
|
continue;
|
|
2341
|
+
if (ref.isIdentifier({ name: varBinding.identifier.name }))
|
|
2342
|
+
continue;
|
|
2341
2343
|
state.changes += inlineVariableAliases(varBinding, targetName).changes;
|
|
2342
2344
|
if (ref.parentPath?.isAssignmentExpression()) {
|
|
2343
2345
|
varBinding.path.remove();
|
|
@@ -2357,7 +2359,7 @@ function inlineVariableAliases(binding, targetName = binding.identifier.name) {
|
|
|
2357
2359
|
}
|
|
2358
2360
|
return state;
|
|
2359
2361
|
}
|
|
2360
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2362
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/ast-utils/rename.ts
|
|
2361
2363
|
import traverse6 from "@babel/traverse";
|
|
2362
2364
|
import * as t14 from "@babel/types";
|
|
2363
2365
|
function renameFast(binding, newName) {
|
|
@@ -2400,7 +2402,7 @@ function renameFast(binding, newName) {
|
|
|
2400
2402
|
binding.scope.bindings[newName] = binding;
|
|
2401
2403
|
binding.identifier.name = newName;
|
|
2402
2404
|
}
|
|
2403
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2405
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/ast-utils/transform.ts
|
|
2404
2406
|
import traverse8, {visitors} from "@babel/traverse";
|
|
2405
2407
|
import debug from "debug";
|
|
2406
2408
|
async function applyTransformAsync(ast, transform, options2) {
|
|
@@ -2454,7 +2456,7 @@ function mergeTransforms(options2) {
|
|
|
2454
2456
|
};
|
|
2455
2457
|
}
|
|
2456
2458
|
var logger = debug("webcrack:transforms");
|
|
2457
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2459
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/merge-strings.ts
|
|
2458
2460
|
import * as t15 from "@babel/types";
|
|
2459
2461
|
var merge_strings_default = {
|
|
2460
2462
|
name: "merge-strings",
|
|
@@ -2486,7 +2488,7 @@ var merge_strings_default = {
|
|
|
2486
2488
|
}
|
|
2487
2489
|
};
|
|
2488
2490
|
|
|
2489
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2491
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/array-rotator.ts
|
|
2490
2492
|
function findArrayRotator(stringArray) {
|
|
2491
2493
|
const arrayIdentifier = capture(identifier());
|
|
2492
2494
|
const pushShift = callExpression(constMemberExpression(arrayIdentifier, "push"), [
|
|
@@ -2506,7 +2508,7 @@ function findArrayRotator(stringArray) {
|
|
|
2506
2508
|
}
|
|
2507
2509
|
}
|
|
2508
2510
|
|
|
2509
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2511
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/control-flow-object.ts
|
|
2510
2512
|
import * as t16 from "@babel/types";
|
|
2511
2513
|
var control_flow_object_default = {
|
|
2512
2514
|
name: "control-flow-object",
|
|
@@ -2568,6 +2570,10 @@ var control_flow_object_default = {
|
|
|
2568
2570
|
const memberPath = ref.parentPath;
|
|
2569
2571
|
const propName = getPropName(memberPath.node.property);
|
|
2570
2572
|
const value = props.get(propName);
|
|
2573
|
+
if (!value) {
|
|
2574
|
+
ref.addComment("leading", "webcrack:control_flow_missing_prop");
|
|
2575
|
+
return;
|
|
2576
|
+
}
|
|
2571
2577
|
if (t16.isStringLiteral(value)) {
|
|
2572
2578
|
memberPath.replaceWith(value);
|
|
2573
2579
|
} else {
|
|
@@ -2626,7 +2632,7 @@ var control_flow_object_default = {
|
|
|
2626
2632
|
}
|
|
2627
2633
|
};
|
|
2628
2634
|
|
|
2629
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2635
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/control-flow-switch.ts
|
|
2630
2636
|
import * as t17 from "@babel/types";
|
|
2631
2637
|
var control_flow_switch_default = {
|
|
2632
2638
|
name: "control-flow-switch",
|
|
@@ -2661,13 +2667,22 @@ var control_flow_switch_default = {
|
|
|
2661
2667
|
}
|
|
2662
2668
|
};
|
|
2663
2669
|
|
|
2664
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2670
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/dead-code.ts
|
|
2665
2671
|
import * as t18 from "@babel/types";
|
|
2666
|
-
var replace = function(path,
|
|
2667
|
-
if (t18.isBlockStatement(node)) {
|
|
2668
|
-
|
|
2672
|
+
var replace = function(path, replacement) {
|
|
2673
|
+
if (t18.isBlockStatement(replacement.node)) {
|
|
2674
|
+
const childBindings = replacement.scope.bindings;
|
|
2675
|
+
for (const name in childBindings) {
|
|
2676
|
+
const binding = childBindings[name];
|
|
2677
|
+
if (path.scope.hasOwnBinding(name)) {
|
|
2678
|
+
renameFast(binding, path.scope.generateUid(name));
|
|
2679
|
+
}
|
|
2680
|
+
binding.scope = path.scope;
|
|
2681
|
+
path.scope.bindings[binding.identifier.name] = binding;
|
|
2682
|
+
}
|
|
2683
|
+
path.replaceWithMultiple(replacement.node.body);
|
|
2669
2684
|
} else {
|
|
2670
|
-
path.replaceWith(
|
|
2685
|
+
path.replaceWith(replacement);
|
|
2671
2686
|
}
|
|
2672
2687
|
};
|
|
2673
2688
|
var dead_code_default = {
|
|
@@ -2683,22 +2698,10 @@ var dead_code_default = {
|
|
|
2683
2698
|
const path = _path;
|
|
2684
2699
|
if (!testMatcher.match(path.node.test))
|
|
2685
2700
|
return;
|
|
2686
|
-
const { scope } = path;
|
|
2687
|
-
function renameShadowedVariables(localScope) {
|
|
2688
|
-
if (localScope === scope)
|
|
2689
|
-
return;
|
|
2690
|
-
for (const name in localScope.bindings) {
|
|
2691
|
-
if (scope.hasBinding(name)) {
|
|
2692
|
-
renameFast(localScope.bindings[name], scope.generateUid(name));
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
2701
|
if (path.get("test").evaluateTruthy()) {
|
|
2697
|
-
|
|
2698
|
-
replace(path, path.node.consequent);
|
|
2702
|
+
replace(path, path.get("consequent"));
|
|
2699
2703
|
} else if (path.node.alternate) {
|
|
2700
|
-
|
|
2701
|
-
replace(path, path.node.alternate);
|
|
2704
|
+
replace(path, path.get("alternate"));
|
|
2702
2705
|
} else {
|
|
2703
2706
|
path.remove();
|
|
2704
2707
|
}
|
|
@@ -2709,7 +2712,7 @@ var dead_code_default = {
|
|
|
2709
2712
|
}
|
|
2710
2713
|
};
|
|
2711
2714
|
|
|
2712
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2715
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/decoder.ts
|
|
2713
2716
|
import {expression} from "@babel/template";
|
|
2714
2717
|
function findDecoders(stringArray) {
|
|
2715
2718
|
const decoders = [];
|
|
@@ -2778,7 +2781,7 @@ class Decoder {
|
|
|
2778
2781
|
}
|
|
2779
2782
|
}
|
|
2780
2783
|
|
|
2781
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2784
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/inline-decoded-strings.ts
|
|
2782
2785
|
import * as t19 from "@babel/types";
|
|
2783
2786
|
var inline_decoded_strings_default = {
|
|
2784
2787
|
name: "inline-decoded-strings",
|
|
@@ -2800,7 +2803,7 @@ var inline_decoded_strings_default = {
|
|
|
2800
2803
|
}
|
|
2801
2804
|
};
|
|
2802
2805
|
|
|
2803
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2806
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/inline-decoder-wrappers.ts
|
|
2804
2807
|
var inline_decoder_wrappers_default = {
|
|
2805
2808
|
name: "inline-decoder-wrappers",
|
|
2806
2809
|
tags: ["unsafe"],
|
|
@@ -2817,7 +2820,7 @@ var inline_decoder_wrappers_default = {
|
|
|
2817
2820
|
}
|
|
2818
2821
|
};
|
|
2819
2822
|
|
|
2820
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2823
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/inline-object-props.ts
|
|
2821
2824
|
var inline_object_props_default = {
|
|
2822
2825
|
name: "inline-object-props",
|
|
2823
2826
|
tags: ["safe"],
|
|
@@ -2844,7 +2847,7 @@ var inline_object_props_default = {
|
|
|
2844
2847
|
}
|
|
2845
2848
|
};
|
|
2846
2849
|
|
|
2847
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2850
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/string-array.ts
|
|
2848
2851
|
import traverse10 from "@babel/traverse";
|
|
2849
2852
|
function findStringArray(ast2) {
|
|
2850
2853
|
let result;
|
|
@@ -2894,7 +2897,7 @@ function findStringArray(ast2) {
|
|
|
2894
2897
|
return result;
|
|
2895
2898
|
}
|
|
2896
2899
|
|
|
2897
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
2900
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/deobfuscate/vm.ts
|
|
2898
2901
|
import debug2 from "debug";
|
|
2899
2902
|
class VMDecoder {
|
|
2900
2903
|
decoders;
|
|
@@ -3076,6 +3079,11 @@ __export(exports_transforms, {
|
|
|
3076
3079
|
return split_variable_declarations_default;
|
|
3077
3080
|
}
|
|
3078
3081
|
},
|
|
3082
|
+
splitForLoopVars: () => {
|
|
3083
|
+
{
|
|
3084
|
+
return split_for_loop_vars_default;
|
|
3085
|
+
}
|
|
3086
|
+
},
|
|
3079
3087
|
sequence: () => {
|
|
3080
3088
|
{
|
|
3081
3089
|
return sequence_default;
|
|
@@ -3138,7 +3146,7 @@ __export(exports_transforms, {
|
|
|
3138
3146
|
}
|
|
3139
3147
|
});
|
|
3140
3148
|
|
|
3141
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3149
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/block-statements.ts
|
|
3142
3150
|
import * as t22 from "@babel/types";
|
|
3143
3151
|
var block_statements_default = {
|
|
3144
3152
|
name: "block-statements",
|
|
@@ -3176,7 +3184,7 @@ var block_statements_default = {
|
|
|
3176
3184
|
}
|
|
3177
3185
|
})
|
|
3178
3186
|
};
|
|
3179
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3187
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/computed-properties.ts
|
|
3180
3188
|
import {isIdentifierName} from "@babel/helper-validator-identifier";
|
|
3181
3189
|
import * as t23 from "@babel/types";
|
|
3182
3190
|
var computed_properties_default = {
|
|
@@ -3210,7 +3218,7 @@ var computed_properties_default = {
|
|
|
3210
3218
|
};
|
|
3211
3219
|
}
|
|
3212
3220
|
};
|
|
3213
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3221
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/for-to-while.ts
|
|
3214
3222
|
import * as t24 from "@babel/types";
|
|
3215
3223
|
var for_to_while_default = {
|
|
3216
3224
|
name: "for-to-while",
|
|
@@ -3229,7 +3237,7 @@ var for_to_while_default = {
|
|
|
3229
3237
|
};
|
|
3230
3238
|
}
|
|
3231
3239
|
};
|
|
3232
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3240
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/infinity.ts
|
|
3233
3241
|
import * as t25 from "@babel/types";
|
|
3234
3242
|
var infinity_default = {
|
|
3235
3243
|
name: "infinity",
|
|
@@ -3255,7 +3263,7 @@ var infinity_default = {
|
|
|
3255
3263
|
};
|
|
3256
3264
|
}
|
|
3257
3265
|
};
|
|
3258
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3266
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/invert-boolean-logic.ts
|
|
3259
3267
|
import * as t26 from "@babel/types";
|
|
3260
3268
|
var INVERTED_BINARY_OPERATORS = {
|
|
3261
3269
|
"==": "!=",
|
|
@@ -3305,7 +3313,7 @@ var invert_boolean_logic_default = {
|
|
|
3305
3313
|
};
|
|
3306
3314
|
}
|
|
3307
3315
|
};
|
|
3308
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3316
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/json-parse.ts
|
|
3309
3317
|
import {parseExpression} from "@babel/parser";
|
|
3310
3318
|
var json_parse_default = {
|
|
3311
3319
|
name: "json-parse",
|
|
@@ -3333,7 +3341,7 @@ var json_parse_default = {
|
|
|
3333
3341
|
};
|
|
3334
3342
|
}
|
|
3335
3343
|
};
|
|
3336
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3344
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/logical-to-if.ts
|
|
3337
3345
|
import {statement} from "@babel/template";
|
|
3338
3346
|
var logical_to_if_default = {
|
|
3339
3347
|
name: "logical-to-if",
|
|
@@ -3365,7 +3373,7 @@ var logical_to_if_default = {
|
|
|
3365
3373
|
};
|
|
3366
3374
|
}
|
|
3367
3375
|
};
|
|
3368
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3376
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/merge-else-if.ts
|
|
3369
3377
|
var merge_else_if_default = {
|
|
3370
3378
|
name: "merge-else-if",
|
|
3371
3379
|
tags: ["safe"],
|
|
@@ -3384,7 +3392,7 @@ var merge_else_if_default = {
|
|
|
3384
3392
|
};
|
|
3385
3393
|
}
|
|
3386
3394
|
};
|
|
3387
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3395
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/number-expressions.ts
|
|
3388
3396
|
import * as t27 from "@babel/types";
|
|
3389
3397
|
var number_expressions_default = {
|
|
3390
3398
|
name: "number-expressions",
|
|
@@ -3408,7 +3416,7 @@ var number_expressions_default = {
|
|
|
3408
3416
|
})
|
|
3409
3417
|
};
|
|
3410
3418
|
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());
|
|
3411
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3419
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/raw-literals.ts
|
|
3412
3420
|
var raw_literals_default = {
|
|
3413
3421
|
name: "raw-literals",
|
|
3414
3422
|
tags: ["safe"],
|
|
@@ -3427,140 +3435,163 @@ var raw_literals_default = {
|
|
|
3427
3435
|
}
|
|
3428
3436
|
})
|
|
3429
3437
|
};
|
|
3430
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3438
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/sequence.ts
|
|
3431
3439
|
import * as t28 from "@babel/types";
|
|
3432
3440
|
var sequence_default = {
|
|
3433
3441
|
name: "sequence",
|
|
3434
3442
|
tags: ["safe"],
|
|
3435
3443
|
visitor() {
|
|
3436
|
-
const assignmentVariable = or(identifier(), memberExpression(identifier(), identifier()));
|
|
3444
|
+
const assignmentVariable = or(identifier(), memberExpression(identifier(), or(identifier(), safeLiteral)));
|
|
3437
3445
|
const assignedSequence = capture(sequenceExpression());
|
|
3438
|
-
const assignmentMatcher =
|
|
3446
|
+
const assignmentMatcher = assignmentExpression(or("=", "+=", "-=", "*=", "/=", "%=", "**=", "<<=", ">>=", ">>>=", "|=", "^=", "&="), assignmentVariable, assignedSequence);
|
|
3439
3447
|
return {
|
|
3448
|
+
AssignmentExpression: {
|
|
3449
|
+
exit(path) {
|
|
3450
|
+
if (!assignmentMatcher.match(path.node))
|
|
3451
|
+
return;
|
|
3452
|
+
const { expressions } = assignedSequence.current;
|
|
3453
|
+
path.node.right = expressions.pop();
|
|
3454
|
+
const newNodes = path.parentPath.isExpressionStatement() ? expressions.map(t28.expressionStatement) : expressions;
|
|
3455
|
+
path.insertBefore(newNodes);
|
|
3456
|
+
this.changes++;
|
|
3457
|
+
}
|
|
3458
|
+
},
|
|
3440
3459
|
ExpressionStatement: {
|
|
3441
3460
|
exit(path) {
|
|
3442
|
-
if (t28.isSequenceExpression(path.node.expression))
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
const value = assignedSequence.current.expressions.pop();
|
|
3448
|
-
const statements = assignedSequence.current.expressions.map((expr) => t28.expressionStatement(expr));
|
|
3449
|
-
path.get("expression.right").replaceWith(value);
|
|
3450
|
-
path.insertBefore(statements);
|
|
3451
|
-
this.changes++;
|
|
3452
|
-
}
|
|
3461
|
+
if (!t28.isSequenceExpression(path.node.expression))
|
|
3462
|
+
return;
|
|
3463
|
+
const statements = path.node.expression.expressions.map(t28.expressionStatement);
|
|
3464
|
+
path.replaceWithMultiple(statements);
|
|
3465
|
+
this.changes++;
|
|
3453
3466
|
}
|
|
3454
3467
|
},
|
|
3455
3468
|
ReturnStatement: {
|
|
3456
3469
|
exit(path) {
|
|
3457
|
-
if (t28.isSequenceExpression(path.node.argument))
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3470
|
+
if (!t28.isSequenceExpression(path.node.argument))
|
|
3471
|
+
return;
|
|
3472
|
+
const { expressions } = path.node.argument;
|
|
3473
|
+
path.node.argument = expressions.pop();
|
|
3474
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3475
|
+
path.insertBefore(statements);
|
|
3476
|
+
this.changes++;
|
|
3464
3477
|
}
|
|
3465
3478
|
},
|
|
3466
3479
|
IfStatement: {
|
|
3467
3480
|
exit(path) {
|
|
3468
|
-
if (t28.isSequenceExpression(path.node.test))
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3481
|
+
if (!t28.isSequenceExpression(path.node.test))
|
|
3482
|
+
return;
|
|
3483
|
+
const { expressions } = path.node.test;
|
|
3484
|
+
path.node.test = expressions.pop();
|
|
3485
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3486
|
+
path.insertBefore(statements);
|
|
3487
|
+
this.changes++;
|
|
3475
3488
|
}
|
|
3476
3489
|
},
|
|
3477
3490
|
SwitchStatement: {
|
|
3478
3491
|
exit(path) {
|
|
3479
|
-
if (t28.isSequenceExpression(path.node.discriminant))
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3492
|
+
if (!t28.isSequenceExpression(path.node.discriminant))
|
|
3493
|
+
return;
|
|
3494
|
+
const { expressions } = path.node.discriminant;
|
|
3495
|
+
path.node.discriminant = expressions.pop();
|
|
3496
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3497
|
+
path.insertBefore(statements);
|
|
3498
|
+
this.changes++;
|
|
3486
3499
|
}
|
|
3487
3500
|
},
|
|
3488
3501
|
ThrowStatement: {
|
|
3489
3502
|
exit(path) {
|
|
3490
|
-
if (t28.isSequenceExpression(path.node.argument))
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3503
|
+
if (!t28.isSequenceExpression(path.node.argument))
|
|
3504
|
+
return;
|
|
3505
|
+
const { expressions } = path.node.argument;
|
|
3506
|
+
path.node.argument = expressions.pop();
|
|
3507
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3508
|
+
path.insertBefore(statements);
|
|
3509
|
+
this.changes++;
|
|
3497
3510
|
}
|
|
3498
3511
|
},
|
|
3499
3512
|
ForInStatement: {
|
|
3500
3513
|
exit(path) {
|
|
3501
3514
|
const sequence = capture(sequenceExpression());
|
|
3502
3515
|
const matcher4 = forInStatement(anything(), sequence);
|
|
3503
|
-
if (matcher4.match(path.node))
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3516
|
+
if (!matcher4.match(path.node))
|
|
3517
|
+
return;
|
|
3518
|
+
const { expressions } = sequence.current;
|
|
3519
|
+
path.node.right = expressions.pop();
|
|
3520
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3521
|
+
path.insertBefore(statements);
|
|
3522
|
+
this.changes++;
|
|
3510
3523
|
}
|
|
3511
3524
|
},
|
|
3512
3525
|
ForStatement: {
|
|
3513
3526
|
exit(path) {
|
|
3514
3527
|
if (t28.isSequenceExpression(path.node.init)) {
|
|
3515
|
-
const statements = path.node.init.expressions.map(
|
|
3516
|
-
path.insertBefore(statements);
|
|
3528
|
+
const statements = path.node.init.expressions.map(t28.expressionStatement);
|
|
3517
3529
|
path.node.init = null;
|
|
3530
|
+
path.insertBefore(statements);
|
|
3518
3531
|
this.changes++;
|
|
3519
3532
|
}
|
|
3520
3533
|
if (t28.isSequenceExpression(path.node.update) && path.node.body.type === "EmptyStatement") {
|
|
3521
|
-
const expressions = path.node.update
|
|
3534
|
+
const { expressions } = path.node.update;
|
|
3522
3535
|
path.node.update = expressions.pop();
|
|
3523
|
-
const statements = expressions.map(
|
|
3536
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3524
3537
|
path.node.body = t28.blockStatement(statements);
|
|
3525
3538
|
this.changes++;
|
|
3526
3539
|
}
|
|
3527
3540
|
}
|
|
3528
3541
|
},
|
|
3529
|
-
WhileStatement: {
|
|
3530
|
-
exit(path) {
|
|
3531
|
-
if (t28.isSequenceExpression(path.node.test)) {
|
|
3532
|
-
const expressions = path.node.test.expressions;
|
|
3533
|
-
path.node.test = expressions.pop();
|
|
3534
|
-
const statements = expressions.map((expr) => t28.expressionStatement(expr));
|
|
3535
|
-
path.insertBefore(statements);
|
|
3536
|
-
this.changes++;
|
|
3537
|
-
}
|
|
3538
|
-
}
|
|
3539
|
-
},
|
|
3540
3542
|
VariableDeclaration: {
|
|
3541
3543
|
exit(path) {
|
|
3542
3544
|
const sequence = capture(sequenceExpression());
|
|
3543
3545
|
const matcher4 = variableDeclaration(undefined, [
|
|
3544
3546
|
variableDeclarator(undefined, sequence)
|
|
3545
3547
|
]);
|
|
3546
|
-
if (matcher4.match(path.node))
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
path.insertBefore(statements);
|
|
3554
|
-
}
|
|
3555
|
-
this.changes++;
|
|
3556
|
-
}
|
|
3548
|
+
if (!matcher4.match(path.node))
|
|
3549
|
+
return;
|
|
3550
|
+
const { expressions } = sequence.current;
|
|
3551
|
+
path.node.declarations[0].init = expressions.pop();
|
|
3552
|
+
const statements = expressions.map(t28.expressionStatement);
|
|
3553
|
+
path.getStatementParent()?.insertBefore(statements);
|
|
3554
|
+
this.changes++;
|
|
3557
3555
|
}
|
|
3558
3556
|
}
|
|
3559
3557
|
};
|
|
3560
3558
|
}
|
|
3561
3559
|
};
|
|
3562
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3560
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/split-for-loop-vars.ts
|
|
3563
3561
|
import * as t29 from "@babel/types";
|
|
3562
|
+
var matcher4 = forStatement(variableDeclaration("var", arrayOf(variableDeclarator(identifier()))));
|
|
3563
|
+
var split_for_loop_vars_default = {
|
|
3564
|
+
name: "split-for-loop-vars",
|
|
3565
|
+
tags: ["safe"],
|
|
3566
|
+
scope: true,
|
|
3567
|
+
visitor: () => ({
|
|
3568
|
+
ForStatement: {
|
|
3569
|
+
exit(path) {
|
|
3570
|
+
if (!matcher4.match(path.node))
|
|
3571
|
+
return;
|
|
3572
|
+
const { init, test, update } = path.node;
|
|
3573
|
+
const { declarations } = init;
|
|
3574
|
+
for (let i = 0;i < declarations.length; i++) {
|
|
3575
|
+
const declarator = declarations[i];
|
|
3576
|
+
const binding = path.scope.getBinding(declarator.id.name);
|
|
3577
|
+
if (!binding)
|
|
3578
|
+
break;
|
|
3579
|
+
const isUsedInTestOrUpdate = binding.constantViolations.some((reference) => reference.find((p) => p.node === test || p.node === update)) || binding.referencePaths.some((reference) => reference.find((p) => p.node === test || p.node === update));
|
|
3580
|
+
if (isUsedInTestOrUpdate)
|
|
3581
|
+
break;
|
|
3582
|
+
path.insertBefore(t29.variableDeclaration("var", [declarator]));
|
|
3583
|
+
declarations.shift();
|
|
3584
|
+
i--;
|
|
3585
|
+
this.changes++;
|
|
3586
|
+
}
|
|
3587
|
+
if (declarations.length === 0)
|
|
3588
|
+
path.get("init").remove();
|
|
3589
|
+
}
|
|
3590
|
+
}
|
|
3591
|
+
})
|
|
3592
|
+
};
|
|
3593
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/split-variable-declarations.ts
|
|
3594
|
+
import * as t30 from "@babel/types";
|
|
3564
3595
|
var split_variable_declarations_default = {
|
|
3565
3596
|
name: "split-variable-declarations",
|
|
3566
3597
|
tags: ["safe"],
|
|
@@ -3570,15 +3601,15 @@ var split_variable_declarations_default = {
|
|
|
3570
3601
|
if (path.node.declarations.length > 1) {
|
|
3571
3602
|
if (path.key === "init" && path.parentPath.isForStatement()) {
|
|
3572
3603
|
if (!path.parentPath.node.test && !path.parentPath.node.update && path.node.kind === "var") {
|
|
3573
|
-
path.parentPath.insertBefore(path.node.declarations.map((declaration) =>
|
|
3604
|
+
path.parentPath.insertBefore(path.node.declarations.map((declaration) => t30.variableDeclaration(path.node.kind, [declaration])));
|
|
3574
3605
|
path.remove();
|
|
3575
3606
|
this.changes++;
|
|
3576
3607
|
}
|
|
3577
3608
|
} else {
|
|
3578
3609
|
if (path.parentPath.isExportNamedDeclaration()) {
|
|
3579
|
-
path.parentPath.replaceWithMultiple(path.node.declarations.map((declaration) =>
|
|
3610
|
+
path.parentPath.replaceWithMultiple(path.node.declarations.map((declaration) => t30.exportNamedDeclaration(t30.variableDeclaration(path.node.kind, [declaration]))));
|
|
3580
3611
|
} else {
|
|
3581
|
-
path.replaceWithMultiple(path.node.declarations.map((declaration) =>
|
|
3612
|
+
path.replaceWithMultiple(path.node.declarations.map((declaration) => t30.variableDeclaration(path.node.kind, [declaration])));
|
|
3582
3613
|
}
|
|
3583
3614
|
this.changes++;
|
|
3584
3615
|
}
|
|
@@ -3587,7 +3618,7 @@ var split_variable_declarations_default = {
|
|
|
3587
3618
|
}
|
|
3588
3619
|
})
|
|
3589
3620
|
};
|
|
3590
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3621
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/ternary-to-if.ts
|
|
3591
3622
|
import {statement as statement2} from "@babel/template";
|
|
3592
3623
|
var ternary_to_if_default = {
|
|
3593
3624
|
name: "ternary-to-if",
|
|
@@ -3627,8 +3658,8 @@ var ternary_to_if_default = {
|
|
|
3627
3658
|
};
|
|
3628
3659
|
}
|
|
3629
3660
|
};
|
|
3630
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3631
|
-
import * as
|
|
3661
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/typeof-undefined.ts
|
|
3662
|
+
import * as t31 from "@babel/types";
|
|
3632
3663
|
var OPERATOR_MAP = {
|
|
3633
3664
|
">": "===",
|
|
3634
3665
|
"<": "!=="
|
|
@@ -3639,32 +3670,32 @@ var typeof_undefined_default = {
|
|
|
3639
3670
|
visitor() {
|
|
3640
3671
|
const operator = capture(or(">", "<"));
|
|
3641
3672
|
const argument = capture(anyExpression());
|
|
3642
|
-
const
|
|
3673
|
+
const matcher5 = binaryExpression(operator, unaryExpression("typeof", argument), stringLiteral("u"));
|
|
3643
3674
|
return {
|
|
3644
3675
|
BinaryExpression: {
|
|
3645
3676
|
exit(path) {
|
|
3646
|
-
if (!
|
|
3677
|
+
if (!matcher5.match(path.node))
|
|
3647
3678
|
return;
|
|
3648
|
-
path.replaceWith(
|
|
3679
|
+
path.replaceWith(t31.binaryExpression(OPERATOR_MAP[operator.current], t31.unaryExpression("typeof", argument.current), t31.stringLiteral("undefined")));
|
|
3649
3680
|
this.changes++;
|
|
3650
3681
|
}
|
|
3651
3682
|
}
|
|
3652
3683
|
};
|
|
3653
3684
|
}
|
|
3654
3685
|
};
|
|
3655
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3656
|
-
import * as
|
|
3686
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/unary-expressions.ts
|
|
3687
|
+
import * as t32 from "@babel/types";
|
|
3657
3688
|
var unary_expressions_default = {
|
|
3658
3689
|
name: "unary-expressions",
|
|
3659
3690
|
tags: ["safe"],
|
|
3660
3691
|
visitor() {
|
|
3661
3692
|
const argument = capture(anyExpression());
|
|
3662
|
-
const
|
|
3693
|
+
const matcher5 = expressionStatement(unaryExpression(or("void", "!", "typeof"), argument));
|
|
3663
3694
|
const returnVoid = returnStatement(unaryExpression("void", argument));
|
|
3664
3695
|
return {
|
|
3665
3696
|
ExpressionStatement: {
|
|
3666
3697
|
exit(path) {
|
|
3667
|
-
if (!
|
|
3698
|
+
if (!matcher5.match(path.node))
|
|
3668
3699
|
return;
|
|
3669
3700
|
path.replaceWith(argument.current);
|
|
3670
3701
|
this.changes++;
|
|
@@ -3675,25 +3706,25 @@ var unary_expressions_default = {
|
|
|
3675
3706
|
if (!returnVoid.match(path.node))
|
|
3676
3707
|
return;
|
|
3677
3708
|
path.replaceWith(argument.current);
|
|
3678
|
-
path.insertAfter(
|
|
3709
|
+
path.insertAfter(t32.returnStatement());
|
|
3679
3710
|
this.changes++;
|
|
3680
3711
|
}
|
|
3681
3712
|
}
|
|
3682
3713
|
};
|
|
3683
3714
|
}
|
|
3684
3715
|
};
|
|
3685
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3686
|
-
import * as
|
|
3716
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/unminify-booleans.ts
|
|
3717
|
+
import * as t33 from "@babel/types";
|
|
3687
3718
|
var unminify_booleans_default = {
|
|
3688
3719
|
name: "unminify-booleans",
|
|
3689
3720
|
tags: ["safe"],
|
|
3690
3721
|
visitor: () => ({
|
|
3691
3722
|
UnaryExpression(path) {
|
|
3692
3723
|
if (trueMatcher2.match(path.node)) {
|
|
3693
|
-
path.replaceWith(
|
|
3724
|
+
path.replaceWith(t33.booleanLiteral(true));
|
|
3694
3725
|
this.changes++;
|
|
3695
3726
|
} else if (falseMatcher2.match(path.node)) {
|
|
3696
|
-
path.replaceWith(
|
|
3727
|
+
path.replaceWith(t33.booleanLiteral(false));
|
|
3697
3728
|
this.changes++;
|
|
3698
3729
|
}
|
|
3699
3730
|
}
|
|
@@ -3701,19 +3732,19 @@ var unminify_booleans_default = {
|
|
|
3701
3732
|
};
|
|
3702
3733
|
var trueMatcher2 = or(unaryExpression("!", numericLiteral(0)), unaryExpression("!", unaryExpression("!", numericLiteral(1))), unaryExpression("!", unaryExpression("!", arrayExpression([]))));
|
|
3703
3734
|
var falseMatcher2 = or(unaryExpression("!", numericLiteral(1)), unaryExpression("!", arrayExpression([])));
|
|
3704
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3705
|
-
import * as
|
|
3735
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/void-to-undefined.ts
|
|
3736
|
+
import * as t34 from "@babel/types";
|
|
3706
3737
|
var void_to_undefined_default = {
|
|
3707
3738
|
name: "void-to-undefined",
|
|
3708
3739
|
tags: ["safe"],
|
|
3709
3740
|
scope: true,
|
|
3710
3741
|
visitor: () => {
|
|
3711
|
-
const
|
|
3742
|
+
const matcher5 = unaryExpression("void", numericLiteral(0));
|
|
3712
3743
|
return {
|
|
3713
3744
|
UnaryExpression: {
|
|
3714
3745
|
exit(path) {
|
|
3715
|
-
if (
|
|
3716
|
-
path.replaceWith(
|
|
3746
|
+
if (matcher5.match(path.node) && !path.scope.hasBinding("undefined", { noGlobals: true })) {
|
|
3747
|
+
path.replaceWith(t34.identifier("undefined"));
|
|
3717
3748
|
this.changes++;
|
|
3718
3749
|
}
|
|
3719
3750
|
}
|
|
@@ -3721,8 +3752,8 @@ var void_to_undefined_default = {
|
|
|
3721
3752
|
};
|
|
3722
3753
|
}
|
|
3723
3754
|
};
|
|
3724
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
3725
|
-
import * as
|
|
3755
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/unminify/transforms/yoda.ts
|
|
3756
|
+
import * as t35 from "@babel/types";
|
|
3726
3757
|
var FLIPPED_OPERATORS = {
|
|
3727
3758
|
"==": "==",
|
|
3728
3759
|
"===": "===",
|
|
@@ -3741,12 +3772,12 @@ var yoda_default = {
|
|
|
3741
3772
|
name: "yoda",
|
|
3742
3773
|
tags: ["safe"],
|
|
3743
3774
|
visitor: () => {
|
|
3744
|
-
const
|
|
3775
|
+
const matcher5 = binaryExpression(or(...Object.values(FLIPPED_OPERATORS)), or(stringLiteral(), numericLiteral(), unaryExpression("-", or(numericLiteral(), identifier("Infinity"))), booleanLiteral(), nullLiteral(), identifier("undefined"), identifier("NaN"), identifier("Infinity")), predicate((node) => !t35.isLiteral(node)));
|
|
3745
3776
|
return {
|
|
3746
3777
|
BinaryExpression: {
|
|
3747
3778
|
exit(path) {
|
|
3748
|
-
if (
|
|
3749
|
-
path.replaceWith(
|
|
3779
|
+
if (matcher5.match(path.node)) {
|
|
3780
|
+
path.replaceWith(t35.binaryExpression(FLIPPED_OPERATORS[path.node.operator], path.node.right, path.node.left));
|
|
3750
3781
|
this.changes++;
|
|
3751
3782
|
}
|
|
3752
3783
|
}
|
|
@@ -3777,7 +3808,7 @@ async function transform2(ast2) {
|
|
|
3777
3808
|
}
|
|
3778
3809
|
|
|
3779
3810
|
// transform/esmodule/module-helper.ts
|
|
3780
|
-
import * as
|
|
3811
|
+
import * as t36 from "@babel/types";
|
|
3781
3812
|
|
|
3782
3813
|
// utils/matchers/chunk.ts
|
|
3783
3814
|
function chunk(id) {
|
|
@@ -3810,6 +3841,7 @@ var mod2 = capture(identifier());
|
|
|
3810
3841
|
var k = capture(identifier());
|
|
3811
3842
|
var k2 = capture(identifier());
|
|
3812
3843
|
var desc = capture(identifier());
|
|
3844
|
+
var descMiddle = capture(identifier());
|
|
3813
3845
|
var descObj = objectExpression([
|
|
3814
3846
|
objectProperty(identifier("enumerable"), booleanLiteral(true)),
|
|
3815
3847
|
objectProperty(identifier("get"), functionExpression(null, [], blockStatement([
|
|
@@ -3826,9 +3858,14 @@ var createBinding_default = variableDeclaration("var", [
|
|
|
3826
3858
|
fromCapture(k)
|
|
3827
3859
|
]))
|
|
3828
3860
|
]),
|
|
3829
|
-
ifStatement(logicalExpression("||", unaryExpression("!", fromCapture(desc), true), or(cond, unaryExpression("!", unaryExpression("!", cond, true), true))), blockStatement([
|
|
3861
|
+
ifStatement(logicalExpression("||", unaryExpression("!", fromCapture(desc), true), or(cond, unaryExpression("!", unaryExpression("!", cond, true), true))), or(blockStatement([
|
|
3830
3862
|
expressionStatement(assignmentExpression("=", fromCapture(desc), descObj))
|
|
3831
|
-
]),
|
|
3863
|
+
]), blockStatement([
|
|
3864
|
+
variableDeclaration("const", [
|
|
3865
|
+
variableDeclarator(descMiddle, descObj)
|
|
3866
|
+
]),
|
|
3867
|
+
expressionStatement(assignmentExpression("=", fromCapture(desc), fromCapture(descMiddle)))
|
|
3868
|
+
])), null),
|
|
3832
3869
|
expressionStatement(callExpression(memberExpression(identifier("Object"), identifier("defineProperty"), false), [
|
|
3833
3870
|
fromCapture(obj),
|
|
3834
3871
|
fromCapture(k2),
|
|
@@ -4020,19 +4057,19 @@ var module_helper_default = {
|
|
|
4020
4057
|
if (!$id.isIdentifier()) {
|
|
4021
4058
|
return;
|
|
4022
4059
|
}
|
|
4023
|
-
if (importStar_default.match(
|
|
4060
|
+
if (importStar_default.match(t36.cloneNode(p2.node))) {
|
|
4024
4061
|
$id.scope.rename($id.node.name, "__importStar");
|
|
4025
4062
|
$decl.get("init").replaceWith(__importStar);
|
|
4026
|
-
} else if (setModuleDefault_default.match(
|
|
4063
|
+
} else if (setModuleDefault_default.match(t36.cloneNode(p2.node))) {
|
|
4027
4064
|
$id.scope.rename($id.node.name, "__setModuleDefault");
|
|
4028
4065
|
$decl.get("init").replaceWith(__setModuleDefault);
|
|
4029
|
-
} else if (importDefault_default.match(
|
|
4066
|
+
} else if (importDefault_default.match(t36.cloneNode(p2.node))) {
|
|
4030
4067
|
$id.scope.rename($id.node.name, "__importDefault");
|
|
4031
4068
|
$decl.get("init").replaceWith(__importDefault);
|
|
4032
|
-
} else if (createBinding_default.match(
|
|
4069
|
+
} else if (createBinding_default.match(t36.cloneNode(p2.node))) {
|
|
4033
4070
|
$id.scope.rename($id.node.name, "__createBinding");
|
|
4034
4071
|
$decl.get("init").replaceWith(__createBinding);
|
|
4035
|
-
} else if (exportStar_default.match(
|
|
4072
|
+
} else if (exportStar_default.match(t36.cloneNode(p2.node))) {
|
|
4036
4073
|
$id.scope.rename($id.node.name, "__exportStar");
|
|
4037
4074
|
$decl.get("init").replaceWith(__exportStar);
|
|
4038
4075
|
} else {
|
|
@@ -4049,7 +4086,7 @@ var module_helper_default = {
|
|
|
4049
4086
|
};
|
|
4050
4087
|
|
|
4051
4088
|
// transform/esmodule/indirect-call.ts
|
|
4052
|
-
import * as
|
|
4089
|
+
import * as t37 from "@babel/types";
|
|
4053
4090
|
var indirect_call_default = {
|
|
4054
4091
|
name: "indirect-call",
|
|
4055
4092
|
tags: ["unsafe"],
|
|
@@ -4057,16 +4094,16 @@ var indirect_call_default = {
|
|
|
4057
4094
|
CallExpression: {
|
|
4058
4095
|
exit($) {
|
|
4059
4096
|
const { callee, arguments: args } = $.node;
|
|
4060
|
-
if (!
|
|
4097
|
+
if (!t37.isSequenceExpression(callee)) {
|
|
4061
4098
|
return;
|
|
4062
4099
|
}
|
|
4063
4100
|
const exprs = [...callee.expressions];
|
|
4064
4101
|
const func = exprs.pop();
|
|
4065
|
-
if (!
|
|
4102
|
+
if (!t37.isMemberExpression(func)) {
|
|
4066
4103
|
return;
|
|
4067
4104
|
}
|
|
4068
|
-
if (exprs.every((expr) =>
|
|
4069
|
-
$.replaceWith(
|
|
4105
|
+
if (exprs.every((expr) => t37.isPureish(expr))) {
|
|
4106
|
+
$.replaceWith(t37.callExpression(func, args));
|
|
4070
4107
|
this.changes++;
|
|
4071
4108
|
}
|
|
4072
4109
|
}
|
|
@@ -4110,7 +4147,7 @@ function transform3(ast2) {
|
|
|
4110
4147
|
}
|
|
4111
4148
|
|
|
4112
4149
|
// transform/syntactic/template-literal.ts
|
|
4113
|
-
import * as
|
|
4150
|
+
import * as t38 from "@babel/types";
|
|
4114
4151
|
var escape = function(string) {
|
|
4115
4152
|
return string.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("$", "\\$").replaceAll("\t", "\\t").replaceAll("\r", "\\r").replaceAll("\0", "\\0");
|
|
4116
4153
|
};
|
|
@@ -4133,10 +4170,10 @@ var template_literal_default = {
|
|
|
4133
4170
|
if (!last) {
|
|
4134
4171
|
throw new Error("Unexpected empty template literal");
|
|
4135
4172
|
}
|
|
4136
|
-
$left.node.quasis.push(
|
|
4173
|
+
$left.node.quasis.push(t38.templateElement({
|
|
4137
4174
|
raw: last.value.raw + $right.node.quasis[0].value.raw
|
|
4138
4175
|
}, false), ...$right.node.quasis.slice(1));
|
|
4139
|
-
$.replaceWith(
|
|
4176
|
+
$.replaceWith(t38.templateLiteral([
|
|
4140
4177
|
...$left.node.quasis
|
|
4141
4178
|
], [
|
|
4142
4179
|
...$left.node.expressions,
|
|
@@ -4147,17 +4184,17 @@ var template_literal_default = {
|
|
|
4147
4184
|
if (!last) {
|
|
4148
4185
|
throw new Error("Unexpected empty template literal");
|
|
4149
4186
|
}
|
|
4150
|
-
$left.node.quasis.push(
|
|
4187
|
+
$left.node.quasis.push(t38.templateElement({
|
|
4151
4188
|
raw: escape(last.value.raw + $right.node.value)
|
|
4152
4189
|
}, true));
|
|
4153
4190
|
$.replaceWith($left.node);
|
|
4154
4191
|
} else {
|
|
4155
|
-
$.replaceWith(
|
|
4192
|
+
$.replaceWith(t38.templateLiteral([
|
|
4156
4193
|
...$left.node.quasis.map((element) => {
|
|
4157
4194
|
element.tail = false;
|
|
4158
4195
|
return element;
|
|
4159
4196
|
}),
|
|
4160
|
-
|
|
4197
|
+
t38.templateElement({ raw: "" }, true)
|
|
4161
4198
|
], [
|
|
4162
4199
|
...$left.node.expressions,
|
|
4163
4200
|
$right.node
|
|
@@ -4171,9 +4208,9 @@ var template_literal_default = {
|
|
|
4171
4208
|
if ($right.isCallExpression() && $right.get("callee").isFunctionExpression()) {
|
|
4172
4209
|
return;
|
|
4173
4210
|
}
|
|
4174
|
-
$.replaceWith(
|
|
4175
|
-
|
|
4176
|
-
|
|
4211
|
+
$.replaceWith(t38.templateLiteral([
|
|
4212
|
+
t38.templateElement({ raw: escape($left.node.value) }, false),
|
|
4213
|
+
t38.templateElement({ raw: "" }, true)
|
|
4177
4214
|
], [
|
|
4178
4215
|
$right.node
|
|
4179
4216
|
]));
|
|
@@ -4192,7 +4229,7 @@ function transform4(ast2) {
|
|
|
4192
4229
|
return ast2;
|
|
4193
4230
|
}
|
|
4194
4231
|
|
|
4195
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4232
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/index.ts
|
|
4196
4233
|
var exports_transforms2 = {};
|
|
4197
4234
|
__export(exports_transforms2, {
|
|
4198
4235
|
templateLiterals: () => {
|
|
@@ -4219,11 +4256,73 @@ __export(exports_transforms2, {
|
|
|
4219
4256
|
{
|
|
4220
4257
|
return logical_assignments_default;
|
|
4221
4258
|
}
|
|
4259
|
+
},
|
|
4260
|
+
defaultParameters: () => {
|
|
4261
|
+
{
|
|
4262
|
+
return default_parameters_default;
|
|
4263
|
+
}
|
|
4222
4264
|
}
|
|
4223
4265
|
});
|
|
4224
4266
|
|
|
4225
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4226
|
-
import * as
|
|
4267
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/default-parameters.ts
|
|
4268
|
+
import * as t39 from "@babel/types";
|
|
4269
|
+
var default_parameters_default = {
|
|
4270
|
+
name: "default-parameters",
|
|
4271
|
+
tags: ["safe"],
|
|
4272
|
+
scope: true,
|
|
4273
|
+
visitor() {
|
|
4274
|
+
const defaultExpression = capture(anyExpression());
|
|
4275
|
+
const index = capture(numericLiteral());
|
|
4276
|
+
const varName = capture(identifier());
|
|
4277
|
+
const defaultParam = variableDeclaration(undefined, [
|
|
4278
|
+
variableDeclarator(varName, conditionalExpression(logicalExpression("&&", binaryExpression(">", constMemberExpression("arguments", "length"), index), binaryExpression("!==", memberExpression(identifier("arguments"), fromCapture(index), true), identifier("undefined"))), memberExpression(identifier("arguments"), fromCapture(index), true), defaultExpression))
|
|
4279
|
+
]);
|
|
4280
|
+
const defaultParamLoose = ifStatement(binaryExpression("===", varName, identifier("undefined")), blockStatement([
|
|
4281
|
+
expressionStatement(assignmentExpression("=", fromCapture(varName), defaultExpression))
|
|
4282
|
+
]));
|
|
4283
|
+
const normalParam = variableDeclaration(undefined, [
|
|
4284
|
+
variableDeclarator(varName, conditionalExpression(binaryExpression(">", constMemberExpression("arguments", "length"), index), memberExpression(identifier("arguments"), fromCapture(index), true), identifier("undefined")))
|
|
4285
|
+
]);
|
|
4286
|
+
return {
|
|
4287
|
+
VariableDeclaration: {
|
|
4288
|
+
exit(path) {
|
|
4289
|
+
const fn = path.parentPath.parent;
|
|
4290
|
+
if (!t39.isFunction(fn) || path.key !== 0)
|
|
4291
|
+
return;
|
|
4292
|
+
if (defaultParam.match(path.node)) {
|
|
4293
|
+
fn.params[index.current.value] = t39.assignmentPattern(varName.current, defaultExpression.current);
|
|
4294
|
+
path.remove();
|
|
4295
|
+
this.changes++;
|
|
4296
|
+
} else if (normalParam.match(path.node)) {
|
|
4297
|
+
fn.params[index.current.value] = varName.current;
|
|
4298
|
+
path.remove();
|
|
4299
|
+
this.changes++;
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
},
|
|
4303
|
+
IfStatement: {
|
|
4304
|
+
exit(path) {
|
|
4305
|
+
const fn = path.parentPath.parent;
|
|
4306
|
+
if (!t39.isFunction(fn) || path.key !== 0)
|
|
4307
|
+
return;
|
|
4308
|
+
if (!defaultParamLoose.match(path.node))
|
|
4309
|
+
return;
|
|
4310
|
+
const binding = path.scope.getOwnBinding(varName.current.name);
|
|
4311
|
+
if (!binding)
|
|
4312
|
+
return;
|
|
4313
|
+
const isFunctionParam = binding.path.listKey === "params" && binding.path.parent === fn;
|
|
4314
|
+
if (!isFunctionParam)
|
|
4315
|
+
return;
|
|
4316
|
+
binding.path.replaceWith(t39.assignmentPattern(varName.current, defaultExpression.current));
|
|
4317
|
+
path.remove();
|
|
4318
|
+
this.changes++;
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
};
|
|
4322
|
+
}
|
|
4323
|
+
};
|
|
4324
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/logical-assignments.ts
|
|
4325
|
+
import * as t40 from "@babel/types";
|
|
4227
4326
|
var logical_assignments_default = {
|
|
4228
4327
|
name: "logical-assignments",
|
|
4229
4328
|
tags: ["safe"],
|
|
@@ -4245,7 +4344,7 @@ var logical_assignments_default = {
|
|
|
4245
4344
|
LogicalExpression: {
|
|
4246
4345
|
exit(path) {
|
|
4247
4346
|
if (idMatcher.match(path.node)) {
|
|
4248
|
-
path.replaceWith(
|
|
4347
|
+
path.replaceWith(t40.assignmentExpression(operator.current + "=", left.current, right.current));
|
|
4249
4348
|
this.changes++;
|
|
4250
4349
|
} else if (memberMatcher.match(path.node)) {
|
|
4251
4350
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
@@ -4253,14 +4352,14 @@ var logical_assignments_default = {
|
|
|
4253
4352
|
return;
|
|
4254
4353
|
binding.path.remove();
|
|
4255
4354
|
member.current.object = object.current;
|
|
4256
|
-
path.replaceWith(
|
|
4355
|
+
path.replaceWith(t40.assignmentExpression(operator.current + "=", member.current, right.current));
|
|
4257
4356
|
this.changes++;
|
|
4258
4357
|
} else if (computedMemberMatcher.match(path.node)) {
|
|
4259
4358
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
4260
4359
|
if (!isTemporaryVariable(binding, 1))
|
|
4261
4360
|
return;
|
|
4262
4361
|
binding.path.remove();
|
|
4263
|
-
path.replaceWith(
|
|
4362
|
+
path.replaceWith(t40.assignmentExpression(operator.current + "=", t40.memberExpression(object.current, property.current, true), right.current));
|
|
4264
4363
|
this.changes++;
|
|
4265
4364
|
} else if (multiComputedMemberMatcher.match(path.node)) {
|
|
4266
4365
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
@@ -4269,7 +4368,7 @@ var logical_assignments_default = {
|
|
|
4269
4368
|
return;
|
|
4270
4369
|
binding.path.remove();
|
|
4271
4370
|
binding2.path.remove();
|
|
4272
|
-
path.replaceWith(
|
|
4371
|
+
path.replaceWith(t40.assignmentExpression(operator.current + "=", t40.memberExpression(object.current, property.current, true), right.current));
|
|
4273
4372
|
this.changes++;
|
|
4274
4373
|
}
|
|
4275
4374
|
}
|
|
@@ -4277,8 +4376,8 @@ var logical_assignments_default = {
|
|
|
4277
4376
|
};
|
|
4278
4377
|
}
|
|
4279
4378
|
};
|
|
4280
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4281
|
-
import * as
|
|
4379
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/nullish-coalescing.ts
|
|
4380
|
+
import * as t41 from "@babel/types";
|
|
4282
4381
|
var nullish_coalescing_default = {
|
|
4283
4382
|
name: "nullish-coalescing",
|
|
4284
4383
|
tags: ["safe"],
|
|
@@ -4297,11 +4396,11 @@ var nullish_coalescing_default = {
|
|
|
4297
4396
|
if (idMatcher.match(path.node)) {
|
|
4298
4397
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
4299
4398
|
if (iifeMatcher.match(path.parentPath.parent) && isTemporaryVariable(binding, 2, "param")) {
|
|
4300
|
-
path.parentPath.parentPath.replaceWith(
|
|
4399
|
+
path.parentPath.parentPath.replaceWith(t41.logicalExpression("??", left.current, right.current));
|
|
4301
4400
|
this.changes++;
|
|
4302
4401
|
} else if (isTemporaryVariable(binding, 2, "var")) {
|
|
4303
4402
|
binding.path.remove();
|
|
4304
|
-
path.replaceWith(
|
|
4403
|
+
path.replaceWith(t41.logicalExpression("??", left.current, right.current));
|
|
4305
4404
|
this.changes++;
|
|
4306
4405
|
}
|
|
4307
4406
|
} else if (idLooseMatcher.match(path.node)) {
|
|
@@ -4309,10 +4408,10 @@ var nullish_coalescing_default = {
|
|
|
4309
4408
|
if (!isTemporaryVariable(binding, 1))
|
|
4310
4409
|
return;
|
|
4311
4410
|
binding.path.remove();
|
|
4312
|
-
path.replaceWith(
|
|
4411
|
+
path.replaceWith(t41.logicalExpression("??", left.current, right.current));
|
|
4313
4412
|
this.changes++;
|
|
4314
4413
|
} else if (simpleIdMatcher.match(path.node)) {
|
|
4315
|
-
path.replaceWith(
|
|
4414
|
+
path.replaceWith(t41.logicalExpression("??", left.current, right.current));
|
|
4316
4415
|
this.changes++;
|
|
4317
4416
|
}
|
|
4318
4417
|
}
|
|
@@ -4320,8 +4419,8 @@ var nullish_coalescing_default = {
|
|
|
4320
4419
|
};
|
|
4321
4420
|
}
|
|
4322
4421
|
};
|
|
4323
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4324
|
-
import * as
|
|
4422
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/nullish-coalescing-assignment.ts
|
|
4423
|
+
import * as t42 from "@babel/types";
|
|
4325
4424
|
var nullish_coalescing_assignment_default = {
|
|
4326
4425
|
name: "nullish-coalescing-assignment",
|
|
4327
4426
|
tags: ["safe"],
|
|
@@ -4343,10 +4442,10 @@ var nullish_coalescing_assignment_default = {
|
|
|
4343
4442
|
if (!isTemporaryVariable(binding, 1))
|
|
4344
4443
|
return;
|
|
4345
4444
|
binding.path.remove();
|
|
4346
|
-
path.replaceWith(
|
|
4445
|
+
path.replaceWith(t42.assignmentExpression("??=", t42.memberExpression(leftId.current, property.current, computed.current), right.current));
|
|
4347
4446
|
this.changes++;
|
|
4348
4447
|
} else if (simpleMatcher.match(path.node)) {
|
|
4349
|
-
path.replaceWith(
|
|
4448
|
+
path.replaceWith(t42.assignmentExpression("??=", left.current, right.current));
|
|
4350
4449
|
this.changes++;
|
|
4351
4450
|
}
|
|
4352
4451
|
}
|
|
@@ -4354,8 +4453,8 @@ var nullish_coalescing_assignment_default = {
|
|
|
4354
4453
|
};
|
|
4355
4454
|
}
|
|
4356
4455
|
};
|
|
4357
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4358
|
-
import * as
|
|
4456
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/optional-chaining.ts
|
|
4457
|
+
import * as t43 from "@babel/types";
|
|
4359
4458
|
var optional_chaining_default = {
|
|
4360
4459
|
name: "optional-chaining",
|
|
4361
4460
|
tags: ["safe"],
|
|
@@ -4372,7 +4471,7 @@ var optional_chaining_default = {
|
|
|
4372
4471
|
exit(path) {
|
|
4373
4472
|
if (simpleMatcher.match(path.node)) {
|
|
4374
4473
|
member.current.optional = true;
|
|
4375
|
-
path.replaceWith(
|
|
4474
|
+
path.replaceWith(t43.optionalMemberExpression(object.current, member.current.property, member.current.computed, true));
|
|
4376
4475
|
this.changes++;
|
|
4377
4476
|
} else if (tmpMatcher.match(path.node)) {
|
|
4378
4477
|
const binding = path.scope.getBinding(tmpVar.current.name);
|
|
@@ -4380,7 +4479,7 @@ var optional_chaining_default = {
|
|
|
4380
4479
|
return;
|
|
4381
4480
|
binding.path.remove();
|
|
4382
4481
|
tmpMember.current.optional = true;
|
|
4383
|
-
path.replaceWith(
|
|
4482
|
+
path.replaceWith(t43.optionalMemberExpression(object.current, tmpMember.current.property, tmpMember.current.computed, true));
|
|
4384
4483
|
this.changes++;
|
|
4385
4484
|
}
|
|
4386
4485
|
}
|
|
@@ -4388,8 +4487,8 @@ var optional_chaining_default = {
|
|
|
4388
4487
|
};
|
|
4389
4488
|
}
|
|
4390
4489
|
};
|
|
4391
|
-
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=
|
|
4392
|
-
import * as
|
|
4490
|
+
// node_modules/.pnpm/@gitpkg.vercel.app+api+pkg.tgz+url=j4k0xb+webcrack+packages@webcrack&commit=1287443b72a6af593_u3m7sldwhfagviulez3apv5uwu/node_modules/webcrack/src/transpile/transforms/template-literals.ts
|
|
4491
|
+
import * as t44 from "@babel/types";
|
|
4393
4492
|
var escape2 = function(str) {
|
|
4394
4493
|
return str.replaceAll("\\", "\\\\").replaceAll("`", "\\`").replaceAll("$", "\\$").replaceAll("\0", "\\0").replaceAll("\b", "\\b").replaceAll("\f", "\\f").replaceAll("\r", "\\r").replaceAll("\t", "\\t").replaceAll("\v", "\\v");
|
|
4395
4494
|
};
|
|
@@ -4405,7 +4504,7 @@ var push = function(template9, value) {
|
|
|
4405
4504
|
template9.quasis.push(...value.quasis.slice(1));
|
|
4406
4505
|
} else {
|
|
4407
4506
|
template9.expressions.push(value);
|
|
4408
|
-
template9.quasis.push(
|
|
4507
|
+
template9.quasis.push(t44.templateElement({ raw: "" }));
|
|
4409
4508
|
}
|
|
4410
4509
|
};
|
|
4411
4510
|
var unshift = function(template9, value) {
|
|
@@ -4419,24 +4518,25 @@ var unshift = function(template9, value) {
|
|
|
4419
4518
|
template9.quasis.unshift(...value.quasis.slice(0, -1));
|
|
4420
4519
|
} else {
|
|
4421
4520
|
template9.expressions.unshift(value);
|
|
4422
|
-
template9.quasis.unshift(
|
|
4521
|
+
template9.quasis.unshift(t44.templateElement({ raw: "" }));
|
|
4423
4522
|
}
|
|
4424
4523
|
};
|
|
4425
4524
|
var template_literals_default = {
|
|
4426
4525
|
name: "template-literals",
|
|
4427
4526
|
tags: ["unsafe"],
|
|
4428
4527
|
visitor() {
|
|
4429
|
-
const
|
|
4528
|
+
const string = capture(or(stringLiteral(), templateLiteral()));
|
|
4529
|
+
const concatMatcher = callExpression(constMemberExpression(string, "concat"), arrayOf(anyExpression()));
|
|
4430
4530
|
return {
|
|
4431
4531
|
BinaryExpression: {
|
|
4432
4532
|
exit(path) {
|
|
4433
4533
|
if (path.node.operator !== "+")
|
|
4434
4534
|
return;
|
|
4435
|
-
if (
|
|
4535
|
+
if (t44.isTemplateLiteral(path.node.left)) {
|
|
4436
4536
|
push(path.node.left, path.node.right);
|
|
4437
4537
|
path.replaceWith(path.node.left);
|
|
4438
4538
|
this.changes++;
|
|
4439
|
-
} else if (
|
|
4539
|
+
} else if (t44.isTemplateLiteral(path.node.right) && t44.isExpression(path.node.left)) {
|
|
4440
4540
|
unshift(path.node.right, path.node.left);
|
|
4441
4541
|
path.replaceWith(path.node.right);
|
|
4442
4542
|
this.changes++;
|
|
@@ -4445,16 +4545,12 @@ var template_literals_default = {
|
|
|
4445
4545
|
},
|
|
4446
4546
|
CallExpression: {
|
|
4447
4547
|
exit(path) {
|
|
4448
|
-
if (concatMatcher.match(path.node)
|
|
4449
|
-
const template9 =
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
unshift(template9, arg);
|
|
4454
|
-
}
|
|
4455
|
-
current = current.callee.object;
|
|
4548
|
+
if (concatMatcher.match(path.node)) {
|
|
4549
|
+
const template9 = t44.templateLiteral([t44.templateElement({ raw: "" })], []);
|
|
4550
|
+
push(template9, string.current);
|
|
4551
|
+
for (const arg of path.node.arguments) {
|
|
4552
|
+
push(template9, arg);
|
|
4456
4553
|
}
|
|
4457
|
-
unshift(template9, current);
|
|
4458
4554
|
path.replaceWith(template9);
|
|
4459
4555
|
this.changes++;
|
|
4460
4556
|
}
|
|
@@ -4472,7 +4568,7 @@ var transpile_default = mergeTransforms({
|
|
|
4472
4568
|
|
|
4473
4569
|
// transform/delance/stringaes.ts
|
|
4474
4570
|
import traverse14 from "@babel/traverse";
|
|
4475
|
-
import * as
|
|
4571
|
+
import * as t45 from "@babel/types";
|
|
4476
4572
|
|
|
4477
4573
|
// utils/crypto.ts
|
|
4478
4574
|
import crypto from "node:crypto";
|
|
@@ -4575,7 +4671,7 @@ var stringaes_default = {
|
|
|
4575
4671
|
$id.assertIdentifier();
|
|
4576
4672
|
const $string = $.get("arguments")[0];
|
|
4577
4673
|
$string.assertStringLiteral();
|
|
4578
|
-
$.replaceWith(
|
|
4674
|
+
$.replaceWith(t45.stringLiteral(decrypt($string.node.value)));
|
|
4579
4675
|
this.changes++;
|
|
4580
4676
|
}
|
|
4581
4677
|
}
|
|
@@ -4584,7 +4680,7 @@ var stringaes_default = {
|
|
|
4584
4680
|
};
|
|
4585
4681
|
|
|
4586
4682
|
// transform/delance/antifeature.ts
|
|
4587
|
-
import * as
|
|
4683
|
+
import * as t46 from "@babel/types";
|
|
4588
4684
|
import tmpl6 from "@babel/template";
|
|
4589
4685
|
var entry = capture(numericLiteral());
|
|
4590
4686
|
var main = callExpression(memberExpression(callExpression(identifier("require"), [entry]), identifier("main"), false), [booleanLiteral(true)]);
|
|
@@ -4599,7 +4695,7 @@ var antifeature_default = {
|
|
|
4599
4695
|
if (!main.match($.node)) {
|
|
4600
4696
|
return;
|
|
4601
4697
|
}
|
|
4602
|
-
|
|
4698
|
+
t46.assertNumericLiteral(entry.current);
|
|
4603
4699
|
const _target = $.find((p2) => chunk_default.match(p2.node));
|
|
4604
4700
|
if (!_target) {
|
|
4605
4701
|
throw new Error("Could not find module chunk");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@delance/builder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
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>",
|
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
"ecmaVersion": "latest",
|
|
22
22
|
"sourceType": "module"
|
|
23
23
|
},
|
|
24
|
-
"extends":
|
|
24
|
+
"extends": [
|
|
25
|
+
"xo",
|
|
26
|
+
"./node_modules/xo/config/plugins.cjs"
|
|
27
|
+
],
|
|
25
28
|
"overrides": [
|
|
26
29
|
{
|
|
27
30
|
"files": [
|
|
@@ -70,23 +73,23 @@
|
|
|
70
73
|
"@codemod/matchers": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/matchers&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
71
74
|
"@codemod/parser": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/parser&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
72
75
|
"@codemod/utils": "https://gitpkg.vercel.app/api/pkg.tgz?url=codemod-js/codemod/packages/utils&commit=c39500f305f11f7fa99e037c950a3c89017ed227&scripts.postinstall=rimraf tsconfig.json",
|
|
73
|
-
"@types/babel__core": "^7",
|
|
74
|
-
"@types/babel__generator": "^7",
|
|
75
|
-
"@types/babel__helper-validator-identifier": "^7",
|
|
76
|
-
"@types/babel__template": "^7",
|
|
77
|
-
"@types/babel__traverse": "^7",
|
|
78
|
-
"@types/bun": "^1.0.
|
|
79
|
-
"@types/debug": "^4",
|
|
80
|
-
"bun": "^1.0.
|
|
76
|
+
"@types/babel__core": "^7.20.5",
|
|
77
|
+
"@types/babel__generator": "^7.6.8",
|
|
78
|
+
"@types/babel__helper-validator-identifier": "^7.15.2",
|
|
79
|
+
"@types/babel__template": "^7.4.4",
|
|
80
|
+
"@types/babel__traverse": "^7.20.5",
|
|
81
|
+
"@types/bun": "^1.0.8",
|
|
82
|
+
"@types/debug": "^4.1.12",
|
|
83
|
+
"bun": "^1.0.30",
|
|
81
84
|
"rimraf": "^5.0.5",
|
|
82
|
-
"typescript": "^5.
|
|
83
|
-
"webcrack": "https://gitpkg.vercel.app/api/pkg.tgz?url=j4k0xb/webcrack/packages/webcrack&commit=
|
|
85
|
+
"typescript": "^5.4.2",
|
|
86
|
+
"webcrack": "https://gitpkg.vercel.app/api/pkg.tgz?url=j4k0xb/webcrack/packages/webcrack&commit=1287443b72a6af593cf186771bd5b2d6afb7b9db&scripts.postinstall=rimraf tsconfig.json",
|
|
84
87
|
"xo": "^0.56.0"
|
|
85
88
|
},
|
|
86
89
|
"peerDependencies": {
|
|
87
90
|
"debug": "^4"
|
|
88
91
|
},
|
|
89
|
-
"packageManager": "pnpm@8.
|
|
92
|
+
"packageManager": "pnpm@8.15.4",
|
|
90
93
|
"engines": {
|
|
91
94
|
"node": ">=18"
|
|
92
95
|
},
|