@twin.org/blob-storage-connector-file 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
|
@@ -4,7 +4,6 @@ var promises = require('node:fs/promises');
|
|
|
4
4
|
var path = require('node:path');
|
|
5
5
|
var core = require('@twin.org/core');
|
|
6
6
|
var crypto = require('@twin.org/crypto');
|
|
7
|
-
var loggingModels = require('@twin.org/logging-models');
|
|
8
7
|
|
|
9
8
|
// Copyright 2024 IOTA Stiftung.
|
|
10
9
|
// SPDX-License-Identifier: Apache-2.0.
|
|
@@ -43,11 +42,11 @@ class FileBlobStorageConnector {
|
|
|
43
42
|
}
|
|
44
43
|
/**
|
|
45
44
|
* Bootstrap the component by creating and initializing any resources it needs.
|
|
46
|
-
* @param
|
|
45
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
47
46
|
* @returns True if the bootstrapping process was successful.
|
|
48
47
|
*/
|
|
49
|
-
async bootstrap(
|
|
50
|
-
const nodeLogging =
|
|
48
|
+
async bootstrap(nodeLoggingComponentType) {
|
|
49
|
+
const nodeLogging = core.ComponentFactory.getIfExists(nodeLoggingComponentType);
|
|
51
50
|
if (!(await this.dirExists(this._directory))) {
|
|
52
51
|
await nodeLogging?.log({
|
|
53
52
|
level: "info",
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { mkdir, writeFile, readFile, unlink, access } from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { Guards, BaseError, Converter, Urn, GeneralError } from '@twin.org/core';
|
|
3
|
+
import { Guards, ComponentFactory, BaseError, Converter, Urn, GeneralError } from '@twin.org/core';
|
|
4
4
|
import { Sha256 } from '@twin.org/crypto';
|
|
5
|
-
import { LoggingConnectorFactory } from '@twin.org/logging-models';
|
|
6
5
|
|
|
7
6
|
// Copyright 2024 IOTA Stiftung.
|
|
8
7
|
// SPDX-License-Identifier: Apache-2.0.
|
|
@@ -41,11 +40,11 @@ class FileBlobStorageConnector {
|
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
43
42
|
* Bootstrap the component by creating and initializing any resources it needs.
|
|
44
|
-
* @param
|
|
43
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
45
44
|
* @returns True if the bootstrapping process was successful.
|
|
46
45
|
*/
|
|
47
|
-
async bootstrap(
|
|
48
|
-
const nodeLogging =
|
|
46
|
+
async bootstrap(nodeLoggingComponentType) {
|
|
47
|
+
const nodeLogging = ComponentFactory.getIfExists(nodeLoggingComponentType);
|
|
49
48
|
if (!(await this.dirExists(this._directory))) {
|
|
50
49
|
await nodeLogging?.log({
|
|
51
50
|
level: "info",
|
|
@@ -19,10 +19,10 @@ export declare class FileBlobStorageConnector implements IBlobStorageConnector {
|
|
|
19
19
|
constructor(options: IFileBlobStorageConnectorConstructorOptions);
|
|
20
20
|
/**
|
|
21
21
|
* Bootstrap the component by creating and initializing any resources it needs.
|
|
22
|
-
* @param
|
|
22
|
+
* @param nodeLoggingComponentType The node logging component type.
|
|
23
23
|
* @returns True if the bootstrapping process was successful.
|
|
24
24
|
*/
|
|
25
|
-
bootstrap(
|
|
25
|
+
bootstrap(nodeLoggingComponentType?: string): Promise<boolean>;
|
|
26
26
|
/**
|
|
27
27
|
* Set the blob.
|
|
28
28
|
* @param blob The data for the blob.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @twin.org/blob-storage-connector-file - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/blob-storage/compare/blob-storage-connector-file-v0.0.2-next.1...blob-storage-connector-file-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-file-v0.0.2-next.0...blob-storage-connector-file-v0.0.2-next.1) (2025-07-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* update dependencies ([56f0094](https://github.com/twinfoundation/blob-storage/commit/56f0094b68d8bd22864cd899ac1b61d95540f719))
|
|
23
|
+
* use shared store mechanism ([#12](https://github.com/twinfoundation/blob-storage/issues/12)) ([cae8110](https://github.com/twinfoundation/blob-storage/commit/cae8110681847a1ac4fcac968b8196694e49c320))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Dependencies
|
|
27
|
+
|
|
28
|
+
* The following workspace dependencies were updated
|
|
29
|
+
* dependencies
|
|
30
|
+
* @twin.org/blob-storage-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
31
|
+
|
|
3
32
|
## 0.0.1 (2025-07-04)
|
|
4
33
|
|
|
5
34
|
|
|
@@ -50,17 +50,17 @@ Runtime name for the class.
|
|
|
50
50
|
|
|
51
51
|
### bootstrap()
|
|
52
52
|
|
|
53
|
-
> **bootstrap**(`
|
|
53
|
+
> **bootstrap**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
|
|
54
54
|
|
|
55
55
|
Bootstrap the component by creating and initializing any resources it needs.
|
|
56
56
|
|
|
57
57
|
#### Parameters
|
|
58
58
|
|
|
59
|
-
#####
|
|
59
|
+
##### nodeLoggingComponentType?
|
|
60
60
|
|
|
61
61
|
`string`
|
|
62
62
|
|
|
63
|
-
The node logging
|
|
63
|
+
The node logging component type.
|
|
64
64
|
|
|
65
65
|
#### Returns
|
|
66
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/blob-storage-connector-file",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-next.2",
|
|
4
4
|
"description": "Blob Storage connector implementation using file storage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/blob-storage-models": "
|
|
18
|
-
"@twin.org/core": "
|
|
19
|
-
"@twin.org/crypto": "
|
|
20
|
-
"@twin.org/logging-models": "
|
|
21
|
-
"@twin.org/nameof": "
|
|
17
|
+
"@twin.org/blob-storage-models": "0.0.2-next.2",
|
|
18
|
+
"@twin.org/core": "next",
|
|
19
|
+
"@twin.org/crypto": "next",
|
|
20
|
+
"@twin.org/logging-models": "next",
|
|
21
|
+
"@twin.org/nameof": "next"
|
|
22
22
|
},
|
|
23
23
|
"main": "./dist/cjs/index.cjs",
|
|
24
24
|
"module": "./dist/esm/index.mjs",
|