fix: live server runtime errors (#7314)

* fix: live tsconfig and tsup config

* fix: lock file updates

* feat: adding build process to constants and types packages

* chore: coderabbit suggestions
This commit is contained in:
sriram veeraghanta 2025-07-02 18:20:18 +05:30 committed by GitHub
parent 5874636b0b
commit 7153064ebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
40 changed files with 282 additions and 783 deletions

View file

@ -5,8 +5,7 @@ import { computedFn } from "mobx-utils";
import { v4 as uuidv4 } from "uuid";
// plane imports
import { SitesFileService, SitesIssueService } from "@plane/services";
import { TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
import { EFileAssetType } from "@plane/types/src/enums";
import { EFileAssetType, TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
// store
import { CoreRootStore } from "@/store/root.store";
// types

View file

@ -27,16 +27,19 @@ type TArgs = {
export const getReadOnlyEditorFileHandlers = (args: Pick<TArgs, "anchor" | "workspaceId">): TReadOnlyFileHandler => {
const { anchor, workspaceId } = args;
const getAssetSrc = async (path: string) => {
if (!path) return "";
if (path?.startsWith("http")) {
return path;
} else {
return getEditorAssetSrc(anchor, path) ?? "";
}
};
return {
checkIfAssetExists: async () => true,
getAssetSrc: async (path) => {
if (!path) return "";
if (path?.startsWith("http")) {
return path;
} else {
return getEditorAssetSrc(anchor, path) ?? "";
}
},
getAssetDownloadSrc: getAssetSrc,
getAssetSrc: getAssetSrc,
restore: async (src: string) => {
if (src?.startsWith("http")) {
await sitesFileService.restoreOldEditorAsset(workspaceId, src);