huxy-node-server
Advanced tools
+2
-2
| import {startServer, startStatic, createLogger, dateTime} from './src/index.js'; | ||
| const testLogger = createLogger('test'); | ||
| const testLogger = await createLogger()('test'); | ||
@@ -33,3 +33,3 @@ testLogger.info({x: 123}, dateTime()); | ||
| buildPath: './build', | ||
| httpLogger: console, | ||
| logger: console, | ||
| // ssl: { | ||
@@ -36,0 +36,0 @@ // key: '/path/to/name.key', |
+1
-1
| { | ||
| "name": "huxy-node-server", | ||
| "version": "1.0.10", | ||
| "version": "1.1.0", | ||
| "description": "一个精炼、高性能的 Express.js 服务器模板,为现代 Node.js 应用程序设计,提供灵活的功能和最佳实践。", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+194
-203
@@ -1,31 +0,30 @@ | ||
| import L from 'express'; | ||
| import B from 'helmet'; | ||
| import X from 'cors'; | ||
| import {rateLimit as Q, ipKeyGenerator as J} from 'express-rate-limit'; | ||
| import Y from 'compression'; | ||
| import {createServer as C} from 'node:http'; | ||
| import Z from 'node:https'; | ||
| import b from 'pino'; | ||
| import j from 'node:os'; | ||
| import G from 'node:net'; | ||
| var m = (t = new Date()) => t.toLocaleString('zh-CN', {timeZone: 'Asia/Shanghai', hour12: !1}), | ||
| w = t => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(), | ||
| h = t => { | ||
| let r = t ? 'https' : 'http', | ||
| e = j.networkInterfaces(), | ||
| o = []; | ||
| return (Object.keys(e).map(n => o.push(...e[n])), o.filter(n => n.family === 'IPv4').map(n => n.address)); | ||
| import y from 'express'; | ||
| import K from 'helmet'; | ||
| import z from 'cors'; | ||
| import {rateLimit as B, ipKeyGenerator as X} from 'express-rate-limit'; | ||
| import Q from 'compression'; | ||
| import {createServer as N} from 'node:http'; | ||
| import J from 'node:https'; | ||
| import U from 'node:os'; | ||
| import j from 'node:net'; | ||
| var c = (t = new Date()) => t.toLocaleString('zh-CN', {timeZone: 'Asia/Shanghai', hour12: !1}), | ||
| L = t => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(), | ||
| f = t => { | ||
| let o = t ? 'https' : 'http', | ||
| s = U.networkInterfaces(), | ||
| e = []; | ||
| return (Object.keys(s).map(n => e.push(...s[n])), e.filter(n => n.family === 'IPv4').map(n => n.address)); | ||
| }, | ||
| y = t => { | ||
| let r = t ?? process.argv.slice(2) ?? [], | ||
| e = {}; | ||
| T = t => { | ||
| let o = t ?? process.argv.slice(2) ?? [], | ||
| s = {}; | ||
| return ( | ||
| r.map(o => { | ||
| let [s, n] = o.split('='); | ||
| e[s] = n; | ||
| o.map(e => { | ||
| let [r, n] = e.split('='); | ||
| s[r] = n; | ||
| }), | ||
| e | ||
| s | ||
| ); | ||
| }, | ||
| F = { | ||
| G = { | ||
| NODE_ENV: 'nodeEnv', | ||
@@ -44,66 +43,157 @@ PORT: 'port', | ||
| }, | ||
| V = (t, r, e) => { | ||
| let [o, s] = t.split('.'); | ||
| o && s ? (e[o] || (e[o] = {}), (e[o][s] = r)) : (e[o] = r); | ||
| F = (t, o, s) => { | ||
| let [e, r] = t.split('.'); | ||
| e && r ? (s[e] || (s[e] = {}), (s[e][r] = o)) : (s[e] = o); | ||
| }, | ||
| v = (t = {}, r = F) => { | ||
| let {env: e} = process; | ||
| Object.keys(r).map(s => { | ||
| let n = e[s] ?? t[s]; | ||
| n && V(r[s], n, t); | ||
| g = (t = {}, o = G) => { | ||
| let {env: s} = process; | ||
| Object.keys(o).map(r => { | ||
| let n = s[r] ?? t[r]; | ||
| n && F(o[r], n, t); | ||
| }); | ||
| let o = {...t, ...y()}; | ||
| return ((o.port = o.staticPort || o.port), (o.isDev = o.nodeEnv === 'development'), (o.protocol = 'http'), o); | ||
| let e = {...t, ...T()}; | ||
| return ((e.port = e.staticPort || e.port), (e.isDev = e.nodeEnv === 'development'), (e.protocol = 'http'), e); | ||
| }, | ||
| x = (t, r = '127.0.0.1') => | ||
| new Promise(e => { | ||
| let o = G.createServer(); | ||
| (o.once('error', s => { | ||
| (o.close(), e((s.code === 'EADDRINUSE', !1))); | ||
| h = (t, o = '127.0.0.1') => | ||
| new Promise(s => { | ||
| let e = j.createServer(); | ||
| (e.once('error', r => { | ||
| (e.close(), s((r.code === 'EADDRINUSE', !1))); | ||
| }), | ||
| o.once('listening', () => { | ||
| (o.close(), e(!0)); | ||
| e.once('listening', () => { | ||
| (e.close(), s(!0)); | ||
| }), | ||
| o.listen(Number(t), r)); | ||
| e.listen(Number(t), o)); | ||
| }), | ||
| A = (t, r = {}, e) => { | ||
| let o = s => { | ||
| (e.warn(`\u6536\u5230 ${s} \u4FE1\u53F7, \u{1F6D1} \u6B63\u5728\u5173\u95ED\u670D\u52A1\u5668...`), | ||
| I = (t, o = {}, s) => { | ||
| let e = r => { | ||
| (s.warn(`\u6536\u5230 ${r} \u4FE1\u53F7, \u{1F6D1} \u6B63\u5728\u5173\u95ED\u670D\u52A1\u5668...`), | ||
| t.close(async () => { | ||
| (e.info('\u{1F44B} \u670D\u52A1\u5668\u5DF2\u5173\u95ED'), await r.shutdown?.(), process.exit(0)); | ||
| (s.info('\u{1F44B} \u670D\u52A1\u5668\u5DF2\u5173\u95ED'), await o.shutdown?.(), process.exit(0)); | ||
| }), | ||
| setTimeout(() => { | ||
| (e.error('\u274C \u5F3A\u5236\u5173\u95ED\u670D\u52A1\u5668'), process.exit(1)); | ||
| (s.error('\u274C \u5F3A\u5236\u5173\u95ED\u670D\u52A1\u5668'), process.exit(1)); | ||
| }, 5e3)); | ||
| }; | ||
| (process.on('SIGTERM', () => o('SIGTERM')), | ||
| process.on('SIGINT', () => o('SIGINT')), | ||
| process.on('uncaughtException', s => { | ||
| (e.fatal(s, `\u{1F4A5} \u672A\u6355\u83B7\u7684\u5F02\u5E38: ${s.message}`), process.exit(1)); | ||
| (process.on('SIGTERM', () => e('SIGTERM')), | ||
| process.on('SIGINT', () => e('SIGINT')), | ||
| process.on('uncaughtException', r => { | ||
| (s.fatal(r, `\u{1F4A5} \u672A\u6355\u83B7\u7684\u5F02\u5E38: ${r.message}`), process.exit(1)); | ||
| }), | ||
| process.on('unhandledRejection', (s, n) => { | ||
| (e.fatal({reason: s, promise: n}, '\u26A0\uFE0F \u672A\u5904\u7406\u7684 Promise \u62D2\u7EDD'), process.exit(1)); | ||
| process.on('unhandledRejection', (r, n) => { | ||
| (s.fatal({reason: r, promise: n}, '\u26A0\uFE0F \u672A\u5904\u7406\u7684 Promise \u62D2\u7EDD'), process.exit(1)); | ||
| })); | ||
| }, | ||
| $ = (t, {port: r, host: e = '0.0.0.0'} = {}) => | ||
| new Promise((o, s) => { | ||
| let n = c => { | ||
| (a(), s(c)); | ||
| A = (t, {port: o, host: s = '0.0.0.0'} = {}) => | ||
| new Promise((e, r) => { | ||
| let n = a => { | ||
| (p(), r(a)); | ||
| }, | ||
| i = () => { | ||
| (a(), o(t)); | ||
| (p(), e(t)); | ||
| }, | ||
| a = () => { | ||
| p = () => { | ||
| (t.off('error', n), t.off('listening', i)); | ||
| }; | ||
| (t.once('error', n), t.once('listening', i), t.listen(r, e)); | ||
| (t.once('error', n), t.once('listening', i), t.listen(o, s)); | ||
| }), | ||
| R = (t, r = 56) => { | ||
| let e = t.length, | ||
| o = r - e, | ||
| s = ~~(o / 2); | ||
| return `${'-'.repeat(s)}${t}${'-'.repeat(o - s)}`; | ||
| $ = (t, o = 56) => { | ||
| let s = t.length, | ||
| e = o - s, | ||
| r = ~~(e / 2); | ||
| return `${'-'.repeat(r)}${t}${'-'.repeat(e - r)}`; | ||
| }; | ||
| var E = | ||
| (t = {}) => | ||
| async (o = 'huxy') => { | ||
| let {logLevel: s, transportOpt: e, ...r} = t, | ||
| n = (await import('pino')).default, | ||
| i = n({ | ||
| name: o, | ||
| level: s ?? 'info', | ||
| formatters: {level: p => ({level: p})}, | ||
| timestamp: n.stdTimeFunctions.isoTime, | ||
| base: null, | ||
| transport: {target: 'pino-pretty', options: {colorize: !0, levelFirst: !0, ...e}, ignore: 'pid,hostname,level,time', translateTime: 'SYS:yyyy-mm-dd HH:MM:ss'}, | ||
| ...r, | ||
| }); | ||
| return ((i.isPino = !0), i); | ||
| }; | ||
| var x = E; | ||
| var R = E('error-handler'), | ||
| b = t => (o, s, e) => { | ||
| (R.error({message: 'Not Found', timestamp: c(), url: o.originalUrl, method: o.method, ip: o.ip, userAgent: o.get('User-Agent')}, '\u627E\u4E0D\u5230\u8DEF\u5F84'), | ||
| s.status(404).json({success: !1, status: 404, url: o.originalUrl, message: `\u8DEF\u7531 [${o.method} ${o.originalUrl}] \u4E0D\u5B58\u5728`, timestamp: c()})); | ||
| }, | ||
| O = t => (o, s, e, r) => { | ||
| let n = o.status || 500, | ||
| i = o.message; | ||
| (R.error({message: i, timestamp: c(), stack: o.stack, url: s.originalUrl, method: s.method, ip: s.ip, userAgent: s.get('User-Agent')}, '\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF'), | ||
| e.status(n).json({success: !1, message: (t.isDev, i), stack: t.isDev ? o.stack : void 0, timestamp: c()})); | ||
| }; | ||
| import {Router as V} from 'express'; | ||
| var W = t => { | ||
| let o = V(); | ||
| return ( | ||
| o.use('/health', (s, e) => { | ||
| e.status(200).json({status: 'OK', timestamp: c(), environment: t.nodeEnv, uptime: process.uptime(), memoryUsage: process.memoryUsage(), pid: process.pid}); | ||
| }), | ||
| o.get('/', (s, e) => { | ||
| e.status(200).json({message: 'Node.js \u670D\u52A1\u5668\u8FD0\u884C\u4E2D', timestamp: c(), environment: t.nodeEnv}); | ||
| }), | ||
| o | ||
| ); | ||
| }, | ||
| _ = W; | ||
| var Y = async (t, o = {}, s) => { | ||
| if ((t.disable('x-powered-by'), t.set('trust proxy', o.trustProxy ?? 1), s.isPino)) { | ||
| let e = (await import('pino-http')).default; | ||
| t.use(e({logger: s, quietReqLogger: !0, autoLogging: !1, genReqId: !1})); | ||
| } else | ||
| t.use((e, r, n) => { | ||
| e.log = s; | ||
| }); | ||
| (t.use(Q()), | ||
| t.use(K(o.helmet)), | ||
| t.use(z(o.cors)), | ||
| t.use(o.apiPrefix, B({keyGenerator: e => X(e.ip) || e.headers['x-huxy-auth'] || e.headers['x-api-key'] || e.headers.authorization, ...o.rateLimit})), | ||
| t.use(y.json({limit: '20mb'})), | ||
| t.use(y.urlencoded({extended: !0, limit: '20mb'}))); | ||
| }, | ||
| Z = (t, o = {}) => { | ||
| (t.use(_(o)), t.use(b(o)), t.use(O(o))); | ||
| }, | ||
| q = async (t = {}, o) => { | ||
| let {logger: s, ...e} = g(t), | ||
| r = s ?? (await x(e.loggerConfig)('huxy')), | ||
| {port: n, ssl: i} = e; | ||
| (await h(n, e.host)) || ((e.port = Number(n) + 1), r.warn(`\u7AEF\u53E3 ${n} \u5DF2\u88AB\u5360\u7528\uFF0C\u73B0\u5728\u4F7F\u7528\u7AEF\u53E3 ${e.port}`)); | ||
| let a = y(); | ||
| await Y(a, e, r); | ||
| let l; | ||
| (i | ||
| ? (L(i) === 'object' || | ||
| (r.error({ssl: {key: '/path/to/name.key', cert: '/path/to/name.pem'}}, '\u26A0\uFE0F \u8BF7\u8BBE\u7F6E\u6709\u6548 SSL \u6216\u8BBE\u7F6E {ssl: false}'), process.exit(1)), | ||
| (e.protocol = 'https'), | ||
| (l = J.createServer(i, a)), | ||
| N((u, d) => { | ||
| (d.writeHead(301, {Location: `${e.protocol}://${u.headers.host}${u.url}`}), d.end()); | ||
| }).listen(80)) | ||
| : (l = N(a)), | ||
| I(l, e, r)); | ||
| try { | ||
| await A(l, e); | ||
| } catch (m) { | ||
| (r.error({err: m}, '\u26A0\uFE0F \u670D\u52A1\u5668\u542F\u52A8\u5931\u8D25'), process.exit(1)); | ||
| } | ||
| try { | ||
| await o?.(e, a, l, r); | ||
| } catch (m) { | ||
| (r.error({err: m}, `\u274C \u56DE\u8C03\u51FD\u6570\u9519\u8BEF\uFF1A${m.message}`), process.exit(1)); | ||
| } | ||
| return (Z(a, e), {app: a, httpServer: l, config: e, logger: r}); | ||
| }, | ||
| M = q; | ||
| import 'dotenv'; | ||
| var W = { | ||
| var ee = { | ||
| nodeEnv: process.env.NODE_ENV || 'development', | ||
@@ -127,143 +217,44 @@ isDev: process.env.NODE_ENV === 'development', | ||
| }, | ||
| S = W; | ||
| var u = (t, {transportOpt: r, ...e} = {}) => | ||
| b({ | ||
| name: t, | ||
| level: S.logLevel, | ||
| formatters: {level: o => ({level: o})}, | ||
| timestamp: b.stdTimeFunctions.isoTime, | ||
| base: null, | ||
| transport: {target: 'pino-pretty', options: {colorize: !0, levelFirst: !0, ...r}, ignore: 'pid,hostname,level,time', translateTime: 'SYS:yyyy-mm-dd HH:MM:ss'}, | ||
| ...e, | ||
| }); | ||
| var f = u; | ||
| var O = u('error-handler'), | ||
| N = t => (r, e, o) => { | ||
| (O.error({message: 'Not Found', timestamp: m(), url: r.originalUrl, method: r.method, ip: r.ip, userAgent: r.get('User-Agent')}, '\u627E\u4E0D\u5230\u8DEF\u5F84'), | ||
| e.status(404).json({success: !1, status: 404, url: r.originalUrl, message: `\u8DEF\u7531 [${r.method} ${r.originalUrl}] \u4E0D\u5B58\u5728`, timestamp: m()})); | ||
| }, | ||
| _ = t => (r, e, o, s) => { | ||
| let n = r.status || 500, | ||
| i = r.message; | ||
| (O.error({message: i, timestamp: m(), stack: r.stack, url: e.originalUrl, method: e.method, ip: e.ip, userAgent: e.get('User-Agent')}, '\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF'), | ||
| o.status(n).json({success: !1, message: (t.isDev, i), stack: t.isDev ? r.stack : void 0, timestamp: m()})); | ||
| }; | ||
| import {Router as K} from 'express'; | ||
| var z = t => { | ||
| let r = K(); | ||
| return ( | ||
| r.use('/health', (e, o) => { | ||
| o.status(200).json({status: 'OK', timestamp: m(), environment: t.nodeEnv, uptime: process.uptime(), memoryUsage: process.memoryUsage(), pid: process.pid}); | ||
| }), | ||
| r.get('/', (e, o) => { | ||
| o.status(200).json({message: 'Node.js \u670D\u52A1\u5668\u8FD0\u884C\u4E2D', timestamp: m(), environment: t.nodeEnv}); | ||
| }), | ||
| r | ||
| ); | ||
| }, | ||
| M = z; | ||
| var q = async (t, r = {}) => { | ||
| if ((t.disable('x-powered-by'), t.set('trust proxy', r.trustProxy ?? 1), r.httpLogger)) | ||
| t.use((e, o, s) => { | ||
| e.log = r.httpLogger; | ||
| }); | ||
| else { | ||
| let e = (await import('pino-http')).default; | ||
| t.use(e({logger: f('http-request', r.loggerConfig), quietReqLogger: !0, autoLogging: !1, genReqId: !1})); | ||
| } | ||
| (t.use(Y()), | ||
| t.use(B(r.helmet)), | ||
| t.use(X(r.cors)), | ||
| t.use(r.apiPrefix, Q({keyGenerator: e => J(e.ip) || e.headers['x-huxy-auth'] || e.headers['x-api-key'] || e.headers.authorization, ...r.rateLimit})), | ||
| t.use(L.json({limit: '20mb'})), | ||
| t.use(L.urlencoded({extended: !0, limit: '20mb'}))); | ||
| }, | ||
| ee = (t, r = {}) => { | ||
| (t.use(M(r)), t.use(N(r)), t.use(_(r))); | ||
| }, | ||
| te = async (t = {}, r) => { | ||
| let e = v(t), | ||
| o = e.logger ?? f(e.loggerName || 'huxy', e.loggerConfig), | ||
| {port: s, ssl: n} = e; | ||
| (await x(s, e.host)) || ((e.port = Number(s) + 1), o.warn(`\u7AEF\u53E3 ${s} \u5DF2\u88AB\u5360\u7528\uFF0C\u73B0\u5728\u4F7F\u7528\u7AEF\u53E3 ${e.port}`)); | ||
| let a = L(); | ||
| await q(a, e); | ||
| let c; | ||
| (n | ||
| ? (w(n) === 'object' || | ||
| (o.error({ssl: {key: '/path/to/name.key', cert: '/path/to/name.pem'}}, '\u26A0\uFE0F \u8BF7\u8BBE\u7F6E\u6709\u6548 SSL \u6216\u8BBE\u7F6E {ssl: false}'), process.exit(1)), | ||
| (e.protocol = 'https'), | ||
| (c = Z.createServer(n, a)), | ||
| C((l, d) => { | ||
| (d.writeHead(301, {Location: `${e.protocol}://${l.headers.host}${l.url}`}), d.end()); | ||
| }).listen(80)) | ||
| : (c = C(a)), | ||
| A(c, e, o)); | ||
| try { | ||
| await $(c, e); | ||
| } catch (p) { | ||
| (o.error({err: p}, '\u26A0\uFE0F \u670D\u52A1\u5668\u542F\u52A8\u5931\u8D25'), process.exit(1)); | ||
| } | ||
| try { | ||
| await r?.(e, a, c, o); | ||
| } catch (p) { | ||
| (o.error({err: p}, `\u274C \u56DE\u8C03\u51FD\u6570\u9519\u8BEF\uFF1A${p.message}`), process.exit(1)); | ||
| } | ||
| return (ee(a, e), {app: a, httpServer: c, config: e, logger: o}); | ||
| }, | ||
| D = te; | ||
| var oe = (t, r, e) => | ||
| D({...S, ...t}, async (o, s, n, i) => { | ||
| let {port: a, host: c, nodeEnv: p, basepath: l, appName: d = 'HuxyServer', protocol: g} = o; | ||
| if (!e) { | ||
| let U = h() | ||
| .filter(E => E !== c) | ||
| .map(E => `${g}://${E}:${a}${l}`); | ||
| (i.info(R(d)), | ||
| i.info(`\u{1F680} \u670D\u52A1\u8FD0\u884C\u5728\u3010${p}\u3011\u73AF\u5883: ${g}://${c}:${a}${l}`), | ||
| i.info(`-----------------[${m()}]------------------`), | ||
| i.info({ips: U}, '\u672C\u5730\u5730\u5740\uFF1A')); | ||
| C = ee; | ||
| var te = (t, o, s) => | ||
| M({...C, ...t}, async (e, r, n, i) => { | ||
| let {port: p, host: a, nodeEnv: l, basepath: m, appName: u = 'HuxyServer', protocol: d} = e; | ||
| if (!s) { | ||
| let k = f() | ||
| .filter(S => S !== a) | ||
| .map(S => `${d}://${S}:${p}${m}`); | ||
| (i.info($(u)), | ||
| i.info(`\u{1F680} \u670D\u52A1\u8FD0\u884C\u5728\u3010${l}\u3011\u73AF\u5883: ${d}://${a}:${p}${m}`), | ||
| i.info(`-----------------[${c()}]------------------`), | ||
| i.info({ips: k}, '\u672C\u5730\u5730\u5740\uFF1A')); | ||
| } | ||
| await r?.(o, s, n, i); | ||
| await o?.(e, r, n, i); | ||
| }), | ||
| T = oe; | ||
| import ie from 'express'; | ||
| import {fileURLToPath as re} from 'node:url'; | ||
| import {dirname as se, resolve as ne} from 'node:path'; | ||
| var P = (t = import.meta.url) => se(re(t)), | ||
| I = (...t) => ne(P(), ...t), | ||
| H = I; | ||
| var ae = {port: 9e3, host: 'localhost', basepath: '/', buildPath: './build'}, | ||
| ce = t => (t ? (t.endsWith('/') ? t : `${t}/`) : '/'), | ||
| me = (t, r) => | ||
| T({...ae, ...t}, async (e, o, s, n) => { | ||
| await r?.(e, o, s, n); | ||
| let {basepath: i, buildPath: a} = e; | ||
| v = te; | ||
| import ne from 'express'; | ||
| import {fileURLToPath as oe} from 'node:url'; | ||
| import {dirname as se, resolve as re} from 'node:path'; | ||
| var P = (t = import.meta.url) => se(oe(t)), | ||
| w = (...t) => re(P(), ...t), | ||
| D = w; | ||
| var ie = {port: 9e3, host: 'localhost', basepath: '/', buildPath: './build'}, | ||
| ae = t => (t ? (t.endsWith('/') ? t : `${t}/`) : '/'), | ||
| ce = (t, o) => | ||
| v({...ie, ...t}, async (s, e, r, n) => { | ||
| await o?.(s, e, r, n); | ||
| let {basepath: i, buildPath: p} = s; | ||
| (i !== '/' && | ||
| o.get('/', (l, d, g) => { | ||
| if (l.path === '/') return d.redirect(i); | ||
| g(); | ||
| e.get('/', (m, u, d) => { | ||
| if (m.path === '/') return u.redirect(i); | ||
| d(); | ||
| }), | ||
| o.use(i, ie.static(a, {...e.staticCache}))); | ||
| let c = ce(i), | ||
| p = new RegExp(`^${c.replace(/\//g, '\\/')}(.*)$`); | ||
| o.get(p, (l, d) => { | ||
| d.sendFile(H(a, 'index.html')); | ||
| e.use(i, ne.static(p, {...s.staticCache}))); | ||
| let a = ae(i), | ||
| l = new RegExp(`^${a.replace(/\//g, '\\/')}(.*)$`); | ||
| e.get(l, (m, u) => { | ||
| u.sendFile(D(p, 'index.html')); | ||
| }); | ||
| }), | ||
| k = me; | ||
| var et = {startServer: T, startStatic: k, logger: f, createLogger: u, dateTime: m, localIPs: h, nodeArgs: y, getEnvConfig: v, checkPort: x, getDirName: P, resolvePath: I}; | ||
| export { | ||
| x as checkPort, | ||
| u as createLogger, | ||
| m as dateTime, | ||
| et as default, | ||
| P as getDirName, | ||
| v as getEnvConfig, | ||
| h as localIPs, | ||
| f as logger, | ||
| y as nodeArgs, | ||
| I as resolvePath, | ||
| T as startServer, | ||
| k as startStatic, | ||
| }; | ||
| H = ce; | ||
| var Ye = {startServer: v, startStatic: H, createLogger: x, dateTime: c, localIPs: f, nodeArgs: T, getEnvConfig: g, checkPort: h, getDirName: P, resolvePath: w}; | ||
| export {h as checkPort, x as createLogger, c as dateTime, Ye as default, P as getDirName, g as getEnvConfig, f as localIPs, T as nodeArgs, w as resolvePath, v as startServer, H as startStatic}; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Network access
Supply chain riskThis module accesses the network.
Found 3 instances
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Network access
Supply chain riskThis module accesses the network.
Found 3 instances
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
24539
0.24%295
-2.96%4
33.33%