gcm-database 0.0.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.
Files changed (46) hide show
  1. package/dist/base/chart.d.ts +23 -0
  2. package/dist/base/chart.js +3 -0
  3. package/dist/base/chart.js.map +1 -0
  4. package/dist/base/dataOrError.d.ts +7 -0
  5. package/dist/base/dataOrError.js +3 -0
  6. package/dist/base/dataOrError.js.map +1 -0
  7. package/dist/base/database.d.ts +9 -0
  8. package/dist/base/database.js +3 -0
  9. package/dist/base/database.js.map +1 -0
  10. package/dist/chunithm/chart.d.ts +5 -0
  11. package/dist/chunithm/chart.js +3 -0
  12. package/dist/chunithm/chart.js.map +1 -0
  13. package/dist/chunithm/database.d.ts +4 -0
  14. package/dist/chunithm/database.js +3 -0
  15. package/dist/chunithm/database.js.map +1 -0
  16. package/dist/chunithm/difficulty.d.ts +8 -0
  17. package/dist/chunithm/difficulty.js +13 -0
  18. package/dist/chunithm/difficulty.js.map +1 -0
  19. package/dist/chunithm.d.ts +2 -0
  20. package/dist/chunithm.js +6 -0
  21. package/dist/chunithm.js.map +1 -0
  22. package/dist/maimai/chart.d.ts +5 -0
  23. package/dist/maimai/chart.js +3 -0
  24. package/dist/maimai/chart.js.map +1 -0
  25. package/dist/maimai/database.d.ts +4 -0
  26. package/dist/maimai/database.js +3 -0
  27. package/dist/maimai/database.js.map +1 -0
  28. package/dist/maimai/difficulty.d.ts +9 -0
  29. package/dist/maimai/difficulty.js +14 -0
  30. package/dist/maimai/difficulty.js.map +1 -0
  31. package/dist/maimai.d.ts +2 -0
  32. package/dist/maimai.js +6 -0
  33. package/dist/maimai.js.map +1 -0
  34. package/dist/ongeki/chart.d.ts +5 -0
  35. package/dist/ongeki/chart.js +3 -0
  36. package/dist/ongeki/chart.js.map +1 -0
  37. package/dist/ongeki/database.d.ts +4 -0
  38. package/dist/ongeki/database.js +3 -0
  39. package/dist/ongeki/database.js.map +1 -0
  40. package/dist/ongeki/difficulty.d.ts +7 -0
  41. package/dist/ongeki/difficulty.js +12 -0
  42. package/dist/ongeki/difficulty.js.map +1 -0
  43. package/dist/ongeki.d.ts +2 -0
  44. package/dist/ongeki.js +6 -0
  45. package/dist/ongeki.js.map +1 -0
  46. package/package.json +40 -0
