Compare commits
No commits in common. "acd7ad340684399dea0a5535b054bbdeed20c676" and "3bb9256eb8202dfd41c8b30883cfbb3c0a16e94c" have entirely different histories.
acd7ad3406
...
3bb9256eb8
@ -2,7 +2,7 @@
|
|||||||
"name": "rage-fw-client",
|
"name": "rage-fw-client",
|
||||||
"version": "0.0.15-alpha.0",
|
"version": "0.0.15-alpha.0",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"files": [
|
"files": [
|
||||||
"dist/**/*"
|
"dist/**/*"
|
||||||
],
|
],
|
||||||
@ -10,12 +10,10 @@
|
|||||||
"build": "tsup"
|
"build": "tsup"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ragempcommunity/types-client": "^2.1.8",
|
||||||
"rage-fw-shared-types": "workspace:^",
|
"rage-fw-shared-types": "workspace:^",
|
||||||
"rage-rpc": "^0.4.0"
|
"rage-rpc": "^0.4.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"@ragempcommunity/types-client": "^2.1.8"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "SashaGoncharov19",
|
"author": "SashaGoncharov19",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -5,7 +5,7 @@ export default defineConfig({
|
|||||||
outDir: './dist',
|
outDir: './dist',
|
||||||
format: ['cjs'],
|
format: ['cjs'],
|
||||||
noExternal: ['rage-rpc'],
|
noExternal: ['rage-rpc'],
|
||||||
experimentalDts: true,
|
dts: true,
|
||||||
splitting: false,
|
splitting: false,
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
clean: true,
|
clean: true,
|
||||||
|
@ -17,8 +17,10 @@
|
|||||||
"prettier": "^3.3.1",
|
"prettier": "^3.3.1",
|
||||||
"rage-rpc": "^0.4.0",
|
"rage-rpc": "^0.4.0",
|
||||||
"tsup": "^8.1.0",
|
"tsup": "^8.1.0",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.4.5"
|
||||||
"winston": "^3.13.0"
|
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module",
|
||||||
|
"devDependencies": {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
14312
pnpm-lock.yaml
generated
14312
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -10,12 +10,10 @@
|
|||||||
"build": "tsup"
|
"build": "tsup"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@ragempcommunity/types-server": "^2.1.8",
|
||||||
"rage-fw-shared-types": "workspace:^",
|
"rage-fw-shared-types": "workspace:^",
|
||||||
"rage-rpc": "^0.4.0"
|
"rage-rpc": "^0.4.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"@ragempcommunity/types-server": "^2.1.8"
|
|
||||||
},
|
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "SashaGoncharov19",
|
"author": "SashaGoncharov19",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
import rpc from 'rage-rpc'
|
import rpc from 'rage-rpc'
|
||||||
|
|
||||||
import Logger from './logger'
|
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
RageFW_ClientEvent,
|
RageFW_ClientEvent,
|
||||||
RageFW_ClientEventArguments,
|
RageFW_ClientEventArguments,
|
||||||
@ -92,7 +90,4 @@ class Player {
|
|||||||
export const fw = {
|
export const fw = {
|
||||||
event: new Server(),
|
event: new Server(),
|
||||||
player: new Player(),
|
player: new Player(),
|
||||||
system: {
|
|
||||||
log: new Logger(),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
import winston, { format } from 'winston'
|
|
||||||
const { timestamp, printf, colorize } = format
|
|
||||||
|
|
||||||
export default class Logger {
|
|
||||||
private format = printf(({ message, level, timestamp }) => {
|
|
||||||
return `[${new Date(timestamp).toLocaleTimeString()}] [${level}]: ${message}`
|
|
||||||
})
|
|
||||||
|
|
||||||
private systemLogger = winston.createLogger({
|
|
||||||
transports: [new winston.transports.Console()],
|
|
||||||
format: format.combine(
|
|
||||||
colorize({
|
|
||||||
level: true,
|
|
||||||
colors: {
|
|
||||||
error: 'red',
|
|
||||||
warn: 'yellow',
|
|
||||||
info: 'white',
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
timestamp(),
|
|
||||||
this.format,
|
|
||||||
),
|
|
||||||
})
|
|
||||||
|
|
||||||
public info(message: unknown) {
|
|
||||||
this.systemLogger.info(message)
|
|
||||||
}
|
|
||||||
|
|
||||||
public warn(message: unknown) {
|
|
||||||
this.systemLogger.warn(message)
|
|
||||||
}
|
|
||||||
|
|
||||||
public error(message: unknown) {
|
|
||||||
this.systemLogger.error(message)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user