store-s3-aws 1.3.12 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/send-npm.sh +5 -13
- package/src/AwsS3Store.js +3 -0
package/package.json
CHANGED
package/send-npm.sh
CHANGED
|
@@ -1,24 +1,16 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
echo "🔐 Verificando autenticação npm..."
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
trap cleanup EXIT
|
|
10
|
-
|
|
11
|
-
if [ -z "$NPM_TOKEN" ]; then
|
|
12
|
-
echo "❌ NPM_TOKEN não definido"
|
|
13
|
-
exit 1
|
|
6
|
+
if ! npm whoami >/dev/null 2>&1; then
|
|
7
|
+
echo "🌐 Você não está logado. Iniciando login via browser..."
|
|
8
|
+
npm login
|
|
14
9
|
fi
|
|
15
10
|
|
|
16
|
-
echo "🔑 Configurando token..."
|
|
17
|
-
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
|
|
18
|
-
|
|
19
11
|
echo "🔍 Validando autenticação..."
|
|
20
12
|
npm whoami >/dev/null 2>&1 || {
|
|
21
|
-
echo "❌
|
|
13
|
+
echo "❌ Falha na autenticação"
|
|
22
14
|
exit 1
|
|
23
15
|
}
|
|
24
16
|
|
package/src/AwsS3Store.js
CHANGED
|
@@ -50,6 +50,7 @@ class AwsS3Store {
|
|
|
50
50
|
|
|
51
51
|
async save(options) {
|
|
52
52
|
this.debugLog('[METHOD: save] Triggered.');
|
|
53
|
+
this.debugLog(`Options: ${JSON.stringify(options, null, 2)}`);
|
|
53
54
|
|
|
54
55
|
const fileName = path.basename(options.session)
|
|
55
56
|
const remoteFilePath = path.join(this.remoteDataPath, `${fileName}.zip`).replace(/\\/g, '/');
|
|
@@ -76,6 +77,8 @@ class AwsS3Store {
|
|
|
76
77
|
async extract(options) {
|
|
77
78
|
this.debugLog('[METHOD: extract] Triggered.');
|
|
78
79
|
|
|
80
|
+
this.debugLog(`Options: ${JSON.stringify(options, null, 2)}`);
|
|
81
|
+
|
|
79
82
|
const remoteFilePath = path.join(this.remoteDataPath, `${options.session}.zip`).replace(/\\/g, '/');
|
|
80
83
|
const params = {
|
|
81
84
|
Bucket: this.bucketName,
|