Compare commits

..
Author SHA1 Message Date
Oleksandr Honcharov aed9bf2091 v0.0.11-alpha.0 2024-06-10 23:00:00 +03:00
Oleksandr Honcharov 512b37cdbd core setup fixes 2024-06-10 22:59:29 +03:00
Oleksandr Honcharov c163ef6585 bundle tsup server 2024-06-10 22:39:59 +03:00
Oleksandr Honcharov 2775b42f59 v0.0.10-alpha.0 2024-06-10 22:22:25 +03:00
Oleksandr Honcharov 19fdebd986 bundle tsup client 2024-06-10 22:19:36 +03:00
Oleksandr Honcharov 1923cb7a04 v0.0.9-alpha.0 2024-06-10 21:49:09 +03:00
Oleksandr Honcharov b336f1e1fe update client bundle 2024-06-10 21:48:52 +03:00
Oleksandr Honcharov e649b46351 v0.0.8-alpha.0 2024-06-10 18:09:16 +03:00
Oleksandr Honcharov 6d0ae3191f v0.0.7-alpha.0 2024-06-10 18:03:14 +03:00
Oleksandr Honcharov 47ce0a6b16 refactor client types 2024-06-10 18:02:57 +03:00
18 changed files with 724 additions and 117 deletions
-16
View File
@@ -1,16 +0,0 @@
import { build } from 'esbuild'
import { umdWrapper } from 'esbuild-plugin-umd-wrapper'
build({
entryPoints: ['./src/index.ts'],
bundle: true,
format: 'umd',
platform: 'node',
outdir: './dist',
plugins: [
umdWrapper({
libraryName: 'fw',
}),
],
}).then(() => {
console.log('Successfully build. Executing types build...')
})
-12
View File
@@ -1,12 +0,0 @@
{
"compilationOptions": {
"followSymlinks": true,
"preferredConfigPath": "../tsconfig.json"
},
"entries": [
{
"filePath": "./src/index.ts",
"outFile": "./dist/index.d.ts"
}
]
}
+3 -4
View File
@@ -1,14 +1,13 @@
{ {
"name": "rage-fw-client", "name": "rage-fw-client",
"version": "0.0.6-alpha.0", "version": "0.0.11-alpha.0",
"main": "dist/index.js", "main": "dist/index.js",
"type": "module", "types": "dist/index.d.ts",
"files": [ "files": [
"dist/**/*" "dist/**/*"
], ],
"scripts": { "scripts": {
"build": "node --es-module-specifier-resolution=node build.js && pnpm types", "build": "tsup"
"types": "dts-bundle-generator --config dts.config.json"
}, },
"dependencies": { "dependencies": {
"@ragempcommunity/types-client": "^2.1.8", "@ragempcommunity/types-client": "^2.1.8",
+1 -3
View File
@@ -25,9 +25,7 @@ class Player {
} }
} }
const fw = { export const fw = {
event: new Client(), event: new Client(),
player: new Player(), player: new Player(),
} }
export default fw
+7 -9
View File
@@ -5,22 +5,20 @@ import type {
RageFW_ICustomServerEvent, RageFW_ICustomServerEvent,
} from 'rage-fw-shared-types' } from 'rage-fw-shared-types'
export type RageFW_ClientEvent = export type RageFW_ClientEvent = keyof RageFW_ICustomServerEvent
| keyof RageFW_ICustomClientEvent
| keyof IClientEvents
export type RageFW_ClientEventArguments<K extends RageFW_ClientEvent> = export type RageFW_ClientEventArguments<K extends RageFW_ClientEvent> =
K extends keyof RageFW_ICustomClientEvent K extends keyof RageFW_ICustomServerEvent
? Parameters<RageFW_ICustomClientEvent[K]> ? Parameters<RageFW_ICustomServerEvent[K]>
: (K extends keyof IClientEvents ? IClientEvents[K] : never)[] : never
export type RageFW_ClientEventReturn<K extends RageFW_ClientEvent> = export type RageFW_ClientEventReturn<K extends RageFW_ClientEvent> =
K extends keyof RageFW_ICustomClientEvent K extends keyof RageFW_ICustomClientEvent
? ReturnType<RageFW_ICustomClientEvent[K]> ? ReturnType<RageFW_ICustomClientEvent[K]>
: never : never
export type RageFW_ClientServerEvent = keyof RageFW_ICustomServerEvent export type RageFW_ClientServerEvent = keyof RageFW_ICustomClientEvent
export type RageFW_ClientServerCallback<K extends RageFW_ClientServerEvent> = ( export type RageFW_ClientServerCallback<K extends RageFW_ClientServerEvent> = (
args: Parameters<RageFW_ICustomServerEvent[K]>, args: Parameters<RageFW_ICustomClientEvent[K]>,
) => ReturnType<RageFW_ICustomServerEvent[K]> ) => ReturnType<RageFW_ICustomClientEvent[K]>
+22 -5
View File
@@ -1,9 +1,26 @@
{ {
"extends": "../tsconfig.json", "$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": { "display": "Base",
"typeRoots": [ "exclude": [
"@ragempcommunity/types-client" "node_modules"
], ],
"baseUrl": "./src" "compilerOptions": {
"incremental": false,
"composite": false,
"target": "ES2022",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleDetection": "auto",
"module": "CommonJS",
"resolveJsonModule": true,
"declaration": false,
"declarationMap": false,
"sourceMap": false,
"downlevelIteration": false,
"inlineSourceMap": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
} }
} }
+12
View File
@@ -0,0 +1,12 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
outDir: './dist',
format: ['cjs'],
noExternal: ['rage-rpc'],
dts: true,
splitting: false,
sourcemap: false,
clean: true,
})
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"$schema": "node_modules/lerna/schemas/lerna-schema.json", "$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.0.6-alpha.0", "version": "0.0.11-alpha.0",
"npmClient": "pnpm" "npmClient": "pnpm"
} }
+5 -3
View File
@@ -1,12 +1,14 @@
{ {
"private": true, "private": true,
"scripts": {
"publish": "pnpm build && lerna publish --force-publish",
"build": "lerna run build"
},
"dependencies": { "dependencies": {
"@ragempcommunity/types-cef": "^2.1.8", "@ragempcommunity/types-cef": "^2.1.8",
"@ragempcommunity/types-client": "^2.1.8", "@ragempcommunity/types-client": "^2.1.8",
"@ragempcommunity/types-server": "^2.1.8", "@ragempcommunity/types-server": "^2.1.8",
"dts-bundle-generator": "^9.5.1", "tsup": "^8.1.0",
"esbuild": "^0.21.5",
"esbuild-plugin-umd-wrapper": "^2.0.0",
"lerna": "^8.1.3", "lerna": "^8.1.3",
"prettier": "^3.3.1", "prettier": "^3.3.1",
"rage-rpc": "^0.4.0", "rage-rpc": "^0.4.0",
+634 -30
View File
File diff suppressed because it is too large Load Diff
-10
View File
@@ -1,10 +0,0 @@
import { build } from 'esbuild'
build({
entryPoints: ['./src/index.ts'],
bundle: true,
format: 'cjs',
platform: 'node',
target: 'node10.4',
outdir: './dist',
}).then(r => console.log('Successfully build.'))
-12
View File
@@ -1,12 +0,0 @@
{
"compilationOptions": {
"followSymlinks": true,
"preferredConfigPath": "../tsconfig.json"
},
"entries": [
{
"filePath": "./src/index.ts",
"outFile": "./dist/index.d.ts"
}
]
}
+2 -4
View File
@@ -1,15 +1,13 @@
{ {
"name": "rage-fw-server", "name": "rage-fw-server",
"version": "0.0.6-alpha.0", "version": "0.0.11-alpha.0",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"type": "module",
"files": [ "files": [
"dist/**/*" "dist/**/*"
], ],
"scripts": { "scripts": {
"build": "node --es-module-specifier-resolution=node build.js && pnpm types", "build": "tsup"
"types": "dts-bundle-generator --config dts.config.json"
}, },
"dependencies": { "dependencies": {
"@ragempcommunity/types-server": "^2.1.8", "@ragempcommunity/types-server": "^2.1.8",
+1 -1
View File
@@ -1,4 +1,4 @@
/// <reference types="@ragempcommunity/types-server" /> import '@ragempcommunity/types-server'
import type { import type {
RageFW_ICustomServerEvent, RageFW_ICustomServerEvent,
+22 -5
View File
@@ -1,9 +1,26 @@
{ {
"extends": "../tsconfig.json", "$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": { "display": "Base",
"typeRoots": [ "exclude": [
"@ragempcommunity/types-server" "node_modules"
], ],
"baseUrl": "./src" "compilerOptions": {
"incremental": false,
"composite": false,
"target": "ES2022",
"experimentalDecorators": true,
"emitDecoratorMetadata": 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
View File
@@ -0,0 +1,12 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
outDir: './dist',
format: ['cjs'],
noExternal: ['rage-rpc'],
dts: true,
splitting: false,
sourcemap: false,
clean: true,
})
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rage-fw-shared-types", "name": "rage-fw-shared-types",
"version": "0.0.5-alpha.0", "version": "0.0.11-alpha.0",
"types": "types/types/index.d.ts", "types": "types/types/index.d.ts",
"files": [ "files": [
"types/**/*" "types/**/*"
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rage-fw-shared", "name": "rage-fw-shared",
"version": "0.0.5-alpha.0", "version": "0.0.11-alpha.0",
"type": "module", "type": "module",
"main": "index.d.ts", "main": "index.d.ts",
"files": [ "files": [