parent
11fff06b8c
commit
aca098645a
File diff suppressed because it is too large
Load Diff
101
package.json
101
package.json
|
@ -24,83 +24,78 @@
|
|||
"test:node:watch": "concurrently -k -n TSC,Node -c yellow,cyan \"npm run build:watch\" \"nodemon -w ./dist --delay 500ms --exec jasmine\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fluffy-spoon/substitute": "^1.179.0",
|
||||
"@types/commander": "^2.12.2",
|
||||
"@types/form-data": "^2.2.1",
|
||||
"@types/inquirer": "^0.0.43",
|
||||
"@types/jasmine": "^3.3.12",
|
||||
"@types/lowdb": "^1.0.5",
|
||||
"@fluffy-spoon/substitute": "^1.202.0",
|
||||
"@types/inquirer": "^7.3.1",
|
||||
"@types/jasmine": "^3.6.9",
|
||||
"@types/lowdb": "^1.0.9",
|
||||
"@types/lunr": "^2.3.3",
|
||||
"@types/node": "^10.17.28",
|
||||
"@types/node-fetch": "^2.1.2",
|
||||
"@types/node-forge": "^0.7.5",
|
||||
"@types/papaparse": "^4.5.3",
|
||||
"@types/node": "^10.17.57",
|
||||
"@types/node-fetch": "^2.5.10",
|
||||
"@types/node-forge": "^0.9.7",
|
||||
"@types/papaparse": "^5.2.5",
|
||||
"@types/tldjs": "^2.3.0",
|
||||
"@types/webcrypto": "0.0.28",
|
||||
"@types/zxcvbn": "^4.4.0",
|
||||
"concurrently": "3.5.1",
|
||||
"cssstyle": "1.2.1",
|
||||
"electron": "11.3.0",
|
||||
"jasmine": "^3.3.1",
|
||||
"jasmine-core": "^3.3.0",
|
||||
"jasmine-spec-reporter": "^4.2.1",
|
||||
"@types/zxcvbn": "^4.4.1",
|
||||
"concurrently": "6.0.2",
|
||||
"electron": "11.4.3",
|
||||
"jasmine": "^3.7.0",
|
||||
"jasmine-core": "^3.7.1",
|
||||
"jasmine-ts-console-reporter": "^3.1.1",
|
||||
"karma": "^4.0.1",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"jsdom": "^16.5.3",
|
||||
"karma": "^6.3.2",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-cli": "^2.0.0",
|
||||
"karma-coverage-istanbul-reporter": "^2.0.5",
|
||||
"karma-detect-browsers": "^2.3.3",
|
||||
"karma-edge-launcher": "^0.4.2",
|
||||
"karma-firefox-launcher": "^1.1.0",
|
||||
"karma-jasmine": "^2.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.0",
|
||||
"karma-firefox-launcher": "^2.1.0",
|
||||
"karma-jasmine": "^4.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.5.4",
|
||||
"karma-safari-launcher": "^1.0.0",
|
||||
"karma-typescript": "^4.0.0",
|
||||
"nodemon": "^1.17.3",
|
||||
"rimraf": "^2.6.2",
|
||||
"karma-webpack": "^4.0.2",
|
||||
"nodemon": "^2.0.7",
|
||||
"rimraf": "^3.0.2",
|
||||
"ts-loader": "^8.1.0",
|
||||
"ts-node": "^9.1.0",
|
||||
"tslint": "^6.1.3",
|
||||
"typemoq": "^2.1.0",
|
||||
"typescript": "3.8.3"
|
||||
"typescript": "4.1.5",
|
||||
"webpack": "^4.46.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "9.1.12",
|
||||
"@angular/cdk": "9.2.4",
|
||||
"@angular/common": "9.1.12",
|
||||
"@angular/compiler": "9.1.12",
|
||||
"@angular/core": "9.1.12",
|
||||
"@angular/forms": "9.1.12",
|
||||
"@angular/platform-browser": "9.1.12",
|
||||
"@angular/platform-browser-dynamic": "9.1.12",
|
||||
"@angular/router": "9.1.12",
|
||||
"@angular/animations": "^11.2.11",
|
||||
"@angular/cdk": "^11.2.10",
|
||||
"@angular/common": "^11.2.11",
|
||||
"@angular/compiler": "^11.2.11",
|
||||
"@angular/core": "^11.2.11",
|
||||
"@angular/forms": "^11.2.11",
|
||||
"@angular/platform-browser": "^11.2.11",
|
||||
"@angular/platform-browser-dynamic": "^11.2.11",
|
||||
"@angular/router": "^11.2.11",
|
||||
"@microsoft/signalr": "3.1.13",
|
||||
"@microsoft/signalr-protocol-msgpack": "3.1.13",
|
||||
"@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4",
|
||||
"big-integer": "1.6.48",
|
||||
"browser-hrtime": "^1.1.8",
|
||||
"chalk": "2.4.1",
|
||||
"commander": "7.0.0",
|
||||
"core-js": "2.6.12",
|
||||
"chalk": "^4.1.1",
|
||||
"commander": "7.2.0",
|
||||
"duo_web_sdk": "git+https://github.com/duosecurity/duo_web_sdk.git",
|
||||
"electron-log": "4.3.0",
|
||||
"electron-store": "6.0.1",
|
||||
"electron-updater": "4.3.5",
|
||||
"electron-log": "4.3.4",
|
||||
"electron-store": "8.0.0",
|
||||
"electron-updater": "4.3.8",
|
||||
"forcefocus": "^1.1.0",
|
||||
"form-data": "2.3.2",
|
||||
"form-data": "4.0.0",
|
||||
"https-proxy-agent": "5.0.0",
|
||||
"inquirer": "6.2.0",
|
||||
"jsdom": "13.2.0",
|
||||
"keytar": "4.13.0",
|
||||
"inquirer": "7.3.3",
|
||||
"keytar": "7.6.0",
|
||||
"lowdb": "1.0.0",
|
||||
"lunr": "2.3.3",
|
||||
"ngx-infinite-scroll": "7.0.1",
|
||||
"lunr": "2.3.9",
|
||||
"ngx-infinite-scroll": "10.0.1",
|
||||
"node-fetch": "2.6.1",
|
||||
"node-forge": "0.10.0",
|
||||
"open": "7.1.0",
|
||||
"papaparse": "5.2.0",
|
||||
"rxjs": "6.6.2",
|
||||
"open": "7.4.2",
|
||||
"papaparse": "5.3.0",
|
||||
"rxjs": "6.6.7",
|
||||
"tldjs": "2.3.1",
|
||||
"zone.js": "0.9.1",
|
||||
"zone.js": "0.11.4",
|
||||
"zxcvbn": "4.4.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
import { KeePass2XmlImporter as Importer } from '../../../src/importers/keepass2XmlImporter';
|
||||
|
||||
import { Utils } from '../../../src/misc/utils';
|
||||
|
||||
if (Utils.isNode) {
|
||||
// Polyfills
|
||||
// tslint:disable-next-line
|
||||
const jsdom: any = require('jsdom');
|
||||
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
}
|
||||
|
||||
const TestData: string = `<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<KeePassFile>
|
||||
<Meta>
|
||||
|
|
|
@ -3,17 +3,8 @@ import { LastPassCsvImporter as Importer } from '../../../src/importers/lastpass
|
|||
import { CipherView } from '../../../src/models/view/cipherView';
|
||||
import { FieldView } from '../../../src/models/view/fieldView';
|
||||
|
||||
import { Utils } from '../../../src/misc/utils';
|
||||
|
||||
import { FieldType } from '../../../src/enums';
|
||||
|
||||
if (Utils.isNode) {
|
||||
// Polyfills
|
||||
// tslint:disable-next-line
|
||||
const jsdom: any = require('jsdom');
|
||||
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
}
|
||||
|
||||
const CipherData = [
|
||||
{
|
||||
title: 'should parse expiration date',
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
import { FieldType } from '../../../src/enums/fieldType';
|
||||
import { OnePassword1PifImporter as Importer } from '../../../src/importers/onepasswordImporters/onepassword1PifImporter';
|
||||
|
||||
import { Utils } from '../../../src/misc/utils';
|
||||
|
||||
if (Utils.isNode) {
|
||||
// Polyfills
|
||||
// tslint:disable-next-line
|
||||
const jsdom: any = require('jsdom');
|
||||
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
}
|
||||
|
||||
const TestData: string = '***aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee***\n' +
|
||||
JSON.stringify({
|
||||
uuid: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
|
||||
|
|
|
@ -2,3 +2,8 @@
|
|||
const TSConsoleReporter = require('jasmine-ts-console-reporter');
|
||||
jasmine.getEnv().clearReporters(); // Clear default console reporter
|
||||
jasmine.getEnv().addReporter(new TSConsoleReporter());
|
||||
|
||||
// Polyfills
|
||||
// tslint:disable-next-line
|
||||
const jsdom: any = require('jsdom');
|
||||
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
|
|
|
@ -5,19 +5,13 @@ module.exports = (config) => {
|
|||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ['jasmine', 'karma-typescript', 'detectBrowsers'],
|
||||
frameworks: ['jasmine', 'detectBrowsers'],
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'spec/utils.ts',
|
||||
'spec/common/**/*.ts',
|
||||
'spec/web/**/*.ts',
|
||||
'src/abstractions/**/*.ts',
|
||||
'src/importers/**/*.ts',
|
||||
'src/enums/**/*.ts',
|
||||
'src/models/**/*.ts',
|
||||
'src/misc/**/*.ts',
|
||||
'src/services/**/*.ts'
|
||||
{ pattern: 'spec/utils.ts', watched: false },
|
||||
{ pattern: 'spec/common/**/*.ts', watched: false },
|
||||
{ pattern: 'spec/web/**/*.ts', watched: false },
|
||||
],
|
||||
|
||||
// list of files to exclude
|
||||
|
@ -27,13 +21,13 @@ module.exports = (config) => {
|
|||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: {
|
||||
'**/*.ts': 'karma-typescript'
|
||||
'spec/**/*.ts': 'webpack'
|
||||
},
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ['progress', 'karma-typescript', 'kjhtml'],
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
|
||||
// web server port
|
||||
port: 9876,
|
||||
|
@ -53,17 +47,22 @@ module.exports = (config) => {
|
|||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
|
||||
karmaTypescriptConfig: {
|
||||
tsconfig: './tsconfig.json',
|
||||
bundlerOptions: {
|
||||
entrypoints: /\.spec\.ts$/,
|
||||
sourceMap: true,
|
||||
resolve: {
|
||||
alias: {
|
||||
"util": "node_modules/util/util.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
webpack: {
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts', '.tsx'],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{test: /\.tsx?$/, loader: 'ts-loader'}
|
||||
]
|
||||
},
|
||||
stats: {
|
||||
colors: true,
|
||||
modules: true,
|
||||
reasons: true,
|
||||
errorDetails: true
|
||||
},
|
||||
devtool: 'inline-source-map',
|
||||
},
|
||||
|
||||
detectBrowsers: {
|
||||
|
@ -80,10 +79,8 @@ module.exports = (config) => {
|
|||
removeBrowser('Opera');
|
||||
removeBrowser('SafariTechPreview');
|
||||
|
||||
var ci = process.env.CI === 'True' || process.env.CI === 'true';
|
||||
var githubAction = process.env.GITHUB_WORKFLOW != null && process.env.GITHUB_WORKFLOW !== '';
|
||||
if (githubAction) {
|
||||
removeBrowser('Edge');
|
||||
removeBrowser('Firefox');
|
||||
removeBrowser('Safari');
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import * as zxcvbn from 'zxcvbn';
|
||||
|
||||
import { GeneratedPasswordHistory } from '../models/domain/generatedPasswordHistory';
|
||||
import { PasswordGeneratorPolicyOptions } from '../models/domain/passwordGeneratorPolicyOptions';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { CryptoService } from '../../abstractions/crypto.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
|
@ -14,6 +14,7 @@ import { SymmetricCryptoKey } from '../../models/domain/symmetricCryptoKey';
|
|||
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
@Directive()
|
||||
export class ChangePasswordComponent implements OnInit {
|
||||
masterPassword: string;
|
||||
masterPasswordRetype: string;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { ApiService } from '../../abstractions/api.service';
|
||||
|
@ -21,6 +21,7 @@ import { PasswordVerificationRequest } from '../../models/request/passwordVerifi
|
|||
|
||||
import { Utils } from '../../misc/utils';
|
||||
|
||||
@Directive()
|
||||
export class LockComponent implements OnInit {
|
||||
masterPassword: string = '';
|
||||
pin: string = '';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
import { PasswordGenerationService } from '../../abstractions/passwordGeneration.service';
|
||||
|
@ -6,6 +6,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
|||
|
||||
import { GeneratedPasswordHistory } from '../../models/domain/generatedPasswordHistory';
|
||||
|
||||
@Directive()
|
||||
export class PasswordGeneratorHistoryComponent implements OnInit {
|
||||
history: GeneratedPasswordHistory[] = [];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { CipherService } from '../../abstractions/cipher.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
|
@ -6,6 +6,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
|||
|
||||
import { PasswordHistoryView } from '../../models/view/passwordHistoryView';
|
||||
|
||||
@Directive()
|
||||
export class PasswordHistoryComponent implements OnInit {
|
||||
cipherId: string;
|
||||
history: PasswordHistoryView[] = [];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { OnInit } from '@angular/core';
|
||||
import { Directive, OnInit } from '@angular/core';
|
||||
|
||||
import { ApiService } from '../../abstractions/api.service';
|
||||
import { I18nService } from '../../abstractions/i18n.service';
|
||||
|
@ -6,6 +6,7 @@ import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
|||
import { TokenService } from '../../abstractions/token.service';
|
||||
import { UserService } from '../../abstractions/user.service';
|
||||
|
||||
@Directive()
|
||||
export class PremiumComponent implements OnInit {
|
||||
isPremium: boolean = false;
|
||||
price: number = 10;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { DatePipe } from '@angular/common';
|
||||
|
||||
import {
|
||||
Directive,
|
||||
EventEmitter,
|
||||
Input,
|
||||
OnInit,
|
||||
Output,
|
||||
Output
|
||||
} from '@angular/core';
|
||||
|
||||
import { OrganizationUserStatusType } from '../../../enums/organizationUserStatusType';
|
||||
|
@ -38,6 +38,7 @@ enum DateField {
|
|||
ExpriationDate = 'expiration',
|
||||
}
|
||||
|
||||
@Directive()
|
||||
export class AddEditComponent implements OnInit {
|
||||
@Input() sendId: string;
|
||||
@Input() type: SendType;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {
|
||||
Directive,
|
||||
NgZone,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
|
@ -17,6 +18,7 @@ import { SearchService } from '../../../abstractions/search.service';
|
|||
import { SendService } from '../../../abstractions/send.service';
|
||||
import { UserService } from '../../../abstractions/user.service';
|
||||
|
||||
@Directive()
|
||||
export class SendComponent implements OnInit {
|
||||
|
||||
disableSend = false;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { Directive } from '@angular/core';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
Router
|
||||
|
@ -23,6 +24,7 @@ import { ChangePasswordComponent as BaseChangePasswordComponent } from './change
|
|||
|
||||
import { KdfType } from '../../enums/kdfType';
|
||||
|
||||
@Directive()
|
||||
export class SetPasswordComponent extends BaseChangePasswordComponent {
|
||||
syncLoading: boolean = true;
|
||||
showPassword: boolean = false;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { Directive } from '@angular/core';
|
||||
import {
|
||||
ActivatedRoute,
|
||||
Router,
|
||||
|
@ -18,6 +19,7 @@ import { Utils } from '../../misc/utils';
|
|||
|
||||
import { AuthResult } from '../../models/domain/authResult';
|
||||
|
||||
@Directive()
|
||||
export class SsoComponent {
|
||||
identifier: string;
|
||||
loggingIn = false;
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import {
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
import { Directive, OnDestroy, OnInit } from '@angular/core';
|
||||
|
||||
import {
|
||||
ActivatedRoute,
|
||||
|
@ -28,6 +25,7 @@ import { ConstantsService } from '../../services/constants.service';
|
|||
import * as DuoWebSDK from 'duo_web_sdk';
|
||||
import { WebAuthn } from '../../misc/webauthn';
|
||||
|
||||
@Directive()
|
||||
export class TwoFactorComponent implements OnInit, OnDestroy {
|
||||
token: string = '';
|
||||
remember: boolean = false;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as chk from 'chalk';
|
||||
import * as chalk from 'chalk';
|
||||
|
||||
import { Response } from './models/response';
|
||||
import { ListResponse } from './models/response/listResponse';
|
||||
|
@ -7,8 +7,6 @@ import { StringResponse } from './models/response/stringResponse';
|
|||
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
|
||||
const chalk = chk.default;
|
||||
|
||||
export abstract class BaseProgram {
|
||||
constructor(
|
||||
private userService: UserService,
|
||||
|
|
|
@ -27,7 +27,7 @@ export class WindowMain {
|
|||
private createWindowCallback: (win: BrowserWindow) => void) { }
|
||||
|
||||
init(): Promise<any> {
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
try {
|
||||
if (!isMacAppStore() && !isSnapStore()) {
|
||||
const gotTheLock = app.requestSingleInstanceLock();
|
||||
|
|
|
@ -291,7 +291,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
|
|||
// Have to specify some algorithm
|
||||
hash: { name: this.toWebCryptoAlgorithm('sha1') },
|
||||
};
|
||||
const keyPair = await this.subtle.generateKey(rsaParams, true, ['encrypt', 'decrypt']);
|
||||
const keyPair = (await this.subtle.generateKey(rsaParams, true, ['encrypt', 'decrypt'])) as CryptoKeyPair;
|
||||
const publicKey = await this.subtle.exportKey('spki', keyPair.publicKey);
|
||||
const privateKey = await this.subtle.exportKey('pkcs8', keyPair.privateKey);
|
||||
return [publicKey, privateKey];
|
||||
|
|
Loading…
Reference in New Issue