* fix(route/twitter): dynamically resolve GraphQL query IDs from Twitter JS bundles Twitter rotates GraphQL query IDs every 2-4 weeks, causing 404 errors. Instead of relying solely on hardcoded IDs, fetch and cache the latest query IDs from Twitter's client-web main.js bundle at runtime. - Add gql-id-resolver module to extract queryId/operationName pairs - Cache resolved IDs using CACHE_CONTENT_EXPIRE (Redis supported) - Fall back to hardcoded IDs if dynamic resolution fails - Update init() to trigger resolution before first API call Signed-off-by: yuguorui <yuguorui@pku.edu.cn> * fix(route/twitter): use undici.fetch directly to preserve CookieAgent dispatcher Both ofetch and the global wrappedFetch (request-rewriter) drop the dispatcher option when constructing a new Request object, which prevents the CookieAgent from attaching cookies in production builds. Use undici.fetch directly for Twitter API requests to preserve the dispatcher. Signed-off-by: yuguorui <yuguorui@pku.edu.cn> --------- Signed-off-by: yuguorui <yuguorui@pku.edu.cn> |
||
|---|---|---|
| .. | ||
| api | ||
| assets | ||
| errors | ||
| middleware | ||
| routes | ||
| routes-deprecated | ||
| shims | ||
| utils | ||
| views | ||
| app-bootstrap.test.tsx | ||
| app-bootstrap.tsx | ||
| app.test.ts | ||
| app.ts | ||
| app.worker.tsx | ||
| config.remote-error.test.ts | ||
| config.test.ts | ||
| config.ts | ||
| container.ts | ||
| entrypoints.test.ts | ||
| index.test.ts | ||
| index.ts | ||
| pkg.test.ts | ||
| pkg.ts | ||
| registry.dynamic.test.ts | ||
| registry.test.ts | ||
| registry.ts | ||
| route-paths.d.ts | ||
| router.js | ||
| routes.test.ts | ||
| server.ts | ||
| setup.test.ts | ||
| types.ts | ||
| worker.ts | ||
| worker.worker.test.ts | ||