diff --git a/CLAUDE.md b/CLAUDE.md index 055e3b2..f58d15d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -Splatoon3.ink displays Splatoon 3 map rotations, Salmon Run schedules, SplatNet gear, and more. It has a Vue 3 frontend (`src/`) and a Node.js backend (`app/`) in a single repository. The backend fetches data from Nintendo's SplatNet3 GraphQL API via nxapi and publishes updates to social media (Mastodon, Bluesky, Threads). +Splatoon3.ink displays Splatoon 3 map rotations, Salmon Run schedules, SplatNet gear, and more. It has a Vue 3 frontend (`src/`) and a Node.js backend (`app/`) in a single repository. The backend fetches data from Nintendo's SplatNet3 GraphQL API (authenticating through the nxapi znca API; `app/splatnet/coral.mjs` reimplements the nxapi client so it also runs in Workers) and publishes updates to social media (X via Buffer, Mastodon, Bluesky, Threads). ## Commands @@ -43,9 +43,10 @@ npm start # Run the Node backend locally: splatnet → social → c - ESLint flat config with Vue, JSDoc, and import-alias plugins - 2-space indentation, single quotes, semicolons, trailing commas on multiline +- Shared backend code must also run in Cloudflare Workers: avoid Node-only APIs there. Runtime-specific pieces use package imports with `workerd` and `default` conditions (`#image-converter`, `#avatars`, `#local-screenshot-driver` in package.json) - In `src/` files, use `@/` import alias (e.g., `import Foo from '@/components/Foo.vue'`) - Vue: multi-word component names not required, up to 4 attributes per single line, self-closing void HTML elements -- Node.js 22, ESM modules throughout (`.mjs` extension for backend files, `.js`/`.vue` for frontend) +- Node.js 24, ESM modules throughout (`.mjs` extension for backend files, `.js`/`.vue` for frontend) ## Testing diff --git a/app/common/image/convert.node.mjs b/app/common/image/convert.node.mjs new file mode 100644 index 0000000..9d8b754 --- /dev/null +++ b/app/common/image/convert.node.mjs @@ -0,0 +1,16 @@ +import sharp from 'sharp'; + +// Node implementation of #image-converter. The package import keeps native sharp out of the +// Worker bundle; convert.worker.mjs is the Workers counterpart. + +/** + * @param {Uint8Array} png + * @param {object} [options] + * @param {number} [options.quality] + * @returns {Promise} JPEG bytes + */ +export async function convertToJpeg(png, { quality = 80 } = {}) { + return new Uint8Array( + await sharp(png).flatten({ background: '#ffffff' }).jpeg({ quality }).toBuffer(), + ); +} diff --git a/app/common/image/convert.worker.mjs b/app/common/image/convert.worker.mjs new file mode 100644 index 0000000..5c103f8 --- /dev/null +++ b/app/common/image/convert.worker.mjs @@ -0,0 +1,19 @@ +import { env } from 'cloudflare:workers'; + +// Workers implementation of #image-converter, using the Images binding. + +/** + * @param {Uint8Array} png + * @param {object} [options] + * @param {number} [options.quality] + * @param {object} [options.images] Images binding (defaults to env.IMAGES) + * @returns {Promise} JPEG bytes + */ +export async function convertToJpeg(png, { quality = 80, images = env.IMAGES } = {}) { + let result = await images + .input(new Response(png).body) + .transform({ background: '#ffffff' }) + .output({ format: 'image/jpeg', quality }); + + return new Uint8Array(await result.response().arrayBuffer()); +} diff --git a/app/common/image/image.test.mjs b/app/common/image/image.test.mjs new file mode 100644 index 0000000..a32f74f --- /dev/null +++ b/app/common/image/image.test.mjs @@ -0,0 +1,27 @@ +import sharp from 'sharp'; +import { describe, expect, it } from 'vitest'; +import { convertToJpeg } from '#image-converter'; +import { pngSize } from './png.mjs'; + +async function png(width, height) { + return new Uint8Array(await sharp({ + create: { width, height, channels: 4, background: { r: 0, g: 0, b: 0, alpha: 0 } }, + }).png().toBuffer()); +} + +describe('images', () => { + it('reads PNG dimensions', async () => { + expect(pngSize(await png(12, 7))).toEqual({ width: 12, height: 7 }); + expect(pngSize(new Uint8Array([1, 2, 3]))).toBeNull(); + }); + + it('converts PNGs to JPEG on a white background in Node', async () => { + let jpeg = await convertToJpeg(await png(4, 3)); + let { data, info } = await sharp(jpeg).raw().toBuffer({ resolveWithObject: true }); + + expect(jpeg).toBeInstanceOf(Uint8Array); + expect([jpeg[0], jpeg[1]]).toEqual([0xff, 0xd8]); + expect(info).toMatchObject({ width: 4, height: 3 }); + expect(data[0]).toBeGreaterThan(240); + }); +}); diff --git a/app/common/image/png.mjs b/app/common/image/png.mjs new file mode 100644 index 0000000..92eb598 --- /dev/null +++ b/app/common/image/png.mjs @@ -0,0 +1,16 @@ +/** + * Width and height from a PNG's IHDR chunk. + * @param {Uint8Array} bytes + * @returns {{ width: number, height: number }|null} The size, or null if the bytes are not a PNG + */ +export function pngSize(bytes) { + let signature = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]; + + if (!bytes || bytes.length < 24 || !signature.every((byte, index) => bytes[index] === byte)) { + return null; + } + + let view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength); + + return { width: view.getUint32(16), height: view.getUint32(20) }; +} diff --git a/app/common/prefixedConsole.mjs b/app/common/prefixedConsole.mjs index 170bcbe..ab454b0 100644 --- a/app/common/prefixedConsole.mjs +++ b/app/common/prefixedConsole.mjs @@ -1,12 +1,24 @@ -import { Console } from 'node:console'; -import consoleStamp from 'console-stamp'; +const methods = ['log', 'info', 'warn', 'error', 'debug']; +/** + * A console whose messages start with [prefix] labels. It forwards to the global console at + * call time, so the Node CLI's timestamps (console-stamp) and Workers logging both apply. + * @param {...string} prefixes + * @returns {Record<'log'|'info'|'warn'|'error'|'debug', (...args: unknown[]) => void>} The prefixed console + */ export default function prefixedConsole(...prefixes) { - let result = new Console({ stdout: process.stdout, stderr: process.stderr }); - let prefix = prefixes.map(s => `[${s}]`).join(' '); - let format = `:date(dd.mm.yyyy HH:MM:ss.l) :label(7) ${prefix}`.trim(); - consoleStamp(result, { format }); - return result; + return Object.fromEntries(methods.map(method => [method, (...args) => { + if (!prefix) { + return console[method](...args); + } + + // Keep printf-style placeholders in the first argument working. + if (typeof args[0] === 'string') { + return console[method](`${prefix} ${args[0]}`, ...args.slice(1)); + } + + return console[method](prefix, ...args); + }])); } diff --git a/app/common/prefixedConsole.test.mjs b/app/common/prefixedConsole.test.mjs new file mode 100644 index 0000000..65b0505 --- /dev/null +++ b/app/common/prefixedConsole.test.mjs @@ -0,0 +1,34 @@ +import { afterEach, describe, expect, it, vi } from 'vitest'; +import prefixedConsole from './prefixedConsole.mjs'; + +describe('prefixedConsole', () => { + afterEach(() => { + vi.restoreAllMocks(); + }); + + it('prefixes messages and keeps format placeholders working', () => { + let info = vi.spyOn(console, 'info').mockImplementation(() => {}); + + prefixedConsole('Updater', 'US').info('Fetching page %s', 2); + + expect(info).toHaveBeenCalledWith('[Updater] [US] Fetching page %s', 2); + }); + + it('passes non-string values after the prefix', () => { + let error = vi.spyOn(console, 'error').mockImplementation(() => {}); + let failure = new Error('failed'); + + prefixedConsole('Images').error(failure); + + expect(error).toHaveBeenCalledWith('[Images]', failure); + }); + + it('looks up the global console when called', () => { + let logger = prefixedConsole('Late'); + let warn = vi.spyOn(console, 'warn').mockImplementation(() => {}); + + logger.warn('message'); + + expect(warn).toHaveBeenCalledWith('[Late] message'); + }); +}); diff --git a/app/cron.mjs b/app/cron.mjs index 7d75e1b..444a803 100644 --- a/app/cron.mjs +++ b/app/cron.mjs @@ -1,5 +1,4 @@ import { CronJob } from 'cron'; -import { setTimeout as sleep } from 'node:timers/promises'; import { updateFast, updateSlow } from './data/index.mjs'; import { warmCaches } from './splatnet/index.mjs'; import { sendStatuses } from './social/index.mjs'; @@ -8,7 +7,6 @@ import { compressArchives } from './data/ArchiveCompressor.mjs'; import { updateAvatars } from './social/updateAvatars.mjs'; let updating = false; -const restartGracePeriod = 5 * 60 * 1000; // 5 minutes async function updateIfNotUpdating(mode) { if (updating) { @@ -30,28 +28,6 @@ async function updateIfNotUpdating(mode) { } } -// nxapi caches remote config for the life of the process, so restart daily to refresh it. -async function restartToRefreshConfig() { - const restartDeadline = Date.now() + restartGracePeriod; - - if (updating) { - console.log('[Cron] Restart pending; waiting for in-progress update to finish...'); - - while (updating && Date.now() < restartDeadline) { - await sleep(5000); - } - } - - if (updating) { - console.warn('[Cron] Update did not finish within 5 minutes; restarting anyway'); - } - - updating = true; - - console.log('[Cron] Exiting to refresh nxapi remote config; container will restart'); - process.exit(0); -} - export default function() { new CronJob('5,20,35,50 * * * *', warmCaches, null, true); new CronJob('15 0,1,2,3,4 * * * *', () => { @@ -66,5 +42,4 @@ export default function() { new CronJob('30 * * * *', updateAvatars, null, true); new CronJob('30 0 * * *', () => compressArchives(10), null, true, 'UTC'); - new CronJob('0 55 4 * * *', restartToRefreshConfig, null, true); } diff --git a/app/cron.test.mjs b/app/cron.test.mjs index 82c8496..00756d2 100644 --- a/app/cron.test.mjs +++ b/app/cron.test.mjs @@ -15,9 +15,6 @@ vi.mock('cron', () => ({ } }, })); -vi.mock('node:timers/promises', () => ({ - setTimeout: ms => new Promise(resolve => setTimeout(resolve, ms)), -})); vi.mock('./data/index.mjs', () => ({ updateFast: mocks.updateFast, updateSlow: mocks.updateSlow })); vi.mock('./splatnet/index.mjs', () => ({ warmCaches: vi.fn() })); vi.mock('./social/index.mjs', () => ({ sendStatuses: mocks.sendStatuses })); @@ -67,27 +64,4 @@ describe('cron update coordination', () => { expect(mocks.updateFast).toHaveBeenCalledTimes(2); }); - - it('restarts after a bounded wait when an update never settles', async () => { - vi.useFakeTimers(); - mocks.updateFast.mockReturnValue(new Promise(() => {})); - vi.spyOn(console, 'log').mockImplementation(() => {}); - const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}); - const exit = vi.spyOn(process, 'exit').mockImplementation(() => {}); - await loadJobs(); - - const update = mocks.jobs.get('15 0,1,2,3,4 * * * *'); - const restart = mocks.jobs.get('0 55 4 * * *'); - update(); - const restarting = restart(); - await vi.advanceTimersByTimeAsync(5 * 60 * 1000 - 1); - - expect(exit).not.toHaveBeenCalled(); - - await vi.advanceTimersByTimeAsync(1); - - expect(warn).toHaveBeenCalledWith('[Cron] Update did not finish within 5 minutes; restarting anyway'); - expect(exit).toHaveBeenCalledWith(0); - await restarting; - }); }); diff --git a/app/data/index.mjs b/app/data/index.mjs index d2e62f0..074756f 100644 --- a/app/data/index.mjs +++ b/app/data/index.mjs @@ -1,4 +1,5 @@ -import * as Sentry from '@sentry/node'; +// @sentry/core reports to whichever SDK the runtime initialized (Node or Cloudflare). +import * as Sentry from '@sentry/core'; import GearUpdater from './updaters/GearUpdater.mjs'; import StageScheduleUpdater from './updaters/StageScheduleUpdater.mjs'; import CoopUpdater from './updaters/CoopUpdater.mjs'; diff --git a/app/data/updaters/DataUpdater.mjs b/app/data/updaters/DataUpdater.mjs index 3a9f9ba..e9dc247 100644 --- a/app/data/updaters/DataUpdater.mjs +++ b/app/data/updaters/DataUpdater.mjs @@ -1,4 +1,3 @@ -import { Console } from 'node:console'; import ical from 'ical-generator'; import pFilter from 'p-filter'; import prefixedConsole from '../../common/prefixedConsole.mjs'; @@ -49,7 +48,7 @@ export default class DataUpdater : defaultLocale; } - /** @type {Console} */ + /** @type {ReturnType} */ get console() { this._console ??= prefixedConsole('Updater', this.region, this.name); diff --git a/app/screenshots/drivers/LocalScreenshotDriver.worker.mjs b/app/screenshots/drivers/LocalScreenshotDriver.worker.mjs new file mode 100644 index 0000000..04e9286 --- /dev/null +++ b/app/screenshots/drivers/LocalScreenshotDriver.worker.mjs @@ -0,0 +1,9 @@ +// Workers stand-in for #local-screenshot-driver: the local driver needs Chrome, puppeteer and +// an HTTP server, so it is kept out of the Worker bundle. Workers use the Cloudflare driver. +export default class LocalScreenshotDriver { + async open() { + throw new Error('Local screenshots are not available in Workers; use SCREENSHOT_PROVIDER=cloudflare'); + } + + async close() {} +} diff --git a/app/screenshots/drivers/createScreenshotDriver.mjs b/app/screenshots/drivers/createScreenshotDriver.mjs index 65fdc41..8b42c8d 100644 --- a/app/screenshots/drivers/createScreenshotDriver.mjs +++ b/app/screenshots/drivers/createScreenshotDriver.mjs @@ -1,5 +1,6 @@ import CloudflareScreenshotDriver from './CloudflareScreenshotDriver.mjs'; -import LocalScreenshotDriver from './LocalScreenshotDriver.mjs'; +// A package import keeps puppeteer and Chrome out of the Worker bundle. +import LocalScreenshotDriver from '#local-screenshot-driver'; export default function createScreenshotDriver(name, dependencies = {}) { if (name === 'local') { diff --git a/app/social/StatusGeneratorManager.mjs b/app/social/StatusGeneratorManager.mjs index 2affcae..bb61f10 100644 --- a/app/social/StatusGeneratorManager.mjs +++ b/app/social/StatusGeneratorManager.mjs @@ -1,4 +1,5 @@ -import * as Sentry from '@sentry/node'; +// @sentry/core reports to whichever SDK the runtime initialized (Node or Cloudflare). +import * as Sentry from '@sentry/core'; import prefixedConsole from '../common/prefixedConsole.mjs'; import ScreenshotHelper from '../screenshots/ScreenshotHelper.mjs'; import Client from './clients/Client.mjs'; diff --git a/app/social/StatusGeneratorManager.test.mjs b/app/social/StatusGeneratorManager.test.mjs index 79f55b3..a3afe39 100644 --- a/app/social/StatusGeneratorManager.test.mjs +++ b/app/social/StatusGeneratorManager.test.mjs @@ -1,10 +1,10 @@ import { afterEach, describe, expect, it, vi } from 'vitest'; -import { captureException } from '@sentry/node'; +import { captureException } from '@sentry/core'; import StatusGeneratorManager from './StatusGeneratorManager.mjs'; import BufferTwitterClient from './clients/BufferTwitterClient.mjs'; import { defaultClients } from './index.mjs'; -vi.mock('@sentry/node', () => ({ captureException: vi.fn() })); +vi.mock('@sentry/core', () => ({ captureException: vi.fn() })); vi.mock('../common/prefixedConsole.mjs', () => ({ default: () => ({ log: vi.fn(), info: vi.fn(), error: vi.fn(), warn: vi.fn() }), })); diff --git a/app/social/avatars/index.node.mjs b/app/social/avatars/index.node.mjs new file mode 100644 index 0000000..cfef391 --- /dev/null +++ b/app/social/avatars/index.node.mjs @@ -0,0 +1,11 @@ +import fs from 'node:fs/promises'; + +// Node implementation of #avatars; index.worker.mjs bundles the same files for Workers. + +/** + * @param {string} filename An avatar file in this directory, such as default.png + * @returns {Promise} The PNG bytes + */ +export async function readAvatar(filename) { + return new Uint8Array(await fs.readFile(new URL(`./${filename}`, import.meta.url))); +} diff --git a/app/social/avatars/index.worker.mjs b/app/social/avatars/index.worker.mjs new file mode 100644 index 0000000..38ceef2 --- /dev/null +++ b/app/social/avatars/index.worker.mjs @@ -0,0 +1,23 @@ +// Workers implementation of #avatars. Wrangler bundles the PNGs as Data modules +// (see the "rules" in the updater's wrangler config). +import defaultAvatar from './default.png'; +import halloweenAvatar from './halloween.png'; +import prideAvatar from './pride.png'; + +const avatars = { + 'default.png': defaultAvatar, + 'halloween.png': halloweenAvatar, + 'pride.png': prideAvatar, +}; + +/** + * @param {string} filename An avatar file in this directory, such as default.png + * @returns {Promise} The PNG bytes + */ +export async function readAvatar(filename) { + if (!avatars[filename]) { + throw new Error(`Unknown avatar: ${filename}`); + } + + return new Uint8Array(avatars[filename]); +} diff --git a/app/social/clients/BlueskyClient.mjs b/app/social/clients/BlueskyClient.mjs index a06025d..269d83a 100644 --- a/app/social/clients/BlueskyClient.mjs +++ b/app/social/clients/BlueskyClient.mjs @@ -1,5 +1,6 @@ import { BskyAgent, RichText } from '@atproto/api'; -import sharp from 'sharp'; +import { convertToJpeg } from '#image-converter'; +import { pngSize } from '../../common/image/png.mjs'; import Client from './Client.mjs'; export default class BlueskyClient extends Client @@ -44,7 +45,7 @@ export default class BlueskyClient extends Client async updateProfile(avatarBuffer, displayName) { await this.login(); - let jpeg = await sharp(avatarBuffer).jpeg().toBuffer(); + let jpeg = await convertToJpeg(avatarBuffer); let uploadResponse = await this._agent.uploadBlob(jpeg, { encoding: 'image/jpeg' }); await this._agent.upsertProfile((existing) => { @@ -69,16 +70,15 @@ export default class BlueskyClient extends Client let images = await Promise.all( status.media.map(async m => { // We have to convert the PNG to a JPG for Bluesky because of size limits - let jpeg = sharp(m.file).jpeg(); - let metadata = await jpeg.metadata(); - let buffer = await jpeg.toBuffer(); + let size = pngSize(m.file); + let buffer = await convertToJpeg(m.file); let response = await this._agent.uploadBlob(buffer, { encoding: 'image/jpeg' }); return { image: response.data.blob, alt: m.altText || '', - aspectRatio: { width: metadata.width, height: metadata.height }, + ...(size && { aspectRatio: size }), }; }), ); diff --git a/app/social/clients/ThreadsClient.mjs b/app/social/clients/ThreadsClient.mjs index e667c9d..2e8f299 100644 --- a/app/social/clients/ThreadsClient.mjs +++ b/app/social/clients/ThreadsClient.mjs @@ -1,4 +1,4 @@ -import sharp from 'sharp'; +import { convertToJpeg } from '#image-converter'; import Client from './Client.mjs'; import prefixedConsole from '../../common/prefixedConsole.mjs'; import ValueCache from '../../common/ValueCache.mjs'; @@ -80,7 +80,7 @@ export default class ThreadsClient extends Client { } let accessToken = await this._getAccessToken(); - let jpeg = await sharp(status.media[0].file).jpeg().toBuffer(); + let jpeg = await convertToJpeg(status.media[0].file); // Upload the image to public storage so Threads can fetch it let { imageUrl, storageKey } = await this._uploadImage(jpeg, generator.key); diff --git a/app/social/clients/TwitterClient.mjs b/app/social/clients/TwitterClient.mjs index 161e113..f9c04ac 100644 --- a/app/social/clients/TwitterClient.mjs +++ b/app/social/clients/TwitterClient.mjs @@ -1,62 +1,63 @@ -import { TwitterApi } from 'twitter-api-v2'; import Client from './Client.mjs'; +import { oauth1Header } from './oauth1.mjs'; +const API_URL = 'https://api.x.com/1.1/'; + +/** + * Direct X API access for seasonal profile updates (avatar and display name), which Buffer + * cannot change. Posts go through BufferTwitterClient instead. + */ export default class TwitterClient extends Client { key = 'twitter'; name = 'Twitter'; - /** @member {TwitterApi} */ - _api; - - async canSend() { - return ['CONSUMER_KEY', 'CONSUMER_SECRET', 'ACCESS_TOKEN_KEY', 'ACCESS_TOKEN_SECRET'] - .every(key => !!process.env[`TWITTER_${key}`]); + get credentials() { + return { + consumerKey: process.env.TWITTER_CONSUMER_KEY, + consumerSecret: process.env.TWITTER_CONSUMER_SECRET, + accessToken: process.env.TWITTER_ACCESS_TOKEN_KEY, + accessSecret: process.env.TWITTER_ACCESS_TOKEN_SECRET, + }; } - api() { - if (!this._api) { - this._api = new TwitterApi({ - appKey: process.env.TWITTER_CONSUMER_KEY, - appSecret: process.env.TWITTER_CONSUMER_SECRET, - accessToken: process.env.TWITTER_ACCESS_TOKEN_KEY, - accessSecret: process.env.TWITTER_ACCESS_TOKEN_SECRET, - }); - } - - return this._api; + async canSend() { + return Object.values(this.credentials).every(Boolean); } async updateProfile(avatarBuffer, displayName) { - await this.api().v1.updateAccountProfileImage(avatarBuffer); - await this.api().v1.updateAccountProfile({ name: displayName }); + // Multipart bodies are not part of the OAuth signature. + let form = new FormData(); + form.append('image', new Blob([avatarBuffer], { type: 'image/png' }), 'avatar.png'); + await this.request('account/update_profile_image.json', { body: form }); + + let params = { name: displayName }; + await this.request('account/update_profile.json', { params, body: new URLSearchParams(params) }); } - async send(status, generator) { - if (!status.media?.length) { - console.error(`[${this.name}] No media provided for ${generator.key}`); - return; + async request(path, { params = {}, body }) { + let url = new URL(path, API_URL).href; + let response = await fetch(url, { + method: 'POST', + headers: { + Authorization: await oauth1Header({ method: 'POST', url, params, credentials: this.credentials }), + }, + body, + }); + + if (!response.ok) { + let detail = await response.text(); + + try { + let data = JSON.parse(detail); + detail = data.errors?.map(error => error.message).join('; ') || data.detail || detail; + } catch { + // Use the body as-is + } + + throw new Error(`X API ${path} failed (${response.status}): ${detail}`); } - try { - // Upload images - let mediaIds = await Promise.all( - status.media.map(async m => { - let id = await this.api().v1.uploadMedia(Buffer.from(m.file), { mimeType: m.type }); - - if (m.altText) { - await this.api().v1.createMediaMetadata(id, { alt_text: { text: m.altText } }); - } - - return id; - }), - ); - - // Send status - await this.api().v2.tweet(status.status, { media: { media_ids: mediaIds } }); - } catch (error) { - console.error(`[${this.name}] Failed to post ${generator.key}:`, error.message); - throw error; - } + return response.json(); } } diff --git a/app/social/clients/oauth1.mjs b/app/social/clients/oauth1.mjs new file mode 100644 index 0000000..85e2941 --- /dev/null +++ b/app/social/clients/oauth1.mjs @@ -0,0 +1,60 @@ +// OAuth 1.0a request signing (HMAC-SHA1) with WebCrypto, for X's v1.1 account endpoints. +// https://developer.x.com/en/docs/authentication/oauth-1-0a/creating-a-signature + +function percentEncode(value) { + return encodeURIComponent(value).replace(/[!'()*]/g, c => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); +} + +function base64(bytes) { + let binary = ''; + + for (let byte of bytes) { + binary += String.fromCharCode(byte); + } + + return btoa(binary); +} + +/** + * Build the Authorization header for a request. + * @param {object} request + * @param {string} request.method + * @param {string} request.url Request URL; its query parameters are signed + * @param {Record} [request.params] Form-encoded body parameters (signed); omit for multipart bodies + * @param {{ consumerKey: string, consumerSecret: string, accessToken: string, accessSecret: string }} request.credentials + * @param {string} [request.nonce] + * @param {number} [request.timestamp] Seconds since the epoch + * @returns {Promise} The OAuth Authorization header value + */ +export async function oauth1Header({ method, url, params = {}, credentials, nonce, timestamp }) { + let oauth = { + oauth_consumer_key: credentials.consumerKey, + oauth_nonce: nonce ?? crypto.randomUUID().replaceAll('-', ''), + oauth_signature_method: 'HMAC-SHA1', + oauth_timestamp: String(timestamp ?? Math.floor(Date.now() / 1000)), + oauth_token: credentials.accessToken, + oauth_version: '1.0', + }; + + let target = new URL(url); + let signed = [ + ...Object.entries(oauth), + ...target.searchParams.entries(), + ...Object.entries(params), + ].map(([key, value]) => [percentEncode(key), percentEncode(value)]) + .sort(([a, x], [b, y]) => (a < b ? -1 : a > b ? 1 : x < y ? -1 : x > y ? 1 : 0)) + .map(([key, value]) => `${key}=${value}`) + .join('&'); + + let baseUrl = `${target.origin}${target.pathname}`; + let baseString = [method.toUpperCase(), percentEncode(baseUrl), percentEncode(signed)].join('&'); + let signingKey = `${percentEncode(credentials.consumerSecret)}&${percentEncode(credentials.accessSecret)}`; + + let encoder = new TextEncoder(); + let key = await crypto.subtle.importKey('raw', encoder.encode(signingKey), { name: 'HMAC', hash: 'SHA-1' }, false, ['sign']); + let signature = base64(new Uint8Array(await crypto.subtle.sign('HMAC', key, encoder.encode(baseString)))); + + return 'OAuth ' + Object.entries({ ...oauth, oauth_signature: signature }) + .map(([name, value]) => `${percentEncode(name)}="${percentEncode(value)}"`) + .join(', '); +} diff --git a/app/social/clients/oauth1.test.mjs b/app/social/clients/oauth1.test.mjs new file mode 100644 index 0000000..1770b1f --- /dev/null +++ b/app/social/clients/oauth1.test.mjs @@ -0,0 +1,23 @@ +import { describe, expect, it } from 'vitest'; +import { oauth1Header } from './oauth1.mjs'; + +describe('oauth1Header', () => { + it('matches the signature from X\'s documentation example', async () => { + let header = await oauth1Header({ + method: 'POST', + url: 'https://api.twitter.com/1.1/statuses/update.json?include_entities=true', + params: { status: 'Hello Ladies + Gentlemen, a signed OAuth request!' }, + credentials: { + consumerKey: 'xvz1evFS4wEEPTGEFPHBog', + consumerSecret: 'kAcSOqF21Fu85e7zjz7ZN2U4ZRhfV3WpwPAoE3Z7kBw', + accessToken: '370773112-GmHxMAgYyLbNEtIKZeRNFsMKPR9EyMZeS9weJAEb', + accessSecret: 'LswwdoUaIvS8ltyTt5jkRh4J50vUPVVHtR2YPi5kE', + }, + nonce: 'kYjzVBB8Y0ZFabxSWbWovY3uYSQ2pTgmZeNu2VS4cg', + timestamp: 1318622958, + }); + + expect(header).toContain('oauth_signature="hCtSmYh%2BiHYCEqBWrE7C7hYmtUk%3D"'); + expect(header).toMatch(/^OAuth oauth_consumer_key="xvz1evFS4wEEPTGEFPHBog", /); + }); +}); diff --git a/app/social/generators/StatusGenerator.mjs b/app/social/generators/StatusGenerator.mjs index 82875e4..0fdbfae 100644 --- a/app/social/generators/StatusGenerator.mjs +++ b/app/social/generators/StatusGenerator.mjs @@ -1,4 +1,3 @@ -import { Console } from 'node:console'; import { createPinia } from 'pinia'; import { useCoopDataStore, useFestivalsDataStore, useGearDataStore, useSchedulesDataStore } from '../../../src/stores/data.mjs'; import prefixedConsole from '../../common/prefixedConsole.mjs'; @@ -34,7 +33,7 @@ export default class StatusGenerator return this.messages.game(category, node, field); } - /** @type {Console} */ + /** @type {ReturnType} */ get console() { this._console ??= prefixedConsole('Social', this.name); diff --git a/app/social/japaneseAccounts.test.mjs b/app/social/japaneseAccounts.test.mjs index f355036..92e3138 100644 --- a/app/social/japaneseAccounts.test.mjs +++ b/app/social/japaneseAccounts.test.mjs @@ -10,7 +10,7 @@ import ScreenshotHelper from '../screenshots/ScreenshotHelper.mjs'; vi.mock('../common/prefixedConsole.mjs', () => ({ default: () => ({ log: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() }), })); -vi.mock('@sentry/node', () => ({ captureException: vi.fn() })); +vi.mock('@sentry/core', () => ({ captureException: vi.fn() })); afterEach(() => { vi.restoreAllMocks(); diff --git a/app/social/updateAvatars.mjs b/app/social/updateAvatars.mjs index dc94eaf..d7ef813 100644 --- a/app/social/updateAvatars.mjs +++ b/app/social/updateAvatars.mjs @@ -1,15 +1,10 @@ -import fs from 'fs/promises'; -import path from 'path'; -import { fileURLToPath } from 'url'; +import { readAvatar } from '#avatars'; import prefixedConsole from '../common/prefixedConsole.mjs'; import ValueCache from '../common/ValueCache.mjs'; import { defaultClients } from './index.mjs'; import { getCurrentVariant } from './avatarVariants.mjs'; import TwitterClient from './clients/TwitterClient.mjs'; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const avatarsDir = path.join(__dirname, 'avatars'); - const console = prefixedConsole('Social', 'Avatar'); function cacheForClient(client) { @@ -40,8 +35,7 @@ export async function updateAvatars() { // Read avatar file on first client that needs an update if (!avatarBuffer) { try { - let avatarPath = path.join(avatarsDir, variant.avatar); - avatarBuffer = await fs.readFile(avatarPath); + avatarBuffer = await readAvatar(variant.avatar); } catch (error) { console.error(`Failed to read avatar file ${variant.avatar}:`, error.message); return; diff --git a/app/social/updateAvatars.test.mjs b/app/social/updateAvatars.test.mjs index 66cd0c1..dd31437 100644 --- a/app/social/updateAvatars.test.mjs +++ b/app/social/updateAvatars.test.mjs @@ -50,11 +50,10 @@ describe('Seasonal profile updates', () => { updateImage = vi.fn().mockResolvedValue({}); updateProfile = vi.fn().mockResolvedValue({}); - vi.spyOn(TwitterClient.prototype, 'api').mockReturnValue({ - v1: { - updateAccountProfileImage: updateImage, - updateAccountProfile: updateProfile, - }, + vi.spyOn(TwitterClient.prototype, 'request').mockImplementation(async (path, { params, body }) => { + return path === 'account/update_profile_image.json' + ? updateImage(new Uint8Array(await body.get('image').arrayBuffer())) + : updateProfile(params); }); }); @@ -87,7 +86,7 @@ describe('Seasonal profile updates', () => { await updateAvatars(); await updateAvatars(); - expect(updateImage).toHaveBeenCalledExactlyOnceWith(avatar); + expect(updateImage).toHaveBeenCalledExactlyOnceWith(new Uint8Array(avatar)); expect(updateProfile).toHaveBeenCalledExactlyOnceWith({ name: 'Splatoon3.eek 🎃' }); expect(cache.get('social.twitter.avatar')).toBe('halloween'); }); diff --git a/app/splatnet/NsoClient.mjs b/app/splatnet/NsoClient.mjs index 1ea4d30..6807ee7 100644 --- a/app/splatnet/NsoClient.mjs +++ b/app/splatnet/NsoClient.mjs @@ -1,60 +1,67 @@ -import { createHmac } from 'node:crypto'; -import CoralApi from 'nxapi/coral'; -import { addUserAgent, setClientAuthentication } from 'nxapi'; import pLimit from 'p-limit'; import ValueCache from '../common/ValueCache.mjs'; import prefixedConsole from '../common/prefixedConsole.mjs'; import { calculateCacheExpiry } from '../common/util.mjs'; +import { getRemoteConfig, getWebServiceToken, loginWithSessionToken, ZncaApiClient } from './coral.mjs'; const coralLimit = pLimit(1); const webServiceLimit = pLimit(1); -let _nxapiInitialized = false; +// nxapi's remote config can disable Coral authentication, so refresh it regularly rather than +// keeping it for the life of the process (the old Node container restarted daily for this). +const remoteConfigLifetime = { min: 10 * 60, default: 60 * 60, max: 24 * 60 * 60 }; -class SharedSecretAssertionProvider { - constructor(clientId, sharedSecret) { - this.clientId = clientId; - this.sharedSecret = sharedSecret; - this.scope = 'ca:gf ca:er ca:dr'; - } +// One znca-api client per Nintendo account: its access token becomes bound to the first +// account that uses it, so clients cannot be shared between regions. +const zncaClients = new Map(); - async create(aud, exp = 300) { - const now = Math.floor(Date.now() / 1000); - - const header = Buffer.from(JSON.stringify({ alg: 'HS256', typ: 'JWT' })).toString('base64url'); - const payload = Buffer.from(JSON.stringify({ - typ: 'client_assertion', - iss: this.clientId, - aud, - exp: now + exp, - iat: now, - })).toString('base64url'); - - const signData = `${header}.${payload}`; - const signature = createHmac('sha256', this.sharedSecret) - .update(signData) - .digest() - .toString('base64url'); - - return { - assertion: `${signData}.${signature}`, - type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', - }; - } +function userAgent() { + return ['splatoon3.ink', process.env.USER_AGENT].filter(Boolean).join(' '); } -function initializeNxapi() { - if (!_nxapiInitialized) { - addUserAgent(process.env.USER_AGENT); +function remoteConfigExpiry(cacheControl) { + let maxAge = Number(/max-age=(\d+)/.exec(cacheControl ?? '')?.[1]); + let seconds = Number.isFinite(maxAge) ? maxAge : remoteConfigLifetime.default; + seconds = Math.min(Math.max(seconds, remoteConfigLifetime.min), remoteConfigLifetime.max); - if (process.env.NXAPI_CLIENT_ID && process.env.NXAPI_SHARED_SECRET) { - setClientAuthentication( - new SharedSecretAssertionProvider(process.env.NXAPI_CLIENT_ID, process.env.NXAPI_SHARED_SECRET), - ); - } + return Date.now() + seconds * 1000; +} + +/** + * The znca-api client (f generation and Coral request encryption) selected by nxapi's remote + * configuration, plus the Nintendo Switch Online app version to present. + * @param {string} account Identifies the Nintendo account the client will be used for + * @returns {Promise<{ znca: ZncaApiClient, zncaVersion: string }>} The client and app version + */ +export async function getZnca(account) { + let cache = new ValueCache('nxapi.config'); + let config = await cache.getData(); + + if (!config) { + config = await getRemoteConfig(userAgent()); + await cache.setData(config, remoteConfigExpiry(config.cacheControl)); } - _nxapiInitialized = true; + if (!process.env.NXAPI_CLIENT_ID || !process.env.NXAPI_SHARED_SECRET) { + throw new Error('NXAPI_CLIENT_ID and NXAPI_SHARED_SECRET are required for Coral authentication'); + } + + // Reuse the account's client (and its znca-api token) while the configuration is unchanged. + let zncaClient = zncaClients.get(account); + + if (zncaClient?.configUrl !== config.zncaApiUrl || zncaClient?.zncaVersion !== config.zncaVersion) { + zncaClient = new ZncaApiClient({ + url: config.zncaApiUrl, + clientId: process.env.NXAPI_CLIENT_ID, + sharedSecret: process.env.NXAPI_SHARED_SECRET, + zncaVersion: config.zncaVersion, + userAgent: userAgent(), + }); + zncaClient.configUrl = config.zncaApiUrl; + zncaClients.set(account, zncaClient); + } + + return { znca: zncaClient, zncaVersion: config.zncaVersion }; } export function regionTokens() { @@ -74,11 +81,13 @@ function getDefaultRegion() { throw new Error('Session token not set for any region'); } +function isCoralSession(data) { + return !!(data?.coralUserId && data.credential?.accessToken && data.user?.id); +} + export default class NsoClient { constructor(region, nintendoToken) { - initializeNxapi(); - this.console = prefixedConsole('NSO', region); this.region = region; this.nintendoToken = nintendoToken; @@ -101,29 +110,35 @@ export default class NsoClient return `nso.${token}`; } - // Coral API + // Coral session _getCoralCache() { return new ValueCache(`${this.cachePrefix}.coral`); } - async getCoralApi(useCache = true) { + /** + * @param {boolean} [useCache] false to log in again + * @returns {Promise<{ user: object, coralUserId: number, credential: { accessToken: string, expiresIn: number } }>} The Coral session + */ + async getCoralSession(useCache = true) { return coralLimit(async () => { let data = useCache ? await this._getCoralCache().getData() : null; - if (!data) { + // Sessions cached by the nxapi package have a different shape; log in again. + if (!isCoralSession(data)) { data = await this._createCoralSession(); } - return CoralApi.createWithSavedToken(data); + return data; }); } async _createCoralSession() { this.console.info('Creating Coral session...'); - let { data } = await CoralApi.createWithSessionToken(this.nintendoToken); + let { znca, zncaVersion } = await getZnca(this.cachePrefix); + let data = await loginWithSessionToken(this.nintendoToken, { znca, zncaVersion }); let expires = calculateCacheExpiry(data.credential.expiresIn); this.console.debug(`Caching Coral session until: ${expires}`); @@ -154,10 +169,17 @@ export default class NsoClient } async _createWebServiceToken(id, tokenCache) { - let coral = await this.getCoralApi(); + let session = await this.getCoralSession(); + let { znca, zncaVersion } = await getZnca(this.cachePrefix); this.console.info(`Creating web service token for ID ${id}...`); - let { result } = await coral.getWebServiceToken(id); + let result = await getWebServiceToken(id, { + znca, + zncaVersion, + coralAccessToken: session.credential.accessToken, + coralUserId: session.coralUserId, + naId: session.user.id, + }); let expires = calculateCacheExpiry(result.expiresIn); this.console.debug(`Caching web service token for ID ${id} until: ${expires}`); diff --git a/app/splatnet/NsoClient.test.mjs b/app/splatnet/NsoClient.test.mjs index 33eedf4..42e8abe 100644 --- a/app/splatnet/NsoClient.test.mjs +++ b/app/splatnet/NsoClient.test.mjs @@ -1,12 +1,125 @@ -import { execFileSync } from 'node:child_process'; -import { describe, expect, it } from 'vitest'; +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { testBuckets } from '../test/storage.mjs'; + +const coral = vi.hoisted(() => ({ + getRemoteConfig: vi.fn(), + loginWithSessionToken: vi.fn(), + getWebServiceToken: vi.fn(), + ZncaApiClient: vi.fn(function (options) { + Object.assign(this, options); + }), +})); + +vi.mock('./coral.mjs', () => coral); +vi.mock('../common/prefixedConsole.mjs', () => ({ + default: () => ({ info: vi.fn(), debug: vi.fn() }), +})); + +const { default: NsoClient, getZnca } = await import('./NsoClient.mjs'); + +const session = { + user: { id: 'na-user' }, + coralUserId: 1234, + credential: { accessToken: 'coral-token', expiresIn: 7200 }, +}; describe('NsoClient', () => { - it('loads the nxapi authentication integration in Node', () => { - expect(() => execFileSync(process.execPath, [ - '--input-type=module', - '--eval', - 'await import(\'./app/splatnet/NsoClient.mjs\')', - ], { cwd: process.cwd() })).not.toThrow(); + beforeEach(() => { + vi.stubEnv('NINTENDO_TOKEN_US', 'session-token-us-12345678'); + vi.stubEnv('NXAPI_CLIENT_ID', 'client'); + vi.stubEnv('NXAPI_SHARED_SECRET', 'secret'); + vi.stubEnv('USER_AGENT', 'test-agent'); + coral.getRemoteConfig.mockResolvedValue({ + zncaVersion: '3.4.0', + zncaApiUrl: 'https://znca.test/api/', + cacheControl: 'public, max-age=1800', + }); + coral.loginWithSessionToken.mockResolvedValue(session); + coral.getWebServiceToken.mockResolvedValue({ accessToken: 'web-token', expiresIn: 7200 }); + }); + + afterEach(() => { + vi.unstubAllEnvs(); + vi.clearAllMocks(); + }); + + it('caches the nxapi remote config in private storage', async () => { + let first = await getZnca('nso.a'); + let second = await getZnca('nso.a'); + let otherAccount = await getZnca('nso.b'); + + expect(coral.getRemoteConfig).toHaveBeenCalledOnce(); + expect(coral.getRemoteConfig).toHaveBeenCalledWith('splatoon3.ink test-agent'); + expect(first.zncaVersion).toBe('3.4.0'); + expect(second.znca).toBe(first.znca); + // znca-api tokens become bound to one Nintendo account + expect(otherAccount.znca).not.toBe(first.znca); + + let cached = testBuckets().private.json('cache/nxapi.config.json'); + expect(cached.data.zncaApiUrl).toBe('https://znca.test/api/'); + expect(cached.expires - Date.now()).toBeGreaterThan(29 * 60 * 1000); + expect(cached.expires - Date.now()).toBeLessThanOrEqual(30 * 60 * 1000); + }); + + it('does not cache a remote config that disables Coral authentication', async () => { + coral.getRemoteConfig.mockRejectedValue(new Error('Remote configuration prevents Coral authentication')); + + await expect(getZnca('nso.a')).rejects.toThrow('prevents Coral authentication'); + expect(testBuckets().private.objects.size).toBe(0); + }); + + it('requires nxapi client credentials', async () => { + vi.stubEnv('NXAPI_SHARED_SECRET', ''); + + await expect(getZnca('nso.a')).rejects.toThrow('NXAPI_CLIENT_ID and NXAPI_SHARED_SECRET'); + }); + + it('logs in once and reuses the cached Coral session', async () => { + let nso = NsoClient.make('US'); + + expect(await nso.getCoralSession()).toEqual(session); + expect(await nso.getCoralSession()).toEqual(session); + + expect(coral.loginWithSessionToken).toHaveBeenCalledOnce(); + expect(coral.loginWithSessionToken.mock.calls[0][0]).toBe('session-token-us-12345678'); + expect(testBuckets().private.json('cache/nso.12345678.coral.json').data).toEqual(session); + }); + + it('logs in again instead of using a session cached by the nxapi package', async () => { + await testBuckets().private.put('cache/nso.12345678.coral.json', JSON.stringify({ + expires: Date.now() + 3600_000, + data: { nintendoAccountToken: {}, nsoAccount: {}, credential: { accessToken: 'old' } }, + })); + + expect(await NsoClient.make('US').getCoralSession()).toEqual(session); + expect(coral.loginWithSessionToken).toHaveBeenCalledOnce(); + }); + + it('creates and caches web service tokens from the Coral session', async () => { + let nso = NsoClient.make('US'); + + expect(await nso.getWebServiceToken('4834290508791808')).toBe('web-token'); + expect(await nso.getWebServiceToken('4834290508791808')).toBe('web-token'); + + expect(coral.getWebServiceToken).toHaveBeenCalledOnce(); + expect(coral.getWebServiceToken.mock.calls[0]).toEqual(['4834290508791808', expect.objectContaining({ + zncaVersion: '3.4.0', + coralAccessToken: 'coral-token', + coralUserId: 1234, + naId: 'na-user', + })]); + expect(testBuckets().private.json('cache/nso.12345678.webservicetoken.4834290508791808.json').data) + .toEqual({ accessToken: 'web-token', expiresIn: 7200 }); + }); + + it('bypasses the caches when asked', async () => { + let nso = NsoClient.make('US'); + await nso.getWebServiceToken('1'); + + await nso.getCoralSession(false); + await nso.getWebServiceToken('1', false); + + expect(coral.loginWithSessionToken).toHaveBeenCalledTimes(2); + expect(coral.getWebServiceToken).toHaveBeenCalledTimes(2); }); }); diff --git a/app/splatnet/auth.mjs b/app/splatnet/auth.mjs index d86d457..c563537 100644 --- a/app/splatnet/auth.mjs +++ b/app/splatnet/auth.mjs @@ -55,7 +55,7 @@ export class LocalAuth { * @param {import('./NsoClient.mjs').default} nsoClient */ async refresh(nsoClient) { - await safe(() => nsoClient.getCoralApi(false)); + await safe(() => nsoClient.getCoralSession(false)); await safe(() => nsoClient.getWebServiceToken(SPLATNET3_WEB_SERVICE_ID, false)); await safe(() => this.bulletToken(nsoClient, { useCache: false })); } diff --git a/app/splatnet/auth.test.mjs b/app/splatnet/auth.test.mjs index d9e2edd..6380685 100644 --- a/app/splatnet/auth.test.mjs +++ b/app/splatnet/auth.test.mjs @@ -10,7 +10,7 @@ function fakeNsoClient() { return { region: 'US', cachePrefix: 'nso.test', - getCoralApi: vi.fn().mockResolvedValue({}), + getCoralSession: vi.fn().mockResolvedValue({}), getWebServiceToken: vi.fn().mockResolvedValue('web-token'), }; } @@ -29,14 +29,14 @@ describe('auth', () => { await local.refresh(nso); - expect(nso.getCoralApi).toHaveBeenCalledWith(false); + expect(nso.getCoralSession).toHaveBeenCalledWith(false); expect(nso.getWebServiceToken).toHaveBeenCalledWith(SPLATNET3_WEB_SERVICE_ID, false); expect(bulletToken).toHaveBeenCalledWith(nso, { useCache: false }); }); it('keeps refreshing later credentials when an earlier step fails', async () => { let nso = fakeNsoClient(); - nso.getCoralApi.mockRejectedValue(new Error('Coral unavailable')); + nso.getCoralSession.mockRejectedValue(new Error('Coral unavailable')); vi.spyOn(console, 'error').mockImplementation(() => {}); let local = new LocalAuth; vi.spyOn(local, 'bulletToken').mockResolvedValue({ bulletToken: 'b' }); diff --git a/app/splatnet/coral.mjs b/app/splatnet/coral.mjs new file mode 100644 index 0000000..457b214 --- /dev/null +++ b/app/splatnet/coral.mjs @@ -0,0 +1,353 @@ +// Reimplementation of the nxapi code path splatoon3.ink actually exercises, so the same code +// runs in Node and in Cloudflare Workers (importing the nxapi package crashes workerd): +// +// Nintendo Account session token +// -> Nintendo Account token + user (accounts.nintendo.com) +// -> nxapi znca-api bearer token (client assertion, scope ca:gf ca:er ca:dr) +// -> genf with encrypt_token_request (znca-api produces the encrypted Coral body) +// -> POST /v4/Account/Login (api-lp1.znc.srv.nintendo.net, octet-stream) +// -> decrypt-response (znca-api) +// -> same genf/POST/decrypt for /v4/Game/GetWebServiceToken +// +// Mirrors nxapi 1.6.1-next.257 (dist/api/coral.js, f.js, na.js, common/remote-config.js) using only +// fetch, WebCrypto, TextEncoder and atob/btoa. No Node built-ins. + +const NA_CLIENT_ID = '71b963c1b7b6d119'; +const ZNC_URL = 'https://api-lp1.znc.srv.nintendo.net'; +const ZNCA_PLATFORM = 'Android'; +const ZNCA_PLATFORM_VERSION = '12'; +const ZNCA_API_COMPATIBILITY_VERSION = 'd8fAZDPzwimzQ7c6'; +const ZNCA_API_SCOPE = 'ca:gf ca:er ca:dr'; +const CONFIG_URL = 'https://fancy.org.uk/api/nxapi/config'; + +// The nxapi release whose protocol this file mirrors. The remote config endpoint varies its +// answer on these headers and refuses versions it no longer supports (nxapi's own kill switch). +// When it does, compare these constants and the request shapes below with the current nxapi +// release (ZNCA_VERSION and ZNCA_API_COMPATIBILITY_VERSION in dist/api/coral.js). +const NXAPI_COMPAT_VERSION = '1.6.1'; +const ZNCA_COMPAT_VERSION = '3.5.0'; + +export const HashMethod = { CORAL: '1', WEB_SERVICE: '2' }; + +export class HttpError extends Error { + constructor(label, response, data) { + super(`${label}: ${response.status} ${response.statusText}`); + this.name = 'HttpError'; + this.status = response.status; + this.url = response.url; + this.data = data; + } +} + +async function readBody(response) { + let text = await response.text(); + try { + return JSON.parse(text); + } catch { + return text; + } +} + +async function expectOk(response, label) { + if (!response.ok) { + throw new HttpError(label, response, await readBody(response)); + } +} + +// Base64 helpers on plain Uint8Array (no Buffer). +function base64Encode(bytes) { + let binary = ''; + for (let i = 0; i < bytes.length; i += 0x8000) { + binary += String.fromCharCode.apply(null, bytes.subarray(i, i + 0x8000)); + } + return btoa(binary); +} + +function base64Decode(value) { + // Accept both the standard and URL-safe alphabets, padded or not (Buffer.from is lenient too). + let normalized = value.replace(/-/g, '+').replace(/_/g, '/'); + normalized += '='.repeat((4 - normalized.length % 4) % 4); + return Uint8Array.from(atob(normalized), c => c.charCodeAt(0)); +} + +function base64UrlEncode(bytes) { + return base64Encode(bytes).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); +} + +// Same JWT that app/splatnet/NsoClient.mjs builds with node:crypto, using WebCrypto instead. +export async function createClientAssertion(clientId, sharedSecret, audience, lifetimeSeconds = 300) { + let encoder = new TextEncoder(); + let now = Math.floor(Date.now() / 1000); + let header = base64UrlEncode(encoder.encode(JSON.stringify({ alg: 'HS256', typ: 'JWT' }))); + let payload = base64UrlEncode(encoder.encode(JSON.stringify({ + typ: 'client_assertion', + iss: clientId, + aud: audience, + exp: now + lifetimeSeconds, + iat: now, + }))); + let key = await crypto.subtle.importKey( + 'raw', encoder.encode(sharedSecret), { name: 'HMAC', hash: 'SHA-256' }, false, ['sign'], + ); + let signature = new Uint8Array(await crypto.subtle.sign('HMAC', key, encoder.encode(`${header}.${payload}`))); + + return `${header}.${payload}.${base64UrlEncode(signature)}`; +} + +// nxapi's remote configuration: the znca app version to impersonate, which f-generation +// provider to use, and whether Coral authentication is allowed at all. +export async function getRemoteConfig(userAgent) { + let response = await fetch(CONFIG_URL, { + headers: { + 'User-Agent': userAgent, + 'X-nxapi-Version': NXAPI_COMPAT_VERSION, + 'X-znca-Compatible-Version': ZNCA_COMPAT_VERSION, + }, + }); + await expectOk(response, '[nxapi] remote config'); + let config = await response.json(); + + if (!config.require_version?.includes(NXAPI_COMPAT_VERSION)) { + throw new Error(`[nxapi] remote config no longer supports protocol version ${NXAPI_COMPAT_VERSION} (accepts ${config.require_version?.join(', ')})`); + } + if (!config.coral) { + throw new Error('Remote configuration prevents Coral authentication'); + } + let provider = config.coral_auth?.default; + if (!Array.isArray(provider) || provider[0] !== 'nxapi' || !provider[1]) { + throw new Error(`[nxapi] remote config selects an unsupported f-generation provider: ${JSON.stringify(provider)}`); + } + + return { + zncaVersion: config.coral.znca_version, + zncaApiUrl: provider[1], + splatnet3: config.coral_gws_splatnet3 ?? null, + cacheControl: response.headers.get('Cache-Control'), + }; +} + +// Client for the nxapi znca-api (f generation + request encryption/response decryption). +export class ZncaApiClient { + constructor({ url, clientId, sharedSecret, zncaVersion, userAgent }) { + this.url = url.endsWith('/') ? url : `${url}/`; + this.origin = new URL(url).origin; + this.clientId = clientId; + this.sharedSecret = sharedSecret; + this.zncaVersion = zncaVersion; + this.userAgent = userAgent; + this.token = null; + } + + async _getJson(url) { + let response = await fetch(url, { headers: { 'User-Agent': this.userAgent, 'Accept': 'application/json' } }); + await expectOk(response, `[znca-api] ${url}`); + return response.json(); + } + + // OAuth 2 protected-resource discovery, then client_credentials with a JWT client assertion. + async authenticate() { + let resource = await this._getJson(`${this.origin}/.well-known/oauth-protected-resource`); + let issuer = resource.authorization_servers?.[0]; + if (!issuer) throw new Error('[znca-api] no authorization server advertised'); + + let issuerUrl = new URL(issuer); + issuerUrl.pathname = '/.well-known/oauth-authorization-server' + (issuerUrl.pathname === '/' ? '' : issuerUrl.pathname); + let server = await this._getJson(issuerUrl); + if (!server.token_endpoint) throw new Error('[znca-api] authorization server has no token endpoint'); + + let body = new URLSearchParams({ + grant_type: 'client_credentials', + scope: ZNCA_API_SCOPE, + client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer', + client_assertion: await createClientAssertion(this.clientId, this.sharedSecret, server.issuer), + }); + let response = await fetch(server.token_endpoint, { + method: 'POST', + headers: { 'User-Agent': this.userAgent, 'Accept': 'application/json' }, + body, + }); + await expectOk(response, '[znca-api] token'); + let result = await response.json(); + + this.token = { + token: result.access_token, + expiresAt: Date.now() + result.expires_in * 1000, + scope: result.scope ?? null, + }; + + return { expiresIn: result.expires_in, scope: result.scope ?? null, tokenEndpoint: server.token_endpoint }; + } + + async _post(path, body, accept = 'application/json') { + if (!this.token || this.token.expiresAt <= Date.now()) { + await this.authenticate(); + } + + let response = await fetch(new URL(path, this.url), { + method: 'POST', + headers: { + 'User-Agent': this.userAgent, + 'X-znca-Client-Version': ZNCA_API_COMPATIBILITY_VERSION, + 'X-znca-Platform': ZNCA_PLATFORM, + 'X-znca-Version': this.zncaVersion, + 'Content-Type': 'application/json', + 'Accept': accept, + 'Authorization': `Bearer ${this.token.token}`, + }, + body: JSON.stringify(body), + }); + await expectOk(response, `[znca-api] ${path}`); + + return response; + } + + // Generate f and, in the same call, the encrypted body for the Coral request that will use it. + async genf(token, hashMethod, user, encryptTokenRequest) { + let response = await this._post('f', { + hash_method: hashMethod, + token, + ...user, + encrypt_token_request: encryptTokenRequest, + }); + let data = await response.json(); + if ('error' in data) { + throw new Error(`[znca-api] ${data.error_message ?? data.error}`); + } + if (!data.encrypted_token_request) { + throw new Error('[znca-api] f response did not include encrypted_token_request'); + } + + return { + f: data.f, + timestamp: data.timestamp, + requestId: data.request_id, + encryptedRequest: base64Decode(data.encrypted_token_request), + }; + } + + // Decrypt a Coral response body. Without the ca:na scope nxapi asks for text/plain and gets + // the decrypted JSON text back directly. + async decryptResponse(bytes) { + let response = await this._post('decrypt-response', { data: base64Encode(bytes) }, 'text/plain'); + return JSON.parse(await response.text()); + } +} + +export async function getNintendoAccountToken(sessionToken) { + let response = await fetch('https://accounts.nintendo.com/connect/1.0.0/api/token', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 8.0.0)', + }, + body: JSON.stringify({ + client_id: NA_CLIENT_ID, + session_token: sessionToken, + grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer-session-token', + }), + }); + await expectOk(response, '[na] token'); + let token = await response.json(); + if ('error' in token) throw new Error(`[na] ${token.error_description ?? token.error}`); + if ('errorCode' in token) throw new Error(`[na] ${token.detail}`); + + return token; // { access_token, id_token, expires_in, scope, token_type } +} + +export async function getNintendoAccountUser(naToken) { + let response = await fetch('https://api.accounts.nintendo.com/2.0.0/users/me', { + headers: { + 'Accept-Language': 'en-GB', + 'User-Agent': 'NASDKAPI; Android', + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'Authorization': `Bearer ${naToken.access_token}`, + }, + }); + await expectOk(response, '[na] users/me'); + let user = await response.json(); + if ('errorCode' in user) throw new Error(`[na] ${user.detail}`); + + return user; // { id, birthday, country, language, nickname, ... } +} + +// POST an already-encrypted body to Coral and decrypt the reply. Header set mirrors nxapi: +// the unauthenticated Login call sends the short set, authenticated calls add the rest. +async function coralRequest(path, encryptedBody, { znca, zncaVersion, accessToken = null }) { + let headers = { + 'User-Agent': `com.nintendo.znca/${zncaVersion}(${ZNCA_PLATFORM}/${ZNCA_PLATFORM_VERSION})`, + 'X-Platform': ZNCA_PLATFORM, + 'X-ProductVersion': zncaVersion, + 'Content-Type': 'application/octet-stream', + 'Accept': 'application/octet-stream,application/json', + }; + if (accessToken) { + Object.assign(headers, { + 'Authorization': `Bearer ${accessToken}`, + 'Accept-Language': 'en-GB', + 'Pragma': 'no-cache', + 'Cache-Control': 'no-cache', + }); + } + + let response = await fetch(ZNC_URL + path, { method: 'POST', headers, body: encryptedBody }); + let bytes = new Uint8Array(await response.arrayBuffer()); + + let data; + if (/^application\/json($|;)/i.test(response.headers.get('Content-Type') ?? '')) { + data = await znca.decryptResponse(bytes); + } else { + let text = new TextDecoder().decode(bytes); + throw new HttpError(`[znc] ${path} ${response.ok ? 'unacceptable response type' : 'error'}`, response, text); + } + + if (!response.ok) throw new HttpError(`[znc] ${path}`, response, data); + if ('errorMessage' in data) throw new Error(`[znc] ${path}: ${data.errorMessage} (status ${data.status})`); + if (data.status !== 0) throw new Error(`[znc] ${path}: Coral status ${data.status}`); + + return data; +} + +export async function loginWithSessionToken(sessionToken, { znca, zncaVersion }) { + let naToken = await getNintendoAccountToken(sessionToken); + let user = await getNintendoAccountUser(naToken); + + let parameter = { + naIdToken: naToken.id_token, + language: user.language, + // Filled in by znca-api while encrypting. + timestamp: 0, + requestId: '', + f: '', + }; + let fdata = await znca.genf(naToken.id_token, HashMethod.CORAL, { na_id: user.id }, { + url: `${ZNC_URL}/v4/Account/Login`, + parameter, + }); + + let data = await coralRequest('/v4/Account/Login', fdata.encryptedRequest, { znca, zncaVersion }); + + return { + user, + coralUserId: data.result.user.id, + credential: data.result.webApiServerCredential, // { accessToken, expiresIn } + }; +} + +export async function getWebServiceToken(id, { znca, zncaVersion, coralAccessToken, coralUserId, naId }) { + let parameter = { id, registrationToken: '', f: '', requestId: '', timestamp: 0 }; + let fdata = await znca.genf(coralAccessToken, HashMethod.WEB_SERVICE, { + na_id: naId, + coral_user_id: `${coralUserId}`, + }, { + url: `${ZNC_URL}/v4/Game/GetWebServiceToken`, + parameter, + }); + + let data = await coralRequest('/v4/Game/GetWebServiceToken', fdata.encryptedRequest, { + znca, zncaVersion, accessToken: coralAccessToken, + }); + + return data.result; // { accessToken, expiresIn } +} diff --git a/app/splatnet/coral.test.mjs b/app/splatnet/coral.test.mjs new file mode 100644 index 0000000..5558b97 --- /dev/null +++ b/app/splatnet/coral.test.mjs @@ -0,0 +1,66 @@ +import { createHmac } from 'node:crypto'; +import { afterEach, describe, expect, it, vi } from 'vitest'; +import { createClientAssertion, getRemoteConfig } from './coral.mjs'; + +function remoteConfig(overrides = {}) { + return { + require_version: ['1.6.1'], + coral: { znca_version: '3.4.0' }, + coral_auth: { default: ['nxapi', 'https://znca.test/api'] }, + ...overrides, + }; +} + +describe('coral', () => { + afterEach(() => { + vi.unstubAllGlobals(); + vi.useRealTimers(); + }); + + it('signs client assertions exactly like the previous node:crypto implementation', async () => { + vi.useFakeTimers(); + vi.setSystemTime(new Date('2026-11-08T12:00:00Z')); + + let assertion = await createClientAssertion('client-id', 'shared-secret', 'https://issuer.test'); + let [header, payload, signature] = assertion.split('.'); + let expected = createHmac('sha256', 'shared-secret').update(`${header}.${payload}`).digest('base64url'); + + expect(JSON.parse(Buffer.from(header, 'base64url'))).toEqual({ alg: 'HS256', typ: 'JWT' }); + expect(JSON.parse(Buffer.from(payload, 'base64url'))).toEqual({ + typ: 'client_assertion', + iss: 'client-id', + aud: 'https://issuer.test', + exp: 1794139500, + iat: 1794139200, + }); + expect(signature).toBe(expected); + }); + + it('reads the znca version and f-generation provider from the remote config', async () => { + vi.stubGlobal('fetch', vi.fn().mockResolvedValue(Response.json(remoteConfig(), { + headers: { 'Cache-Control': 'max-age=600' }, + }))); + + let config = await getRemoteConfig('test-agent'); + + expect(config).toMatchObject({ + zncaVersion: '3.4.0', + zncaApiUrl: 'https://znca.test/api', + cacheControl: 'max-age=600', + }); + expect(fetch.mock.calls[0][1].headers).toMatchObject({ + 'User-Agent': 'test-agent', + 'X-nxapi-Version': '1.6.1', + }); + }); + + it.each([ + [{ coral: null }, 'prevents Coral authentication'], + [{ require_version: ['2.0.0'] }, 'no longer supports protocol version'], + [{ coral_auth: { default: ['imink', 'https://example.test'] } }, 'unsupported f-generation provider'], + ])('refuses a remote config that does not allow this client (%o)', async (overrides, message) => { + vi.stubGlobal('fetch', vi.fn().mockResolvedValue(Response.json(remoteConfig(overrides)))); + + await expect(getRemoteConfig('test-agent')).rejects.toThrow(message); + }); +}); diff --git a/package-lock.json b/package-lock.json index a02fd03..d8b760d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@headlessui/vue": "^1.7.23", "@heroicons/vue": "^2.2.0", "@noble/hashes": "^2.4.0", + "@sentry/core": "^10.38.0", "@sentry/node": "^10.38.0", "console-stamp": "^3.0.6", "cron": "^4.4.0", @@ -24,7 +25,6 @@ "jsonpath-plus": "^10.4.0", "lodash": "^4.17.21", "masto": "^8.0.0", - "nxapi": "1.6.1-next.257", "p-filter": "^4.1.0", "p-limit": "^7.3.0", "p-queue": "^9.1.0", @@ -33,7 +33,6 @@ "sharp": "^0.35.4", "sirv": "^3.0.2", "tar-stream": "^3.2.0", - "twitter-api-v2": "^1.29.0", "vue": "^3.5.42", "vue-i18n": "^11.4.10", "vue-router": "^5.0.2" @@ -3760,27 +3759,6 @@ "vue": "^3.0.0" } }, - "node_modules/@isaacs/fs-minipass": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", - "integrity": "sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==", - "license": "ISC", - "dependencies": { - "minipass": "^7.0.4" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@isaacs/fs-minipass/node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", @@ -3850,15 +3828,6 @@ "jsep": "^0.4.0||^1.0.0" } }, - "node_modules/@msgpack/msgpack": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-1.12.2.tgz", - "integrity": "sha512-Vwhc3ObxmDZmA5hY8mfsau2rJ4vGPvzbj20QSZ2/E1GDPF61QVyjLfNHak9xmel6pW4heRt3v1fHa6np9Ehfeg==", - "license": "ISC", - "engines": { - "node": ">= 10" - } - }, "node_modules/@noble/hashes": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.4.0.tgz", @@ -4557,21 +4526,6 @@ } } }, - "node_modules/@samuelthomas2774/saltpack": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@samuelthomas2774/saltpack/-/saltpack-0.4.0.tgz", - "integrity": "sha512-QmG4/hHBefj4ph5HBfK5ZMzRM0lPFLozltQjddy58XaFupPBSgydHWKwut5bVmxcyRNRqefSvRoLrcnqObYbKQ==", - "license": "MIT", - "dependencies": { - "@msgpack/msgpack": "^1.12.2", - "lodash.chunk": "^4.2.0", - "pumpify": "^2.0.1", - "tweetnacl": "^1.0.3" - }, - "engines": { - "node": "^12.0.0 || >=14.0.0" - } - }, "node_modules/@sentry/conventions": { "version": "0.16.0", "resolved": "https://registry.npmjs.org/@sentry/conventions/-/conventions-0.16.0.tgz", @@ -5642,19 +5596,6 @@ "integrity": "sha512-2rPxex1jQf4jvl9MOHl6YaXCPcrNqz/FstMOEh3QWY+/OME9nQTvl9WYeCwhW7AFjaR0SnngZGlp/wkR6rkI6g==", "license": "MIT" }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/acorn": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", @@ -5694,15 +5635,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5740,12 +5672,6 @@ "node": ">=14" } }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "license": "MIT" - }, "node_modules/assertion-error": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", @@ -5926,16 +5852,6 @@ "node": ">=6.0.0" } }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "license": "MIT", - "optional": true, - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, "node_modules/birpc": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/birpc/-/birpc-2.9.0.tgz", @@ -5952,45 +5868,6 @@ "dev": true, "license": "MIT" }, - "node_modules/body-parser": { - "version": "1.20.6", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.6.tgz", - "integrity": "sha512-p5tAzS57i5MV9fZFDj9LeIiTZEufbSe2eDozP+ElheSUq1m74CRq1jI4mYNDdVs9vQztXFLuk/Gd6BWTdwRJ5g==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "~1.2.0", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "on-finished": "~2.4.1", - "qs": "~6.15.1", - "raw-body": "~2.5.3", - "type-is": "~1.6.18", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -6064,44 +5941,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/call-bound": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "get-intrinsic": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001810", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz", @@ -6170,15 +6009,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/chownr": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-3.0.0.tgz", - "integrity": "sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, "node_modules/chromium-bidi": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-17.0.2.tgz", @@ -6201,31 +6031,6 @@ "integrity": "sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==", "license": "MIT" }, - "node_modules/cli-table": { - "version": "0.3.11", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.11.tgz", - "integrity": "sha512-IqLQi4lO0nIB4tcdTpN4LCB9FI3uqrJZK7RC515EnhZ6qBaglkIgICb1wjeAqpdoOabm1+SuQtkXIPdYC93jhQ==", - "dependencies": { - "colors": "1.0.3" - }, - "engines": { - "node": ">= 0.2.0" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -6244,15 +6049,6 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, - "node_modules/colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha512-pFGrxThWcWQ2MsAz6RtgeWe4NK2kUE1WfsrvvlctdII745EW9I0yflqhe7++M5LEc7bV2c/9/5zc8sFcpL0Drw==", - "license": "MIT", - "engines": { - "node": ">=0.1.90" - } - }, "node_modules/comment-parser": { "version": "1.4.7", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.7.tgz", @@ -6282,27 +6078,6 @@ "node": ">=12" } }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -6310,21 +6085,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", - "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", - "license": "MIT" - }, "node_modules/cron": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/cron/-/cron-4.4.0.tgz", @@ -6409,25 +6169,6 @@ "dev": true, "license": "MIT" }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -6443,60 +6184,6 @@ "integrity": "sha512-gCcO42XCHKEs7Ag0S7aGYsnJ7hlgrO3qderYqeiY0Eqk+0GFfuvT13IA0hHreJTa2KCdDVyGMeOhdMNmrrTjVg==", "license": "BSD-3-Clause" }, - "node_modules/discord-rpc": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/discord-rpc/-/discord-rpc-4.0.1.tgz", - "integrity": "sha512-HOvHpbq5STRZJjQIBzwoKnQ0jHplbEWFWlPDwXXKm/bILh4nzjcg7mNqll0UY7RsjFoaXA7e/oYb/4lvpda2zA==", - "license": "MIT", - "dependencies": { - "node-fetch": "^2.6.1", - "ws": "^7.3.1" - }, - "optionalDependencies": { - "register-scheme": "github:devsnek/node-register-scheme" - } - }, - "node_modules/discord-rpc/node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/discord-rpc/node_modules/ws": { - "version": "7.5.13", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.13.tgz", - "integrity": "sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==", - "license": "MIT", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/dotenv": { "version": "17.4.2", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", @@ -6509,65 +6196,6 @@ "url": "https://dotenvx.com" } }, - "node_modules/dotenv-expand": { - "version": "11.0.7", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", - "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", - "license": "BSD-2-Clause", - "dependencies": { - "dotenv": "^16.4.5" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dotenv-expand/node_modules/dotenv": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", - "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/duplexify": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", - "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.2" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "license": "MIT" - }, "node_modules/electron-to-chromium": { "version": "1.5.416", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.416.tgz", @@ -6575,30 +6203,6 @@ "dev": true, "license": "ISC" }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/encodeurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", - "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", - "license": "MIT", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/enhanced-resolve": { "version": "5.24.5", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.5.tgz", @@ -6625,18 +6229,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/env-paths": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", - "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/error-stack-parser-es": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", @@ -6647,15 +6239,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, "node_modules/es-errors": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", @@ -6671,18 +6254,6 @@ "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", "license": "MIT" }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/esbuild": { "version": "0.28.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", @@ -6735,12 +6306,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -7064,15 +6629,6 @@ "node": ">=0.10.0" } }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/eventemitter3": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", @@ -7104,67 +6660,6 @@ "node": ">=12.0.0" } }, - "node_modules/express": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.22.2.tgz", - "integrity": "sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==", - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "~1.20.5", - "content-disposition": "~0.5.4", - "content-type": "~1.0.4", - "cookie": "~0.7.1", - "cookie-signature": "~1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "~1.3.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "~0.1.12", - "proxy-addr": "~2.0.7", - "qs": "~6.15.1", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "~0.19.0", - "serve-static": "~1.16.2", - "setprototypeof": "1.2.0", - "statuses": "~2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/exsolve": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.1.tgz", @@ -7307,13 +6802,6 @@ "node": ">=16.0.0" } }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "license": "MIT", - "optional": true - }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -7327,39 +6815,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", - "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "~2.4.1", - "parseurl": "~1.3.3", - "statuses": "~2.0.2", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, "node_modules/find-babel-config": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-2.1.2.tgz", @@ -7408,24 +6863,6 @@ "dev": true, "license": "ISC" }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -7488,43 +6925,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/glob": { "version": "9.3.5", "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz", @@ -7604,18 +7004,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -7623,12 +7011,6 @@ "dev": true, "license": "ISC" }, - "node_modules/growly": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", - "integrity": "sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==", - "license": "MIT" - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7638,18 +7020,6 @@ "node": ">=8" } }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/hasown": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", @@ -7685,26 +7055,6 @@ ], "license": "MIT" }, - "node_modules/http-errors": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", - "license": "MIT", - "dependencies": { - "depd": "~2.0.0", - "inherits": "~2.0.4", - "setprototypeof": "~1.2.0", - "statuses": "~2.0.2", - "toidentifier": "~1.0.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, "node_modules/ical-generator": { "version": "11.1.1", "resolved": "https://registry.npmjs.org/ical-generator/-/ical-generator-11.1.1.tgz", @@ -7753,18 +7103,6 @@ } } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -7799,21 +7137,6 @@ "node": ">=0.8.19" } }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "license": "ISC" - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/is-core-module": { "version": "2.16.2", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz", @@ -7830,21 +7153,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -7855,15 +7163,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -7912,18 +7211,6 @@ ], "license": "MIT" }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "license": "MIT", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -8428,12 +7715,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.chunk": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", - "integrity": "sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w==", - "license": "MIT" - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -8491,33 +7772,6 @@ "node": ">=22.0.0" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", - "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -8528,15 +7782,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -8564,39 +7809,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/miniflare": { "version": "5.20260828.0-alpha", "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20260828.0-alpha.tgz", @@ -8673,27 +7885,6 @@ "node": ">=8" } }, - "node_modules/minizlib": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", - "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", - "license": "MIT", - "dependencies": { - "minipass": "^7.1.2" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -8771,21 +7962,6 @@ "integrity": "sha512-eh6eHCrRi1+POZ3dA+Dq1C6jhP1GNtr9CRINMb67OKzqW9I5DUuZM/3jLPlzhgpGeiNUlEGEbkCYChXMCc/8DQ==", "license": "Apache-2.0 OR MIT" }, - "node_modules/murmurhash": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/murmurhash/-/murmurhash-2.0.1.tgz", - "integrity": "sha512-5vQEh3y+DG/lMPM0mCGPDnyV8chYg/g7rl6v3Gd8WMF9S429ox3Xk8qrk174kWhG767KQMqqxLD1WnGd77hiew==", - "license": "MIT" - }, - "node_modules/mute-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", - "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", - "license": "ISC", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/nanoid": { "version": "3.3.18", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", @@ -8811,57 +7987,6 @@ "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/node-addon-api": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", - "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", - "license": "MIT", - "optional": true - }, - "node_modules/node-notifier": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-10.0.1.tgz", - "integrity": "sha512-YX7TSyDukOZ0g+gmzjB6abKu+hTGvO8+8+gIFDsRCU2t8fLV/P2unmt+LGFaIa4y64aX98Qksa97rgz4vMNeLQ==", - "license": "MIT", - "dependencies": { - "growly": "^1.3.0", - "is-wsl": "^2.2.0", - "semver": "^7.3.5", - "shellwords": "^0.1.1", - "uuid": "^8.3.2", - "which": "^2.0.2" - } - }, - "node_modules/node-notifier/node_modules/semver": { - "version": "7.8.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", - "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-persist": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/node-persist/-/node-persist-3.1.3.tgz", - "integrity": "sha512-CaFv+kSZtsc+VeDRldK1yR47k1vPLBpzYB9re2z7LIwITxwBtljMq3s8VQnnr+x3E8pQfHbc5r2IyJsBLJhtXg==", - "license": "MIT", - "engines": { - "node": ">=10.12.0" - } - }, "node_modules/node-releases": { "version": "2.0.54", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz", @@ -8891,62 +8016,6 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, - "node_modules/nxapi": { - "version": "1.6.1-next.257", - "resolved": "https://registry.npmjs.org/nxapi/-/nxapi-1.6.1-next.257.tgz", - "integrity": "sha512-KOuHmjM42Z/duHlcsmD8LoUTH/XWdVDc8kb6F9HIQm7Ybcgp0Ti7ZVG8AMW5aJ8xtX/8kysinxxX/9xW5dKiGQ==", - "license": "AGPL-3.0-or-later", - "dependencies": { - "@samuelthomas2774/saltpack": "^0.4.0", - "body-parser": "^1.20.2", - "cli-table": "^0.3.11", - "debug": "^4.3.4", - "discord-rpc": "^4.0.1", - "dotenv": "^16.4.5", - "dotenv-expand": "^11.0.6", - "env-paths": "^3.0.0", - "express": "^4.19.2", - "murmurhash": "^2.0.1", - "node-notifier": "^10.0.1", - "node-persist": "^3.1.3", - "read": "^3.0.1", - "sharp": "^0.33.3", - "splatnet3-types": "^0.2.20231119210145", - "supports-color": "^9.4.0", - "tar": "^7.4.3", - "tslib": "^2.6.2", - "tweetnacl": "^1.0.3", - "undici": "^6.15.0", - "yargs": "^17.7.2" - }, - "bin": { - "nxapi": "bin/nxapi.js" - } - }, - "node_modules/nxapi/node_modules/dotenv": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", - "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://dotenvx.com" - } - }, - "node_modules/nxapi/node_modules/supports-color": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/object-deep-merge": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.1.tgz", @@ -8954,18 +8023,6 @@ "dev": true, "license": "MIT" }, - "node_modules/object-inspect": { - "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/obug": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", @@ -8980,27 +8037,6 @@ "node": ">=12.20.0" } }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -9161,15 +8197,6 @@ "dev": true, "license": "MIT" }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -9246,12 +8273,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/path-to-regexp": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", - "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", - "license": "MIT" - }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -9449,40 +8470,6 @@ "node": ">= 0.8.0" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pump": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", - "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", - "license": "MIT", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/pumpify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-2.0.1.tgz", - "integrity": "sha512-m7KOje7jZxrmutanlkS1daj1dS6z6BgslzOXmcSEpIlCxM3VJH7lG5QLeck/6hgF6F4crFf01UtQmNsJfweTAw==", - "license": "MIT", - "dependencies": { - "duplexify": "^4.1.1", - "inherits": "^2.0.3", - "pump": "^3.0.0" - } - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -9510,22 +8497,6 @@ "node": ">=22.12.0" } }, - "node_modules/qs": { - "version": "6.15.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.3.tgz", - "integrity": "sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==", - "license": "BSD-3-Clause", - "dependencies": { - "es-define-property": "^1.0.1", - "side-channel": "^1.1.1" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/quansync": { "version": "0.2.11", "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", @@ -9563,56 +8534,6 @@ ], "license": "MIT" }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", - "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", - "license": "MIT", - "dependencies": { - "bytes": "~3.1.2", - "http-errors": "~2.0.1", - "iconv-lite": "~0.4.24", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/read": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/read/-/read-3.0.1.tgz", - "integrity": "sha512-SLBrDU/Srs/9EoWhU5GdbAoxG1GzpQHo/6qiGItaoLJ1thmYpcNIM1qISEUvyHBzfGlWIyd6p2DNi1oV1VmAuw==", - "license": "ISC", - "dependencies": { - "mute-stream": "^1.0.0" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdirp": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", @@ -9626,26 +8547,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/register-scheme": { - "version": "0.0.2", - "resolved": "git+ssh://git@github.com/devsnek/node-register-scheme.git#e7cc9a63a1f512565da44cb57316d9fb10750e17", - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "dependencies": { - "bindings": "^1.3.0", - "node-addon-api": "^1.3.0" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-in-the-middle": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/require-in-the-middle/-/require-in-the-middle-8.0.1.tgz", @@ -9770,32 +8671,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "license": "MIT" - }, "node_modules/scule": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/scule/-/scule-1.3.0.tgz", @@ -9812,66 +8687,6 @@ "semver": "bin/semver.js" } }, - "node_modules/send": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", - "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "~0.5.2", - "http-errors": "~2.0.1", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "~2.4.1", - "range-parser": "~1.2.1", - "statuses": "~2.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "license": "MIT" - }, - "node_modules/serve-static": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", - "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", - "license": "MIT", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "~0.19.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "license": "ISC" - }, "node_modules/sharp": { "version": "0.35.4", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.4.tgz", @@ -9956,84 +8771,6 @@ "node": ">=8" } }, - "node_modules/shellwords": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", - "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", - "license": "MIT" - }, - "node_modules/side-channel": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz", - "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4", - "side-channel-list": "^1.0.1", - "side-channel-map": "^1.0.1", - "side-channel-weakmap": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-list": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", - "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "object-inspect": "^1.13.4" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel-weakmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", - "license": "MIT", - "dependencies": { - "call-bound": "^1.0.2", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.5", - "object-inspect": "^1.13.3", - "side-channel-map": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/siginfo": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", @@ -10100,11 +8837,6 @@ "dev": true, "license": "CC0-1.0" }, - "node_modules/splatnet3-types": { - "version": "0.2.20231119210145", - "resolved": "https://registry.npmjs.org/splatnet3-types/-/splatnet3-types-0.2.20231119210145.tgz", - "integrity": "sha512-ySnftvxfn7zuGUgBxcjGPYhVHs8QaUCxHdbUNw4u46bXwtxQ82eyvXc+sDQI5TcHHPHz821PyrhtWW3pt9QdAg==" - }, "node_modules/stackback": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", @@ -10112,15 +8844,6 @@ "dev": true, "license": "MIT" }, - "node_modules/statuses": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/std-env": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", @@ -10128,12 +8851,6 @@ "dev": true, "license": "MIT" }, - "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", - "license": "MIT" - }, "node_modules/streamx": { "version": "2.28.1", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.28.1.tgz", @@ -10145,41 +8862,6 @@ "text-decoder": "^1.1.0" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strnum": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.4.2.tgz", @@ -10254,22 +8936,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/tar": { - "version": "7.5.22", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz", - "integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", - "minipass": "^7.1.2", - "minizlib": "^3.1.0", - "yallist": "^5.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/tar-stream": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.1.tgz", @@ -10282,24 +8948,6 @@ "streamx": "^2.15.0" } }, - "node_modules/tar/node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz", - "integrity": "sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=18" - } - }, "node_modules/teex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", @@ -10400,15 +9048,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, "node_modules/totalist": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", @@ -10418,12 +9057,6 @@ "node": ">=6" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "license": "MIT" - }, "node_modules/ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -10452,18 +9085,6 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/tweetnacl": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", - "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", - "license": "Unlicense" - }, - "node_modules/twitter-api-v2": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/twitter-api-v2/-/twitter-api-v2-1.29.1.tgz", - "integrity": "sha512-l5U8aP6woe+gv0RViz/YA0YEG/NRtqkO1iXWqxNfrn3MSc2V85u6w44oNDBWhy8zVV9r36SJv/uXNmnfni8Uxw==", - "license": "Apache-2.0" - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -10493,19 +9114,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typed-query-selector": { "version": "2.12.2", "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz", @@ -10532,15 +9140,6 @@ "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", "license": "MIT" }, - "node_modules/undici": { - "version": "6.28.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz", - "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, "node_modules/undici-types": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", @@ -10566,15 +9165,6 @@ "integrity": "sha512-jHGmj2LUuqDcX3hqY12Ql+uhUTn8huuxNZGq7GvtF6bSybzH3aFgedYu/KTzQStEgt1Ra2F3HxadNXsNjb3m3g==", "license": "MIT" }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/unplugin": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz", @@ -10654,37 +9244,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "license": "MIT" }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.1.tgz", - "integrity": "sha512-vIYxrBCC/N/K+Js3qSN88go7kIfNPssr/hHCesKCQNAjmgvYS2oqr69kIufEG+O4+PfezOH4EbIeHCfFov8ZgQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/esm/bin/uuid" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/vite": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz", @@ -11320,28 +9879,12 @@ "integrity": "sha512-VSV+fzfChirL3e7jay2yUC7B4HQCGtEWEg/MSSQbK+qWbqeGlRLlXTzPpYr3XGUvbpDHumWZBJxgesg4N7dbtA==", "license": "Apache-2.0" }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "license": "BSD-2-Clause" - }, "node_modules/webpack-virtual-modules": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", "license": "MIT" }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -11932,29 +10475,6 @@ "dev": true, "license": "MIT" }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "license": "ISC" - }, "node_modules/ws": { "version": "8.21.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.3.tgz", @@ -12050,33 +10570,6 @@ "url": "https://github.com/sponsors/ota-meshi" } }, - "node_modules/yargs": { - "version": "17.7.3", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", - "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/yocto-queue": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz", diff --git a/package.json b/package.json index a33330f..cd47a93 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,20 @@ "engines": { "node": "24.x" }, + "imports": { + "#image-converter": { + "workerd": "./app/common/image/convert.worker.mjs", + "default": "./app/common/image/convert.node.mjs" + }, + "#avatars": { + "workerd": "./app/social/avatars/index.worker.mjs", + "default": "./app/social/avatars/index.node.mjs" + }, + "#local-screenshot-driver": { + "workerd": "./app/screenshots/drivers/LocalScreenshotDriver.worker.mjs", + "default": "./app/screenshots/drivers/LocalScreenshotDriver.mjs" + } + }, "scripts": { "dev": "vite", "build": "vite build", @@ -45,6 +59,7 @@ "@headlessui/vue": "^1.7.23", "@heroicons/vue": "^2.2.0", "@noble/hashes": "^2.4.0", + "@sentry/core": "^10.38.0", "@sentry/node": "^10.38.0", "console-stamp": "^3.0.6", "cron": "^4.4.0", @@ -53,7 +68,6 @@ "jsonpath-plus": "^10.4.0", "lodash": "^4.17.21", "masto": "^8.0.0", - "nxapi": "1.6.1-next.257", "p-filter": "^4.1.0", "p-limit": "^7.3.0", "p-queue": "^9.1.0", @@ -62,7 +76,6 @@ "sharp": "^0.35.4", "sirv": "^3.0.2", "tar-stream": "^3.2.0", - "twitter-api-v2": "^1.29.0", "vue": "^3.5.42", "vue-i18n": "^11.4.10", "vue-router": "^5.0.2"