@@ -0,0 +1,23 @@
1
+ export interface BaseChart {
2
+ /**
3
+ * A unique identifier of this chart.
4
+ */
5
+ identifier: string;
6
+ /**
7
+ * The displayed title of this chart.
8
+ */
9
+ title: string;
10
+ /**
11
+ * The displayed artist of this chart.
12
+ */
13
+ artist: string;
14
+ /**
15
+ * The displayed difficulty tiers of this chart.
16
+ */
17
+ difficulty: unknown;
18
+ /**
19
+ * Displayed level of this chart.
20
+ */
21
+ level: string;
22
+ optionalData: unknown;
23
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["../../src/base/chart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export type DataOrError<D, E = string> = {
2
+ data: D;
3
+ err?: undefined;
4
+ } | {
5
+ data?: undefined;
6
+ err: E;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=dataOrError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataOrError.js","sourceRoot":"","sources":["../../src/base/dataOrError.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { DataOrError } from "./dataOrError";
2
+ export interface Database<Chart> {
3
+ getJacket(identifier: string): DataOrError<Buffer>;
4
+ getChart(identifier: string): DataOrError<Chart>;
5
+ searchChart(payload: unknown, options: unknown): DataOrError<{
6
+ chart: Chart;
7
+ weight: number;
8
+ }[]>;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/base/database.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { BaseChart } from "../base/chart";
2
+ import type { Difficulty } from "./difficulty";
3
+ export interface Chart extends BaseChart {
4
+ difficulty: Difficulty;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["../../src/chunithm/chart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { Database as BaseDatabase } from "../base/database";
2
+ import type { Chart } from "./chart";
3
+ export interface Database<T extends Chart> extends BaseDatabase<T> {
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/chunithm/database.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export declare enum Difficulty {
2
+ BASIC = "basic",
3
+ ADVANCED = "advanced",
4
+ EXPERT = "expert",
5
+ MASTER = "master",
6
+ RE_MASTER = "remaster",
7
+ WORLDS_END = "worlds_end"
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Difficulty = void 0;
4
+ var Difficulty;
5
+ (function (Difficulty) {
6
+ Difficulty["BASIC"] = "basic";
7
+ Difficulty["ADVANCED"] = "advanced";
8
+ Difficulty["EXPERT"] = "expert";
9
+ Difficulty["MASTER"] = "master";
10
+ Difficulty["RE_MASTER"] = "remaster";
11
+ Difficulty["WORLDS_END"] = "worlds_end";
12
+ })(Difficulty || (exports.Difficulty = Difficulty = {}));
13
+ //# sourceMappingURL=difficulty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"difficulty.js","sourceRoot":"","sources":["../../src/chunithm/difficulty.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAOX;AAPD,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,oCAAsB,CAAA;IACtB,uCAAyB,CAAA;AAC7B,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB"}
@@ -0,0 +1,2 @@
1
+ export { Database } from "./chunithm/database";
2
+ export { Difficulty } from "./chunithm/difficulty";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Difficulty = void 0;
4
+ var difficulty_1 = require("./chunithm/difficulty");
5
+ Object.defineProperty(exports, "Difficulty", { enumerable: true, get: function () { return difficulty_1.Difficulty; } });
6
+ //# sourceMappingURL=chunithm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunithm.js","sourceRoot":"","sources":["../src/chunithm.ts"],"names":[],"mappings":";;;AAEA,mDAAkD;AAAzC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,5 @@
1
+ import type { BaseChart } from "../base/chart";
2
+ import type { Difficulty } from "./difficulty";
3
+ export interface Chart extends BaseChart {
4
+ difficulty: Difficulty;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["../../src/maimai/chart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { Database as BaseDatabase } from "../base/database";
2
+ import type { Chart } from "./chart";
3
+ export interface Database<T extends Chart> extends BaseDatabase<T> {
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/maimai/database.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export declare enum Difficulty {
2
+ EASY = "easy",
3
+ BASIC = "basic",
4
+ ADVANCED = "advanced",
5
+ EXPERT = "expert",
6
+ MASTER = "master",
7
+ RE_MASTER = "remaster",
8
+ UTAGE = "utage"
9
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Difficulty = void 0;
4
+ var Difficulty;
5
+ (function (Difficulty) {
6
+ Difficulty["EASY"] = "easy";
7
+ Difficulty["BASIC"] = "basic";
8
+ Difficulty["ADVANCED"] = "advanced";
9
+ Difficulty["EXPERT"] = "expert";
10
+ Difficulty["MASTER"] = "master";
11
+ Difficulty["RE_MASTER"] = "remaster";
12
+ Difficulty["UTAGE"] = "utage";
13
+ })(Difficulty || (exports.Difficulty = Difficulty = {}));
14
+ //# sourceMappingURL=difficulty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"difficulty.js","sourceRoot":"","sources":["../../src/maimai/difficulty.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAQX;AARD,WAAY,UAAU;IAClB,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,oCAAsB,CAAA;IACtB,6BAAe,CAAA;AACnB,CAAC,EARW,UAAU,0BAAV,UAAU,QAQrB"}
@@ -0,0 +1,2 @@
1
+ export { Database } from "./maimai/database";
2
+ export { Difficulty } from "./maimai/difficulty";
package/dist/maimai.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Difficulty = void 0;
4
+ var difficulty_1 = require("./maimai/difficulty");
5
+ Object.defineProperty(exports, "Difficulty", { enumerable: true, get: function () { return difficulty_1.Difficulty; } });
6
+ //# sourceMappingURL=maimai.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maimai.js","sourceRoot":"","sources":["../src/maimai.ts"],"names":[],"mappings":";;;AAEA,iDAAgD;AAAvC,wGAAA,UAAU,OAAA"}
@@ -0,0 +1,5 @@
1
+ import type { BaseChart } from "../base/chart";
2
+ import type { Difficulty } from "./difficulty";
3
+ export interface Chart extends BaseChart {
4
+ difficulty: Difficulty;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=chart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.js","sourceRoot":"","sources":["../../src/ongeki/chart.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { Database as BaseDatabase } from "../base/database";
2
+ import type { Chart } from "./chart";
3
+ export interface Database<T extends Chart> extends BaseDatabase<T> {
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=database.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.js","sourceRoot":"","sources":["../../src/ongeki/database.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export declare enum Difficulty {
2
+ BASIC = "basic",
3
+ ADVANCED = "advanced",
4
+ EXPERT = "expert",
5
+ MASTER = "master",
6
+ LUNATIC = "lunatic"
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Difficulty = void 0;
4
+ var Difficulty;
5
+ (function (Difficulty) {
6
+ Difficulty["BASIC"] = "basic";
7
+ Difficulty["ADVANCED"] = "advanced";
8
+ Difficulty["EXPERT"] = "expert";
9
+ Difficulty["MASTER"] = "master";
10
+ Difficulty["LUNATIC"] = "lunatic";
11
+ })(Difficulty || (exports.Difficulty = Difficulty = {}));
12
+ //# sourceMappingURL=difficulty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"difficulty.js","sourceRoot":"","sources":["../../src/ongeki/difficulty.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAMX;AAND,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;AACvB,CAAC,EANW,UAAU,0BAAV,UAAU,QAMrB"}
@@ -0,0 +1,2 @@
1
+ export { Database } from "./ongeki/database";
2
+ export { Difficulty } from "./ongeki/difficulty";
package/dist/ongeki.js ADDED
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Difficulty = void 0;
4
+ var difficulty_1 = require("./ongeki/difficulty");
5
+ Object.defineProperty(exports, "Difficulty", { enumerable: true, get: function () { return difficulty_1.Difficulty; } });
6
+ //# sourceMappingURL=ongeki.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ongeki.js","sourceRoot":"","sources":["../src/ongeki.ts"],"names":[],"mappings":";;;AAEA,iDAAgD;AAAvC,wGAAA,UAAU,OAAA"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "gcm-database",
3
+ "version": "0.0.1",
4
+ "description": "A GekiChuMai Metadata database protocol",
5
+ "homepage": "https://github.com/saltcute/gcm-database#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/saltcute/gcm-database/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/saltcute/gcm-database.git"
12
+ },
13
+ "license": "MIT",
14
+ "author": "saltcute",
15
+ "type": "commonjs",
16
+ "exports": {
17
+ "./maimai": "./dist/maimai.js",
18
+ "./chunithm": "./dist/chunithm.js",
19
+ "./ongeki": "./dist/ongeki.js"
20
+ },
21
+ "files": [
22
+ "dist/"
23
+ ],
24
+ "scripts": {
25
+ "build": "tsc && tsc-alias",
26
+ "clean": "rimraf dist/*",
27
+ "format": "biome format --write",
28
+ "lint": "biome lint --write",
29
+ "make": "npm run clean && npm run format && npm run lint && npm run build",
30
+ "test": "export LOG_LEVEL=debug && npm run make && node ./test/test.js"
31
+ },
32
+ "devDependencies": {
33
+ "@biomejs/biome": "^2.5.0",
34
+ "@types/node": "^25.9.3",
35
+ "rimraf": "^6.1.3",
36
+ "semver": "^7.8.4",
37
+ "tsc-alias": "^1.8.17",
38
+ "typescript": "^6.0.3"
39
+ }
40
+ }