convert to jslib submodule

This commit is contained in:
Kyle Spearrin 2018-02-19 17:01:00 -05:00
parent ada2da7db9
commit 1f1303fc97
7 changed files with 50 additions and 60 deletions

4
.gitmodules vendored Normal file
View File

@ -0,0 +1,4 @@
[submodule "jslib"]
path = jslib
url = https://github.com/bitwarden/jslib.git
branch = master

1
jslib Submodule

@ -0,0 +1 @@
Subproject commit 5b63336347ad9597ed65d907b1bdb804d8b4f39a

18
package-lock.json generated
View File

@ -4,21 +4,6 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@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"
},
"dependencies": {
"@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=="
}
}
},
"@types/angular": {
"version": "1.6.43",
"resolved": "https://registry.npmjs.org/@types/angular/-/angular-1.6.43.tgz",
@ -8981,7 +8966,8 @@
"node-forge": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz",
"integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA="
"integrity": "sha1-naYR6giYL0uUIGs760zJZl8gwwA=",
"dev": true
},
"node-libs-browser": {
"version": "2.1.0",

View File

@ -68,7 +68,6 @@
"webpack-merge": "^4.1.0"
},
"dependencies": {
"@bitwarden/jslib": "git+https://github.com/bitwarden/jslib.git",
"@types/angular": "^1.6.34",
"@types/chrome": "0.0.51",
"@types/jquery": "^3.2.16",

View File

@ -32,7 +32,7 @@ window.BrowserApi = BrowserApi;
import { U2f } from '../../scripts/u2f';
window.U2f = U2f;
import { Analytics } from '../../../node_modules/@bitwarden/jslib/src/misc/analytics';
import { Analytics } from '../../../jslib/src/misc/analytics';
new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
const bgPage = BrowserApi.getBackgroundPage();
if (!bgPage || !bgPage.bitwardenMain) {
@ -42,15 +42,15 @@ new Analytics(window, () => BrowserApi.gaFilter(), null, null, null, () => {
});
// Model imports
import { Attachment } from '../../../node_modules/@bitwarden/jslib/src/models/domain/attachment';
import { Card } from '../../../node_modules/@bitwarden/jslib/src/models/domain/card';
import { Cipher } from '../../../node_modules/@bitwarden/jslib/src/models/domain/cipher';
import { CipherString } from '../../../node_modules/@bitwarden/jslib/src/models/domain/cipherString';
import { Field } from '../../../node_modules/@bitwarden/jslib/src/models/domain/field';
import { Folder } from '../../../node_modules/@bitwarden/jslib/src/models/domain/folder';
import { Identity } from '../../../node_modules/@bitwarden/jslib/src/models/domain/identity';
import { Login } from '../../../node_modules/@bitwarden/jslib/src/models/domain/login';
import { SecureNote } from '../../../node_modules/@bitwarden/jslib/src/models/domain/secureNote';
import { Attachment } from '../../../jslib/src/models/domain/attachment';
import { Card } from '../../../jslib/src/models/domain/card';
import { Cipher } from '../../../jslib/src/models/domain/cipher';
import { CipherString } from '../../../jslib/src/models/domain/cipherString';
import { Field } from '../../../jslib/src/models/domain/field';
import { Folder } from '../../../jslib/src/models/domain/folder';
import { Identity } from '../../../jslib/src/models/domain/identity';
import { Login } from '../../../jslib/src/models/domain/login';
import { SecureNote } from '../../../jslib/src/models/domain/secureNote';
window.Attachment = Attachment;
window.Card = Card;
window.Cipher = Cipher;
@ -61,15 +61,15 @@ window.Identity = Identity;
window.Login = Login;
window.SecureNote = SecureNote;
import { AttachmentData } from '../../../node_modules/@bitwarden/jslib/src/models/data/attachmentData';
import { CardData } from '../../../node_modules/@bitwarden/jslib/src/models/data/cardData';
import { CipherData } from '../../../node_modules/@bitwarden/jslib/src/models/data/cipherData';
import { CollectionData } from '../../../node_modules/@bitwarden/jslib/src/models/data/collectionData';
import { FieldData } from '../../../node_modules/@bitwarden/jslib/src/models/data/fieldData';
import { FolderData } from '../../../node_modules/@bitwarden/jslib/src/models/data/folderData';
import { IdentityData } from '../../../node_modules/@bitwarden/jslib/src/models/data/identityData';
import { LoginData } from '../../../node_modules/@bitwarden/jslib/src/models/data/loginData';
import { SecureNoteData } from '../../../node_modules/@bitwarden/jslib/src/models/data/secureNoteData';
import { AttachmentData } from '../../../jslib/src/models/data/attachmentData';
import { CardData } from '../../../jslib/src/models/data/cardData';
import { CipherData } from '../../../jslib/src/models/data/cipherData';
import { CollectionData } from '../../../jslib/src/models/data/collectionData';
import { FieldData } from '../../../jslib/src/models/data/fieldData';
import { FolderData } from '../../../jslib/src/models/data/folderData';
import { IdentityData } from '../../../jslib/src/models/data/identityData';
import { LoginData } from '../../../jslib/src/models/data/loginData';
import { SecureNoteData } from '../../../jslib/src/models/data/secureNoteData';
window.AttachmentData = AttachmentData;
window.CardData = CardData;
window.CipherData = CipherData;
@ -80,14 +80,14 @@ window.IdentityData = IdentityData;
window.LoginData = LoginData;
window.SecureNoteData = SecureNoteData;
import { CipherRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/cipherRequest';
import { DeviceRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/deviceRequest';
import { DeviceTokenRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/deviceTokenRequest';
import { FolderRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/folderRequest';
import { PasswordHintRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/passwordHintRequest';
import { RegisterRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/registerRequest';
import { TokenRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/tokenRequest';
import { TwoFactorEmailRequest } from '../../../node_modules/@bitwarden/jslib/src/models/request/twoFactorEmailRequest';
import { CipherRequest } from '../../../jslib/src/models/request/cipherRequest';
import { DeviceRequest } from '../../../jslib/src/models/request/deviceRequest';
import { DeviceTokenRequest } from '../../../jslib/src/models/request/deviceTokenRequest';
import { FolderRequest } from '../../../jslib/src/models/request/folderRequest';
import { PasswordHintRequest } from '../../../jslib/src/models/request/passwordHintRequest';
import { RegisterRequest } from '../../../jslib/src/models/request/registerRequest';
import { TokenRequest } from '../../../jslib/src/models/request/tokenRequest';
import { TwoFactorEmailRequest } from '../../../jslib/src/models/request/twoFactorEmailRequest';
window.CipherRequest = CipherRequest;
window.DeviceRequest = DeviceRequest;
window.DeviceTokenRequest = DeviceTokenRequest;
@ -97,20 +97,20 @@ window.RegisterRequest = RegisterRequest;
window.TokenRequest = TokenRequest;
window.TwoFactorEmailRequest = TwoFactorEmailRequest;
import { AttachmentResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/attachmentResponse';
import { CipherResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/cipherResponse';
import { CollectionResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/collectionResponse';
import { DeviceResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/deviceResponse';
import { DomainsResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/domainsResponse';
import { ErrorResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/errorResponse';
import { FolderResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/folderResponse';
import { GlobalDomainResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/globalDomainResponse';
import { IdentityTokenResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/identityTokenResponse';
import { KeysResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/keysResponse';
import { ListResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/listResponse';
import { ProfileOrganizationResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/profileOrganizationResponse';
import { ProfileResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/profileResponse';
import { SyncResponse } from '../../../node_modules/@bitwarden/jslib/src/models/response/syncResponse';
import { AttachmentResponse } from '../../../jslib/src/models/response/attachmentResponse';
import { CipherResponse } from '../../../jslib/src/models/response/cipherResponse';
import { CollectionResponse } from '../../../jslib/src/models/response/collectionResponse';
import { DeviceResponse } from '../../../jslib/src/models/response/deviceResponse';
import { DomainsResponse } from '../../../jslib/src/models/response/domainsResponse';
import { ErrorResponse } from '../../../jslib/src/models/response/errorResponse';
import { FolderResponse } from '../../../jslib/src/models/response/folderResponse';
import { GlobalDomainResponse } from '../../../jslib/src/models/response/globalDomainResponse';
import { IdentityTokenResponse } from '../../../jslib/src/models/response/identityTokenResponse';
import { KeysResponse } from '../../../jslib/src/models/response/keysResponse';
import { ListResponse } from '../../../jslib/src/models/response/listResponse';
import { ProfileOrganizationResponse } from '../../../jslib/src/models/response/profileOrganizationResponse';
import { ProfileResponse } from '../../../jslib/src/models/response/profileResponse';
import { SyncResponse } from '../../../jslib/src/models/response/syncResponse';
window.AttachmentResponse = AttachmentResponse;
window.CipherResponse = CipherResponse;
window.CollectionResponse = CollectionResponse;

View File

@ -11,7 +11,7 @@
],
"baseUrl": ".",
"paths": {
"jslib/*": [ "node_modules/@bitwarden/jslib/src/*" ]
"jslib/*": [ "jslib/src/*" ]
}
},
"exclude": [

View File

@ -119,7 +119,7 @@ module.exports = {
resolve: {
extensions: ['.tsx', '.ts', '.js'],
alias: {
jslib: path.join(__dirname, 'node_modules/@bitwarden/jslib/src')
jslib: path.join(__dirname, 'jslib/src')
}
},
output: {