camstreamerlib 4.0.0-beta.3 → 4.0.0-beta.31
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/README.md +8 -2
- package/cjs/CamOverlayAPI.d.ts +48 -26
- package/cjs/CamOverlayAPI.js +171 -88
- package/cjs/CamOverlayDrawingAPI.d.ts +2 -47
- package/cjs/CamOverlayDrawingAPI.js +6 -3
- package/cjs/CamOverlayPainter/Frame.d.ts +8 -37
- package/cjs/CamOverlayPainter/Frame.js +33 -0
- package/cjs/CamOverlayPainter/Painter.d.ts +16 -10
- package/cjs/CamOverlayPainter/Painter.js +6 -5
- package/cjs/CamOverlayPainter/ResourceManager.d.ts +3 -2
- package/cjs/CamOverlayPainter/ResourceManager.js +8 -11
- package/cjs/CamScripterAPI.d.ts +34 -16
- package/cjs/CamScripterAPI.js +50 -41
- package/cjs/CamScripterAPICameraEventsGenerator.d.ts +1 -1
- package/cjs/CamScripterAPICameraEventsGenerator.js +6 -3
- package/cjs/CamStreamerAPI.d.ts +17 -14
- package/cjs/CamStreamerAPI.js +32 -32
- package/cjs/CamSwitcherAPI.d.ts +43 -37
- package/cjs/CamSwitcherAPI.js +123 -114
- package/cjs/CamSwitcherEvents.d.ts +1 -1
- package/cjs/PlaneTrackerAPI.d.ts +43 -0
- package/cjs/PlaneTrackerAPI.js +211 -0
- package/cjs/VapixAPI.d.ts +56 -42
- package/cjs/VapixAPI.js +305 -216
- package/cjs/VapixEvents.d.ts +1 -1
- package/cjs/VapixEvents.js +3 -3
- package/cjs/errors/errors.d.ts +3 -0
- package/cjs/errors/errors.js +8 -1
- package/cjs/events/AxisCameraStationEvents.d.ts +7 -4
- package/cjs/events/AxisCameraStationEvents.js +23 -18
- package/cjs/events/GenetecAgent.d.ts +6 -3
- package/cjs/events/GenetecAgent.js +30 -19
- package/cjs/index.d.ts +14 -1
- package/cjs/index.js +23 -2
- package/cjs/internal/Digest.js +6 -6
- package/cjs/internal/ProxyClient.d.ts +8 -9
- package/cjs/internal/ProxyClient.js +25 -29
- package/cjs/internal/types.d.ts +42 -0
- package/cjs/internal/types.js +2 -0
- package/cjs/internal/utils.d.ts +4 -1
- package/cjs/internal/utils.js +22 -3
- package/cjs/internal/versionCompare.d.ts +2 -2
- package/cjs/node/DefaultClient.d.ts +5 -6
- package/cjs/node/DefaultClient.js +12 -14
- package/cjs/node/HttpRequestSender.d.ts +1 -0
- package/cjs/node/HttpRequestSender.js +13 -3
- package/cjs/node/HttpServer.js +1 -1
- package/cjs/node/WsClient.d.ts +2 -1
- package/cjs/node/index.d.ts +2 -0
- package/cjs/node/index.js +18 -1
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +3071 -0
- package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +127 -0
- package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +114 -0
- package/cjs/types/CamOverlayAPI/accuweatherSchema.js +50 -0
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +783 -0
- package/cjs/types/CamOverlayAPI/customGraphicsSchema.js +75 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +122 -0
- package/cjs/types/CamOverlayAPI/imagesSchema.js +12 -0
- package/cjs/types/CamOverlayAPI/index.d.ts +9 -0
- package/cjs/types/CamOverlayAPI/index.js +25 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +130 -0
- package/cjs/types/CamOverlayAPI/infotickerSchema.js +29 -0
- package/cjs/types/CamOverlayAPI/pipSchema.d.ts +166 -0
- package/cjs/types/CamOverlayAPI/pipSchema.js +42 -0
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +126 -0
- package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +28 -0
- package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +146 -0
- package/cjs/types/CamOverlayAPI/ptzSchema.js +15 -0
- package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +79 -0
- package/cjs/types/CamOverlayAPI/screenSharingSchema.js +11 -0
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +79 -0
- package/cjs/types/CamOverlayAPI/webCameraSharingSchema.js +11 -0
- package/cjs/types/CamOverlayDrawingAPI.d.ts +58 -0
- package/cjs/types/CamOverlayDrawingAPI.js +2 -0
- package/cjs/types/CamOverlayPainter.d.ts +74 -0
- package/cjs/types/CamOverlayPainter.js +2 -0
- package/cjs/types/CamScripterAPI.d.ts +82 -17
- package/cjs/types/CamScripterAPI.js +22 -7
- package/cjs/types/CamStreamerAPI.d.ts +16 -5
- package/cjs/types/CamStreamerAPI.js +5 -1
- package/cjs/types/CamSwitcherAPI.d.ts +4 -6
- package/cjs/types/CamSwitcherEvents.d.ts +77 -0
- package/cjs/types/CamSwitcherEvents.js +8 -0
- package/cjs/types/PlaneTrackerAPI.d.ts +8 -0
- package/cjs/types/PlaneTrackerAPI.js +2 -0
- package/cjs/types/VapixAPI.d.ts +635 -520
- package/cjs/types/VapixAPI.js +62 -24
- package/cjs/types/common.d.ts +14 -5
- package/cjs/web/DefaultClient.d.ts +5 -5
- package/cjs/web/DefaultClient.js +22 -10
- package/cjs/web/WsClient.js +2 -2
- package/esm/CamOverlayAPI.d.ts +48 -26
- package/esm/CamOverlayAPI.js +167 -84
- package/esm/CamOverlayDrawingAPI.d.ts +2 -47
- package/esm/CamOverlayDrawingAPI.js +6 -3
- package/esm/CamOverlayPainter/Frame.d.ts +8 -37
- package/esm/CamOverlayPainter/Frame.js +33 -0
- package/esm/CamOverlayPainter/Painter.d.ts +16 -10
- package/esm/CamOverlayPainter/Painter.js +5 -3
- package/esm/CamOverlayPainter/ResourceManager.d.ts +3 -2
- package/esm/CamOverlayPainter/ResourceManager.js +7 -11
- package/esm/CamScripterAPI.d.ts +34 -16
- package/esm/CamScripterAPI.js +46 -37
- package/esm/CamScripterAPICameraEventsGenerator.d.ts +1 -1
- package/esm/CamScripterAPICameraEventsGenerator.js +6 -3
- package/esm/CamStreamerAPI.d.ts +17 -14
- package/esm/CamStreamerAPI.js +32 -32
- package/esm/CamSwitcherAPI.d.ts +43 -37
- package/esm/CamSwitcherAPI.js +116 -107
- package/esm/CamSwitcherEvents.d.ts +1 -1
- package/esm/PlaneTrackerAPI.d.ts +43 -0
- package/esm/PlaneTrackerAPI.js +207 -0
- package/esm/VapixAPI.d.ts +56 -42
- package/esm/VapixAPI.js +297 -208
- package/esm/VapixEvents.d.ts +1 -1
- package/esm/VapixEvents.js +3 -3
- package/esm/errors/errors.d.ts +3 -0
- package/esm/errors/errors.js +6 -0
- package/esm/events/AxisCameraStationEvents.d.ts +7 -4
- package/esm/events/AxisCameraStationEvents.js +18 -13
- package/esm/events/GenetecAgent.d.ts +6 -3
- package/esm/events/GenetecAgent.js +20 -9
- package/esm/index.d.ts +14 -1
- package/esm/index.js +14 -1
- package/esm/internal/Digest.js +6 -6
- package/esm/internal/ProxyClient.d.ts +8 -9
- package/esm/internal/ProxyClient.js +25 -29
- package/esm/internal/types.d.ts +42 -0
- package/esm/internal/types.js +1 -0
- package/esm/internal/utils.d.ts +4 -1
- package/esm/internal/utils.js +17 -1
- package/esm/internal/versionCompare.d.ts +2 -2
- package/esm/node/DefaultClient.d.ts +5 -6
- package/esm/node/DefaultClient.js +12 -14
- package/esm/node/HttpRequestSender.d.ts +1 -0
- package/esm/node/HttpRequestSender.js +13 -3
- package/esm/node/HttpServer.js +1 -1
- package/esm/node/WsClient.d.ts +2 -1
- package/esm/node/index.d.ts +2 -0
- package/esm/node/index.js +2 -0
- package/esm/types/CamOverlayAPI/CamOverlayAPI.d.ts +3071 -0
- package/esm/types/CamOverlayAPI/CamOverlayAPI.js +124 -0
- package/esm/types/CamOverlayAPI/accuweatherSchema.d.ts +114 -0
- package/esm/types/CamOverlayAPI/accuweatherSchema.js +46 -0
- package/esm/types/CamOverlayAPI/customGraphicsSchema.d.ts +783 -0
- package/esm/types/CamOverlayAPI/customGraphicsSchema.js +71 -0
- package/esm/types/CamOverlayAPI/imagesSchema.d.ts +122 -0
- package/esm/types/CamOverlayAPI/imagesSchema.js +8 -0
- package/esm/types/CamOverlayAPI/index.d.ts +9 -0
- package/esm/types/CamOverlayAPI/index.js +9 -0
- package/esm/types/CamOverlayAPI/infotickerSchema.d.ts +130 -0
- package/esm/types/CamOverlayAPI/infotickerSchema.js +25 -0
- package/esm/types/CamOverlayAPI/pipSchema.d.ts +166 -0
- package/esm/types/CamOverlayAPI/pipSchema.js +38 -0
- package/esm/types/CamOverlayAPI/ptzCompassSchema.d.ts +126 -0
- package/esm/types/CamOverlayAPI/ptzCompassSchema.js +24 -0
- package/esm/types/CamOverlayAPI/ptzSchema.d.ts +146 -0
- package/esm/types/CamOverlayAPI/ptzSchema.js +11 -0
- package/esm/types/CamOverlayAPI/screenSharingSchema.d.ts +79 -0
- package/esm/types/CamOverlayAPI/screenSharingSchema.js +7 -0
- package/esm/types/CamOverlayAPI/webCameraSharingSchema.d.ts +79 -0
- package/esm/types/CamOverlayAPI/webCameraSharingSchema.js +7 -0
- package/esm/types/CamOverlayDrawingAPI.d.ts +58 -0
- package/esm/types/CamOverlayDrawingAPI.js +1 -0
- package/esm/types/CamOverlayPainter.d.ts +74 -0
- package/esm/types/CamOverlayPainter.js +1 -0
- package/esm/types/CamScripterAPI.d.ts +82 -17
- package/esm/types/CamScripterAPI.js +21 -6
- package/esm/types/CamStreamerAPI.d.ts +16 -5
- package/esm/types/CamStreamerAPI.js +4 -0
- package/esm/types/CamSwitcherAPI.d.ts +4 -6
- package/esm/types/CamSwitcherEvents.d.ts +77 -0
- package/esm/types/CamSwitcherEvents.js +8 -0
- package/esm/types/PlaneTrackerAPI.d.ts +8 -0
- package/esm/types/PlaneTrackerAPI.js +1 -0
- package/esm/types/VapixAPI.d.ts +635 -520
- package/esm/types/VapixAPI.js +61 -23
- package/esm/types/common.d.ts +14 -5
- package/esm/web/DefaultClient.d.ts +5 -5
- package/esm/web/DefaultClient.js +22 -10
- package/esm/web/WsClient.js +2 -2
- package/package.json +9 -8
- package/cjs/internal/common.d.ts +0 -39
- package/cjs/internal/common.js +0 -27
- package/cjs/node/WsEventClient.d.ts +0 -13
- package/cjs/node/WsEventClient.js +0 -22
- package/cjs/types/CamOverlayAPI.d.ts +0 -188
- package/cjs/types/CamOverlayAPI.js +0 -47
- package/esm/internal/common.d.ts +0 -39
- package/esm/internal/common.js +0 -20
- package/esm/node/WsEventClient.d.ts +0 -13
- package/esm/node/WsEventClient.js +0 -18
- package/esm/types/CamOverlayAPI.d.ts +0 -188
- package/esm/types/CamOverlayAPI.js +0 -44
package/esm/types/VapixAPI.js
CHANGED
|
@@ -19,15 +19,8 @@ export const APP_IDS = [
|
|
|
19
19
|
'CamScripter',
|
|
20
20
|
'PlaneTracker',
|
|
21
21
|
'Ndihxplugin',
|
|
22
|
+
'SportTracker',
|
|
22
23
|
];
|
|
23
|
-
export const applicationListSchema = z.object({
|
|
24
|
-
reply: z.object({
|
|
25
|
-
$: z.object({ result: z.string() }),
|
|
26
|
-
application: z.array(z.object({
|
|
27
|
-
$: applicationSchema,
|
|
28
|
-
})),
|
|
29
|
-
}),
|
|
30
|
-
});
|
|
31
24
|
export const guardTourSchema = z.object({
|
|
32
25
|
id: z.string(),
|
|
33
26
|
camNbr: z.unknown(),
|
|
@@ -67,7 +60,7 @@ export const audioDeviceSignalingChannelTypeSchema = z.object({
|
|
|
67
60
|
});
|
|
68
61
|
export const audioDeviceSignalingTypeSchema = z.object({
|
|
69
62
|
id: z.string(),
|
|
70
|
-
powerType: z.string(),
|
|
63
|
+
powerType: z.string().optional(),
|
|
71
64
|
channels: z.array(audioDeviceSignalingChannelTypeSchema),
|
|
72
65
|
});
|
|
73
66
|
export const audioDeviceConnectionTypeSchema = z.object({
|
|
@@ -94,15 +87,19 @@ const audioDeviceFromRequestSchema = z.object({
|
|
|
94
87
|
inputs: z.array(audioDeviceInputOutputSchema).optional(),
|
|
95
88
|
outputs: z.array(audioDeviceInputOutputSchema).optional(),
|
|
96
89
|
});
|
|
97
|
-
export const audioDeviceRequestSchema = z.object({
|
|
90
|
+
export const audioDeviceRequestSchema = z.object({
|
|
91
|
+
data: z.object({ devices: z.array(audioDeviceFromRequestSchema) }),
|
|
92
|
+
});
|
|
98
93
|
export const maxFpsResponseSchema = z.object({
|
|
99
|
-
data: z
|
|
94
|
+
data: z
|
|
95
|
+
.array(z.object({
|
|
100
96
|
channel: z.number(),
|
|
101
97
|
captureMode: z.array(z.object({
|
|
102
98
|
enabled: z.boolean(),
|
|
103
99
|
maxFPS: z.number().optional(),
|
|
104
100
|
})),
|
|
105
|
-
}))
|
|
101
|
+
}))
|
|
102
|
+
.optional(),
|
|
106
103
|
});
|
|
107
104
|
export const dateTimeinfoSchema = z.object({
|
|
108
105
|
data: z.object({
|
|
@@ -110,20 +107,61 @@ export const dateTimeinfoSchema = z.object({
|
|
|
110
107
|
dstEnabled: z.boolean(),
|
|
111
108
|
localDateTime: z.string(),
|
|
112
109
|
posixTimeZone: z.string(),
|
|
113
|
-
timeZone: z.string(),
|
|
110
|
+
timeZone: z.string().optional(),
|
|
114
111
|
}),
|
|
115
112
|
});
|
|
113
|
+
export const timeZoneSchema = z.discriminatedUnion('status', [
|
|
114
|
+
z.object({
|
|
115
|
+
status: z.literal('success'),
|
|
116
|
+
data: z.object({
|
|
117
|
+
activeTimeZone: z.string(),
|
|
118
|
+
}),
|
|
119
|
+
}),
|
|
120
|
+
z.object({
|
|
121
|
+
status: z.literal('error'),
|
|
122
|
+
error: z.object({
|
|
123
|
+
message: z.string(),
|
|
124
|
+
}),
|
|
125
|
+
}),
|
|
126
|
+
]);
|
|
116
127
|
export const audioSampleRatesResponseSchema = z.object({
|
|
117
128
|
data: z.object({
|
|
118
|
-
encoders: z
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
AAC: z.array(audioSampleRatesSchema),
|
|
125
|
-
aac: z.undefined(),
|
|
126
|
-
}),
|
|
127
|
-
]),
|
|
129
|
+
encoders: z
|
|
130
|
+
.object({
|
|
131
|
+
aac: z.array(audioSampleRatesSchema),
|
|
132
|
+
AAC: z.array(audioSampleRatesSchema),
|
|
133
|
+
})
|
|
134
|
+
.partial(),
|
|
128
135
|
}),
|
|
129
136
|
});
|
|
137
|
+
export const portStatusSchema = z.object({
|
|
138
|
+
port: z.string(),
|
|
139
|
+
state: z.enum(['open', 'closed']),
|
|
140
|
+
configurable: z.boolean(),
|
|
141
|
+
readonly: z.boolean().optional(),
|
|
142
|
+
usage: z.string(),
|
|
143
|
+
direction: z.enum(['input', 'output']),
|
|
144
|
+
name: z.string(),
|
|
145
|
+
normalState: z.enum(['open', 'closed']),
|
|
146
|
+
});
|
|
147
|
+
export const getPortsResponseSchema = z.object({
|
|
148
|
+
apiVersion: z.string(),
|
|
149
|
+
context: z.string(),
|
|
150
|
+
method: z.literal('getPorts'),
|
|
151
|
+
data: z.object({
|
|
152
|
+
numberOfPorts: z.number(),
|
|
153
|
+
items: z.array(portStatusSchema),
|
|
154
|
+
}),
|
|
155
|
+
});
|
|
156
|
+
export const portSetSchema = z.object({
|
|
157
|
+
port: z.string(),
|
|
158
|
+
state: z.enum(['open', 'closed']),
|
|
159
|
+
usage: z.string().optional(),
|
|
160
|
+
direction: z.enum(['input', 'output']).optional(),
|
|
161
|
+
name: z.string().optional(),
|
|
162
|
+
normalState: z.enum(['open', 'closed']).optional(),
|
|
163
|
+
});
|
|
164
|
+
export const portSequenceStateSchema = z.object({
|
|
165
|
+
state: z.enum(['open', 'closed']),
|
|
166
|
+
time: z.number().min(0).max(65535),
|
|
167
|
+
});
|
package/esm/types/common.d.ts
CHANGED
|
@@ -11,27 +11,36 @@ export declare const networkCameraListSchema: z.ZodArray<z.ZodObject<{
|
|
|
11
11
|
name: z.ZodString;
|
|
12
12
|
ip: z.ZodString;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
ip: string;
|
|
15
14
|
name: string;
|
|
16
|
-
}, {
|
|
17
15
|
ip: string;
|
|
16
|
+
}, {
|
|
18
17
|
name: string;
|
|
18
|
+
ip: string;
|
|
19
19
|
}>, "many">;
|
|
20
20
|
export type TNetworkCamera = z.infer<typeof networkCameraListSchema>[number];
|
|
21
21
|
export declare const keyboardShortcutSchema: z.ZodNullable<z.ZodString>;
|
|
22
22
|
export declare const keyboardShortcutsSchema: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>;
|
|
23
23
|
export type TKeyboardShortcut = z.infer<typeof keyboardShortcutSchema>;
|
|
24
24
|
export type TKeyboardShortcuts = z.infer<typeof keyboardShortcutsSchema>;
|
|
25
|
-
export type
|
|
25
|
+
export type TProxyTarget = {
|
|
26
26
|
ip: string;
|
|
27
27
|
mdnsName: string;
|
|
28
28
|
port: number;
|
|
29
29
|
user: string;
|
|
30
30
|
pass: string;
|
|
31
|
-
}
|
|
31
|
+
};
|
|
32
|
+
export type TProxyParams = {
|
|
33
|
+
path: string;
|
|
34
|
+
target: TProxyTarget;
|
|
35
|
+
};
|
|
36
|
+
export type THttpRequestOptions = {
|
|
37
|
+
timeout?: number;
|
|
38
|
+
proxyParams?: TProxyParams;
|
|
39
|
+
};
|
|
32
40
|
export type TCameraImageConfig = {
|
|
33
41
|
camera?: string;
|
|
34
42
|
resolution?: string;
|
|
35
43
|
compression?: number;
|
|
36
|
-
overlays?:
|
|
44
|
+
overlays?: string;
|
|
45
|
+
[key: string]: string | number | undefined;
|
|
37
46
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { IClient, TGetParams, TPostParams } from '../internal/types';
|
|
2
|
+
export declare class DefaultClient implements IClient<Response> {
|
|
3
|
+
get: (params: TGetParams) => Promise<Response>;
|
|
4
|
+
post: (params: TPostParams) => Promise<Response>;
|
|
5
|
+
private fetchWithTimeout;
|
|
6
6
|
}
|
package/esm/web/DefaultClient.js
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { addParametersToPath } from '../internal/utils';
|
|
2
2
|
export class DefaultClient {
|
|
3
|
-
get
|
|
4
|
-
return
|
|
3
|
+
get = (params) => {
|
|
4
|
+
return this.fetchWithTimeout(addParametersToPath(params.path, params.parameters), {
|
|
5
5
|
method: 'GET',
|
|
6
|
-
headers: headers,
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
post
|
|
10
|
-
return
|
|
6
|
+
headers: params.headers,
|
|
7
|
+
}, params.timeout);
|
|
8
|
+
};
|
|
9
|
+
post = (params) => {
|
|
10
|
+
return this.fetchWithTimeout(addParametersToPath(params.path, params.parameters), {
|
|
11
11
|
method: 'POST',
|
|
12
|
-
body: data,
|
|
13
|
-
headers: headers,
|
|
14
|
-
});
|
|
12
|
+
body: params.data,
|
|
13
|
+
headers: params.headers,
|
|
14
|
+
}, params.timeout);
|
|
15
|
+
};
|
|
16
|
+
async fetchWithTimeout(url, options, timeout) {
|
|
17
|
+
const controller = new AbortController();
|
|
18
|
+
const timeoutId = timeout !== undefined ? setTimeout(() => controller.abort(), timeout) : null;
|
|
19
|
+
try {
|
|
20
|
+
return await fetch(url, { ...options, signal: controller.signal });
|
|
21
|
+
}
|
|
22
|
+
finally {
|
|
23
|
+
if (timeoutId) {
|
|
24
|
+
clearTimeout(timeoutId);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
15
27
|
}
|
|
16
28
|
}
|
package/esm/web/WsClient.js
CHANGED
|
@@ -27,7 +27,7 @@ export class WsClient {
|
|
|
27
27
|
};
|
|
28
28
|
ws.onmessage = (e) => this.onmessage(e);
|
|
29
29
|
ws.onclose = () => {
|
|
30
|
-
this.restartTimeout = setTimeout(() => this.init(), REFRESH_TIMEOUT);
|
|
30
|
+
this.restartTimeout = window.setTimeout(() => this.init(), REFRESH_TIMEOUT);
|
|
31
31
|
};
|
|
32
32
|
this.ws = ws;
|
|
33
33
|
}
|
|
@@ -40,7 +40,7 @@ export class WsClient {
|
|
|
40
40
|
this.destroyWebsocket();
|
|
41
41
|
};
|
|
42
42
|
destroyWebsocket() {
|
|
43
|
-
if (this.restartTimeout) {
|
|
43
|
+
if (this.restartTimeout !== null) {
|
|
44
44
|
clearTimeout(this.restartTimeout);
|
|
45
45
|
this.restartTimeout = null;
|
|
46
46
|
}
|
package/package.json
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "camstreamerlib",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.31",
|
|
4
4
|
"description": "Helper library for CamStreamer ACAP applications.",
|
|
5
5
|
"prettier": "@camstreamer/prettier-config",
|
|
6
|
+
"engine": {
|
|
7
|
+
"node": ">=18.0.0"
|
|
8
|
+
},
|
|
6
9
|
"dependencies": {
|
|
7
10
|
"adm-zip": "^0.5.9",
|
|
8
11
|
"eventemitter2": "^5.0.1",
|
|
12
|
+
"fast-xml-parser": "^5.2.5",
|
|
9
13
|
"lodash": "^4.17.21",
|
|
10
14
|
"prettify-xml": "^1.2.0",
|
|
11
15
|
"type-fest": "^4.41.0",
|
|
12
16
|
"undici": "^6.21.3",
|
|
13
17
|
"ws": "^8.18.0",
|
|
14
|
-
"xml2js": "^0.5.0",
|
|
15
18
|
"zod": "^3.24.3"
|
|
16
19
|
},
|
|
17
|
-
"engine": {
|
|
18
|
-
"node": ">=18.0.0"
|
|
19
|
-
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@camstreamer/eslint-config": "^1.0.2",
|
|
22
22
|
"@camstreamer/prettier-config": "^2.0.4",
|
|
23
23
|
"@types/adm-zip": "^0.5.5",
|
|
24
24
|
"@types/jest": "^28.0.0",
|
|
25
25
|
"@types/lodash": "^4.17.18",
|
|
26
|
-
"@types/node": "^18.19.
|
|
26
|
+
"@types/node": "^18.19.127",
|
|
27
27
|
"@types/ws": "^8.5.10",
|
|
28
|
-
"@types/xml2js": "^0.4.14",
|
|
29
28
|
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
|
30
29
|
"@typescript-eslint/parser": "^6.8.0",
|
|
31
30
|
"eslint": "^8.51.0",
|
|
@@ -44,11 +43,13 @@
|
|
|
44
43
|
"build:cjs": "tsc --project tsconfig.cjs.json",
|
|
45
44
|
"build:esm": "tsc --project tsconfig.esm.json",
|
|
46
45
|
"copyPackage": "cp -f LICENSE dist/ && cp -f README.md dist/ && cp -f package.json dist/",
|
|
46
|
+
"prepublish": "npm run build",
|
|
47
47
|
"lint": "eslint \"src/**/*.ts\"",
|
|
48
48
|
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
49
49
|
"pretty": "prettier --write \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
|
|
50
50
|
"pretty:check": "prettier --check \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
|
|
51
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
51
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
52
|
+
"audit": "npm audit --audit-level=high"
|
|
52
53
|
},
|
|
53
54
|
"files": [
|
|
54
55
|
"/**/*.js",
|
package/cjs/internal/common.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
type Options = {
|
|
3
|
-
ip?: string;
|
|
4
|
-
port?: number;
|
|
5
|
-
user?: string;
|
|
6
|
-
pass?: string;
|
|
7
|
-
tls?: boolean;
|
|
8
|
-
tlsInsecure?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type HttpOptions = Options & {
|
|
11
|
-
keepAlive?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type WsOptions = Options;
|
|
14
|
-
export type TResponse = {
|
|
15
|
-
ok: boolean;
|
|
16
|
-
json: () => Promise<any>;
|
|
17
|
-
text: () => Promise<string>;
|
|
18
|
-
status: number;
|
|
19
|
-
body: any | null;
|
|
20
|
-
};
|
|
21
|
-
export type TParameters = Record<string, string | number | boolean | null | undefined>;
|
|
22
|
-
export type TGetFunction = (url: string, parameters?: TParameters, headers?: Record<string, string>) => Promise<TResponse>;
|
|
23
|
-
export type TPostFunction = (url: string, data: string | Buffer | FormData, parameters?: TParameters, headers?: Record<string, string>) => Promise<TResponse>;
|
|
24
|
-
export interface IClient {
|
|
25
|
-
get: TGetFunction;
|
|
26
|
-
post: TPostFunction;
|
|
27
|
-
}
|
|
28
|
-
export interface IWebsocket<Event extends {
|
|
29
|
-
readonly data: string;
|
|
30
|
-
}> {
|
|
31
|
-
destroy: () => void;
|
|
32
|
-
onmessage: null | ((event: Event) => void);
|
|
33
|
-
send: (data: string) => void;
|
|
34
|
-
}
|
|
35
|
-
export declare function isClient(arg?: Options | IClient): arg is IClient;
|
|
36
|
-
export declare function responseStringify(res: TResponse): Promise<string>;
|
|
37
|
-
export declare function pad(num: number, size: number): string;
|
|
38
|
-
export declare function isNullish<T>(value: T | undefined | null): value is undefined | null;
|
|
39
|
-
export {};
|
package/cjs/internal/common.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isNullish = exports.pad = exports.responseStringify = exports.isClient = void 0;
|
|
4
|
-
function isClient(arg = {}) {
|
|
5
|
-
return 'get' in arg && 'post' in arg;
|
|
6
|
-
}
|
|
7
|
-
exports.isClient = isClient;
|
|
8
|
-
async function responseStringify(res) {
|
|
9
|
-
return JSON.stringify({
|
|
10
|
-
status: res.status,
|
|
11
|
-
body: await res.text(),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
exports.responseStringify = responseStringify;
|
|
15
|
-
function pad(num, size) {
|
|
16
|
-
const sign = Math.sign(num) === -1 ? '-' : '';
|
|
17
|
-
return (sign +
|
|
18
|
-
new Array(size)
|
|
19
|
-
.concat([Math.abs(num)])
|
|
20
|
-
.join('0')
|
|
21
|
-
.slice(-size));
|
|
22
|
-
}
|
|
23
|
-
exports.pad = pad;
|
|
24
|
-
function isNullish(value) {
|
|
25
|
-
return value === null || value === undefined;
|
|
26
|
-
}
|
|
27
|
-
exports.isNullish = isNullish;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IWebsocket } from '../internal/common';
|
|
2
|
-
import { WsClientOptions } from './WsClient';
|
|
3
|
-
type TEvent = {
|
|
4
|
-
data: string;
|
|
5
|
-
};
|
|
6
|
-
export declare class WsEventClient implements IWebsocket<TEvent> {
|
|
7
|
-
private wsClient;
|
|
8
|
-
constructor(options: WsClientOptions);
|
|
9
|
-
send: (data: string) => void;
|
|
10
|
-
destroy: () => void;
|
|
11
|
-
onmessage: ((event: TEvent) => void) | null;
|
|
12
|
-
}
|
|
13
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WsEventClient = void 0;
|
|
4
|
-
const WsClient_1 = require("./WsClient");
|
|
5
|
-
class WsEventClient {
|
|
6
|
-
wsClient;
|
|
7
|
-
constructor(options) {
|
|
8
|
-
this.wsClient = new WsClient_1.WsClient(options);
|
|
9
|
-
this.wsClient.on('message', (data) => {
|
|
10
|
-
this.onmessage?.({ data: data.toString() });
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
send = (data) => {
|
|
14
|
-
this.wsClient.send(data);
|
|
15
|
-
};
|
|
16
|
-
destroy = () => {
|
|
17
|
-
this.wsClient.close();
|
|
18
|
-
this.onmessage = null;
|
|
19
|
-
};
|
|
20
|
-
onmessage = null;
|
|
21
|
-
}
|
|
22
|
-
exports.WsEventClient = WsEventClient;
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
import { HttpOptions } from '../internal/common';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
export type CamOverlayOptions = HttpOptions;
|
|
4
|
-
export type TFileType = 'image' | 'font';
|
|
5
|
-
export type TCoordinates = 'top_left' | 'top_right' | 'top' | 'bottom_left' | 'bottom_right' | 'bottom' | 'left' | 'right' | 'center' | '';
|
|
6
|
-
export declare const serviceSchema: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
7
|
-
export type TService = z.infer<typeof serviceSchema>;
|
|
8
|
-
export type TServiceList = {
|
|
9
|
-
services: TService[];
|
|
10
|
-
};
|
|
11
|
-
export declare const fieldSchema: z.ZodObject<{
|
|
12
|
-
field_name: z.ZodString;
|
|
13
|
-
text: z.ZodString;
|
|
14
|
-
color: z.ZodOptional<z.ZodString>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
field_name: string;
|
|
17
|
-
text: string;
|
|
18
|
-
color?: string | undefined;
|
|
19
|
-
}, {
|
|
20
|
-
field_name: string;
|
|
21
|
-
text: string;
|
|
22
|
-
color?: string | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
export type TField = z.infer<typeof fieldSchema>;
|
|
25
|
-
export declare const fileSchema: z.ZodObject<{
|
|
26
|
-
name: z.ZodString;
|
|
27
|
-
path: z.ZodString;
|
|
28
|
-
storage: z.ZodString;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
path: string;
|
|
31
|
-
name: string;
|
|
32
|
-
storage: string;
|
|
33
|
-
}, {
|
|
34
|
-
path: string;
|
|
35
|
-
name: string;
|
|
36
|
-
storage: string;
|
|
37
|
-
}>;
|
|
38
|
-
export type TFile = z.infer<typeof fileSchema>;
|
|
39
|
-
export declare const fileListSchema: z.ZodArray<z.ZodObject<{
|
|
40
|
-
name: z.ZodString;
|
|
41
|
-
path: z.ZodString;
|
|
42
|
-
storage: z.ZodString;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
path: string;
|
|
45
|
-
name: string;
|
|
46
|
-
storage: string;
|
|
47
|
-
}, {
|
|
48
|
-
path: string;
|
|
49
|
-
name: string;
|
|
50
|
-
storage: string;
|
|
51
|
-
}>, "many">;
|
|
52
|
-
export type TFileList = z.infer<typeof fileListSchema>;
|
|
53
|
-
export declare enum ImageType {
|
|
54
|
-
PNG = 0,
|
|
55
|
-
JPEG = 1
|
|
56
|
-
}
|
|
57
|
-
export declare const fontStorageSchema: z.ZodTuple<[z.ZodObject<{
|
|
58
|
-
type: z.ZodLiteral<"SD0">;
|
|
59
|
-
state: z.ZodLiteral<"SD Card">;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
type: "SD0";
|
|
62
|
-
state: "SD Card";
|
|
63
|
-
}, {
|
|
64
|
-
type: "SD0";
|
|
65
|
-
state: "SD Card";
|
|
66
|
-
}>, z.ZodObject<{
|
|
67
|
-
type: z.ZodLiteral<"flash">;
|
|
68
|
-
state: z.ZodString;
|
|
69
|
-
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
type: "flash";
|
|
71
|
-
state: string;
|
|
72
|
-
}, {
|
|
73
|
-
type: "flash";
|
|
74
|
-
state: string;
|
|
75
|
-
}>], null>;
|
|
76
|
-
export type TFontStorage = z.infer<typeof fontStorageSchema>;
|
|
77
|
-
export declare const imageStorageSchema: z.ZodTuple<[z.ZodObject<{
|
|
78
|
-
type: z.ZodLiteral<"SD0">;
|
|
79
|
-
state: z.ZodLiteral<"SD Card">;
|
|
80
|
-
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
type: "SD0";
|
|
82
|
-
state: "SD Card";
|
|
83
|
-
}, {
|
|
84
|
-
type: "SD0";
|
|
85
|
-
state: "SD Card";
|
|
86
|
-
}>, z.ZodObject<{
|
|
87
|
-
type: z.ZodLiteral<"flash">;
|
|
88
|
-
state: z.ZodString;
|
|
89
|
-
}, "strip", z.ZodTypeAny, {
|
|
90
|
-
type: "flash";
|
|
91
|
-
state: string;
|
|
92
|
-
}, {
|
|
93
|
-
type: "flash";
|
|
94
|
-
state: string;
|
|
95
|
-
}>, z.ZodObject<{
|
|
96
|
-
type: z.ZodLiteral<"samba">;
|
|
97
|
-
state: z.ZodLiteral<"Microsoft Network Share">;
|
|
98
|
-
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
type: "samba";
|
|
100
|
-
state: "Microsoft Network Share";
|
|
101
|
-
}, {
|
|
102
|
-
type: "samba";
|
|
103
|
-
state: "Microsoft Network Share";
|
|
104
|
-
}>, z.ZodObject<{
|
|
105
|
-
type: z.ZodLiteral<"url">;
|
|
106
|
-
state: z.ZodLiteral<"URL">;
|
|
107
|
-
}, "strip", z.ZodTypeAny, {
|
|
108
|
-
type: "url";
|
|
109
|
-
state: "URL";
|
|
110
|
-
}, {
|
|
111
|
-
type: "url";
|
|
112
|
-
state: "URL";
|
|
113
|
-
}>, z.ZodObject<{
|
|
114
|
-
type: z.ZodLiteral<"ftp">;
|
|
115
|
-
state: z.ZodLiteral<"FTP">;
|
|
116
|
-
}, "strip", z.ZodTypeAny, {
|
|
117
|
-
type: "ftp";
|
|
118
|
-
state: "FTP";
|
|
119
|
-
}, {
|
|
120
|
-
type: "ftp";
|
|
121
|
-
state: "FTP";
|
|
122
|
-
}>], null>;
|
|
123
|
-
export type TImageStorage = z.infer<typeof imageStorageSchema>;
|
|
124
|
-
export declare const storageSchema: z.ZodUnion<[z.ZodTuple<[z.ZodObject<{
|
|
125
|
-
type: z.ZodLiteral<"SD0">;
|
|
126
|
-
state: z.ZodLiteral<"SD Card">;
|
|
127
|
-
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
type: "SD0";
|
|
129
|
-
state: "SD Card";
|
|
130
|
-
}, {
|
|
131
|
-
type: "SD0";
|
|
132
|
-
state: "SD Card";
|
|
133
|
-
}>, z.ZodObject<{
|
|
134
|
-
type: z.ZodLiteral<"flash">;
|
|
135
|
-
state: z.ZodString;
|
|
136
|
-
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
type: "flash";
|
|
138
|
-
state: string;
|
|
139
|
-
}, {
|
|
140
|
-
type: "flash";
|
|
141
|
-
state: string;
|
|
142
|
-
}>], null>, z.ZodTuple<[z.ZodObject<{
|
|
143
|
-
type: z.ZodLiteral<"SD0">;
|
|
144
|
-
state: z.ZodLiteral<"SD Card">;
|
|
145
|
-
}, "strip", z.ZodTypeAny, {
|
|
146
|
-
type: "SD0";
|
|
147
|
-
state: "SD Card";
|
|
148
|
-
}, {
|
|
149
|
-
type: "SD0";
|
|
150
|
-
state: "SD Card";
|
|
151
|
-
}>, z.ZodObject<{
|
|
152
|
-
type: z.ZodLiteral<"flash">;
|
|
153
|
-
state: z.ZodString;
|
|
154
|
-
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
type: "flash";
|
|
156
|
-
state: string;
|
|
157
|
-
}, {
|
|
158
|
-
type: "flash";
|
|
159
|
-
state: string;
|
|
160
|
-
}>, z.ZodObject<{
|
|
161
|
-
type: z.ZodLiteral<"samba">;
|
|
162
|
-
state: z.ZodLiteral<"Microsoft Network Share">;
|
|
163
|
-
}, "strip", z.ZodTypeAny, {
|
|
164
|
-
type: "samba";
|
|
165
|
-
state: "Microsoft Network Share";
|
|
166
|
-
}, {
|
|
167
|
-
type: "samba";
|
|
168
|
-
state: "Microsoft Network Share";
|
|
169
|
-
}>, z.ZodObject<{
|
|
170
|
-
type: z.ZodLiteral<"url">;
|
|
171
|
-
state: z.ZodLiteral<"URL">;
|
|
172
|
-
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
type: "url";
|
|
174
|
-
state: "URL";
|
|
175
|
-
}, {
|
|
176
|
-
type: "url";
|
|
177
|
-
state: "URL";
|
|
178
|
-
}>, z.ZodObject<{
|
|
179
|
-
type: z.ZodLiteral<"ftp">;
|
|
180
|
-
state: z.ZodLiteral<"FTP">;
|
|
181
|
-
}, "strip", z.ZodTypeAny, {
|
|
182
|
-
type: "ftp";
|
|
183
|
-
state: "FTP";
|
|
184
|
-
}, {
|
|
185
|
-
type: "ftp";
|
|
186
|
-
state: "FTP";
|
|
187
|
-
}>], null>]>;
|
|
188
|
-
export type TStorage = z.infer<typeof storageSchema>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.storageSchema = exports.imageStorageSchema = exports.fontStorageSchema = exports.ImageType = exports.fileListSchema = exports.fileSchema = exports.fieldSchema = exports.serviceSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.serviceSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.any());
|
|
6
|
-
exports.fieldSchema = zod_1.z.object({
|
|
7
|
-
field_name: zod_1.z.string(),
|
|
8
|
-
text: zod_1.z.string(),
|
|
9
|
-
color: zod_1.z.string().optional(),
|
|
10
|
-
});
|
|
11
|
-
exports.fileSchema = zod_1.z.object({
|
|
12
|
-
name: zod_1.z.string(),
|
|
13
|
-
path: zod_1.z.string(),
|
|
14
|
-
storage: zod_1.z.string(),
|
|
15
|
-
});
|
|
16
|
-
exports.fileListSchema = zod_1.z.array(exports.fileSchema);
|
|
17
|
-
var ImageType;
|
|
18
|
-
(function (ImageType) {
|
|
19
|
-
ImageType[ImageType["PNG"] = 0] = "PNG";
|
|
20
|
-
ImageType[ImageType["JPEG"] = 1] = "JPEG";
|
|
21
|
-
})(ImageType || (exports.ImageType = ImageType = {}));
|
|
22
|
-
exports.fontStorageSchema = zod_1.z.tuple([
|
|
23
|
-
zod_1.z.object({
|
|
24
|
-
type: zod_1.z.literal('SD0'),
|
|
25
|
-
state: zod_1.z.literal('SD Card'),
|
|
26
|
-
}),
|
|
27
|
-
zod_1.z.object({
|
|
28
|
-
type: zod_1.z.literal('flash'),
|
|
29
|
-
state: zod_1.z.string(),
|
|
30
|
-
}),
|
|
31
|
-
]);
|
|
32
|
-
exports.imageStorageSchema = zod_1.z.tuple([
|
|
33
|
-
...exports.fontStorageSchema.items,
|
|
34
|
-
zod_1.z.object({
|
|
35
|
-
type: zod_1.z.literal('samba'),
|
|
36
|
-
state: zod_1.z.literal('Microsoft Network Share'),
|
|
37
|
-
}),
|
|
38
|
-
zod_1.z.object({
|
|
39
|
-
type: zod_1.z.literal('url'),
|
|
40
|
-
state: zod_1.z.literal('URL'),
|
|
41
|
-
}),
|
|
42
|
-
zod_1.z.object({
|
|
43
|
-
type: zod_1.z.literal('ftp'),
|
|
44
|
-
state: zod_1.z.literal('FTP'),
|
|
45
|
-
}),
|
|
46
|
-
]);
|
|
47
|
-
exports.storageSchema = zod_1.z.union([exports.fontStorageSchema, exports.imageStorageSchema]);
|
package/esm/internal/common.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
type Options = {
|
|
3
|
-
ip?: string;
|
|
4
|
-
port?: number;
|
|
5
|
-
user?: string;
|
|
6
|
-
pass?: string;
|
|
7
|
-
tls?: boolean;
|
|
8
|
-
tlsInsecure?: boolean;
|
|
9
|
-
};
|
|
10
|
-
export type HttpOptions = Options & {
|
|
11
|
-
keepAlive?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type WsOptions = Options;
|
|
14
|
-
export type TResponse = {
|
|
15
|
-
ok: boolean;
|
|
16
|
-
json: () => Promise<any>;
|
|
17
|
-
text: () => Promise<string>;
|
|
18
|
-
status: number;
|
|
19
|
-
body: any | null;
|
|
20
|
-
};
|
|
21
|
-
export type TParameters = Record<string, string | number | boolean | null | undefined>;
|
|
22
|
-
export type TGetFunction = (url: string, parameters?: TParameters, headers?: Record<string, string>) => Promise<TResponse>;
|
|
23
|
-
export type TPostFunction = (url: string, data: string | Buffer | FormData, parameters?: TParameters, headers?: Record<string, string>) => Promise<TResponse>;
|
|
24
|
-
export interface IClient {
|
|
25
|
-
get: TGetFunction;
|
|
26
|
-
post: TPostFunction;
|
|
27
|
-
}
|
|
28
|
-
export interface IWebsocket<Event extends {
|
|
29
|
-
readonly data: string;
|
|
30
|
-
}> {
|
|
31
|
-
destroy: () => void;
|
|
32
|
-
onmessage: null | ((event: Event) => void);
|
|
33
|
-
send: (data: string) => void;
|
|
34
|
-
}
|
|
35
|
-
export declare function isClient(arg?: Options | IClient): arg is IClient;
|
|
36
|
-
export declare function responseStringify(res: TResponse): Promise<string>;
|
|
37
|
-
export declare function pad(num: number, size: number): string;
|
|
38
|
-
export declare function isNullish<T>(value: T | undefined | null): value is undefined | null;
|
|
39
|
-
export {};
|