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.
Files changed (119) hide show
  1. package/dist/cjs/cmd/bind/bind-id-beatleader.js +1 -1
  2. package/dist/cjs/cmd/bind/bind-id-beatsaver.js +1 -1
  3. package/dist/cjs/cmd/bind/bind-scoresaber.js +1 -1
  4. package/dist/cjs/cmd/bind/index.js +5 -5
  5. package/dist/cjs/cmd/bsmap/id-search.js +2 -2
  6. package/dist/cjs/cmd/bsmap/key-search.js +1 -1
  7. package/dist/cjs/cmd/bsmap/latest.js +1 -1
  8. package/dist/cjs/cmd/deprecated/tmp.js +1 -1
  9. package/dist/cjs/cmd/index.js +11 -11
  10. package/dist/cjs/cmd/rank.js +3 -3
  11. package/dist/cjs/cmd/score.js +5 -5
  12. package/dist/cjs/cmd/subscribe/beatleader.js +1 -1
  13. package/dist/cjs/cmd/subscribe/beatsaver.js +1 -1
  14. package/dist/cjs/cmd/subscribe/id-beatleader-score.js +1 -1
  15. package/dist/cjs/cmd/subscribe/id-beatsaver-mapper.js +1 -1
  16. package/dist/cjs/cmd/subscribe/index.js +5 -5
  17. package/dist/cjs/cmd/subscribe/subjoin.js +2 -2
  18. package/dist/cjs/cmd/subscribe/subleave.js +1 -1
  19. package/dist/cjs/cmd/subscribe/unsubscribe.js +2 -2
  20. package/dist/cjs/components/components/RankDifficulty.js +1 -1
  21. package/dist/cjs/components/components/bl-rank-score-item.js +3 -3
  22. package/dist/cjs/components/components/bl-score-item.js +1 -1
  23. package/dist/cjs/components/components/flag.js +1 -1
  24. package/dist/cjs/components/components/icons/RankIcon.js +2 -2
  25. package/dist/cjs/components/components/scoregraph.js +4 -4
  26. package/dist/cjs/components/components/socre-badge.js +1 -1
  27. package/dist/cjs/components/components/ss-rank-score-item.js +3 -3
  28. package/dist/cjs/components/components/ss-score-item.js +1 -1
  29. package/dist/cjs/components/index.js +1 -1
  30. package/dist/cjs/components/pages/bl-player.js +7 -7
  31. package/dist/cjs/components/pages/bl-score-with-rank.js +6 -6
  32. package/dist/cjs/components/pages/bl-score.js +3 -3
  33. package/dist/cjs/components/pages/bs-map.js +6 -6
  34. package/dist/cjs/components/pages/index.js +5 -5
  35. package/dist/cjs/components/pages/ss-player.js +3 -3
  36. package/dist/cjs/components/utils/bl/bsorReplayAcc.js +2 -2
  37. package/dist/cjs/components/utils/format.js +4 -4
  38. package/dist/cjs/components/utils/index.js +4 -4
  39. package/dist/cjs/config.js +1 -1
  40. package/dist/cjs/index.js +18 -18
  41. package/dist/cjs/infra/i18n/index.js +2 -2
  42. package/dist/cjs/infra/index.js +4 -4
  43. package/dist/cjs/infra/s3/index.js +1 -1
  44. package/dist/cjs/infra/support/fetch/index.js +3 -3
  45. package/dist/cjs/infra/support/render/index.js +2 -2
  46. package/dist/cjs/interface/cmd/builder.js +1 -1
  47. package/dist/cjs/interface/index.js +8 -8
  48. package/dist/cjs/schedules/index.js +1 -1
  49. package/dist/cjs/service/api/base/aioclient.js +1 -1
  50. package/dist/cjs/service/api/base/blclient.js +1 -1
  51. package/dist/cjs/service/api/base/bsclient.js +2 -2
  52. package/dist/cjs/service/api/base/index.js +8 -8
  53. package/dist/cjs/service/api/base/ssclient.js +2 -2
  54. package/dist/cjs/service/api/index.js +5 -5
  55. package/dist/cjs/service/api/interfaces/beatleader/index.js +10 -10
  56. package/dist/cjs/service/api/interfaces/beatsaver/index.js +10 -10
  57. package/dist/cjs/service/api/interfaces/scoresaber/index.js +6 -6
  58. package/dist/cjs/service/index.js +2 -2
  59. package/dist/cjs/service/render/index.js +7 -7
  60. package/dist/cjs/ws/beatsaver.js +1 -1
  61. package/dist/cjs/ws/index.js +6 -6
  62. package/dist/esm/cmd/bind/bind-id-beatleader.js +1 -1
  63. package/dist/esm/cmd/bind/bind-id-beatsaver.js +1 -1
  64. package/dist/esm/cmd/bind/bind-scoresaber.js +1 -1
  65. package/dist/esm/cmd/bind/index.js +5 -5
  66. package/dist/esm/cmd/bsmap/id-search.js +2 -2
  67. package/dist/esm/cmd/bsmap/key-search.js +1 -1
  68. package/dist/esm/cmd/bsmap/latest.js +1 -1
  69. package/dist/esm/cmd/deprecated/tmp.js +1 -1
  70. package/dist/esm/cmd/index.js +11 -11
  71. package/dist/esm/cmd/rank.js +3 -3
  72. package/dist/esm/cmd/score.js +5 -5
  73. package/dist/esm/cmd/subscribe/beatleader.js +1 -1
  74. package/dist/esm/cmd/subscribe/beatsaver.js +1 -1
  75. package/dist/esm/cmd/subscribe/id-beatleader-score.js +1 -1
  76. package/dist/esm/cmd/subscribe/id-beatsaver-mapper.js +1 -1
  77. package/dist/esm/cmd/subscribe/index.js +5 -5
  78. package/dist/esm/cmd/subscribe/subjoin.js +2 -2
  79. package/dist/esm/cmd/subscribe/subleave.js +1 -1
  80. package/dist/esm/cmd/subscribe/unsubscribe.js +2 -2
  81. package/dist/esm/components/components/RankDifficulty.js +1 -1
  82. package/dist/esm/components/components/bl-rank-score-item.js +2 -2
  83. package/dist/esm/components/components/bl-score-item.js +1 -1
  84. package/dist/esm/components/components/icons/RankIcon.js +2 -2
  85. package/dist/esm/components/components/scoregraph.js +3 -3
  86. package/dist/esm/components/components/socre-badge.js +1 -1
  87. package/dist/esm/components/components/ss-rank-score-item.js +2 -2
  88. package/dist/esm/components/components/ss-score-item.js +1 -1
  89. package/dist/esm/components/pages/bl-player.js +7 -7
  90. package/dist/esm/components/pages/bl-score-with-rank.js +6 -6
  91. package/dist/esm/components/pages/bl-score.js +3 -3
  92. package/dist/esm/components/pages/bs-map.js +5 -5
  93. package/dist/esm/components/pages/index.js +5 -5
  94. package/dist/esm/components/pages/ss-player.js +3 -3
  95. package/dist/esm/components/utils/bl/bsorReplayAcc.js +2 -2
  96. package/dist/esm/components/utils/index.js +2 -2
  97. package/dist/esm/config.js +1 -1
  98. package/dist/esm/index.js +10 -10
  99. package/dist/esm/infra/i18n/index.js +2 -2
  100. package/dist/esm/infra/index.js +3 -3
  101. package/dist/esm/infra/support/fetch/index.js +3 -3
  102. package/dist/esm/infra/support/render/index.js +2 -2
  103. package/dist/esm/interface/cmd/builder.js +1 -1
  104. package/dist/esm/interface/index.js +4 -4
  105. package/dist/esm/schedules/index.js +1 -1
  106. package/dist/esm/service/api/base/aioclient.js +1 -1
  107. package/dist/esm/service/api/base/blclient.js +1 -1
  108. package/dist/esm/service/api/base/bsclient.js +2 -2
  109. package/dist/esm/service/api/base/index.js +4 -4
  110. package/dist/esm/service/api/base/ssclient.js +2 -2
  111. package/dist/esm/service/api/index.js +5 -5
  112. package/dist/esm/service/api/interfaces/beatleader/index.js +5 -5
  113. package/dist/esm/service/api/interfaces/beatsaver/index.js +5 -5
  114. package/dist/esm/service/api/interfaces/scoresaber/index.js +3 -3
  115. package/dist/esm/service/index.js +2 -2
  116. package/dist/esm/service/render/index.js +7 -7
  117. package/dist/esm/ws/beatsaver.js +1 -1
  118. package/dist/esm/ws/index.js +3 -3
  119. 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 "../../components/components/flag.js";
