gcf-common-lib 0.25.37 → 0.25.38
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.js +1 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -126,6 +126,7 @@ class GcfCommon {
|
|
|
126
126
|
const everyPropIsNil = props.map(prop => (0, lodash_1.get)(metaOrAttr, prop)).every(v => (0, lodash_1.isNil)(v));
|
|
127
127
|
// if no prop then check file metadata
|
|
128
128
|
if (everyPropIsNil && ((_a = context === null || context === void 0 ? void 0 : context.resource) === null || _a === void 0 ? void 0 : _a.type) === 'storage#object') {
|
|
129
|
+
console.log('get metadata from file');
|
|
129
130
|
if ((context === null || context === void 0 ? void 0 : context.eventType) === 'google.storage.object.finalize') {
|
|
130
131
|
const gsEvent = event;
|
|
131
132
|
const [meta] = yield exports.storage.bucket(gsEvent.bucket).file(gsEvent.name).getMetadata();
|
package/src/index.ts
CHANGED
|
@@ -113,6 +113,7 @@ export class GcfCommon {
|
|
|
113
113
|
|
|
114
114
|
// if no prop then check file metadata
|
|
115
115
|
if (everyPropIsNil && context?.resource?.type === 'storage#object') {
|
|
116
|
+
console.log('get metadata from file');
|
|
116
117
|
if (context?.eventType === 'google.storage.object.finalize') {
|
|
117
118
|
const gsEvent = event as TGSEvent;
|
|
118
119
|
const [meta] = await storage.bucket(gsEvent.bucket).file(gsEvent.name).getMetadata();
|