powr-sdk-api 4.5.7 → 4.5.8
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/dist/config.js +10 -0
- package/dist/services/uploadToGCS.js +9 -0
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -20,6 +20,16 @@ const credentials = {
|
|
|
20
20
|
auth_provider_x509_cert_url: process.env.GOOGLE_CLOUD_AUTH_PROVIDER_X509_CERT_URL,
|
|
21
21
|
client_x509_cert_url: process.env.GOOGLE_CLOUD_CLIENT_X509_CERT_URL
|
|
22
22
|
};
|
|
23
|
+
console.log('Configuration loaded............:', {
|
|
24
|
+
mongoUri: config.mongoUri ? '***REDACTED***' : 'NOT SET',
|
|
25
|
+
jwtToken: config.jwtToken ? '***REDACTED***' : 'NOT SET',
|
|
26
|
+
projectId: config.projectId,
|
|
27
|
+
storageBucket: config.storageBucket,
|
|
28
|
+
credentials: credentials ? {
|
|
29
|
+
client_email: credentials.client_email,
|
|
30
|
+
private_key_length: credentials.private_key ? credentials.private_key.length : 0
|
|
31
|
+
} : null
|
|
32
|
+
});
|
|
23
33
|
module.exports = {
|
|
24
34
|
config,
|
|
25
35
|
credentials
|
|
@@ -14,6 +14,15 @@ const storage = new Storage({
|
|
|
14
14
|
projectId: config.projectId,
|
|
15
15
|
credentials: credentials
|
|
16
16
|
});
|
|
17
|
+
const safeCredentials = credentials ? {
|
|
18
|
+
client_email: credentials.client_email,
|
|
19
|
+
private_key_length: credentials.private_key ? credentials.private_key.length : 0
|
|
20
|
+
} : null;
|
|
21
|
+
console.log('GCS Storage created:', {
|
|
22
|
+
projectId: config.projectId,
|
|
23
|
+
credentials: safeCredentials,
|
|
24
|
+
storageInstanceType: typeof storage
|
|
25
|
+
});
|
|
17
26
|
const bucketName = config.storageBucket;
|
|
18
27
|
const bucket = storage.bucket(bucketName);
|
|
19
28
|
console.log('Bucket:', bucketName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powr-sdk-api",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.8",
|
|
4
4
|
"description": "Shared API core library for PowrStack projects. Zero dependencies - works with Express, Next.js API routes, and other frameworks. All features are optional and install only what you need.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|