Update prettier to 3.3.3
This commit is contained in:
parent
1773ad1e11
commit
24a22bf191
109 changed files with 452 additions and 392 deletions
|
@ -2348,12 +2348,15 @@ async function requestShutdown() {
|
|||
// exits the app before we've set everything up in preload() (so the browser isn't
|
||||
// yet listening for these events), or if there are a whole lot of stacked-up tasks.
|
||||
// Note: two minutes is also our timeout for SQL tasks in data.js in the browser.
|
||||
timeout = setTimeout(() => {
|
||||
timeout = setTimeout(
|
||||
() => {
|
||||
getLogger().error(
|
||||
'requestShutdown: Response never received; forcing shutdown.'
|
||||
);
|
||||
resolveFn();
|
||||
}, 2 * 60 * 1000);
|
||||
},
|
||||
2 * 60 * 1000
|
||||
);
|
||||
});
|
||||
|
||||
try {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- Copyright 2014 Signal Messenger, LLC -->
|
||||
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!-- Derived from Chromium WebRTC Internals Dashboard - see Acknowledgements for full license details -->
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html dir="auto">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- Copyright 2020 Signal Messenger, LLC -->
|
||||
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta
|
||||
|
|
233
package-lock.json
generated
233
package-lock.json
generated
|
@ -125,9 +125,9 @@
|
|||
"@electron/fuses": "1.5.0",
|
||||
"@electron/notarize": "2.1.0",
|
||||
"@formatjs/intl": "2.6.7",
|
||||
"@indutny/parallel-prettier": "3.0.0",
|
||||
"@indutny/rezip-electron": "1.3.1",
|
||||
"@indutny/symbolicate-mac": "2.3.0",
|
||||
"@mixer/parallel-prettier": "2.0.3",
|
||||
"@signalapp/mock-server": "6.6.0",
|
||||
"@storybook/addon-a11y": "8.1.11",
|
||||
"@storybook/addon-actions": "8.1.11",
|
||||
|
@ -235,7 +235,7 @@
|
|||
"pixelmatch": "5.3.0",
|
||||
"playwright": "1.45.0",
|
||||
"pngjs": "7.0.0",
|
||||
"prettier": "2.8.0",
|
||||
"prettier": "3.3.3",
|
||||
"protobufjs-cli": "1.1.1",
|
||||
"resedit": "2.0.2",
|
||||
"resolve-url-loader": "5.0.0",
|
||||
|
@ -4047,6 +4047,36 @@
|
|||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@indutny/parallel-prettier": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@indutny/parallel-prettier/-/parallel-prettier-3.0.0.tgz",
|
||||
"integrity": "sha512-v6WkYfLUYfDELBsynhrMpDxLMZZ7LRhfB1hfeb4ERoViW5zb7aovfAsNjiZrWH4k0KZcCi3iMNF+d9i8h0UmzA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.0",
|
||||
"commander": "^7.0.0",
|
||||
"glob-stream": "^7.0.0",
|
||||
"ignore": "^5.1.8",
|
||||
"ora": "^5.3.0",
|
||||
"prettier": "^3.0.3",
|
||||
"rxjs": "^6.6.3"
|
||||
},
|
||||
"bin": {
|
||||
"pprettier": "dist/index.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prettier": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@indutny/parallel-prettier/node_modules/commander": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
|
||||
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@indutny/rezip-electron": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@indutny/rezip-electron/-/rezip-electron-1.3.1.tgz",
|
||||
|
@ -4989,36 +5019,6 @@
|
|||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@mixer/parallel-prettier": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@mixer/parallel-prettier/-/parallel-prettier-2.0.3.tgz",
|
||||
"integrity": "sha512-42ImvDusmxjpQLHEmZrljV/+L9ynfmaTe5ooLMTTLyELulUJtJW8vBXCadQdodfZ5wjr2Sg3YGIzWE0rnBsfDg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"chalk": "^4.1.0",
|
||||
"commander": "^7.0.0",
|
||||
"glob-stream": "^7.0.0",
|
||||
"ignore": "^5.1.8",
|
||||
"ora": "^5.3.0",
|
||||
"prettier": "^2.0.4",
|
||||
"rxjs": "^6.6.3"
|
||||
},
|
||||
"bin": {
|
||||
"pprettier": "dist/index.js"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prettier": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mixer/parallel-prettier/node_modules/commander": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
|
||||
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/@ndelangen/get-tarball": {
|
||||
"version": "3.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@ndelangen/get-tarball/-/get-tarball-3.0.9.tgz",
|
||||
|
@ -5326,6 +5326,18 @@
|
|||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/@pkgr/core": {
|
||||
"version": "0.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
|
||||
"integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/unts"
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.6",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.6.tgz",
|
||||
|
@ -8619,21 +8631,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@storybook/cli/node_modules/prettier": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
|
||||
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@storybook/cli/node_modules/semver": {
|
||||
"version": "7.6.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
|
||||
|
@ -8781,21 +8778,6 @@
|
|||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@storybook/codemod/node_modules/prettier": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
|
||||
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/@storybook/codemod/node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
|
@ -17884,21 +17866,21 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/duplexify": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz",
|
||||
"integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==",
|
||||
"version": "4.1.3",
|
||||
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz",
|
||||
"integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"end-of-stream": "^1.4.1",
|
||||
"inherits": "^2.0.3",
|
||||
"readable-stream": "^3.1.1",
|
||||
"stream-shift": "^1.0.0"
|
||||
"stream-shift": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/duplexify/node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
|
@ -17909,15 +17891,6 @@
|
|||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/duplexify/node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eastasianwidth": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
||||
|
@ -19748,19 +19721,33 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-prettier": {
|
||||
"version": "3.1.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz",
|
||||
"integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==",
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz",
|
||||
"integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"prettier-linter-helpers": "^1.0.0"
|
||||
"prettier-linter-helpers": "^1.0.0",
|
||||
"synckit": "^0.9.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0.0"
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint-plugin-prettier"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": ">=5.0.0",
|
||||
"prettier": ">=1.13.0"
|
||||
"@types/eslint": ">=8.0.0",
|
||||
"eslint": ">=8.0.0",
|
||||
"eslint-config-prettier": "*",
|
||||
"prettier": ">=3.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/eslint": {
|
||||
"optional": true
|
||||
},
|
||||
"eslint-config-prettier": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react": {
|
||||
|
@ -21698,16 +21685,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/glob-stream/node_modules/glob": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
|
||||
"integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
|
||||
"version": "7.2.3",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
|
||||
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
|
||||
"deprecated": "Glob versions prior to v9 are no longer supported",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
"minimatch": "^3.0.4",
|
||||
"minimatch": "^3.1.1",
|
||||
"once": "^1.3.0",
|
||||
"path-is-absolute": "^1.0.0"
|
||||
},
|
||||
|
@ -21731,9 +21718,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/glob-stream/node_modules/readable-stream": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
|
||||
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
|
@ -21744,15 +21731,6 @@
|
|||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/glob-stream/node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/glob-to-regexp": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
|
||||
|
@ -30033,15 +30011,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.0.tgz",
|
||||
"integrity": "sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==",
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
|
||||
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
|
@ -32262,9 +32240,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/rxjs/node_modules/tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/safe-buffer": {
|
||||
|
@ -33316,9 +33294,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/stream-shift": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz",
|
||||
"integrity": "sha512-Afuc4BKirbx0fwm9bKOehZPG01DJkm/4qbklw4lo9nMPqd2x0kZTLcgwQUXdGiPPY489l3w8cQ5xEEAGbg8ACQ==",
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz",
|
||||
"integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/streamsearch": {
|
||||
|
@ -34081,6 +34059,28 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/synckit": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz",
|
||||
"integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@pkgr/core": "^0.1.0",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.18.0 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/unts"
|
||||
}
|
||||
},
|
||||
"node_modules/synckit/node_modules/tslib": {
|
||||
"version": "2.6.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
|
||||
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tabbable": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.2.1.tgz",
|
||||
|
@ -34465,15 +34465,6 @@
|
|||
"xtend": "~4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/through2-filter/node_modules/xtend": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/thunky": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/thunky/-/thunky-1.0.2.tgz",
|
||||
|
|
|
@ -207,9 +207,9 @@
|
|||
"@electron/fuses": "1.5.0",
|
||||
"@electron/notarize": "2.1.0",
|
||||
"@formatjs/intl": "2.6.7",
|
||||
"@indutny/parallel-prettier": "3.0.0",
|
||||
"@indutny/rezip-electron": "1.3.1",
|
||||
"@indutny/symbolicate-mac": "2.3.0",
|
||||
"@mixer/parallel-prettier": "2.0.3",
|
||||
"@signalapp/mock-server": "6.6.0",
|
||||
"@storybook/addon-a11y": "8.1.11",
|
||||
"@storybook/addon-actions": "8.1.11",
|
||||
|
@ -317,7 +317,7 @@
|
|||
"pixelmatch": "5.3.0",
|
||||
"playwright": "1.45.0",
|
||||
"pngjs": "7.0.0",
|
||||
"prettier": "2.8.0",
|
||||
"prettier": "3.3.3",
|
||||
"protobufjs-cli": "1.1.1",
|
||||
"resedit": "2.0.2",
|
||||
"resolve-url-loader": "5.0.0",
|
||||
|
@ -349,6 +349,9 @@
|
|||
},
|
||||
"@types/react": "17.0.45",
|
||||
"@types/react-dom": "17.0.17",
|
||||
"eslint-config-airbnb-typescript-prettier": {
|
||||
"eslint-plugin-prettier": "5.2.1"
|
||||
},
|
||||
"fabric": {
|
||||
"canvas": "$nop",
|
||||
"jsdom": "$nop"
|
||||
|
|
|
@ -193,7 +193,7 @@ async function main() {
|
|||
].join('\n');
|
||||
|
||||
const prettierConfig = await prettier.resolveConfig(destinationPath);
|
||||
const output = prettier.format(unformattedOutput, {
|
||||
const output = await prettier.format(unformattedOutput, {
|
||||
...prettierConfig,
|
||||
filepath: destinationPath,
|
||||
});
|
||||
|
|
|
@ -12,8 +12,17 @@
|
|||
}
|
||||
/* Farsi (Persian) */
|
||||
&:lang(fa) {
|
||||
font-family: 'Vazirmatn', -apple-system, system-ui, BlinkMacSystemFont,
|
||||
'Segoe UI', Tahoma, 'Noto Sans Arabic', Helvetica, Arial, sans-serif;
|
||||
font-family:
|
||||
'Vazirmatn',
|
||||
-apple-system,
|
||||
system-ui,
|
||||
BlinkMacSystemFont,
|
||||
'Segoe UI',
|
||||
Tahoma,
|
||||
'Noto Sans Arabic',
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
}
|
||||
/* Urdu */
|
||||
&:lang(ur) {
|
||||
|
@ -316,7 +325,9 @@ $rtl-icon-map: (
|
|||
// Other
|
||||
|
||||
@mixin popper-shadow() {
|
||||
box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3), 0px 0px 8px rgba(0, 0, 0, 0.05);
|
||||
box-shadow:
|
||||
0px 8px 20px rgba(0, 0, 0, 0.3),
|
||||
0px 0px 8px rgba(0, 0, 0, 0.05);
|
||||
|
||||
@media (forced-colors: active) {
|
||||
border: 1px solid WindowText;
|
||||
|
|
|
@ -408,7 +408,9 @@ $message-padding-horizontal: 12px;
|
|||
background: transparent;
|
||||
border: 1px solid $color-gray-20;
|
||||
animation: module-message__select-checkbox--fadeIn 0.2s ease-out;
|
||||
transition: background 0.1s ease-out, border-color 0.1s ease-out;
|
||||
transition:
|
||||
background 0.1s ease-out,
|
||||
border-color 0.1s ease-out;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
|
@ -4024,8 +4026,12 @@ button.module-image__border-overlay:focus {
|
|||
line-height: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
transition: top 200ms linear, inset-inline-start 200ms linear,
|
||||
transform 200ms linear, width 200ms linear, height 200ms linear;
|
||||
transition:
|
||||
top 200ms linear,
|
||||
inset-inline-start 200ms linear,
|
||||
transform 200ms linear,
|
||||
width 200ms linear,
|
||||
height 200ms linear;
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
transition: none;
|
||||
|
@ -4295,7 +4301,9 @@ button.module-image__border-overlay:focus {
|
|||
backface-visibility: hidden;
|
||||
background-color: $color-gray-95;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.05), 0px 8px 20px rgba(0, 0, 0, 0.3);
|
||||
box-shadow:
|
||||
0px 0px 8px rgba(0, 0, 0, 0.05),
|
||||
0px 8px 20px rgba(0, 0, 0, 0.3);
|
||||
cursor: grab;
|
||||
height: 158px;
|
||||
position: fixed;
|
||||
|
|
|
@ -2,8 +2,18 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// Note: Add language-specific fallbacks in @localized-fonts mixin
|
||||
$inter: Inter, 'Source Sans Pro', 'Source Han Sans', -apple-system, system-ui,
|
||||
'Segoe UI', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
$inter:
|
||||
Inter,
|
||||
'Source Sans Pro',
|
||||
'Source Han Sans',
|
||||
-apple-system,
|
||||
system-ui,
|
||||
'Segoe UI',
|
||||
'Noto Sans',
|
||||
'Helvetica Neue',
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
|
||||
// Note: This font-family is checked for in matchMonospace, to support paste scenarios
|
||||
$monospace: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', Menlo,
|
||||
|
|
|
@ -53,7 +53,9 @@
|
|||
background: $color-gray-02;
|
||||
border-radius: 100%;
|
||||
bottom: 4px;
|
||||
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow:
|
||||
0px 4px 16px rgba(0, 0, 0, 0.12),
|
||||
0px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
height: 28px;
|
||||
justify-content: center;
|
||||
|
@ -75,7 +77,9 @@
|
|||
align-items: center;
|
||||
background-color: $color-white;
|
||||
border-radius: 100%;
|
||||
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow:
|
||||
0px 4px 16px rgba(0, 0, 0, 0.12),
|
||||
0px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
height: 24px;
|
||||
justify-content: center;
|
||||
|
|
|
@ -60,7 +60,9 @@
|
|||
align-items: center;
|
||||
background-color: $color-white;
|
||||
border-radius: 100%;
|
||||
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
box-shadow:
|
||||
0px 4px 16px rgba(0, 0, 0, 0.12),
|
||||
0px 2px 4px rgba(0, 0, 0, 0.2);
|
||||
display: none;
|
||||
height: 20px;
|
||||
justify-content: center;
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
.module-Button {
|
||||
@mixin focus-box-shadow($inner-color, $outer-color) {
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 1px $inner-color, 0 0 0 4px $outer-color;
|
||||
box-shadow:
|
||||
0 0 0 1px $inner-color,
|
||||
0 0 0 4px $outer-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,9 @@
|
|||
|
||||
@include keyboard-mode {
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 1px $color-gray-80, 0 0 0 3px $color-ultramarine !important;
|
||||
box-shadow:
|
||||
0 0 0 1px $color-gray-80,
|
||||
0 0 0 3px $color-ultramarine !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,7 +147,9 @@
|
|||
max-width: 64px;
|
||||
margin-inline: 10px;
|
||||
|
||||
transition: margin-inline-start 0.3s ease-out, opacity 0.3s ease-out;
|
||||
transition:
|
||||
margin-inline-start 0.3s ease-out,
|
||||
opacity 0.3s ease-out;
|
||||
@media (prefers-reduced-motion) {
|
||||
transition: none;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,9 @@
|
|||
&:focus {
|
||||
outline: none;
|
||||
@include keyboard-mode {
|
||||
box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-ultramarine;
|
||||
box-shadow:
|
||||
0 0 0 2px $color-white,
|
||||
0 0 0 4px $color-ultramarine;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,9 @@
|
|||
transition: opacity ease 200ms;
|
||||
|
||||
// The same box-shadow in popper-shadow mixin, just halved
|
||||
box-shadow: 0px 4px 10px rgba(0, 0, 0, 30%), 0px 0px 4px rgba(0, 0, 0, 5%);
|
||||
box-shadow:
|
||||
0px 4px 10px rgba(0, 0, 0, 30%),
|
||||
0px 0px 4px rgba(0, 0, 0, 5%);
|
||||
|
||||
@include light-theme() {
|
||||
background: $color-white;
|
||||
|
|
|
@ -156,7 +156,9 @@
|
|||
margin-inline-end: var(--button-spacing);
|
||||
min-width: $icon-size;
|
||||
padding: 2px;
|
||||
transition: margin-inline-end 200ms ease-out, opacity 200ms ease-out,
|
||||
transition:
|
||||
margin-inline-end 200ms ease-out,
|
||||
opacity 200ms ease-out,
|
||||
background 100ms ease-out;
|
||||
width: $icon-size;
|
||||
|
||||
|
|
|
@ -61,7 +61,9 @@
|
|||
}
|
||||
|
||||
.Inbox__logo__part--animated {
|
||||
transition: opacity 250ms, transform 250ms;
|
||||
transition:
|
||||
opacity 250ms,
|
||||
transform 250ms;
|
||||
}
|
||||
|
||||
@for $i from 1 through 16 {
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
align-items: center;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
box-shadow: 0 1px 4px $color-black-alpha-05, 0 10px 16px $color-black-alpha-20;
|
||||
box-shadow:
|
||||
0 1px 4px $color-black-alpha-05,
|
||||
0 10px 16px $color-black-alpha-20;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
padding-block: 3px;
|
||||
|
|
|
@ -204,12 +204,16 @@ $SafetyTipsModal__paddingBlock: 24px;
|
|||
&:focus {
|
||||
@include keyboard-mode {
|
||||
&::before {
|
||||
box-shadow: 0 0 0 2px $color-white, 0 0 0 4px $color-accent-blue;
|
||||
box-shadow:
|
||||
0 0 0 2px $color-white,
|
||||
0 0 0 4px $color-accent-blue;
|
||||
}
|
||||
}
|
||||
@include dark-keyboard-mode {
|
||||
&::before {
|
||||
box-shadow: 0 0 0 2px $color-gray-80, 0 0 0 4px $color-accent-blue;
|
||||
box-shadow:
|
||||
0 0 0 2px $color-gray-80,
|
||||
0 0 0 4px $color-accent-blue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
box-shadow: 0px 0px 2px $color-black-alpha-20,
|
||||
box-shadow:
|
||||
0px 0px 2px $color-black-alpha-20,
|
||||
0px 2px 6px $color-black-alpha-12;
|
||||
|
||||
@include light-theme {
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
|
||||
align-items: stretch;
|
||||
border-radius: $border-radius-px;
|
||||
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.05), 0px 4px 12px rgba(0, 0, 0, 0.3);
|
||||
box-shadow:
|
||||
0px 0px 4px rgba(0, 0, 0, 0.05),
|
||||
0px 4px 12px rgba(0, 0, 0, 0.3);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
user-select: none;
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
|
||||
width: 2px;
|
||||
border-radius: 2px;
|
||||
transition: height 250ms, background 250ms;
|
||||
transition:
|
||||
height 250ms,
|
||||
background 250ms;
|
||||
|
||||
&:not(:first-of-type) {
|
||||
margin-inline-start: 2px;
|
||||
|
|
|
@ -1137,9 +1137,8 @@ export class ConversationController {
|
|||
log.warn(
|
||||
`${logId}: Ensure that all V1 groups have new conversationId instead of old`
|
||||
);
|
||||
const groups = await this.getAllGroupsInvolvingServiceId(
|
||||
obsoleteServiceId
|
||||
);
|
||||
const groups =
|
||||
await this.getAllGroupsInvolvingServiceId(obsoleteServiceId);
|
||||
groups.forEach(group => {
|
||||
const members = group.get('members');
|
||||
const withoutObsolete = without(members, obsoleteId);
|
||||
|
|
|
@ -723,7 +723,7 @@ export function decryptProfile(data: Uint8Array, key: Uint8Array): Uint8Array {
|
|||
export function encryptProfileItemWithPadding(
|
||||
item: Uint8Array,
|
||||
profileKey: Uint8Array,
|
||||
paddedLengths: typeof PaddedLengths[keyof typeof PaddedLengths]
|
||||
paddedLengths: (typeof PaddedLengths)[keyof typeof PaddedLengths]
|
||||
): Uint8Array {
|
||||
const paddedLength = paddedLengths.find(
|
||||
(length: number) => item.byteLength <= length
|
||||
|
|
|
@ -136,7 +136,7 @@ const triggerEvents = function (
|
|||
function trigger<
|
||||
T extends Backbone.Events & {
|
||||
_events: undefined | Record<string, ReadonlyArray<InternalBackboneEvent>>;
|
||||
}
|
||||
},
|
||||
>(this: T, name: string, ...args: Array<unknown>): T {
|
||||
if (!this._events) return this;
|
||||
if (!eventsApi(this, name, args)) return this;
|
||||
|
|
|
@ -97,9 +97,8 @@ async function downloadBadgeImageFile(url: string): Promise<string> {
|
|||
}
|
||||
|
||||
const imageFileData = await server.getBadgeImageFile(url);
|
||||
const localPath = await window.Signal.Migrations.writeNewBadgeImageFileData(
|
||||
imageFileData
|
||||
);
|
||||
const localPath =
|
||||
await window.Signal.Migrations.writeNewBadgeImageFileData(imageFileData);
|
||||
|
||||
await DataWriter.badgeImageFileDownloaded(url, localPath);
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ const createActiveDirectCallProp = (
|
|||
hasRemoteVideo: boolean;
|
||||
presenting: boolean;
|
||||
title: string;
|
||||
}
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
|
|
|
@ -397,9 +397,8 @@ function CustomColorBubble({
|
|||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
||||
const conversations = await getConversationsWithCustomColor(
|
||||
colorId
|
||||
);
|
||||
const conversations =
|
||||
await getConversationsWithCustomColor(colorId);
|
||||
if (!conversations.length) {
|
||||
onDelete();
|
||||
} else {
|
||||
|
|
|
@ -506,7 +506,12 @@ export const CompositionArea = memo(function CompositionArea({
|
|||
) {
|
||||
inputApiRef.current.reset();
|
||||
}
|
||||
}, [messageCompositionId, sendCounter, previousMessageCompositionId, previousSendCounter]);
|
||||
}, [
|
||||
messageCompositionId,
|
||||
sendCounter,
|
||||
previousMessageCompositionId,
|
||||
previousSendCounter,
|
||||
]);
|
||||
|
||||
const insertEmoji = useCallback(
|
||||
(e: EmojiPickDataType) => {
|
||||
|
|
|
@ -129,7 +129,7 @@ export const ConfirmationDialog = React.memo(function ConfirmationDialogInner({
|
|||
<Button
|
||||
key={
|
||||
typeof action.text === 'string'
|
||||
? action.id ?? action.text
|
||||
? (action.id ?? action.text)
|
||||
: action.id
|
||||
}
|
||||
disabled={action.disabled || isSpinning}
|
||||
|
|
|
@ -23,7 +23,7 @@ export type PropsType = Readonly<{
|
|||
|
||||
const UNITS = ['seconds', 'minutes', 'hours', 'days', 'weeks'] as const;
|
||||
|
||||
export type Unit = typeof UNITS[number];
|
||||
export type Unit = (typeof UNITS)[number];
|
||||
|
||||
const UNIT_TO_SEC = new Map<Unit, number>([
|
||||
['seconds', 1],
|
||||
|
|
|
@ -26,7 +26,7 @@ const createAttachment = (
|
|||
contentType: stringToMIMEType(props.contentType ?? ''),
|
||||
fileName: props.fileName ?? '',
|
||||
screenshotPath: props.pending === false ? props.screenshotPath : undefined,
|
||||
url: props.pending === false ? props.url ?? '' : '',
|
||||
url: props.pending === false ? (props.url ?? '') : '',
|
||||
size: 3433,
|
||||
});
|
||||
|
||||
|
|
|
@ -637,7 +637,7 @@ function stableParticipantComparator(
|
|||
}
|
||||
|
||||
type ParticipantsInPageType<
|
||||
T extends { videoAspectRatio: number } = ParticipantTileType
|
||||
T extends { videoAspectRatio: number } = ParticipantTileType,
|
||||
> = {
|
||||
rows: Array<Array<T>>;
|
||||
numParticipants: number;
|
||||
|
|
|
@ -320,7 +320,7 @@ export function MediaEditor({
|
|||
const objectShortcuts: Array<
|
||||
[
|
||||
(ev: KeyboardEvent) => boolean,
|
||||
(obj: fabric.Object, ev: KeyboardEvent) => unknown
|
||||
(obj: fabric.Object, ev: KeyboardEvent) => unknown,
|
||||
]
|
||||
> = [
|
||||
[
|
||||
|
@ -1353,9 +1353,8 @@ export function MediaEditor({
|
|||
let data: Uint8Array;
|
||||
let blurHash: string;
|
||||
try {
|
||||
const renderFabricCanvas = await cloneFabricCanvas(
|
||||
fabricCanvas
|
||||
);
|
||||
const renderFabricCanvas =
|
||||
await cloneFabricCanvas(fabricCanvas);
|
||||
|
||||
renderFabricCanvas.remove(
|
||||
...renderFabricCanvas
|
||||
|
|
|
@ -6,7 +6,7 @@ import React from 'react';
|
|||
|
||||
export abstract class PureComponentProfiler<
|
||||
Props extends Record<string, unknown>,
|
||||
State extends Record<string, unknown>
|
||||
State extends Record<string, unknown>,
|
||||
> extends React.Component<Props, State> {
|
||||
public override shouldComponentUpdate(
|
||||
nextProps: Props,
|
||||
|
|
|
@ -70,7 +70,7 @@ const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
|||
i18n,
|
||||
safetyNumber:
|
||||
'safetyNumber' in overrideProps
|
||||
? overrideProps.safetyNumber ?? null
|
||||
? (overrideProps.safetyNumber ?? null)
|
||||
: {
|
||||
numberBlocks: generateNumberBlocks(),
|
||||
qrData: generateQRData(),
|
||||
|
|
|
@ -7,7 +7,7 @@ import classNames from 'classnames';
|
|||
import { getClassNamesFor } from '../util/getClassNamesFor';
|
||||
|
||||
export const SpinnerSvgSizes = ['small', 'normal'] as const;
|
||||
export type SpinnerSvgSize = typeof SpinnerSvgSizes[number];
|
||||
export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number];
|
||||
|
||||
export const SpinnerDirections = [
|
||||
'outgoing',
|
||||
|
@ -17,7 +17,7 @@ export const SpinnerDirections = [
|
|||
'on-progress-dialog',
|
||||
'on-avatar',
|
||||
] as const;
|
||||
export type SpinnerDirection = typeof SpinnerDirections[number];
|
||||
export type SpinnerDirection = (typeof SpinnerDirections)[number];
|
||||
|
||||
export type Props = {
|
||||
ariaLabel?: string;
|
||||
|
|
|
@ -5,7 +5,7 @@ import React from 'react';
|
|||
import classNames from 'classnames';
|
||||
|
||||
export const SpinnerSvgSizes = ['small', 'normal'] as const;
|
||||
export type SpinnerSvgSize = typeof SpinnerSvgSizes[number];
|
||||
export type SpinnerSvgSize = (typeof SpinnerSvgSizes)[number];
|
||||
|
||||
export type Props = {
|
||||
className?: string;
|
||||
|
|
|
@ -93,7 +93,8 @@ const BackgroundStyle = {
|
|||
},
|
||||
};
|
||||
|
||||
type BackgroundStyleType = typeof BackgroundStyle[keyof typeof BackgroundStyle];
|
||||
type BackgroundStyleType =
|
||||
(typeof BackgroundStyle)[keyof typeof BackgroundStyle];
|
||||
|
||||
function getBackground(
|
||||
bgStyle: BackgroundStyleType
|
||||
|
|
|
@ -269,7 +269,7 @@ function createCanvasAndContext({
|
|||
height,
|
||||
}: CreateCanvasAndContextOptionsType): [
|
||||
OffscreenCanvas,
|
||||
OffscreenCanvasRenderingContext2D
|
||||
OffscreenCanvasRenderingContext2D,
|
||||
] {
|
||||
const canvas = new OffscreenCanvas(
|
||||
PRINT_PIXEL_RATIO * width,
|
||||
|
|
|
@ -456,7 +456,7 @@ function HeaderContent({
|
|||
sharedGroupNames={sharedGroupNames}
|
||||
size={AvatarSize.THIRTY_TWO}
|
||||
// user may have stories, but we don't show that on Note to Self conversation
|
||||
storyRing={conversation.isMe ? undefined : hasStories ?? undefined}
|
||||
storyRing={conversation.isMe ? undefined : (hasStories ?? undefined)}
|
||||
theme={theme}
|
||||
title={conversation.title}
|
||||
unblurredAvatarUrl={conversation.unblurredAvatarUrl ?? undefined}
|
||||
|
|
|
@ -162,10 +162,10 @@ export const MessageStatuses = [
|
|||
'sent',
|
||||
'viewed',
|
||||
] as const;
|
||||
export type MessageStatusType = typeof MessageStatuses[number];
|
||||
export type MessageStatusType = (typeof MessageStatuses)[number];
|
||||
|
||||
export const Directions = ['incoming', 'outgoing'] as const;
|
||||
export type DirectionType = typeof Directions[number];
|
||||
export type DirectionType = (typeof Directions)[number];
|
||||
|
||||
export type AudioAttachmentProps = {
|
||||
renderingContext: string;
|
||||
|
|
|
@ -34,7 +34,7 @@ export const MessageStatuses = [
|
|||
'partial-sent',
|
||||
] as const;
|
||||
|
||||
export type MessageStatusType = typeof MessageStatuses[number];
|
||||
export type MessageStatusType = (typeof MessageStatuses)[number];
|
||||
|
||||
export type PropsData = Pick<
|
||||
ConversationType,
|
||||
|
|
|
@ -8,7 +8,7 @@ import { emojiToImage, getImagePath } from './lib';
|
|||
|
||||
export const EmojiSizes = [16, 18, 20, 24, 28, 32, 48, 64, 66] as const;
|
||||
|
||||
export type EmojiSizeType = typeof EmojiSizes[number];
|
||||
export type EmojiSizeType = (typeof EmojiSizes)[number];
|
||||
|
||||
export type OwnProps = {
|
||||
emoji?: string;
|
||||
|
|
|
@ -76,7 +76,7 @@ const categories = [
|
|||
'flag',
|
||||
] as const;
|
||||
|
||||
type Category = typeof categories[number];
|
||||
type Category = (typeof categories)[number];
|
||||
|
||||
export const EmojiPicker = React.memo(
|
||||
React.forwardRef<HTMLDivElement, Props>(
|
||||
|
|
|
@ -23,7 +23,7 @@ export type SmartContactRendererType<T extends string | JSX.Element> = (
|
|||
|
||||
type StringRendererType<
|
||||
T extends string | JSX.Element,
|
||||
ParamsByKeyType extends SelectParamsByKeyType<T> = SelectParamsByKeyType<T>
|
||||
ParamsByKeyType extends SelectParamsByKeyType<T> = SelectParamsByKeyType<T>,
|
||||
> = <Key extends keyof ParamsByKeyType>(
|
||||
id: Key,
|
||||
i18n: LocalizerType,
|
||||
|
|
|
@ -2375,9 +2375,8 @@ export async function initiateMigrationToGroupV2(
|
|||
|
||||
const { avatar: currentAvatar } = conversation.attributes;
|
||||
if (currentAvatar?.path) {
|
||||
const avatarData = await window.Signal.Migrations.readAttachmentData(
|
||||
currentAvatar
|
||||
);
|
||||
const avatarData =
|
||||
await window.Signal.Migrations.readAttachmentData(currentAvatar);
|
||||
const { hash, key } = await uploadAvatar({
|
||||
logId,
|
||||
publicParams,
|
||||
|
|
|
@ -24,7 +24,7 @@ import * as log from '../logging/log';
|
|||
*/
|
||||
export function useIntersectionObserver(): [
|
||||
(el?: Element | null) => void,
|
||||
IntersectionObserverEntry | null
|
||||
IntersectionObserverEntry | null,
|
||||
] {
|
||||
const [intersectionObserverEntry, setIntersectionObserverEntry] =
|
||||
useState<IntersectionObserverEntry | null>(null);
|
||||
|
|
|
@ -32,7 +32,7 @@ export const jobManagerJobSchema = z.object({
|
|||
|
||||
export type JobManagerParamsType<
|
||||
CoreJobType,
|
||||
JobType = CoreJobType & JobManagerJobType
|
||||
JobType = CoreJobType & JobManagerJobType,
|
||||
> = {
|
||||
markAllJobsInactive: () => Promise<void>;
|
||||
getNextJobs: (options: {
|
||||
|
|
|
@ -29,9 +29,8 @@ export async function addAttachmentToMessage(
|
|||
|
||||
try {
|
||||
if (attachment.path) {
|
||||
const loaded = await window.Signal.Migrations.loadAttachmentData(
|
||||
attachment
|
||||
);
|
||||
const loaded =
|
||||
await window.Signal.Migrations.loadAttachmentData(attachment);
|
||||
attachmentData = loaded.data;
|
||||
}
|
||||
|
||||
|
|
|
@ -271,9 +271,8 @@ const deleteSentProtoBatcher = createWaitBatcher({
|
|||
log.info(
|
||||
`MessageReceipts: Batching ${items.length} sent proto recipients deletes`
|
||||
);
|
||||
const { successfulPhoneNumberShares } = await deleteSentProtoRecipient(
|
||||
items
|
||||
);
|
||||
const { successfulPhoneNumberShares } =
|
||||
await deleteSentProtoRecipient(items);
|
||||
|
||||
for (const serviceId of successfulPhoneNumberShares) {
|
||||
const convo = window.ConversationController.get(serviceId);
|
||||
|
|
|
@ -3134,9 +3134,8 @@ export class ConversationModel extends window.Backbone
|
|||
return;
|
||||
}
|
||||
|
||||
const hadSession = await window.textsecure.storage.protocol.hasSessionWith(
|
||||
originalPni
|
||||
);
|
||||
const hadSession =
|
||||
await window.textsecure.storage.protocol.hasSessionWith(originalPni);
|
||||
|
||||
if (!hadSession) {
|
||||
log.info(`${logId}: not adding, no PNI session`);
|
||||
|
@ -3948,9 +3947,8 @@ export class ConversationModel extends window.Backbone
|
|||
if (!sendHQImages) {
|
||||
attachmentsToSend = await Promise.all(
|
||||
attachmentsToSend.map(async attachment => {
|
||||
const downscaledAttachment = await downscaleOutgoingAttachment(
|
||||
attachment
|
||||
);
|
||||
const downscaledAttachment =
|
||||
await downscaleOutgoingAttachment(attachment);
|
||||
if (downscaledAttachment !== attachment && attachment.path) {
|
||||
drop(deleteAttachmentData(attachment.path));
|
||||
}
|
||||
|
|
|
@ -2072,9 +2072,8 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
if (!messaging) {
|
||||
throw new Error(`${idLog}: messaging is not available`);
|
||||
}
|
||||
const response = await messaging.server.getSubscriptionConfiguration(
|
||||
userLanguages
|
||||
);
|
||||
const response =
|
||||
await messaging.server.getSubscriptionConfiguration(userLanguages);
|
||||
const boostBadgesByLevel = parseBoostBadgeListFromServer(
|
||||
response,
|
||||
updatesUrl
|
||||
|
|
|
@ -266,7 +266,7 @@ async function main() {
|
|||
}
|
||||
|
||||
const prettierConfig = await prettier.resolveConfig(destinationPath);
|
||||
const output = prettier.format(unformattedOutput, {
|
||||
const output = await prettier.format(unformattedOutput, {
|
||||
...prettierConfig,
|
||||
filepath: destinationPath,
|
||||
});
|
||||
|
|
|
@ -87,7 +87,7 @@ async function main(): Promise<void> {
|
|||
join(__dirname, '..', '..', 'build')
|
||||
);
|
||||
|
||||
const output = prettier.format(JSON.stringify(resources, null, 2), {
|
||||
const output = await prettier.format(JSON.stringify(resources, null, 2), {
|
||||
...prettierConfig,
|
||||
filepath: resourcesPath,
|
||||
});
|
||||
|
|
|
@ -81,7 +81,7 @@ async function main(): Promise<void> {
|
|||
);
|
||||
|
||||
{
|
||||
const output = prettier.format(JSON.stringify(jumbomoji, null, 2), {
|
||||
const output = await prettier.format(JSON.stringify(jumbomoji, null, 2), {
|
||||
...prettierConfig,
|
||||
filepath: manifestPath,
|
||||
});
|
||||
|
@ -89,7 +89,7 @@ async function main(): Promise<void> {
|
|||
}
|
||||
|
||||
{
|
||||
const output = prettier.format(JSON.stringify(resources, null, 2), {
|
||||
const output = await prettier.format(JSON.stringify(resources, null, 2), {
|
||||
...prettierConfig,
|
||||
filepath: resourcesPath,
|
||||
});
|
||||
|
|
|
@ -106,7 +106,7 @@ async function main() {
|
|||
delete typedValue.description;
|
||||
}
|
||||
delete json.smartling;
|
||||
const output = prettier.format(JSON.stringify(json, null, 2), {
|
||||
const output = await prettier.format(JSON.stringify(json, null, 2), {
|
||||
...prettierConfig,
|
||||
filepath: targetFile,
|
||||
});
|
||||
|
|
|
@ -153,9 +153,8 @@ export class MessageCache {
|
|||
|
||||
let messageAttributesFromDatabase: MessageAttributesType | undefined;
|
||||
try {
|
||||
messageAttributesFromDatabase = await DataReader.getMessageById(
|
||||
messageId
|
||||
);
|
||||
messageAttributesFromDatabase =
|
||||
await DataReader.getMessageById(messageId);
|
||||
} catch (err: unknown) {
|
||||
log.error(
|
||||
`MessageCache.resolveAttributes(${messageId}): db error ${Errors.toLogFormat(
|
||||
|
|
|
@ -385,10 +385,9 @@ export class BackupExportStream extends Readable {
|
|||
|
||||
try {
|
||||
while (!cursor?.done) {
|
||||
const { messages, cursor: newCursor } =
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const { messages, cursor: newCursor } = await DataReader.pageMessages(
|
||||
cursor
|
||||
);
|
||||
await DataReader.pageMessages(cursor);
|
||||
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const items = await pMap(
|
||||
|
|
|
@ -3386,9 +3386,8 @@ export class CallingClass {
|
|||
// https://bugs.chromium.org/p/chromium/issues/detail?id=1287628
|
||||
private async enumerateMediaDevices(): Promise<void> {
|
||||
try {
|
||||
const microphoneStatus = await window.IPC.getMediaAccessStatus(
|
||||
'microphone'
|
||||
);
|
||||
const microphoneStatus =
|
||||
await window.IPC.getMediaAccessStatus('microphone');
|
||||
if (microphoneStatus !== 'granted') {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2054,9 +2054,12 @@ export const storageServiceUploadJob = debounce(() => {
|
|||
return;
|
||||
}
|
||||
|
||||
void storageJobQueue(async () => {
|
||||
void storageJobQueue(
|
||||
async () => {
|
||||
await upload();
|
||||
}, `upload v${window.storage.get('manifestVersion')}`);
|
||||
},
|
||||
`upload v${window.storage.get('manifestVersion')}`
|
||||
);
|
||||
}, 500);
|
||||
|
||||
export const runStorageServiceSyncJob = debounce(() => {
|
||||
|
@ -2066,17 +2069,21 @@ export const runStorageServiceSyncJob = debounce(() => {
|
|||
}
|
||||
|
||||
ourProfileKeyService.blockGetWithPromise(
|
||||
storageJobQueue(async () => {
|
||||
storageJobQueue(
|
||||
async () => {
|
||||
await sync();
|
||||
|
||||
// Notify listeners about sync completion
|
||||
window.Whisper.events.trigger('storageService:syncComplete');
|
||||
}, `sync v${window.storage.get('manifestVersion')}`)
|
||||
},
|
||||
`sync v${window.storage.get('manifestVersion')}`
|
||||
)
|
||||
);
|
||||
}, 500);
|
||||
|
||||
export const addPendingDelete = (item: ExtendedStorageID): void => {
|
||||
void storageJobQueue(async () => {
|
||||
void storageJobQueue(
|
||||
async () => {
|
||||
const storedPendingDeletes = window.storage.get(
|
||||
'storage-service-pending-deletes',
|
||||
[]
|
||||
|
@ -2085,5 +2092,7 @@ export const addPendingDelete = (item: ExtendedStorageID): void => {
|
|||
...storedPendingDeletes,
|
||||
item,
|
||||
]);
|
||||
}, `addPendingDelete(${redactExtendedStorageID(item)})`);
|
||||
},
|
||||
`addPendingDelete(${redactExtendedStorageID(item)})`
|
||||
);
|
||||
};
|
||||
|
|
|
@ -1837,7 +1837,7 @@ export async function mergeStickerPackRecord(
|
|||
position:
|
||||
'position' in stickerPackRecord
|
||||
? stickerPackRecord.position
|
||||
: localStickerPack?.position ?? undefined,
|
||||
: (localStickerPack?.position ?? undefined),
|
||||
storageID,
|
||||
storageVersion,
|
||||
storageUnknownFields,
|
||||
|
|
|
@ -395,9 +395,8 @@ export async function resolveUsernameByLink({
|
|||
|
||||
strictAssert(window.textsecure.server, 'WebAPI must be available');
|
||||
try {
|
||||
const { usernameLinkEncryptedValue } = await server.resolveUsernameLink(
|
||||
serverId
|
||||
);
|
||||
const { usernameLinkEncryptedValue } =
|
||||
await server.resolveUsernameLink(serverId);
|
||||
|
||||
return usernames.decryptUsernameLink({
|
||||
entropy: Buffer.from(entropy),
|
||||
|
|
|
@ -687,9 +687,8 @@ function handleMessageJSON(
|
|||
async function getNewerMessagesByConversation(
|
||||
options: AdjacentMessagesByConversationOptionsType
|
||||
): Promise<Array<MessageType>> {
|
||||
const messages = await readableChannel.getNewerMessagesByConversation(
|
||||
options
|
||||
);
|
||||
const messages =
|
||||
await readableChannel.getNewerMessagesByConversation(options);
|
||||
|
||||
return handleMessageJSON(messages);
|
||||
}
|
||||
|
@ -709,9 +708,8 @@ async function getRecentStoryReplies(
|
|||
async function getOlderMessagesByConversation(
|
||||
options: AdjacentMessagesByConversationOptionsType
|
||||
): Promise<Array<MessageType>> {
|
||||
const messages = await readableChannel.getOlderMessagesByConversation(
|
||||
options
|
||||
);
|
||||
const messages =
|
||||
await readableChannel.getOlderMessagesByConversation(options);
|
||||
|
||||
return handleMessageJSON(messages);
|
||||
}
|
||||
|
@ -719,9 +717,8 @@ async function getOlderMessagesByConversation(
|
|||
async function getConversationRangeCenteredOnMessage(
|
||||
options: AdjacentMessagesByConversationOptionsType
|
||||
): Promise<GetConversationRangeCenteredOnMessageResultType<MessageType>> {
|
||||
const result = await readableChannel.getConversationRangeCenteredOnMessage(
|
||||
options
|
||||
);
|
||||
const result =
|
||||
await readableChannel.getConversationRangeCenteredOnMessage(options);
|
||||
|
||||
return {
|
||||
...result,
|
||||
|
|
|
@ -246,7 +246,7 @@ export const StickerPackStatuses = [
|
|||
'error',
|
||||
] as const;
|
||||
|
||||
export type StickerPackStatusType = typeof StickerPackStatuses[number];
|
||||
export type StickerPackStatusType = (typeof StickerPackStatuses)[number];
|
||||
|
||||
export type StorageServiceFieldsType = Readonly<{
|
||||
storageID?: string;
|
||||
|
|
|
@ -4896,10 +4896,8 @@ function getBackupCdnObjectMetadata(
|
|||
db: ReadableDB,
|
||||
mediaId: string
|
||||
): BackupCdnMediaObjectType | undefined {
|
||||
const [
|
||||
query,
|
||||
params,
|
||||
] = sql`SELECT * from backup_cdn_object_metadata WHERE mediaId = ${mediaId}`;
|
||||
const [query, params] =
|
||||
sql`SELECT * from backup_cdn_object_metadata WHERE mediaId = ${mediaId}`;
|
||||
|
||||
return db.prepare(query).get(params);
|
||||
}
|
||||
|
|
|
@ -95,10 +95,8 @@ export default function updateToSchemaVersion91(
|
|||
|
||||
// Grab PNI-specific count
|
||||
|
||||
const [
|
||||
beforeQuery,
|
||||
beforeParams,
|
||||
] = sql`SELECT count(*) from preKeys WHERE ourServiceId = ${pni}`;
|
||||
const [beforeQuery, beforeParams] =
|
||||
sql`SELECT count(*) from preKeys WHERE ourServiceId = ${pni}`;
|
||||
const beforeKeys = db.prepare(beforeQuery).pluck(true).get(beforeParams);
|
||||
logger.info(`updateToSchemaVersion91: Found ${beforeKeys} preKeys for PNI`);
|
||||
|
||||
|
|
|
@ -94,10 +94,8 @@ export function cleanKeys(
|
|||
}
|
||||
|
||||
// Grab PNI-specific count
|
||||
const [
|
||||
beforeQuery,
|
||||
beforeParams,
|
||||
] = sql`SELECT count(*) from ${tableName} WHERE ${idField} = ${pni}`;
|
||||
const [beforeQuery, beforeParams] =
|
||||
sql`SELECT count(*) from ${tableName} WHERE ${idField} = ${pni}`;
|
||||
const beforeKeys = db.prepare(beforeQuery).pluck(true).get(beforeParams);
|
||||
logger.info(`${logId}: Found ${beforeKeys} keys for PNI`);
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ export type QueryFragmentValue = QueryFragment | QueryTemplateParam;
|
|||
|
||||
export type QueryFragment = [
|
||||
{ fragment: string },
|
||||
ReadonlyArray<QueryTemplateParam>
|
||||
ReadonlyArray<QueryTemplateParam>,
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
@ -209,7 +209,9 @@ export type DBConversationType = ReadonlyDeep<{
|
|||
}>;
|
||||
|
||||
export const InteractionModes = ['mouse', 'keyboard'] as const;
|
||||
export type InteractionModeType = ReadonlyDeep<typeof InteractionModes[number]>;
|
||||
export type InteractionModeType = ReadonlyDeep<
|
||||
(typeof InteractionModes)[number]
|
||||
>;
|
||||
|
||||
export type MessageTimestamps = ReadonlyDeep<
|
||||
Pick<MessageAttributesType, 'sent_at' | 'received_at'>
|
||||
|
@ -227,7 +229,7 @@ export type MessageWithUIFieldsType = MessageAttributesType & {
|
|||
|
||||
export const ConversationTypes = ['direct', 'group'] as const;
|
||||
export type ConversationTypeType = ReadonlyDeep<
|
||||
typeof ConversationTypes[number]
|
||||
(typeof ConversationTypes)[number]
|
||||
>;
|
||||
|
||||
export type LastMessageType = ReadonlyDeep<
|
||||
|
|
|
@ -112,9 +112,8 @@ function allowsRepliesChanged(
|
|||
allowsReplies: boolean
|
||||
): ThunkAction<void, RootStateType, null, AllowRepliesChangedActionType> {
|
||||
return async dispatch => {
|
||||
const storyDistribution = await DataReader.getStoryDistributionWithMembers(
|
||||
listId
|
||||
);
|
||||
const storyDistribution =
|
||||
await DataReader.getStoryDistributionWithMembers(listId);
|
||||
|
||||
if (!storyDistribution) {
|
||||
log.warn(
|
||||
|
@ -208,9 +207,8 @@ function deleteDistributionList(
|
|||
return async (dispatch, getState) => {
|
||||
const deletedAtTimestamp = Date.now();
|
||||
|
||||
const storyDistribution = await DataReader.getStoryDistributionWithMembers(
|
||||
listId
|
||||
);
|
||||
const storyDistribution =
|
||||
await DataReader.getStoryDistributionWithMembers(listId);
|
||||
|
||||
if (!storyDistribution) {
|
||||
log.warn('No story distribution found for id', listId);
|
||||
|
@ -268,9 +266,8 @@ function hideMyStoriesFrom(
|
|||
memberServiceIds: Array<ServiceIdString>
|
||||
): ThunkAction<void, RootStateType, null, HideMyStoriesFromActionType> {
|
||||
return async dispatch => {
|
||||
const myStories = await DataReader.getStoryDistributionWithMembers(
|
||||
MY_STORY_ID
|
||||
);
|
||||
const myStories =
|
||||
await DataReader.getStoryDistributionWithMembers(MY_STORY_ID);
|
||||
|
||||
if (!myStories) {
|
||||
log.error(
|
||||
|
@ -317,9 +314,8 @@ function removeMembersFromDistributionList(
|
|||
return;
|
||||
}
|
||||
|
||||
const storyDistribution = await DataReader.getStoryDistributionWithMembers(
|
||||
listId
|
||||
);
|
||||
const storyDistribution =
|
||||
await DataReader.getStoryDistributionWithMembers(listId);
|
||||
|
||||
if (!storyDistribution) {
|
||||
log.warn(
|
||||
|
@ -388,9 +384,8 @@ function setMyStoriesToAllSignalConnections(): ThunkAction<
|
|||
ResetMyStoriesActionType
|
||||
> {
|
||||
return async dispatch => {
|
||||
const myStories = await DataReader.getStoryDistributionWithMembers(
|
||||
MY_STORY_ID
|
||||
);
|
||||
const myStories =
|
||||
await DataReader.getStoryDistributionWithMembers(MY_STORY_ID);
|
||||
|
||||
if (!myStories) {
|
||||
log.error(
|
||||
|
@ -428,9 +423,8 @@ function updateStoryViewers(
|
|||
memberServiceIds: Array<ServiceIdString>
|
||||
): ThunkAction<void, RootStateType, null, ViewersChangedActionType> {
|
||||
return async dispatch => {
|
||||
const storyDistribution = await DataReader.getStoryDistributionWithMembers(
|
||||
listId
|
||||
);
|
||||
const storyDistribution =
|
||||
await DataReader.getStoryDistributionWithMembers(listId);
|
||||
|
||||
if (!storyDistribution) {
|
||||
log.warn(
|
||||
|
|
|
@ -185,9 +185,8 @@ export const SmartCallsTab = memo(function SmartCallsTab() {
|
|||
if (callHistoryFilter == null) {
|
||||
return 0;
|
||||
}
|
||||
const count = await DataReader.getCallHistoryGroupsCount(
|
||||
callHistoryFilter
|
||||
);
|
||||
const count =
|
||||
await DataReader.getCallHistoryGroupsCount(callHistoryFilter);
|
||||
return count;
|
||||
},
|
||||
[allCallLinks, allConversations, regionCode]
|
||||
|
|
|
@ -73,7 +73,13 @@ export const SmartChatsTab = memo(function SmartChatsTab() {
|
|||
) {
|
||||
scrollToMessage(selectedConversationId, targetedMessageId);
|
||||
}
|
||||
}, [onConversationOpened, selectedConversationId, scrollToMessage, targetedMessageId, targetedMessageSource]);
|
||||
}, [
|
||||
onConversationOpened,
|
||||
selectedConversationId,
|
||||
scrollToMessage,
|
||||
targetedMessageId,
|
||||
targetedMessageSource,
|
||||
]);
|
||||
|
||||
const prevConversationId = usePrevious(
|
||||
selectedConversationId,
|
||||
|
|
|
@ -104,9 +104,8 @@ export const SmartInstallScreen = memo(function SmartInstallScreen() {
|
|||
const hasExpired = useSelector(hasExpiredSelector);
|
||||
|
||||
const chooseDeviceNamePromiseWrapperRef = useRef(explodePromise<string>());
|
||||
const chooseBackupFilePromiseWrapperRef = useRef(
|
||||
explodePromise<File | undefined>()
|
||||
);
|
||||
const chooseBackupFilePromiseWrapperRef =
|
||||
useRef(explodePromise<File | undefined>());
|
||||
|
||||
const [state, setState] = useState<StateType>(INITIAL_STATE);
|
||||
const [retryCounter, setRetryCounter] = useState(0);
|
||||
|
@ -223,8 +222,8 @@ export const SmartInstallScreen = memo(function SmartInstallScreen() {
|
|||
({ deviceName, backupData: backupFileData } = window.SignalCI);
|
||||
} else {
|
||||
deviceName = await chooseDeviceNamePromiseWrapperRef.current.promise;
|
||||
const backupFile = await chooseBackupFilePromiseWrapperRef.current
|
||||
.promise;
|
||||
const backupFile =
|
||||
await chooseBackupFilePromiseWrapperRef.current.promise;
|
||||
|
||||
backupFileData = backupFile ? await fileToBytes(backupFile) : undefined;
|
||||
}
|
||||
|
|
|
@ -235,7 +235,10 @@ describe('cleanDataForIpc', () => {
|
|||
class Person {
|
||||
public toBeDiscarded = Symbol('to be discarded');
|
||||
|
||||
constructor(public firstName: string, public lastName: string) {}
|
||||
constructor(
|
||||
public firstName: string,
|
||||
public lastName: string
|
||||
) {}
|
||||
|
||||
get name() {
|
||||
return this.getName();
|
||||
|
|
|
@ -107,9 +107,8 @@ describe('Attachments', () => {
|
|||
'Attachments_createWriterForNew'
|
||||
);
|
||||
|
||||
const outputPath = await Attachments.createWriterForNew(tempDirectory)(
|
||||
input
|
||||
);
|
||||
const outputPath =
|
||||
await Attachments.createWriterForNew(tempDirectory)(input);
|
||||
const output = await fse.readFile(path.join(tempDirectory, outputPath));
|
||||
|
||||
assert.lengthOf(outputPath, PATH_LENGTH);
|
||||
|
|
|
@ -32,7 +32,7 @@ const createMockElement = (
|
|||
({
|
||||
classList: new FakeTokenList([className]),
|
||||
dataset,
|
||||
} as unknown as HTMLElement);
|
||||
}) as unknown as HTMLElement;
|
||||
|
||||
const createMockAtMentionElement = (
|
||||
dataset: Record<string, string>
|
||||
|
|
|
@ -147,10 +147,9 @@ export class ParseContactsTransform extends Transform {
|
|||
);
|
||||
const hash = computeHash(data);
|
||||
|
||||
const local =
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const local = await window.Signal.Migrations.writeNewAttachmentData(
|
||||
avatarData
|
||||
);
|
||||
await window.Signal.Migrations.writeNewAttachmentData(avatarData);
|
||||
|
||||
const prepared = prepareContact(this.activeContact, {
|
||||
...this.activeContact.avatar,
|
||||
|
|
|
@ -436,9 +436,8 @@ export default class OutgoingMessage {
|
|||
destinationDeviceId
|
||||
);
|
||||
|
||||
const activeSession = await sessionStore.getSession(
|
||||
protocolAddress
|
||||
);
|
||||
const activeSession =
|
||||
await sessionStore.getSession(protocolAddress);
|
||||
if (!activeSession) {
|
||||
throw new Error(
|
||||
'OutgoingMessage.doSendMessage: No active session!'
|
||||
|
|
|
@ -25,7 +25,10 @@ class SyncRequestInner extends EventTarget {
|
|||
|
||||
timeoutMillis: number;
|
||||
|
||||
constructor(private receiver: MessageReceiver, timeoutMillis?: number) {
|
||||
constructor(
|
||||
private receiver: MessageReceiver,
|
||||
timeoutMillis?: number
|
||||
) {
|
||||
super();
|
||||
|
||||
if (!(receiver instanceof MessageReceiver)) {
|
||||
|
|
|
@ -2510,7 +2510,7 @@ export function initialize({
|
|||
}
|
||||
|
||||
async function _withNewCredentials<
|
||||
Result extends { uuid: AciString; deviceId?: number }
|
||||
Result extends { uuid: AciString; deviceId?: number },
|
||||
>(
|
||||
{ username: newUsername, password: newPassword }: WebAPICredentials,
|
||||
callback: () => Promise<Result>
|
||||
|
|
|
@ -243,7 +243,10 @@ export type WebSocketResourceOptions = {
|
|||
};
|
||||
|
||||
export class CloseEvent extends Event {
|
||||
constructor(public readonly code: number, public readonly reason: string) {
|
||||
constructor(
|
||||
public readonly code: number,
|
||||
public readonly reason: string
|
||||
) {
|
||||
super('close');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ export type CachedAuthType = Readonly<{
|
|||
}>;
|
||||
|
||||
export abstract class CDSBase<
|
||||
Options extends CDSBaseOptionsType = CDSBaseOptionsType
|
||||
Options extends CDSBaseOptionsType = CDSBaseOptionsType,
|
||||
> {
|
||||
protected readonly logger: LoggerType;
|
||||
protected proxyAgent?: ProxyAgent;
|
||||
|
|
|
@ -39,7 +39,7 @@ const E164_BYTE_SIZE = 8;
|
|||
const TRIPLE_BYTE_SIZE = UUID_BYTE_SIZE * 2 + E164_BYTE_SIZE;
|
||||
|
||||
export abstract class CDSSocketBase<
|
||||
Options extends CDSSocketBaseOptionsType = CDSSocketBaseOptionsType
|
||||
Options extends CDSSocketBaseOptionsType = CDSSocketBaseOptionsType,
|
||||
> extends EventEmitter {
|
||||
protected state = CDSSocketState.Open;
|
||||
|
||||
|
|
|
@ -39,11 +39,14 @@ export type CDSSocketManagerBaseOptionsType = Readonly<{
|
|||
|
||||
export abstract class CDSSocketManagerBase<
|
||||
Socket extends CDSSocketBase,
|
||||
Options extends CDSSocketManagerBaseOptionsType
|
||||
Options extends CDSSocketManagerBaseOptionsType,
|
||||
> extends CDSBase<Options> {
|
||||
private retryAfter?: number;
|
||||
|
||||
constructor(private readonly libsignalNet: Net.Net, options: Options) {
|
||||
constructor(
|
||||
private readonly libsignalNet: Net.Net,
|
||||
options: Options
|
||||
) {
|
||||
super(options);
|
||||
}
|
||||
|
||||
|
|
|
@ -113,7 +113,10 @@ export class EnvelopeQueuedEvent extends Event {
|
|||
export type ConfirmCallback = () => void;
|
||||
|
||||
export class ConfirmableEvent extends Event {
|
||||
constructor(type: string, public readonly confirm: ConfirmCallback) {
|
||||
constructor(
|
||||
type: string,
|
||||
public readonly confirm: ConfirmCallback
|
||||
) {
|
||||
super(type);
|
||||
}
|
||||
}
|
||||
|
@ -205,7 +208,10 @@ export type SentEventData = Readonly<{
|
|||
}>;
|
||||
|
||||
export class SentEvent extends ConfirmableEvent {
|
||||
constructor(public readonly data: SentEventData, confirm: ConfirmCallback) {
|
||||
constructor(
|
||||
public readonly data: SentEventData,
|
||||
confirm: ConfirmCallback
|
||||
) {
|
||||
super('sent', confirm);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,9 +49,9 @@ export type ContactAvatarType =
|
|||
hash?: string;
|
||||
};
|
||||
|
||||
type GroupAvatarIconType = typeof GroupAvatarIcons[number];
|
||||
type GroupAvatarIconType = (typeof GroupAvatarIcons)[number];
|
||||
|
||||
type PersonalAvatarIconType = typeof PersonalAvatarIcons[number];
|
||||
type PersonalAvatarIconType = (typeof PersonalAvatarIcons)[number];
|
||||
|
||||
export type AvatarIconType = GroupAvatarIconType | PersonalAvatarIconType;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ export namespace BodyRange {
|
|||
return ('url' as const) in node;
|
||||
}
|
||||
export function isDisplayOnly<
|
||||
T extends Mention | Link | Formatting | DisplayOnly
|
||||
T extends Mention | Link | Formatting | DisplayOnly,
|
||||
>(node: T): node is T & DisplayOnly {
|
||||
// satisfies keyof DisplayOnly
|
||||
return ('displayStyle' as const) in node;
|
||||
|
|
|
@ -82,7 +82,7 @@ export type ActiveDirectCallType = ActiveCallBaseType & {
|
|||
// GroupCallRemoteParticipantType below (which is based on
|
||||
// ConversationType).
|
||||
serviceId?: ServiceIdString;
|
||||
}
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ export const ContactNameColors = [
|
|||
'110',
|
||||
];
|
||||
|
||||
export type ContactNameColorType = typeof ContactNameColors[number];
|
||||
export type ContactNameColorType = (typeof ContactNameColors)[number];
|
||||
|
||||
export type CustomColorType = {
|
||||
start: { hue: number; saturation: number };
|
||||
|
@ -164,10 +164,10 @@ export type CustomColorType = {
|
|||
deg?: number;
|
||||
};
|
||||
|
||||
export type AvatarColorType = typeof AvatarColors[number];
|
||||
export type AvatarColorType = (typeof AvatarColors)[number];
|
||||
|
||||
export type ConversationColorType =
|
||||
| typeof ConversationColors[number]
|
||||
| (typeof ConversationColors)[number]
|
||||
| 'custom';
|
||||
|
||||
export type CustomColorDataType = {
|
||||
|
|
|
@ -40,7 +40,7 @@ export type LocalizerType = {
|
|||
? [params?: undefined, options?: LocalizerOptions]
|
||||
: [
|
||||
params: ICUStringMessageParamsByKeyType[Key],
|
||||
options?: LocalizerOptions
|
||||
options?: LocalizerOptions,
|
||||
]
|
||||
): string;
|
||||
getIntl(): IntlShape;
|
||||
|
@ -69,13 +69,13 @@ export enum ScrollBehavior {
|
|||
type InternalAssertProps<
|
||||
Result,
|
||||
Value,
|
||||
Missing = Omit<Result, keyof Value>
|
||||
Missing = Omit<Result, keyof Value>,
|
||||
> = keyof Missing extends never
|
||||
? Result
|
||||
: Result & {
|
||||
[key in keyof Required<Missing>]: [
|
||||
never,
|
||||
'AssertProps: missing property'
|
||||
'AssertProps: missing property',
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -87,10 +87,8 @@ export type BytesToStrings<Value> = Value extends Uint8Array
|
|||
? string
|
||||
: { [Key in keyof Value]: BytesToStrings<Value[Key]> };
|
||||
|
||||
export type JSONWithUnknownFields<Value> = Value extends Record<
|
||||
string | symbol | number,
|
||||
unknown
|
||||
>
|
||||
export type JSONWithUnknownFields<Value> =
|
||||
Value extends Record<string | symbol | number, unknown>
|
||||
? Readonly<
|
||||
{
|
||||
[Key in keyof Value]: JSONWithUnknownFields<Value[Key]>;
|
||||
|
|
|
@ -61,9 +61,8 @@ export async function updateConversationsWithUuidLookup({
|
|||
// and if not - drop it.
|
||||
let finalServiceId = finalConversation.getServiceId();
|
||||
if (!pairFromServer && finalServiceId) {
|
||||
const doesAccountExist = await server.checkAccountExistence(
|
||||
finalServiceId
|
||||
);
|
||||
const doesAccountExist =
|
||||
await server.checkAccountExistence(finalServiceId);
|
||||
if (!doesAccountExist) {
|
||||
finalConversation.updateServiceId(undefined);
|
||||
finalServiceId = undefined;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export async function awaitObject<
|
||||
Result extends { [key: string]: unknown }
|
||||
Result extends { [key: string]: unknown },
|
||||
>(settings: {
|
||||
[key in keyof Result]: Promise<Result[key]>;
|
||||
}): Promise<Result> {
|
||||
|
|
|
@ -106,9 +106,8 @@ export function createIdenticon(
|
|||
}
|
||||
|
||||
const data = new Uint8Array(arrayBuffer);
|
||||
const path = await window.Signal.Migrations.writeNewPlaintextTempData(
|
||||
data
|
||||
);
|
||||
const path =
|
||||
await window.Signal.Migrations.writeNewPlaintextTempData(data);
|
||||
resolve({ url, path });
|
||||
});
|
||||
reader.readAsArrayBuffer(blob);
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
export type NullToUndefined<T> = Extract<T, null> extends never
|
||||
? T
|
||||
: Exclude<T, null> | undefined;
|
||||
export type NullToUndefined<T> =
|
||||
Extract<T, null> extends never ? T : Exclude<T, null> | undefined;
|
||||
|
||||
export function dropNull<T>(
|
||||
value: NonNullable<T> | null | undefined
|
||||
|
|
|
@ -26,7 +26,7 @@ export type EncryptLegacyAttachmentOptionsType = Readonly<{
|
|||
}>;
|
||||
|
||||
export async function encryptLegacyAttachment<
|
||||
T extends Partial<AddressableAttachmentType>
|
||||
T extends Partial<AddressableAttachmentType>,
|
||||
>(attachment: T, options: EncryptLegacyAttachmentOptionsType): Promise<T> {
|
||||
// Not downloaded
|
||||
if (!attachment.path) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
export function makeEnumParser<
|
||||
TEnumKey extends string,
|
||||
TEnumValue extends string
|
||||
TEnumValue extends string,
|
||||
>(
|
||||
enumToParse: Record<TEnumKey, TEnumValue>,
|
||||
defaultValue: TEnumValue
|
||||
|
|
|
@ -95,9 +95,8 @@ export async function getSendOptions(
|
|||
|
||||
const { e164, serviceId } = conversationAttrs;
|
||||
|
||||
const senderCertificate = await getSenderCertificateForDirectConversation(
|
||||
conversationAttrs
|
||||
);
|
||||
const senderCertificate =
|
||||
await getSenderCertificateForDirectConversation(conversationAttrs);
|
||||
|
||||
// If we've never fetched user's profile, we default to what we have
|
||||
if (sealedSender === SEALED_SENDER.UNKNOWN || story) {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue