upd (fw):

- fixed import names for client/server
- added "access": "public" field for fw packages
This commit is contained in:
Danya H 2025-01-30 19:52:19 +00:00
parent edafb5289e
commit a820e9896b
6 changed files with 21 additions and 11 deletions

View File

@ -13,6 +13,7 @@
".": "./src/index.ts"
},
"publishConfig": {
"access": "public",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {

View File

@ -13,6 +13,7 @@
".": "./src/index.ts"
},
"publishConfig": {
"access": "public",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {

View File

@ -1,6 +1,6 @@
import { Client, Logger, Player, rpc } from './core'
import { FW_Client, FW_Logger, FW_Player, rpc } from './core'
export type { RageFW_MiddlewareFunction } from './types'
export type { FW_MiddlewareFunction } from './types'
/**
* Package used on a client-side of your Rage:MP Server
@ -9,13 +9,13 @@ export type { RageFW_MiddlewareFunction } from './types'
*/
export const fw = {
/** Client-side interactions */
event: new Client(),
event: new FW_Client(),
/** Handles event manipulations that require player to be present in context */
player: new Player(),
player: new FW_Player(),
/** Handles functions used to interact with the client environment */
system: {
/** Used to log in a client in-game console */
log: new Logger(),
log: new FW_Logger(),
},
/** ``rage-fw-rpc`` instance used under the hood. It is highly recommended to use this one if you need it instead of creating a new instance */
rpc,

View File

@ -3,9 +3,16 @@
"name": "@entityseven/rage-fw-rpc",
"version": "0.2.5",
"main": "src/index.ts",
"exports": {
".": "./src/index.ts"
},
"publishConfig": {
"access": "public",
"main": "dist/index.js",
"types": "dist/index.d.ts"
"types": "dist/index.d.ts",
"exports": {
".": "./dist/index.js"
}
},
"scripts": {
"build": "tsup",

View File

@ -13,6 +13,7 @@
".": "./src/index.ts"
},
"publishConfig": {
"access": "public",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {

View File

@ -1,6 +1,6 @@
import { Logger, Player, Server, rpc } from './core'
import { FW_Logger, FW_Player, FW_Server, rpc } from './core'
export type { RageFW_MiddlewareFunction } from './types'
export type { FW_MiddlewareFunction } from './types'
/**
* Package used on a server-side of your Rage:MP Server
@ -9,13 +9,13 @@ export type { RageFW_MiddlewareFunction } from './types'
*/
export const fw = {
/** Server-side interactions */
event: new Server(),
event: new FW_Server(),
/** Handles event manipulations that require player to be present in context */
player: new Player(),
player: new FW_Player(),
/** Handles functions used to interact with the client environment */
system: {
/** Used to log in a server console */
log: new Logger(),
log: new FW_Logger(),
},
/** ``rage-fw-rpc`` instance used under the hood. It is highly recommended to use this one if you need it instead of creating a new instance */
rpc,