mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-04-11 18:19:36 -04:00
Move shared to core folder (#1404)
This commit is contained in:
14
.github/workflows/browser-extension-build.yml
vendored
14
.github/workflows/browser-extension-build.yml
vendored
@@ -22,20 +22,20 @@ jobs:
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Build and distribute shared libraries
|
||||
- name: Build and distribute core libraries
|
||||
run: |
|
||||
cd ./shared
|
||||
cd ./core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify shared library distribution
|
||||
- name: Verify core library distribution
|
||||
run: |
|
||||
# Check if files exist and were recently modified
|
||||
TARGET_DIRS=(
|
||||
"apps/browser-extension/src/utils/dist/shared/identity-generator"
|
||||
"apps/browser-extension/src/utils/dist/shared/password-generator"
|
||||
"apps/browser-extension/src/utils/dist/shared/models"
|
||||
"apps/browser-extension/src/utils/dist/shared/vault-sql"
|
||||
"apps/browser-extension/src/utils/dist/core/identity-generator"
|
||||
"apps/browser-extension/src/utils/dist/core/password-generator"
|
||||
"apps/browser-extension/src/utils/dist/core/models"
|
||||
"apps/browser-extension/src/utils/dist/core/vault"
|
||||
)
|
||||
|
||||
for dir in "${TARGET_DIRS[@]}"; do
|
||||
|
||||
14
.github/workflows/mobile-app-build.yml
vendored
14
.github/workflows/mobile-app-build.yml
vendored
@@ -43,20 +43,20 @@ jobs:
|
||||
cache: 'npm'
|
||||
cache-dependency-path: apps/mobile-app/package-lock.json
|
||||
|
||||
- name: Build and distribute shared libraries
|
||||
- name: Build and distribute core libraries
|
||||
run: |
|
||||
cd ../../shared
|
||||
cd ../../core
|
||||
chmod +x build-and-distribute.sh
|
||||
./build-and-distribute.sh
|
||||
|
||||
- name: Verify shared library distribution
|
||||
- name: Verify core library distribution
|
||||
run: |
|
||||
# Check if files exist and were recently modified
|
||||
TARGET_DIRS=(
|
||||
"utils/dist/shared/identity-generator"
|
||||
"utils/dist/shared/password-generator"
|
||||
"utils/dist/shared/models"
|
||||
"utils/dist/shared/vault-sql"
|
||||
"utils/dist/core/identity-generator"
|
||||
"utils/dist/core/password-generator"
|
||||
"utils/dist/core/models"
|
||||
"utils/dist/core/vault"
|
||||
)
|
||||
|
||||
for dir in "${TARGET_DIRS[@]}"; do
|
||||
|
||||
16
.gitignore
vendored
16
.gitignore
vendored
@@ -435,20 +435,20 @@ temp
|
||||
# Safari extension build files
|
||||
apps/browser-extension/safari-xcode/AliasVault/build
|
||||
|
||||
# Rust core binaries (built by ./build.sh in shared/rust-core)
|
||||
# Rust core binaries (built by ./build.sh in core/rust)
|
||||
# These are platform-specific and must be built locally or by CI
|
||||
shared/rust-core/dist/
|
||||
shared/rust-core/target/
|
||||
core/rust/dist/
|
||||
core/rust/target/
|
||||
|
||||
# Browser extension WASM (built by: cd shared/rust-core && ./build.sh --browser)
|
||||
apps/browser-extension/src/utils/dist/shared/rust-core
|
||||
# Browser extension WASM (built by: cd core/rust && ./build.sh --browser)
|
||||
apps/browser-extension/src/utils/dist/core/rust
|
||||
|
||||
# iOS Swift bindings (built by: cd shared/rust-core && ./build.sh --ios)
|
||||
# iOS Swift bindings (built by: cd core/rust && ./build.sh --ios)
|
||||
apps/mobile-app/ios/AliasVaultCore/
|
||||
|
||||
# Android Kotlin bindings (built by: cd shared/rust-core && ./build.sh --android)
|
||||
# Android Kotlin bindings (built by: cd core/rust && ./build.sh --android)
|
||||
apps/mobile-app/android/app/src/main/java/com/aliasvault/core/
|
||||
apps/mobile-app/android/app/src/main/jniLibs/
|
||||
|
||||
# Server .NET bindings (built by: cd shared/rust-core && ./build.sh --server)
|
||||
# Server .NET bindings (built by: cd core/rust && ./build.sh --server)
|
||||
apps/server/Utilities/AliasVault.RustCore/
|
||||
|
||||
2
.vscode/AliasVault.code-workspace
vendored
2
.vscode/AliasVault.code-workspace
vendored
@@ -20,7 +20,7 @@
|
||||
"path": "../docs"
|
||||
},
|
||||
{
|
||||
"path": "../shared"
|
||||
"path": "../core"
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
|
||||
@@ -12,7 +12,7 @@ import { handleOpenPopup, handlePopupWithCredential, handleOpenPopupCreateCreden
|
||||
import { handleCheckAuthStatus, handleClearPersistedFormValues, handleClearVault, handleLockVault, handleCreateIdentity, handleGetCredentials, handleGetDefaultEmailDomain, handleGetDefaultIdentitySettings, handleGetEncryptionKey, handleGetEncryptionKeyDerivationParams, handleGetPasswordSettings, handleGetPersistedFormValues, handleGetVault, handlePersistFormValues, handleStoreEncryptionKey, handleStoreEncryptionKeyDerivationParams, handleStoreVaultMetadata, handleSyncVault, handleUploadVault, handleGetOfflineMode, handleSetOfflineMode, handleGetEncryptedVault, handleStoreEncryptedVault, handleGetHasPendingSync, handleSetHasPendingSync } from '@/entrypoints/background/VaultMessageHandler';
|
||||
|
||||
import { GLOBAL_CONTEXT_MENU_ENABLED_KEY } from '@/utils/Constants';
|
||||
import { EncryptionKeyDerivationParams } from "@/utils/dist/shared/models/metadata";
|
||||
import { EncryptionKeyDerivationParams } from "@/utils/dist/core/models/metadata";
|
||||
|
||||
import { defineBackground, storage, browser } from '#imports';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { type Browser } from '@wxt-dev/browser';
|
||||
import { sendMessage } from 'webext-bridge/background';
|
||||
|
||||
import { PasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import { PasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
|
||||
import { t } from '@/i18n/StandaloneI18n';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { storage } from 'wxt/utils/storage';
|
||||
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
|
||||
import type { Vault, VaultResponse, VaultPostResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/core/models/metadata';
|
||||
import type { Vault, VaultResponse, VaultPostResponse } from '@/utils/dist/core/models/webapi';
|
||||
import { EncryptionUtility } from '@/utils/EncryptionUtility';
|
||||
import { SqliteClient } from '@/utils/SqliteClient';
|
||||
import { VaultVersionIncompatibleError } from '@/utils/types/errors/VaultVersionIncompatibleError';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { sendMessage } from 'webext-bridge/content-script';
|
||||
|
||||
import { openAutofillPopup } from '@/entrypoints/contentScript/Popup';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import { FormDetector } from '@/utils/formDetector/FormDetector';
|
||||
import { FormFiller } from '@/utils/formDetector/FormFiller';
|
||||
import { ClickValidator } from '@/utils/security/ClickValidator';
|
||||
|
||||
@@ -4,9 +4,9 @@ import { fillCredential } from '@/entrypoints/contentScript/Form';
|
||||
|
||||
import { DISABLED_SITES_KEY, TEMPORARY_DISABLED_SITES_KEY, GLOBAL_AUTOFILL_POPUP_ENABLED_KEY, VAULT_LOCKED_DISMISS_UNTIL_KEY, AUTOFILL_MATCHING_MODE_KEY, CUSTOM_EMAIL_HISTORY_KEY, CUSTOM_USERNAME_HISTORY_KEY } from '@/utils/Constants';
|
||||
import { AutofillMatchingMode } from '@/utils/credentialMatcher/CredentialMatcher';
|
||||
import { CreateIdentityGenerator } from '@/utils/dist/shared/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import { CreatePasswordGenerator, PasswordGenerator, PasswordSettings } from '@/utils/dist/shared/password-generator';
|
||||
import { CreateIdentityGenerator } from '@/utils/dist/core/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import { CreatePasswordGenerator, PasswordGenerator, PasswordSettings } from '@/utils/dist/core/password-generator';
|
||||
import { ClickValidator } from '@/utils/security/ClickValidator';
|
||||
import { ServiceDetectionUtility } from '@/utils/serviceDetection/ServiceDetectionUtility';
|
||||
import { SqliteClient } from '@/utils/SqliteClient';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import SqliteClient from '@/utils/SqliteClient';
|
||||
|
||||
type CredentialCardProps = {
|
||||
|
||||
@@ -3,8 +3,8 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { FormInputCopyToClipboard } from '@/entrypoints/popup/components/Forms/FormInputCopyToClipboard';
|
||||
|
||||
import { IdentityHelperUtils } from '@/utils/dist/shared/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import { IdentityHelperUtils } from '@/utils/dist/core/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type AliasBlockProps = {
|
||||
credential: Credential;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import type { Attachment } from '@/utils/dist/shared/models/vault';
|
||||
import type { Attachment } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type AttachmentBlockProps = {
|
||||
credentialId?: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import type { Attachment } from '@/utils/dist/shared/models/vault';
|
||||
import type { Attachment } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type AttachmentUploaderProps = {
|
||||
attachments: Attachment[];
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useTranslation } from 'react-i18next';
|
||||
import { FormInputCopyToClipboard } from '@/entrypoints/popup/components/Forms/FormInputCopyToClipboard';
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import type { ItemField } from '@/utils/dist/shared/models/vault';
|
||||
import { getSystemField } from '@/utils/dist/shared/models/vault';
|
||||
import type { ItemField } from '@/utils/dist/core/models/vault';
|
||||
import { getSystemField } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import FieldHistoryModal from './FieldHistoryModal';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import type { FieldHistory, FieldType } from '@/utils/dist/shared/models/vault';
|
||||
import type { FieldHistory, FieldType } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type FieldHistoryModalProps = {
|
||||
isOpen: boolean;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import SqliteClient from '@/utils/SqliteClient';
|
||||
|
||||
type HeaderBlockProps = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { FormInputCopyToClipboard } from '@/entrypoints/popup/components/Forms/FormInputCopyToClipboard';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type LoginCredentialsBlockProps = {
|
||||
credential: Credential;
|
||||
|
||||
@@ -5,7 +5,7 @@ import { sendMessage } from 'webext-bridge/popup';
|
||||
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import type { TotpCode } from '@/utils/dist/shared/models/vault';
|
||||
import type { TotpCode } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type TotpBlockProps = {
|
||||
credentialId?: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as OTPAuth from 'otpauth';
|
||||
import React, { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import type { TotpCode } from '@/utils/dist/shared/models/vault';
|
||||
import type { TotpCode } from '@/utils/dist/core/models/vault';
|
||||
|
||||
type TotpFormData = {
|
||||
name: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import type { PasswordSettings } from '@/utils/dist/shared/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import type { PasswordSettings } from '@/utils/dist/core/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
|
||||
interface IPasswordConfigDialogProps {
|
||||
isOpen: boolean;
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';
|
||||
|
||||
import { AppInfo } from '@/utils/AppInfo';
|
||||
import type { ApiErrorResponse, MailboxEmail } from '@/utils/dist/shared/models/webapi';
|
||||
import type { ApiErrorResponse, MailboxEmail } from '@/utils/dist/core/models/webapi';
|
||||
import { EncryptionUtility } from '@/utils/EncryptionUtility';
|
||||
|
||||
import { storage } from '#imports';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useCallback, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import type { FieldType, ItemType } from '@/utils/dist/shared/models/vault';
|
||||
import type { FieldType, ItemType } from '@/utils/dist/core/models/vault';
|
||||
|
||||
/**
|
||||
* Visibility state for optional sections.
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useTranslation } from 'react-i18next';
|
||||
import PasswordConfigDialog from '@/entrypoints/popup/components/Dialogs/PasswordConfigDialog';
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import type { PasswordSettings } from '@/utils/dist/shared/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import type { PasswordSettings } from '@/utils/dist/core/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
|
||||
interface IPasswordFieldProps {
|
||||
id: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import type { Item } from '@/utils/dist/shared/models/vault';
|
||||
import { FieldKey } from '@/utils/dist/shared/models/vault';
|
||||
import type { Item } from '@/utils/dist/core/models/vault';
|
||||
import { FieldKey } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import ItemIcon from './ItemIcon';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
|
||||
import type { Item } from '@/utils/dist/shared/models/vault';
|
||||
import { FieldKey } from '@/utils/dist/shared/models/vault';
|
||||
import type { Item } from '@/utils/dist/core/models/vault';
|
||||
import { FieldKey } from '@/utils/dist/core/models/vault';
|
||||
import SqliteClient from '@/utils/SqliteClient';
|
||||
|
||||
type ItemIconProps = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import type { ItemType } from '@/utils/dist/shared/models/vault';
|
||||
import type { ItemType } from '@/utils/dist/core/models/vault';
|
||||
|
||||
/**
|
||||
* Item type option configuration.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { createContext, useContext, useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { sendMessage } from 'webext-bridge/popup';
|
||||
|
||||
import type { EncryptionKeyDerivationParams, VaultMetadata } from '@/utils/dist/shared/models/metadata';
|
||||
import type { EncryptionKeyDerivationParams, VaultMetadata } from '@/utils/dist/core/models/metadata';
|
||||
import SqliteClient from '@/utils/SqliteClient';
|
||||
import type { VaultResponse as messageVaultResponse } from '@/utils/types/messaging/VaultResponse';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { useCallback, useState, type Dispatch, type SetStateAction } from 'react
|
||||
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
|
||||
import { IdentityHelperUtils, CreateIdentityGenerator, convertAgeRangeToBirthdateOptions } from '@/utils/dist/shared/identity-generator';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import { IdentityHelperUtils, CreateIdentityGenerator, convertAgeRangeToBirthdateOptions } from '@/utils/dist/core/identity-generator';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
|
||||
/**
|
||||
* Generated alias data returned by the hook.
|
||||
|
||||
@@ -6,8 +6,8 @@ import { useApp } from '@/entrypoints/popup/context/AppContext';
|
||||
import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';
|
||||
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
|
||||
import type { VaultResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/core/models/metadata';
|
||||
import type { VaultResponse } from '@/utils/dist/core/models/webapi';
|
||||
import { EncryptionUtility } from '@/utils/EncryptionUtility';
|
||||
import { NetworkError } from '@/utils/types/errors/NetworkError';
|
||||
import { VaultVersionIncompatibleError } from '@/utils/types/errors/VaultVersionIncompatibleError';
|
||||
|
||||
@@ -18,7 +18,7 @@ import SrpUtility from '@/entrypoints/popup/utils/SrpUtility';
|
||||
|
||||
import { AppInfo } from '@/utils/AppInfo';
|
||||
import { SrpAuthService } from '@/utils/auth/SrpAuthService';
|
||||
import type { VaultResponse, LoginResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { VaultResponse, LoginResponse } from '@/utils/dist/core/models/webapi';
|
||||
import { EncryptionUtility } from '@/utils/EncryptionUtility';
|
||||
import SqliteClient from '@/utils/SqliteClient';
|
||||
import { ApiAuthError } from '@/utils/types/errors/ApiAuthError';
|
||||
|
||||
@@ -20,7 +20,7 @@ import SrpUtility from '@/entrypoints/popup/utils/SrpUtility';
|
||||
|
||||
import { SrpAuthService } from '@/utils/auth/SrpAuthService';
|
||||
import { VAULT_LOCKED_DISMISS_UNTIL_KEY } from '@/utils/Constants';
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/core/models/metadata';
|
||||
import {
|
||||
getPinLength,
|
||||
isPinEnabled,
|
||||
|
||||
@@ -16,8 +16,8 @@ import { useVaultMutate } from '@/entrypoints/popup/hooks/useVaultMutate';
|
||||
import { useVaultSync } from '@/entrypoints/popup/hooks/useVaultSync';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { VaultVersion } from '@/utils/dist/shared/vault-sql';
|
||||
import { VaultSqlGenerator } from '@/utils/dist/shared/vault-sql';
|
||||
import type { VaultVersion } from '@/utils/dist/core/vault';
|
||||
import { VaultSqlGenerator } from '@/utils/dist/core/vault';
|
||||
|
||||
/**
|
||||
* Upgrade page for handling vault version upgrades.
|
||||
@@ -112,7 +112,7 @@ const Upgrade: React.FC = () => {
|
||||
setError(null);
|
||||
|
||||
try {
|
||||
// Get upgrade SQL commands from vault-sql shared library
|
||||
// Get upgrade SQL commands from vault library
|
||||
const vaultSqlGenerator = new VaultSqlGenerator();
|
||||
const upgradeResult = vaultSqlGenerator.getUpgradeVaultSql(currentVersion.revision, latestVersion.revision);
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';
|
||||
import { useVaultMutate } from '@/entrypoints/popup/hooks/useVaultMutate';
|
||||
|
||||
import { SKIP_FORM_RESTORE_KEY } from '@/utils/Constants';
|
||||
import { IdentityHelperUtils, CreateIdentityGenerator, CreateUsernameEmailGenerator, Identity, Gender, convertAgeRangeToBirthdateOptions } from '@/utils/dist/shared/identity-generator';
|
||||
import type { Attachment, Credential, TotpCode } from '@/utils/dist/shared/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import { IdentityHelperUtils, CreateIdentityGenerator, CreateUsernameEmailGenerator, Identity, Gender, convertAgeRangeToBirthdateOptions } from '@/utils/dist/core/identity-generator';
|
||||
import type { Attachment, Credential, TotpCode } from '@/utils/dist/core/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
import { ServiceDetectionUtility } from '@/utils/serviceDetection/ServiceDetectionUtility';
|
||||
|
||||
import { browser } from '#imports';
|
||||
|
||||
@@ -18,7 +18,7 @@ import { useHeaderButtons } from '@/entrypoints/popup/context/HeaderButtonsConte
|
||||
import { useLoading } from '@/entrypoints/popup/context/LoadingContext';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
/**
|
||||
* Credential details page.
|
||||
|
||||
@@ -14,7 +14,7 @@ import { useLoading } from '@/entrypoints/popup/context/LoadingContext';
|
||||
import { useVaultSync } from '@/entrypoints/popup/hooks/useVaultSync';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ import { useLoading } from '@/entrypoints/popup/context/LoadingContext';
|
||||
import useAliasGenerator from '@/entrypoints/popup/hooks/useAliasGenerator';
|
||||
import { useVaultMutate } from '@/entrypoints/popup/hooks/useVaultMutate';
|
||||
|
||||
import type { Item, ItemField, ItemType, FieldType, Attachment, TotpCode } from '@/utils/dist/shared/models/vault';
|
||||
import { getSystemFieldsForItemType, isFieldShownByDefault } from '@/utils/dist/shared/models/vault';
|
||||
import type { Item, ItemField, ItemType, FieldType, Attachment, TotpCode } from '@/utils/dist/core/models/vault';
|
||||
import { getSystemFieldsForItemType, isFieldShownByDefault } from '@/utils/dist/core/models/vault';
|
||||
|
||||
// Valid item types from the shared model
|
||||
const VALID_ITEM_TYPES: ItemType[] = ['Login', 'Alias', 'CreditCard', 'Note'];
|
||||
|
||||
@@ -15,8 +15,8 @@ import { useHeaderButtons } from '@/entrypoints/popup/context/HeaderButtonsConte
|
||||
import { useLoading } from '@/entrypoints/popup/context/LoadingContext';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { Item } from '@/utils/dist/shared/models/vault';
|
||||
import { groupFieldsByCategory } from '@/utils/dist/shared/models/vault';
|
||||
import type { Item } from '@/utils/dist/core/models/vault';
|
||||
import { groupFieldsByCategory } from '@/utils/dist/core/models/vault';
|
||||
|
||||
/**
|
||||
* Item details page with dynamic field rendering.
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { FormInput } from '@/entrypoints/popup/components/Forms/FormInput';
|
||||
import { useLoading } from '@/entrypoints/popup/context/LoadingContext';
|
||||
|
||||
import type { ItemType } from '@/utils/dist/shared/models/vault';
|
||||
import type { ItemType } from '@/utils/dist/core/models/vault';
|
||||
|
||||
/**
|
||||
* Item type option configuration.
|
||||
|
||||
@@ -11,7 +11,7 @@ import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';
|
||||
import ConversionUtility from '@/entrypoints/popup/utils/ConversionUtility';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { EmailAttachment, Email } from '@/utils/dist/shared/models/webapi';
|
||||
import type { EmailAttachment, Email } from '@/utils/dist/core/models/webapi';
|
||||
import EncryptionUtility from '@/utils/EncryptionUtility';
|
||||
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { useLoading } from '@/entrypoints/popup/context/LoadingContext';
|
||||
import { useWebApi } from '@/entrypoints/popup/context/WebApiContext';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { MailboxBulkRequest, MailboxBulkResponse, MailboxEmail } from '@/utils/dist/shared/models/webapi';
|
||||
import type { MailboxBulkRequest, MailboxBulkResponse, MailboxEmail } from '@/utils/dist/core/models/webapi';
|
||||
import EncryptionUtility from '@/utils/EncryptionUtility';
|
||||
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
@@ -17,7 +17,7 @@ import { useVaultMutate } from '@/entrypoints/popup/hooks/useVaultMutate';
|
||||
import { useVaultSync } from '@/entrypoints/popup/hooks/useVaultSync';
|
||||
import { PopoutUtility } from '@/entrypoints/popup/utils/PopoutUtility';
|
||||
|
||||
import type { Item } from '@/utils/dist/shared/models/vault';
|
||||
import type { Item } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useDb } from '@/entrypoints/popup/context/DbContext';
|
||||
import { useHeaderButtons } from '@/entrypoints/popup/context/HeaderButtonsContext';
|
||||
import { useVaultMutate } from '@/entrypoints/popup/hooks/useVaultMutate';
|
||||
|
||||
import type { Item } from '@/utils/dist/shared/models/vault';
|
||||
import type { Item } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useVaultMutate } from '@/entrypoints/popup/hooks/useVaultMutate';
|
||||
|
||||
import { PASSKEY_DISABLED_SITES_KEY } from '@/utils/Constants';
|
||||
import { extractDomain, extractRootDomain } from '@/utils/credentialMatcher/CredentialMatcher';
|
||||
import type { Passkey } from '@/utils/dist/shared/models/vault';
|
||||
import type { Passkey } from '@/utils/dist/core/models/vault';
|
||||
import { PasskeyAuthenticator } from '@/utils/passkey/PasskeyAuthenticator';
|
||||
import { PasskeyHelper } from '@/utils/passkey/PasskeyHelper';
|
||||
import type { CreateRequest, PasskeyCreateCredentialResponse, PendingPasskeyCreateRequest } from '@/utils/passkey/types';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Utility class for conversion operations.
|
||||
* TODO: make this a shared utility class in root /shared/ folder so we can reuse it between browser extension/mobile app
|
||||
* TODO: make this a shared utility class in root /core/ folder so we can reuse it between browser extension/mobile app
|
||||
* and possibly WASM client.
|
||||
*/
|
||||
class ConversionUtility {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Buffer } from 'buffer';
|
||||
|
||||
import { MobileLoginErrorCode } from '@/entrypoints/popup/types/MobileLoginErrorCode';
|
||||
|
||||
import type { LoginResponse, MobileLoginInitiateResponse, MobileLoginPollResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { LoginResponse, MobileLoginInitiateResponse, MobileLoginPollResponse } from '@/utils/dist/core/models/webapi';
|
||||
import EncryptionUtility from '@/utils/EncryptionUtility';
|
||||
import type { MobileLoginResult } from '@/utils/types/messaging/MobileLoginResult';
|
||||
import type { WebApiService } from '@/utils/WebApiService';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SrpAuthService } from '@/utils/auth/SrpAuthService';
|
||||
import type { LoginResponse, ValidateLoginResponse, ValidateLoginRequest, ValidateLoginRequest2Fa, BadRequestResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { LoginResponse, ValidateLoginResponse, ValidateLoginRequest, ValidateLoginRequest2Fa, BadRequestResponse } from '@/utils/dist/core/models/webapi';
|
||||
import { ApiAuthError } from '@/utils/types/errors/ApiAuthError';
|
||||
import { WebApiService } from '@/utils/WebApiService';
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { Buffer } from 'buffer';
|
||||
|
||||
import argon2 from 'argon2-browser/dist/argon2-bundled.min.js';
|
||||
|
||||
import type { EncryptionKey } from '@/utils/dist/shared/models/vault';
|
||||
import type { Email, MailboxEmail } from '@/utils/dist/shared/models/webapi';
|
||||
import type { EncryptionKey } from '@/utils/dist/core/models/vault';
|
||||
import type { Email, MailboxEmail } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
/**
|
||||
* Utility class for encryption operations including:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import initSqlJs, { Database } from 'sql.js';
|
||||
|
||||
import * as dateFormatter from '@/utils/dateFormatter';
|
||||
import type { Credential, EncryptionKey, PasswordSettings, TotpCode, Passkey, Item, ItemField, ItemTagRef, FieldType, FieldHistory } from '@/utils/dist/shared/models/vault';
|
||||
import type { Attachment } from '@/utils/dist/shared/models/vault';
|
||||
import { FieldKey, getSystemField, MAX_FIELD_HISTORY_RECORDS } from '@/utils/dist/shared/models/vault';
|
||||
import type { VaultVersion } from '@/utils/dist/shared/vault-sql';
|
||||
import { VaultSqlGenerator, checkVersionCompatibility, extractVersionFromMigrationId } from '@/utils/dist/shared/vault-sql';
|
||||
import type { Credential, EncryptionKey, PasswordSettings, TotpCode, Passkey, Item, ItemField, ItemTagRef, FieldType, FieldHistory } from '@/utils/dist/core/models/vault';
|
||||
import type { Attachment } from '@/utils/dist/core/models/vault';
|
||||
import { FieldKey, getSystemField, MAX_FIELD_HISTORY_RECORDS } from '@/utils/dist/core/models/vault';
|
||||
import type { VaultVersion } from '@/utils/dist/core/vault';
|
||||
import { VaultSqlGenerator, checkVersionCompatibility, extractVersionFromMigrationId } from '@/utils/dist/core/vault';
|
||||
import { VaultVersionIncompatibleError } from '@/utils/types/errors/VaultVersionIncompatibleError';
|
||||
|
||||
import { t } from '@/i18n/StandaloneI18n';
|
||||
@@ -811,7 +811,7 @@ export class SqliteClient {
|
||||
}
|
||||
|
||||
// Otherwise, try to match UI language to an identity generator language
|
||||
const { mapUiLanguageToIdentityLanguage } = await import('@/utils/dist/shared/identity-generator');
|
||||
const { mapUiLanguageToIdentityLanguage } = await import('@/utils/dist/core/identity-generator');
|
||||
const { default: i18n } = await import('@/i18n/i18n');
|
||||
|
||||
const uiLanguage = i18n.language;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import initSqlJs, { Database, SqlJsStatic, SqlValue } from 'sql.js';
|
||||
import { browser } from 'wxt/browser';
|
||||
|
||||
import init, { getSyncableTableNames, mergeVaults } from './dist/shared/rust-core/aliasvault_core.js';
|
||||
import init, { getSyncableTableNames, mergeVaults } from './dist/core/rust/aliasvault_core.js';
|
||||
|
||||
/**
|
||||
* Record type for JSON data passed to/from Rust.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { StatusResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { StatusResponse } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
import { logoutEventEmitter } from '@/events/LogoutEventEmitter';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import srp from 'secure-remote-password/client';
|
||||
|
||||
import type { TokenModel, LoginResponse, BadRequestResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { TokenModel, LoginResponse, BadRequestResponse } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
import { EncryptionUtility } from '../EncryptionUtility';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import { CombinedStopWords } from '@/utils/formDetector/FieldPatterns';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach } from 'vitest';
|
||||
|
||||
import { filterCredentials } from '@/utils/credentialMatcher/CredentialMatcher';
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
describe('CredentialMatcher - Credential URL Matching', () => {
|
||||
let testCredentials: Credential[];
|
||||
|
||||
9
apps/browser-extension/src/utils/dist/core/identity-generator/README.md
vendored
Normal file
9
apps/browser-extension/src/utils/dist/core/identity-generator/README.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the core `identity-generator` module from the `/core` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the `/core/typescript/identity-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
@@ -1,9 +1,9 @@
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the shared `models` module from the `/shared` directory in the AliasVault project.
|
||||
This folder contains the output of the core `models` module from the `/core` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the `/shared/models/src` directory
|
||||
1. Update the source files in the `/core/models/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
9
apps/browser-extension/src/utils/dist/core/password-generator/README.md
vendored
Normal file
9
apps/browser-extension/src/utils/dist/core/password-generator/README.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the core `password-generator` module from the `/core` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the `/core/typescript/password-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
@@ -1,9 +1,9 @@
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the shared `models` module from the `/shared` directory in the AliasVault project.
|
||||
This folder contains the output of the core `vault` module from the `/core` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the `/shared/models/src` directory
|
||||
1. Update the source files in the `/core/vault/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
@@ -1,9 +0,0 @@
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the shared `identity-generator` module from the `/shared` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the `/shared/identity-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
@@ -1,9 +0,0 @@
|
||||
# ⚠️ Auto-Generated Files
|
||||
|
||||
This folder contains the output of the shared `password-generator` module from the `/shared` directory in the AliasVault project.
|
||||
|
||||
**Do not edit any of these files manually.**
|
||||
|
||||
To make changes:
|
||||
1. Update the source files in the `/shared/password-generator/src` directory
|
||||
2. Run the `build.sh` script in the module directory to regenerate the outputs and copy them here.
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Gender, IdentityHelperUtils } from "@/utils/dist/shared/identity-generator";
|
||||
import type { Credential } from "@/utils/dist/shared/models/vault";
|
||||
import { Gender, IdentityHelperUtils } from "@/utils/dist/core/identity-generator";
|
||||
import type { Credential } from "@/utils/dist/core/models/vault";
|
||||
import { CombinedDateOptionPatterns, CombinedGenderOptionPatterns } from "@/utils/formDetector/FieldPatterns";
|
||||
import { FormFields } from "@/utils/formDetector/types/FormFields";
|
||||
import { ClickValidator } from "@/utils/security/ClickValidator";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { FormFiller } from '../FormFiller';
|
||||
import { FormFields } from '../types/FormFields';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { FormFiller } from '../FormFiller';
|
||||
import { FormFields } from '../types/FormFields';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { FormFiller } from '../FormFiller';
|
||||
import { FormFields } from '../types/FormFields';
|
||||
|
||||
@@ -4,8 +4,8 @@ import { join } from 'path';
|
||||
import { JSDOM, DOMWindow } from 'jsdom';
|
||||
import { it, expect, vi } from 'vitest';
|
||||
|
||||
import { Gender } from '@/utils/dist/shared/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import { Gender } from '@/utils/dist/core/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import { FormDetector } from '@/utils/formDetector/FormDetector';
|
||||
import { FormFields } from '@/utils/formDetector/types/FormFields';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Credential } from "@/utils/dist/shared/models/vault";
|
||||
import type { Credential } from "@/utils/dist/core/models/vault";
|
||||
|
||||
export type CredentialsResponse = {
|
||||
success: boolean,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PasswordSettings } from "@/utils/dist/shared/models/vault";
|
||||
import type { PasswordSettings } from "@/utils/dist/core/models/vault";
|
||||
|
||||
export type PasswordSettingsResponse = {
|
||||
success: boolean,
|
||||
|
||||
@@ -19,8 +19,8 @@ import argon2 from 'argon2';
|
||||
import Database from 'better-sqlite3';
|
||||
import * as srp from 'secure-remote-password/client.js';
|
||||
|
||||
// Get the vault schema SQL from the shared vault-sql package
|
||||
import { COMPLETE_SCHEMA_SQL, VAULT_VERSIONS } from '../../src/utils/dist/shared/vault-sql/index.mjs';
|
||||
// Get the vault schema SQL from the core vault package
|
||||
import { COMPLETE_SCHEMA_SQL, VAULT_VERSIONS } from '../../src/utils/dist/core/vault/index.mjs';
|
||||
|
||||
/**
|
||||
* Token model returned from successful registration/login.
|
||||
|
||||
@@ -63,7 +63,7 @@ export default defineConfig({
|
||||
dest: 'src'
|
||||
},
|
||||
{
|
||||
src: 'src/utils/dist/shared/rust-core/aliasvault_core_bg.wasm',
|
||||
src: 'src/utils/dist/core/rust/aliasvault_core_bg.wasm',
|
||||
dest: 'src'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useCallback, useEffect, useState } from 'react';
|
||||
import { ActivityIndicator, View, Text, StyleSheet, Linking, Platform } from 'react-native'
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import emitter from '@/utils/EventEmitter';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
|
||||
@@ -11,10 +11,10 @@ import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, Alert, Keyboard, Platform, ScrollView, KeyboardAvoidingView } from 'react-native';
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import { CreateIdentityGenerator, CreateUsernameEmailGenerator, Gender, Identity, IdentityHelperUtils, convertAgeRangeToBirthdateOptions } from '@/utils/dist/shared/identity-generator';
|
||||
import type { Attachment, Credential, TotpCode } from '@/utils/dist/shared/models/vault';
|
||||
import type { FaviconExtractModel } from '@/utils/dist/shared/models/webapi';
|
||||
import { CreatePasswordGenerator, PasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import { CreateIdentityGenerator, CreateUsernameEmailGenerator, Gender, Identity, IdentityHelperUtils, convertAgeRangeToBirthdateOptions } from '@/utils/dist/core/identity-generator';
|
||||
import type { Attachment, Credential, TotpCode } from '@/utils/dist/core/models/vault';
|
||||
import type { FaviconExtractModel } from '@/utils/dist/core/models/webapi';
|
||||
import { CreatePasswordGenerator, PasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
import emitter from '@/utils/EventEmitter';
|
||||
import { extractServiceNameFromUrl } from '@/utils/UrlUtility';
|
||||
import { createCredentialSchema } from '@/utils/ValidationSchema';
|
||||
|
||||
@@ -8,7 +8,7 @@ import { StyleSheet, Text, FlatList, TouchableOpacity, TextInput, RefreshControl
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import emitter from '@/utils/EventEmitter';
|
||||
import { VaultAuthenticationError } from '@/utils/types/errors/VaultAuthenticationError';
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, ActivityIndicator, Alert, Share, useColorScheme, Linking, Text, TextInput, Platform } from 'react-native';
|
||||
import { WebView } from 'react-native-webview';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Email } from '@/utils/dist/shared/models/webapi';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import type { Email } from '@/utils/dist/core/models/webapi';
|
||||
import EncryptionUtility from '@/utils/EncryptionUtility';
|
||||
import emitter from '@/utils/EventEmitter';
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { StyleSheet, View, ScrollView, RefreshControl, Animated , Platform } fro
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import type { MailboxBulkRequest, MailboxBulkResponse, MailboxEmail } from '@/utils/dist/shared/models/webapi';
|
||||
import type { MailboxBulkRequest, MailboxBulkResponse, MailboxEmail } from '@/utils/dist/core/models/webapi';
|
||||
import EncryptionUtility from '@/utils/EncryptionUtility';
|
||||
import emitter from '@/utils/EventEmitter';
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useState, useCallback, useRef, useEffect } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, Alert, TouchableOpacity } from 'react-native';
|
||||
|
||||
import { getAvailableAgeRanges, IAgeRangeOption, getAvailableLanguages, ILanguageOption } from '@/utils/dist/shared/identity-generator';
|
||||
import { getAvailableAgeRanges, IAgeRangeOption, getAvailableLanguages, ILanguageOption } from '@/utils/dist/core/identity-generator';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useVaultMutate } from '@/hooks/useVaultMutate';
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as Sharing from 'expo-sharing';
|
||||
import { useState } from 'react';
|
||||
import { StyleSheet, View, TouchableOpacity, Alert } from 'react-native';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useTranslation } from '@/hooks/useTranslation';
|
||||
|
||||
@@ -5,8 +5,8 @@ import { useState, useCallback, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, Alert, TouchableOpacity, Switch, Platform } from 'react-native';
|
||||
|
||||
import type { PasswordSettings } from '@/utils/dist/shared/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/shared/password-generator';
|
||||
import type { PasswordSettings } from '@/utils/dist/core/models/vault';
|
||||
import { CreatePasswordGenerator } from '@/utils/dist/core/password-generator';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useVaultMutate } from '@/hooks/useVaultMutate';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, TouchableOpacity, Alert, RefreshControl, Platform } from 'react-native';
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import type { RefreshToken } from '@/utils/dist/shared/models/webapi';
|
||||
import type { RefreshToken } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, RefreshControl, Platform } from 'react-native';
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import type { AuthLogModel } from '@/utils/dist/shared/models/webapi';
|
||||
import { AuthEventType } from '@/utils/dist/shared/models/webapi';
|
||||
import type { AuthLogModel } from '@/utils/dist/core/models/webapi';
|
||||
import { AuthEventType } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useMinDurationLoading } from '@/hooks/useMinDurationLoading';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, Alert, KeyboardAvoidingView, Platform } from 'react-native';
|
||||
import srp from 'secure-remote-password/client';
|
||||
|
||||
import type { DeleteAccountInitiateRequest, DeleteAccountInitiateResponse, DeleteAccountRequest } from '@/utils/dist/shared/models/webapi';
|
||||
import type { DeleteAccountInitiateRequest, DeleteAccountInitiateResponse, DeleteAccountRequest } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import { StyleSheet, View, Text, SafeAreaView, TextInput, ActivityIndicator, Ani
|
||||
|
||||
import { useApiUrl } from '@/utils/ApiUrlUtility';
|
||||
import ConversionUtility from '@/utils/ConversionUtility';
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/shared/models/metadata';
|
||||
import type { LoginResponse } from '@/utils/dist/shared/models/webapi';
|
||||
import type { EncryptionKeyDerivationParams } from '@/utils/dist/core/models/metadata';
|
||||
import type { LoginResponse } from '@/utils/dist/core/models/webapi';
|
||||
import EncryptionUtility from '@/utils/EncryptionUtility';
|
||||
import { SrpUtility } from '@/utils/SrpUtility';
|
||||
import { ApiAuthError } from '@/utils/types/errors/ApiAuthError';
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useState, useEffect, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { StyleSheet, View, Alert, KeyboardAvoidingView, Platform, ScrollView, Dimensions, TouchableWithoutFeedback, Keyboard, Text } from 'react-native';
|
||||
|
||||
import type { VaultVersion } from '@/utils/dist/shared/vault-sql';
|
||||
import { VaultSqlGenerator } from '@/utils/dist/shared/vault-sql';
|
||||
import type { VaultVersion } from '@/utils/dist/core/vault';
|
||||
import { VaultSqlGenerator } from '@/utils/dist/core/vault';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useVaultMutate } from '@/hooks/useVaultMutate';
|
||||
@@ -134,7 +134,7 @@ export default function UpgradeScreen() : React.ReactNode {
|
||||
setUpgradeStatus(t('upgrade.status.preparingUpgrade'));
|
||||
|
||||
try {
|
||||
// Get upgrade SQL commands from vault-sql shared library
|
||||
// Get upgrade SQL commands from vault library
|
||||
const vaultSqlGenerator = new VaultSqlGenerator();
|
||||
const upgradeResult = vaultSqlGenerator.getUpgradeVaultSql(currentVersion.revision, latestVersion.revision);
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import { router } from 'expo-router';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { MailboxEmail } from '@/utils/dist/shared/models/webapi';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
import type { MailboxEmail } from '@/utils/dist/core/models/webapi';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
import { useTranslation } from '@/hooks/useTranslation';
|
||||
|
||||
@@ -6,7 +6,7 @@ import ContextMenu, { OnPressMenuItemEvent } from 'react-native-context-menu-vie
|
||||
import Toast from 'react-native-toast-message';
|
||||
|
||||
import { copyToClipboardWithExpiration } from '@/utils/ClipboardUtility';
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import { useColors } from '@/hooks/useColorScheme';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { IdentityHelperUtils } from '@/utils/dist/shared/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/shared/models/vault';
|
||||
import { IdentityHelperUtils } from '@/utils/dist/core/identity-generator';
|
||||
import type { Credential } from '@/utils/dist/core/models/vault';
|
||||
|
||||
import FormInputCopyToClipboard from '@/components/form/FormInputCopyToClipboard';
|
||||
import { ThemedText } from '@/components/themed/ThemedText';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user