alphatheta-connect 0.23.2 → 0.25.1
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/lib/cli.js +515 -115
- package/lib/cli.js.map +1 -1
- package/lib/constants.d.ts +4 -2
- package/lib/db/getMetadata.d.ts +13 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +517 -116
- package/lib/index.js.map +1 -1
- package/lib/localdb/index.d.ts +47 -1
- package/lib/network.d.ts +10 -9
- package/lib/remotedb/index.d.ts +9 -5
- package/lib/status/types.d.ts +54 -6
- package/lib/types.js +20 -1
- package/lib/types.js.map +1 -1
- package/lib/virtualcdj/device-id.d.ts +36 -7
- package/lib/virtualcdj/heartbeat.d.ts +51 -0
- package/lib/virtualcdj/heartbeat.test.d.ts +1 -0
- package/lib/virtualcdj/index.d.ts +1 -0
- package/package.json +1 -1
package/lib/constants.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The default virtual CDJ ID to use.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* metadata
|
|
4
|
+
* Out of the 1-6 player range, so it can never collide with a real CDJ.
|
|
5
|
+
* Remotedb metadata still works from here: the 1-6 restriction applies to the
|
|
6
|
+
* device-ID byte inside remotedb messages, which RemoteDatabase picks
|
|
7
|
+
* per-connection independently of the announced ID.
|
|
6
8
|
*/
|
|
7
9
|
export declare const DEFAULT_VCDJ_ID = 7;
|
|
8
10
|
/**
|
package/lib/db/getMetadata.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Track } from "../entities";
|
|
2
2
|
import LocalDatabase from "../localdb";
|
|
3
|
+
import { DatabaseType } from "../localdb/database-adapter";
|
|
3
4
|
import RemoteDatabase from "../remotedb";
|
|
4
5
|
import { Device, DeviceID, MediaSlot, TrackType } from "../types";
|
|
5
6
|
import { TelemetrySpan as Span } from "../utils/telemetry";
|
|
@@ -20,6 +21,12 @@ export interface Options {
|
|
|
20
21
|
* The track id to retrieve metadata for
|
|
21
22
|
*/
|
|
22
23
|
trackId: number;
|
|
24
|
+
/**
|
|
25
|
+
* The track's BPM as the player reports it in its status packet, when known.
|
|
26
|
+
* Used to check that the local database row for `trackId` is really the
|
|
27
|
+
* track the player is showing (see {@link LocalDatabase.findTrack}).
|
|
28
|
+
*/
|
|
29
|
+
trackBPM?: number | null;
|
|
23
30
|
/**
|
|
24
31
|
* The Sentry transaction span
|
|
25
32
|
*/
|
|
@@ -43,9 +50,15 @@ export type LocalMiss =
|
|
|
43
50
|
export type LocalResult = {
|
|
44
51
|
track: Track;
|
|
45
52
|
miss: null;
|
|
53
|
+
/**
|
|
54
|
+
* Set when the slot had to switch to its other database format to
|
|
55
|
+
* answer: the format it is now served from.
|
|
56
|
+
*/
|
|
57
|
+
switchedTo: DatabaseType | null;
|
|
46
58
|
} | {
|
|
47
59
|
track: null;
|
|
48
60
|
miss: LocalMiss;
|
|
61
|
+
switchedTo: null;
|
|
49
62
|
};
|
|
50
63
|
export declare function viaRemote(remote: RemoteDatabase, opts: Required<Options>): Promise<Track<import("../entities").EntityFK.WithRelations> | null>;
|
|
51
64
|
export declare function viaLocal(local: LocalDatabase, device: Device, opts: Required<Options>): Promise<LocalResult>;
|
package/lib/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export { fetchFile } from './nfs';
|
|
|
13
13
|
export type { DatabaseAdapter, DatabasePreference, DatabaseType, PlaylistQueryResult, } from 'onelibrary-connect';
|
|
14
14
|
export { OneLibraryAdapter } from 'onelibrary-connect';
|
|
15
15
|
export type { Category, DeviceProperty, HistorySession, HotCueBankList, MenuItem, MyTag, SortOption, } from 'onelibrary-connect';
|
|
16
|
-
export type { DeviceLike, PickDeviceIdOptions } from './virtualcdj/device-id';
|
|
17
|
-
export { DEFAULT_MIXER_PLAYER_CEILING, MAX_DEVICE_ID, MIXER_PLAYER_CEILING, pickAvailableDeviceId, playerNumberCeiling, REMOTEDB_MAX_DEVICE_ID, } from './virtualcdj/device-id';
|
|
16
|
+
export type { DeviceLike, PickDeviceIdOptions, QueryIdDeviceLike, } from './virtualcdj/device-id';
|
|
17
|
+
export { DEFAULT_MIXER_PLAYER_CEILING, MAX_DEVICE_ID, MIXER_PLAYER_CEILING, pickAvailableDeviceId, pickRemoteDbQueryId, playerNumberCeiling, REMOTEDB_MAX_DEVICE_ID, } from './virtualcdj/device-id';
|
|
18
18
|
export type { Logger } from './logger';
|
|
19
19
|
export { noopLogger } from './logger';
|
|
20
20
|
export * from './types';
|