@camstack/core 0.1.0 → 0.1.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/builtins/local-backup/index.d.mts +42 -0
- package/dist/builtins/local-backup/index.d.ts +42 -0
- package/dist/builtins/local-backup/index.js +188 -0
- package/dist/builtins/local-backup/index.js.map +1 -0
- package/dist/builtins/local-backup/index.mjs +11 -0
- package/dist/builtins/local-backup/index.mjs.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.mts +2 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +2 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +210 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +10 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs.map +1 -0
- package/dist/builtins/sqlite-storage/index.d.mts +4 -0
- package/dist/builtins/sqlite-storage/index.d.ts +4 -0
- package/dist/builtins/sqlite-storage/index.js +1025 -0
- package/dist/builtins/sqlite-storage/index.js.map +1 -0
- package/dist/builtins/sqlite-storage/index.mjs +31 -0
- package/dist/builtins/sqlite-storage/index.mjs.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.mts +2 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +2 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +317 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +10 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs.map +1 -0
- package/dist/builtins/winston-logging/index.d.mts +30 -0
- package/dist/builtins/winston-logging/index.d.ts +30 -0
- package/dist/builtins/winston-logging/index.js +185 -0
- package/dist/builtins/winston-logging/index.js.map +1 -0
- package/dist/builtins/winston-logging/index.mjs +11 -0
- package/dist/builtins/winston-logging/index.mjs.map +1 -0
- package/dist/chunk-2F3XZYRW.mjs +89 -0
- package/dist/chunk-2F3XZYRW.mjs.map +1 -0
- package/dist/chunk-LQFPAEQF.mjs +147 -0
- package/dist/chunk-LQFPAEQF.mjs.map +1 -0
- package/dist/chunk-QEMJH3KY.mjs +48 -0
- package/dist/chunk-QEMJH3KY.mjs.map +1 -0
- package/dist/chunk-R3DIIBBX.mjs +532 -0
- package/dist/chunk-R3DIIBBX.mjs.map +1 -0
- package/dist/chunk-SO4LROOT.mjs +150 -0
- package/dist/chunk-SO4LROOT.mjs.map +1 -0
- package/dist/chunk-SPA4JBKN.mjs +175 -0
- package/dist/chunk-SPA4JBKN.mjs.map +1 -0
- package/dist/chunk-YXNXYYHL.mjs +282 -0
- package/dist/chunk-YXNXYYHL.mjs.map +1 -0
- package/dist/dist-N7SR63RN.mjs +3515 -0
- package/dist/dist-N7SR63RN.mjs.map +1 -0
- package/dist/filesystem-storage.addon-C42r589X.d.mts +57 -0
- package/dist/filesystem-storage.addon-C42r589X.d.ts +57 -0
- package/dist/index.d.mts +1064 -101
- package/dist/index.d.ts +1064 -101
- package/dist/index.js +14673 -560
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6360 -534
- package/dist/index.mjs.map +1 -1
- package/dist/onnxruntime_binding-6Q6HXASN.node +0 -0
- package/dist/onnxruntime_binding-EKZT2NRK.node +0 -0
- package/dist/onnxruntime_binding-P6S7V3CI.node +0 -0
- package/dist/onnxruntime_binding-PJNNIIUO.node +0 -0
- package/dist/onnxruntime_binding-UN6SPTQK.node +0 -0
- package/dist/sql-schema-CKz78rId.d.mts +97 -0
- package/dist/sql-schema-CKz78rId.d.ts +97 -0
- package/dist/sqlite-settings.addon-DigoKwpZ.d.mts +70 -0
- package/dist/sqlite-settings.addon-DigoKwpZ.d.ts +70 -0
- package/dist/storage-location-manager-UQRGHTCA.mjs +8 -0
- package/dist/storage-location-manager-UQRGHTCA.mjs.map +1 -0
- package/dist/wrapper-Y55ADNM5.mjs +3652 -0
- package/dist/wrapper-Y55ADNM5.mjs.map +1 -0
- package/package.json +77 -6
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IStorageProvider, StorageLocationType, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Filesystem storage provider — serves all location types from a local directory tree.
|
|
5
|
+
*
|
|
6
|
+
* Default layout:
|
|
7
|
+
* {rootPath}/recordings-high/
|
|
8
|
+
* {rootPath}/recordings-low/
|
|
9
|
+
* {rootPath}/recordings-clips/
|
|
10
|
+
* {rootPath}/event-images/
|
|
11
|
+
* {rootPath}/models/
|
|
12
|
+
* {rootPath}/addons-data/
|
|
13
|
+
* {rootPath}/logs/
|
|
14
|
+
* /tmp/camstack-cache/ (cache is always local)
|
|
15
|
+
*
|
|
16
|
+
* Individual location paths can be overridden.
|
|
17
|
+
*/
|
|
18
|
+
declare class FilesystemStorageProvider implements IStorageProvider {
|
|
19
|
+
readonly id = "local";
|
|
20
|
+
readonly name = "Local Filesystem";
|
|
21
|
+
readonly supportedLocations: readonly StorageLocationType[];
|
|
22
|
+
private readonly rootPath;
|
|
23
|
+
private readonly locationPaths;
|
|
24
|
+
constructor(rootPath: string, overrides?: Partial<Record<StorageLocationType, string>>);
|
|
25
|
+
resolve(location: StorageLocationType, relativePath: string): string;
|
|
26
|
+
write(location: StorageLocationType, relativePath: string, data: Buffer | NodeJS.ReadableStream): Promise<void>;
|
|
27
|
+
read(location: StorageLocationType, relativePath: string): Promise<Buffer>;
|
|
28
|
+
exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
|
|
29
|
+
list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
|
|
30
|
+
delete(location: StorageLocationType, relativePath: string): Promise<void>;
|
|
31
|
+
getAvailableSpace(location: StorageLocationType): Promise<number | null>;
|
|
32
|
+
initialize(): Promise<void>;
|
|
33
|
+
shutdown(): Promise<void>;
|
|
34
|
+
/** Get the resolved path for a location type */
|
|
35
|
+
getLocationPath(location: StorageLocationType): string;
|
|
36
|
+
/** Get the root path */
|
|
37
|
+
getRootPath(): string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Filesystem Storage addon — provides local disk storage for all location types.
|
|
42
|
+
* Capability: 'storage' (collection)
|
|
43
|
+
*/
|
|
44
|
+
declare class FilesystemStorageAddon implements ICamstackAddon, IConfigurable {
|
|
45
|
+
readonly manifest: AddonManifest;
|
|
46
|
+
private provider;
|
|
47
|
+
private currentConfig;
|
|
48
|
+
initialize(context: AddonContext): Promise<void>;
|
|
49
|
+
shutdown(): Promise<void>;
|
|
50
|
+
getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
|
|
51
|
+
getProvider(): FilesystemStorageProvider | null;
|
|
52
|
+
getConfigSchema(): ConfigUISchema;
|
|
53
|
+
getConfig(): Record<string, unknown>;
|
|
54
|
+
onConfigChange(config: Record<string, unknown>): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { FilesystemStorageAddon as F, FilesystemStorageProvider as a };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IStorageProvider, StorageLocationType, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Filesystem storage provider — serves all location types from a local directory tree.
|
|
5
|
+
*
|
|
6
|
+
* Default layout:
|
|
7
|
+
* {rootPath}/recordings-high/
|
|
8
|
+
* {rootPath}/recordings-low/
|
|
9
|
+
* {rootPath}/recordings-clips/
|
|
10
|
+
* {rootPath}/event-images/
|
|
11
|
+
* {rootPath}/models/
|
|
12
|
+
* {rootPath}/addons-data/
|
|
13
|
+
* {rootPath}/logs/
|
|
14
|
+
* /tmp/camstack-cache/ (cache is always local)
|
|
15
|
+
*
|
|
16
|
+
* Individual location paths can be overridden.
|
|
17
|
+
*/
|
|
18
|
+
declare class FilesystemStorageProvider implements IStorageProvider {
|
|
19
|
+
readonly id = "local";
|
|
20
|
+
readonly name = "Local Filesystem";
|
|
21
|
+
readonly supportedLocations: readonly StorageLocationType[];
|
|
22
|
+
private readonly rootPath;
|
|
23
|
+
private readonly locationPaths;
|
|
24
|
+
constructor(rootPath: string, overrides?: Partial<Record<StorageLocationType, string>>);
|
|
25
|
+
resolve(location: StorageLocationType, relativePath: string): string;
|
|
26
|
+
write(location: StorageLocationType, relativePath: string, data: Buffer | NodeJS.ReadableStream): Promise<void>;
|
|
27
|
+
read(location: StorageLocationType, relativePath: string): Promise<Buffer>;
|
|
28
|
+
exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
|
|
29
|
+
list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
|
|
30
|
+
delete(location: StorageLocationType, relativePath: string): Promise<void>;
|
|
31
|
+
getAvailableSpace(location: StorageLocationType): Promise<number | null>;
|
|
32
|
+
initialize(): Promise<void>;
|
|
33
|
+
shutdown(): Promise<void>;
|
|
34
|
+
/** Get the resolved path for a location type */
|
|
35
|
+
getLocationPath(location: StorageLocationType): string;
|
|
36
|
+
/** Get the root path */
|
|
37
|
+
getRootPath(): string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Filesystem Storage addon — provides local disk storage for all location types.
|
|
42
|
+
* Capability: 'storage' (collection)
|
|
43
|
+
*/
|
|
44
|
+
declare class FilesystemStorageAddon implements ICamstackAddon, IConfigurable {
|
|
45
|
+
readonly manifest: AddonManifest;
|
|
46
|
+
private provider;
|
|
47
|
+
private currentConfig;
|
|
48
|
+
initialize(context: AddonContext): Promise<void>;
|
|
49
|
+
shutdown(): Promise<void>;
|
|
50
|
+
getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
|
|
51
|
+
getProvider(): FilesystemStorageProvider | null;
|
|
52
|
+
getConfigSchema(): ConfigUISchema;
|
|
53
|
+
getConfig(): Record<string, unknown>;
|
|
54
|
+
onConfigChange(config: Record<string, unknown>): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export { FilesystemStorageAddon as F, FilesystemStorageProvider as a };
|