camstreamerlib 4.0.36 → 5.0.0-54e362c

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.
Files changed (110) hide show
  1. package/README.md +21 -2
  2. package/cjs/CamOverlayAPI.d.ts +223 -208
  3. package/cjs/CamStreamerAPI.d.ts +330 -311
  4. package/cjs/CamStreamerAPI.js +1 -1
  5. package/cjs/CamSwitcherAPI.d.ts +31 -30
  6. package/cjs/CamSwitcherAPI.js +2 -0
  7. package/cjs/PlaneTrackerAPI.d.ts +103 -40
  8. package/cjs/VapixAPI.d.ts +31 -17
  9. package/cjs/VapixAPI.js +1 -1
  10. package/cjs/errors/errors.d.ts +1 -1
  11. package/cjs/errors/errors.js +2 -2
  12. package/cjs/internal/versionCompare.d.ts +2 -2
  13. package/cjs/node/events/AxisCameraStationEvents.js +2 -1
  14. package/cjs/types/CamOverlayAPI/CamOverlayAPI.d.ts +477 -3812
  15. package/cjs/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  16. package/cjs/types/CamOverlayAPI/accuweatherSchema.d.ts +12 -67
  17. package/cjs/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -572
  18. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.d.ts +6 -59
  19. package/cjs/types/CamOverlayAPI/htmlOverlaySchema.js +1 -1
  20. package/cjs/types/CamOverlayAPI/imagesSchema.d.ts +6 -75
  21. package/cjs/types/CamOverlayAPI/infotickerSchema.d.ts +11 -74
  22. package/cjs/types/CamOverlayAPI/pipSchema.d.ts +12 -97
  23. package/cjs/types/CamOverlayAPI/pipSchema.js +2 -2
  24. package/cjs/types/CamOverlayAPI/ptzCompassSchema.d.ts +12 -71
  25. package/cjs/types/CamOverlayAPI/ptzCompassSchema.js +1 -1
  26. package/cjs/types/CamOverlayAPI/ptzSchema.d.ts +8 -99
  27. package/cjs/types/CamOverlayAPI/scoreBoardSchema.d.ts +20 -254
  28. package/cjs/types/CamOverlayAPI/screenSharingSchema.d.ts +5 -43
  29. package/cjs/types/CamOverlayAPI/serviceCommonTypes.d.ts +15 -94
  30. package/cjs/types/CamOverlayAPI/webCameraSharingSchema.d.ts +5 -43
  31. package/cjs/types/CamScripterAPI.d.ts +11 -81
  32. package/cjs/types/CamStreamerAPI/CamStreamerAPI.d.ts +1409 -22709
  33. package/cjs/types/CamStreamerAPI/facebookSchema.d.ts +32 -509
  34. package/cjs/types/CamStreamerAPI/oldStreamSchema.d.ts +8 -143
  35. package/cjs/types/CamStreamerAPI/streamCommonTypes.d.ts +32 -493
  36. package/cjs/types/CamStreamerAPI/streamsSchema.d.ts +425 -7786
  37. package/cjs/types/CamStreamerAPI/windySchema.d.ts +36 -476
  38. package/cjs/types/CamStreamerAPI/youtubeSchema.d.ts +32 -487
  39. package/cjs/types/CamStreamerAPI/youtubeSchema.js +1 -1
  40. package/cjs/types/CamSwitcherAPI.d.ts +75 -700
  41. package/cjs/types/CamSwitcherAPI.js +1 -0
  42. package/cjs/types/GenetecAgent.d.ts +12 -132
  43. package/cjs/types/MilestoneAgent.d.ts +4 -46
  44. package/cjs/types/PlaneTrackerAPI.d.ts +266 -1188
  45. package/cjs/types/PlaneTrackerAPI.js +16 -6
  46. package/cjs/types/PlaneTrackerAPI.test.js +27 -0
  47. package/cjs/types/VapixAPI.d.ts +129 -1653
  48. package/cjs/types/VapixAPI.js +1 -1
  49. package/cjs/types/common.d.ts +11 -35
  50. package/cjs/types/common.js +1 -1
  51. package/cjs/types/ws/CamOverlayEvents.d.ts +9 -69
  52. package/cjs/types/ws/CamStreamerEvents.d.ts +19 -217
  53. package/cjs/types/ws/CamSwitcherEvents.d.ts +46 -452
  54. package/cjs/types/ws/PlaneTrackerEvents.d.ts +361 -3522
  55. package/cjs/types/ws/PlaneTrackerEvents.js +1 -1
  56. package/esm/CamStreamerAPI.js +1 -1
  57. package/esm/CamSwitcherAPI.js +2 -0
  58. package/esm/VapixAPI.js +1 -1
  59. package/esm/errors/errors.js +2 -2
  60. package/esm/node/events/AxisCameraStationEvents.js +2 -1
  61. package/esm/types/CamOverlayAPI/CamOverlayAPI.js +2 -2
  62. package/esm/types/CamOverlayAPI/htmlOverlaySchema.js +1 -1
  63. package/esm/types/CamOverlayAPI/pipSchema.js +2 -2
  64. package/esm/types/CamOverlayAPI/ptzCompassSchema.js +1 -1
  65. package/esm/types/CamStreamerAPI/youtubeSchema.js +1 -1
  66. package/esm/types/CamSwitcherAPI.js +1 -0
  67. package/esm/types/PlaneTrackerAPI.js +16 -6
  68. package/esm/types/PlaneTrackerAPI.test.js +27 -0
  69. package/esm/types/VapixAPI.js +1 -1
  70. package/esm/types/common.js +1 -1
  71. package/esm/types/ws/PlaneTrackerEvents.js +1 -1
  72. package/package.json +107 -107
  73. package/types/CamOverlayAPI.d.ts +223 -208
  74. package/types/CamStreamerAPI.d.ts +330 -311
  75. package/types/CamSwitcherAPI.d.ts +31 -30
  76. package/types/PlaneTrackerAPI.d.ts +103 -40
  77. package/types/VapixAPI.d.ts +31 -17
  78. package/types/errors/errors.d.ts +1 -1
  79. package/types/internal/versionCompare.d.ts +2 -2
  80. package/types/types/CamOverlayAPI/CamOverlayAPI.d.ts +477 -3812
  81. package/types/types/CamOverlayAPI/accuweatherSchema.d.ts +12 -67
  82. package/types/types/CamOverlayAPI/customGraphicsSchema.d.ts +40 -572
  83. package/types/types/CamOverlayAPI/htmlOverlaySchema.d.ts +6 -59
  84. package/types/types/CamOverlayAPI/imagesSchema.d.ts +6 -75
  85. package/types/types/CamOverlayAPI/infotickerSchema.d.ts +11 -74
  86. package/types/types/CamOverlayAPI/pipSchema.d.ts +12 -97
  87. package/types/types/CamOverlayAPI/ptzCompassSchema.d.ts +12 -71
  88. package/types/types/CamOverlayAPI/ptzSchema.d.ts +8 -99
  89. package/types/types/CamOverlayAPI/scoreBoardSchema.d.ts +20 -254
  90. package/types/types/CamOverlayAPI/screenSharingSchema.d.ts +5 -43
  91. package/types/types/CamOverlayAPI/serviceCommonTypes.d.ts +15 -94
  92. package/types/types/CamOverlayAPI/webCameraSharingSchema.d.ts +5 -43
  93. package/types/types/CamScripterAPI.d.ts +11 -81
  94. package/types/types/CamStreamerAPI/CamStreamerAPI.d.ts +1409 -22709
  95. package/types/types/CamStreamerAPI/facebookSchema.d.ts +32 -509
  96. package/types/types/CamStreamerAPI/oldStreamSchema.d.ts +8 -143
  97. package/types/types/CamStreamerAPI/streamCommonTypes.d.ts +32 -493
  98. package/types/types/CamStreamerAPI/streamsSchema.d.ts +425 -7786
  99. package/types/types/CamStreamerAPI/windySchema.d.ts +36 -476
  100. package/types/types/CamStreamerAPI/youtubeSchema.d.ts +32 -487
  101. package/types/types/CamSwitcherAPI.d.ts +75 -700
  102. package/types/types/GenetecAgent.d.ts +12 -132
  103. package/types/types/MilestoneAgent.d.ts +4 -46
  104. package/types/types/PlaneTrackerAPI.d.ts +266 -1188
  105. package/types/types/VapixAPI.d.ts +129 -1653
  106. package/types/types/common.d.ts +11 -35
  107. package/types/types/ws/CamOverlayEvents.d.ts +9 -69
  108. package/types/types/ws/CamStreamerEvents.d.ts +19 -217
  109. package/types/types/ws/CamSwitcherEvents.d.ts +46 -452
  110. package/types/types/ws/PlaneTrackerEvents.d.ts +361 -3522
