procxy 0.1.0-alpha.1 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/README.md +502 -184
- package/dist/child/agent.d.ts +1 -1
- package/dist/child/agent.d.ts.map +1 -1
- package/dist/child/agent.js +44 -6
- package/dist/child/agent.js.map +1 -1
- package/dist/child/child-proxy.d.ts +3 -1
- package/dist/child/child-proxy.d.ts.map +1 -1
- package/dist/child/child-proxy.js +21 -9
- package/dist/child/child-proxy.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/parent/ipc-client.d.ts +1 -0
- package/dist/parent/ipc-client.d.ts.map +1 -1
- package/dist/parent/ipc-client.js +55 -0
- package/dist/parent/ipc-client.js.map +1 -1
- package/dist/parent/parent-proxy.d.ts +1 -1
- package/dist/parent/parent-proxy.d.ts.map +1 -1
- package/dist/parent/parent-proxy.js +3 -0
- package/dist/parent/parent-proxy.js.map +1 -1
- package/dist/parent/procxy.d.ts +2 -2
- package/dist/parent/procxy.d.ts.map +1 -1
- package/dist/parent/procxy.js +45 -12
- package/dist/parent/procxy.js.map +1 -1
- package/dist/shared/protocol.d.ts +15 -2
- package/dist/shared/protocol.d.ts.map +1 -1
- package/dist/shared/serialization.d.ts +6 -0
- package/dist/shared/serialization.d.ts.map +1 -1
- package/dist/shared/serialization.js +101 -1
- package/dist/shared/serialization.js.map +1 -1
- package/dist/types/options.d.ts +9 -2
- package/dist/types/options.d.ts.map +1 -1
- package/dist/types/procxy.d.ts +36 -28
- package/dist/types/procxy.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- added support for passing sockets
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.2
|
|
10
|
+
|
|
11
|
+
- **Advanced Serialization Support (V8 Structured Clone)**
|
|
12
|
+
|
|
13
|
+
- Support for `BigInt`, `ArrayBuffer`, `TypedArray`, `DataView`, `Date`, `Map`, `Set`, `Error` objects
|
|
14
|
+
- Nested structure support with recursive serialization/deserialization
|
|
15
|
+
- Configurable via `serialization: 'advanced'` option with `as const` for type inference
|
|
16
|
+
|
|
17
|
+
- **Handle Passing Support (IPC File Descriptors)**
|
|
18
|
+
|
|
19
|
+
- Type-safe handle passing with conditional `$sendHandle()` method
|
|
20
|
+
- Only available when `supportHandles: true` option is explicitly set
|
|
21
|
+
- Used for passing TCP sockets, UDP sockets, server handles, or other OS-level descriptors
|
|
22
|
+
- Implemented via `child.send()` with third parameter in Node.js IPC protocol
|
|
23
|
+
|
|
24
|
+
- **Generic Type Improvements**
|
|
25
|
+
|
|
26
|
+
- Added `SupportHandles` generic parameter to `Procxy<T, Mode, SupportHandles>` type
|
|
27
|
+
- Conditional `$sendHandle()` method visibility based on `SupportHandles` generic
|
|
28
|
+
- Added `SupportHandles` generic parameter to `ProcxyOptions<Mode, SupportHandles>`
|
|
29
|
+
- Improved type inference with proper literal type handling via `as const`
|
|
30
|
+
|
|
31
|
+
- **Documentation & Examples**
|
|
32
|
+
- 5 comprehensive examples for advanced serialization and handle passing
|
|
33
|
+
- Buffer processing with BigInt calculations
|
|
34
|
+
- Error preservation across process boundaries
|
|
35
|
+
- Socket transfer using handle passing
|
|
36
|
+
- Collection processing with Map/Set support
|
|
37
|
+
|
|
3
38
|
All notable changes to this project will be documented in this file.
|
|
4
39
|
|
|
5
40
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
@@ -10,23 +45,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
10
45
|
### Added
|
|
11
46
|
|
|
12
47
|
- **Core Features**
|
|
48
|
+
|
|
13
49
|
- Process-based proxying for TypeScript/JavaScript classes
|
|
14
50
|
- Type-safe method invocation with full IntelliSense support
|
|
15
51
|
- Transparent IPC communication between parent and child processes
|
|
16
52
|
- Constructor arguments support for remote class instantiation
|
|
17
53
|
|
|
18
54
|
- **EventEmitter Support**
|
|
55
|
+
|
|
19
56
|
- Automatic event forwarding from child to parent process
|
|
20
57
|
- Full EventEmitter API compatibility
|
|
21
58
|
- Support for custom events and event listeners
|
|
22
59
|
|
|
23
60
|
- **Lifecycle Management**
|
|
61
|
+
|
|
24
62
|
- Manual termination via `$terminate()` method
|
|
25
63
|
- Automatic cleanup with ES2024 disposables (`using`/`await using`)
|
|
26
64
|
- Graceful process termination and resource cleanup
|
|
27
65
|
- Access to underlying child process via `$process` property
|
|
28
66
|
|
|
29
67
|
- **Configuration Options**
|
|
68
|
+
|
|
30
69
|
- Configurable timeouts per method call
|
|
31
70
|
- Automatic retry logic for failed operations
|
|
32
71
|
- Custom environment variables for child processes
|
|
@@ -34,6 +73,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
34
73
|
- Command line arguments support
|
|
35
74
|
|
|
36
75
|
- **Error Handling**
|
|
76
|
+
|
|
37
77
|
- Complete error propagation from child to parent
|
|
38
78
|
- Stack trace preservation across process boundaries
|
|
39
79
|
- Specialized error types:
|
|
@@ -44,18 +84,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
44
84
|
- `OptionsValidationError` for invalid configuration
|
|
45
85
|
|
|
46
86
|
- **Type Safety**
|
|
87
|
+
|
|
47
88
|
- Advanced mapped types with `Procxy<T>`
|
|
48
89
|
- Automatic filtering of non-serializable methods
|
|
49
90
|
- Support for optional parameters
|
|
50
91
|
- Full TypeScript 5.0+ compatibility
|
|
51
92
|
|
|
52
93
|
- **Performance**
|
|
94
|
+
|
|
53
95
|
- Method call overhead <10ms (average 0.04-0.06ms)
|
|
54
96
|
- No memory leaks after 1000+ sequential calls
|
|
55
97
|
- Efficient IPC message handling
|
|
56
98
|
- Minimal bundle size (~26KB unminified, ~6KB gzipped)
|
|
57
99
|
|
|
58
100
|
- **Documentation**
|
|
101
|
+
|
|
59
102
|
- Comprehensive README with examples
|
|
60
103
|
- API documentation via TypeDoc
|
|
61
104
|
- 4 detailed example files:
|
|
@@ -115,6 +158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
115
158
|
---
|
|
116
159
|
|
|
117
160
|
**Legend**:
|
|
161
|
+
|
|
118
162
|
- `Added` for new features
|
|
119
163
|
- `Changed` for changes in existing functionality
|
|
120
164
|
- `Deprecated` for soon-to-be removed features
|