Update dependencies, update Docker image to Node.js v20

This commit is contained in:
Samuel Elliott 2023-11-19 21:44:49 +00:00
parent 5ef9101c1e
commit 0445ab46af
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
10 changed files with 11750 additions and 2282 deletions

View File

@ -1,4 +1,4 @@
FROM node:18 as build
FROM node:20 as build
WORKDIR /app
@ -13,7 +13,7 @@ ADD tsconfig.json /app
RUN npx tsc
FROM node:18
FROM node:20
WORKDIR /app

13929
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -46,42 +46,41 @@
"express": "^4.18.2",
"node-notifier": "^10.0.1",
"node-persist": "^3.1.3",
"read": "^1.0.7",
"read": "^3.0.0",
"splatnet3-types": "^0.2.20231119210145",
"supports-color": "^8.1.1",
"tslib": "^2.6.0",
"undici": "^5.22.1",
"tslib": "^2.6.2",
"undici": "^5.27.2",
"yargs": "^17.7.2"
},
"devDependencies": {
"@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.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": "^18.2.14",
"@types/react-native": "^0.71.8",
"@types/read": "^0.0.29",
"@types/yargs": "^17.0.24",
"electron": "^25.3.0",
"electron-builder": "^24.4.0",
"@rollup/plugin-alias": "^5.0.1",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-html": "^1.0.3",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^5.0.5",
"@types/body-parser": "^1.19.5",
"@types/cli-table": "^0.3.4",
"@types/debug": "^4.1.12",
"@types/discord-rpc": "^4.0.8",
"@types/eventsource": "^1.1.15",
"@types/express": "^4.17.21",
"@types/node": "^18.18.10",
"@types/node-notifier": "^8.0.5",
"@types/node-persist": "^3.1.6",
"@types/react": "^18.2.37",
"@types/react-native": "^0.72.6",
"@types/yargs": "^17.0.31",
"electron": "^26.6.0",
"electron-builder": "^24.6.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-native-web": "^0.19.6",
"rollup": "^3.26.2",
"react-native-web": "^0.19.9",
"rollup": "^3.29.4",
"rollup-plugin-polyfill-node": "^0.12.0",
"ts-json-schema-generator": "^1.2.0",
"typescript": "^5.1.6"
"ts-json-schema-generator": "^1.4.0",
"typescript": "^5.2.2"
},
"build": {
"appId": "uk.org.fancy.nxapi.app",

View File

@ -91,9 +91,11 @@ export function Root(props: React.PropsWithChildren<{
const styles = StyleSheet.create({
app: {
// @ts-expect-error vh unit only supported on web
height: Platform.OS === 'web' ? '100vh' : '100%',
},
appScrollable: {
// @ts-expect-error vh unit only supported on web
minHeight: Platform.OS === 'web' ? '100vh' : '100%',
},
});

View File

@ -1,9 +1,9 @@
import { read } from 'read';
import type { Arguments as ParentArguments } from '../nooklink.js';
import createDebug from '../../util/debug.js';
import { ArgumentsCamelCase, Argv, YargsArguments } from '../../util/yargs.js';
import { initStorage } from '../../util/storage.js';
import { getUserToken } from '../../common/auth/nooklink.js';
import prompt from '../util/prompt.js';
const debug = createDebug('cli:nooklink:keyboard');
@ -30,7 +30,8 @@ type Arguments = YargsArguments<ReturnType<typeof builder>>;
export async function handler(argv: ArgumentsCamelCase<Arguments>) {
if (!argv.message) {
argv.message = await prompt({
argv.message = await read<string>({
output: process.stderr,
prompt: 'Message: ',
});
}

View File

@ -1,10 +1,10 @@
import { read } from 'read';
import type { Arguments as ParentArguments } from '../nso.js';
import createDebug from '../../util/debug.js';
import { ArgumentsCamelCase, Argv, YargsArguments } from '../../util/yargs.js';
import { initStorage } from '../../util/storage.js';
import { getToken } from '../../common/auth/coral.js';
import { NintendoAccountSessionAuthorisationCoral } from '../../api/coral.js';
import prompt from '../util/prompt.js';
const debug = createDebug('cli:nso:auth');
@ -37,7 +37,8 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
console.log('2. On the "Linking an External Account" page, right click "Select this person" and copy the link. It should start with "npf71b963c1b7b6d119://auth".');
console.log('');
const applink = await prompt({
const applink = await read<string>({
output: process.stderr,
prompt: `Paste the link: `,
});

View File

@ -1,9 +1,9 @@
import { read } from 'read';
import type { Arguments as ParentArguments } from '../nso.js';
import createDebug from '../../util/debug.js';
import { ArgumentsCamelCase, Argv, YargsArguments } from '../../util/yargs.js';
import { initStorage } from '../../util/storage.js';
import { getToken } from '../../common/auth/coral.js';
import prompt from '../util/prompt.js';
const debug = createDebug('cli:nso:token');
@ -26,7 +26,8 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
const storage = await initStorage(argv.dataPath);
if (!argv.token) {
argv.token = await prompt({
argv.token = await read<string>({
output: process.stderr,
prompt: `Token: `,
silent: true,
});

View File

@ -1,10 +1,10 @@
import { read } from 'read';
import type { Arguments as ParentArguments } from '../pctl.js';
import createDebug from '../../util/debug.js';
import { ArgumentsCamelCase, Argv, YargsArguments } from '../../util/yargs.js';
import { initStorage } from '../../util/storage.js';
import { getPctlToken } from '../../common/auth/moon.js';
import { NintendoAccountSessionAuthorisationMoon } from '../../api/moon.js';
import prompt from '../util/prompt.js';
const debug = createDebug('cli:pctl:auth');
@ -37,7 +37,8 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
console.log('2. On the "Linking an External Account" page, right click "Select this person" and copy the link. It should start with "npf54789befb391a838://auth".');
console.log('');
const applink = await prompt({
const applink = await read<string>({
output: process.stderr,
prompt: `Paste the link: `,
});

View File

@ -1,9 +1,9 @@
import { read } from 'read';
import type { Arguments as ParentArguments } from '../pctl.js';
import createDebug from '../../util/debug.js';
import { ArgumentsCamelCase, Argv, YargsArguments } from '../../util/yargs.js';
import { initStorage } from '../../util/storage.js';
import { getPctlToken } from '../../common/auth/moon.js';
import prompt from '../util/prompt.js';
const debug = createDebug('cli:pctl:token');
@ -26,7 +26,8 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
const storage = await initStorage(argv.dataPath);
if (!argv.token) {
argv.token = await prompt({
argv.token = await read<string>({
output: process.stderr,
prompt: `Token: `,
silent: true,
});

View File

@ -1,17 +0,0 @@
import process from 'node:process';
import { promisify } from 'node:util';
import { Options } from 'read';
export default async function prompt(options: Options) {
const read = await import('read');
const prompt = promisify(read.default);
return await prompt({
output: process.stderr,
...options,
});
}
export {
Options,
};