|
1 | | -## OpenCore Framework v0.3.1 |
| 1 | +## OpenCore Framework v0.3.2 |
2 | 2 |
|
3 | 3 | --- |
4 | 4 |
|
5 | 5 | ### Highlights |
6 | 6 |
|
7 | | -- **Hot-Reload Stability**: Fixed critical race condition that caused resources to hang during hot-reload |
8 | | -- **Command System Reliability**: Improved command registration and execution flow with better error handling (Now Array types means spreed operator in commands and netEvents parameters handler, string[] === rest of the arguments, and supporting spreed operator as string[]) |
9 | | -- **Bidirectional Core Detection**: Enhanced core ready detection mechanism for late-starting resources |
| 7 | +- **Command Parameter Intelligence**: The framework now correctly differentiates between TypeScript's spread operator (`...args: string[]`) and direct array parameters (`args: string[]`). |
| 8 | +- **Improved Reflection**: Added source-code analysis to overcome TypeScript's reflection limitations (`design:paramtypes` ambiguity). |
10 | 9 |
|
11 | 10 | --- |
12 | 11 |
|
13 | | -### Changes |
| 12 | +### Fixes |
14 | 13 |
|
15 | | -- **Core Initialization** |
16 | | - - Added bidirectional ready detection with `core:request-ready` event for hot-reload scenarios |
17 | | - - Reordered core dependency detection to register event listener before requesting status |
18 | | - - Removed artificial delay in `ReadyController`, set `isReady=true` immediately |
| 14 | +- **Spread Operator Handling**: Fixed an issue where using `...args` would sometimes result in arguments being joined by commas or passed incorrectly. |
| 15 | +- **Array Parameter Support**: Resolved "join is not a function" errors when using `args: string[]` by ensuring the full array is passed as a single argument. |
| 16 | +- **Argument Consistency**: Ensured that single-word and multi-word inputs are handled consistently across both `Command` and `OnNet` (NetEvents) systems. |
19 | 17 |
|
20 | | -- **Command System** |
21 | | - - Allow command re-registration from same resource during hot-reload |
22 | | - - Fixed tuple schema validation to properly handle rest array parameters |
23 | | - - Added comprehensive debug logging for command registration and execution flow |
24 | | - - Enhanced error handling in remote command service |
| 18 | +--- |
| 19 | + |
| 20 | +### Internal Changes |
| 21 | + |
| 22 | +- Added `getSpreadParameterIndices` to `function-helper.ts` for runtime parameter inspection. |
| 23 | +- Updated `CommandMetadata` to track `hasSpreadParam`. |
| 24 | +- Refined `validateAndExecuteCommand` to implement conditional argument flattening. |
25 | 25 |
|
26 | 26 | --- |
27 | 27 |
|
28 | 28 | ### Notes |
29 | 29 |
|
30 | | -This release focuses on improving the developer experience during hot-reload scenarios. Resources that are restarted or hot-reloaded will now properly detect the Core's ready state without hanging, and commands will continue to function correctly after resource restarts. |
| 30 | +This release ensures that the framework respects the intended TypeScript parameter types, providing a more intuitive and reliable experience for building complex command handlers and event listeners. |
0 commit comments