Compare commits

..

9 Commits

Author SHA1 Message Date
schlagmichdoch
43824d0de2 increase version to v1.7.7 2023-08-10 17:09:51 +02:00
schlagmichdoch
2efb531765 Merge pull request #138
Bump express-rate-limit from 6.8.0 to 6.9.0
2023-08-10 17:06:22 +02:00
schlagmichdoch
d9686a6706 Merge pull request #137 from Zhongbing-Chen/master
revise the command line tool
2023-08-10 16:31:48 +02:00
dependabot[bot]
395c3e00a4 Bump express-rate-limit from 6.8.0 to 6.9.0
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.8.0 to 6.9.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.8.0...v6.9.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 04:24:11 +00:00
zhongbing
8869c3c27e revise the command line tool 2023-08-06 00:47:01 +08:00
schlagmichdoch
b07b8316ff Merge pull request #129 from schlagmichdoch/dependabot/npm_and_yarn/express-rate-limit-6.8.0
Bump express-rate-limit from 6.7.0 to 6.8.0
2023-07-25 18:58:11 +02:00
dependabot[bot]
445a295404 Bump express-rate-limit from 6.7.0 to 6.8.0
Bumps [express-rate-limit](https://github.com/express-rate-limit/express-rate-limit) from 6.7.0 to 6.8.0.
- [Release notes](https://github.com/express-rate-limit/express-rate-limit/releases)
- [Changelog](https://github.com/express-rate-limit/express-rate-limit/blob/main/changelog.md)
- [Commits](https://github.com/express-rate-limit/express-rate-limit/compare/v6.7.0...v6.8.0)

---
updated-dependencies:
- dependency-name: express-rate-limit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-24 04:58:27 +00:00
schlagmichdoch
29b91cb17a increase version to v1.7.6 2023-06-01 01:51:51 +02:00
schlagmichdoch
26bf4d6dc3 ensure that otherPeers never receive peer-left after peer-joined on reconnect by leaving room before rejoining it 2023-06-01 01:49:07 +02:00
8 changed files with 39 additions and 20 deletions

View File

@@ -362,6 +362,11 @@ class PairDropServer {
_joinRoom(peer, roomType = 'ip', roomSecret = '') {
const room = roomType === 'ip' ? peer.ip : roomSecret;
if (this._rooms[room] && this._rooms[room][peer.id]) {
// ensures that otherPeers never receive `peer-left` after `peer-joined` on reconnect.
this._leaveRoom(peer, roomType, roomSecret);
}
// if room doesn't exist, create it
if (!this._rooms[room]) {
this._rooms[room] = {};

20
package-lock.json generated
View File

@@ -1,16 +1,16 @@
{
"name": "pairdrop",
"version": "1.7.5",
"version": "1.7.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "pairdrop",
"version": "1.7.5",
"version": "1.7.7",
"license": "ISC",
"dependencies": {
"express": "^4.18.2",
"express-rate-limit": "^6.7.0",
"express-rate-limit": "^6.9.0",
"ua-parser-js": "^1.0.35",
"unique-names-generator": "^4.3.0",
"ws": "^8.13.0"
@@ -204,11 +204,11 @@
}
},
"node_modules/express-rate-limit": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.7.0.tgz",
"integrity": "sha512-vhwIdRoqcYB/72TK3tRZI+0ttS8Ytrk24GfmsxDXK9o9IhHNO5bXRiXQSExPQ4GbaE5tvIS7j1SGrxsuWs+sGA==",
"version": "6.9.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.9.0.tgz",
"integrity": "sha512-AnISR3V8qy4gpKM62/TzYdoFO9NV84fBx0POXzTryHU/qGUJBWuVGd+JhbvtVmKBv37t8/afmqdnv16xWoQxag==",
"engines": {
"node": ">= 12.9.0"
"node": ">= 14.0.0"
},
"peerDependencies": {
"express": "^4 || ^5"
@@ -801,9 +801,9 @@
}
},
"express-rate-limit": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.7.0.tgz",
"integrity": "sha512-vhwIdRoqcYB/72TK3tRZI+0ttS8Ytrk24GfmsxDXK9o9IhHNO5bXRiXQSExPQ4GbaE5tvIS7j1SGrxsuWs+sGA==",
"version": "6.9.0",
"resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.9.0.tgz",
"integrity": "sha512-AnISR3V8qy4gpKM62/TzYdoFO9NV84fBx0POXzTryHU/qGUJBWuVGd+JhbvtVmKBv37t8/afmqdnv16xWoQxag==",
"requires": {}
},
"finalhandler": {

View File

@@ -1,6 +1,6 @@
{
"name": "pairdrop",
"version": "1.7.5",
"version": "1.7.7",
"description": "",
"main": "index.js",
"scripts": {
@@ -11,7 +11,7 @@
"license": "ISC",
"dependencies": {
"express": "^4.18.2",
"express-rate-limit": "^6.7.0",
"express-rate-limit": "^6.9.0",
"ua-parser-js": "^1.0.35",
"unique-names-generator": "^4.3.0",
"ws": "^8.13.0"

View File

@@ -38,7 +38,10 @@ openPairDrop()
else
xdg-open "$url"
fi
exit
}
setOs()
@@ -98,13 +101,19 @@ sendFiles()
[[ -a "$zipPath" ]] && echo "Cannot overwrite $zipPath. Please remove first." && exit
if [[ -d $path ]]; then
zipPathTemp="temp_${zipPath}"
zipPathTemp="${path}_pairdrop_temp.zip"
[[ -a "$zipPathTemp" ]] && echo "Cannot overwrite $zipPathTemp. Please remove first." && exit
echo "Processing directory..."
# Create zip files temporarily to send directory
zip -q -b /tmp/ -r "$zipPath" "$path"
zip -q -b /tmp/ "$zipPathTemp" "$zipPath"
if [[ $OS == "Windows" ]];then
powershell.exe -Command "Compress-Archive -Path ${path} -DestinationPath ${zipPath}"
echo "Compress-Archive -Path ${zipPath} -DestinationPath ${zipPathTemp}"
powershell.exe -Command "Compress-Archive -Path ${zipPath} -DestinationPath ${zipPathTemp}"
else
zip -q -b /tmp/ -r "$zipPath" "$path"
zip -q -b /tmp/ "$zipPathTemp" "$zipPath"
fi
if [[ $OS == "Mac" ]];then
hash=$(base64 -i "$zipPathTemp")
@@ -118,8 +127,12 @@ sendFiles()
echo "Processing file..."
# Create zip file temporarily to send file
zip -q -b /tmp/ "$zipPath" "$path"
if [[ $OS == "Windows" ]];then
powershell.exe -Command "Compress-Archive -Path ${path} -DestinationPath ${zipPath} -CompressionLevel Optimal"
else
zip -q -b /tmp/ "$zipPath" "$path"
fi
if [[ $OS == "Mac" ]];then
hash=$(base64 -i "$zipPath")
else
@@ -142,6 +155,7 @@ sendFiles()
hash=
fi
openPairDrop
exit
}

View File

@@ -278,7 +278,7 @@
</svg>
<div class="title-wrapper">
<h1>PairDrop</h1>
<div class="font-subheading">v1.7.5</div>
<div class="font-subheading">v1.7.7</div>
</div>
<div class="font-subheading">The easiest way to transfer files across devices</div>
<div class="row">

View File

@@ -1,4 +1,4 @@
const cacheVersion = 'v1.7.5';
const cacheVersion = 'v1.7.7';
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
const urlsToCache = [
'index.html',

View File

@@ -281,7 +281,7 @@
</svg>
<div class="title-wrapper">
<h1>PairDrop</h1>
<div class="font-subheading">v1.7.5</div>
<div class="font-subheading">v1.7.7</div>
</div>
<div class="font-subheading">The easiest way to transfer files across devices</div>
<div class="row">

View File

@@ -1,4 +1,4 @@
const cacheVersion = 'v1.7.5';
const cacheVersion = 'v1.7.7';
const cacheTitle = `pairdrop-included-ws-fallback-cache-${cacheVersion}`;
const urlsToCache = [
'index.html',