@twin.org/entity-storage-connector-file 0.0.1-next.3 → 0.0.1-next.5
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
|
@@ -103,6 +103,13 @@ class FileEntityStorageConnector {
|
|
|
103
103
|
}
|
|
104
104
|
return true;
|
|
105
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Get the schema for the entities.
|
|
108
|
+
* @returns The schema for the entities.
|
|
109
|
+
*/
|
|
110
|
+
getSchema() {
|
|
111
|
+
return this._entitySchema;
|
|
112
|
+
}
|
|
106
113
|
/**
|
|
107
114
|
* Get an entity.
|
|
108
115
|
* @param id The id of the entity to get, or the index value if secondaryIndex is set.
|
package/dist/esm/index.mjs
CHANGED
|
@@ -101,6 +101,13 @@ class FileEntityStorageConnector {
|
|
|
101
101
|
}
|
|
102
102
|
return true;
|
|
103
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* Get the schema for the entities.
|
|
106
|
+
* @returns The schema for the entities.
|
|
107
|
+
*/
|
|
108
|
+
getSchema() {
|
|
109
|
+
return this._entitySchema;
|
|
110
|
+
}
|
|
104
111
|
/**
|
|
105
112
|
* Get an entity.
|
|
106
113
|
* @param id The id of the entity to get, or the index value if secondaryIndex is set.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EntityCondition, type SortDirection } from "@twin.org/entity";
|
|
1
|
+
import { type EntityCondition, type IEntitySchema, type SortDirection } from "@twin.org/entity";
|
|
2
2
|
import type { IEntityStorageConnector } from "@twin.org/entity-storage-models";
|
|
3
3
|
import type { IFileEntityStorageConnectorConfig } from "./models/IFileEntityStorageConnectorConfig";
|
|
4
4
|
/**
|
|
@@ -25,6 +25,11 @@ export declare class FileEntityStorageConnector<T = unknown> implements IEntityS
|
|
|
25
25
|
* @returns True if the bootstrapping process was successful.
|
|
26
26
|
*/
|
|
27
27
|
bootstrap(nodeLoggingConnectorType?: string): Promise<boolean>;
|
|
28
|
+
/**
|
|
29
|
+
* Get the schema for the entities.
|
|
30
|
+
* @returns The schema for the entities.
|
|
31
|
+
*/
|
|
32
|
+
getSchema(): IEntitySchema;
|
|
28
33
|
/**
|
|
29
34
|
* Get an entity.
|
|
30
35
|
* @param id The id of the entity to get, or the index value if secondaryIndex is set.
|
package/docs/changelog.md
CHANGED
|
@@ -74,6 +74,24 @@ True if the bootstrapping process was successful.
|
|
|
74
74
|
|
|
75
75
|
***
|
|
76
76
|
|
|
77
|
+
### getSchema()
|
|
78
|
+
|
|
79
|
+
> **getSchema**(): `IEntitySchema`\<`unknown`\>
|
|
80
|
+
|
|
81
|
+
Get the schema for the entities.
|
|
82
|
+
|
|
83
|
+
#### Returns
|
|
84
|
+
|
|
85
|
+
`IEntitySchema`\<`unknown`\>
|
|
86
|
+
|
|
87
|
+
The schema for the entities.
|
|
88
|
+
|
|
89
|
+
#### Implementation of
|
|
90
|
+
|
|
91
|
+
`IEntityStorageConnector.getSchema`
|
|
92
|
+
|
|
93
|
+
***
|
|
94
|
+
|
|
77
95
|
### get()
|
|
78
96
|
|
|
79
97
|
> **get**(`id`, `secondaryIndex`?): `Promise`\<`undefined` \| `T`\>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/entity-storage-connector-file",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.5",
|
|
4
4
|
"description": "Entity Storage connector implementation using file storage",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,44 +13,13 @@
|
|
|
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
17
|
"@twin.org/core": "next",
|
|
31
18
|
"@twin.org/entity": "next",
|
|
32
|
-
"@twin.org/entity-storage-models": "0.0.1-next.
|
|
19
|
+
"@twin.org/entity-storage-models": "0.0.1-next.5",
|
|
33
20
|
"@twin.org/logging-models": "next",
|
|
34
21
|
"@twin.org/nameof": "next"
|
|
35
22
|
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@twin.org/entity-storage-connector-memory": "0.0.1-next.3",
|
|
38
|
-
"@twin.org/logging-connector-entity-storage": "next",
|
|
39
|
-
"@twin.org/nameof-transformer": "next",
|
|
40
|
-
"@types/node": "22.5.5",
|
|
41
|
-
"@vitest/coverage-v8": "2.1.1",
|
|
42
|
-
"copyfiles": "2.4.1",
|
|
43
|
-
"dotenv": "16.4.5",
|
|
44
|
-
"rimraf": "6.0.1",
|
|
45
|
-
"rollup": "4.21.3",
|
|
46
|
-
"rollup-plugin-copy": "3.5.0",
|
|
47
|
-
"rollup-plugin-typescript2": "0.36.0",
|
|
48
|
-
"ts-patch": "3.2.1",
|
|
49
|
-
"typedoc": "0.26.7",
|
|
50
|
-
"typedoc-plugin-markdown": "4.2.7",
|
|
51
|
-
"typescript": "5.6.2",
|
|
52
|
-
"vitest": "2.1.1"
|
|
53
|
-
},
|
|
54
23
|
"main": "./dist/cjs/index.cjs",
|
|
55
24
|
"module": "./dist/esm/index.mjs",
|
|
56
25
|
"types": "./dist/types/index.d.ts",
|