camstreamerlib 4.0.34 → 4.0.35-bc56d1e

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/package.json CHANGED
@@ -1,117 +1,114 @@
1
1
  {
2
- "name": "camstreamerlib",
3
- "version": "4.0.34",
4
- "description": "Helper library for CamStreamer ACAP applications.",
5
- "prettier": "@camstreamer/prettier-config",
6
- "engine": {
7
- "node": ">=18.0.0"
2
+ "name": "camstreamerlib",
3
+ "version": "4.0.35-bc56d1e",
4
+ "description": "Helper library for CamStreamer ACAP applications.",
5
+ "prettier": "@camstreamer/prettier-config",
6
+ "engine": {
7
+ "node": ">=18.0.0"
8
+ },
9
+ "dependencies": {
10
+ "adm-zip": "^0.6.0",
11
+ "eventemitter2": "^5.0.1",
12
+ "fast-xml-parser": "^5.3.6",
13
+ "type-fest": "^4.41.0",
14
+ "undici": "^6.28.1",
15
+ "ws": "^8.18.0",
16
+ "zod": "^3.25.76"
17
+ },
18
+ "devDependencies": {
19
+ "@camstreamer/eslint-config": "^1.0.10",
20
+ "@camstreamer/prettier-config": "^2.0.4",
21
+ "@eslint/js": "^10.0.1",
22
+ "@types/adm-zip": "^0.5.5",
23
+ "@types/jest": "^30.0.0",
24
+ "@types/node": "^18.19.127",
25
+ "@types/ws": "^8.5.10",
26
+ "esbuild": "^0.28.2",
27
+ "eslint": "^10.12.0",
28
+ "eslint-plugin-unused-imports": "^4.4.1",
29
+ "globals": "^17.13.0",
30
+ "jest": "^30.5.2",
31
+ "npm-run-all": "^4.1.5",
32
+ "prettier": "^2.7.1",
33
+ "ts-jest": "^29.4.14",
34
+ "ts-node": "^10.7.0",
35
+ "typescript": "5.3.3",
36
+ "typescript-eslint": "^8.71.2"
37
+ },
38
+ "overrides": {
39
+ "js-yaml": "^4.3.2",
40
+ "browserslist": "^4.28.7"
41
+ },
42
+ "scripts": {
43
+ "clean": "node -e \"require('fs').rmSync('dist', { recursive: true, force: true })\"",
44
+ "build": "npm-run-all clean build:cjs build:esm copyPackage",
45
+ "build:cjs": "tsc --project tsconfig.cjs.json",
46
+ "build:esm": "tsc --project tsconfig.esm.json",
47
+ "build:browser": "esbuild src/browser.index.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=examples/camstreamerlib.js",
48
+ "copyPackage": "cp -f LICENSE dist/ && cp -f README.md dist/ && cp -f package.json dist/ && cp -r -f examples dist/",
49
+ "publishPackage": "./publish.sh",
50
+ "lint": "eslint \"src/**/*.ts\"",
51
+ "lint:fix": "eslint \"src/**/*.ts\" --fix",
52
+ "pretty": "prettier --write \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
53
+ "pretty:check": "prettier --check \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
54
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
55
+ "audit": "npm audit --audit-level=high"
56
+ },
57
+ "files": [
58
+ "/**/*.js",
59
+ "/**/*.ts",
60
+ "/examples/**/*"
61
+ ],
62
+ "main": "./cjs/index.js",
63
+ "module": "./esm/index.js",
64
+ "types": "types/index.d.ts",
65
+ "exports": {
66
+ ".": {
67
+ "import": "./esm/index.js",
68
+ "require": "./cjs/index.js",
69
+ "types": "./types/index.d.ts"
8
70
  },
9
- "dependencies": {
10
- "adm-zip": "^0.6.0",
11
- "eventemitter2": "^5.0.1",
12
- "fast-xml-parser": "^5.3.6",
13
- "type-fest": "^4.41.0",
14
- "undici": "^6.28.1",
15
- "ws": "^8.18.0",
16
- "zod": "^3.25.76"
71
+ "./web": {
72
+ "import": "./esm/web/index.js",
73
+ "require": "./cjs/web/index.js",
74
+ "types": "./types/web/index.d.ts"
17
75
  },
18
- "devDependencies": {
19
- "@camstreamer/eslint-config": "^1.0.2",
20
- "@camstreamer/prettier-config": "^2.0.4",
21
- "@types/adm-zip": "^0.5.5",
22
- "@types/jest": "^30.0.0",
23
- "@types/node": "^18.19.127",
24
- "@types/ws": "^8.5.10",
25
- "@typescript-eslint/eslint-plugin": "^8.71.1",
26
- "@typescript-eslint/parser": "^8.71.1",
27
- "esbuild": "^0.28.2",
28
- "eslint": "^8.51.0",
29
- "eslint-plugin-deprecation": "^2.0.0",
30
- "eslint-plugin-unused-imports": "^4.4.1",
31
- "jest": "^30.5.2",
32
- "npm-run-all": "^4.1.5",
33
- "prettier": "^2.7.1",
34
- "ts-jest": "^29.4.14",
35
- "ts-node": "^10.7.0",
36
- "typescript": "5.3.3"
76
+ "./node": {
77
+ "import": "./esm/node/index.js",
78
+ "require": "./cjs/node/index.js",
79
+ "types": "./types/node/index.d.ts"
37
80
  },
38
- "overrides": {
39
- "js-yaml": "^4.3.2",
40
- "browserslist": "^4.28.7",
41
- "eslint-plugin-deprecation": {
42
- "@typescript-eslint/utils": "^8.71.1"
43
- }
81
+ "./cjs/index": {
82
+ "import": "./esm/index.js",
83
+ "require": "./cjs/index.js",
84
+ "types": "./types/index.d.ts"
44
85
  },
45
- "scripts": {
46
- "clean": "rimraf dist/*",
47
- "build": "npm-run-all clean build:cjs build:esm copyPackage",
48
- "build:cjs": "tsc --project tsconfig.cjs.json",
49
- "build:esm": "tsc --project tsconfig.esm.json",
50
- "build:browser": "esbuild src/browser.index.ts --bundle --format=esm --platform=browser --target=es2022 --outfile=examples/camstreamerlib.js",
51
- "copyPackage": "cp -f LICENSE dist/ && cp -f README.md dist/ && cp -f package.json dist/ && cp -r -f examples dist/",
52
- "publishPackage": "./publish.sh",
53
- "lint": "eslint \"src/**/*.ts\"",
54
- "lint:fix": "eslint \"src/**/*.ts\" --fix",
55
- "pretty": "prettier --write \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
56
- "pretty:check": "prettier --check \"./{{src,doc}/**/*.{ts,tsx,md},README.md}\"",
57
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
58
- "audit": "npm audit --audit-level=high"
86
+ "./cjs/node": {
87
+ "import": "./esm/node/index.js",
88
+ "require": "./cjs/node/index.js",
89
+ "types": "./types/node/index.js"
59
90
  },
60
- "files": [
61
- "/**/*.js",
62
- "/**/*.ts",
63
- "/examples/**/*"
64
- ],
65
- "main": "./cjs/index.js",
66
- "module": "./esm/index.js",
67
- "types": "types/index.d.ts",
68
- "exports": {
69
- ".": {
70
- "import": "./esm/index.js",
71
- "require": "./cjs/index.js",
72
- "types": "./types/index.d.ts"
73
- },
74
- "./web": {
75
- "import": "./esm/web/index.js",
76
- "require": "./cjs/web/index.js",
77
- "types": "./types/web/index.d.ts"
78
- },
79
- "./node": {
80
- "import": "./esm/node/index.js",
81
- "require": "./cjs/node/index.js",
82
- "types": "./types/node/index.d.ts"
83
- },
84
- "./cjs/index": {
85
- "import": "./esm/index.js",
86
- "require": "./cjs/index.js",
87
- "types": "./types/index.d.ts"
88
- },
89
- "./cjs/node": {
90
- "import": "./esm/node/index.js",
91
- "require": "./cjs/node/index.js",
92
- "types": "./types/node/index.js"
93
- },
94
- "./cjs/node/index": {
95
- "import": "./esm/node/index.js",
96
- "require": "./cjs/node/index.js",
97
- "types": "./types/node/index.js"
98
- }
99
- },
100
- "repository": {
101
- "type": "git",
102
- "url": "git+https://github.com/CamStreamer/CamStreamerLib.git"
103
- },
104
- "keywords": [
105
- "CamStreamer",
106
- "CamOverlay",
107
- "CamScripter",
108
- "Camera",
109
- "Axis"
110
- ],
111
- "author": "CamStreamer s.r.o",
112
- "license": "ISC",
113
- "bugs": {
114
- "url": "https://github.com/CamStreamer/CamStreamerLib/issues"
115
- },
116
- "homepage": "https://github.com/CamStreamer/CamStreamerLib#readme"
91
+ "./cjs/node/index": {
92
+ "import": "./esm/node/index.js",
93
+ "require": "./cjs/node/index.js",
94
+ "types": "./types/node/index.js"
95
+ }
96
+ },
97
+ "repository": {
98
+ "type": "git",
99
+ "url": "git+https://github.com/CamStreamer/CamStreamerLib.git"
100
+ },
101
+ "keywords": [
102
+ "CamStreamer",
103
+ "CamOverlay",
104
+ "CamScripter",
105
+ "Camera",
106
+ "Axis"
107
+ ],
108
+ "author": "CamStreamer s.r.o",
109
+ "license": "ISC",
110
+ "bugs": {
111
+ "url": "https://github.com/CamStreamer/CamStreamerLib/issues"
112
+ },
113
+ "homepage": "https://github.com/CamStreamer/CamStreamerLib#readme"
117
114
  }
@@ -14,6 +14,12 @@ export declare class CamOverlayAPI<Client extends IClient<TResponse, any>> exten
14
14
  }[]>;
15
15
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
16
16
  getMjpegStreamImage(mjpegUrl: string, options?: THttpRequestOptions): Promise<ReturnType<Awaited<ReturnType<Client["get"]>>["blob"]>>;
17
+ isViewerPassValid(pass: string, options?: THttpRequestOptions): Promise<boolean>;
18
+ getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<{
19
+ alias: string;
20
+ ws: string;
21
+ ws_initial_message: string;
22
+ }>;
17
23
  listFiles<T extends TFileType>(fileType: T, options?: THttpRequestOptions): Promise<TFileList<T>>;
18
24
  uploadFile<T extends TFileType>(fileType: T, formData: Parameters<Client['post']>[0]['data'], storage: TFileStorageType<T>, options?: THttpRequestOptions): Promise<void>;
19
25
  removeFile<T extends TFileType>(fileType: T, fileParams: TFile<T>, options?: THttpRequestOptions): Promise<void>;
@@ -28,9 +28,9 @@ export declare class CamSwitcherAPI<Client extends IClient<TResponse, any>> exte
28
28
  }[]>;
29
29
  wsAuthorization(options?: THttpRequestOptions): Promise<string>;
30
30
  getOutputInfo(options?: THttpRequestOptions): Promise<{
31
- rtspUrl: string;
32
31
  ws: string;
33
32
  wsInitialMessage: string;
33
+ rtspUrl: string;
34
34
  }>;
35
35
  getAudioPushInfo(options?: THttpRequestOptions): Promise<{
36
36
  ws: string;
@@ -12,9 +12,9 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
12
12
  checkCameraTime(options?: THttpRequestOptions): Promise<boolean>;
13
13
  serverRunCheck(options?: THttpRequestOptions): Promise<boolean>;
14
14
  getLiveViewAlias(rtspUrl: string, options?: THttpRequestOptions): Promise<{
15
+ alias: string;
15
16
  ws: string;
16
17
  ws_initial_message: string;
17
- alias: string;
18
18
  }>;
19
19
  resetPtzCalibration(options?: THttpRequestOptions): Promise<void>;
20
20
  resetFocusCalibration(options?: THttpRequestOptions): Promise<void>;
@@ -45,8 +45,23 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
45
45
  focusCalibrationPoints: string;
46
46
  };
47
47
  cameraConfig: {
48
- defaultCaptureSizeMeters: number;
49
- captureSizeExtensionMeters: number;
48
+ aircraft: {
49
+ defaultCaptureSizeMeters: number;
50
+ captureSizeExtensionMeters: number;
51
+ };
52
+ drone: {
53
+ defaultCaptureSizeMeters: number;
54
+ captureSizeExtensionMeters: number;
55
+ };
56
+ } | {
57
+ aircraft: {
58
+ defaultCaptureSizeMeters: number;
59
+ captureSizeExtensionMeters: number;
60
+ };
61
+ drone: {
62
+ defaultCaptureSizeMeters: number;
63
+ captureSizeExtensionMeters: number;
64
+ };
50
65
  };
51
66
  stream: {
52
67
  width: number;
@@ -99,11 +114,29 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
99
114
  priority: number;
100
115
  };
101
116
  identificationLabel: {
102
- firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
103
- secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
104
- thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
105
- fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
106
- opacity: number;
117
+ aircraft: {
118
+ firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
119
+ secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
120
+ thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
121
+ fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
122
+ opacity: number;
123
+ };
124
+ drone: {
125
+ firstRow: "blank" | "remote_id";
126
+ opacity: number;
127
+ };
128
+ } | {
129
+ aircraft: {
130
+ firstRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
131
+ secondRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
132
+ thirdRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
133
+ fourthRow: "blank" | "registration" | "call_sign" | "flight_number" | "icao";
134
+ opacity: number;
135
+ };
136
+ drone: {
137
+ firstRow: "blank" | "remote_id";
138
+ opacity: number;
139
+ };
107
140
  };
108
141
  acs: {
109
142
  ip: string;
@@ -181,11 +214,11 @@ export declare class PlaneTrackerAPI<Client extends IClient<TResponse, any>> ext
181
214
  importAppSettings(dataType: TImportDataType, formData: Parameters<Client['post']>[0]['data'], options?: THttpRequestOptions): Promise<void>;
182
215
  getDomainList(options?: THttpRequestOptions): Promise<Partial<Record<"adsb" | "remoteId", {
183
216
  uiName: string;
184
- icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator" | "vehicle";
217
+ icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
185
218
  categoryList: {
186
219
  categoryId: string;
187
220
  uiName: string;
188
- icon: "unknown" | "small" | "large" | "heavy" | "helicopter" | "drone" | "operator" | "vehicle";
221
+ icon: "unknown" | "small" | "drone" | "large" | "heavy" | "helicopter" | "operator" | "vehicle";
189
222
  }[];
190
223
  }>>>;
191
224
  fetchFlightInfo(targetId: string, options?: THttpRequestOptions): Promise<{
@@ -25,21 +25,21 @@ export declare const outputInfoSchema: z.ZodEffects<z.ZodObject<{
25
25
  ws: z.ZodString;
26
26
  ws_initial_message: z.ZodString;
27
27
  }, "strip", z.ZodTypeAny, {
28
- rtsp_url: string;
29
28
  ws: string;
30
29
  ws_initial_message: string;
31
- }, {
32
30
  rtsp_url: string;
31
+ }, {
33
32
  ws: string;
34
33
  ws_initial_message: string;
34
+ rtsp_url: string;
35
35
  }>, {
36
- rtspUrl: string;
37
36
  ws: string;
38
37
  wsInitialMessage: string;
38
+ rtspUrl: string;
39
39
  }, {
40
- rtsp_url: string;
41
40
  ws: string;
42
41
  ws_initial_message: string;
42
+ rtsp_url: string;
43
43
  }>;
44
44
  export type TOutputInfo = z.infer<typeof outputInfoSchema>;
45
45
  export declare const audioPushInfoSchema: z.ZodEffects<z.ZodObject<{