mirror of
https://gitlab.com/timvisee/send.git
synced 2024-11-09 12:42:44 +01:00
replaced cryptofill with webcrypto-liner
This commit is contained in:
parent
9e919eddb5
commit
de88885189
@ -4,4 +4,3 @@ firefox
|
||||
coverage
|
||||
app/locale.js
|
||||
app/capabilities.js
|
||||
app/cryptofill.js
|
@ -1,5 +1,4 @@
|
||||
dist
|
||||
android/app/src/main/assets
|
||||
android/app/build
|
||||
app/cryptofill.js
|
||||
coverage
|
@ -47,7 +47,7 @@ async function checkCrypto() {
|
||||
} catch (err) {
|
||||
try {
|
||||
window.asmCrypto = await import('asmcrypto.js');
|
||||
await import('./cryptofill');
|
||||
await import('@dannycoates/webcrypto-liner/build/shim');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
|
10901
app/cryptofill.js
10901
app/cryptofill.js
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,10 @@ if (process.env.NODE_ENV === 'production') {
|
||||
|
||||
(async function start() {
|
||||
const capabilities = await getCapabilities();
|
||||
if (!capabilities.crypto) {
|
||||
if (
|
||||
!capabilities.crypto &&
|
||||
window.location.pathname !== '/unsupported/crypto'
|
||||
) {
|
||||
return window.location.assign('/unsupported/crypto');
|
||||
}
|
||||
if (capabilities.serviceWorker) {
|
||||
|
19
package-lock.json
generated
19
package-lock.json
generated
@ -883,6 +883,17 @@
|
||||
"integrity": "sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==",
|
||||
"dev": true
|
||||
},
|
||||
"@dannycoates/webcrypto-liner": {
|
||||
"version": "0.1.34",
|
||||
"resolved": "https://registry.npmjs.org/@dannycoates/webcrypto-liner/-/webcrypto-liner-0.1.34.tgz",
|
||||
"integrity": "sha512-QTP7EIlNkcp3jA5XAHk3uU6q3ZOcXOHRZnmzt+yDPf9dhLa5QR99ooHC8JHrD/J4dwVKuMY995aMCGF+M0g5Cg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"asmcrypto.js": "^0.22.0",
|
||||
"elliptic": "^6.4.1",
|
||||
"webcrypto-core": "github:dannycoates/webcrypto-core#8e0152a66d3ae6329cf080ccb3085eb06637070f"
|
||||
}
|
||||
},
|
||||
"@dannycoates/webpack-dev-server": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@dannycoates/webpack-dev-server/-/webpack-dev-server-3.1.4.tgz",
|
||||
@ -16659,6 +16670,14 @@
|
||||
"object.assign": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"webcrypto-core": {
|
||||
"version": "github:dannycoates/webcrypto-core#8e0152a66d3ae6329cf080ccb3085eb06637070f",
|
||||
"from": "github:dannycoates/webcrypto-core",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.7.1"
|
||||
}
|
||||
},
|
||||
"webdriverio": {
|
||||
"version": "4.14.2",
|
||||
"resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-4.14.2.tgz",
|
||||
|
@ -64,6 +64,7 @@
|
||||
"@babel/plugin-proposal-class-properties": "^7.3.3",
|
||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||
"@babel/preset-env": "^7.3.1",
|
||||
"@dannycoates/webcrypto-liner": "^0.1.34",
|
||||
"@dannycoates/webpack-dev-server": "^3.1.4",
|
||||
"@fullhuman/postcss-purgecss": "^1.1.0",
|
||||
"@mattiasbuelens/web-streams-polyfill": "0.2.1",
|
||||
|
@ -97,6 +97,10 @@ const web = {
|
||||
path.resolve(__dirname, 'common'),
|
||||
// some dependencies need to get re-babeled because we
|
||||
// have different targets than their default configs
|
||||
path.resolve(
|
||||
__dirname,
|
||||
'node_modules/@dannycoates/webcrypto-liner'
|
||||
),
|
||||
path.resolve(__dirname, 'node_modules/fluent'),
|
||||
path.resolve(__dirname, 'node_modules/fluent-intl-polyfill'),
|
||||
path.resolve(__dirname, 'node_modules/intl-pluralrules')
|
||||
@ -108,7 +112,9 @@ const web = {
|
||||
include: [path.resolve(__dirname, 'node_modules')],
|
||||
exclude: [
|
||||
path.resolve(__dirname, 'node_modules/crc'),
|
||||
path.resolve(__dirname, 'node_modules/fluent')
|
||||
path.resolve(__dirname, 'node_modules/fluent'),
|
||||
path.resolve(__dirname, 'node_modules/tslib'),
|
||||
path.resolve(__dirname, 'node_modules/webcrypto-core')
|
||||
],
|
||||
loader: 'webpack-unassert-loader'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user