From a820e9896bd6aadedb9348c4f79c919607346b78 Mon Sep 17 00:00:00 2001 From: Danya H Date: Thu, 30 Jan 2025 19:52:19 +0000 Subject: [PATCH] upd (fw): - fixed import names for client/server - added "access": "public" field for fw packages --- browser/package.json | 1 + client/package.json | 1 + client/src/index.ts | 10 +++++----- rpc/package.json | 9 ++++++++- server/package.json | 1 + server/src/index.ts | 10 +++++----- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/browser/package.json b/browser/package.json index 43d5d02..674a62d 100644 --- a/browser/package.json +++ b/browser/package.json @@ -13,6 +13,7 @@ ".": "./src/index.ts" }, "publishConfig": { + "access": "public", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { diff --git a/client/package.json b/client/package.json index ff70332..2fc0985 100644 --- a/client/package.json +++ b/client/package.json @@ -13,6 +13,7 @@ ".": "./src/index.ts" }, "publishConfig": { + "access": "public", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { diff --git a/client/src/index.ts b/client/src/index.ts index 4a21240..7d8d527 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -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, diff --git a/rpc/package.json b/rpc/package.json index 5a3edcd..0859ba2 100644 --- a/rpc/package.json +++ b/rpc/package.json @@ -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", diff --git a/server/package.json b/server/package.json index 1163b25..2342b7d 100644 --- a/server/package.json +++ b/server/package.json @@ -13,6 +13,7 @@ ".": "./src/index.ts" }, "publishConfig": { + "access": "public", "main": "dist/index.js", "types": "dist/index.d.ts", "exports": { diff --git a/server/src/index.ts b/server/src/index.ts index e52728c..5f1ac46 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -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,