-
Notifications
You must be signed in to change notification settings - Fork 0
[PB-5714] Shake imports #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8317d18
load modules separately
TamaraFinogina 0c5b5d4
Merge remote-tracking branch 'origin/master' into split_imports
TamaraFinogina 7f0e661
remove email-service
TamaraFinogina b93f5c6
Merge remote-tracking branch 'origin/master' into split_imports
TamaraFinogina 24de4fa
Merge remote-tracking branch 'origin/master' into split_imports
TamaraFinogina 908fa3c
adjust exports
TamaraFinogina 554528f
Merge remote-tracking branch 'origin/master' into split_imports
TamaraFinogina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,94 @@ | ||
| export * as asymmetric from './asymmetric-crypto'; | ||
| export * as deriveKey from './derive-key'; | ||
| export * as emailCrypto from './email-crypto'; | ||
| export * as emailSearch from './email-search'; | ||
| export * as hash from './hash'; | ||
| export * as keyWrapper from './key-wrapper'; | ||
| export * as keystoreCrypto from './keystore-crypto'; | ||
| export * as keystoreService from './keystore-service'; | ||
| export * as pq from './post-quantum-crypto'; | ||
| export * as storage from './storage-service'; | ||
| export * as symmetric from './symmetric-crypto'; | ||
| export * as utils from './utils'; | ||
| export { | ||
| deriveSecretKey, | ||
| generateEccKeys, | ||
| exportPublicKey, | ||
| importPublicKey, | ||
| exportPrivateKey, | ||
| importPrivateKey, | ||
| } from './asymmetric-crypto'; | ||
| export { | ||
| deriveSymmetricKeyFromTwoKeys, | ||
| deriveSymmetricCryptoKeyFromTwoKeys, | ||
| deriveSymmetricKeyFromTwoKeysAndContext, | ||
| deriveSymmetricKeyFromContext, | ||
| deriveSymmetricCryptoKeyFromContext, | ||
| getKeyFromPassword, | ||
| getKeyFromPasswordAndSalt, | ||
| getKeyFromPasswordHex, | ||
| getKeyFromPasswordAndSaltHex, | ||
| verifyKeyFromPasswordHex, | ||
| } from './derive-key'; | ||
| export { | ||
| encryptEmailHybrid, | ||
| encryptEmailHybridForMultipleRecipients, | ||
| decryptEmailHybrid, | ||
| createPwdProtectedEmail, | ||
| decryptPwdProtectedEmail, | ||
| generateEmailKeys, | ||
| } from './email-crypto'; | ||
| export { | ||
| openDatabase, | ||
| closeDatabase, | ||
| deriveIndexKey, | ||
| encryptAndStoreEmail, | ||
| encryptAndStoreManyEmail, | ||
| getAndDecryptEmail, | ||
| getAndDecryptAllEmails, | ||
| deleteEmail, | ||
| getEmailCount, | ||
| deleteOldestEmails, | ||
| enforceMaxEmailNumber, | ||
| getAllEmailsSortedNewestFirst, | ||
| getAllEmailsSortedOldestFirst, | ||
| getEmailBatch, | ||
| createCacheFromDB, | ||
| getEmailFromCache, | ||
| deleteEmailFromCache, | ||
| addEmailsToCache, | ||
| addEmailToCache, | ||
| addEmailToSearchIndex, | ||
| removeEmailFromSearchIndex, | ||
| buildSearchIndexFromCache, | ||
| searchEmails, | ||
| } from './email-search'; | ||
| export { | ||
| hashDataArray, | ||
| hashDataArrayWithKey, | ||
| hashDataArrayHex, | ||
| hashDataArrayWithKeyHex, | ||
| getBytesFromData, | ||
| getBytesFromDataHex, | ||
| getBytesFromDataArrayHex, | ||
| computeMac, | ||
| } from './hash'; | ||
| export { unwrapKey, wrapKey } from './key-wrapper'; | ||
| export { createEncryptionAndRecoveryKeystores, openEncryptionKeystore, openRecoveryKeystore } from './keystore-crypto'; | ||
| export { getKeyServiceAPI } from './keystore-service'; | ||
| export { generateKyberKeys, encapsulateKyber, decapsulateKyber } from './post-quantum-crypto/kyber768'; | ||
| export { | ||
| encryptSymmetrically, | ||
| decryptSymmetrically, | ||
| importSymmetricCryptoKey, | ||
| exportSymmetricCryptoKey, | ||
| genSymmetricCryptoKey, | ||
| genSymmetricKey, | ||
| deriveSymmetricCryptoKey, | ||
| } from './symmetric-crypto'; | ||
| export { | ||
| uint8ArrayToHex, | ||
| UTF8ToUint8, | ||
| uint8ToUTF8, | ||
| hexToUint8Array, | ||
| uint8ArrayToBase64, | ||
| base64ToUint8Array, | ||
| genMnemonic, | ||
| base64ToPublicKey, | ||
| publicKeyToBase64, | ||
| generateUuid, | ||
| uuidToBytes, | ||
| bytesToUuid, | ||
| mnemonicToBytes, | ||
| bytesToMnemonic, | ||
| } from './utils'; | ||
| export * from './types'; | ||
| export * from './constants'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,28 +1,16 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "baseUrl": "./src", | ||
| "emitDeclarationOnly": true, | ||
| "target": "ES2022", | ||
| "module": "ESNext", | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "outDir": "dist", | ||
| "target": "es5", | ||
| "lib": ["dom", "dom.iterable", "esnext"], | ||
| "allowJs": true, | ||
| "skipLibCheck": true, | ||
| "esModuleInterop": true, | ||
| "allowSyntheticDefaultImports": true, | ||
| "strict": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "noFallthroughCasesInSwitch": true, | ||
| "module": "esnext", | ||
| "moduleResolution": "node", | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true, | ||
| "jsx": "react-jsx", | ||
| "noImplicitAny": false, | ||
| "downlevelIteration": true, | ||
| "esModuleInterop": true, | ||
| "moduleResolution": "Node", | ||
| "incremental": true, | ||
| "types": ["vite/client"] | ||
| "tsBuildInfoFile": "./dist/.tsbuildinfo" | ||
| }, | ||
| "types": ["filesystem", "@types/react"], | ||
| "include": ["src", "vite-env.d.ts"] | ||
| } | ||
| "include": ["src"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { defineConfig } from 'tsup'; | ||
|
|
||
| export default defineConfig({ | ||
| entry: { | ||
| index: 'src/index.ts', | ||
| 'asymmetric-crypto': 'src/asymmetric-crypto/index.ts', | ||
| 'symmetric-crypto': 'src/symmetric-crypto/index.ts', | ||
| 'post-quantum-crypto': 'src/post-quantum-crypto/index.ts', | ||
| hash: 'src/hash/index.ts', | ||
| 'derive-key': 'src/derive-key/index.ts', | ||
| 'email-crypto': 'src/email-crypto/index.ts', | ||
| 'keystore-crypto': 'src/keystore-crypto/index.ts', | ||
| 'keystore-service': 'src/keystore-service/index.ts', | ||
| 'email-search': 'src/email-search/index.ts', | ||
| 'storage-service': 'src/storage-service/index.ts', | ||
| utils: 'src/utils/index.ts', | ||
| types: 'src/types.ts', | ||
| constants: 'src/constants.ts', | ||
| }, | ||
| platform: 'browser', | ||
| format: ['esm', 'cjs'], | ||
| splitting: false, | ||
| sourcemap: true, | ||
| clean: true, | ||
| treeshake: true, | ||
| outDir: 'dist', | ||
| dts: true, | ||
| noExternal: ['hash-wasm'], | ||
| esbuildOptions(options) { | ||
| options.conditions = ['module', 'import', 'default']; | ||
| }, | ||
| }); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know if I like this manual thing to export everything 🫤
Maybe we can find a better one, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that's what I'm looking for. Cause it's too complicated for such a simple request