Compare commits
6
Commits
v0.2.4
...
c8e5bdf375
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8e5bdf375 | ||
|
|
a675114b41 | ||
|
|
54781d50b2 | ||
|
|
de33fe4763 | ||
|
|
d3d75b338d | ||
|
|
57d80d41d6 |
+2
-2
@@ -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
@@ -1,4 +1,4 @@
|
||||
import { Rpc } from 'rage-fw-rpc'
|
||||
import { Rpc } from '@entityseven/rage-fw-rpc'
|
||||
|
||||
import type {
|
||||
_CefEventHasArgs,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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,4 +1,4 @@
|
||||
import { Rpc } from 'rage-fw-rpc'
|
||||
import { Rpc } from '@entityseven/rage-fw-rpc'
|
||||
|
||||
import type {
|
||||
RageFW_ClientArgs,
|
||||
|
||||
@@ -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,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,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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"npmClient": "pnpm"
|
||||
}
|
||||
|
||||
+2
-1
@@ -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",
|
||||
|
||||
Generated
+6215
-9209
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,4 @@ packages:
|
||||
- "server"
|
||||
- "client"
|
||||
- "cef"
|
||||
- "rpc"
|
||||
- "cli"
|
||||
- "shared-types"
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@entityseven/rage-fw-rpc",
|
||||
"description": "Rage FW RPC",
|
||||
"version": "0.2.4",
|
||||
"version": "0.2.5",
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"start": "npx ./dist create"
|
||||
@@ -38,5 +38,5 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"gitHead": "74c0215366776f18755c47eaf740518c81245e01"
|
||||
"gitHead": "04eb7240735c4a0e4855ebabbe8d5b326819fa76"
|
||||
}
|
||||
|
||||
+9
-4
@@ -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
@@ -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,4 +1,4 @@
|
||||
import { Rpc } from 'rage-fw-rpc'
|
||||
import { Rpc } from '@entityseven/rage-fw-rpc'
|
||||
|
||||
import type {
|
||||
_CefEventHasArgs,
|
||||
|
||||
@@ -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,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,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
|
||||
|
||||
@@ -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,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": [
|
||||
|
||||
Vendored
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user