Skip to content

Commit 2de0ecb

Browse files
authored
Merge pull request #49 from newcore-network/v1
V1
2 parents 4de6d07 + 91154b5 commit 2de0ecb

97 files changed

Lines changed: 2544 additions & 1419 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323

2424
- name: Setup pnpm
2525
uses: pnpm/action-setup@v4.2.0
26-
with:
27-
version: 10.13.1
2826

2927
- name: Setup Node
3028
uses: actions/setup-node@v4

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.husky/pre-push

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm typecheck && pnpm test

RELEASE.md

Lines changed: 17 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,22 @@
1-
## OpenCore Framework v1.0.5-beta.2
1+
## OpenCore Framework v1.0.5
22

3-
### Highlights
4-
- Added an explicit server adapter API for platform-specific runtimes.
5-
- Player creation and remote hydration now support adapter-owned subclasses while preserving the public `Player` type.
6-
- Added an explicit client adapter API and removed the built-in `ClientPlayer` singleton.
7-
- Added client UI bridges for markers, blips, and notifications.
8-
- Added lifecycle services for NPC and Vehicle management.
9-
- Improved Player management with spawn, teleport, and respawn actions.
3+
### Added
4+
- Added new client adapter ports for camera, ped, vehicle, progress, spawn, local player, runtime bridge, and WebView integration, with matching node runtime implementations.
5+
- Added support for WebView chat mode, richer client UI/runtime abstractions, and cleaner adapter-facing contracts/exports.
6+
- Added server-side improvements for command handling, including command validation, default function parameter support, and standardized system event names.
7+
- Added more coverage around parallel compute, vehicle modification, vehicle sync state, player state sync, adapters, and command execution flows.
8+
- Added Husky pre-commit and pre-push hooks for local quality checks.
109

11-
### New Features
12-
- `Server.init()` now accepts `adapter` to install a single server adapter during bootstrap.
13-
- Added public server adapter helpers in `@open-core/framework/server` for custom adapter packages.
14-
- Added adapter-aware Player serialization hooks for CORE/RESOURCE flows.
15-
- `Client.init()` now accepts `adapter` to install a single client adapter during bootstrap.
16-
- Added client runtime bridge contracts so event processors, WebView callbacks, key mappings, and ticks no longer depend directly on CFX globals.
17-
- Added client UI bridges for markers, blips, and notifications.
18-
- Added lifecycle services and contracts for NPC and Vehicle management.
19-
- Added `ISpawnActions` interface and implementation for managing player spawn, teleport, and respawn actions.
20-
- Added `ClientLoggerBridge` to abstract client-side logging from direct console calls.
21-
- Added `playerCommand` runtime event.
22-
- Added RedM-specific ped appearance adapter and client services for RDR3 profile appearance logic.
23-
- Added runtime platform and game profile detection with duplicate DI registration prevention.
24-
- Added `useAdapter()` function to pre-set the client adapter before initialization.
25-
- Added project-level adapter injection and runtime hints for server and client adapters.
26-
- Added WebView abstraction for client UI interactions.
27-
- Renamed routing bucket methods to dimension.
28-
- Added dedicated client and server contract files with updated exports and package entry points.
10+
### Changed
11+
- Refactored client services to rely on explicit adapter ports instead of direct runtime assumptions, especially for camera, ped, progress, spawn, and vehicle flows.
12+
- Refactored logging so logger writes use string log levels and runtime log domain labels are derived dynamically from the active resource.
13+
- Refactored worker execution to use inline worker scripts with performance tracking in the parallel compute pipeline.
14+
- Updated package/tooling setup to TypeScript 6 and refreshed package exports, scripts, and dependency configuration.
2915

30-
### Breaking Changes
31-
- Server bootstrap now defaults to the built-in Node adapter when no explicit runtime adapter is provided.
32-
- Platform-specific Player APIs should move into adapter packages through Player subclassing/module augmentation.
33-
- `ClientPlayer` is no longer exported from `@open-core/framework/client`.
34-
- Client bootstrap no longer uses `register-client-capabilities`; external adapters should be installed through `Client.init({ adapter })`.
35-
- `WebViewBridge` is now the preferred embedded UI abstraction; `OnView` now represents WebView callbacks directly, while `NuiBridge` and `NUI` remain as deprecated compatibility aliases.
36-
37-
### Bug Fixes
38-
- Fixed lint issues and removed unused variables.
39-
- Fixed exportation issues.
40-
- Added tests for lint and unused variable fixes.
16+
### Fixed
17+
- Fixed command schema handling so exported/remote commands support default parameters more reliably.
18+
- Fixed transport/event contract alignment across node events and RPC layers.
19+
- Fixed several test, lint, and export consistency issues while expanding automated coverage.
4120

