@twin.org/blob-storage-connector-file 0.0.1-next.3 → 0.0.1-next.30

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.
@@ -33,7 +33,6 @@ class FileBlobStorageConnector {
33
33
  /**
34
34
  * Create a new instance of FileBlobStorageConnector.
35
35
  * @param options The options for the connector.
36
- * @param options.config The configuration for the connector.
37
36
  */
38
37
  constructor(options) {
39
38
  core.Guards.object(this.CLASS_NAME, "options", options);
@@ -31,7 +31,6 @@ class FileBlobStorageConnector {
31
31
  /**
32
32
  * Create a new instance of FileBlobStorageConnector.
33
33
  * @param options The options for the connector.
34
- * @param options.config The configuration for the connector.
35
34
  */
36
35
  constructor(options) {
37
36
  Guards.object(this.CLASS_NAME, "options", options);
@@ -1,5 +1,5 @@
1
1
  import type { IBlobStorageConnector } from "@twin.org/blob-storage-models";
2
- import type { IFileBlobStorageConnectorConfig } from "./models/IFileBlobStorageConnectorConfig";
2
+ import type { IFileBlobStorageConnectorConstructorOptions } from "./models/IFileBlobStorageConnectorConstructorOptions";
3
3
  /**
4
4
  * Class for performing blob storage operations in file.
5
5
  */
@@ -15,11 +15,8 @@ export declare class FileBlobStorageConnector implements IBlobStorageConnector {
15
15
  /**
16
16
  * Create a new instance of FileBlobStorageConnector.
17
17
  * @param options The options for the connector.
18
- * @param options.config The configuration for the connector.
19
18
  */
20
- constructor(options: {
21
- config: IFileBlobStorageConnectorConfig;
22
- });
19
+ constructor(options: IFileBlobStorageConnectorConstructorOptions);
23
20
  /**
24
21
  * Bootstrap the component by creating and initializing any resources it needs.
25
22
  * @param nodeLoggingConnectorType The node logging connector type, defaults to "node-logging".
@@ -1,2 +1,3 @@
1
1
  export * from "./fileBlobStorageConnector";
2
2
  export * from "./models/IFileBlobStorageConnectorConfig";
3
+ export * from "./models/IFileBlobStorageConnectorConstructorOptions";
@@ -0,0 +1,10 @@
1
+ import type { IFileBlobStorageConnectorConfig } from "./IFileBlobStorageConnectorConfig";
2
+ /**
3
+ * Options for the File Blob Storage Connector constructor.
4
+ */
5
+ export interface IFileBlobStorageConnectorConstructorOptions {
6
+ /**
7
+ * The configuration for the connector.
8
+ */
9
+ config: IFileBlobStorageConnectorConfig;
10
+ }
package/docs/changelog.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @twin.org/blob-storage-connector-file - Changelog
2
2
 
3
- ## v0.0.1-next.3
3
+ ## [0.0.1-next.30](https://github.com/twinfoundation/blob-storage/compare/blob-storage-connector-file-v0.0.1-next.29...blob-storage-connector-file-v0.0.1-next.30) (2025-04-17)
4
+
5
+
6
+ ### Features
7
+
8
+ * use shared store mechanism ([#12](https://github.com/twinfoundation/blob-storage/issues/12)) ([cae8110](https://github.com/twinfoundation/blob-storage/commit/cae8110681847a1ac4fcac968b8196694e49c320))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/blob-storage-models bumped from 0.0.1-next.29 to 0.0.1-next.30
16
+
17
+ ## [0.0.1-next.29](https://github.com/twinfoundation/blob-storage/compare/blob-storage-connector-file-v0.0.1-next.28...blob-storage-connector-file-v0.0.1-next.29) (2025-03-28)
18
+
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * **blob-storage-connector-file:** Synchronize repo versions
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @twin.org/blob-storage-models bumped from 0.0.1-next.28 to 0.0.1-next.29
30
+
31
+ ## v0.0.1-next.28
4
32
 
5
33
  - Initial Release
@@ -8,25 +8,23 @@ Class for performing blob storage operations in file.
8
8
 
9
9
  ## Constructors
10
10
 
11
- ### new FileBlobStorageConnector()
11
+ ### Constructor
12
12
 
13
- > **new FileBlobStorageConnector**(`options`): [`FileBlobStorageConnector`](FileBlobStorageConnector.md)
13
+ > **new FileBlobStorageConnector**(`options`): `FileBlobStorageConnector`
14
14
 
15
15
  Create a new instance of FileBlobStorageConnector.
16
16
 
17
17
  #### Parameters
18
18
 
19
- **options**
19
+ ##### options
20
20
 
21
- The options for the connector.
22
-
23
- • **options.config**: [`IFileBlobStorageConnectorConfig`](../interfaces/IFileBlobStorageConnectorConfig.md)
21
+ [`IFileBlobStorageConnectorConstructorOptions`](../interfaces/IFileBlobStorageConnectorConstructorOptions.md)
24
22
 
25
- The configuration for the connector.
23
+ The options for the connector.
26
24
 
27
25
  #### Returns
28
26
 
29
- [`FileBlobStorageConnector`](FileBlobStorageConnector.md)
27
+ `FileBlobStorageConnector`
30
28
 
31
29
  ## Properties
32
30
 
@@ -52,13 +50,15 @@ Runtime name for the class.
52
50
 
53
51
  ### bootstrap()
54
52
 
55
- > **bootstrap**(`nodeLoggingConnectorType`?): `Promise`\<`boolean`\>
53
+ > **bootstrap**(`nodeLoggingConnectorType?`): `Promise`\<`boolean`\>
56
54
 
57
55
  Bootstrap the component by creating and initializing any resources it needs.
58
56
 
59
57
  #### Parameters
60
58
 
61
- **nodeLoggingConnectorType?**: `string`
59
+ ##### nodeLoggingConnectorType?
60
+
61
+ `string`
62
62
 
63
63
  The node logging connector type, defaults to "node-logging".
64
64
 
@@ -82,7 +82,9 @@ Set the blob.
82
82
 
83
83
  #### Parameters
84
84
 
85
- **blob**: `Uint8Array`
85
+ ##### blob
86
+
87
+ `Uint8Array`
86
88
 
87
89
  The data for the blob.
88
90
 
@@ -100,19 +102,21 @@ The id of the stored blob in urn format.
100
102
 
101
103
  ### get()
102
104
 
103
- > **get**(`id`): `Promise`\<`undefined` \| `Uint8Array`\>
105
+ > **get**(`id`): `Promise`\<`undefined` \| `Uint8Array`\<`ArrayBufferLike`\>\>
104
106
 
105
107
  Get the blob.
106
108
 
107
109
  #### Parameters
108
110
 
109
- **id**: `string`
111
+ ##### id
112
+
113
+ `string`
110
114
 
111
115
  The id of the blob to get in urn format.
112
116
 
113
117
  #### Returns
114
118
 
115
- `Promise`\<`undefined` \| `Uint8Array`\>
119
+ `Promise`\<`undefined` \| `Uint8Array`\<`ArrayBufferLike`\>\>
116
120
 
117
121
  The data for the blob if it can be found or undefined.
118
122
 
@@ -130,7 +134,9 @@ Remove the blob.
130
134
 
131
135
  #### Parameters
132
136
 
133
- **id**: `string`
137
+ ##### id
138
+
139
+ `string`
134
140
 
135
141
  The id of the blob to remove in urn format.
136
142
 
@@ -7,3 +7,4 @@
7
7
  ## Interfaces
8
8
 
9
9
  - [IFileBlobStorageConnectorConfig](interfaces/IFileBlobStorageConnectorConfig.md)
10
+ - [IFileBlobStorageConnectorConstructorOptions](interfaces/IFileBlobStorageConnectorConstructorOptions.md)
@@ -0,0 +1,11 @@
1
+ # Interface: IFileBlobStorageConnectorConstructorOptions
2
+
3
+ Options for the File Blob Storage Connector constructor.
4
+
5
+ ## Properties
6
+
7
+ ### config
8
+
9
+ > **config**: [`IFileBlobStorageConnectorConfig`](IFileBlobStorageConnectorConfig.md)
10
+
11
+ The configuration for the connector.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/blob-storage-connector-file",
3
- "version": "0.0.1-next.3",
3
+ "version": "0.0.1-next.30",
4
4
  "description": "Blob Storage connector implementation using file storage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,56 +13,23 @@
13
13
  "engines": {
14
14
  "node": ">=20.0.0"
15
15
  },
16
- "scripts": {
17
- "clean": "rimraf dist coverage docs/reference",
18
- "build": "tspc",
19
- "test": "vitest --run --config ./vitest.config.ts --no-cache",
20
- "coverage": "vitest --run --coverage --config ./vitest.config.ts --no-cache",
21
- "bundle:esm": "rollup --config rollup.config.mjs --environment MODULE:esm",
22
- "bundle:cjs": "rollup --config rollup.config.mjs --environment MODULE:cjs",
23
- "bundle": "npm run bundle:esm && npm run bundle:cjs",
24
- "docs:clean": "rimraf docs/reference",
25
- "docs:generate": "typedoc",
26
- "docs": "npm run docs:clean && npm run docs:generate",
27
- "dist": "npm run clean && npm run build && npm run test && npm run bundle && npm run docs"
28
- },
29
16
  "dependencies": {
30
- "@twin.org/blob-storage-models": "0.0.1-next.3",
17
+ "@twin.org/blob-storage-models": "0.0.1-next.30",
31
18
  "@twin.org/core": "next",
32
19
  "@twin.org/crypto": "next",
33
- "@twin.org/nameof": "next",
34
- "@twin.org/logging-models": "next"
35
- },
36
- "devDependencies": {
37
- "@twin.org/logging-connector-entity-storage": "next",
38
- "@twin.org/logging-service": "next",
39
- "@twin.org/entity": "next",
40
- "@twin.org/entity-storage-connector-memory": "next",
41
- "@twin.org/nameof-transformer": "next",
42
- "@types/node": "22.5.5",
43
- "@vitest/coverage-v8": "2.1.1",
44
- "copyfiles": "2.4.1",
45
- "dotenv": "16.4.5",
46
- "rimraf": "6.0.1",
47
- "rollup": "4.22.0",
48
- "rollup-plugin-copy": "3.5.0",
49
- "rollup-plugin-typescript2": "0.36.0",
50
- "ts-patch": "3.2.1",
51
- "typedoc": "0.26.7",
52
- "typedoc-plugin-markdown": "4.2.7",
53
- "typescript": "5.6.2",
54
- "vitest": "2.1.1"
20
+ "@twin.org/logging-models": "next",
21
+ "@twin.org/nameof": "next"
55
22
  },
56
23
  "main": "./dist/cjs/index.cjs",
57
24
  "module": "./dist/esm/index.mjs",
58
25
  "types": "./dist/types/index.d.ts",
59
26
  "exports": {
60
27
  ".": {
28
+ "types": "./dist/types/index.d.ts",
61
29
  "require": "./dist/cjs/index.cjs",
62
- "import": "./dist/esm/index.mjs",
63
- "types": "./dist/types/index.d.ts"
30
+ "import": "./dist/esm/index.mjs"
64
31
  },
65
- "./locales": "./locales"
32
+ "./locales/*.json": "./locales/*.json"
66
33
  },
67
34
  "files": [
68
35
  "dist/cjs",