mirror of
https://github.com/ente-io/ente.git
synced 2025-08-11 08:53:13 +00:00
Rearrange to make webpack happy
Something in the previous arrangement was causing webpack to not pack worker/worker.ts as a web worker.
This commit is contained in:
parent
98a9fc39ec
commit
004dd3bd0c
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { apiURL } from "@/base/origins";
|
||||
import { ensureString } from "@/utils/ensure";
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { nameAndExtension } from "@/base/file";
|
||||
import log from "@/base/log";
|
||||
import { apiURL, customAPIOrigin } from "@/base/origins";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import SingleInputForm, {
|
||||
type SingleInputFormProps,
|
||||
} from "@ente/shared/components/SingleInputForm";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import downloadManager from "@/new/photos/services/download";
|
||||
import { EnteFile } from "@/new/photos/types/file";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { encryptMetadataJSON } from "@/base/crypto/ente";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import log from "@/base/log";
|
||||
import { apiURL } from "@/base/origins";
|
||||
import { ItemVisibility } from "@/media/file-metadata";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { decryptMetadataJSON } from "@/base/crypto/ente";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import log from "@/base/log";
|
||||
import { apiURL } from "@/base/origins";
|
||||
import HTTPService from "@ente/shared/network/HTTPService";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { apiURL } from "@/base/origins";
|
||||
import { EncryptedEnteFile, EnteFile } from "@/new/photos/types/file";
|
||||
|
@ -1,7 +1,5 @@
|
||||
import {
|
||||
createComlinkCryptoWorker,
|
||||
type CryptoWorker,
|
||||
} from "@/base/crypto/worker";
|
||||
import { createComlinkCryptoWorker } from "@/base/crypto";
|
||||
import { type CryptoWorker } from "@/base/crypto/worker";
|
||||
import { ensureElectron } from "@/base/electron";
|
||||
import { lowercaseExtension, nameAndExtension } from "@/base/file";
|
||||
import log from "@/base/log";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { getData, LS_KEYS } from "@ente/shared/storage/localStorage";
|
||||
import { getActualKey } from "@ente/shared/user";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { type Electron } from "@/base/types/ipc";
|
||||
import { ItemVisibility } from "@/media/file-metadata";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { ItemVisibility } from "@/media/file-metadata";
|
||||
import { EnteFile } from "@/new/photos/types/file";
|
||||
import { MagicMetadataCore } from "@/new/photos/types/magicMetadata";
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
} from "@/accounts/services/srp";
|
||||
import type { UpdatedKey } from "@/accounts/types/user";
|
||||
import { convertBase64ToBuffer, convertBufferToBase64 } from "@/accounts/utils";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
import FormPaper from "@ente/shared/components/Form/FormPaper";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import type { B64EncryptionResult } from "@/base/crypto/libsodium";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import log from "@/base/log";
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { sendOtt } from "@/accounts/api/user";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
|
@ -5,8 +5,8 @@ import {
|
||||
} from "@/accounts/api/user";
|
||||
import { PAGES } from "@/accounts/constants/pages";
|
||||
import type { AccountsContextT } from "@/accounts/types/context";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import type { B64EncryptionResult } from "@/base/crypto/libsodium";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import log from "@/base/log";
|
||||
import { ensure } from "@/utils/ensure";
|
||||
import { VerticallyCentered } from "@ente/shared/components/Container";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { clientPackageName, isDesktop } from "@/base/app";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { encryptToB64, generateEncryptionKey } from "@/base/crypto/libsodium";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { clientPackageHeader, HTTPError } from "@/base/http";
|
||||
import log from "@/base/log";
|
||||
import { accountsAppOrigin, apiURL } from "@/base/origins";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { UserVerificationResponse } from "@/accounts/types/user";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { generateLoginSubKey } from "@ente/shared/crypto/helpers";
|
||||
import InMemoryStore, { MS_KEYS } from "@ente/shared/storage/InMemoryStore";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { generateLoginSubKey } from "@ente/shared/crypto/helpers";
|
||||
import type { KeyAttributes } from "@ente/shared/user/types";
|
||||
import { generateSRPSetupAttributes } from "../services/srp";
|
||||
|
@ -47,6 +47,7 @@
|
||||
* recommendation though (in circumstances where we create more crypto workers
|
||||
* instead of using the shared one).
|
||||
*/
|
||||
import { sharedCryptoWorker } from ".";
|
||||
import { assertionFailed } from "../assert";
|
||||
import { inWorker } from "../env";
|
||||
import * as ei from "./ente-impl";
|
||||
@ -56,7 +57,6 @@ import type {
|
||||
EncryptBytes,
|
||||
EncryptJSON,
|
||||
} from "./types";
|
||||
import { sharedCryptoWorker } from "./worker";
|
||||
|
||||
/**
|
||||
* Some of these functions have not yet been needed on the main thread, and for
|
||||
|
@ -1,11 +1,6 @@
|
||||
import { ComlinkWorker } from "@/base/worker/comlink-worker";
|
||||
import type { CryptoWorker } from "./worker";
|
||||
|
||||
/**
|
||||
* Reexport the type for easier import in call sites.
|
||||
*/
|
||||
export { CryptoWorker } from "./worker";
|
||||
|
||||
/**
|
||||
* Cached instance of the {@link ComlinkWorker} that wraps our web worker.
|
||||
*/
|
@ -1,7 +1,7 @@
|
||||
import { expose } from "comlink";
|
||||
import type { StateAddress } from "libsodium-wrappers";
|
||||
import * as ei from "../ente-impl";
|
||||
import * as libsodium from "../libsodium";
|
||||
import * as ei from "./ente-impl";
|
||||
import * as libsodium from "./libsodium";
|
||||
|
||||
/**
|
||||
* A web worker that exposes some of the functions defined in either the Ente
|
@ -3,7 +3,8 @@
|
||||
|
||||
import { isDesktop } from "@/base/app";
|
||||
import { blobCache, type BlobCache } from "@/base/blob-cache";
|
||||
import { type CryptoWorker, sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import { type CryptoWorker } from "@/base/crypto/worker";
|
||||
import log from "@/base/log";
|
||||
import { customAPIOrigin } from "@/base/origins";
|
||||
import { FileType } from "@/media/file-type";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { SRPAttributes } from "@/accounts/types/srp";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { Input, type ButtonProps } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { setRecoveryKey } from "@/accounts/api/user";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import {
|
||||
LS_KEYS,
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import type { B64EncryptionResult } from "@/base/crypto/libsodium";
|
||||
import { sharedCryptoWorker } from "@/base/crypto/worker";
|
||||
import { CustomError } from "@ente/shared/error";
|
||||
import { getKey, SESSION_KEYS } from "@ente/shared/storage/sessionStorage";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user