Upgrade various dependencies

This commit is contained in:
Martin Kleinschrodt 2020-07-19 17:44:11 +02:00
parent af1c231b92
commit 87e0f52a3f
13 changed files with 4553 additions and 2232 deletions

2642
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,8 @@
"packages/*"
],
"devDependencies": {
"lerna": "^3.16.4",
"typescript": "^3.4.3"
"lerna": "^3.22.1",
"typescript": "^3.9.7"
},
"dependencies": {},
"scripts": {

File diff suppressed because it is too large Load Diff

View File

@ -26,13 +26,14 @@
"@webcomponents/webcomponentsjs": "^2.0.0",
"autosize": "^4.0.2",
"date-fns": "^1.30.1",
"http-server": "^0.11.1",
"http-server": "^0.12.3",
"jsqr": "^1.2.0",
"lit-element": "^2.1.0",
"lit-html": "^1.0.0",
"localforage": "^1.7.3",
"papaparse": "^5.0.0",
"papaparse": "^5.2.0",
"reflect-metadata": "^0.1.12",
"typescript": "^3.9.7",
"ua-parser-js": "^0.7.20",
"workbox-sw": "^4.3.1",
"workbox-window": "^4.3.1",
@ -42,7 +43,7 @@
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0"
"mocha": "^8.0.1"
},
"description": "Padloc Web-Based UI package"
}

View File

@ -40,10 +40,10 @@ export class WebCryptoProvider implements CryptoProvider {
case "HMAC":
return this.randomBytes(params.keySize / 8);
case "RSA":
const keyPair = await webCrypto.generateKey(Object.assign(params, { name: "RSA-OAEP" }), true, [
const keyPair = (await webCrypto.generateKey(Object.assign(params, { name: "RSA-OAEP" }), true, [
"encrypt",
"decrypt"
]);
])) as CryptoKeyPair;
const privateKey = await crypto.subtle.exportKey("pkcs8", keyPair.privateKey);
const publicKey = await crypto.subtle.exportKey("spki", keyPair.publicKey);

View File

@ -16,9 +16,7 @@ export const StateMixin = <T extends Constructor<BaseElement>>(baseElement: T) =
_stateHandler = this.stateChanged.bind(this);
connectedCallback() {
if (super.connectedCallback) {
super.connectedCallback();
}
super.connectedCallback();
app.subscribe(this._stateHandler);
this.stateChanged();
@ -27,9 +25,7 @@ export const StateMixin = <T extends Constructor<BaseElement>>(baseElement: T) =
disconnectedCallback() {
app.unsubscribe(this._stateHandler);
if (super.disconnectedCallback) {
super.disconnectedCallback();
}
super.disconnectedCallback();
}
/**

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="app.padloc" version="3.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<widget id="app.padloc" version="3.1.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Padloc</name>
<description>
</description>

View File

@ -79,4 +79,4 @@
"scripts": {
"build": "webpack"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -11,13 +11,14 @@
"tsconfig.json"
],
"dependencies": {
"@padloc/locale": "^3.1.1"
"@padloc/locale": "^3.1.1",
"typescript": "^3.9.7"
},
"devDependencies": {
"@types/chai": "^4.1.7",
"@types/mocha": "^5.2.5",
"chai": "^4.2.0",
"mocha": "^5.2.0",
"mocha": "^8.0.1",
"ts-node": "^7.0.1",
"typedoc": "^0.15.0"
},

View File

@ -106,6 +106,15 @@ export class Index extends Serializable {
}
const hashedHost = await crypto.deriveKey(stringToBytes(host), this.hashParams);
console.log(
"setting index for host",
host,
stringToBytes(host),
this.hashParams.salt,
bytesToBase64(hashedHost)
);
return bytesToBase64(hashedHost);
})
)
@ -117,6 +126,7 @@ export class Index extends Serializable {
async matchHost(host: string) {
const hashedHost = bytesToBase64(await getCryptoProvider().deriveKey(stringToBytes(host), this.hashParams));
console.log("matching host", host, stringToBytes(host), this.hashParams.salt, hashedHost);
return this.items.filter(item => item.hosts.some(h => h === hashedHost)).length;
}

File diff suppressed because it is too large Load Diff

View File

@ -24,14 +24,14 @@
"favicons-webpack-plugin": "^2.1.0",
"file-loader": "^4.0.0",
"html-webpack-plugin": "^3.2.0",
"http-server": "^0.11.1",
"http-server": "^0.12.3",
"style-loader": "^1.0.0",
"ts-loader": "^6.0.4",
"ts-node": "^7.0.1",
"typescript": "^3.5.2",
"typescript": "^3.9.7",
"webpack": "^4.41.5",
"webpack-cli": "^3.3.5",
"webpack-dev-server": "^3.7.2",
"webpack-dev-server": "^3.11.0",
"webpack-pwa-manifest": "^4.0.0",
"workbox-cli": "^4.3.1",
"workbox-webpack-plugin": "^5.0.0-rc.1"