beatsaber-bot-core 0.2.0-rc.14 → 0.2.0-rc.16
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/cjs/cmd/bind/bind-id-beatleader.js +1 -1
- package/dist/cjs/cmd/bind/bind-id-beatsaver.js +1 -1
- package/dist/cjs/cmd/bind/bind-scoresaber.js +1 -1
- package/dist/cjs/cmd/bind/index.js +5 -5
- package/dist/cjs/cmd/bsmap/id-search.js +2 -2
- package/dist/cjs/cmd/bsmap/key-search.js +1 -1
- package/dist/cjs/cmd/bsmap/latest.js +1 -1
- package/dist/cjs/cmd/deprecated/tmp.js +1 -1
- package/dist/cjs/cmd/index.js +11 -11
- package/dist/cjs/cmd/rank.js +3 -3
- package/dist/cjs/cmd/score.js +5 -5
- package/dist/cjs/cmd/subscribe/beatleader.js +1 -1
- package/dist/cjs/cmd/subscribe/beatsaver.js +1 -1
- package/dist/cjs/cmd/subscribe/id-beatleader-score.js +1 -1
- package/dist/cjs/cmd/subscribe/id-beatsaver-mapper.js +1 -1
- package/dist/cjs/cmd/subscribe/index.js +5 -5
- package/dist/cjs/cmd/subscribe/subjoin.js +2 -2
- package/dist/cjs/cmd/subscribe/subleave.js +1 -1
- package/dist/cjs/cmd/subscribe/unsubscribe.js +2 -2
- package/dist/cjs/components/components/RankDifficulty.js +1 -1
- package/dist/cjs/components/components/bl-rank-score-item.js +3 -3
- package/dist/cjs/components/components/bl-score-item.js +1 -1
- package/dist/cjs/components/components/flag.js +1 -1
- package/dist/cjs/components/components/icons/RankIcon.js +2 -2
- package/dist/cjs/components/components/scoregraph.js +4 -4
- package/dist/cjs/components/components/socre-badge.js +1 -1
- package/dist/cjs/components/components/ss-rank-score-item.js +3 -3
- package/dist/cjs/components/components/ss-score-item.js +1 -1
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/pages/bl-player.js +7 -7
- package/dist/cjs/components/pages/bl-score-with-rank.js +6 -6
- package/dist/cjs/components/pages/bl-score.js +3 -3
- package/dist/cjs/components/pages/bs-map.js +6 -6
- package/dist/cjs/components/pages/index.js +5 -5
- package/dist/cjs/components/pages/ss-player.js +3 -3
- package/dist/cjs/components/utils/bl/bsorReplayAcc.js +2 -2
- package/dist/cjs/components/utils/format.js +4 -4
- package/dist/cjs/components/utils/index.js +4 -4
- package/dist/cjs/config.js +1 -1
- package/dist/cjs/index.js +18 -18
- package/dist/cjs/infra/i18n/index.js +2 -2
- package/dist/cjs/infra/index.js +4 -4
- package/dist/cjs/infra/s3/index.js +1 -1
- package/dist/cjs/infra/support/fetch/index.js +3 -3
- package/dist/cjs/infra/support/render/index.js +2 -2
- package/dist/cjs/interface/cmd/builder.js +1 -1
- package/dist/cjs/interface/index.js +8 -8
- package/dist/cjs/schedules/index.js +1 -1
- package/dist/cjs/service/api/base/aioclient.js +1 -1
- package/dist/cjs/service/api/base/blclient.js +1 -1
- package/dist/cjs/service/api/base/bsclient.js +2 -2
- package/dist/cjs/service/api/base/index.js +8 -8
- package/dist/cjs/service/api/base/ssclient.js +2 -2
- package/dist/cjs/service/api/index.js +5 -5
- package/dist/cjs/service/api/interfaces/beatleader/index.js +10 -10
- package/dist/cjs/service/api/interfaces/beatsaver/index.js +10 -10
- package/dist/cjs/service/api/interfaces/scoresaber/index.js +6 -6
- package/dist/cjs/service/index.js +2 -2
- package/dist/cjs/service/render/index.js +7 -7
- package/dist/cjs/ws/beatsaver.js +1 -1
- package/dist/cjs/ws/index.js +6 -6
- package/dist/esm/cmd/bind/bind-id-beatleader.js +1 -1
- package/dist/esm/cmd/bind/bind-id-beatsaver.js +1 -1
- package/dist/esm/cmd/bind/bind-scoresaber.js +1 -1
- package/dist/esm/cmd/bind/index.js +5 -5
- package/dist/esm/cmd/bsmap/id-search.js +2 -2
- package/dist/esm/cmd/bsmap/key-search.js +1 -1
- package/dist/esm/cmd/bsmap/latest.js +1 -1
- package/dist/esm/cmd/deprecated/tmp.js +1 -1
- package/dist/esm/cmd/index.js +11 -11
- package/dist/esm/cmd/rank.js +3 -3
- package/dist/esm/cmd/score.js +5 -5
- package/dist/esm/cmd/subscribe/beatleader.js +1 -1
- package/dist/esm/cmd/subscribe/beatsaver.js +1 -1
- package/dist/esm/cmd/subscribe/id-beatleader-score.js +1 -1
- package/dist/esm/cmd/subscribe/id-beatsaver-mapper.js +1 -1
- package/dist/esm/cmd/subscribe/index.js +5 -5
- package/dist/esm/cmd/subscribe/subjoin.js +2 -2
- package/dist/esm/cmd/subscribe/subleave.js +1 -1
- package/dist/esm/cmd/subscribe/unsubscribe.js +2 -2
- package/dist/esm/components/components/RankDifficulty.js +1 -1
- package/dist/esm/components/components/bl-rank-score-item.js +2 -2
- package/dist/esm/components/components/bl-score-item.js +1 -1
- package/dist/esm/components/components/icons/RankIcon.js +2 -2
- package/dist/esm/components/components/scoregraph.js +3 -3
- package/dist/esm/components/components/socre-badge.js +1 -1
- package/dist/esm/components/components/ss-rank-score-item.js +2 -2
- package/dist/esm/components/components/ss-score-item.js +1 -1
- package/dist/esm/components/pages/bl-player.js +7 -7
- package/dist/esm/components/pages/bl-score-with-rank.js +6 -6
- package/dist/esm/components/pages/bl-score.js +3 -3
- package/dist/esm/components/pages/bs-map.js +5 -5
- package/dist/esm/components/pages/index.js +5 -5
- package/dist/esm/components/pages/ss-player.js +3 -3
- package/dist/esm/components/utils/bl/bsorReplayAcc.js +2 -2
- package/dist/esm/components/utils/index.js +2 -2
- package/dist/esm/config.js +1 -1
- package/dist/esm/index.js +10 -10
- package/dist/esm/infra/i18n/index.js +2 -2
- package/dist/esm/infra/index.js +3 -3
- package/dist/esm/infra/support/fetch/index.js +3 -3
- package/dist/esm/infra/support/render/index.js +2 -2
- package/dist/esm/interface/cmd/builder.js +1 -1
- package/dist/esm/interface/index.js +4 -4
- package/dist/esm/schedules/index.js +1 -1
- package/dist/esm/service/api/base/aioclient.js +1 -1
- package/dist/esm/service/api/base/blclient.js +1 -1
- package/dist/esm/service/api/base/bsclient.js +2 -2
- package/dist/esm/service/api/base/index.js +4 -4
- package/dist/esm/service/api/base/ssclient.js +2 -2
- package/dist/esm/service/api/index.js +5 -5
- package/dist/esm/service/api/interfaces/beatleader/index.js +5 -5
- package/dist/esm/service/api/interfaces/beatsaver/index.js +5 -5
- package/dist/esm/service/api/interfaces/scoresaber/index.js +3 -3
- package/dist/esm/service/index.js +2 -2
- package/dist/esm/service/render/index.js +7 -7
- package/dist/esm/ws/beatsaver.js +1 -1
- package/dist/esm/ws/index.js +3 -3
- package/package.json +8 -9
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
2
2
|
import dayjs from "dayjs";
|
3
|
-
import Flags, { EarchIcon } from "
|
4
|
-
import { formatDate, numberWithCommas } from "
|
3
|
+
import Flags, { EarchIcon } from "@/components/components/flag";
|
4
|
+
import { formatDate, numberWithCommas } from "@/components/utils";
|
5
5
|
function BlRankScoreItem(props) {
|
6
6
|
return /* @__PURE__ */ jsx(
|
7
7
|
"div",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
2
2
|
import { BarChart, Key, Pin, Star, Wrench } from "lucide-react";
|
3
|
-
import { diffConv, formatRelativeTimeByDay } from "../utils
|
3
|
+
import { diffConv, formatRelativeTimeByDay } from "../utils";
|
4
4
|
const getModifiers = (modifiers) => {
|
5
5
|
return modifiers ? modifiers.split(",") : [];
|
6
6
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
2
|
-
import BeatLeaderIcon from "./BeatLeader
|
3
|
-
import ScoreSaberIcon from "./ScoreSaberIcon
|
2
|
+
import BeatLeaderIcon from "./BeatLeader";
|
3
|
+
import ScoreSaberIcon from "./ScoreSaberIcon";
|
4
4
|
function RankIcon({
|
5
5
|
blrank,
|
6
6
|
ssrank
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Fragment, jsx } from "react/jsx-runtime";
|
2
|
-
import { processAccGraphs, processUnderswings } from "../utils/bl/bsorReplayAcc
|
2
|
+
import { processAccGraphs, processUnderswings } from "../utils/bl/bsorReplayAcc";
|
3
3
|
import {
|
4
4
|
createDistanceWeightFunction,
|
5
5
|
createMinMaxCounter
|
6
|
-
} from "../utils/bl/beatleader
|
7
|
-
import getStatistic from "../utils/bl/stastic
|
6
|
+
} from "../utils/bl/beatleader";
|
7
|
+
import getStatistic from "../utils/bl/stastic";
|
8
8
|
import Chart from "chart.js/auto";
|
9
9
|
import { createCanvas } from "@napi-rs/canvas";
|
10
10
|
function formatNumber(num, digits = 2, addSign = false, notANumber = null) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
2
2
|
import dayjs from "dayjs";
|
3
|
-
import Flags, { EarchIcon } from "
|
4
|
-
import { formatDate, numberWithCommas } from "
|
3
|
+
import Flags, { EarchIcon } from "@/components/components/flag";
|
4
|
+
import { formatDate, numberWithCommas } from "@/components/utils";
|
5
5
|
function SSRankScoreItem(props) {
|
6
6
|
return /* @__PURE__ */ jsx(
|
7
7
|
"div",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
2
2
|
import { BarChart, Key, Star, Wrench } from "lucide-react";
|
3
|
-
import { diffConv, formatRelativeTimeByDay } from "../utils
|
3
|
+
import { diffConv, formatRelativeTimeByDay } from "../utils";
|
4
4
|
const getModifiers = (modifiers) => {
|
5
5
|
return modifiers ? modifiers.split(",") : [];
|
6
6
|
};
|
@@ -18,13 +18,13 @@ var __spreadValues = (a, b) => {
|
|
18
18
|
};
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
20
20
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
21
|
-
import getPart from "../utils/bl/getPart
|
22
|
-
import ScoreBadge from "../components/socre-badge
|
23
|
-
import SkillGraph from "../components/skill-graph
|
24
|
-
import BeatLeaderItem from "../components/bl-score-item
|
25
|
-
import Flags, { EarchIcon } from "../components/flag
|
26
|
-
import { twJoin } from "../utils/tw-join
|
27
|
-
import { getHeadsetForHMD } from "../utils/bl/blheadset
|
21
|
+
import getPart from "../utils/bl/getPart";
|
22
|
+
import ScoreBadge from "../components/socre-badge";
|
23
|
+
import SkillGraph from "../components/skill-graph";
|
24
|
+
import BeatLeaderItem from "../components/bl-score-item";
|
25
|
+
import Flags, { EarchIcon } from "../components/flag";
|
26
|
+
import { twJoin } from "../utils/tw-join";
|
27
|
+
import { getHeadsetForHMD } from "../utils/bl/blheadset";
|
28
28
|
function BLPlayerPage({
|
29
29
|
beatleaderItems: items,
|
30
30
|
user,
|
@@ -27,15 +27,15 @@ import {
|
|
27
27
|
Calendar,
|
28
28
|
HeartPulse
|
29
29
|
} from "lucide-react";
|
30
|
-
import ScoreGraph from "../components/scoregraph
|
30
|
+
import ScoreGraph from "../components/scoregraph";
|
31
31
|
import {
|
32
32
|
BlRankScoreItem,
|
33
33
|
ScoreItemSkeleton
|
34
|
-
} from "
|
35
|
-
import { RankDifficulty } from "
|
36
|
-
import { Avatar } from "
|
37
|
-
import { formatDuration, formatTime } from "
|
38
|
-
import Progressbar from "
|
34
|
+
} from "@/components/components/bl-rank-score-item";
|
35
|
+
import { RankDifficulty } from "@/components/components/RankDifficulty";
|
36
|
+
import { Avatar } from "@/components/components/base/avatar";
|
37
|
+
import { formatDuration, formatTime } from "@/components/utils";
|
38
|
+
import Progressbar from "@/components/components/progressbar";
|
39
39
|
function BLRankScore({
|
40
40
|
score,
|
41
41
|
aroundScores,
|
@@ -9,9 +9,9 @@ import {
|
|
9
9
|
ThumbsDown,
|
10
10
|
Calendar
|
11
11
|
} from "lucide-react";
|
12
|
-
import { diffConv, formatDuration, formatTime } from "../utils
|
13
|
-
import Progressbar from "../components/progressbar
|
14
|
-
import ScoreGraph from "../components/scoregraph
|
12
|
+
import { diffConv, formatDuration, formatTime } from "../utils";
|
13
|
+
import Progressbar from "../components/progressbar";
|
14
|
+
import ScoreGraph from "../components/scoregraph";
|
15
15
|
function BLScore({
|
16
16
|
score,
|
17
17
|
bsMap,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
2
|
-
import RankIcon from "../components/icons/RankIcon
|
2
|
+
import RankIcon from "../components/icons/RankIcon";
|
3
3
|
import {
|
4
4
|
Calendar,
|
5
5
|
Clock,
|
@@ -11,10 +11,10 @@ import {
|
|
11
11
|
ThumbsUp
|
12
12
|
} from "lucide-react";
|
13
13
|
import dayjs from "dayjs";
|
14
|
-
import { diffConv, formatNumber, formatTime, getTag } from "../utils
|
15
|
-
import { getMods } from "../utils/getMods
|
16
|
-
import Progressbar from "../components/progressbar
|
17
|
-
import { CharacteristicIcon } from "../components/characteristic
|
14
|
+
import { diffConv, formatNumber, formatTime, getTag } from "../utils";
|
15
|
+
import { getMods } from "../utils/getMods";
|
16
|
+
import Progressbar from "../components/progressbar";
|
17
|
+
import { CharacteristicIcon } from "../components/characteristic";
|
18
18
|
function BSMapShare({
|
19
19
|
bsMap,
|
20
20
|
bsMapQrUrl,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
2
|
-
import BSMapShare from "./bs-map
|
3
|
-
import SSPlayerPage from "./ss-player
|
4
|
-
import BLPlayerPage from "./bl-player
|
5
|
-
import { BLScore } from "./bl-score
|
6
|
-
import BLRankScore from "
|
2
|
+
import BSMapShare from "./bs-map";
|
3
|
+
import SSPlayerPage from "./ss-player";
|
4
|
+
import BLPlayerPage from "./bl-player";
|
5
|
+
import { BLScore } from "./bl-score";
|
6
|
+
import BLRankScore from "@/components/pages/bl-score-with-rank";
|
7
7
|
const getBSMapComp = (bsMap, bsMapQrUrl, previewQrUrl) => {
|
8
8
|
return /* @__PURE__ */ jsx(
|
9
9
|
BSMapShare,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
2
|
-
import Flags, { EarchIcon } from "../components/flag
|
3
|
-
import { twJoin } from "../utils/tw-join
|
4
|
-
import ScoreItem from "../components/ss-score-item
|
2
|
+
import Flags, { EarchIcon } from "../components/flag";
|
3
|
+
import { twJoin } from "../utils/tw-join";
|
4
|
+
import ScoreItem from "../components/ss-score-item";
|
5
5
|
function SSPlayerPage({
|
6
6
|
leaderItems,
|
7
7
|
scoreUser,
|
@@ -29,8 +29,8 @@ var __objRest = (source, exclude) => {
|
|
29
29
|
}
|
30
30
|
return target;
|
31
31
|
};
|
32
|
-
import { NoteEventType } from "./bsorDecoder
|
33
|
-
import { createDistanceWeightFunction } from "./beatleader
|
32
|
+
import { NoteEventType } from "./bsorDecoder";
|
33
|
+
import { createDistanceWeightFunction } from "./beatleader";
|
34
34
|
const NoteScoringType = {
|
35
35
|
Ignore: -1,
|
36
36
|
NoScore: 0,
|
package/dist/esm/config.js
CHANGED
package/dist/esm/index.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import { botCommands } from "./cmd
|
2
|
-
import { getScheduleTasks } from "./schedules
|
3
|
-
export * from "./interface
|
4
|
-
export * from "./schedules
|
5
|
-
export * from "./config
|
6
|
-
export * from "./cmd
|
7
|
-
export * from "./ws
|
8
|
-
export * from "./utils
|
9
|
-
export * from "./service
|
10
|
-
export * from "./infra
|
1
|
+
import { botCommands } from "./cmd";
|
2
|
+
import { getScheduleTasks } from "./schedules";
|
3
|
+
export * from "./interface";
|
4
|
+
export * from "./schedules";
|
5
|
+
export * from "./config";
|
6
|
+
export * from "./cmd";
|
7
|
+
export * from "./ws";
|
8
|
+
export * from "./utils";
|
9
|
+
export * from "./service";
|
10
|
+
export * from "./infra";
|
11
11
|
const getBot = (config) => ({
|
12
12
|
commands: botCommands(),
|
13
13
|
schedule: getScheduleTasks(config)
|
@@ -1,8 +1,8 @@
|
|
1
1
|
var __defProp = Object.defineProperty;
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
4
|
-
import { interpolate } from "./parser
|
5
|
-
import { interpolateString } from "./util
|
4
|
+
import { interpolate } from "./parser";
|
5
|
+
import { interpolateString } from "./util";
|
6
6
|
class I18nService {
|
7
7
|
constructor(config) {
|
8
8
|
__publicField(this, "obj", {});
|
package/dist/esm/infra/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from "./support/render
|
2
|
-
import { I18nService } from "./i18n
|
3
|
-
import { S3Service, s3ConfigSchema } from "./s3
|
1
|
+
export * from "./support/render";
|
2
|
+
import { I18nService } from "./i18n";
|
3
|
+
import { S3Service, s3ConfigSchema } from "./s3";
|
4
4
|
export {
|
5
5
|
I18nService,
|
6
6
|
S3Service,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { createFetch as c, Fetch } from "./ofetch
|
2
|
-
import { NotFoundError } from "./error
|
1
|
+
import { createFetch as c, Fetch } from "./ofetch";
|
2
|
+
import { NotFoundError } from "./error";
|
3
3
|
const rofetch = c({
|
4
4
|
defaults: {
|
5
5
|
retryStatusCodes: [400, 408, 409, 425, 429, 502, 503, 504],
|
@@ -34,7 +34,7 @@ const createFetch = (logger) => {
|
|
34
34
|
ignoreResponseError: false
|
35
35
|
});
|
36
36
|
};
|
37
|
-
import { Fetch as Fetch2 } from "./ofetch
|
37
|
+
import { Fetch as Fetch2 } from "./ofetch";
|
38
38
|
export {
|
39
39
|
Fetch2 as Fetch,
|
40
40
|
createFetch
|
@@ -50,9 +50,9 @@ var __async = (__this, __arguments, generator) => {
|
|
50
50
|
step((generator = generator.apply(__this, __arguments)).next());
|
51
51
|
});
|
52
52
|
};
|
53
|
-
import { html2imgBuffer, url2imgBuffer } from "./puppeteer
|
53
|
+
import { html2imgBuffer, url2imgBuffer } from "./puppeteer";
|
54
54
|
import { Puppeteer } from "puppeteer-core";
|
55
|
-
import { createFetch } from "
|
55
|
+
import { createFetch } from "@/infra/support/fetch";
|
56
56
|
import { z } from "zod/v4";
|
57
57
|
const common = z.object({
|
58
58
|
defaultWaitTimeout: z.number().optional(),
|
@@ -21,7 +21,7 @@ var __async = (__this, __arguments, generator) => {
|
|
21
21
|
step((generator = generator.apply(__this, __arguments)).next());
|
22
22
|
});
|
23
23
|
};
|
24
|
-
import { BizError } from "
|
24
|
+
import { BizError } from "@/infra/errors";
|
25
25
|
class CommandBuilder {
|
26
26
|
constructor() {
|
27
27
|
__publicField(this, "name");
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from "./db
|
2
|
-
export * from "./logger
|
3
|
-
export * from "./bot
|
1
|
+
export * from "./db";
|
2
|
+
export * from "./logger";
|
3
|
+
export * from "./bot";
|
4
4
|
var Platform = /* @__PURE__ */ ((Platform2) => {
|
5
5
|
Platform2["SS"] = "scoresaber";
|
6
6
|
Platform2["BS"] = "beatsaver";
|
@@ -10,7 +10,7 @@ var Platform = /* @__PURE__ */ ((Platform2) => {
|
|
10
10
|
const parsePlatform = (p) => {
|
11
11
|
return p == "ss" ? "scoresaber" /* SS */ : "beatleader" /* BL */;
|
12
12
|
};
|
13
|
-
export * from "./cmd/type
|
13
|
+
export * from "./cmd/type";
|
14
14
|
export {
|
15
15
|
Platform,
|
16
16
|
parsePlatform
|
@@ -21,7 +21,7 @@ var __async = (__this, __arguments, generator) => {
|
|
21
21
|
step((generator = generator.apply(__this, __arguments)).next());
|
22
22
|
});
|
23
23
|
};
|
24
|
-
import { createFetch } from "
|
24
|
+
import { createFetch } from "@/infra/support/fetch";
|
25
25
|
class AIOSaberClient {
|
26
26
|
constructor(logger) {
|
27
27
|
__publicField(this, "f");
|
@@ -21,7 +21,7 @@ var __async = (__this, __arguments, generator) => {
|
|
21
21
|
step((generator = generator.apply(__this, __arguments)).next());
|
22
22
|
});
|
23
23
|
};
|
24
|
-
import { createFetch } from "
|
24
|
+
import { createFetch } from "@/infra/support/fetch";
|
25
25
|
class BeatLeaderClient {
|
26
26
|
constructor(opt) {
|
27
27
|
__publicField(this, "f");
|
@@ -35,8 +35,8 @@ var __async = (__this, __arguments, generator) => {
|
|
35
35
|
step((generator = generator.apply(__this, __arguments)).next());
|
36
36
|
});
|
37
37
|
};
|
38
|
-
import { createFetch } from "
|
39
|
-
import { NotFoundError } from "
|
38
|
+
import { createFetch } from "@/infra/support/fetch";
|
39
|
+
import { NotFoundError } from "@/infra/support/fetch/error";
|
40
40
|
class BeatSaverClient {
|
41
41
|
constructor(opt) {
|
42
42
|
__publicField(this, "f");
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * from "./ssclient
|
2
|
-
export * from "./blclient
|
3
|
-
export * from "./aioclient
|
4
|
-
export * from "./bsclient
|
1
|
+
export * from "./ssclient";
|
2
|
+
export * from "./blclient";
|
3
|
+
export * from "./aioclient";
|
4
|
+
export * from "./bsclient";
|
5
5
|
//# sourceMappingURL=index.js.map
|
@@ -21,8 +21,8 @@ var __async = (__this, __arguments, generator) => {
|
|
21
21
|
step((generator = generator.apply(__this, __arguments)).next());
|
22
22
|
});
|
23
23
|
};
|
24
|
-
import { createFetch } from "
|
25
|
-
import { NotFoundError } from "
|
24
|
+
import { createFetch } from "@/infra/support/fetch";
|
25
|
+
import { NotFoundError } from "@/infra/support/fetch/error";
|
26
26
|
class ScoreSaberClient {
|
27
27
|
constructor(logger) {
|
28
28
|
__publicField(this, "f");
|
@@ -35,11 +35,11 @@ var __async = (__this, __arguments, generator) => {
|
|
35
35
|
step((generator = generator.apply(__this, __arguments)).next());
|
36
36
|
});
|
37
37
|
};
|
38
|
-
import { AIOSaberClient, BeatLeaderClient, BeatSaverClient, ScoreSaberClient } from "./base
|
39
|
-
import { BLIDNotFoundError, MapIdNotFoundError, SSIDNotFoundError } from "
|
40
|
-
import { NotFoundError } from "
|
41
|
-
import { sortScore } from "./sortScore
|
42
|
-
import { decode } from "
|
38
|
+
import { AIOSaberClient, BeatLeaderClient, BeatSaverClient, ScoreSaberClient } from "./base";
|
39
|
+
import { BLIDNotFoundError, MapIdNotFoundError, SSIDNotFoundError } from "@/infra/errors";
|
40
|
+
import { NotFoundError } from "@/infra/support/fetch/error";
|
41
|
+
import { sortScore } from "./sortScore";
|
42
|
+
import { decode } from "@/components/utils/bl/bsorDecoder";
|
43
43
|
class APIService {
|
44
44
|
constructor(cfg, logger) {
|
45
45
|
__publicField(this, "BeatLeader");
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from "./bsor
|
2
|
-
export * from "./req
|
3
|
-
export * from "./score
|
4
|
-
export * from "./user
|
5
|
-
export * from "./ws
|
1
|
+
export * from "./bsor";
|
2
|
+
export * from "./req";
|
3
|
+
export * from "./score";
|
4
|
+
export * from "./user";
|
5
|
+
export * from "./ws";
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from "./ws
|
2
|
-
export * from "./bsmap
|
3
|
-
export * from "./resp
|
4
|
-
export * from "./user
|
5
|
-
export * from "./alert
|
1
|
+
export * from "./ws";
|
2
|
+
export * from "./bsmap";
|
3
|
+
export * from "./resp";
|
4
|
+
export * from "./user";
|
5
|
+
export * from "./alert";
|
6
6
|
//# sourceMappingURL=index.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export * from "./item
|
2
|
-
export * from "./resp
|
3
|
-
export * from "./user
|
1
|
+
export * from "./item";
|
2
|
+
export * from "./resp";
|
3
|
+
export * from "./user";
|
4
4
|
//# sourceMappingURL=index.js.map
|
@@ -46,14 +46,14 @@ var __async = (__this, __arguments, generator) => {
|
|
46
46
|
step((generator = generator.apply(__this, __arguments)).next());
|
47
47
|
});
|
48
48
|
};
|
49
|
-
import { getHtml } from "
|
49
|
+
import { getHtml } from "@/components";
|
50
50
|
import { PuppeteerError, TimeoutError } from "puppeteer-core";
|
51
|
-
import { Platform } from "
|
52
|
-
import { getBLPlayerComp, getBLRankScoreComp, getBSMapComp, getSSPlayerComp } from "
|
53
|
-
import { preferenceKey } from "../preference
|
54
|
-
import { ImageRenderError, RequestError } from "
|
55
|
-
import createQrcode from "
|
56
|
-
import { getImageRender } from "
|
51
|
+
import { Platform } from "@/interface";
|
52
|
+
import { getBLPlayerComp, getBLRankScoreComp, getBSMapComp, getSSPlayerComp } from "@/components/pages";
|
53
|
+
import { preferenceKey } from "../preference";
|
54
|
+
import { ImageRenderError, RequestError } from "@/infra/errors";
|
55
|
+
import createQrcode from "@/components/utils/qrcode";
|
56
|
+
import { getImageRender } from "@/infra/support/render";
|
57
57
|
const getPreferenceKey = (platform) => {
|
58
58
|
return platform == Platform.SS ? preferenceKey.ssProfileRenderImg.key : preferenceKey.blProfileRenderImg.key;
|
59
59
|
};
|
package/dist/esm/ws/beatsaver.js
CHANGED
@@ -21,7 +21,7 @@ var __async = (__this, __arguments, generator) => {
|
|
21
21
|
step((generator = generator.apply(__this, __arguments)).next());
|
22
22
|
});
|
23
23
|
};
|
24
|
-
import { handleWSEventWithCache } from "
|
24
|
+
import { handleWSEventWithCache } from "@/utils";
|
25
25
|
class BeatSaverWSHandler {
|
26
26
|
constructor(db, render, logger, config, botService) {
|
27
27
|
__publicField(this, "logger");
|
package/dist/esm/ws/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
export * from "./beatleader
|
2
|
-
export * from "./beatsaver
|
3
|
-
export * from "./handler
|
1
|
+
export * from "./beatleader";
|
2
|
+
export * from "./beatsaver";
|
3
|
+
export * from "./handler";
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "beatsaber-bot-core",
|
3
3
|
"description": "Beatsaber bot",
|
4
|
-
"version": "0.2.0-rc.
|
4
|
+
"version": "0.2.0-rc.16",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
7
7
|
],
|
8
8
|
"license": "MIT",
|
9
|
-
"type": "module",
|
10
9
|
"author": {
|
11
10
|
"name": "ktKongTong",
|
12
11
|
"email": "kt@ktlab.io"
|
@@ -33,19 +32,19 @@
|
|
33
32
|
"import": "./dist/esm/service/*.js"
|
34
33
|
},
|
35
34
|
"./service/*": {
|
35
|
+
"types": "./dist/types/index.d.ts",
|
36
36
|
"require": "./dist/cjs/service/*/index.js",
|
37
|
-
"import": "./dist/esm/service/*/index.js"
|
38
|
-
"types": "./dist/types/index.d.ts"
|
37
|
+
"import": "./dist/esm/service/*/index.js"
|
39
38
|
},
|
40
39
|
"./infra": {
|
40
|
+
"types": "./dist/types/index.d.ts",
|
41
41
|
"require": "./dist/cjs/infra/index.js",
|
42
|
-
"import": "./dist/esm/infra/index.js"
|
43
|
-
"types": "./dist/types/index.d.ts"
|
42
|
+
"import": "./dist/esm/infra/index.js"
|
44
43
|
},
|
45
44
|
"./infra/*": {
|
45
|
+
"types": "./dist/types/index.d.ts",
|
46
46
|
"require": "./dist/cjs/infra/*/index.js",
|
47
|
-
"import": "./dist/esm/infra/*/index.js"
|
48
|
-
"types": "./dist/types/index.d.ts"
|
47
|
+
"import": "./dist/esm/infra/*/index.js"
|
49
48
|
}
|
50
49
|
},
|
51
50
|
"keywords": [
|
@@ -72,7 +71,7 @@
|
|
72
71
|
"zod": "^3.25.71"
|
73
72
|
},
|
74
73
|
"scripts": {
|
75
|
-
"fix-path-alias": " tsc-alias --outDir dist/
|
74
|
+
"fix-path-alias": " tsc-alias --outDir dist/cjs && tsc-alias --outDir dist/cjs",
|
76
75
|
"copy-yml-resource": "node scripts/build.mjs",
|
77
76
|
"up": "tsup",
|
78
77
|
"build": "tsup && pnpm run copy-yml-resource && pnpm run fix-path-alias",
|