From 8ad12a91adcfa2815ca9e7ba7f0170a5b274b834 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 9 Apr 2024 21:12:35 +0300 Subject: [PATCH] refactor: remove obsolete index re-exports from /shared --- backend/src/api/guilds.ts | 2 +- backend/src/api/guilds/importExport.ts | 2 +- backend/src/api/guilds/misc.ts | 2 +- backend/src/api/permissions.ts | 2 +- backend/src/data/ApiPermissionAssignments.ts | 2 +- backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts | 2 +- .../src/plugins/BotControl/commands/AddServerFromInviteCmd.ts | 2 +- backend/src/plugins/BotControl/commands/AllowServerCmd.ts | 2 +- shared/package.json | 1 - shared/src/index.ts | 1 - 10 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 shared/src/index.ts diff --git a/backend/src/api/guilds.ts b/backend/src/api/guilds.ts index afe881b5b..87fdfee9e 100644 --- a/backend/src/api/guilds.ts +++ b/backend/src/api/guilds.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import express, { Request, Response } from "express"; import jsYaml from "js-yaml"; import moment from "moment-timezone"; diff --git a/backend/src/api/guilds/importExport.ts b/backend/src/api/guilds/importExport.ts index 132facff7..28db0e6a9 100644 --- a/backend/src/api/guilds/importExport.ts +++ b/backend/src/api/guilds/importExport.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import express, { Request, Response } from "express"; import moment from "moment-timezone"; import { z } from "zod"; diff --git a/backend/src/api/guilds/misc.ts b/backend/src/api/guilds/misc.ts index af956b6d3..3ab72dd75 100644 --- a/backend/src/api/guilds/misc.ts +++ b/backend/src/api/guilds/misc.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import express, { Request, Response } from "express"; import jsYaml from "js-yaml"; import moment from "moment-timezone"; diff --git a/backend/src/api/permissions.ts b/backend/src/api/permissions.ts index e58e3a8f1..6a809a007 100644 --- a/backend/src/api/permissions.ts +++ b/backend/src/api/permissions.ts @@ -1,4 +1,4 @@ -import { ApiPermissions, hasPermission, permissionArrToSet } from "@zeppelinbot/shared"; +import { ApiPermissions, hasPermission, permissionArrToSet } from "@zeppelinbot/shared/apiPermissions.js"; import { Request, Response } from "express"; import { ApiPermissionAssignments } from "../data/ApiPermissionAssignments.js"; import { isStaff } from "../staff.js"; diff --git a/backend/src/data/ApiPermissionAssignments.ts b/backend/src/data/ApiPermissionAssignments.ts index b0c1ece94..3c1ef2c6c 100644 --- a/backend/src/data/ApiPermissionAssignments.ts +++ b/backend/src/data/ApiPermissionAssignments.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import { Repository } from "typeorm"; import { ApiAuditLog } from "./ApiAuditLog.js"; import { BaseRepository } from "./BaseRepository.js"; diff --git a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts index f0fd1f903..42cfc25d0 100644 --- a/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts +++ b/backend/src/plugins/BotControl/commands/AddDashboardUserCmd.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import { commandTypeHelpers as ct } from "../../../commandTypes.js"; import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils.js"; import { renderUsername } from "../../../utils.js"; diff --git a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts index 19a6d5715..4bda1a9df 100644 --- a/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts +++ b/backend/src/plugins/BotControl/commands/AddServerFromInviteCmd.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import moment from "moment-timezone"; import { commandTypeHelpers as ct } from "../../../commandTypes.js"; import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils.js"; diff --git a/backend/src/plugins/BotControl/commands/AllowServerCmd.ts b/backend/src/plugins/BotControl/commands/AllowServerCmd.ts index d68ee4534..6dd0751fe 100644 --- a/backend/src/plugins/BotControl/commands/AllowServerCmd.ts +++ b/backend/src/plugins/BotControl/commands/AllowServerCmd.ts @@ -1,4 +1,4 @@ -import { ApiPermissions } from "@zeppelinbot/shared"; +import { ApiPermissions } from "@zeppelinbot/shared/apiPermissions.js"; import moment from "moment-timezone"; import { commandTypeHelpers as ct } from "../../../commandTypes.js"; import { isStaffPreFilter, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils.js"; diff --git a/shared/package.json b/shared/package.json index 39bcb2d9f..2c76a15f1 100644 --- a/shared/package.json +++ b/shared/package.json @@ -5,7 +5,6 @@ "private": true, "type": "module", "exports": { - ".": "./dist/index.js", "./*": "./dist/*" }, "scripts": { diff --git a/shared/src/index.ts b/shared/src/index.ts deleted file mode 100644 index 3410a406f..000000000 --- a/shared/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./apiPermissions.js";