onelibrary-connect 1.1.0
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/LICENSE +21 -0
- package/README.md +112 -0
- package/dist/adapter.d.ts +111 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +537 -0
- package/dist/adapter.js.map +1 -0
- package/dist/connection.d.ts +9 -0
- package/dist/connection.d.ts.map +1 -0
- package/dist/connection.js +17 -0
- package/dist/connection.js.map +1 -0
- package/dist/database-adapter.d.ts +50 -0
- package/dist/database-adapter.d.ts.map +1 -0
- package/dist/database-adapter.js +8 -0
- package/dist/database-adapter.js.map +1 -0
- package/dist/encryption.d.ts +11 -0
- package/dist/encryption.d.ts.map +1 -0
- package/dist/encryption.js +70 -0
- package/dist/encryption.js.map +1 -0
- package/dist/entities.d.ts +116 -0
- package/dist/entities.d.ts.map +1 -0
- package/dist/entities.js +10 -0
- package/dist/entities.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/schema.d.ts +251 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +72 -0
- package/dist/schema.js.map +1 -0
- package/dist/types.d.ts +150 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +40 -0
- package/dist/types.js.map +1 -0
- package/package.json +58 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A hotcue button label
|
|
3
|
+
*/
|
|
4
|
+
export declare enum HotcueButton {
|
|
5
|
+
A = 1,
|
|
6
|
+
B = 2,
|
|
7
|
+
C = 3,
|
|
8
|
+
D = 4,
|
|
9
|
+
E = 5,
|
|
10
|
+
F = 6,
|
|
11
|
+
G = 7,
|
|
12
|
+
H = 8
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* When a custom color is not configured the cue point will be one of these
|
|
16
|
+
* colors.
|
|
17
|
+
*/
|
|
18
|
+
export declare enum CueColor {
|
|
19
|
+
None = 0,
|
|
20
|
+
Blank = 21,
|
|
21
|
+
Magenta = 49,
|
|
22
|
+
Violet = 56,
|
|
23
|
+
Fuchsia = 60,
|
|
24
|
+
LightSlateBlue = 62,
|
|
25
|
+
Blue = 1,
|
|
26
|
+
SteelBlue = 5,
|
|
27
|
+
Aqua = 9,
|
|
28
|
+
SeaGreen = 14,
|
|
29
|
+
Teal = 18,
|
|
30
|
+
Green = 22,
|
|
31
|
+
Lime = 26,
|
|
32
|
+
Olive = 30,
|
|
33
|
+
Yellow = 32,
|
|
34
|
+
Orange = 38,
|
|
35
|
+
Red = 42,
|
|
36
|
+
Pink = 45
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents a single cue point. On older exports the label and color may be
|
|
40
|
+
* undefined.
|
|
41
|
+
*/
|
|
42
|
+
export interface CuePoint {
|
|
43
|
+
type: 'cue_point';
|
|
44
|
+
/**
|
|
45
|
+
* Number of milliseconds from the start of the track.
|
|
46
|
+
*/
|
|
47
|
+
offset: number;
|
|
48
|
+
/**
|
|
49
|
+
* The comment associated to the cue point
|
|
50
|
+
*/
|
|
51
|
+
label?: string;
|
|
52
|
+
/**
|
|
53
|
+
* RGB values of the hotcue color
|
|
54
|
+
*/
|
|
55
|
+
color?: CueColor;
|
|
56
|
+
}
|
|
57
|
+
type BareCuePoint = Omit<CuePoint, 'type'>;
|
|
58
|
+
/**
|
|
59
|
+
* A loop, similar to a cue point, but includes a length.
|
|
60
|
+
*/
|
|
61
|
+
export type Loop = BareCuePoint & {
|
|
62
|
+
type: 'loop';
|
|
63
|
+
/**
|
|
64
|
+
* The length in milliseconds of the loop
|
|
65
|
+
*/
|
|
66
|
+
length: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A hotcue is like a cue point, but also includes the button it is assigned to.
|
|
70
|
+
*/
|
|
71
|
+
export type Hotcue = BareCuePoint & {
|
|
72
|
+
type: 'hot_cue';
|
|
73
|
+
/**
|
|
74
|
+
* Which hotcue button this hotcue is assigned to.
|
|
75
|
+
*/
|
|
76
|
+
button: HotcueButton;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* A hot loop, this is the union of a hotcue and a loop.
|
|
80
|
+
*/
|
|
81
|
+
export type Hotloop = {
|
|
82
|
+
type: 'hot_loop';
|
|
83
|
+
} & (Omit<Hotcue, 'type'> & Omit<Loop, 'type'>);
|
|
84
|
+
export type CueAndLoop = CuePoint | Loop | Hotcue | Hotloop;
|
|
85
|
+
/**
|
|
86
|
+
* User-created tag (MyTag)
|
|
87
|
+
*/
|
|
88
|
+
export interface MyTag {
|
|
89
|
+
id: number;
|
|
90
|
+
name: string;
|
|
91
|
+
isFolder: boolean;
|
|
92
|
+
parentId: number | null;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* History session
|
|
96
|
+
*/
|
|
97
|
+
export interface HistorySession {
|
|
98
|
+
id: number;
|
|
99
|
+
name: string;
|
|
100
|
+
parentId: number | null;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Hot cue bank list
|
|
104
|
+
*/
|
|
105
|
+
export interface HotCueBankList {
|
|
106
|
+
id: number;
|
|
107
|
+
name: string;
|
|
108
|
+
parentId: number | null;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Menu item for browsing
|
|
112
|
+
*/
|
|
113
|
+
export interface MenuItem {
|
|
114
|
+
id: number;
|
|
115
|
+
kind: number;
|
|
116
|
+
name: string;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Browse category
|
|
120
|
+
*/
|
|
121
|
+
export interface Category {
|
|
122
|
+
id: number;
|
|
123
|
+
menuItemId: number;
|
|
124
|
+
name: string;
|
|
125
|
+
kind: number;
|
|
126
|
+
isVisible: boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Sort option
|
|
130
|
+
*/
|
|
131
|
+
export interface SortOption {
|
|
132
|
+
id: number;
|
|
133
|
+
menuItemId: number;
|
|
134
|
+
name: string;
|
|
135
|
+
kind: number;
|
|
136
|
+
isVisible: boolean;
|
|
137
|
+
isSelectedAsSubColumn: boolean;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Device property
|
|
141
|
+
*/
|
|
142
|
+
export interface DeviceProperty {
|
|
143
|
+
deviceName: string;
|
|
144
|
+
dbVersion: string;
|
|
145
|
+
numberOfContents: number;
|
|
146
|
+
createdDate: string;
|
|
147
|
+
backgroundColorType: number;
|
|
148
|
+
}
|
|
149
|
+
export {};
|
|
150
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,CAAC,IAAI;IACL,CAAC,IAAA;IACD,CAAC,IAAA;IACD,CAAC,IAAA;IACD,CAAC,IAAA;IACD,CAAC,IAAA;IACD,CAAC,IAAA;IACD,CAAC,IAAA;CACF;AAED;;;GAGG;AACH,oBAAY,QAAQ;IAClB,IAAI,IAAO;IACX,KAAK,KAAO;IACZ,OAAO,KAAO;IACd,MAAM,KAAO;IACb,OAAO,KAAO;IACd,cAAc,KAAO;IACrB,IAAI,IAAO;IACX,SAAS,IAAO;IAChB,IAAI,IAAO;IACX,QAAQ,KAAO;IACf,IAAI,KAAO;IACX,KAAK,KAAO;IACZ,IAAI,KAAO;IACX,KAAK,KAAO;IACZ,MAAM,KAAO;IACb,MAAM,KAAO;IACb,GAAG,KAAO;IACV,IAAI,KAAO;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,C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W,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,qBAAqB,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A hotcue button label
|
|
3
|
+
*/
|
|
4
|
+
export var HotcueButton;
|
|
5
|
+
(function (HotcueButton) {
|
|
6
|
+
HotcueButton[HotcueButton["A"] = 1] = "A";
|
|
7
|
+
HotcueButton[HotcueButton["B"] = 2] = "B";
|
|
8
|
+
HotcueButton[HotcueButton["C"] = 3] = "C";
|
|
9
|
+
HotcueButton[HotcueButton["D"] = 4] = "D";
|
|
10
|
+
HotcueButton[HotcueButton["E"] = 5] = "E";
|
|
11
|
+
HotcueButton[HotcueButton["F"] = 6] = "F";
|
|
12
|
+
HotcueButton[HotcueButton["G"] = 7] = "G";
|
|
13
|
+
HotcueButton[HotcueButton["H"] = 8] = "H";
|
|
14
|
+
})(HotcueButton || (HotcueButton = {}));
|
|
15
|
+
/**
|
|
16
|
+
* When a custom color is not configured the cue point will be one of these
|
|
17
|
+
* colors.
|
|
18
|
+
*/
|
|
19
|
+
export var CueColor;
|
|
20
|
+
(function (CueColor) {
|
|
21
|
+
CueColor[CueColor["None"] = 0] = "None";
|
|
22
|
+
CueColor[CueColor["Blank"] = 21] = "Blank";
|
|
23
|
+
CueColor[CueColor["Magenta"] = 49] = "Magenta";
|
|
24
|
+
CueColor[CueColor["Violet"] = 56] = "Violet";
|
|
25
|
+
CueColor[CueColor["Fuchsia"] = 60] = "Fuchsia";
|
|
26
|
+
CueColor[CueColor["LightSlateBlue"] = 62] = "LightSlateBlue";
|
|
27
|
+
CueColor[CueColor["Blue"] = 1] = "Blue";
|
|
28
|
+
CueColor[CueColor["SteelBlue"] = 5] = "SteelBlue";
|
|
29
|
+
CueColor[CueColor["Aqua"] = 9] = "Aqua";
|
|
30
|
+
CueColor[CueColor["SeaGreen"] = 14] = "SeaGreen";
|
|
31
|
+
CueColor[CueColor["Teal"] = 18] = "Teal";
|
|
32
|
+
CueColor[CueColor["Green"] = 22] = "Green";
|
|
33
|
+
CueColor[CueColor["Lime"] = 26] = "Lime";
|
|
34
|
+
CueColor[CueColor["Olive"] = 30] = "Olive";
|
|
35
|
+
CueColor[CueColor["Yellow"] = 32] = "Yellow";
|
|
36
|
+
CueColor[CueColor["Orange"] = 38] = "Orange";
|
|
37
|
+
CueColor[CueColor["Red"] = 42] = "Red";
|
|
38
|
+
CueColor[CueColor["Pink"] = 45] = "Pink";
|
|
39
|
+
})(CueColor || (CueColor = {}));
|
|
40
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,yCAAK,CAAA;IACL,yCAAC,CAAA;IACD,yCAAC,CAAA;IACD,yCAAC,CAAA;IACD,yCAAC,CAAA;IACD,yCAAC,CAAA;IACD,yCAAC,CAAA;IACD,yCAAC,CAAA;AACH,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,QAmBX;AAnBD,WAAY,QAAQ;IAClB,uCAAW,CAAA;IACX,0CAAY,CAAA;IACZ,8CAAc,CAAA;IACd,4CAAa,CAAA;IACb,8CAAc,CAAA;IACd,4DAAqB,CAAA;IACrB,uCAAW,CAAA;IACX,iDAAgB,CAAA;IAChB,uCAAW,CAAA;IACX,gDAAe,CAAA;IACf,wCAAW,CAAA;IACX,0CAAY,CAAA;IACZ,wCAAW,CAAA;IACX,0CAAY,CAAA;IACZ,4CAAa,CAAA;IACb,4CAAa,CAAA;IACb,sCAAU,CAAA;IACV,wCAAW,CAAA;AACb,CAAC,EAnBW,QAAQ,KAAR,QAAQ,QAmBnB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "onelibrary-connect",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Read and query rekordbox OneLibrary (exportLibrary.db) SQLCipher databases from Pioneer DJ devices",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"README.md",
|
|
19
|
+
"LICENSE"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsc",
|
|
23
|
+
"watch": "tsc --watch",
|
|
24
|
+
"clean": "rm -rf dist",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"test:watch": "vitest",
|
|
27
|
+
"prepublishOnly": "npm run clean && npm run build && npm test"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"rekordbox",
|
|
31
|
+
"onelibrary",
|
|
32
|
+
"exportLibrary",
|
|
33
|
+
"sqlcipher",
|
|
34
|
+
"sqlite",
|
|
35
|
+
"pioneer",
|
|
36
|
+
"alphatheta",
|
|
37
|
+
"dj",
|
|
38
|
+
"cdj",
|
|
39
|
+
"usb"
|
|
40
|
+
],
|
|
41
|
+
"author": "Chris Le <chris@triodemusic.com>",
|
|
42
|
+
"license": "MIT",
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=22.0.0"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"better-sqlite3-multiple-ciphers": "^12.5.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
51
|
+
"@types/node": "^22.15.29",
|
|
52
|
+
"typescript": "^5.9.3",
|
|
53
|
+
"vitest": "^4.0.16"
|
|
54
|
+
},
|
|
55
|
+
"overrides": {
|
|
56
|
+
"rollup": ">=4.59.0"
|
|
57
|
+
}
|
|
58
|
+
}
|