mirror of
https://github.com/samuelthomas2774/nxapi.git
synced 2026-10-26 19:43:11 -05:00
Remove mkdirp
This commit is contained in:
@@ -2,7 +2,6 @@ import * as path from 'node:path';
|
||||
import * as fs from 'node:fs/promises';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { fetch } from 'undici';
|
||||
import mkdirp from 'mkdirp';
|
||||
import { ErrorResponse, ResponseSymbol } from '../api/util.js';
|
||||
import createDebug from '../util/debug.js';
|
||||
import { timeoutSignal } from '../util/misc.js';
|
||||
@@ -29,7 +28,7 @@ const default_config: NxapiRemoteConfig = {
|
||||
};
|
||||
|
||||
async function loadRemoteConfig() {
|
||||
await mkdirp(paths.cache);
|
||||
await fs.mkdir(paths.cache, {recursive: true});
|
||||
const config_cache_path = path.resolve(paths.cache, 'config.json');
|
||||
|
||||
const url = process.env.NXAPI_CONFIG_URL ?? CONFIG_URL;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import * as path from 'node:path';
|
||||
import * as fs from 'node:fs/promises';
|
||||
import persist from 'node-persist';
|
||||
import mkdirp from 'mkdirp';
|
||||
import SplatNet2Api, { SplatNet2ErrorResponse } from '../../api/splatnet2.js';
|
||||
import { renewIksmToken } from '../auth/splatnet2.js';
|
||||
import { Records, Stages } from '../../api/splatnet2-types.js';
|
||||
@@ -41,7 +40,7 @@ export class SplatNet2RecordsMonitor extends Loop {
|
||||
}
|
||||
|
||||
async init() {
|
||||
await mkdirp(this.directory);
|
||||
await fs.mkdir(this.directory, {recursive: true});
|
||||
}
|
||||
|
||||
async hasChanged(records: Records) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import * as path from 'node:path';
|
||||
import * as fs from 'node:fs/promises';
|
||||
import { fetch } from 'undici';
|
||||
import mkdirp from 'mkdirp';
|
||||
import createDebug from '../util/debug.js';
|
||||
import { dir, docker, version } from '../util/product.js';
|
||||
import { paths } from '../util/storage.js';
|
||||
@@ -26,7 +25,7 @@ export async function checkUpdates() {
|
||||
}
|
||||
} catch (err) {}
|
||||
|
||||
await mkdirp(paths.cache);
|
||||
await fs.mkdir(paths.cache, {recursive: true});
|
||||
const update_cache_path = path.resolve(paths.cache, 'update.json');
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user