gcf-common-lib 0.40.0 → 0.41.0
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/src/index.ts +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gcf-common-lib",
|
|
3
3
|
"description": "Common helpers for Google Cloud Functions: Pub/Sub publishing, Mongo helpers, and utilities for Node 20+ (TypeScript).",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.41.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
7
7
|
"branches": [
|
package/src/index.ts
CHANGED
|
@@ -47,11 +47,11 @@ export const GcfCommon = {
|
|
|
47
47
|
return asyncHandler({ ...payload })
|
|
48
48
|
.then(async res => {
|
|
49
49
|
// console.log('res:', res);
|
|
50
|
-
await GcfCommon.response({ ...payload }, res as T).catch(
|
|
50
|
+
await GcfCommon.response({ ...payload }, res as T).catch(console.log);
|
|
51
51
|
return res;
|
|
52
52
|
})
|
|
53
53
|
.catch(async (error: Error) => {
|
|
54
|
-
await GcfCommon.response({ ...payload }, GcfCommon.buildResponse(error), { error: '1' }).catch(
|
|
54
|
+
await GcfCommon.response({ ...payload }, GcfCommon.buildResponse(error), { error: '1' }).catch(console.log);
|
|
55
55
|
throw error;
|
|
56
56
|
});
|
|
57
57
|
},
|
|
@@ -166,7 +166,7 @@ export const GcfCommon = {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
|
|
169
|
+
console.log('metadataOrAttribute:', metadataOrAttribute);
|
|
170
170
|
|
|
171
171
|
return metadataOrAttribute ?? {};
|
|
172
172
|
},
|