Compare commits

..
15 Commits
Author SHA1 Message Date
rilaxik e29dc20398 upd (fw):
- deployment config + scripts
- License bump
2025-01-29 17:34:03 +00:00
rilaxik 82050004f6 upd (fw):
- sharing same tsconfig
2025-01-29 14:57:58 +00:00
rilaxik 179d7b8b93 upd (fw):
- eslint config
- correct tsconfigs
2025-01-28 22:44:54 +00:00
rilaxik 978d15bd25 Merge remote-tracking branch 'origin/dev' into dev 2025-01-28 21:06:42 +00:00
rilaxik 4e48772950 upd (fw):
- using syncpack to maintain dependencies consistency
- testing lerna
2025-01-28 21:06:25 +00:00
rilaxik 84994ef121 upd (fw):
- using syncpack to maintain dependencies consistency
- testing lerna
2025-01-28 21:06:12 +00:00
rilaxik 166b933b71 upd (fw): configs 2025-01-28 19:04:16 +00:00
Oleksandr Honcharov e3d7a66646 license update 2025-01-28 17:06:01 +02:00
Oleksandr Honcharov f977e6191f added skipLibCheck for RPC 2025-01-28 16:56:57 +02:00
Oleksandr Honcharov 593f4650a3 versions changes / code improvements 2025-01-28 16:53:44 +02:00
Oleksandr Honcharov d56c52abf5 lock file 2025-01-28 16:38:10 +02:00
rilaxik f5648abb00 upd (fw): versions bump + configs 2025-01-28 14:37:29 +00:00
rilaxik 47375c0a15 upd (fw): versions bump + configs 2025-01-28 14:35:38 +00:00
rilaxik b55204ee61 upd (cli): repos bump 2025-01-27 01:35:19 +00:00
rilaxik 51f50141ab dx
removed type exports and changed export path to enable symlink while developing
2025-01-26 21:18:36 +00:00
40 changed files with 4231 additions and 8862 deletions
+8
View File
@@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
+13
View File
@@ -0,0 +1,13 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [
["@entityseven/rage-fw-browser","@entityseven/rage-fw-client","@entityseven/rage-fw-server"]
],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
-31
View File
@@ -1,31 +0,0 @@
env:
node: true
es6: true
es2019: true
extends:
- 'eslint:recommended'
- 'plugin:@typescript-eslint/recommended'
# - 'prettier'
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: '2019'
sourceType: 'script'
plugins:
- '@typescript-eslint'
ignorePatterns:
- 'node_modules'
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
"argsIgnorePattern": '^_',
"varsIgnorePattern": '^_',
"caughtErrorsIgnorePattern": '^_'
}
],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'consistent-return': 'warn',
'no-empty': 'off',
}
+1
View File
@@ -2,3 +2,4 @@
node_modules
dist
.nx/cache
+33
View File
@@ -0,0 +1,33 @@
{
"dependencyTypes": ["prod", "peer", "dev"],
"versionGroups": [
{
"label": "Ensure @ragempcommunity/types-* always match",
"packages": ["**"],
"dependencies": ["@ragempcommunity/types-cef","@ragempcommunity/types-client", "@ragempcommunity/types-server"],
"pinVersion": "sameRange",
"range": "^"
},
{
"label": "Use workspace protocol when developing local packages",
"packages": ["**"],
"dependencies": ["@entityseven/rage-fw-shared-types", "@entityseven/rage-fw-rpc"]
"pinVersion": "workspace:*",
"range": ""
},
{
"label": "Ensure @types/node match same version (for tsup)",
"packages": ["**"],
"dependencies": ["@types/node"],
"pinVersion": "sameRange",
"range": ""
},
{
"label": "Ensure newest breaking Typescript version",
"packages": ["**"],
"dependencies": ["typescript"],
"pinVersion": "sameRange",
"range": "^"
}
]
}
+1 -1
View File
@@ -1,4 +1,4 @@
# Custom Attribution-NoDerivs Software License
# Custom Attribution-NoDerives Software License
This license allows you to use, copy, and distribute the RageFW (the "Software"), including for commercial purposes, provided that the following conditions are met:
+1 -1
View File
@@ -1,4 +1,4 @@
Custom Attribution-NoDerivs Software License
Custom Attribution-NoDerives Software License
Copyright (c) 2024 Entity Seven Group
+21 -6
View File
@@ -1,22 +1,37 @@
{
"private": false,
"name": "@entityseven/rage-fw-browser",
"version": "0.2.0",
"main": "dist/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist/**/*",
"readme.md",
"LICENSE"
"LICENSE",
"package.json"
],
"main": "src/index.ts",
"exports": {
".": "./src/index.ts"
},
"publishConfig": {
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": "./dist/index.js"
}
},
"scripts": {
"build": "tsup"
},
"dependencies": {
"@entityseven/rage-fw-rpc": "0.2.5"
"@entityseven/rage-fw-rpc": "workspace:*"
},
"devDependencies": {
"@types/node": "22.12.0"
},
"peerDependencies": {
"@entityseven/rage-fw-shared-types": "0.2.0",
"@ragempcommunity/types-cef": "^2.1.8"
"@entityseven/rage-fw-shared-types": "workspace:*",
"@ragempcommunity/types-cef": "^2.1.8",
"typescript": "^5.7.3"
},
"description": "Package used on a browser-side of your Rage:MP Server",
"keywords": [
-5
View File
@@ -1,11 +1,6 @@
import { Helper } from './helper'
import { rpc } from './rpc'
import type * as T from '../types'
import {
RageFW_BrowserEvent,
RageFW_ClientEvent,
RageFW_ServerEvent,
} from '../types'
/** Browser-side interactions */
export class Browser extends Helper {
+4 -21
View File
@@ -1,25 +1,8 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base",
"exclude": [
"node_modules"
],
"display": "Browser",
"compilerOptions": {
"incremental": false,
"composite": false,
"target": "ES2022",
"experimentalDecorators": 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
}
"types": ["./node_modules/@ragempcommunity/types-cef/index.d.ts", "node"]
},
"extends": ["../tsconfig.ragefw.json"]
}
+2 -2
View File
@@ -1,12 +1,12 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
outDir: './dist',
format: ['cjs'],
noExternal: ['rage-rpc'],
experimentalDts: true,
splitting: false,
bundle: false,
sourcemap: false,
clean: true,
})
+5 -4
View File
@@ -13,7 +13,8 @@
"scripts": {
"watch": "tsc -w",
"build": "tsup",
"start": "npx ./dist create"
"start": "npx ./dist create",
"install": "pnpm install --ignore-workspace"
},
"dependencies": {
"@inquirer/prompts": "^5.0.5",
@@ -22,12 +23,12 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.14.2",
"@types/node": "^22.12.0",
"@types/yargs": "^17.0.32",
"prettier": "^3.3.2",
"typescript": "^5.4.5"
"typescript": "^5.7.3"
},
"description": "CLI to scaffold a preview for Rage-FW",
"description": "CLI to scaffold a preview for Rage FW",
"keywords": ["create-rage-fw","ragefw-cli", "ragefw", "rage-fw", "ragemp", "rage:mp", "rage", "gta5"],
"author": "Entity Seven Group",
"contributors": [
+488
View File
@@ -0,0 +1,488 @@
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
dependencies:
'@inquirer/prompts':
specifier: ^5.0.5
version: 5.5.0
chalk:
specifier: 4.1.2
version: 4.1.2
ky:
specifier: ^1.7.2
version: 1.7.4
yargs:
specifier: ^17.7.2
version: 17.7.2
devDependencies:
'@types/node':
specifier: ^22.12.0
version: 22.12.0
'@types/yargs':
specifier: ^17.0.32
version: 17.0.33
prettier:
specifier: ^3.3.2
version: 3.4.2
typescript:
specifier: ^5.7.3
version: 5.7.3
packages:
'@inquirer/[email protected]':
resolution: {integrity: sha512-sMgdETOfi2dUHT8r7TT1BTKOwNvdDGFDXYWtQ2J69SvlYNntk9I/gJe7r5yvMwwsuKnYbuRs3pNhx4tgNck5aA==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-oOIwPs0Dvq5220Z8lGL/6LHRTEr9TgLHmiI99Rj1PJ1p1czTys+olrgBqZk4E2qC0YTzeHprxSQmoHioVdJ7Lw==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-9KHOpJ+dIL5SZli8lJ6xdaYLPPzB8xB9GZItg39MBybzhxA16vxmszmQFrRwbOA918WA2rvu8xhDEg/p6LXKbw==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-qnJsUcOGCSG1e5DTOErmv2BPQqrtT6uzqn1vI/aYGiPKq+FgslGZmtdnXbhuI7IlT7OByDoEEqdnhUnVR2hhLw==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-XfnpCStx2xgh1LIRqPXrTNEEByqQWoxsWYzNRSEUxJ5c6EQlhMogJ3vHKu8aXuTacebtaZzMAHwEL0kAflKOBw==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-ilUnia/GZUtfSZy3YEErXLJ2Sljo/mf9fiKc08n18DdwdmDbOzRcTv65H1jjDvlsAuvdFXf4Sa/aL7iw/NanVA==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-5otqIpgsPYIshqhgtEwSspBQE40etouR8VIxzpJkv9i0dVHIpyhiivbkH9/dGiMLdyamT54YRdGJLfl8TFnLHg==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-BHDeL0catgHdcHbSFFUddNzvx/imzJMft+tWDPwTm3hfu8/tApk1HrooNngB2Mb4qY+KaRWF+iZqoVUPeslEog==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-zzfNuINhFF7OLAtGHfhwOW2TlYJyli7lOUoJUXw/uyklcwalV6WRXBXtFIicN8rTRK1XTiPWB4UY+YuW8dsnLQ==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-h+/5LSj51dx7hp5xOn4QFnUaKeARwUCLs6mIhtkJ0JYPBLmEYjdHSYh7I6GrLg9LwpJ3xeX0FZgAG1q0QdCpVQ==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-YmDobTItPP3WcEI86GvPo+T2sRHkxxOq/kXmsBjHS5BVXUgvgZ5AfJjkvQvZr03T81NnI3KrrRuMzeuYUQRFOA==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==}
engines: {node: '>=18'}
'@inquirer/[email protected]':
resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==}
engines: {node: '>=18'}
'@types/[email protected]':
resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==}
'@types/[email protected]':
resolution: {integrity: sha512-Fll2FZ1riMjNmlmJOdAyY5pUbkftXslB5DgEzlIuNaiWhXd00FhWxVC/r4yV/4wBb9JfImTu+jiSvXTkJ7F/gA==}
'@types/[email protected]':
resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==}
'@types/[email protected]':
resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==}
'@types/[email protected]':
resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==}
[email protected]:
resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
[email protected]:
resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
[email protected]:
resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==}
engines: {node: '>= 12'}
[email protected]:
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
[email protected]:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
[email protected]:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
[email protected]:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
engines: {node: '>=6'}
[email protected]:
resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==}
engines: {node: '>=4'}
[email protected]:
resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
engines: {node: 6.* || 8.* || >= 10.*}
[email protected]:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
[email protected]:
resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-zYEr/gh7uLW2l4su11bmQ2M9xLgQLjyvx58UyNM/6nuqyWFHPX5ktMjvpev3F8QWdjSsHUpnWew4PBCswBNuMQ==}
engines: {node: '>=18'}
[email protected]:
resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
[email protected]:
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
engines: {node: '>=0.10.0'}
[email protected]:
resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==}
engines: {node: '>=14'}
hasBin: true
[email protected]:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
[email protected]:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
[email protected]:
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
[email protected]:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==}
engines: {node: '>=0.6.0'}
[email protected]:
resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
engines: {node: '>=10'}
[email protected]:
resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==}
engines: {node: '>=14.17'}
hasBin: true
[email protected]:
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
[email protected]:
resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==}
engines: {node: '>=8'}
[email protected]:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
[email protected]:
resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==}
engines: {node: '>=10'}
[email protected]:
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
engines: {node: '>=12'}
[email protected]:
resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==}
engines: {node: '>=18'}
snapshots:
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/figures': 1.0.9
'@inquirer/type': 1.5.5
ansi-escapes: 4.3.2
yoctocolors-cjs: 2.1.2
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
'@inquirer/[email protected]':
dependencies:
'@inquirer/figures': 1.0.9
'@inquirer/type': 2.0.0
'@types/mute-stream': 0.0.4
'@types/node': 22.12.0
'@types/wrap-ansi': 3.0.0
ansi-escapes: 4.3.2
cli-width: 4.1.0
mute-stream: 1.0.0
signal-exit: 4.1.0
strip-ansi: 6.0.1
wrap-ansi: 6.2.0
yoctocolors-cjs: 2.1.2
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
external-editor: 3.1.0
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
yoctocolors-cjs: 2.1.2
'@inquirer/[email protected]': {}
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
ansi-escapes: 4.3.2
'@inquirer/[email protected]':
dependencies:
'@inquirer/checkbox': 2.5.0
'@inquirer/confirm': 3.2.0
'@inquirer/editor': 2.2.0
'@inquirer/expand': 2.3.0
'@inquirer/input': 2.3.0
'@inquirer/number': 1.1.0
'@inquirer/password': 2.2.0
'@inquirer/rawlist': 2.3.0
'@inquirer/search': 1.1.0
'@inquirer/select': 2.5.0
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/type': 1.5.5
yoctocolors-cjs: 2.1.2
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/figures': 1.0.9
'@inquirer/type': 1.5.5
yoctocolors-cjs: 2.1.2
'@inquirer/[email protected]':
dependencies:
'@inquirer/core': 9.2.1
'@inquirer/figures': 1.0.9
'@inquirer/type': 1.5.5
ansi-escapes: 4.3.2
yoctocolors-cjs: 2.1.2
'@inquirer/[email protected]':
dependencies:
mute-stream: 1.0.0
'@inquirer/[email protected]':
dependencies:
mute-stream: 1.0.0
'@types/[email protected]':
dependencies:
'@types/node': 22.12.0
'@types/[email protected]':
dependencies:
undici-types: 6.20.0
'@types/[email protected]': {}
'@types/[email protected]': {}
'@types/[email protected]':
dependencies:
'@types/yargs-parser': 21.0.3
[email protected]:
dependencies:
type-fest: 0.21.3
[email protected]: {}
[email protected]:
dependencies:
color-convert: 2.0.1
[email protected]:
dependencies:
ansi-styles: 4.3.0
supports-color: 7.2.0
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
string-width: 4.2.3
strip-ansi: 6.0.1
wrap-ansi: 7.0.0
[email protected]:
dependencies:
color-name: 1.1.4
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
chardet: 0.7.0
iconv-lite: 0.4.24
tmp: 0.0.33
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
safer-buffer: 2.1.2
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
[email protected]:
dependencies:
ansi-regex: 5.0.1
[email protected]:
dependencies:
has-flag: 4.0.0
[email protected]:
dependencies:
os-tmpdir: 1.0.2
[email protected]: {}
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
ansi-styles: 4.3.0
string-width: 4.2.3
strip-ansi: 6.0.1
[email protected]:
dependencies:
ansi-styles: 4.3.0
string-width: 4.2.3
strip-ansi: 6.0.1
[email protected]: {}
[email protected]: {}
[email protected]:
dependencies:
cliui: 8.0.1
escalade: 3.2.0
get-caller-file: 2.0.5
require-directory: 2.1.1
string-width: 4.2.3
y18n: 5.0.8
yargs-parser: 21.1.1
[email protected]: {}
+20 -13
View File
@@ -3,9 +3,22 @@ import { input, select } from '@inquirer/prompts'
import path from 'node:path'
import { cloneBranch } from '../utils/cloner'
const choices = {
'react-18': {
name: 'React 18',
value: 'react-18',
description: 'React 18 + TypeScript (Vite) as a front-end',
},
'svelte-5': {
name: 'Svelte 5',
value: 'svelte-5',
description: 'Svelte 5 + TypeScript (Vite) as a front-end',
},
} as const
export async function initProject() {
let folder
let framework
let folder: string | undefined
let framework: keyof typeof choices | undefined
if (!folder) {
folder = await input({
@@ -21,23 +34,17 @@ export async function initProject() {
message: c.gray('Select front-end:'),
default: 'react-18',
loop: true,
choices: [
{
name: 'React 18',
value: 'react-18',
description: 'React 18 + TypeScript (Vite) as a front-end',
},
],
choices: Object.values(choices),
})
} else {
console.log(c.gray('Front-end:'), framework)
console.log(c.gray('Front-end:'), choices[framework].name)
}
console.log(
c.gray('\nScaffolding template project into'),
folder,
c.gray('with'),
framework,
choices[framework].name,
c.gray('as a front-end..'),
)
@@ -50,12 +57,12 @@ export async function initProject() {
console.log(c.gray('Scaffolded project into'), folder)
console.log(
c.gray(
`Project was created ar dir: ${path.join(process.cwd(), folder)}`,
`Project was created in: ${path.join(process.cwd(), folder)}`,
),
)
})
.catch(e => {
console.log(c.red('Error occured: \n', e))
console.log(c.red('Error occurred: \n', e))
console.log(c.red('Please open an issue if you see this'))
})
}
+5 -5
View File
@@ -17,8 +17,8 @@ const choices = {
} as const
export async function testRpc() {
let folder
let framework
let folder: string | undefined
let framework: keyof typeof choices | undefined
if (!folder) {
folder = await input({
@@ -37,7 +37,7 @@ export async function testRpc() {
choices: Object.values(choices),
})
} else {
console.log(c.gray('Front-end:'), framework)
console.log(c.gray('Front-end:'), choices[framework].name)
}
console.log(
@@ -45,7 +45,7 @@ export async function testRpc() {
folder,
c.gray('with'),
choices[framework].name,
c.gray('as a frontend..'),
c.gray('as a frontend'),
)
cloneBranch(
@@ -62,7 +62,7 @@ export async function testRpc() {
)
})
.catch(e => {
console.log(c.red('Error occured: \n', e))
console.log(c.red('Error occurred: \n', e))
console.log(c.red('Please open an issue if you see this'))
})
}
+2 -2
View File
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"target": "es6",
"target": "esnext",
"module": "commonjs",
"moduleResolution": "node",
"lib": ["DOM", "ES6"],
"lib": ["DOM", "esnext"],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
+1 -1
View File
@@ -1,4 +1,4 @@
Custom Attribution-NoDerivs Software License
Custom Attribution-NoDerives Software License
Copyright (c) 2024 Entity Seven Group
+31 -7
View File
@@ -1,25 +1,49 @@
{
"private": false,
"name": "@entityseven/rage-fw-client",
"version": "0.2.0",
"main": "dist/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist/**/*",
"readme.md",
"LICENSE"
"LICENSE",
"package.json"
],
"main": "src/index.ts",
"exports": {
".": "./src/index.ts"
},
"publishConfig": {
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": "./dist/index.js"
}
},
"scripts": {
"build": "tsup"
},
"dependencies": {
"@entityseven/rage-fw-rpc": "0.2.5"
"@entityseven/rage-fw-rpc": "workspace:*",
"zod": "^3.24.1"
},
"devDependencies": {
"@types/node": "22.12.0"
},
"peerDependencies": {
"@entityseven/rage-fw-shared-types": "0.2.0",
"@ragempcommunity/types-client": "^2.1.8"
"@entityseven/rage-fw-shared-types": "workspace:*",
"@ragempcommunity/types-client": "^2.1.8",
"typescript": "^5.7.3"
},
"description": "Package used on a client-side of your Rage:MP Server",
"keywords": ["rage-fw-client", "ragefw", "rage-fw", "ragemp", "rage:mp", "rage", "gta5"],
"keywords": [
"rage-fw-client",
"ragefw",
"rage-fw",
"ragemp",
"rage:mp",
"rage",
"gta5"
],
"author": "Entity Seven Group",
"contributors": [
{
+4 -21
View File
@@ -1,25 +1,8 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base",
"exclude": [
"node_modules"
],
"display": "Client",
"compilerOptions": {
"incremental": false,
"composite": false,
"target": "ES2022",
"experimentalDecorators": 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
}
"types": ["./node_modules/@ragempcommunity/types-client/index.d.ts"]
},
"extends": ["../tsconfig.ragefw.json"]
}
+2 -2
View File
@@ -1,12 +1,12 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
outDir: './dist',
format: ['cjs'],
noExternal: ['rage-rpc'],
experimentalDts: true,
splitting: false,
bundle: false,
sourcemap: false,
clean: true,
})
+57
View File
@@ -0,0 +1,57 @@
import globals from 'globals'
import pluginJs from '@eslint/js'
import tseslint from 'typescript-eslint'
import type { Linter } from 'eslint'
export default [
{
ignores: ['**/.*/*', '**/dist/*', '**/node_modules/*', '*.config.*'],
},
pluginJs.configs.recommended,
...(tseslint.configs.recommended as Linter.Config[]),
{
name: 'global',
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'consistent-return': 'off',
'no-empty': 'off',
},
},
{
name: 'browser/rpc',
files: ['browser/src/*.{ts,js}', 'rpc/src/*.{ts,js}'],
languageOptions: {
globals: { ...globals.browser, ...globals.node, ...globals.es2022 },
},
},
{
name: 'cli',
files: ['cli/src/*.{ts,js}'],
languageOptions: {
globals: { ...globals.node, ...globals.es2024 },
ecmaVersion: 2024,
},
},
{
name: 'client/server/shared',
files: [
'client/**/*.{ts,js}',
'server/**/*.{ts,js}',
'shared/**/*.{ts,js}',
],
languageOptions: {
globals: { ...globals.node, ...globals.es2022 },
},
},
] satisfies Linter.Config[]
-5
View File
@@ -1,5 +0,0 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.2.1-0.2.0-alpha.2.0",
"npmClient": "pnpm"
}
+40 -20
View File
@@ -1,29 +1,46 @@
{
"workspaces": [
"*",
"!cli"
],
"scripts": {
"publish": "lerna publish --force-publish",
"build": "lerna run build",
"lint": "eslint --c .eslintrc.yaml --ext .ts client/ server/ shared-types/",
"rebuild:browser": "cd browser && pnpm build",
"rebuild:client": "cd client && pnpm build",
"rebuild:server": "cd server && pnpm build",
"rebuild": "pnpm rebuild:browser && pnpm rebuild:client && pnpm rebuild:server"
"lint": "eslint . --config eslint.config.ts",
"_____build": "echo build",
"build:browser": "cd browser && pnpm build",
"build:client": "cd client && pnpm build",
"build:server": "cd server && pnpm build",
"build:rpc": "cd rpc && pnpm build",
"build": "pnpm build:browser && pnpm build:client && pnpm build:server && pnpm build:rpc",
"_____deps": "echo must be ran before lerna commands",
"deps:check": "syncpack list-mismatches",
"deps:fix": "syncpack fix-mismatches",
"_____publish": "echo publish",
"publish:check": "pnpm run deps:check && pnpm run lint",
"publish:changeset": "pnpm changeset add",
"publish:version": "pnpm changeset version"
},
"dependencies": {
"@microsoft/api-extractor": "^7.47.0",
"@changesets/cli": "^2.27.12",
"@eslint/js": "^9.19.0",
"@microsoft/api-extractor": "^7.49.1",
"@ragempcommunity/types-cef": "^2.1.8",
"@ragempcommunity/types-client": "^2.1.8",
"@ragempcommunity/types-server": "^2.1.8",
"@typescript-eslint/eslint-plugin": "^7.13.0",
"@typescript-eslint/parser": "^7.13.0",
"@types/node": "^22.8.1",
"eslint": "^8.56.0",
"lerna": "^8.1.3",
"prettier": "^3.3.1",
"rage-rpc": "^0.4.0",
"tsup": "^8.1.0",
"typescript": "^5.4.5",
"winston": "^3.13.0"
"eslint": "^9.19.0",
"globals": "^15.14.0",
"jiti": "^2.4.2",
"prettier": "^3.4.2",
"tsup": "^8.3.6",
"typescript": "^5.7.3",
"typescript-eslint": "^8.22.0",
"winston": "^3.17.0"
},
"engines": {
"node": ">=14",
"pnpm": ">=10"
},
"pnpm": {
"requiredScripts": []
},
"private": true,
"type": "module",
@@ -40,5 +57,8 @@
"email": "[email protected]",
"url": "https://github.com/SashaGoncharov19/"
}
]
],
"devDependencies": {
"syncpack": "^13.0.0"
}
}
+1566 -6813
View File
File diff suppressed because it is too large Load Diff
+2 -4
View File
@@ -1,5 +1,3 @@
packages:
- "server"
- "client"
- "browser"
- "shared-types"
- "*"
- "!cli"
+3 -4
View File
@@ -1,4 +1,5 @@
{
"private": false,
"name": "@entityseven/rage-fw-rpc",
"version": "0.2.5",
"main": "dist/index.js",
@@ -13,12 +14,10 @@
"LICENSE"
],
"devDependencies": {
"@microsoft/api-extractor": "^7.47.9",
"prettier": "^3.3.2",
"tsup": "^8.3.0"
"@types/node": "22.12.0"
},
"peerDependencies": {
"typescript": "^5"
"typescript": "^5.7.3"
},
"description": "Rage-FW RPC (Remote procedure caller) for Rage:MP",
"keywords": [
+1 -1
View File
@@ -24,7 +24,7 @@ export class Browser extends Wrapper {
* NOT INTENDED FOR OUT-OF-CONTEXT USE
*/
public _resolveEmitDestination(dataRaw: string) {
let state = Utils.prepareExecution(dataRaw)
const state = Utils.prepareExecution(dataRaw)
switch (state.calledTo) {
case Environment.BROWSER:
+37 -37
View File
@@ -91,7 +91,7 @@ class Rpc extends Wrapper {
*/
public register<
CallbackArguments extends unknown[] = unknown[],
CallbackReturn extends unknown = unknown,
CallbackReturn = unknown,
EventName extends string = string,
>(
eventName: EventName,
@@ -155,7 +155,7 @@ class Rpc extends Wrapper {
public async callClient<
Arguments extends unknown[] = unknown[],
EventName extends string = string,
Return extends unknown = unknown,
Return = unknown,
>(eventName: EventName, args?: Arguments): Promise<Return>
/**
* Calls a client-side event from server or browser
@@ -178,37 +178,28 @@ class Rpc extends Wrapper {
public async callClient<
Arguments extends unknown[] = unknown[],
EventName extends string = string,
Return extends unknown = unknown,
Return = unknown,
>(player: PlayerMp, eventName: EventName, args?: Arguments): Promise<Return>
public async callClient(
playerOrEventName: PlayerMp | string,
eventNameOrArgs?: string | unknown[],
args?: unknown[],
) {
_is1StParamPlayer(playerOrEventName)
? this.log(
if (_is1StParamPlayer(playerOrEventName)) {
this.log(
'callClient',
eventNameOrArgs as string,
playerOrEventName,
eventNameOrArgs,
args,
)
: this.log(
'callClient',
playerOrEventName as string,
eventNameOrArgs,
)
} else {
this.log('callClient', playerOrEventName as string, eventNameOrArgs)
}
if (this.forceBrowserDevMode_) return
Utils.errorUnknownEnvironment(this.environment_)
function _is1StParamPlayer(x: unknown): x is PlayerMp {
return typeof x === 'object'
}
function _is2NdParamEventName(x: unknown): x is string {
return typeof x === 'string'
}
if (this.environment_ === Environment.CLIENT) {
// client
return await this.call(
@@ -260,6 +251,14 @@ class Rpc extends Wrapper {
mp.trigger(Events.LOCAL_EVENT_LISTENER, dataRaw)
return (await this.responseHandler(state.uuid)).data
}
function _is1StParamPlayer(x: unknown): x is PlayerMp {
return typeof x === 'object'
}
function _is2NdParamEventName(x: unknown): x is string {
return typeof x === 'string'
}
}
/**
@@ -282,7 +281,7 @@ class Rpc extends Wrapper {
public async callServer<
Arguments extends unknown[] = unknown[],
EventName extends string = string,
Return extends unknown = unknown,
Return = unknown,
>(eventName: EventName, args?: Arguments): Promise<Return> {
this.log('callServer', eventName, args)
if (this.forceBrowserDevMode_)
@@ -337,7 +336,7 @@ class Rpc extends Wrapper {
public async callBrowser<
Arguments extends unknown[] = unknown[],
EventName extends string = string,
Return extends unknown = unknown,
Return = unknown,
>(eventName: EventName, args?: Arguments): Promise<Return>
/**
* Calls a browser-side event from server or client
@@ -360,37 +359,32 @@ class Rpc extends Wrapper {
public async callBrowser<
Arguments extends unknown[] = unknown[],
EventName extends string = string,
Return extends unknown = unknown,
Return = unknown,
>(player: PlayerMp, eventName: EventName, args?: Arguments): Promise<Return>
public async callBrowser(
playerOrEventName: PlayerMp | string,
eventNameOrArgs?: string | unknown[],
args?: unknown[],
) {
_is1StParamPlayer(playerOrEventName)
? this.log(
if (_is1StParamPlayer(playerOrEventName)) {
this.log(
'DEV callClient',
eventNameOrArgs as string,
playerOrEventName,
eventNameOrArgs,
args,
)
: this.log(
} else {
this.log(
'DEV callClient',
playerOrEventName as string,
eventNameOrArgs,
)
}
if (this.forceBrowserDevMode_) return
Utils.errorUnknownEnvironment(this.environment_)
function _is1StParamPlayer(x: unknown): x is PlayerMp {
return typeof x === 'object'
}
function _is2NdParamEventName(x: unknown): x is string {
return typeof x === 'string'
}
const state: RPCState = {
uuid: Utils.generateUUID(),
eventName: !_is1StParamPlayer(playerOrEventName)
@@ -424,6 +418,14 @@ class Rpc extends Wrapper {
}
return (await this.responseHandler(state.uuid)).data
function _is1StParamPlayer(x: unknown): x is PlayerMp {
return typeof x === 'object'
}
function _is2NdParamEventName(x: unknown): x is string {
return typeof x === 'string'
}
}
/**
@@ -446,14 +448,14 @@ class Rpc extends Wrapper {
public async call<
Arguments extends unknown[] = unknown[],
EventName extends string = string,
Return extends unknown = unknown,
Return = unknown,
>(eventName: EventName, args?: Arguments): Promise<Return> {
this.log('call', eventName, args)
if (this.forceBrowserDevMode_)
return undefined as unknown as Promise<Return>
Utils.errorUnknownEnvironment(this.environment_)
let state: RPCState = {
const state: RPCState = {
uuid: Utils.generateUUID(),
eventName,
calledTo: this.environment_,
@@ -469,9 +471,7 @@ class Rpc extends Wrapper {
/**
* redirects an event in cases of it calling its own environment
*/
private async callSelf<Return extends unknown = unknown>(
state: RPCState,
): Promise<Return> {
private async callSelf<Return = unknown>(state: RPCState): Promise<Return> {
state = this.verifyEvent_(state)
if (state.knownError) {
this.triggerError_(state, state.knownError)
+3 -3
View File
@@ -1,8 +1,8 @@
import { Wrapper } from './wrapper'
import {
type PlayerMp,
Environment,
Events,
type PlayerMp,
RPCEventType,
RPCState,
RpcWrapperConfig,
@@ -20,7 +20,7 @@ export class Server extends Wrapper {
) {
super(options)
if (!!options.forceBrowserDevMode) return
if (options.forceBrowserDevMode) return
// specific event to save player in context as it is not available on server -> server calls
mp.events.add(
@@ -35,7 +35,7 @@ export class Server extends Wrapper {
* NOT INTENDED FOR OUT-OF-CONTEXT USE
*/
public _resolveEmitDestination(player: PlayerMp, dataRaw: string) {
let state = Utils.prepareExecution(dataRaw)
const state = Utils.prepareExecution(dataRaw)
switch (state.calledTo) {
case Environment.SERVER:
+1 -1
View File
@@ -29,7 +29,7 @@ export class Wrapper {
// checks if event is available (registered) in current environment
protected verifyEvent_(data: string | RPCState): RPCState {
let rpcData =
const rpcData =
typeof data === 'string' ? Utils.prepareExecution(data) : data
if (!this.state_[rpcData.eventName]) {
+4 -15
View File
@@ -1,29 +1,18 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "RPC",
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"lib": [
"ES6",
"es2022",
"dom"
],
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": "bin",
"esModuleInterop": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
},
"include": [
"src/**/*",
"./index.d.ts"
],
"exclude": [
"node_modules",
"dist"
]
"extends": ["../tsconfig.ragefw.json"]
}
+1 -1
View File
@@ -1,4 +1,4 @@
Custom Attribution-NoDerivs Software License
Custom Attribution-NoDerives Software License
Copyright (c) 2024 Entity Seven Group
+31 -7
View File
@@ -1,25 +1,49 @@
{
"private": false,
"name": "@entityseven/rage-fw-server",
"version": "0.2.0",
"main": "dist/index.js",
"types": "dist/src/index.d.ts",
"files": [
"dist/**/*",
"readme.md",
"LICENSE"
"LICENSE",
"package.json"
],
"main": "src/index.ts",
"exports": {
".": "./src/index.ts"
},
"publishConfig": {
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": "./dist/index.js"
}
},
"scripts": {
"build": "tsup"
},
"dependencies": {
"@entityseven/rage-fw-rpc": "0.2.5"
"@entityseven/rage-fw-rpc": "workspace:*",
"zod": "^3.24.1"
},
"devDependencies": {
"@types/node": "22.12.0"
},
"peerDependencies": {
"@entityseven/rage-fw-shared-types": "0.2.0",
"@ragempcommunity/types-server": "^2.1.8"
"@entityseven/rage-fw-shared-types": "workspace:*",
"@ragempcommunity/types-server": "^2.1.8",
"typescript": "^5.7.3"
},
"description": "Package used on a server-side of your Rage:MP Server",
"keywords": ["rage-fw-server", "ragefw", "rage-fw", "ragemp", "rage:mp", "rage", "gta5"],
"keywords": [
"rage-fw-server",
"ragefw",
"rage-fw",
"ragemp",
"rage:mp",
"rage",
"gta5"
],
"author": "Entity Seven Group",
"contributors": [
{
+2 -2
View File
@@ -4,8 +4,8 @@ const { timestamp, printf, colorize } = format
/** Used to log in a server console */
export class Logger {
private format = printf(({ message, level, timestamp }) => {
return `[${new Date(timestamp).toLocaleTimeString()}] [${level}]: ${message}`
private format = printf(({ message, level }) => {
return `[${new Date().toLocaleTimeString()}] [${level}]: ${message}`
})
private systemLogger = winston.createLogger({
+4 -21
View File
@@ -1,25 +1,8 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base",
"exclude": [
"node_modules"
],
"display": "Server",
"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
}
"types": ["./node_modules/@ragempcommunity/types-server/index.d.ts"]
},
"extends": ["../tsconfig.ragefw.json"]
}
+2 -2
View File
@@ -1,12 +1,12 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
entry: ['src/**/*.ts'],
outDir: './dist',
format: ['cjs'],
noExternal: ['rage-rpc'],
experimentalDts: true,
splitting: false,
bundle: false,
sourcemap: false,
clean: true,
})
+1 -1
View File
@@ -1,4 +1,4 @@
# Custom Attribution-NoDerivs Software License
# Custom Attribution-NoDerives Software License
This license allows you to use, copy, and distribute the RageFW (the "Software"), including for commercial purposes, provided that the following conditions are met:
+7 -5
View File
@@ -1,12 +1,14 @@
{
"name": "@entityseven/rage-fw-shared-types",
"version": "0.2.0",
"types": "types/types/index.d.ts",
"private": false,
"files": [
"types/**/*",
"readme.md",
"LICENSE"
"LICENSE",
"package.json"
],
"types": "types/types/index.d.ts",
"name": "@entityseven/rage-fw-shared-types",
"version": "0.2.0",
"description": "Package used among all environments of your Rage-FW based server",
"keywords": ["rage-fw-shared-types", "rage-fw-shared","ragefw", "rage-fw", "ragemp", "rage:mp", "rage", "gta5"],
"type": "module",
@@ -23,6 +25,6 @@
"url": "https://github.com/SashaGoncharov19/"
}
],
"license": "Custom-Attribution-NoDerivs",
"license": "Custom-Attribution-NoDerives",
"gitHead": "ffd542c1deddb3033e16e0dae7557313ae09b05f"
}
+2 -2
View File
@@ -1,9 +1,9 @@
{
"compilerOptions": {
"target": "ESNext",
"target": "es2022",
"lib": [
"ESNext",
"ES2019",
"es2022",
"dom"
],
"moduleResolution": "node",
+29
View File
@@ -0,0 +1,29 @@
{
"compilerOptions": {
"incremental": false,
"composite": false,
"target": "es2022",
"moduleDetection": "auto",
"module": "commonjs",
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"declaration": false,
"declarationMap": false,
"downlevelIteration": false,
"inlineSourceMap": false,
"sourceMap": false
},
"exclude": [
"node_modules",
"dist",
".tsup"
]
}