@@ -78,7 +78,7 @@ var EUserActions;
78
78
  EUserActions["UNLOCK_API"] = "unlockApi.cgi";
79
79
  })(EUserActions || (exports.EUserActions = EUserActions = {}));
80
80
  const eventsDataSchema = zod_1.z.union([
81
- zod_1.z.object({ type: zod_1.z.literal('CAMERA_POSITION') }).merge(wsCameraPositionDataSchema),
81
+ zod_1.z.object({ type: zod_1.z.literal('CAMERA_POSITION') }).extend(wsCameraPositionDataSchema.shape),
82
82
  zod_1.z.object({
83
83
  type: zod_1.z.literal('TRACKING_START'),
84
84
  icao: zod_1.z.string(),
@@ -98,7 +98,7 @@ export class CamStreamerAPI extends BasicAPI {
98
98
  if (newStream.success) {
99
99
  return newStream.data;
100
100
  }
101
- const oldStream = oldStringStreamSchema.passthrough().parse(res.data);
101
+ const oldStream = oldStringStreamSchema.loose().parse(res.data);
102
102
  throw new MigrationError([], [{ streamId, ...parseCameraStreamResponse(oldStream) }], [], []);
103
103
  }
104
104
  async setStream(streamId, streamData, options) {
@@ -153,6 +153,7 @@ export class CamSwitcherAPI extends BasicAPI {
153
153
  audio: {
154
154
  sampleRate: data.audioSampleRate,
155
155
  channelCount: data.audioChannelCount,
156
+ bitrate: data.audioBitrate,
156
157
  },
157
158
  keyboard: data.keyboard,
158
159
  };
@@ -204,6 +205,7 @@ export class CamSwitcherAPI extends BasicAPI {
204
205
  const settings = {
205
206
  audioSampleRate: saveData.audio?.sampleRate,
206
207
  audioChannelCount: saveData.audio?.channelCount,
208
+ audioBitrate: saveData.audio?.bitrate,
207
209
  keyboard: saveData.keyboard,
208
210
  fps: saveData.video.fps,
209
211
  resolution: saveData.video.resolution,
package/esm/VapixAPI.js CHANGED
@@ -196,7 +196,7 @@ export class VapixAPI extends BasicAPI {
196
196
  async getHeaders(options) {
197
197
  const data = { apiVersion: '1.0', method: 'list' };
198
198
  const res = await this._postJsonEncoded('/axis-cgi/customhttpheader.cgi', data, undefined, options);
199
- return z.object({ data: z.record(z.string()) }).parse(await res.json()).data;
199
+ return z.object({ data: z.record(z.string(), z.string()) }).parse(await res.json()).data;
200
200
  }
201
201
  async setHeaders(headers, options) {
202
202
  const data = { apiVersion: '1.0', method: 'set', params: headers };
@@ -1,7 +1,7 @@
1
1
  export class ErrorWithResponse extends Error {
2
2
  res;
3
- constructor(res) {
4
- super(res.statusText);
3
+ constructor(res, message) {
4
+ super(message ?? res.statusText);
5
5
  this.res = res;
6
6
  this.name = 'ErrorWithResponse';
7
7
  }
@@ -1,3 +1,4 @@
1
+ import { ErrorWithResponse } from '../../errors/errors';
1
2
  import { pad } from '../../internal/utils';
2
3
  import { ProxyClient } from '../../internal/ProxyClient';
3
4
  import { DefaultClient } from '../DefaultClient';
@@ -33,7 +34,7 @@ export class AxisCameraStationEvents {
33
34
  timeout: options?.timeout,
34
35
  });
35
36
  if (!res.ok) {
36
- throw new Error(`ACS status code: ${res.status}`);
37
+ throw new ErrorWithResponse(res, `ACS status code: ${res.status}`);
37
38
  }
38
39
  }
39
40
  getDate() {
@@ -84,12 +84,12 @@ export const getStorageResponseSchema = (fileType) => {
84
84
  };
85
85
  export const imageFileSchema = z.object({
86
86
  name: z.string(),
87
- path: z.string().url(),
87
+ path: z.url(),
88
88
  storage: imageFileStorageTypeSchema,
89
89
  });
90
90
  export const fontFileSchema = z.object({
91
91
  name: z.string(),
92
- path: z.string().url(),
92
+ path: z.url(),
93
93
  storage: fontFileStorageTypeSchema,
94
94
  });
95
95
  export const getFileSchema = (fileType) => {
@@ -5,7 +5,7 @@ export const htmlOverlaySchema = serviceCommonSchema.extend({
5
5
  pos_x: z.number().nonnegative(),
6
6
  pos_y: z.number().nonnegative(),
7
7
  coordSystem: coordinateSystemSchema,
8
- url: z.string().url().or(z.literal('')).default(''),
8
+ url: z.url().or(z.literal('')).default(''),
9
9
  pageWidth: z.number().nonnegative(),
10
10
  pageHeight: z.number().nonnegative(),
11
11
  fps: z.number().nonnegative(),
@@ -9,8 +9,8 @@ export const pipSchema = serviceCommonSchema.extend({
9
9
  compression: z.number().nonnegative(),
10
10
  screenSize: z.number().nonnegative(),
11
11
  source_type: z.union([z.literal('axis_camera'), z.literal('mjpeg_url')]),
12
- mjpeg_url: z.union([z.string().url(), z.literal('')]),
13
- camera_ip: z.union([z.string().ip(), z.literal('')]),
12
+ mjpeg_url: z.union([z.url(), z.literal('')]),
13
+ camera_ip: z.union([z.ipv4(), z.ipv6(), z.literal('')]),
14
14
  camera_port: z.number().nonnegative(),
15
15
  camera_user: z.string(),
16
16
  camera_pass: z.string(),
@@ -7,7 +7,7 @@ export const ptzCompassSchema = serviceCommonSchema.extend({
7
7
  coordSystem: coordinateSystemSchema,
8
8
  scale: z.number().nonnegative(),
9
9
  type: z.union([z.literal('compass'), z.literal('map'), z.literal('image')]),
10
- image: z.union([z.string().url(), z.literal('')]),
10
+ image: z.union([z.url(), z.literal('')]),
11
11
  northPan: z.number(),
12
12
  cameraPosX: z.number(),
13
13
  cameraPosY: z.number(),
@@ -5,7 +5,7 @@ export const youtubeSchema = streamCommonSchema.extend({
5
5
  description: z.string().optional(),
6
6
  playlists: z.array(z.string()),
7
7
  tags: z.array(z.string()),
8
- notificationEmails: z.array(z.string().email()),
8
+ notificationEmails: z.array(z.email()),
9
9
  streamPrivacy: z.union([z.literal('public'), z.literal('unlisted'), z.literal('private')]),
10
10
  latency: z.union([z.literal('normal'), z.literal('low'), z.literal('ultra_low')]),
11
11
  afterEndStatus: z.union([z.literal('no_change'), z.literal('public'), z.literal('unlisted'), z.literal('private')]),
@@ -142,6 +142,7 @@ export const cameraOptionsSchema = bitrateVapixParamsSchema
142
142
  bitrateVapixParams: z.string().nullable(),
143
143
  audioSampleRate: z.number(),
144
144
  audioChannelCount: audioChannelCountSchema,
145
+ audioBitrate: z.number().int().nonnegative(),
145
146
  keyboard: z.object({
146
147
  fromSource: keyboardShortcutSchema,
147
148
  none: keyboardShortcutSchema,
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export const connectionSchema = z.object({
3
3
  protocol: z.union([z.literal('http'), z.literal('https'), z.literal('https_insecure')]),
4
- ip: z.union([z.string().ip(), z.literal('')]),
4
+ ip: z.union([z.ipv4(), z.ipv6(), z.literal('')]),
5
5
  port: z.number().positive().lt(65535),
6
6
  user: z.string(),
7
7
  pass: z.string(),
@@ -25,6 +25,7 @@ export const widgetSchema = z.object({
25
25
  posY: z.number().nonnegative(),
26
26
  scale: z.number().positive(),
27
27
  });
28
+ const widgetUnitsSchema = z.union([z.literal('metric'), z.literal('imperial'), z.literal('rotate')]);
28
29
  const labelOptionsSchema = z.union([
29
30
  z.literal('blank'),
30
31
  z.literal('registration'),
@@ -90,7 +91,7 @@ export const cameraSettingsSchema = z.object({
90
91
  adsbSource: z
91
92
  .object({
92
93
  enabled: z.boolean().default(true),
93
- ip: z.union([z.string().ip(), z.literal('')]),
94
+ ip: z.union([z.ipv4(), z.ipv6(), z.literal('')]),
94
95
  port: z.number().positive().lt(65535),
95
96
  useSystemTime: z.boolean().default(false),
96
97
  })
@@ -159,7 +160,7 @@ export const cameraSettingsSchema = z.object({
159
160
  guardTourEnabled: z.boolean().default(false),
160
161
  guardTourId: z.number().int().nonnegative().default(0),
161
162
  })
162
- .default({ prioritizeEmergency: true, guardTourEnabled: false, guardTourId: 0 }),
163
+ .default({ prioritizeEmergency: true, trackingZoneWeightIncrease: 0, guardTourEnabled: false, guardTourId: 0 }),
163
164
  overlayText: z
164
165
  .object({
165
166
  displayIcao: z.boolean().optional(),
@@ -186,18 +187,25 @@ export const cameraSettingsSchema = z.object({
186
187
  displaySystemInfo: z.boolean().optional(),
187
188
  })
188
189
  .optional(),
189
- widget: widgetSchema.default({
190
+ widget: widgetSchema
191
+ .extend({
192
+ units: widgetUnitsSchema.default('rotate'),
193
+ })
194
+ .default({
190
195
  enabled: true,
191
196
  coord: 'top_right',
192
197
  posX: 10,
193
198
  posY: 10,
194
199
  scale: 100,
200
+ units: 'rotate',
195
201
  }),
196
202
  airportWidget: widgetSchema
197
203
  .extend({
198
204
  showWeather: z.boolean().default(false),
199
205
  weatherLocationKey: z.string().default(''),
200
206
  weatherLocationName: z.string().default(''),
207
+ windSpeedUnits: widgetUnitsSchema.default('rotate'),
208
+ temperatureUnits: widgetUnitsSchema.default('rotate'),
201
209
  })
202
210
  .default({
203
211
  enabled: true,
@@ -208,6 +216,8 @@ export const cameraSettingsSchema = z.object({
208
216
  showWeather: false,
209
217
  weatherLocationKey: '',
210
218
  weatherLocationName: '',
219
+ windSpeedUnits: 'rotate',
220
+ temperatureUnits: 'rotate',
211
221
  }),
212
222
  fr24FlightInfoSource: z
213
223
  .object({
@@ -226,7 +236,7 @@ export const cameraSettingsSchema = z.object({
226
236
  .object({
227
237
  enabled: z.boolean().default(false),
228
238
  priority: z.number().int().positive().default(2),
229
- ip: z.union([z.string().ip(), z.literal('')]).default(''),
239
+ ip: z.union([z.ipv4(), z.ipv6(), z.literal('')]).default(''),
230
240
  port: z.number().positive().lt(65535).default(80),
231
241
  })
232
242
  .default({
@@ -426,7 +436,7 @@ const domainDescriptorSchema = z.object({
426
436
  icon: categoryIconSchema,
427
437
  categoryList: z.array(categoryDescriptorSchema),
428
438
  });
429
- export const domainListSchema = z.record(domainIdSchema, domainDescriptorSchema);
439
+ export const domainListSchema = z.partialRecord(domainIdSchema, domainDescriptorSchema);
430
440
  export const ADSB_CATEGORY_IDS = {
431
441
  A_LIGHT: 'A_LIGHT',
432
442
  A_SMALL: 'A_SMALL',
@@ -86,3 +86,30 @@ describe('cameraSettingsSchema cameraConfig', () => {
86
86
  expect(cameraSettingsSchema.safeParse({ cameraConfig }).success).toBe(false);
87
87
  });
88
88
  });
89
+ describe('cameraSettingsSchema widget units', () => {
90
+ const WIDGET = { coord: 'top_left', posX: 10, posY: 10, scale: 100 };
91
+ test('defaults all widget units to rotate', () => {
92
+ const settings = cameraSettingsSchema.parse({});
93
+ expect(settings.widget.units).toBe('rotate');
94
+ expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
95
+ expect(settings.airportWidget.temperatureUnits).toBe('rotate');
96
+ });
97
+ test('defaults missing units of saved widgets to rotate', () => {
98
+ const settings = cameraSettingsSchema.parse({ widget: WIDGET, airportWidget: WIDGET });
99
+ expect(settings.widget.units).toBe('rotate');
100
+ expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
101
+ expect(settings.airportWidget.temperatureUnits).toBe('rotate');
102
+ });
103
+ test('parses independent widget units', () => {
104
+ const settings = cameraSettingsSchema.parse({
105
+ widget: { ...WIDGET, units: 'imperial' },
106
+ airportWidget: { ...WIDGET, windSpeedUnits: 'rotate', temperatureUnits: 'metric' },
107
+ });
108
+ expect(settings.widget.units).toBe('imperial');
109
+ expect(settings.airportWidget.windSpeedUnits).toBe('rotate');
110
+ expect(settings.airportWidget.temperatureUnits).toBe('metric');
111
+ });
112
+ test('rejects an unknown widget unit', () => {
113
+ expect(cameraSettingsSchema.safeParse({ widget: { ...WIDGET, units: 'kelvin' } }).success).toBe(false);
114
+ });
115
+ });
@@ -195,6 +195,6 @@ export const portSequenceStateSchema = z.object({
195
195
  export const recordingConfigItemSchema = z.object({
196
196
  diskid: z.string(),
197
197
  eventid: z.string(),
198
- options: z.record(z.string()),
198
+ options: z.record(z.string(), z.string()),
199
199
  profile: z.string(),
200
200
  });
@@ -11,7 +11,7 @@ export const networkCameraListSchema = z.array(z.object({
11
11
  ip: z.string(),
12
12
  }));
13
13
  export const keyboardShortcutSchema = z.string().nullable();
14
- export const keyboardShortcutsSchema = z.record(keyboardShortcutSchema);
14
+ export const keyboardShortcutsSchema = z.record(z.string(), keyboardShortcutSchema);
15
15
  export const wsAliasResponseSchema = z.object({
16
16
  alias: z.string(),
17
17
  ws: z.string(),
@@ -75,7 +75,7 @@ export var EUserActions;
75
75
  EUserActions["UNLOCK_API"] = "unlockApi.cgi";
76
76
  })(EUserActions || (EUserActions = {}));
77
77
  const eventsDataSchema = z.union([
78
- z.object({ type: z.literal('CAMERA_POSITION') }).merge(wsCameraPositionDataSchema),
78
+ z.object({ type: z.literal('CAMERA_POSITION') }).extend(wsCameraPositionDataSchema.shape),
79
79
  z.object({
80
80
  type: z.literal('TRACKING_START'),
81
81
  icao: z.string(),
package/package.json CHANGED
@@ -1,114 +1,114 @@
1
1
  {
2
- "name": "camstreamerlib",
3
- "version": "4.0.36",
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": "5.0.0-54e362c",
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": "^4.6.7"
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.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"
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"
81
+ "./cjs/index": {
82
+ "import": "./esm/index.js",
83
+ "require": "./cjs/index.js",
84
+ "types": "./types/index.d.ts"
41
85
  },
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"
86
+ "./cjs/node": {
87
+ "import": "./esm/node/index.js",
88
+ "require": "./cjs/node/index.js",
89
+ "types": "./types/node/index.js"
56
90
  },
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"
70
- },
71
- "./web": {
72
- "import": "./esm/web/index.js",
73
- "require": "./cjs/web/index.js",
74
- "types": "./types/web/index.d.ts"
75
- },
76
- "./node": {
77
- "import": "./esm/node/index.js",
78
- "require": "./cjs/node/index.js",
79
- "types": "./types/node/index.d.ts"
80
- },
81
- "./cjs/index": {
82
- "import": "./esm/index.js",
83
- "require": "./cjs/index.js",
84
- "types": "./types/index.d.ts"
85
- },
86
- "./cjs/node": {
87
- "import": "./esm/node/index.js",
88
- "require": "./cjs/node/index.js",
89
- "types": "./types/node/index.js"
90
- },
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"
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"
114
114
  }