4
- import { formatDate, numberWithCommas } from "../../components/utils/index.js";
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/index.js";
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.js";
3
- import ScoreSaberIcon from "./ScoreSaberIcon.js";
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.js";
2
+ import { processAccGraphs, processUnderswings } from "../utils/bl/bsorReplayAcc";
3
3
  import {
4
4
  createDistanceWeightFunction,
5
5
  createMinMaxCounter
6
- } from "../utils/bl/beatleader.js";
7
- import getStatistic from "../utils/bl/stastic.js";
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,5 +1,5 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
- import { twJoin } from "../utils/tw-join.js";
2
+ import { twJoin } from "../utils/tw-join";
3
3
  function ScoreBadge({
4
4
  name,
5
5
  count,
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import dayjs from "dayjs";
3
- import Flags, { EarchIcon } from "../../components/components/flag.js";
4
- import { formatDate, numberWithCommas } from "../../components/utils/index.js";
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/index.js";
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.js";
22
- import ScoreBadge from "../components/socre-badge.js";
23
- import SkillGraph from "../components/skill-graph.js";
24
- import BeatLeaderItem from "../components/bl-score-item.js";
25
- import Flags, { EarchIcon } from "../components/flag.js";
26
- import { twJoin } from "../utils/tw-join.js";
27
- import { getHeadsetForHMD } from "../utils/bl/blheadset.js";
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.js";
30
+ import ScoreGraph from "../components/scoregraph";
31
31
  import {
32
32
  BlRankScoreItem,
33
33
  ScoreItemSkeleton
34
- } from "../../components/components/bl-rank-score-item.js";
35
- import { RankDifficulty } from "../../components/components/RankDifficulty.js";
36
- import { Avatar } from "../../components/components/base/avatar.js";
37
- import { formatDuration, formatTime } from "../../components/utils/index.js";
38
- import Progressbar from "../../components/components/progressbar.js";
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/index.js";
13
- import Progressbar from "../components/progressbar.js";
14
- import ScoreGraph from "../components/scoregraph.js";
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.js";
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/index.js";
15
- import { getMods } from "../utils/getMods.js";
16
- import Progressbar from "../components/progressbar.js";
17
- import { CharacteristicIcon } from "../components/characteristic.js";
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.js";
3
- import SSPlayerPage from "./ss-player.js";
4
- import BLPlayerPage from "./bl-player.js";
5
- import { BLScore } from "./bl-score.js";
6
- import BLRankScore from "../../components/pages/bl-score-with-rank.js";
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.js";
3
- import { twJoin } from "../utils/tw-join.js";
4
- import ScoreItem from "../components/ss-score-item.js";
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.js";
33
- import { createDistanceWeightFunction } from "./beatleader.js";
32
+ import { NoteEventType } from "./bsorDecoder";
33
+ import { createDistanceWeightFunction } from "./beatleader";
34
34
  const NoteScoringType = {
35
35
  Ignore: -1,
36
36
  NoScore: 0,
@@ -1,5 +1,5 @@
1
- export * from "./format.js";
2
- export * from "./tag-format.js";
1
+ export * from "./format";
2
+ export * from "./tag-format";
3
3
  const diffConv = (diff) => {
4
4
  if (diff.includes("ExpertPlus")) {
5
5
  return "EX+";
@@ -1,4 +1,4 @@
1
- import { renderSchema, s3ConfigSchema } from "./infra/index.js";
1
+ import { renderSchema, s3ConfigSchema } from "@/infra";
2
2
  import { z } from "zod/v4";
3
3
  const cronSchema = z.object({
4
4
  enabled: z.boolean().optional().default(false),
package/dist/esm/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { botCommands } from "./cmd/index.js";
2
- import { getScheduleTasks } from "./schedules/index.js";
3
- export * from "./interface/index.js";
4
- export * from "./schedules/index.js";
5
- export * from "./config.js";
6
- export * from "./cmd/index.js";
7
- export * from "./ws/index.js";
8
- export * from "./utils/index.js";
9
- export * from "./service/index.js";
10
- export * from "./infra/index.js";
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.js";
5
- import { interpolateString } from "./util.js";
4
+ import { interpolate } from "./parser";
5
+ import { interpolateString } from "./util";
6
6
  class I18nService {
7
7
  constructor(config) {
8
8
  __publicField(this, "obj", {});
@@ -1,6 +1,6 @@
1
- export * from "./support/render/index.js";
2
- import { I18nService } from "./i18n/index.js";
3
- import { S3Service, s3ConfigSchema } from "./s3/index.js";
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.js";
2
- import { NotFoundError } from "./error.js";
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.js";
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.js";
53
+ import { html2imgBuffer, url2imgBuffer } from "./puppeteer";
54
54
  import { Puppeteer } from "puppeteer-core";
55
- import { createFetch } from "../../../infra/support/fetch/index.js";
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 "../../infra/errors/index.js";
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/index.js";
2
- export * from "./logger.js";
3
- export * from "./bot.js";
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.js";
13
+ export * from "./cmd/type";
14
14
  export {
15
15
  Platform,
16
16
  parsePlatform
@@ -1,4 +1,4 @@
1
- import { LBScoreMonitor } from "./temp.js";
1
+ import { LBScoreMonitor } from "./temp";
2
2
  const getScheduleTasks = (config) => {
3
3
  var _a, _b, _c, _d, _e;
4
4
  return [
@@ -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 "../../../infra/support/fetch/index.js";
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 "../../../infra/support/fetch/index.js";
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 "../../../infra/support/fetch/index.js";
39
- import { NotFoundError } from "../../../infra/support/fetch/error.js";
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.js";
2
- export * from "./blclient.js";
3
- export * from "./aioclient.js";
4
- export * from "./bsclient.js";
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 "../../../infra/support/fetch/index.js";
25
- import { NotFoundError } from "../../../infra/support/fetch/error.js";
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/index.js";
39
- import { BLIDNotFoundError, MapIdNotFoundError, SSIDNotFoundError } from "../../infra/errors/index.js";
40
- import { NotFoundError } from "../../infra/support/fetch/error.js";
41
- import { sortScore } from "./sortScore.js";
42
- import { decode } from "../../components/utils/bl/bsorDecoder.js";
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.js";
2
- export * from "./req.js";
3
- export * from "./score.js";
4
- export * from "./user.js";
5
- export * from "./ws.js";
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.js";
2
- export * from "./bsmap.js";
3
- export * from "./resp.js";
4
- export * from "./user.js";
5
- export * from "./alert.js";
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.js";
2
- export * from "./resp.js";
3
- export * from "./user.js";
1
+ export * from "./item";
2
+ export * from "./resp";
3
+ export * from "./user";
4
4
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { APIService } from "./api/index.js";
2
- import { RenderService } from "./render/index.js";
1
+ import { APIService } from "./api";
2
+ import { RenderService } from "./render";
3
3
  export {
4
4
  APIService,
5
5
  RenderService
@@ -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 "../../components/index.js";
49
+ import { getHtml } from "@/components";
50
50
  import { PuppeteerError, TimeoutError } from "puppeteer-core";
51
- import { Platform } from "../../interface/index.js";
52
- import { getBLPlayerComp, getBLRankScoreComp, getBSMapComp, getSSPlayerComp } from "../../components/pages/index.js";
53
- import { preferenceKey } from "../preference.js";
54
- import { ImageRenderError, RequestError } from "../../infra/errors/index.js";
55
- import createQrcode from "../../components/utils/qrcode.js";
56
- import { getImageRender } from "../../infra/support/render/index.js";
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
  };
@@ -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 "../utils/index.js";
24
+ import { handleWSEventWithCache } from "@/utils";
25
25
  class BeatSaverWSHandler {
26
26
  constructor(db, render, logger, config, botService) {
27
27
  __publicField(this, "logger");
@@ -1,4 +1,4 @@
1
- export * from "./beatleader.js";
2
- export * from "./beatsaver.js";
3
- export * from "./handler.js";
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.14",
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/esm",
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",