@proteinjs/db-file-storage-driver-gcs 1.0.15 → 1.0.17
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/CHANGELOG.md +18 -0
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/src/GoogleCloudStorageTableWatcher.d.ts.map +1 -1
- package/dist/src/GoogleCloudStorageTableWatcher.js +6 -3
- package/dist/src/GoogleCloudStorageTableWatcher.js.map +1 -1
- package/generated/index.ts +1 -1
- package/package.json +7 -7
- package/src/GoogleCloudStorageTableWatcher.ts +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.16](https://github.com/proteinjs/db/compare/@proteinjs/db-file-storage-driver-gcs@1.0.14...@proteinjs/db-file-storage-driver-gcs@1.0.16) (2024-08-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* refactored to implement new @proteinjs/logger/Logger api ([66578f2](https://github.com/proteinjs/db/commit/66578f267d9293c0d5703c63e53d8edf68325f52))
|
|
12
|
+
* reverted package versions to before failed publishes ([f63518c](https://github.com/proteinjs/db/commit/f63518cf27b74b53571254621dfe9df63aa94871))
|
|
13
|
+
* reverted versions of packages that failed to publish so they will be re-published ([e2f83b0](https://github.com/proteinjs/db/commit/e2f83b0c8664ab9ad22d9d641639df6eeab6b63f))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Reverts
|
|
17
|
+
|
|
18
|
+
* Revert "chore(release): publish [skip ci]" ([822bec0](https://github.com/proteinjs/db/commit/822bec053324b13522a6f754cf1f3771d8a24f8e))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [1.0.15](https://github.com/proteinjs/db/compare/@proteinjs/db-file-storage-driver-gcs@1.0.14...@proteinjs/db-file-storage-driver-gcs@1.0.15) (2024-08-11)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,OAAO,uBAAuB,CAAC;AAC/B,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAyB/B,cAAc,UAAU,CAAC"}
|
package/dist/generated/index.js
CHANGED
|
@@ -18,8 +18,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
require("@google-cloud/storage");
|
|
19
19
|
require("@proteinjs/db");
|
|
20
20
|
require("@proteinjs/db-file");
|
|
21
|
+
require("@proteinjs/logger");
|
|
21
22
|
require("@proteinjs/reflection");
|
|
22
|
-
require("@proteinjs/util");
|
|
23
23
|
/** Generate Source Graph */
|
|
24
24
|
var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/db-file-storage-driver-gcs/DefaultGoogleCloudStorageConfigFactory\",\"value\":{\"packageName\":\"@proteinjs/db-file-storage-driver-gcs\",\"name\":\"DefaultGoogleCloudStorageConfigFactory\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/db/packages/file-storage-drivers/google-cloud-storage/src/DefaultGoogleCloudStorageConfigFactory.ts\",\"qualifiedName\":\"@proteinjs/db-file-storage-driver-gcs/DefaultGoogleCloudStorageConfigFactory\",\"properties\":[],\"methods\":[{\"name\":\"getConfig\",\"returnType\":{\"packageName\":\"@proteinjs/db-file-storage-driver-gcs\",\"name\":\"GoogleCloudStorageConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":true,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]}],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/reflection\",\"name\":\"Loadable\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/reflection/Loadable\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/reflection/Loadable\"},{\"v\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageDriver\",\"value\":{\"packageName\":\"@proteinjs/db-file-storage-driver-gcs\",\"name\":\"GoogleCloudStorageDriver\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/db/packages/file-storage-drivers/google-cloud-storage/src/GoogleCloudStorageDriver.ts\",\"qualifiedName\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageDriver\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"storage\",\"type\":{\"packageName\":\"@google-cloud/storage\",\"name\":\"Storage\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/storage/Storage\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"bucketName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"getDefaultConfig\",\"returnType\":{\"packageName\":\"@proteinjs/db-file-storage-driver-gcs\",\"name\":\"GoogleCloudStorageConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"createFile\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"file\",\"type\":{\"packageName\":\"@proteinjs/db-file\",\"name\":\"File\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-file/File\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"fileData\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"getFileData\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<string>\",\"filePath\":null,\"qualifiedName\":\"/Promise<string>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fileId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updateFileData\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"fileId\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"data\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null}}]},{\"name\":\"updateFile\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"file\",\"type\":{\"packageName\":\"@proteinjs/db-file\",\"name\":\"File\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-file/File\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db-file\",\"name\":\"FileStorageDriver\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-file/FileStorageDriver\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db-file/FileStorageDriver\"},{\"v\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageTableWatcher\",\"value\":{\"packageName\":\"@proteinjs/db-file-storage-driver-gcs\",\"name\":\"GoogleCloudStorageTableWatcher\",\"filePath\":\"/Users/brentbahry/workspaces/n3xa/packages/proteinjs/packages/db/packages/file-storage-drivers/google-cloud-storage/src/GoogleCloudStorageTableWatcher.ts\",\"qualifiedName\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageTableWatcher\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"logger\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"storage\",\"type\":{\"packageName\":\"@google-cloud/storage\",\"name\":\"Storage\",\"filePath\":null,\"qualifiedName\":\"@google-cloud/storage/Storage\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"},{\"name\":\"bucketName\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\"}],\"methods\":[{\"name\":\"getConfig\",\"returnType\":{\"packageName\":\"@proteinjs/db-file-storage-driver-gcs\",\"name\":\"GoogleCloudStorageConfig\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageConfig\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"private\",\"parameters\":[]},{\"name\":\"name\",\"returnType\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"table\",\"returnType\":{\"packageName\":\"\",\"name\":\"Table<File>\",\"filePath\":null,\"qualifiedName\":\"/Table<File>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"beforeDelete\",\"returnType\":{\"packageName\":\"\",\"name\":\"Promise<void>\",\"filePath\":null,\"qualifiedName\":\"/Promise<void>\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":true,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"recordsToDelete\",\"type\":{\"packageName\":\"\",\"name\":\"T[]\",\"filePath\":null,\"qualifiedName\":\"/T[]\",\"typeParameters\":null,\"directParents\":null}},{\"name\":\"qb\",\"type\":{\"packageName\":\"\",\"name\":\"QueryBuilder<T>\",\"filePath\":null,\"qualifiedName\":\"/QueryBuilder<T>\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"TableWatcher\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/TableWatcher\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/db-file/File\"],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/db/TableWatcher\"}],\"edges\":[{\"v\":\"@proteinjs/db-file-storage-driver-gcs/DefaultGoogleCloudStorageConfigFactory\",\"w\":\"@proteinjs/reflection/Loadable\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageDriver\",\"w\":\"@proteinjs/db-file/FileStorageDriver\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/db-file-storage-driver-gcs/GoogleCloudStorageTableWatcher\",\"w\":\"@proteinjs/db/TableWatcher\",\"value\":\"implements interface\"}]}";
|
|
25
25
|
/** Generate Source Links */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAC/B,yBAAuB;AACvB,8BAA4B;AAC5B,iCAA+B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,iCAA+B;AAC/B,yBAAuB;AACvB,8BAA4B;AAC5B,6BAA2B;AAC3B,iCAA+B;AAG/B,4BAA4B;AAE5B,IAAM,WAAW,GAAG,knSAAknS,CAAC;AAGvoS,4BAA4B;AAE5B,4EAA2E;AAC3E,wFAAuF;AAEvF,IAAM,WAAW,GAAG;IACnB,gEAAgE,EAAE,mDAAwB;IAC1F,sEAAsE,EAAE,+DAA8B;CACtG,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleCloudStorageTableWatcher.d.ts","sourceRoot":"","sources":["../../src/GoogleCloudStorageTableWatcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,IAAI,EAAa,MAAM,oBAAoB,CAAC;AAOrD,qBAAa,8BAA+B,YAAW,YAAY,CAAC,IAAI,CAAC;IACvE,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"GoogleCloudStorageTableWatcher.d.ts","sourceRoot":"","sources":["../../src/GoogleCloudStorageTableWatcher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,IAAI,EAAa,MAAM,oBAAoB,CAAC;AAOrD,qBAAa,8BAA+B,YAAW,YAAY,CAAC,IAAI,CAAC;IACvE,OAAO,CAAC,MAAM,CAA+C;IAC7D,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,UAAU,CAAS;;IAQ3B,OAAO,CAAC,SAAS;IAWjB,IAAI,IAAI,MAAM;IAId,KAAK,IAAI,KAAK,CAAC,IAAI,CAAC;IAId,YAAY,CAAC,CAAC,SAAS,IAAI,EAAE,eAAe,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAY7F"}
|
|
@@ -50,11 +50,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
50
50
|
exports.GoogleCloudStorageTableWatcher = void 0;
|
|
51
51
|
var storage_1 = require("@google-cloud/storage");
|
|
52
52
|
var db_file_1 = require("@proteinjs/db-file");
|
|
53
|
-
var
|
|
53
|
+
var logger_1 = require("@proteinjs/logger");
|
|
54
54
|
var DefaultGoogleCloudStorageConfigFactory_1 = require("./DefaultGoogleCloudStorageConfigFactory");
|
|
55
55
|
var GoogleCloudStorageTableWatcher = /** @class */ (function () {
|
|
56
56
|
function GoogleCloudStorageTableWatcher() {
|
|
57
|
-
this.logger = new
|
|
57
|
+
this.logger = new logger_1.Logger({ name: this.constructor.name });
|
|
58
58
|
var _a = this.getConfig(), projectId = _a.projectId, bucketName = _a.bucketName, storageOptions = _a.storageOptions;
|
|
59
59
|
this.storage = new storage_1.Storage(__assign(__assign({}, storageOptions), { projectId: projectId }));
|
|
60
60
|
this.bucketName = bucketName;
|
|
@@ -93,7 +93,10 @@ var GoogleCloudStorageTableWatcher = /** @class */ (function () {
|
|
|
93
93
|
_i++;
|
|
94
94
|
return [3 /*break*/, 1];
|
|
95
95
|
case 4:
|
|
96
|
-
this.logger.info(
|
|
96
|
+
this.logger.info({
|
|
97
|
+
message: "Deleted the following files from Google Cloud Storage",
|
|
98
|
+
obj: { deletedFileIds: fileIdsToDelete },
|
|
99
|
+
});
|
|
97
100
|
return [2 /*return*/];
|
|
98
101
|
}
|
|
99
102
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GoogleCloudStorageTableWatcher.js","sourceRoot":"","sources":["../../src/GoogleCloudStorageTableWatcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAgD;AAEhD,8CAAqD;AACrD,
|
|
1
|
+
{"version":3,"file":"GoogleCloudStorageTableWatcher.js","sourceRoot":"","sources":["../../src/GoogleCloudStorageTableWatcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAgD;AAEhD,8CAAqD;AACrD,4CAA2C;AAC3C,mGAGkD;AAElD;IAKE;QAJQ,WAAM,GAAG,IAAI,eAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QAKrD,IAAA,KAA4C,IAAI,CAAC,SAAS,EAAE,EAA1D,SAAS,eAAA,EAAE,UAAU,gBAAA,EAAE,cAAc,oBAAqB,CAAC;QACnE,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,uBAAM,cAAc,KAAE,SAAS,WAAA,IAAG,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAEO,kDAAS,GAAjB;QACE,IAAM,oBAAoB,GAAG,IAAA,kFAAyC,GAAE,CAAC;QACzE,IAAI,CAAC,oBAAoB,EAAE;YACzB,MAAM,IAAI,KAAK,CACb,2JAA2J,CAC5J,CAAC;SACH;QAED,OAAO,oBAAoB,CAAC,SAAS,EAAE,CAAC;IAC1C,CAAC;IAED,6CAAI,GAAJ;QACE,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,8CAAK,GAAL;QACE,OAAO,IAAI,mBAAS,EAAE,CAAC;IACzB,CAAC;IAEK,qDAAY,GAAlB,UAAmC,eAAoB,EAAE,EAAmB;;;;;;wBACpE,eAAe,GAAG,eAAe,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,EAAE,EAAT,CAAS,CAAC,CAAC;8BAC/B,EAAf,mCAAe;;;6BAAf,CAAA,6BAAe,CAAA;wBAAzB,MAAM;wBACT,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;wBAC/D,qBAAM,IAAI,CAAC,MAAM,EAAE,EAAA;;wBAAnB,SAAmB,CAAC;;;wBAFD,IAAe,CAAA;;;wBAKpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;4BACf,OAAO,EAAE,uDAAuD;4BAChE,GAAG,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE;yBACzC,CAAC,CAAC;;;;;KACJ;IACH,qCAAC;AAAD,CAAC,AA1CD,IA0CC;AA1CY,wEAA8B"}
|
package/generated/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proteinjs/db-file-storage-driver-gcs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "File storage in Google Cloud Storage",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@google-cloud/storage": "7.11.2",
|
|
25
|
-
"@proteinjs/db": "^1.5.
|
|
26
|
-
"@proteinjs/db-file": "^1.1.
|
|
27
|
-
"@proteinjs/
|
|
28
|
-
"@proteinjs/
|
|
25
|
+
"@proteinjs/db": "^1.5.8",
|
|
26
|
+
"@proteinjs/db-file": "^1.1.18",
|
|
27
|
+
"@proteinjs/logger": "1.0.5",
|
|
28
|
+
"@proteinjs/reflection": "1.1.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@proteinjs/reflection-build": "1.0.
|
|
31
|
+
"@proteinjs/reflection-build": "1.0.24",
|
|
32
32
|
"@types/jest": "29.5.5",
|
|
33
33
|
"@types/node": "14.0.27",
|
|
34
34
|
"@typescript-eslint/eslint-plugin": "7.8.0",
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
},
|
|
43
43
|
"main": "./dist/generated/index.js",
|
|
44
44
|
"types": "./dist/generated/index.d.ts"
|
|
45
|
-
}
|
|
45
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Storage } from '@google-cloud/storage';
|
|
2
2
|
import { QueryBuilder, Table, TableWatcher } from '@proteinjs/db';
|
|
3
3
|
import { File, FileTable } from '@proteinjs/db-file';
|
|
4
|
-
import { Logger } from '@proteinjs/
|
|
4
|
+
import { Logger } from '@proteinjs/logger';
|
|
5
5
|
import {
|
|
6
6
|
GoogleCloudStorageConfig,
|
|
7
7
|
getDefaultGoogleCloudStorageConfigFactory,
|
|
8
8
|
} from './DefaultGoogleCloudStorageConfigFactory';
|
|
9
9
|
|
|
10
10
|
export class GoogleCloudStorageTableWatcher implements TableWatcher<File> {
|
|
11
|
-
private logger = new Logger(this.constructor.name);
|
|
11
|
+
private logger = new Logger({ name: this.constructor.name });
|
|
12
12
|
private storage: Storage;
|
|
13
13
|
private bucketName: string;
|
|
14
14
|
|
|
@@ -44,6 +44,9 @@ export class GoogleCloudStorageTableWatcher implements TableWatcher<File> {
|
|
|
44
44
|
await file.delete();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
this.logger.info(
|
|
47
|
+
this.logger.info({
|
|
48
|
+
message: `Deleted the following files from Google Cloud Storage`,
|
|
49
|
+
obj: { deletedFileIds: fileIdsToDelete },
|
|
50
|
+
});
|
|
48
51
|
}
|
|
49
52
|
}
|