4221
### Notes
43-
- Migration path for external adapters:
44-
1. Create an adapter with `defineServerAdapter({ name, register(ctx) { ... } })`.
45-
2. Register platform contracts inside `register(ctx)` with `bindSingleton`, `bindInstance`, or `bindMessagingTransport`.
46-
3. If you extend `Player`, provide `ctx.usePlayerAdapter({ createLocal, createRemote, serialize, hydrate })`.
47-
4. Pass the adapter to `Server.init({ mode, adapter })` in both CORE and RESOURCE resources.
48-
- RESOURCE hydration now validates adapter identity before rebuilding remote `Player` instances.
49-
- Client adapter migration path:
50-
1. Create an adapter with `defineClientAdapter({ name, register(ctx) { ... } })`.
51-
2. Register transport, appearance, hashing, and runtime bridge contracts inside `register(ctx)`.
52-
3. Pass the adapter to `Client.init({ mode, adapter })`.
53-
- Client files now safe to remove from core once moved to external adapter packages:
54-
- `src/adapters/register-client-capabilities.ts`
55-
- `src/adapters/fivem/fivem-ped-appearance-client.ts`
56-
- `src/adapters/redm/redm-ped-appearance-client.ts`
57-
- `src/adapters/node/node-ped-appearance-client.ts`
58-
- Any remaining client-only transport/runtime bindings that your external adapter reimplements.
22+
- This release covers the full `master...v1` delta and keeps the release notes compact by grouping related adapter/runtime refactors instead of listing each port separately.

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
33
"root": true,
44

55
"files": {

package.json

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@open-core/framework",
3-
"version": "1.0.5-beta.2",
3+
"version": "1.0.5",
44
"description": "Secure, event-driven TypeScript Framework & Runtime engine for CitizenFX (Cfx).",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -75,20 +75,23 @@
7575
"bench": "npx tsx benchmark/index.ts",
7676
"bench:core": "npx tsx benchmark/index.ts --core",
7777
"bench:load": "npx vitest run --project benchmark",
78-
"bench:all": "npx tsx benchmark/index.ts --all"
78+
"bench:all": "npx tsx benchmark/index.ts --all",
79+
"validate": "pnpm check && pnpm typecheck && pnpm test",
80+
"lint-staged": "lint-staged",
81+
"prepare": "husky"
7982
},
8083
"keywords": [
8184
"framework",
8285
"opencore",
83-
"cfx",
86+
"ragemp",
8487
"citizenfx",
8588
"redm",
8689
"typescript",
8790
"roleplay"
8891
],
8992
"author": "OpenCore Team",
9093
"license": "MPL-2.0",
91-
"packageManager": "pnpm@10.13.1",
94+
"packageManager": "pnpm@10.33.0",
9295
"peerDependencies": {
9396
"reflect-metadata": "^0.2.2",
9497
"tsyringe": "^4.10.0",
@@ -98,16 +101,23 @@
98101
"uuid": "^13.0.0"
99102
},
100103
"devDependencies": {
101-
"@biomejs/biome": "^2.3.11",
102-
"@types/node": "^25.0.3",
103-
"@vitest/coverage-v8": "^4.0.16",
104-
"dependency-cruiser": "^17.3.6",
104+
"@biomejs/biome": "^2.4.8",
105+
"@types/node": "^25.5.0",
106+
"@vitest/coverage-v8": "^4.1.1",
107+
"dependency-cruiser": "^17.3.9",
105108
"eslint-config-prettier": "^10.1.8",
106109
"eslint-plugin-import": "^2.32.0",
107110
"graphviz": "^0.0.9",
108-
"tinybench": "^2.9.0",
111+
"husky": "^9.1.7",
112+
"lint-staged": "^16.2.6",
113+
"tinybench": "^6.0.0",
109114
"tsx": "^4.21.0",
110-
"typescript": "^5.9.3",
111-
"vitest": "^4.0.16"
115+
"typescript": "^6.0.2",
116+
"vitest": "^4.1.1"
117+
},
118+
"lint-staged": {
119+
"*.{js,cjs,mjs,ts,tsx,json,md}": [
120+
"biome check --write --no-errors-on-unmatched"
121+
]
112122
}
113123
}

0 commit comments

Comments
 (0)