Simplify node imports

This commit is contained in:
Cohee
2024-10-11 00:28:17 +03:00
parent 4bafacaec4
commit a0e6030836
38 changed files with 83 additions and 84 deletions

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import { finished } from 'node:stream/promises';
import mime from 'mime-types';

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,4 +1,4 @@
import * as fs from 'node:fs';
import fs from 'node:fs';
import express from 'express';
import fetch from 'node-fetch';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,7 +1,7 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import { promises as fsPromises } from 'node:fs';
import * as readline from 'node:readline';
import readline from 'node:readline';
import { Buffer } from 'node:buffer';
import express from 'express';

View File

@ -1,6 +1,6 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import * as readline from 'node:readline';
import fs from 'node:fs';
import path from 'node:path';
import readline from 'node:readline';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import { Buffer } from 'node:buffer';
import express from 'express';

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import { Buffer } from 'node:buffer';
import express from 'express';

View File

@ -1,4 +1,4 @@
import * as path from 'node:path';
import path from 'node:path';
import express from 'express';
import sanitize from 'sanitize-filename';
import { sync as writeFileAtomicSync } from 'write-file-atomic';

View File

@ -1,4 +1,4 @@
import * as util from 'node:util';
import util from 'node:util';
import { Buffer } from 'node:buffer';
import fetch from 'node-fetch';

View File

@ -1,4 +1,4 @@
import * as fs from 'node:fs';
import fs from 'node:fs';
import { Buffer } from 'node:buffer';
import fetch from 'node-fetch';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import { sync as writeFileAtomicSync } from 'write-file-atomic';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import _ from 'lodash';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import mime from 'mime-types';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import fetch from 'node-fetch';

View File

@ -1,6 +1,6 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import * as crypto from 'node:crypto';
import fs from 'node:fs';
import path from 'node:path';
import crypto from 'node:crypto';
import express from 'express';
import writeFileAtomic from 'write-file-atomic';

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,6 +1,6 @@
import * as fs from 'node:fs';
import * as fsPromises from 'node:fs/promises';
import * as path from 'node:path';
import fs from 'node:fs';
import { promises as fsPromises } from 'node:fs';
import path from 'node:path';
import mime from 'mime-types';
import express from 'express';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import { Buffer } from 'node:buffer';
import express from 'express';

View File

@ -1,4 +1,4 @@
import * as https from 'node:https';
import https from 'node:https';
import { createRequire } from 'node:module';
import { Buffer } from 'node:buffer';

View File

@ -1,6 +1,6 @@
import * as path from 'node:path';
import path from 'node:path';
import { promises as fsPromises } from 'node:fs';
import * as crypto from 'node:crypto';
import crypto from 'node:crypto';
import storage from 'node-persist';
import express from 'express';

View File

@ -1,4 +1,4 @@
import * as crypto from 'node:crypto';
import crypto from 'node:crypto';
import storage from 'node-persist';
import express from 'express';

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import vectra from 'vectra';
import express from 'express';

View File

@ -1,5 +1,5 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import fs from 'node:fs';
import path from 'node:path';
import express from 'express';
import sanitize from 'sanitize-filename';

View File

@ -1,5 +1,5 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import path from 'node:path';
import fs from 'node:fs';
import ipMatching from 'ip-matching';
import { getIpFromRequest } from '../express-common.js';

View File

@ -1,6 +1,6 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import * as url from 'node:url';
import fs from 'node:fs';
import path from 'node:path';
import url from 'node:url';
import express from 'express';
import { getConfigValue } from './util.js';

View File

@ -1,4 +1,4 @@
import * as crypto from 'node:crypto';
import crypto from 'node:crypto';
import polyfill from './polyfill.js';
import { getConfigValue } from './util.js';

View File

@ -1,8 +1,8 @@
// Native Node Modules
import * as path from 'node:path';
import * as fs from 'node:fs';
import * as crypto from 'node:crypto';
import * as os from 'node:os';
import path from 'node:path';
import fs from 'node:fs';
import crypto from 'node:crypto';
import os from 'node:os';
import { Buffer } from 'node:buffer';
// Express and other dependencies

View File

@ -1,6 +1,6 @@
import * as path from 'node:path';
import * as fs from 'node:fs';
import * as http2 from 'node:http2';
import path from 'node:path';
import fs from 'node:fs';
import http2 from 'node:http2';
import { Readable } from 'node:stream';
import { createRequire } from 'node:module';
import { Buffer } from 'node:buffer';