This commit is contained in:
Manav Rathi
2024-11-21 07:43:50 +05:30
parent 27f18b5936
commit 252587ffa5
12 changed files with 13 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
import log from "@/base/log";
import { apiURL } from "@/base/origins";
import { retryAsyncOperation } from "@/gallery/retry-async";
import { retryAsyncOperation } from "@/gallery/utils/retry-async";
import { EnteFile } from "@/media/file";
import { CustomError, handleUploadError } from "@ente/shared/error";
import HTTPService from "@ente/shared/network/HTTPService";

View File

@@ -5,6 +5,7 @@ import { ensureElectron } from "@/base/electron";
import { basename, nameAndExtension } from "@/base/file-name";
import log from "@/base/log";
import { CustomErrorMessage } from "@/base/types/ipc";
import { detectFileTypeInfoFromChunk } from "@/gallery/utils/detect-type";
import {
EncryptedMagicMetadata,
EnteFile,
@@ -33,7 +34,6 @@ import {
RANDOM_PERCENTAGE_PROGRESS_FOR_PUT,
UPLOAD_RESULT,
} from "@/new/photos/services/upload/types";
import { detectFileTypeInfoFromChunk } from "@/new/photos/utils/detect-type";
import { readStream } from "@/new/photos/utils/native-stream";
import { mergeUint8Arrays } from "@/utils/array";
import { ensureInteger, ensureNumber } from "@/utils/ensure";

View File

@@ -1,6 +1,6 @@
import log from "@/base/log";
import { apiURL, uploaderOrigin } from "@/base/origins";
import { retryAsyncOperation } from "@/gallery/retry-async";
import { retryAsyncOperation } from "@/gallery/utils/retry-async";
import { EnteFile } from "@/media/file";
import { CustomError, handleUploadError } from "@ente/shared/error";
import HTTPService from "@ente/shared/network/HTTPService";

View File

@@ -2,6 +2,7 @@ import { sharedCryptoWorker } from "@/base/crypto";
import log from "@/base/log";
import { type Electron } from "@/base/types/ipc";
import { downloadAndRevokeObjectURL } from "@/base/utils/web";
import { detectFileTypeInfo } from "@/gallery/utils/detect-type";
import {
EncryptedEnteFile,
EnteFile,
@@ -20,7 +21,6 @@ import {
isArchivedFile,
updateMagicMetadata,
} from "@/new/photos/services/magic-metadata";
import { detectFileTypeInfo } from "@/new/photos/utils/detect-type";
import { safeFileName } from "@/new/photos/utils/native-fs";
import { writeStream } from "@/new/photos/utils/native-stream";
import { withTimeout } from "@/utils/promise";

View File

@@ -1,6 +1,6 @@
## @/base
A base UI layer package for sharing code between our production apps.
A base (+ UI layer) package for sharing code between our production apps.
This is a higher layer package than `@/utils` (which is framework agnostic).
This package is meant for sharing code between our Next.js apps that use React

View File

@@ -11,13 +11,15 @@
"get-user-locale": "^2.3.2",
"i18next": "^23.16.6",
"i18next-resources-to-backend": "^1.2.1",
"idb": "^8.0.0",
"is-electron": "^2.2.2",
"libsodium-wrappers-sumo": "^0.7.15",
"nanoid": "^5.0.8",
"next": "^14.2.9",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^15.1.1"
"react-i18next": "^15.1.1",
"zod": "^3.23.8"
},
"devDependencies": {
"@/build-config": "*",

View File

@@ -2,8 +2,8 @@
A package for sharing code between our apps that show media (photos, videos).
Specifically, this is the intersection of code required by both the photos and
cast apps.
Specifically, this is the intersection of code required by both the photos app
(or the public albums app) and cast apps.
### Packaging

View File

@@ -9,9 +9,7 @@
"@ente/shared": "*",
"@mui/x-date-pickers": "^7.16.0",
"dayjs": "^1.11.13",
"formik": "^2.4.6",
"idb": "^8.0.0",
"zod": "^3.23.8"
"formik": "^2.4.6"
},
"devDependencies": {
"@/build-config": "*"

View File

@@ -11,6 +11,7 @@ import {
} from "@/base/crypto";
import log from "@/base/log";
import { customAPIOrigin } from "@/base/origins";
import { retryAsyncOperation } from "@/gallery/utils/retry-async";
import type { EnteFile, LivePhotoSourceURL, SourceURLs } from "@/media/file";
import { FileType } from "@/media/file-type";
import { decodeLivePhoto } from "@/media/live-photo";
@@ -18,7 +19,6 @@ import * as ffmpeg from "@/new/photos/services/ffmpeg";
import { renderableImageBlob } from "@/new/photos/utils/file";
import { CustomError } from "@ente/shared/error";
import HTTPService from "@ente/shared/network/HTTPService";
import { retryAsyncOperation } from "@/gallery/retry-async";
export type OnDownloadProgress = (event: {
loaded: number;

View File

@@ -2,9 +2,9 @@ import { isDesktop } from "@/base/app";
import log from "@/base/log";
import { CustomErrorMessage } from "@/base/types/ipc";
import { workerBridge } from "@/base/worker/worker-bridge";
import { detectFileTypeInfo } from "@/gallery/utils/detect-type";
import { isHEICExtension, needsJPEGConversion } from "@/media/formats";
import { heicToJPEG } from "@/media/heic-convert";
import { detectFileTypeInfo } from "./detect-type";
/**
* This will be set to false if we get an error from the Node.js side of our