Compare commits
3 Commits
97b094c3d4
...
22945357fd
Author | SHA1 | Date | |
---|---|---|---|
|
22945357fd | ||
|
17ef98cbd2 | ||
|
39ab22f9aa |
23
cef/package.json
Normal file
23
cef/package.json
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "rage-fw-cef",
|
||||
"version": "0.0.16-alpha.0",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/src/index.d.ts",
|
||||
"files": [
|
||||
"dist/**/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup"
|
||||
},
|
||||
"dependencies": {
|
||||
"rage-fw-shared-types": "workspace:^",
|
||||
"rage-rpc": "^0.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ragempcommunity/types-cef": "^2.1.8"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "SashaGoncharov19",
|
||||
"license": "MIT",
|
||||
"description": "CEF side for rage-fw"
|
||||
}
|
15
cef/src/index.ts
Normal file
15
cef/src/index.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import rpc from 'rage-rpc'
|
||||
|
||||
class Cef {
|
||||
public register() {}
|
||||
|
||||
public trigger() {}
|
||||
|
||||
public triggerServer() {}
|
||||
|
||||
public triggerClient() {}
|
||||
}
|
||||
|
||||
export const fw = {
|
||||
event: new Cef(),
|
||||
}
|
0
cef/src/types/index.ts
Normal file
0
cef/src/types/index.ts
Normal file
25
cef/tsconfig.json
Normal file
25
cef/tsconfig.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"display": "Base",
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"composite": false,
|
||||
"target": "ES2022",
|
||||
"experimentalDecorators": true,
|
||||
"moduleDetection": "auto",
|
||||
"module": "CommonJS",
|
||||
"resolveJsonModule": true,
|
||||
"declaration": true,
|
||||
"declarationMap": false,
|
||||
"sourceMap": false,
|
||||
"downlevelIteration": false,
|
||||
"inlineSourceMap": false,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
12
cef/tsup.config.ts
Normal file
12
cef/tsup.config.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { defineConfig } from 'tsup'
|
||||
|
||||
export default defineConfig({
|
||||
entry: ['src/index.ts'],
|
||||
outDir: './dist',
|
||||
format: ['cjs'],
|
||||
noExternal: ['rage-rpc'],
|
||||
experimentalDts: true,
|
||||
splitting: false,
|
||||
sourcemap: false,
|
||||
clean: true,
|
||||
})
|
@ -1,5 +1,7 @@
|
||||
import rpc from 'rage-rpc'
|
||||
|
||||
import Logger from './logger'
|
||||
|
||||
import type {
|
||||
RageFW_ClientEventCallback,
|
||||
RageFW_ClientEvent,
|
||||
@ -31,4 +33,7 @@ class Player {
|
||||
export const fw = {
|
||||
event: new Client(),
|
||||
player: new Player(),
|
||||
system: {
|
||||
log: new Logger(),
|
||||
},
|
||||
}
|
||||
|
19
client/src/logger.ts
Normal file
19
client/src/logger.ts
Normal file
@ -0,0 +1,19 @@
|
||||
export default class Logger {
|
||||
public error(message: unknown) {
|
||||
mp.console.logError(
|
||||
`[${new Date().toLocaleTimeString()}] [ERROR] ${message}`,
|
||||
)
|
||||
}
|
||||
|
||||
public warn(message: unknown) {
|
||||
mp.console.logWarning(
|
||||
`[${new Date().toLocaleTimeString()}] [WARN] ${message}`,
|
||||
)
|
||||
}
|
||||
|
||||
public info(message: unknown) {
|
||||
mp.console.logInfo(
|
||||
`[${new Date().toLocaleTimeString()}] [INFO] ${message}`,
|
||||
)
|
||||
}
|
||||
}
|
14521
pnpm-lock.yaml
generated
14521
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
packages:
|
||||
- "server"
|
||||
- "client"
|
||||
- "cef"
|
||||
- "shared"
|
||||
- "shared-types"
|
2
shared-types/types/types/index.d.ts
vendored
2
shared-types/types/types/index.d.ts
vendored
@ -2,4 +2,6 @@ declare module 'rage-fw-shared-types' {
|
||||
export interface RageFW_ICustomServerEvent {}
|
||||
|
||||
export interface RageFW_ICustomClientEvent {}
|
||||
|
||||
export interface RageFW_ICustomCefEvent {}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user