Compare commits

..

7 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
7 changed files with 34 additions and 20 deletions

20
package-lock.json generated
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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