camstreamerlib 4.0.0-beta.25 → 4.0.0-beta.26

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/cjs/VapixAPI.d.ts CHANGED
@@ -58,7 +58,7 @@ export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TRespo
58
58
  getPtzPosition(camera: number, proxy?: TProxyParam): Promise<TCameraPTZItemData>;
59
59
  getInputState(port: number, proxy?: TProxyParam): Promise<boolean>;
60
60
  setOutputState(port: number, active: boolean, proxy?: TProxyParam): Promise<TResponse>;
61
- getApplicationList(proxy?: TProxyParam): Promise<any[]>;
61
+ getApplicationList(proxy?: TProxyParam): Promise<any>;
62
62
  startApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
63
63
  restartApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
64
64
  stopApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
package/cjs/VapixAPI.js CHANGED
@@ -370,9 +370,9 @@ class VapixAPI {
370
370
  allowBooleanAttributes: true,
371
371
  });
372
372
  const result = parser.parse(xml);
373
- const apps = [];
374
- for (let i = 0; i < result.reply.application.length; i++) {
375
- apps.push(result.reply.application[i].$);
373
+ let apps = result.reply.application ?? [];
374
+ if (!Array.isArray(apps)) {
375
+ apps = [apps];
376
376
  }
377
377
  return apps.map((app) => {
378
378
  return {
package/esm/VapixAPI.d.ts CHANGED
@@ -58,7 +58,7 @@ export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TRespo
58
58
  getPtzPosition(camera: number, proxy?: TProxyParam): Promise<TCameraPTZItemData>;
59
59
  getInputState(port: number, proxy?: TProxyParam): Promise<boolean>;
60
60
  setOutputState(port: number, active: boolean, proxy?: TProxyParam): Promise<TResponse>;
61
- getApplicationList(proxy?: TProxyParam): Promise<any[]>;
61
+ getApplicationList(proxy?: TProxyParam): Promise<any>;
62
62
  startApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
63
63
  restartApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
64
64
  stopApplication(applicationID: string, proxy?: TProxyParam): Promise<void>;
package/esm/VapixAPI.js CHANGED
@@ -367,9 +367,9 @@ export class VapixAPI {
367
367
  allowBooleanAttributes: true,
368
368
  });
369
369
  const result = parser.parse(xml);
370
- const apps = [];
371
- for (let i = 0; i < result.reply.application.length; i++) {
372
- apps.push(result.reply.application[i].$);
370
+ let apps = result.reply.application ?? [];
371
+ if (!Array.isArray(apps)) {
372
+ apps = [apps];
373
373
  }
374
374
  return apps.map((app) => {
375
375
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstreamerlib",
3
- "version": "4.0.0-beta.25",
3
+ "version": "4.0.0-beta.26",
4
4
  "description": "Helper library for CamStreamer ACAP applications.",
5
5
  "prettier": "@camstreamer/prettier-config",
6
6
  "dependencies": {