@genoacms/adapter-gcp 0.7.8 → 0.7.9
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.
@@ -55,7 +55,13 @@ const listDirectory = async ({ bucket, name }, listingParams = {}) => {
|
|
55
55
|
lastModified: new Date(file.metadata.updated)
|
56
56
|
};
|
57
57
|
}),
|
58
|
-
directories: (apiResponse?.prefixes ?? []).filter((item) => item !== name).map(i =>
|
58
|
+
directories: (apiResponse?.prefixes ?? []).filter((item) => item !== name).map(i => {
|
59
|
+
const object = {
|
60
|
+
bucket,
|
61
|
+
name: i
|
62
|
+
};
|
63
|
+
return object;
|
64
|
+
})
|
59
65
|
};
|
60
66
|
};
|
61
67
|
const createDirectory = async ({ bucket, name }) => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@genoacms/adapter-gcp",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.9",
|
4
4
|
"type": "module",
|
5
5
|
"description": "Implementation of abstraction layer of GenoaCMS for GCP",
|
6
6
|
"repository": {
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"provenance": true
|
21
21
|
},
|
22
22
|
"dependencies": {
|
23
|
-
"@genoacms/cloudabstraction": "^0.7.
|
23
|
+
"@genoacms/cloudabstraction": "^0.7.9",
|
24
24
|
"@google-cloud/firestore": "^7.1.0",
|
25
25
|
"@google-cloud/functions": "^3.4.0",
|
26
26
|
"@google-cloud/resource-manager": "^5.1.0",
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type {
|
2
2
|
Adapter,
|
3
|
+
ObjectReference,
|
3
4
|
StorageObject
|
4
5
|
} from '@genoacms/cloudabstraction/storage'
|
5
6
|
import { type File } from '@google-cloud/storage'
|
@@ -71,7 +72,13 @@ const listDirectory: Adapter['listDirectory'] = async ({ bucket, name }, listing
|
|
71
72
|
lastModified: new Date(file.metadata.updated as string)
|
72
73
|
} satisfies StorageObject
|
73
74
|
}),
|
74
|
-
directories: (apiResponse?.prefixes ?? []).filter((item) => item !== name).map(i =>
|
75
|
+
directories: (apiResponse?.prefixes ?? []).filter((item) => item !== name).map(i => {
|
76
|
+
const object: ObjectReference = {
|
77
|
+
bucket,
|
78
|
+
name: i
|
79
|
+
}
|
80
|
+
return object
|
81
|
+
})
|
75
82
|
}
|
76
83
|
}
|
77
84
|
|