Remove deprecated index.ts (#490)

* Remove deprecated index.ts

* Update tests
This commit is contained in:
Oscar Hinton 2021-09-17 14:57:31 +02:00 committed by GitHub
parent da6fde4b15
commit 83548a6753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 28 additions and 138 deletions

View File

@ -14,7 +14,7 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
import { UserService } from 'jslib-common/abstractions/user.service';
import { Cipher } from 'jslib-common/models/domain/cipher';
import { ErrorResponse } from 'jslib-common/models/response';
import { ErrorResponse } from 'jslib-common/models/response/errorResponse';
import { AttachmentView } from 'jslib-common/models/view/attachmentView';
import { CipherView } from 'jslib-common/models/view/cipherView';

View File

@ -11,7 +11,7 @@ import { TwoFactorProviderType } from 'jslib-common/enums/twoFactorProviderType'
import { TwoFactorEmailRequest } from 'jslib-common/models/request/twoFactorEmailRequest';
import { AuthResult } from 'jslib-common/models/domain';
import { AuthResult } from 'jslib-common/models/domain/authResult';
import { ApiService } from 'jslib-common/abstractions/api.service';
import { AuthService } from 'jslib-common/abstractions/auth.service';

View File

@ -6,7 +6,7 @@ import {
} from '@angular/core';
import { LogService } from 'jslib-common/abstractions/log.service';
import { ErrorResponse } from 'jslib-common/models/response';
import { ErrorResponse } from 'jslib-common/models/response/errorResponse';
import { ValidationService } from '../services/validation.service';

View File

@ -1,24 +0,0 @@
// Using index.ts is deprecated, please do not extend
export { ApiService } from './api.service';
export { AppIdService } from './appId.service';
export { AuditService } from './audit.service';
export { AuthService } from './auth.service';
export { CipherService } from './cipher.service';
export { CollectionService } from './collection.service';
export { CryptoService } from './crypto.service';
export { EnvironmentService } from './environment.service';
export { FolderService } from './folder.service';
export { I18nService } from './i18n.service';
export { LogService } from './log.service';
export { MessagingService } from './messaging.service';
export { PasswordGenerationService } from './passwordGeneration.service';
export { PlatformUtilsService } from './platformUtils.service';
export { SearchService } from './search.service';
export { SettingsService } from './settings.service';
export { StorageService } from './storage.service';
export { StateService } from './state.service';
export { SyncService } from './sync.service';
export { TokenService } from './token.service';
export { TotpService } from './totp.service';
export { UserService } from './user.service';
export { VaultTimeoutService } from './vaultTimeout.service';

View File

@ -1,8 +0,0 @@
export { CipherType } from './cipherType';
export { DeviceType } from './deviceType';
export { EncryptionType } from './encryptionType';
export { FieldType } from './fieldType';
export { LogLevelType } from './logLevelType';
export { SecureNoteType } from './secureNoteType';
export { TwoFactorProviderType } from './twoFactorProviderType';
export { UriMatchType } from './uriMatchType';

View File

@ -1,4 +1,4 @@
import { CipherView } from '../../models/view';
import { CipherView } from '../../models/view/cipherView';
export class CipherImportContext {
lowerProperty: string;

View File

@ -4,7 +4,7 @@ import { Importer } from '../importer';
import { CipherType } from '../../enums/cipherType';
import { FieldType } from '../../enums/fieldType';
import { CipherView } from '../../models/view';
import { CipherView } from '../../models/view/cipherView';
import { CipherImportContext } from './cipherImportContext';
export const IgnoredProperties = ['ainfo', 'autosubmit', 'notesplain', 'ps', 'scope', 'tags', 'title', 'uuid', 'notes'];

View File

@ -2,7 +2,9 @@ import { Importer } from '../importer';
import { IgnoredProperties, OnePasswordCsvImporter } from './onepasswordCsvImporter';
import { CipherType } from '../../enums/cipherType';
import { CardView, CipherView, IdentityView } from '../../models/view';
import { CardView } from '../../models/view/cardView';
import { CipherView } from '../../models/view/cipherView';
import { IdentityView } from '../../models/view/identityView';
export class OnePasswordMacCsvImporter extends OnePasswordCsvImporter implements Importer {
setCipherType(value: any, cipher: CipherView) {

View File

@ -3,7 +3,10 @@ import { CipherImportContext } from './cipherImportContext';
import { OnePasswordCsvImporter } from './onepasswordCsvImporter';
import { CipherType } from '../../enums/cipherType';
import { CardView, CipherView, IdentityView, LoginView } from '../../models/view';
import { CardView } from '../../models/view/cardView';
import { CipherView } from '../../models/view/cipherView';
import { IdentityView } from '../../models/view/identityView';
import { LoginView } from '../../models/view/loginView';
export class OnePasswordWinCsvImporter extends OnePasswordCsvImporter implements Importer {
constructor() {

View File

@ -9,8 +9,9 @@ import { SecureNoteView } from '../models/view/secureNoteView';
import { CipherType } from '../enums/cipherType';
import { SecureNoteType } from '../enums/secureNoteType';
import { FieldType } from '../enums';
import { CipherView, FieldView } from '../models/view';
import { FieldType } from '../enums/fieldType';
import { CipherView } from '../models/view/cipherView';
import { FieldView } from '../models/view/fieldView';
export class SafeInCloudXmlImporter extends BaseImporter implements Importer {
parse(data: string): Promise<ImportResult> {

View File

@ -2,7 +2,7 @@ import { BaseImporter } from './baseImporter';
import { Importer } from './importer';
import { ImportResult } from '../models/domain/importResult';
import { CipherView } from '../models/view';
import { CipherView } from '../models/view/cipherView';
export class ZohoVaultCsvImporter extends BaseImporter implements Importer {
parse(data: string): Promise<ImportResult> {

View File

@ -1,10 +0,0 @@
import * as Abstractions from './abstractions';
import * as Enums from './enums';
import * as Data from './models/data';
import * as Domain from './models/domain';
import * as Request from './models/request';
import * as Response from './models/response';
import * as View from './models/view';
import * as Services from './services';
export { Abstractions, Enums, Data, Domain, Request, Response, Services, View };

View File

@ -1,10 +0,0 @@
export { AttachmentData } from './attachmentData';
export { CardData } from './cardData';
export { CipherData } from './cipherData';
export { CollectionData } from './collectionData';
export { FieldData } from './fieldData';
export { FolderData } from './folderData';
export { IdentityData } from './identityData';
export { LoginData } from './loginData';
export { LoginUriData } from './loginUriData';
export { SecureNoteData } from './secureNoteData';

View File

@ -1,16 +0,0 @@
export { Attachment } from './attachment';
export { AuthResult } from './authResult';
export { Card } from './card';
export { Cipher } from './cipher';
export { EncString } from './encString';
export { Collection } from './collection';
export { EncryptedObject } from './encryptedObject';
export { EnvironmentUrls } from './environmentUrls';
export { Field } from './field';
export { Folder } from './folder';
export { Identity } from './identity';
export { Login } from './login';
export { LoginUri } from './loginUri';
export { GeneratedPasswordHistory } from './generatedPasswordHistory';
export { SecureNote } from './secureNote';
export { SymmetricCryptoKey } from './symmetricCryptoKey';

View File

@ -1,4 +1,4 @@
import { CipherView } from '../view';
import { CipherView } from '../view/cipherView';
const CacheTTL = 3000;

View File

@ -1,8 +0,0 @@
export { CipherRequest } from './cipherRequest';
export { DeviceRequest } from './deviceRequest';
export { DeviceTokenRequest } from './deviceTokenRequest';
export { FolderRequest } from './folderRequest';
export { PasswordHintRequest } from './passwordHintRequest';
export { RegisterRequest } from './registerRequest';
export { TokenRequest } from './tokenRequest';
export { TwoFactorEmailRequest } from './twoFactorEmailRequest';

View File

@ -1,15 +0,0 @@
export { AttachmentResponse } from './attachmentResponse';
export { CipherResponse } from './cipherResponse';
export { CollectionResponse } from './collectionResponse';
export { DeviceResponse } from './deviceResponse';
export { DomainsResponse } from './domainsResponse';
export { ErrorResponse } from './errorResponse';
export { FolderResponse } from './folderResponse';
export { GlobalDomainResponse } from './globalDomainResponse';
export { IdentityTokenResponse } from './identityTokenResponse';
export { IdentityTwoFactorResponse } from './identityTwoFactorResponse';
export { KeysResponse } from './keysResponse';
export { ListResponse } from './listResponse';
export { ProfileOrganizationResponse } from './profileOrganizationResponse';
export { ProfileResponse } from './profileResponse';
export { SyncResponse } from './syncResponse';

View File

@ -1,9 +0,0 @@
export { AttachmentView } from './attachmentView';
export { CardView } from './cardView';
export { CipherView } from './cipherView';
export { FieldView } from './fieldView';
export { IdentityView } from './identityView';
export { LoginUriView } from './loginUriView';
export { LoginView } from './loginView';
export { SecureNoteView } from './secureNoteView';
export { View } from './view';

View File

@ -2,6 +2,7 @@ import { DeviceType } from '../enums/deviceType';
import { PolicyType } from '../enums/policyType';
import { ApiService as ApiServiceAbstraction } from '../abstractions/api.service';
import { EnvironmentService } from '../abstractions/environment.service';
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
import { TokenService } from '../abstractions/token.service';
@ -161,7 +162,6 @@ import { ChallengeResponse } from '../models/response/twoFactorWebAuthnResponse'
import { TwoFactorYubiKeyResponse } from '../models/response/twoFactorYubiKeyResponse';
import { UserKeyResponse } from '../models/response/userKeyResponse';
import { EnvironmentService } from '../abstractions';
import { IdentityCaptchaResponse } from '../models/response/identityCaptchaResponse';
import { SendAccessView } from '../models/view/sendAccessView';

View File

@ -1,20 +0,0 @@
export { ApiService } from './api.service';
export { AppIdService } from './appId.service';
export { AuditService } from './audit.service';
export { AuthService } from './auth.service';
export { CipherService } from './cipher.service';
export { CollectionService } from './collection.service';
export { ConstantsService } from './constants.service';
export { ContainerService } from './container.service';
export { CryptoService } from './crypto.service';
export { EnvironmentService } from './environment.service';
export { FolderService } from './folder.service';
export { I18nService } from './i18n.service';
export { PasswordGenerationService } from './passwordGeneration.service';
export { SettingsService } from './settings.service';
export { StateService } from './state.service';
export { SyncService } from './sync.service';
export { TokenService } from './token.service';
export { TotpService } from './totp.service';
export { UserService } from './user.service';
export { VaultTimeoutService } from './vaultTimeout.service';

View File

@ -4,7 +4,8 @@ import { ImportResult } from 'jslib-common/models/domain/importResult';
import { CipherView } from 'jslib-common/models/view/cipherView';
import { FieldView } from 'jslib-common/models/view/fieldView';
import { CipherType, FieldType } from 'jslib-common/enums';
import { CipherType } from 'jslib-common/enums/cipherType';
import { FieldType } from 'jslib-common/enums/fieldType';
function baseExcept(result: ImportResult) {
expect(result).not.toBeNull();

View File

@ -1,7 +1,9 @@
import { NordPassCsvImporter as Importer } from 'jslib-common/importers/nordpassCsvImporter';
import { CipherType, SecureNoteType } from 'jslib-common/enums';
import { CipherView, IdentityView } from 'jslib-common/models/view';
import { CipherType } from 'jslib-common/enums/cipherType';
import { SecureNoteType } from 'jslib-common/enums/secureNoteType';
import { CipherView } from 'jslib-common/models/view/cipherView';
import { IdentityView } from 'jslib-common/models/view/identityView';
import { data as creditCardData } from './testData/nordpassCsv/nordpass.card.csv';
import { data as identityData } from './testData/nordpassCsv/nordpass.identity.csv';

View File

@ -1,6 +1,6 @@
import { OnePasswordMacCsvImporter as Importer } from 'jslib-common/importers/onepasswordImporters/onepasswordMacCsvImporter';
import { CipherType } from 'jslib-common/enums';
import { CipherType } from 'jslib-common/enums/cipherType';
import { CipherView } from 'jslib-common/models/view/cipherView';
import { data as creditCardData } from './testData/onePasswordCsv/creditCard.mac.csv';

View File

@ -1,6 +1,7 @@
import { OnePasswordWinCsvImporter as Importer } from 'jslib-common/importers/onepasswordImporters/onepasswordWinCsvImporter';
import { CipherType, FieldType } from 'jslib-common/enums';
import { CipherType } from 'jslib-common/enums/cipherType';
import { FieldType } from 'jslib-common/enums/fieldType';
import { CipherView } from 'jslib-common/models/view/cipherView';
import { FieldView } from 'jslib-common/models/view/fieldView';

View File

@ -5,7 +5,7 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
import { WebCryptoFunctionService } from 'jslib-common/services/webCryptoFunction.service';
import { Utils } from 'jslib-common/misc/utils';
import { SymmetricCryptoKey } from 'jslib-common/models/domain';
import { SymmetricCryptoKey } from 'jslib-common/models/domain/symmetricCryptoKey';
const RsaPublicKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl0Vawl/toXzkEvB82FEtqHP' +
'4xlU2ab/v0crqIfXfIoWF/XXdHGIdrZeilnRXPPJT1B9dTsasttEZNnua/0Rek/cjNDHtzT52irfoZYS7X6HNIfOi54Q+egP' +