From 0e059f13b188ccbde93e68f1cebe4bd48b170221 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 22 Sep 2023 15:33:16 +1000 Subject: [PATCH] fix --- missing.json | 7 +++++-- src/index.ts | 10 +++++----- src/template.js | 24 ++++++++++++------------ 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/missing.json b/missing.json index d0f3daa..545e5ac 100644 --- a/missing.json +++ b/missing.json @@ -1,7 +1,7 @@ { - "missing": 462, + "missing": 465, "spacebar": 154, - "discord": 593, + "discord": 596, "routes": [ "/:id/:id/update-gaming-stats", "/:id/force-send-prompt", @@ -140,6 +140,7 @@ "/emojis/:id/source", "/entitlements/gift-codes/:id", "/entitlements/gift-codes/:id/redeem", + "/entitlements/partner-promotions/:id", "/family-center/:id/activity", "/family-center/@me", "/family-center/@me/link-code", @@ -388,6 +389,8 @@ "/users/@me/billing/subscriptions/:id/invoices/:id/pay", "/users/@me/billing/subscriptions/:id/preview", "/users/@me/billing/subscriptions/preview", + "/users/@me/billing/user-offer", + "/users/@me/billing/user-offer/ack", "/users/@me/billing/user-trial-offer", "/users/@me/billing/user-trial-offer/:id/ack", "/users/@me/burst-credits", diff --git a/src/index.ts b/src/index.ts index 645b8a7..63ca2f4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,10 @@ -import fetch from "node-fetch"; -import * as meriyah from "meriyah"; +import { generate } from "astring"; import estraverse from "estraverse"; import ESTree from "estree"; -import { generate } from "astring"; -import fs from "fs"; import { traverse } from "estree-toolkit"; +import fs from "fs"; +import * as meriyah from "meriyah"; +import fetch from "node-fetch"; const JAVASCRIPT_ENVIRONMENT = fs.readFileSync("./src/template.js").toString(); @@ -49,7 +49,7 @@ const findClientRoutes = (source: string): string[] => { ) { // this is our routes list const generated = generate(node); - out = JAVASCRIPT_ENVIRONMENT.replace("// --- GENERATED_CODE_MARKER ---", generated); + out = JAVASCRIPT_ENVIRONMENT.replace("undefined;// --- GENERATED_CODE_MARKER ---", generated); return estraverse.VisitorOption.Break; } }, diff --git a/src/template.js b/src/template.js index b536b3c..ac012ec 100644 --- a/src/template.js +++ b/src/template.js @@ -1,20 +1,20 @@ var pe; (function (pe) { -pe["JOIN"] = "JOIN"; -pe["LISTEN"] = "LISTEN"; -pe["WATCH"] = "WATCH"; -pe["JOIN_REQUEST"] = "JOIN_REQUEST"; + pe["JOIN"] = "JOIN"; + pe["LISTEN"] = "LISTEN"; + pe["WATCH"] = "WATCH"; + pe["JOIN_REQUEST"] = "JOIN_REQUEST"; })(pe || (pe = {})); var DEVICES; (function (DEVICES) { -DEVICES["MOBILE"] = "mobile"; -DEVICES["DESKTOP"] = "desktop"; -DEVICES["WEB"] = "web"; -DEVICES["DEVICE_CODE"] = "device_code"; + DEVICES["MOBILE"] = "mobile"; + DEVICES["DESKTOP"] = "desktop"; + DEVICES["WEB"] = "web"; + DEVICES["DEVICE_CODE"] = "device_code"; })(DEVICES || (DEVICES = {})); -const P = {}; -P.g = DEVICES; +const x = {}; +x.g = DEVICES; // Some application ID, was 1096190356233670716 on 20/06/2023 const Oe = ":id"; @@ -23,9 +23,9 @@ const window = { GLOBAL_ENV: { WEBAPP_ENDPOINT: "webapp://" } -} +}; -const routes = // --- GENERATED_CODE_MARKER --- +const routes = undefined;// --- GENERATED_CODE_MARKER --- // we're inside an eval, so this code is what is implicitly returned Object.values(routes).map((route) => {