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:
parent
5874636b0b
commit
7153064ebb
40 changed files with 282 additions and 783 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue