Compare commits

...
3 Commits
Author SHA1 Message Date
rilaxik a675114b41 upd core
- changed local shared types package name
2024-10-28 15:10:00 +00:00
rilaxik 54781d50b2 upd core
- changed local rpc to remote dependency
2024-10-28 15:04:39 +00:00
rilaxik de33fe4763 versions bump 2024-10-28 13:20:51 +00:00
26 changed files with 6257 additions and 9247 deletions
+2 -2
View File
@@ -11,11 +11,11 @@
"build": "tsup"
},
"dependencies": {
"rage-fw-rpc": "workspace:^"
"@entityseven/rage-fw-rpc": "latest"
},
"peerDependencies": {
"@ragempcommunity/types-cef": "^2.1.8",
"rage-fw-shared-types": "workspace:^"
"@entityseven/rage-fw-shared-types": "workspace:^"
},
"description": "RageFW CEF side",
"keywords": [],
+1 -1
View File
@@ -1,4 +1,4 @@
import { Rpc } from 'rage-fw-rpc'
import { Rpc } from '@entityseven/rage-fw-rpc'
import type {
_CefEventHasArgs,
+2 -2
View File
@@ -1,6 +1,6 @@
import { RageFW_ICustomCefEvent } from 'rage-fw-shared-types'
import { RageFW_ICustomCefEvent } from '@entityseven/rage-fw-shared-types'
export { RageFW_ICustomCefEvent } from 'rage-fw-shared-types'
export { RageFW_ICustomCefEvent } from '@entityseven/rage-fw-shared-types'
/**
* Union of all available cef event names
+2 -2
View File
@@ -1,6 +1,6 @@
import type { RageFW_ICustomClientEvent } from 'rage-fw-shared-types'
import type { RageFW_ICustomClientEvent } from '@entityseven/rage-fw-shared-types'
export type { RageFW_ICustomClientEvent } from 'rage-fw-shared-types'
export type { RageFW_ICustomClientEvent } from '@entityseven/rage-fw-shared-types'
/**
* Union of all available client event names
+2 -2
View File
@@ -1,6 +1,6 @@
import type { RageFW_ICustomServerEvent } from 'rage-fw-shared-types'
import type { RageFW_ICustomServerEvent } from '@entityseven/rage-fw-shared-types'
export type { RageFW_ICustomServerEvent } from 'rage-fw-shared-types'
export type { RageFW_ICustomServerEvent } from '@entityseven/rage-fw-shared-types'
/**
* Union of all available server event names
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@entityseven/create-rage-fw",
"version": "0.1.0",
"version": "0.1.1",
"bin": {
"rage-fw": "dist/index.js"
},
+1 -1
View File
@@ -2,7 +2,7 @@
To make you life easier while using RageFW we created a basic CLI. At the moment automation we have only works via [pnpm](https://pnpm.io/)
``pnpm create rage-fw@latest``
``pnpm create @entityseven/rage-fw@latest``
## TL;DR
- ``Initialize new project`` - create new template project
+2 -2
View File
@@ -11,11 +11,11 @@
"build": "tsup"
},
"dependencies": {
"rage-fw-rpc": "workspace:^"
"@entityseven/rage-fw-rpc": "latest"
},
"peerDependencies": {
"@ragempcommunity/types-client": "^2.1.8",
"rage-fw-shared-types": "workspace:^"
"@entityseven/rage-fw-shared-types": "workspace:^"
},
"description": "RageFW Client side",
"keywords": [],
+1 -1
View File
@@ -1,4 +1,4 @@
import { Rpc } from 'rage-fw-rpc'
import { Rpc } from '@entityseven/rage-fw-rpc'
import type {
RageFW_ClientArgs,
+2 -2
View File
@@ -1,5 +1,5 @@
import { Rpc } from 'rage-fw-rpc'
import type { RageFW_ICustomClientEvent } from 'rage-fw-shared-types'
import { Rpc } from '@entityseven/rage-fw-rpc'
import type { RageFW_ICustomClientEvent } from '@entityseven/rage-fw-shared-types'
import {
_CefEventHasArgs,
+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference types="@ragempcommunity/types-client" />
import type { RageFW_ICustomCefEvent } from 'rage-fw-shared-types'
import type { RageFW_ICustomCefEvent } from '@entityseven/rage-fw-shared-types'
export type RageFW_CefEvent = keyof RageFW_ICustomCefEvent
+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference types="@ragempcommunity/types-client" />
import type { RageFW_ICustomClientEvent } from 'rage-fw-shared-types'
import type { RageFW_ICustomClientEvent } from '@entityseven/rage-fw-shared-types'
/**
* Union of all available client event names
+1 -1
View File
@@ -3,7 +3,7 @@
import type {
RageFW_ICustomClientEvent,
RageFW_ICustomServerEvent,
} from 'rage-fw-shared-types'
} from '@entityseven/rage-fw-shared-types'
/**
* Union of all available server event names callable from client
+2 -1
View File
@@ -1,7 +1,7 @@
{
"private": true,
"scripts": {
"publish": "pnpm build && lerna publish --force-publish",
"publish": "lerna publish --force-publish",
"build": "lerna run build",
"lint": "eslint --c .eslintrc.yaml --ext .ts client/ server/ shared-types/",
@@ -17,6 +17,7 @@
"@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",
+1329 -4323
View File
File diff suppressed because it is too large Load Diff
-2
View File
@@ -2,6 +2,4 @@ packages:
- "server"
- "client"
- "cef"
- "rpc"
- "cli"
- "shared-types"
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "rage-fw-rpc",
"name": "@entityseven/rage-fw-rpc",
"description": "Rage FW RPC",
"version": "0.2.5",
"scripts": {
+9 -4
View File
@@ -14,12 +14,17 @@ yarn add rage-fw-rpc
Import installed package and initialize rpc:
```ts
// lib/rpc.js
// lib/rpc.js
import { Rpc } from 'rage-fw-rpc'
export const rpc = new Rpc(/* options */)
import { Rpc } from 'rage-fw-rpc'
export const rpc = new Rpc(/* options */)
```
# Motivation
The idea was to create an extensible package, with various features to simplify the development process and provide as much comfort as possible. It should also be using similar architecture as the framework it was specially built for
Inspired by usage of [rage-rpc](https://github.com/micaww/rage-rpc)
# Features
- Type-safe events via [TS generics](https://www.typescriptlang.org/docs/handbook/2/generics.html), avoiding type wrappers
- Built-in logging options for each environment
@@ -28,7 +33,7 @@ Import installed package and initialize rpc:
- Actual human-readable errors
# Docs
*Extended version with details coming soon*
## [Extended version available here](https://git.entityseven.com/entityseven/rage-framework/wiki/RPC%400.2.5)
## register
Registers a callback function for a specified event
+2 -2
View File
@@ -11,11 +11,11 @@
"build": "tsup"
},
"dependencies": {
"rage-fw-rpc": "workspace:^"
"@entityseven/rage-fw-rpc": "latest"
},
"peerDependencies": {
"@ragempcommunity/types-server": "^2.1.8",
"rage-fw-shared-types": "workspace:^"
"@entityseven/rage-fw-shared-types": "workspace:^"
},
"description": "RageFW Server side",
"keywords": [],
+1 -1
View File
@@ -1,4 +1,4 @@
import { Rpc } from 'rage-fw-rpc'
import { Rpc } from '@entityseven/rage-fw-rpc'
import type {
_CefEventHasArgs,
+2 -2
View File
@@ -1,5 +1,5 @@
import { Rpc } from 'rage-fw-rpc'
import { RageFW_ICustomServerEvent } from 'rage-fw-shared-types'
import { Rpc } from '@entityseven/rage-fw-rpc'
import { RageFW_ICustomServerEvent } from '@entityseven/rage-fw-shared-types'
import { nativeEvents } from '../native.events'
import type {
+1 -1
View File
@@ -1,4 +1,4 @@
import type { RageFW_ICustomCefEvent } from 'rage-fw-shared-types'
import type { RageFW_ICustomCefEvent } from '@entityseven/rage-fw-shared-types'
export type RageFW_CefEvent = keyof RageFW_ICustomCefEvent
+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference types="@ragempcommunity/types-server" />
import type { RageFW_ICustomClientEvent } from 'rage-fw-shared-types'
import type { RageFW_ICustomClientEvent } from '@entityseven/rage-fw-shared-types'
/**
* Union of all available client event names
+2 -2
View File
@@ -3,8 +3,8 @@
import type {
RageFW_ICustomClientEvent,
RageFW_ICustomServerEvent,
} from 'rage-fw-shared-types'
export type { RageFW_ICustomServerEvent } from 'rage-fw-shared-types'
} from '@entityseven/rage-fw-shared-types'
export type { RageFW_ICustomServerEvent } from '@entityseven/rage-fw-shared-types'
/**
* Union of all available server event names
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "rage-fw-shared-types",
"name": "@entityseven/rage-fw-shared-types",
"version": "0.1.0",
"types": "types/types/index.d.ts",
"files": [
+1 -1
View File
@@ -1,4 +1,4 @@
declare module 'rage-fw-shared-types' {
declare module '@entityseven/rage-fw-shared-types' {
export interface RageFW_ICustomServerEvent {}
export interface RageFW_ICustomClientEvent {