@twin.org/blob-storage-connector-gcp 0.0.1 → 0.0.2-next.2
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/cjs/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var storage = require('@google-cloud/storage');
|
|
4
4
|
var core = require('@twin.org/core');
|
|
5
5
|
var crypto = require('@twin.org/crypto');
|
|
6
|
-
var loggingModels = require('@twin.org/logging-models');
|
|
7
6
|
var web = require('@twin.org/web');
|
|
8
7
|
|
|
9
8
|
// Copyright 2024 IOTA Stiftung.
|
|
@@ -54,11 +53,11 @@ class GcpBlobStorageConnector {
|
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
55
|
* Bootstrap the component by creating and initializing any resources it needs.
|
|
57
|
-
* @param
|
|
56
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
58
57
|
* @returns True if the bootstrapping process was successful.
|
|
59
58
|
*/
|
|
60
|
-
async bootstrap(
|
|
61
|
-
const nodeLogging =
|
|
59
|
+
async bootstrap(nodeLoggingComponentType) {
|
|
60
|
+
const nodeLogging = core.ComponentFactory.getIfExists(nodeLoggingComponentType);
|
|
62
61
|
try {
|
|
63
62
|
await nodeLogging?.log({
|
|
64
63
|
level: "info",
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Storage } from '@google-cloud/storage';
|
|
2
|
-
import { Guards, Is, ObjectHelper, Converter, BaseError, Urn, GeneralError } from '@twin.org/core';
|
|
2
|
+
import { Guards, Is, ObjectHelper, Converter, ComponentFactory, BaseError, Urn, GeneralError } from '@twin.org/core';
|
|
3
3
|
import { Sha256 } from '@twin.org/crypto';
|
|
4
|
-
import { LoggingConnectorFactory } from '@twin.org/logging-models';
|
|
5
4
|
import { MimeTypes } from '@twin.org/web';
|
|
6
5
|
|
|
7
6
|
// Copyright 2024 IOTA Stiftung.
|
|
@@ -52,11 +51,11 @@ class GcpBlobStorageConnector {
|
|
|
52
51
|
}
|
|
53
52
|
/**
|
|
54
53
|
* Bootstrap the component by creating and initializing any resources it needs.
|
|
55
|
-
* @param
|
|
54
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
56
55
|
* @returns True if the bootstrapping process was successful.
|
|
57
56
|
*/
|
|
58
|
-
async bootstrap(
|
|
59
|
-
const nodeLogging =
|
|
57
|
+
async bootstrap(nodeLoggingComponentType) {
|
|
58
|
+
const nodeLogging = ComponentFactory.getIfExists(nodeLoggingComponentType);
|
|
60
59
|
try {
|
|
61
60
|
await nodeLogging?.log({
|
|
62
61
|
level: "info",
|
|
@@ -20,10 +20,10 @@ export declare class GcpBlobStorageConnector implements IBlobStorageConnector {
|
|
|
20
20
|
constructor(options: IGcpBlobStorageConnectorConstructorOptions);
|
|
21
21
|
/**
|
|
22
22
|
* Bootstrap the component by creating and initializing any resources it needs.
|
|
23
|
-
* @param
|
|
23
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
24
24
|
* @returns True if the bootstrapping process was successful.
|
|
25
25
|
*/
|
|
26
|
-
bootstrap(
|
|
26
|
+
bootstrap(nodeLoggingComponentType?: string): Promise<boolean>;
|
|
27
27
|
/**
|
|
28
28
|
* Set the blob.
|
|
29
29
|
* @param blob The data for the blob.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @twin.org/blob-storage-connector-gcp - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/blob-storage/compare/blob-storage-connector-gcp-v0.0.2-next.1...blob-storage-connector-gcp-v0.0.2-next.2) (2025-08-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update framework core ([ff339fe](https://github.com/twinfoundation/blob-storage/commit/ff339fe7e3f09ddff429907834bdf43617e9c05e))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/blob-storage-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
16
|
+
|
|
17
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/blob-storage/compare/blob-storage-connector-gcp-v0.0.2-next.0...blob-storage-connector-gcp-v0.0.2-next.1) (2025-07-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* Add GCP blob storage connector ([#8](https://github.com/twinfoundation/blob-storage/issues/8)) ([4f6d579](https://github.com/twinfoundation/blob-storage/commit/4f6d579c01b3ae13ebcd9029b279da62e4fde859))
|
|
23
|
+
* update dependencies ([56f0094](https://github.com/twinfoundation/blob-storage/commit/56f0094b68d8bd22864cd899ac1b61d95540f719))
|
|
24
|
+
* use shared store mechanism ([#12](https://github.com/twinfoundation/blob-storage/issues/12)) ([cae8110](https://github.com/twinfoundation/blob-storage/commit/cae8110681847a1ac4fcac968b8196694e49c320))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* The following workspace dependencies were updated
|
|
30
|
+
* dependencies
|
|
31
|
+
* @twin.org/blob-storage-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
32
|
+
|
|
3
33
|
## 0.0.1 (2025-07-04)
|
|
4
34
|
|
|
5
35
|
|
|
@@ -51,17 +51,17 @@ Runtime name for the class.
|
|
|
51
51
|
|
|
52
52
|
### bootstrap()
|
|
53
53
|
|
|
54
|
-
> **bootstrap**(`
|
|
54
|
+
> **bootstrap**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
|
|
55
55
|
|
|
56
56
|
Bootstrap the component by creating and initializing any resources it needs.
|
|
57
57
|
|
|
58
58
|
#### Parameters
|
|
59
59
|
|
|
60
|
-
#####
|
|
60
|
+
##### nodeLoggingComponentType?
|
|
61
61
|
|
|
62
62
|
`string`
|
|
63
63
|
|
|
64
|
-
The node logging
|
|
64
|
+
The node logging component type.
|
|
65
65
|
|
|
66
66
|
#### Returns
|
|
67
67
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/blob-storage-connector-gcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-next.2",
|
|
4
4
|
"description": "Blob Storage connector implementation using Google Cloud Storage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@google-cloud/storage": "7.
|
|
18
|
-
"@twin.org/blob-storage-models": "
|
|
19
|
-
"@twin.org/core": "
|
|
20
|
-
"@twin.org/crypto": "
|
|
21
|
-
"@twin.org/logging-models": "
|
|
22
|
-
"@twin.org/nameof": "
|
|
23
|
-
"@twin.org/web": "
|
|
17
|
+
"@google-cloud/storage": "7.17.0",
|
|
18
|
+
"@twin.org/blob-storage-models": "0.0.2-next.2",
|
|
19
|
+
"@twin.org/core": "next",
|
|
20
|
+
"@twin.org/crypto": "next",
|
|
21
|
+
"@twin.org/logging-models": "next",
|
|
22
|
+
"@twin.org/nameof": "next",
|
|
23
|
+
"@twin.org/web": "next"
|
|
24
24
|
},
|
|
25
25
|
"main": "./dist/cjs/index.cjs",
|
|
26
26
|
"module": "./dist/esm/index.mjs",
|