From 5f87bf3e283f9a305a07952d2a1d333c37926d90 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 19 Feb 2018 13:16:12 -0500 Subject: [PATCH] jslib file to get rid of ts errors without linking --- jslib.ts | 59 +++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- src/app/services/services.module.ts | 82 ++++++++++++++--------------- 4 files changed, 101 insertions(+), 44 deletions(-) create mode 100644 jslib.ts diff --git a/jslib.ts b/jslib.ts new file mode 100644 index 0000000000..17ef097c84 --- /dev/null +++ b/jslib.ts @@ -0,0 +1,59 @@ +import { CipherType } from 'jslib/enums/cipherType'; +import { DeviceType } from 'jslib/enums/deviceType'; +import { EncryptionType } from 'jslib/enums/encryptionType'; +import { FieldType } from 'jslib/enums/fieldType'; +import { SecureNoteType } from 'jslib/enums/secureNoteType'; +import { TwoFactorProviderType } from 'jslib/enums/twoFactorProviderType'; + +import { AttachmentData } from 'jslib/models/data/attachmentData'; +import { CardData } from 'jslib/models/data/cardData'; +import { CipherData } from 'jslib/models/data/cipherData'; +import { CollectionData } from 'jslib/models/data/collectionData'; +import { FieldData } from 'jslib/models/data/fieldData'; +import { FolderData } from 'jslib/models/data/folderData'; +import { IdentityData } from 'jslib/models/data/identityData'; +import { LoginData } from 'jslib/models/data/loginData'; +import { SecureNoteData } from 'jslib/models/data/secureNoteData'; + +import { Attachment } from 'jslib/models/domain/attachment'; +import { AuthResult } from 'jslib/models/domain/authResult'; +import { Card } from 'jslib/models/domain/card'; +import { Cipher } from 'jslib/models/domain/cipher'; +import { CipherString } from 'jslib/models/domain/cipherString'; +import { Collection } from 'jslib/models/domain/collection'; +import Domain from 'jslib/models/domain/domain'; +import { EncryptedObject } from 'jslib/models/domain/encryptedObject'; +import { EnvironmentUrls } from 'jslib/models/domain/environmentUrls'; +import { Field } from 'jslib/models/domain/field'; +import { Folder } from 'jslib/models/domain/folder'; +import { Identity } from 'jslib/models/domain/identity'; +import { Login } from 'jslib/models/domain/login'; +import { PasswordHistory } from 'jslib/models/domain/passwordHistory'; +import { SecureNote } from 'jslib/models/domain/secureNote'; +import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey'; +import { SymmetricCryptoKeyBuffers } from 'jslib/models/domain/symmetricCryptoKeyBuffers'; + +import { CipherRequest } from 'jslib/models/request/cipherRequest'; +import { DeviceRequest } from 'jslib/models/request/deviceRequest'; +import { DeviceTokenRequest } from 'jslib/models/request/deviceTokenRequest'; +import { FolderRequest } from 'jslib/models/request/folderRequest'; +import { PasswordHintRequest } from 'jslib/models/request/passwordHintRequest'; +import { RegisterRequest } from 'jslib/models/request/registerRequest'; +import { TokenRequest } from 'jslib/models/request/tokenRequest'; +import { TwoFactorEmailRequest } from 'jslib/models/request/twoFactorEmailRequest'; + +import { AttachmentResponse } from 'jslib/models/response/attachmentResponse'; +import { CipherResponse } from 'jslib/models/response/cipherResponse'; +import { CollectionResponse } from 'jslib/models/response/collectionResponse'; +import { DeviceResponse } from 'jslib/models/response/deviceResponse'; +import { DomainsResponse } from 'jslib/models/response/domainsResponse'; +import { ErrorResponse } from 'jslib/models/response/errorResponse'; +import { FolderResponse } from 'jslib/models/response/folderResponse'; +import { GlobalDomainResponse } from 'jslib/models/response/globalDomainResponse'; +import { IdentityTokenResponse } from 'jslib/models/response/identityTokenResponse'; +import { IdentityTwoFactorResponse } from 'jslib/models/response/identityTwoFactorResponse'; +import { KeysResponse } from 'jslib/models/response/keysResponse'; +import { ListResponse } from 'jslib/models/response/listResponse'; +import { ProfileOrganizationResponse } from 'jslib/models/response/profileOrganizationResponse'; +import { ProfileResponse } from 'jslib/models/response/profileResponse'; +import { SyncResponse } from 'jslib/models/response/syncResponse'; diff --git a/package-lock.json b/package-lock.json index 5242c95eee..60dcbf7e28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -117,7 +117,7 @@ } }, "@bitwarden/jslib": { - "version": "git+https://github.com/bitwarden/jslib.git#80cd30d7d8b1566d7ecedcf71d381b0e897280d0", + "version": "git+https://github.com/bitwarden/jslib.git#5b63336347ad9597ed65d907b1bdb804d8b4f39a", "requires": { "@types/node-forge": "0.7.1", "@types/webcrypto": "0.0.28", diff --git a/package.json b/package.json index 47c68d3ec2..78cc3dcc5b 100644 --- a/package.json +++ b/package.json @@ -155,8 +155,8 @@ "angulartics2": "5.0.1", "core-js": "2.4.1", "desktop-idle": "1.1.1", - "electron-updater": "2.20.1", "electron-store": "1.3.0", + "electron-updater": "2.20.1", "keytar": "4.1.0", "rxjs": "5.5.6", "zone.js": "0.8.19" diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 1679a0d23e..c887a6cba8 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -21,51 +21,49 @@ import { ValidationService } from './validation.service'; import { Analytics } from 'jslib/misc/analytics'; -import { - ApiService, - AppIdService, - AuthService, - CipherService, - CollectionService, - ConstantsService, - ContainerService, - CryptoService, - EnvironmentService, - FolderService, - LockService, - PasswordGenerationService, - SettingsService, - StateService, - SyncService, - TokenService, - TotpService, - UserService, - UtilsService, -} from 'jslib/services'; +import { ApiService } from 'jslib/services/api.service'; +import { AppIdService } from 'jslib/services/appId.service'; +import { AuthService } from 'jslib/services/auth.service'; +import { CipherService } from 'jslib/services/cipher.service'; +import { CollectionService } from 'jslib/services/collection.service'; +import { ConstantsService } from 'jslib/services/constants.service'; +import { ContainerService } from 'jslib/services/container.service'; +import { CryptoService } from 'jslib/services/crypto.service'; +import { EnvironmentService } from 'jslib/services/environment.service'; +import { FolderService } from 'jslib/services/folder.service'; +import { LockService } from 'jslib/services/lock.service'; +import { PasswordGenerationService } from 'jslib/services/passwordGeneration.service'; +import { SettingsService } from 'jslib/services/settings.service'; +import { StateService } from 'jslib/services/state.service'; +import { SyncService } from 'jslib/services/sync.service'; +import { TokenService } from 'jslib/services/token.service'; +import { TotpService } from 'jslib/services/totp.service'; +import { UserService } from 'jslib/services/user.service'; +import { UtilsService } from 'jslib/services/utils.service'; +import { ApiService as ApiServiceAbstraction } from 'jslib/abstractions/api.service'; +import { AppIdService as AppIdServiceAbstraction } from 'jslib/abstractions/appId.service'; +import { AuthService as AuthServiceAbstraction } from 'jslib/abstractions/auth.service'; +import { CipherService as CipherServiceAbstraction } from 'jslib/abstractions/cipher.service'; +import { CollectionService as CollectionServiceAbstraction } from 'jslib/abstractions/collection.service'; +import { CryptoService as CryptoServiceAbstraction } from 'jslib/abstractions/crypto.service'; +import { EnvironmentService as EnvironmentServiceAbstraction } from 'jslib/abstractions/environment.service'; +import { FolderService as FolderServiceAbstraction } from 'jslib/abstractions/folder.service'; +import { I18nService as I18nServiceAbstraction } from 'jslib/abstractions/i18n.service'; +import { LockService as LockServiceAbstraction } from 'jslib/abstractions/lock.service'; +import { MessagingService as MessagingServiceAbstraction } from 'jslib/abstractions/messaging.service'; import { - ApiService as ApiServiceAbstraction, - AppIdService as AppIdServiceAbstraction, - AuthService as AuthServiceAbstraction, - CipherService as CipherServiceAbstraction, - CollectionService as CollectionServiceAbstraction, - CryptoService as CryptoServiceAbstraction, - EnvironmentService as EnvironmentServiceAbstraction, - FolderService as FolderServiceAbstraction, - I18nService as I18nServiceAbstraction, - LockService as LockServiceAbstraction, - MessagingService as MessagingServiceAbstraction, PasswordGenerationService as PasswordGenerationServiceAbstraction, - PlatformUtilsService as PlatformUtilsServiceAbstraction, - SettingsService as SettingsServiceAbstraction, - StateService as StateServiceAbstraction, - StorageService as StorageServiceAbstraction, - SyncService as SyncServiceAbstraction, - TokenService as TokenServiceAbstraction, - TotpService as TotpServiceAbstraction, - UserService as UserServiceAbstraction, - UtilsService as UtilsServiceAbstraction, -} from 'jslib/abstractions'; +} from 'jslib/abstractions/passwordGeneration.service'; +import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from 'jslib/abstractions/platformUtils.service'; +import { SettingsService as SettingsServiceAbstraction } from 'jslib/abstractions/settings.service'; +import { StateService as StateServiceAbstraction } from 'jslib/abstractions/state.service'; +import { StorageService as StorageServiceAbstraction } from 'jslib/abstractions/storage.service'; +import { SyncService as SyncServiceAbstraction } from 'jslib/abstractions/sync.service'; +import { TokenService as TokenServiceAbstraction } from 'jslib/abstractions/token.service'; +import { TotpService as TotpServiceAbstraction } from 'jslib/abstractions/totp.service'; +import { UserService as UserServiceAbstraction } from 'jslib/abstractions/user.service'; +import { UtilsService as UtilsServiceAbstraction } from 'jslib/abstractions/utils.service'; webFrame.registerURLSchemeAsPrivileged('file');