mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-07-13 06:41:11 -05:00
Update dependencies
This commit is contained in:
parent
7bdf9f578a
commit
584f0e2d89
5171
package-lock.json
generated
5171
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
61
package.json
61
package.json
|
|
@ -36,54 +36,53 @@
|
|||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.20.1",
|
||||
"body-parser": "^1.20.2",
|
||||
"cli-table": "^0.3.11",
|
||||
"debug": "^4.3.4",
|
||||
"discord-rpc": "^4.0.1",
|
||||
"dotenv": "^16.0.3",
|
||||
"dotenv-expand": "^9.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"dotenv-expand": "^10.0.0",
|
||||
"env-paths": "^3.0.0",
|
||||
"eventsource": "^2.0.2",
|
||||
"express": "^4.18.2",
|
||||
"node-notifier": "^10.0.1",
|
||||
"node-persist": "^3.1.0",
|
||||
"node-persist": "^3.1.3",
|
||||
"read": "^1.0.7",
|
||||
"splatnet3-types": "^0.2.20230601143335",
|
||||
"splatnet3-types": "^0.2.20230615193659",
|
||||
"supports-color": "^8.1.1",
|
||||
"tslib": "^2.4.1",
|
||||
"tslib": "^2.6.0",
|
||||
"undici": "^5.22.1",
|
||||
"yargs": "^17.6.2"
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-alias": "^3.1.9",
|
||||
"@rollup/plugin-commonjs": "^22.0.2",
|
||||
"@rollup/plugin-html": "^0.2.4",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^14.1.0",
|
||||
"@rollup/plugin-replace": "^4.0.0",
|
||||
"@rollup/plugin-alias": "^5.0.0",
|
||||
"@rollup/plugin-commonjs": "^25.0.2",
|
||||
"@rollup/plugin-html": "^1.0.2",
|
||||
"@rollup/plugin-json": "^6.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.1.0",
|
||||
"@rollup/plugin-replace": "^5.0.2",
|
||||
"@types/body-parser": "^1.19.2",
|
||||
"@types/cli-table": "^0.3.1",
|
||||
"@types/debug": "^4.1.7",
|
||||
"@types/discord-rpc": "^4.0.3",
|
||||
"@types/eventsource": "^1.1.10",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/mkdirp": "^1.0.2",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/debug": "^4.1.8",
|
||||
"@types/discord-rpc": "^4.0.5",
|
||||
"@types/eventsource": "^1.1.11",
|
||||
"@types/express": "^4.17.17",
|
||||
"@types/node": "^16.18.38",
|
||||
"@types/node-notifier": "^8.0.2",
|
||||
"@types/node-persist": "^3.1.3",
|
||||
"@types/react": "^17.0.45",
|
||||
"@types/react-native": "^0.67.7",
|
||||
"@types/react": "^18.2.14",
|
||||
"@types/react-native": "^0.71.8",
|
||||
"@types/read": "^0.0.29",
|
||||
"@types/yargs": "^17.0.14",
|
||||
"electron": "^21.3.1",
|
||||
"electron-builder": "^23.6.0",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-native-web": "^0.17.7",
|
||||
"rollup": "^2.79.1",
|
||||
"rollup-plugin-polyfill-node": "^0.10.2",
|
||||
"ts-json-schema-generator": "^1.1.2",
|
||||
"typescript": "^4.9.3"
|
||||
"@types/yargs": "^17.0.24",
|
||||
"electron": "^25.3.0",
|
||||
"electron-builder": "^24.4.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-native-web": "^0.19.6",
|
||||
"rollup": "^3.26.2",
|
||||
"rollup-plugin-polyfill-node": "^0.12.0",
|
||||
"ts-json-schema-generator": "^1.2.0",
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"build": {
|
||||
"appId": "uk.org.fancy.nxapi.app",
|
||||
|
|
|
|||
|
|
@ -151,10 +151,10 @@ const app_entry = {
|
|||
],
|
||||
external: [
|
||||
'electron',
|
||||
path.resolve(__dirname, 'dist/app/app-main-bundle.js'),
|
||||
path.resolve(__dirname, 'dist/app/app-init-bundle.js'),
|
||||
path.resolve(__dirname, 'dist/app/app-init.js'),
|
||||
path.resolve(__dirname, 'dist/app/main/index.js'),
|
||||
path.resolve(dir, 'dist/app/app-main-bundle.js'),
|
||||
path.resolve(dir, 'dist/app/app-init-bundle.js'),
|
||||
path.resolve(dir, 'dist/app/app-init.js'),
|
||||
path.resolve(dir, 'dist/app/main/index.js'),
|
||||
],
|
||||
watch,
|
||||
};
|
||||
|
|
@ -243,8 +243,8 @@ const app_browser = {
|
|||
// react-native-web has an ESM and CommonJS build. By default the ESM build is
|
||||
// used when resolving react-native-web. For some reason this causes both versions
|
||||
// to be included in the bundle, so here we explicitly use the CommonJS build.
|
||||
{find: 'react-native', replacement: path.resolve(__dirname, 'node_modules', 'react-native-web', 'dist', 'cjs', 'index.js')},
|
||||
{find: 'react-native-web', replacement: path.resolve(__dirname, 'node_modules', 'react-native-web', 'dist', 'cjs', 'index.js')},
|
||||
{find: 'react-native', replacement: path.resolve(dir, 'node_modules', 'react-native-web', 'dist', 'cjs', 'index.js')},
|
||||
{find: 'react-native-web', replacement: path.resolve(dir, 'node_modules', 'react-native-web', 'dist', 'cjs', 'index.js')},
|
||||
|
||||
// rollup-plugin-polyfill-node doesn't support node: module identifiers
|
||||
{find: /^node:(.+)/, replacement: '$1'},
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { EventEmitter } from 'events';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import createDebug from 'debug';
|
||||
import type { NxapiElectronIpc } from '../preload/index.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { GITHUB_MIRROR_URL, GITLAB_URL, ISSUES_URL } from '../../common/constants.js';
|
||||
import { BrowserWindow, Menu, MenuItem, shell } from './electron.js';
|
||||
import { BrowserWindow, Menu, MenuItem, shell } from 'electron';
|
||||
import { App } from './index.js';
|
||||
|
||||
let appinstance: App | null;
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
import { createRequire } from 'node:module';
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const electron = require('electron');
|
||||
|
||||
export const app = electron.app;
|
||||
export const BrowserWindow = electron.BrowserWindow;
|
||||
export const clipboard = electron.clipboard;
|
||||
export const dialog = electron.dialog;
|
||||
export const ipcMain = electron.ipcMain;
|
||||
export const Menu = electron.Menu;
|
||||
export const MenuItem = electron.MenuItem;
|
||||
export const nativeImage = electron.nativeImage;
|
||||
export const nativeTheme = electron.nativeTheme;
|
||||
export const Notification = electron.Notification;
|
||||
export const session = electron.session;
|
||||
export const ShareMenu = electron.ShareMenu;
|
||||
export const shell = electron.shell;
|
||||
export const systemPreferences = electron.systemPreferences;
|
||||
export const Tray = electron.Tray;
|
||||
|
||||
export type BrowserWindow = import('electron').BrowserWindow;
|
||||
export type BrowserWindowConstructorOptions = import('electron').BrowserWindowConstructorOptions;
|
||||
export type IpcMain = import('electron').IpcMain;
|
||||
export type IpcMainInvokeEvent = import('electron').IpcMainInvokeEvent;
|
||||
export type KeyboardEvent = import('electron').KeyboardEvent;
|
||||
export type LoginItemSettings = import('electron').LoginItemSettings;
|
||||
export type LoginItemSettingsOptions = import('electron').LoginItemSettingsOptions;
|
||||
export type Menu = import('electron').Menu;
|
||||
export type MenuItem = import('electron').MenuItem;
|
||||
export type MessageBoxOptions = import('electron').MessageBoxOptions;
|
||||
export type Notification = import('electron').Notification;
|
||||
export type Session = import('electron').Session;
|
||||
export type Settings = import('electron').Settings;
|
||||
export type ShareMenu = import('electron').ShareMenu;
|
||||
export type SharingItem = import('electron').SharingItem;
|
||||
export type Tray = import('electron').Tray;
|
||||
export type WebContents = import('electron').WebContents;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { app, BrowserWindow, ipcMain, LoginItemSettingsOptions, session } from './electron.js';
|
||||
import { app, BrowserWindow, ipcMain, LoginItemSettingsOptions, session } from 'electron';
|
||||
import process from 'node:process';
|
||||
import * as path from 'node:path';
|
||||
import { EventEmitter } from 'node:events';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { BrowserWindow, clipboard, IpcMain, IpcMainInvokeEvent, KeyboardEvent, Menu, MenuItem, ShareMenu, SharingItem, shell, systemPreferences } from './electron.js';
|
||||
import { BrowserWindow, clipboard, IpcMain, IpcMainInvokeEvent, KeyboardEvent, Menu, MenuItem, ShareMenu, SharingItem, shell, systemPreferences } from 'electron';
|
||||
import { User } from 'discord-rpc';
|
||||
import openWebService, { handleOpenWebServiceError, QrCodeReaderOptions, WebServiceIpc, WebServiceValidationError } from './webservices.js';
|
||||
import { createModalWindow, getWindowConfiguration, setWindowHeight } from './windows.js';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { app, Menu, Tray, nativeImage, MenuItem, BrowserWindow, KeyboardEvent } from './electron.js';
|
||||
import { app, Menu, Tray, nativeImage, MenuItem, BrowserWindow, KeyboardEvent } from 'electron';
|
||||
import path from 'node:path';
|
||||
import { askAddNsoAccount, askAddPctlAccount } from './na-auth.js';
|
||||
import { App } from './index.js';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { Notification } from './electron.js';
|
||||
import { Notification } from 'electron';
|
||||
import { App } from './index.js';
|
||||
import { showErrorDialog, tryGetNativeImageFromUrl } from './util.js';
|
||||
import { DiscordPresenceConfiguration, DiscordPresenceExternalMonitorsConfiguration, DiscordPresenceSource, DiscordStatus } from '../common/types.js';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { app, BrowserWindow, dialog, MessageBoxOptions, Notification, session, shell } from './electron.js';
|
||||
import { app, BrowserWindow, dialog, MessageBoxOptions, Notification, session, shell } from 'electron';
|
||||
import process from 'node:process';
|
||||
import * as persist from 'node-persist';
|
||||
import { protocol_registration_options } from './index.js';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { BrowserWindow, dialog, Menu, MenuItem, MessageBoxOptions, nativeImage, Session } from './electron.js';
|
||||
import { BrowserWindow, dialog, Menu, MenuItem, MessageBoxOptions, nativeImage, Session } from 'electron';
|
||||
import path from 'node:path';
|
||||
import { Buffer } from 'node:buffer';
|
||||
import createDebug from '../../util/debug.js';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { app, BrowserWindow, clipboard, dialog, IpcMainInvokeEvent, MessageBoxOptions, nativeImage, nativeTheme, Notification, ShareMenu, shell, WebContents } from './electron.js';
|
||||
import { app, BrowserWindow, clipboard, dialog, IpcMainInvokeEvent, nativeImage, nativeTheme, Notification, ShareMenu, shell, WebContents } from 'electron';
|
||||
import * as path from 'node:path';
|
||||
import { constants } from 'node:fs';
|
||||
import * as fs from 'node:fs/promises';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { app, BrowserWindow, BrowserWindowConstructorOptions, Menu, nativeTheme, session, WebContents } from './electron.js';
|
||||
import { app, BrowserWindow, BrowserWindowConstructorOptions, Menu, nativeTheme, session, WebContents } from 'electron';
|
||||
import * as path from 'node:path';
|
||||
import { dev } from '../../util/product.js';
|
||||
import { WindowConfiguration, WindowType } from '../common/types.js';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { ipcRenderer, IpcRendererEvent } from 'electron';
|
||||
import { EventEmitter } from 'events';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import createDebug from 'debug';
|
||||
import { QrCodeReaderOptions, WebServiceData } from '../main/webservices.js';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { contextBridge, ipcRenderer } from 'electron';
|
||||
import { EventEmitter } from 'events';
|
||||
import { contextBridge, ipcRenderer, SharingItem } from 'electron';
|
||||
import { EventEmitter } from 'node:events';
|
||||
import createDebug from 'debug';
|
||||
import type { User } from 'discord-rpc';
|
||||
import type { SharingItem } from '../main/electron.js';
|
||||
import type { DiscordPresenceConfiguration, DiscordPresenceSource, DiscordStatus, LoginItem, LoginItemOptions, WindowConfiguration } from '../common/types.js';
|
||||
import type { SavedToken } from '../../common/auth/coral.js';
|
||||
import type { SavedMoonToken } from '../../common/auth/moon.js';
|
||||
|
|
|
|||
|
|
@ -749,7 +749,7 @@ class Server extends HttpServer {
|
|||
try {
|
||||
await i.loop(true);
|
||||
|
||||
while (!res.closed) {
|
||||
while (!res.destroyed) {
|
||||
await i.loop();
|
||||
|
||||
this.resetAuthTimeout(na_session_token, () => user.data.user.id);
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@ class Server extends HttpServer {
|
|||
|
||||
let last_result = result;
|
||||
|
||||
while (!req.socket.closed) {
|
||||
while (!req.socket.destroyed) {
|
||||
try {
|
||||
debug('Updating data for event stream %d', stream.id);
|
||||
const result = await this.handlePresenceRequest(req, null, presence_user_nsaid, true);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export async function initStorage(dir: string) {
|
|||
const storage = persist.create({
|
||||
dir: path.join(dir, 'persist'),
|
||||
stringify: data => JSON.stringify(data, null, 4) + '\n',
|
||||
expiredInterval: 0,
|
||||
});
|
||||
await storage.init();
|
||||
return storage;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user