Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Move to newer shared package

Manav Rathib056cf7f5693
diff --git a/web/apps/photos/src/components/ml/PeopleList.tsx b/web/apps/photos/src/components/ml/PeopleList.tsx
index e92b02680a..eddc5f085e 100644
--- a/web/apps/photos/src/components/ml/PeopleList.tsx
+++ b/web/apps/photos/src/components/ml/PeopleList.tsx
@@ -1,6 +1,6 @@
+import { cached } from "@/next/cache";
import { ensureLocalUser } from "@/next/local-user";
import log from "@/next/log";
-import { cached } from "@ente/shared/storage/cache";
import { Skeleton, styled } from "@mui/material";
import { Legend } from "components/PhotoViewer/styledComponents/Legend";
import { t } from "i18next";
diff --git a/web/apps/photos/src/services/download/index.ts b/web/apps/photos/src/services/download/index.ts
index b93040e5f2..e654078057 100644
--- a/web/apps/photos/src/services/download/index.ts
+++ b/web/apps/photos/src/services/download/index.ts
@@ -1,13 +1,10 @@
+import { CacheStorageService, type EnteCache } from "@/next/cache";
import log from "@/next/log";
import { APPS } from "@ente/shared/apps/constants";
import ComlinkCryptoWorker from "@ente/shared/crypto";
import { DedicatedCryptoWorker } from "@ente/shared/crypto/internal/crypto.worker";
import { CustomError } from "@ente/shared/error";
import { Events, eventBus } from "@ente/shared/events";
-import {
- CacheStorageService,
- type EnteCache,
-} from "@ente/shared/storage/cache";
import { Remote } from "comlink";
import { FILE_TYPE } from "constants/file";
import isElectron from "is-electron";
diff --git a/web/apps/photos/src/utils/machineLearning/faceCrop.ts b/web/apps/photos/src/utils/machineLearning/faceCrop.ts
index 177b2a8ec1..86f9bae979 100644
--- a/web/apps/photos/src/utils/machineLearning/faceCrop.ts
+++ b/web/apps/photos/src/utils/machineLearning/faceCrop.ts
@@ -1,4 +1,4 @@
-import { CacheStorageService } from "@ente/shared/storage/cache";
+import { CacheStorageService } from "@/next/cache";
import { BlobOptions } from "types/image";
import {
FaceAlignment,
diff --git a/web/apps/photos/src/utils/machineLearning/index.ts b/web/apps/photos/src/utils/machineLearning/index.ts
index 95e1018c9c..1e57b61f7c 100644
--- a/web/apps/photos/src/utils/machineLearning/index.ts
+++ b/web/apps/photos/src/utils/machineLearning/index.ts
@@ -1,5 +1,5 @@
+import { cached } from "@/next/cache";
import log from "@/next/log";
-import { cached } from "@ente/shared/storage/cache";
import { FILE_TYPE } from "constants/file";
import PQueue from "p-queue";
import DownloadManager from "services/download";
diff --git a/web/packages/accounts/services/user.ts b/web/packages/accounts/services/user.ts
index 777709c3a3..3861c64f5b 100644
--- a/web/packages/accounts/services/user.ts
+++ b/web/packages/accounts/services/user.ts
@@ -1,7 +1,7 @@
+import { clearCaches } from "@/next/cache";
import log from "@/next/log";
import { Events, eventBus } from "@ente/shared/events";
import InMemoryStore from "@ente/shared/storage/InMemoryStore";
-import { clearCaches } from "@ente/shared/storage/cache";
import { clearFiles } from "@ente/shared/storage/localForage/helpers";
import { clearData } from "@ente/shared/storage/localStorage";
import { clearKeys } from "@ente/shared/storage/sessionStorage";
diff --git a/web/packages/shared/storage/cache.ts b/web/packages/next/cache.ts
similarity index 98%
rename from web/packages/shared/storage/cache.ts
rename to web/packages/next/cache.ts
index 63ab5c404a..840f941753 100644
--- a/web/packages/shared/storage/cache.ts
+++ b/web/packages/next/cache.ts
@@ -83,7 +83,7 @@ const openCache = async (name: CacheName) =>
const openWebCache = async (name: CacheName) => {
const cache = await caches.open(name);
return {
- match: (key) => {
+ match: (key: string) => {
return cache.match(key);
},
put: (key: string, data: Response) => {
@@ -99,7 +99,7 @@ const openWebCache = async (name: CacheName) => {
const openOPFSCacheWeb = async (name: CacheName) => {
const cache = await caches.open(name);
return {
- match: (key) => {
+ match: (key: string) => {
return cache.match(key);
},
put: (key: string, data: Response) => {