diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..96c3cd3874 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "jslib"] + path = jslib + url = git@github.com:bitwarden/jslib.git + branch = master diff --git a/jslib b/jslib new file mode 160000 index 0000000000..5b63336347 --- /dev/null +++ b/jslib @@ -0,0 +1 @@ +Subproject commit 5b63336347ad9597ed65d907b1bdb804d8b4f39a diff --git a/jslib.ts b/jslib.ts deleted file mode 100644 index 17ef097c84..0000000000 --- a/jslib.ts +++ /dev/null @@ -1,59 +0,0 @@ -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 60dcbf7e28..745729960c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -116,14 +116,6 @@ "tslib": "1.8.1" } }, - "@bitwarden/jslib": { - "version": "git+https://github.com/bitwarden/jslib.git#5b63336347ad9597ed65d907b1bdb804d8b4f39a", - "requires": { - "@types/node-forge": "0.7.1", - "@types/webcrypto": "0.0.28", - "node-forge": "0.7.1" - } - }, "@types/keytar": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/keytar/-/keytar-4.0.1.tgz", @@ -139,12 +131,14 @@ "@types/node-forge": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-0.7.1.tgz", - "integrity": "sha512-sXCLq42I8Evd/qnrSluSKwxuBc2ioPvNCvb5hl+VL3d2zlh45n26b3rPf8DuJiAuJSv5Z5cqcF1KL7X77tXG4Q==" + "integrity": "sha512-sXCLq42I8Evd/qnrSluSKwxuBc2ioPvNCvb5hl+VL3d2zlh45n26b3rPf8DuJiAuJSv5Z5cqcF1KL7X77tXG4Q==", + "dev": true }, "@types/webcrypto": { "version": "0.0.28", "resolved": "https://registry.npmjs.org/@types/webcrypto/-/webcrypto-0.0.28.tgz", - "integrity": "sha512-jzAoSUvqA+183nJO/Sc73CREQJsv+p77WJdn532GqA3YXQzlwRwHhClVa7U4O8iB2sJSR7G3v6f1mJFNkwA9YQ==" + "integrity": "sha512-jzAoSUvqA+183nJO/Sc73CREQJsv+p77WJdn532GqA3YXQzlwRwHhClVa7U4O8iB2sJSR7G3v6f1mJFNkwA9YQ==", + "dev": true }, "abbrev": { "version": "1.1.1", @@ -3578,7 +3572,8 @@ "jsbn": { "version": "0.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "json-schema": { "version": "0.2.3", diff --git a/package.json b/package.json index 0009cd93c4..3f43229fa3 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,8 @@ }, "devDependencies": { "@types/keytar": "^4.0.1", + "@types/node-forge": "0.7.1", + "@types/webcrypto": "0.0.28", "clean-webpack-plugin": "^0.1.17", "copy-webpack-plugin": "^4.2.0", "css-loader": "^0.28.7", @@ -150,7 +152,6 @@ "@angular/platform-browser-dynamic": "5.2.0", "@angular/router": "5.2.0", "@angular/upgrade": "5.2.0", - "@bitwarden/jslib": "git+https://github.com/bitwarden/jslib.git", "angular2-toaster": "4.0.2", "angulartics2": "5.0.1", "core-js": "2.4.1", @@ -158,6 +159,7 @@ "electron-store": "1.3.0", "electron-updater": "2.20.1", "keytar": "4.1.0", + "node-forge": "0.7.1", "rxjs": "5.5.6", "zone.js": "0.8.19" } diff --git a/tsconfig.json b/tsconfig.json index 90eaf86563..6974f038de 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ "types": [], "baseUrl": ".", "paths": { - "jslib/*": [ "node_modules/@bitwarden/jslib/src/*" ] + "jslib/*": [ "jslib/src/*" ] } }, "exclude": [ diff --git a/webpack.main.js b/webpack.main.js index 00f682f6f5..7b159da81a 100644 --- a/webpack.main.js +++ b/webpack.main.js @@ -24,7 +24,7 @@ const common = { resolve: { extensions: ['.tsx', '.ts', '.js'], alias: { - jslib: path.join(__dirname, 'node_modules/@bitwarden/jslib/src') + jslib: path.join(__dirname, 'jslib/src') } }, output: { diff --git a/webpack.renderer.js b/webpack.renderer.js index ff1279b701..6034338b8b 100644 --- a/webpack.renderer.js +++ b/webpack.renderer.js @@ -51,7 +51,7 @@ const common = { resolve: { extensions: ['.tsx', '.ts', '.js'], alias: { - jslib: path.join(__dirname, 'node_modules/@bitwarden/jslib/src') + jslib: path.join(__dirname, 'jslib/src') } }, output: {