mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-07-19 00:43:35 -05:00
Merge remote-tracking branch 'github/main'
This commit is contained in:
commit
992f8900f2
|
|
@ -1,4 +1,4 @@
|
|||
image: node:latest
|
||||
image: node:17
|
||||
|
||||
cache:
|
||||
paths:
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "nxapi",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nxapi",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.2",
|
||||
"cli-table": "^0.3.11",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "nxapi",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"description": "",
|
||||
"author": "Samuel Elliott",
|
||||
"main": "dist/index.js",
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import * as persist from 'node-persist';
|
|||
import fetch from 'node-fetch';
|
||||
import dotenv from 'dotenv';
|
||||
import dotenvExpand from 'dotenv-expand';
|
||||
import { dev, getToken, initStorage, LoopResult, paths } from '../../util.js';
|
||||
import { dev, dir, getToken, initStorage, LoopResult, paths } from '../../util.js';
|
||||
import MenuApp from './menu.js';
|
||||
import { ZncDiscordPresence } from '../../cli/nso/presence.js';
|
||||
import { WebServiceIpc } from './webservices.js';
|
||||
|
|
@ -16,8 +16,7 @@ import { ErrorResponse } from '../../api/util.js';
|
|||
|
||||
const debug = createDebug('app:main');
|
||||
|
||||
const __dirname = path.join(import.meta.url.substr(7), '..');
|
||||
export const bundlepath = path.join(import.meta.url.substr(7), '..', '..', 'bundle');
|
||||
export const bundlepath = path.resolve(dir, 'dist', 'bundle');
|
||||
|
||||
function createWindow() {
|
||||
// Create the browser window.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import frida, { Session } from 'frida';
|
|||
import express from 'express';
|
||||
import bodyParser from 'body-parser';
|
||||
import type { Arguments as ParentArguments } from '../cli.js';
|
||||
import { ArgumentsCamelCase, Argv, getJwks, initStorage, YargsArguments } from '../util.js';
|
||||
import { ArgumentsCamelCase, Argv, dir, getJwks, initStorage, YargsArguments } from '../util.js';
|
||||
import { Jwt } from '../api/util.js';
|
||||
import { NintendoAccountIdTokenJwtPayload } from '../api/na.js';
|
||||
import { ZNCA_CLIENT_ID, ZncJwtPayload } from '../api/znc.js';
|
||||
|
|
@ -271,7 +271,7 @@ async function setup(argv: ArgumentsCamelCase<Arguments>) {
|
|||
'-s',
|
||||
argv.device,
|
||||
'push',
|
||||
path.join(import.meta.url.substr(7), '..', '..', '..', 'resources', 'android-znca-api-server.sh'),
|
||||
path.join(dir, 'resources', 'android-znca-api-server.sh'),
|
||||
'/data/local/tmp/android-znca-api-server.sh',
|
||||
], {
|
||||
stdio: 'inherit',
|
||||
|
|
|
|||
|
|
@ -3,15 +3,13 @@ import * as fs from 'fs/promises';
|
|||
import fetch from 'node-fetch';
|
||||
import createDebug from 'debug';
|
||||
import mkdirp from 'mkdirp';
|
||||
import { paths, version } from '../util.js';
|
||||
import { dir, paths, version } from '../util.js';
|
||||
|
||||
const debug = createDebug('cli:update');
|
||||
|
||||
const RELEASES_URL = 'https://api.github.com/repos/samuelthomas2774/nxapi/releases';
|
||||
|
||||
export async function checkUpdates() {
|
||||
const dir = path.resolve(import.meta.url.substr(7), '..', '..', '..');
|
||||
|
||||
try {
|
||||
await fs.stat(path.join(dir, '.git'));
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ const debug = createDebug('cli');
|
|||
|
||||
export const paths = getPaths('nxapi');
|
||||
|
||||
export const dir = path.resolve(import.meta.url.substr(7), '..', '..');
|
||||
export const dir = path.resolve(decodeURI(import.meta.url.substr(process.platform === 'win32' ? 8 : 7)), '..', '..');
|
||||
export const pkg = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf-8'));
|
||||
export const version = pkg.version;
|
||||
export const git = (() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user