@basmilius/apple-common 0.9.14 → 0.9.15

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/dist/index.d.mts CHANGED
@@ -12,7 +12,7 @@ declare function v4(options?: Version4Options, buf?: undefined, offset?: number)
12
12
  declare function v4<TBuf extends Uint8Array = Uint8Array>(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf;
13
13
  //#endregion
14
14
  //#region src/airplayFeatures.d.ts
15
- declare const AirPlayFeatureFlags: {
15
+ type AirPlayFeatureFlagsType = {
16
16
  readonly SupportsAirPlayVideoV1: bigint;
17
17
  readonly SupportsAirPlayPhoto: bigint;
18
18
  readonly SupportsAirPlayVideoFairPlay: bigint;
@@ -58,15 +58,16 @@ declare const AirPlayFeatureFlags: {
58
58
  readonly SupportsAudioMetadataControl: bigint;
59
59
  readonly SupportsRFC2198Redundancy: bigint;
60
60
  };
61
+ declare const AirPlayFeatureFlags: AirPlayFeatureFlagsType;
61
62
  type AirPlayFeatureFlagName = keyof typeof AirPlayFeatureFlags;
62
63
  type PairingRequirement = 'none' | 'pin' | 'transient' | 'homekit';
63
- declare const parseFeatures: (features: string) => bigint;
64
- declare const hasFeatureFlag: (features: bigint, flag: bigint) => boolean;
65
- declare const describeFlags: (features: bigint) => AirPlayFeatureFlagName[];
66
- declare const getProtocolVersion: (txt: Record<string, string>) => 1 | 2;
67
- declare const getPairingRequirement: (txt: Record<string, string>) => PairingRequirement;
68
- declare const isPasswordRequired: (txt: Record<string, string>) => boolean;
69
- declare const isRemoteControlSupported: (txt: Record<string, string>) => boolean;
64
+ declare function parseFeatures(features: string): bigint;
65
+ declare function hasFeatureFlag(features: bigint, flag: bigint): boolean;
66
+ declare function describeFlags(features: bigint): AirPlayFeatureFlagName[];
67
+ declare function getProtocolVersion(txt: Record<string, string>): 1 | 2;
68
+ declare function getPairingRequirement(txt: Record<string, string>): PairingRequirement;
69
+ declare function isPasswordRequired(txt: Record<string, string>): boolean;
70
+ declare function isRemoteControlSupported(txt: Record<string, string>): boolean;
70
71
  //#endregion
71
72
  //#region src/reporter.d.ts
72
73
  type DebugGroup = 'debug' | 'error' | 'info' | 'net' | 'raw' | 'warn';
@@ -318,16 +319,13 @@ type MdnsService = {
318
319
  readonly port: number;
319
320
  readonly properties: Record<string, string>;
320
321
  };
321
- declare const unicast: (hosts: string[], services: string[], timeout?: number) => Promise<MdnsService[]>;
322
- declare const multicast: (services: string[], timeout?: number) => Promise<MdnsService[]>;
322
+ declare function unicast(hosts: string[], services: string[], timeout?: number): Promise<MdnsService[]>;
323
+ declare function multicast(services: string[], timeout?: number): Promise<MdnsService[]>;
323
324
  //#endregion
324
325
  //#region src/cli.d.ts
325
326
  declare function prompt(message: string): Promise<string>;
326
327
  declare function waitFor(ms: number): Promise<void>;
327
328
  //#endregion
328
- //#region src/symbols.d.ts
329
- declare const ENCRYPTION: unique symbol;
330
- //#endregion
331
329
  //#region src/connection.d.ts
332
330
  type ConnectionEventMap = {
333
331
  close: [hadError: boolean];
@@ -337,7 +335,7 @@ type ConnectionEventMap = {
337
335
  error: [err: Error];
338
336
  timeout: [];
339
337
  };
340
- declare class Connection<TEventMap extends EventMap> extends EventEmitter<ConnectionEventMap | TEventMap> {
338
+ declare class Connection<TEventMap extends EventMap = {}> extends EventEmitter<ConnectionEventMap & TEventMap> {
341
339
  #private;
342
340
  get address(): string;
343
341
  get context(): Context;
@@ -354,7 +352,7 @@ declare class Connection<TEventMap extends EventMap> extends EventEmitter<Connec
354
352
  }
355
353
  declare class EncryptionAwareConnection<TEventMap extends EventMap> extends Connection<TEventMap> {
356
354
  get isEncrypted(): boolean;
357
- [ENCRYPTION]?: EncryptionState;
355
+ _encryption?: EncryptionState;
358
356
  enableEncryption(readKey: Buffer, writeKey: Buffer): void;
359
357
  }
360
358
  declare class EncryptionState {
@@ -372,6 +370,9 @@ declare const AIRPLAY_SERVICE = "_airplay._tcp.local";
372
370
  declare const COMPANION_LINK_SERVICE = "_companion-link._tcp.local";
373
371
  declare const RAOP_SERVICE = "_raop._tcp.local";
374
372
  //#endregion
373
+ //#region src/symbols.d.ts
374
+ declare const ENCRYPTION: unique symbol;
375
+ //#endregion
375
376
  //#region src/timing.d.ts
376
377
  declare class TimingServer {
377
378
  #private;