Koushik Dutta
0d4a0d2c2c
fix: initialize RpcResult before try block to match Python implementation
...
Previously, if this.serialize() threw an exception, result would be undefined
when passed to createErrorResult. This fix brings TypeScript in sync with the
Python rpc.py implementation which already initializes result before the try block.
2026-04-02 13:33:12 -07:00
Koushik Dutta
24ecc19e99
fix: add ts-ignore for delete operations on required properties
...
zipFile and unzippedPath are set at runtime by cluster worker host.
2026-04-02 13:33:12 -07:00
Koushik Dutta
675b967862
fix: add undefined to buffer state type annotations
...
Buffer state variables can be undefined before initialization.
2026-04-02 13:33:12 -07:00
Koushik Dutta
3882805cfc
fix: add type guard filter for network interfaces
...
Filter undefined values after flat() to prevent runtime errors
when accessing ni.address.
2026-04-02 13:33:12 -07:00
Koushik Dutta
6ac91bc1a3
fix: add undefined to return type and filter
...
inferTypeFromInterfaces can return undefined for empty arrays.
Add type guard filter to remove undefined entries.
2026-04-02 13:33:12 -07:00
Koushik Dutta
b2301a3073
fix: add non-null assertions for process.argv and process.send
...
These values are guaranteed to exist in the plugin main process context.
2026-04-02 13:33:12 -07:00
Koushik Dutta
9cfa6ea58b
fix: refactor serviceKey undefined handling
...
Check serviceKey directly after parsing instead of checking existing?.serviceKey.
This fixes a bug where key parsing failures would be silently ignored.
2026-04-02 13:33:12 -07:00
Koushik Dutta
65199ecdf7
refactor: rename mixins parameter to avoid mutation
...
Rename parameter to mixinsList to avoid mutating the input parameter.
Add non-null assertion for pop result.
2026-04-02 13:33:12 -07:00
Koushik Dutta
64ed95e9aa
fix: add non-null assertions for parentPort access
...
parentPort is guaranteed to exist in worker thread context.
2026-04-02 13:33:12 -07:00
Koushik Dutta
8c5b2f48cc
fix: add definite assignment assertion for cancel variable
...
Add `!` assertion to cancel variable that is assigned in callback.
2026-04-02 13:33:12 -07:00
Koushik Dutta
bc8f1ebc97
refactor: use Object.entries() in createHeadersArray
...
Use Object.entries() spread instead of manual loop for cleaner code.
2026-04-02 13:33:12 -07:00
Koushik Dutta
dd59ac40b6
noImplicitReturns: enabled implicit return checking
...
Fixed all 32 errors by:
- Adding '| undefined' to return type signatures where functions could return undefined
- Changing 'return;' to 'return undefined;' (explicit instead of implicit)
- Adding 'return undefined;' at function ends where needed
Functions updated:
- src/cluster/cluster-setup.ts: getClusterObject, getScryptedClusterMode
- src/fetch/index.ts: getHttpFetchAccept
- src/infer-defaults.ts: inferRoomFromName, getProvidedRoomOrDefault, getDisplayRoom
- src/level.ts: tryGet
- src/plugin/plugin-api.ts: getDeviceById
- src/plugin/plugin-device.ts: findMethod, findMixin
- src/plugin/plugin-host-api.ts: setDeviceProperty
- src/plugin/system.ts: getOwnPropertyDescriptor
- src/rpc.ts: getIteratorNext
- src/runtime.ts: getAccessControlAllowOrigin, getDeviceLogger, getEndpointPluginData, getAccessControls, invalidatePluginDevice, rebuildPluginDeviceMixinTable, installNpm, getPluginHostForDevice, getDevice
- src/scrypted-server-main.ts: getDefaultAuthentication, checkValidUserToken
- src/services/addresses.ts: getLocalAddresses
- src/state.ts: setState
2026-04-02 13:33:09 -07:00
Koushik Dutta
fd0b3a0b8f
noImplicitOverride: enabled override modifier checking
...
Added 'override' keyword to methods that override base class members:
- src/level.ts: override open() methods
- src/plugin/plugin-remote-worker.ts: override setStorage() methods
- src/plugin/runtime/node-fork-worker.ts: override pid getter
- src/plugin/runtime/python-worker.ts: override stdout/stderr getters
- src/rpc.ts: override cause parameter in RPCResultError
- src/runtime.ts: override wss property
- src/state.ts: override listenDevice() method
2026-04-02 13:32:51 -07:00
Koushik Dutta
a64dd8e878
http-fetch: missing file
2026-03-31 09:07:24 -07:00
Koushik Dutta
ef65a413e7
server: fix EventEmitter import
2025-11-16 11:33:40 -08:00
Koushik Dutta
ace1c74ec2
server: prevent invalid media converter from crashing all conversions
2025-11-07 08:08:16 -08:00
Koushik Dutta
e4d62668b7
server/rpc: fixup rpc serializer buffer serialization
2025-09-23 22:45:44 -07:00
Koushik Dutta
22444eb63d
server/webrtc: restructure
2025-08-31 21:51:15 -07:00
Koushik Dutta
9de2b480ff
webrtc: wip connectRPCObject
2025-08-28 11:31:37 -07:00
Koushik Dutta
b9b3a48a08
server: improve plugin connection errors
2025-08-02 11:40:53 -07:00
Koushik Dutta
9c8cbc750a
server: improve plugin connection errors
2025-08-02 11:39:36 -07:00
Koushik Dutta
9c9be9db22
server: improve plugin connection errors
2025-08-02 11:16:59 -07:00
Koushik Dutta
e38c3c975f
server: dead code
2025-07-13 07:57:18 -07:00
Koushik Dutta
86548f6fa4
server: add plugin node_volumes to path
2025-07-10 08:52:31 -07:00
Koushik Dutta
585c638220
server: keepalive needs an explicit non-default duration.
2025-06-09 12:09:26 -07:00
Brett Jia
548086403b
server: bind single address if cluster address is 127.0.0.1 ( #1820 )
2025-05-26 19:41:17 -07:00
Koushik Dutta
8eca02d819
server: move cluster fork timeout to prior to fork
2025-04-19 12:07:07 -07:00
Koushik Dutta
1a25100de2
server: replace mime with mime-type which isnt esmodule
2025-04-19 10:53:30 -07:00
Koushik Dutta
03d159a89c
server: remove debug code
2025-04-18 11:51:00 -07:00
Koushik Dutta
b06ef623b3
server: fix potential socket leak if cluster server is down
2025-04-18 11:49:36 -07:00
Koushik Dutta
453469ed98
server: implement sendStream backpressure handling
2025-04-10 10:52:42 -07:00
Koushik Dutta
c620a4e126
server: ensure sendStream terminates on connection close
2025-04-10 10:47:48 -07:00
Koushik Dutta
35dadaab93
server: enable tcp keepalive for cluster
2025-04-09 09:37:45 -07:00
Koushik Dutta
16fc4407c1
use mime rather than send
2025-04-08 09:00:51 -07:00
Koushik Dutta
809b632417
server: add more cluster logging
2025-04-05 14:07:35 -07:00
Koushik Dutta
9395253b50
server: more express 5.0 fixes
2025-04-04 11:40:04 -07:00
Koushik Dutta
e020ee1517
server: fix breakage caused by path-to-regexp updates
2025-04-04 11:39:03 -07:00
Koushik Dutta
c26c5e94a4
server: fix type error in createRpcIoPeer
2025-04-04 11:38:55 -07:00
Koushik Dutta
21c771d50f
common: deferred dispose
2025-03-18 19:08:34 -07:00
Koushik Dutta
b3b8f6bc70
server: remove eseval
2025-03-12 09:46:28 -07:00
Koushik Dutta
9c2ea7d2bc
server: another attempt at node/esmodule interop with tsc
2025-03-12 09:32:20 -07:00
Koushik Dutta
4e653a9942
Revert "server: fixup es-eval"
...
This reverts commit 51836ca59f .
2025-03-12 09:19:29 -07:00
Koushik Dutta
51836ca59f
server: fixup es-eval
2025-03-12 09:01:12 -07:00
Koushik Dutta
d34afab6a4
server: ensure proper ip type checking
2025-03-09 19:53:36 -07:00
Koushik Dutta
e913131f90
server: log denied address
2025-03-09 10:13:43 -07:00
Koushik Dutta
43fc6c9fc9
server: fix address check
2025-03-09 09:54:48 -07:00
Koushik Dutta
16f4cafea3
server: fix listen sets to listen all and reject on unauthorized address
2025-03-08 23:16:42 -08:00
Koushik Dutta
9e4845b868
server: allow interface name in SCRYPTED_CLUSTER_ADDRESS
2025-03-05 08:34:05 -08:00
Koushik Dutta
efb0a39e52
server: fixup SCRYPTED_SERVER_LISTEN_HOSTNAMES
2025-03-04 19:46:13 -08:00
Koushik Dutta
3f83d4b8f7
server: improve plugin kill race conditions on update
2025-03-03 10:38:18 -08:00