@camstack/addon-post-analysis 1.2.50 → 1.2.51
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/{dist-Bm5GpbGn.js → dist-CnSzKo7x.js} +993 -4
- package/dist/{dist-BhadCxSQ.mjs → dist-DTeVOZBt.mjs} +970 -4
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +2 -1
- package/dist/node-CnEKzHgS.js +653 -0
- package/dist/node-pIpcQ_aN.mjs +649 -0
- package/dist/pipeline-analytics/_stub.js +1 -1
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-B0B7ZGiM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D-6lLgLp.mjs} +2 -2
- package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CJ3AVT6B.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JSo2V9IT.mjs} +1 -1
- package/dist/pipeline-analytics/{hostInit-BahNk1yZ.mjs → hostInit-DPOdauxs.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +14754 -11416
- package/dist/pipeline-analytics/index.mjs +14755 -11417
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/node-Co0YpEFr.mjs +0 -148
- package/dist/node-HEkeoPPw.js +0 -151
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D-6lLgLp.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-post-analysis",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.51",
|
|
4
4
|
"description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
package/dist/node-Co0YpEFr.mjs
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import * as fs from "node:fs";
|
|
2
|
-
import * as path$1 from "node:path";
|
|
3
|
-
import "node:crypto";
|
|
4
|
-
import "node:child_process";
|
|
5
|
-
var STORAGE_LOCATION_TYPES = [
|
|
6
|
-
"data",
|
|
7
|
-
"media",
|
|
8
|
-
"recordings",
|
|
9
|
-
"recordings-high",
|
|
10
|
-
"recordings-low",
|
|
11
|
-
"recordings-clips",
|
|
12
|
-
"event-images",
|
|
13
|
-
"models",
|
|
14
|
-
"addons-data",
|
|
15
|
-
"cache",
|
|
16
|
-
"logs",
|
|
17
|
-
"backups"
|
|
18
|
-
];
|
|
19
|
-
var DEFAULT_LOCATION_SUBDIRS = {
|
|
20
|
-
data: "db",
|
|
21
|
-
media: "media",
|
|
22
|
-
recordings: "recordings",
|
|
23
|
-
"recordings-high": "recordings-high",
|
|
24
|
-
"recordings-low": "recordings-low",
|
|
25
|
-
"recordings-clips": "recordings-clips",
|
|
26
|
-
"event-images": "event-images",
|
|
27
|
-
models: "models",
|
|
28
|
-
"addons-data": "addons-data",
|
|
29
|
-
cache: "/tmp/camstack-cache",
|
|
30
|
-
logs: "logs",
|
|
31
|
-
backups: "backups"
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* Filesystem storage provider — serves all location types from a local directory tree.
|
|
35
|
-
*
|
|
36
|
-
* Default layout:
|
|
37
|
-
* {rootPath}/recordings-high/
|
|
38
|
-
* {rootPath}/recordings-low/
|
|
39
|
-
* {rootPath}/recordings-clips/
|
|
40
|
-
* {rootPath}/event-images/
|
|
41
|
-
* {rootPath}/models/
|
|
42
|
-
* {rootPath}/addons-data/
|
|
43
|
-
* {rootPath}/logs/
|
|
44
|
-
* /tmp/camstack-cache/ (cache is always local)
|
|
45
|
-
*
|
|
46
|
-
* Individual location paths can be overridden.
|
|
47
|
-
*/
|
|
48
|
-
var FilesystemStorageProvider = class {
|
|
49
|
-
id = "local";
|
|
50
|
-
name = "Local Filesystem";
|
|
51
|
-
supportedLocations = [...STORAGE_LOCATION_TYPES];
|
|
52
|
-
rootPath;
|
|
53
|
-
locationPaths;
|
|
54
|
-
constructor(rootPath, overrides) {
|
|
55
|
-
this.rootPath = path$1.resolve(rootPath);
|
|
56
|
-
this.locationPaths = /* @__PURE__ */ new Map();
|
|
57
|
-
for (const loc of STORAGE_LOCATION_TYPES) {
|
|
58
|
-
const override = overrides?.[loc];
|
|
59
|
-
if (override) this.locationPaths.set(loc, path$1.resolve(override));
|
|
60
|
-
else {
|
|
61
|
-
const subdir = DEFAULT_LOCATION_SUBDIRS[loc] ?? loc;
|
|
62
|
-
this.locationPaths.set(loc, path$1.isAbsolute(subdir) ? subdir : path$1.join(this.rootPath, subdir));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
for (const [loc, override] of Object.entries(overrides ?? {})) if (typeof override === "string" && !this.locationPaths.has(loc)) this.locationPaths.set(loc, path$1.resolve(override));
|
|
66
|
-
}
|
|
67
|
-
async resolve({ location, relativePath }) {
|
|
68
|
-
const base = this.locationPaths.get(location) ?? path$1.join(this.rootPath, location);
|
|
69
|
-
return path$1.join(base, relativePath);
|
|
70
|
-
}
|
|
71
|
-
async write({ location, relativePath, data }) {
|
|
72
|
-
const filePath = await this.resolve({
|
|
73
|
-
location,
|
|
74
|
-
relativePath
|
|
75
|
-
});
|
|
76
|
-
await fs.promises.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
77
|
-
if (Buffer.isBuffer(data)) await fs.promises.writeFile(filePath, data);
|
|
78
|
-
else {
|
|
79
|
-
const writeStream = fs.createWriteStream(filePath);
|
|
80
|
-
await new Promise((resolve, reject) => {
|
|
81
|
-
data.pipe(writeStream);
|
|
82
|
-
writeStream.on("finish", resolve);
|
|
83
|
-
writeStream.on("error", reject);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
async read({ location, relativePath }) {
|
|
88
|
-
return fs.promises.readFile(await this.resolve({
|
|
89
|
-
location,
|
|
90
|
-
relativePath
|
|
91
|
-
}));
|
|
92
|
-
}
|
|
93
|
-
async exists({ location, relativePath }) {
|
|
94
|
-
try {
|
|
95
|
-
await fs.promises.access(await this.resolve({
|
|
96
|
-
location,
|
|
97
|
-
relativePath
|
|
98
|
-
}));
|
|
99
|
-
return true;
|
|
100
|
-
} catch {
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
async list({ location, prefix }) {
|
|
105
|
-
const base = this.locationPaths.get(location);
|
|
106
|
-
if (!base) return [];
|
|
107
|
-
const dir = prefix ? path$1.join(base, prefix) : base;
|
|
108
|
-
try {
|
|
109
|
-
return (await fs.promises.readdir(dir, { withFileTypes: true })).map((e) => prefix ? `${prefix}/${e.name}` : e.name);
|
|
110
|
-
} catch {
|
|
111
|
-
return [];
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
async delete({ location, relativePath }) {
|
|
115
|
-
const filePath = await this.resolve({
|
|
116
|
-
location,
|
|
117
|
-
relativePath
|
|
118
|
-
});
|
|
119
|
-
await fs.promises.rm(filePath, { force: true });
|
|
120
|
-
}
|
|
121
|
-
async getAvailableSpace({ location }) {
|
|
122
|
-
const base = this.locationPaths.get(location);
|
|
123
|
-
if (!base) return null;
|
|
124
|
-
try {
|
|
125
|
-
let target = base;
|
|
126
|
-
while (!fs.existsSync(target)) {
|
|
127
|
-
const parent = path$1.dirname(target);
|
|
128
|
-
if (!parent || parent === target) return null;
|
|
129
|
-
target = parent;
|
|
130
|
-
}
|
|
131
|
-
const stats = await fs.promises.statfs(target);
|
|
132
|
-
return stats.bavail * stats.bsize;
|
|
133
|
-
} catch {
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/** Get the resolved path for a location type (addon-declared ids fall back
|
|
138
|
-
* to `<rootPath>/<id>`). */
|
|
139
|
-
getLocationPath(location) {
|
|
140
|
-
return this.locationPaths.get(location) ?? path$1.join(this.rootPath, location);
|
|
141
|
-
}
|
|
142
|
-
/** Get the root path */
|
|
143
|
-
getRootPath() {
|
|
144
|
-
return this.rootPath;
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
//#endregion
|
|
148
|
-
export { FilesystemStorageProvider };
|
package/dist/node-HEkeoPPw.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
const require_dist = require("./dist-Bm5GpbGn.js");
|
|
2
|
-
let node_fs = require("node:fs");
|
|
3
|
-
node_fs = require_dist.__toESM(node_fs, 1);
|
|
4
|
-
let node_path = require("node:path");
|
|
5
|
-
node_path = require_dist.__toESM(node_path, 1);
|
|
6
|
-
require("node:crypto");
|
|
7
|
-
require("node:child_process");
|
|
8
|
-
var STORAGE_LOCATION_TYPES = [
|
|
9
|
-
"data",
|
|
10
|
-
"media",
|
|
11
|
-
"recordings",
|
|
12
|
-
"recordings-high",
|
|
13
|
-
"recordings-low",
|
|
14
|
-
"recordings-clips",
|
|
15
|
-
"event-images",
|
|
16
|
-
"models",
|
|
17
|
-
"addons-data",
|
|
18
|
-
"cache",
|
|
19
|
-
"logs",
|
|
20
|
-
"backups"
|
|
21
|
-
];
|
|
22
|
-
var DEFAULT_LOCATION_SUBDIRS = {
|
|
23
|
-
data: "db",
|
|
24
|
-
media: "media",
|
|
25
|
-
recordings: "recordings",
|
|
26
|
-
"recordings-high": "recordings-high",
|
|
27
|
-
"recordings-low": "recordings-low",
|
|
28
|
-
"recordings-clips": "recordings-clips",
|
|
29
|
-
"event-images": "event-images",
|
|
30
|
-
models: "models",
|
|
31
|
-
"addons-data": "addons-data",
|
|
32
|
-
cache: "/tmp/camstack-cache",
|
|
33
|
-
logs: "logs",
|
|
34
|
-
backups: "backups"
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Filesystem storage provider — serves all location types from a local directory tree.
|
|
38
|
-
*
|
|
39
|
-
* Default layout:
|
|
40
|
-
* {rootPath}/recordings-high/
|
|
41
|
-
* {rootPath}/recordings-low/
|
|
42
|
-
* {rootPath}/recordings-clips/
|
|
43
|
-
* {rootPath}/event-images/
|
|
44
|
-
* {rootPath}/models/
|
|
45
|
-
* {rootPath}/addons-data/
|
|
46
|
-
* {rootPath}/logs/
|
|
47
|
-
* /tmp/camstack-cache/ (cache is always local)
|
|
48
|
-
*
|
|
49
|
-
* Individual location paths can be overridden.
|
|
50
|
-
*/
|
|
51
|
-
var FilesystemStorageProvider = class {
|
|
52
|
-
id = "local";
|
|
53
|
-
name = "Local Filesystem";
|
|
54
|
-
supportedLocations = [...STORAGE_LOCATION_TYPES];
|
|
55
|
-
rootPath;
|
|
56
|
-
locationPaths;
|
|
57
|
-
constructor(rootPath, overrides) {
|
|
58
|
-
this.rootPath = node_path.resolve(rootPath);
|
|
59
|
-
this.locationPaths = /* @__PURE__ */ new Map();
|
|
60
|
-
for (const loc of STORAGE_LOCATION_TYPES) {
|
|
61
|
-
const override = overrides?.[loc];
|
|
62
|
-
if (override) this.locationPaths.set(loc, node_path.resolve(override));
|
|
63
|
-
else {
|
|
64
|
-
const subdir = DEFAULT_LOCATION_SUBDIRS[loc] ?? loc;
|
|
65
|
-
this.locationPaths.set(loc, node_path.isAbsolute(subdir) ? subdir : node_path.join(this.rootPath, subdir));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
for (const [loc, override] of Object.entries(overrides ?? {})) if (typeof override === "string" && !this.locationPaths.has(loc)) this.locationPaths.set(loc, node_path.resolve(override));
|
|
69
|
-
}
|
|
70
|
-
async resolve({ location, relativePath }) {
|
|
71
|
-
const base = this.locationPaths.get(location) ?? node_path.join(this.rootPath, location);
|
|
72
|
-
return node_path.join(base, relativePath);
|
|
73
|
-
}
|
|
74
|
-
async write({ location, relativePath, data }) {
|
|
75
|
-
const filePath = await this.resolve({
|
|
76
|
-
location,
|
|
77
|
-
relativePath
|
|
78
|
-
});
|
|
79
|
-
await node_fs.promises.mkdir(node_path.dirname(filePath), { recursive: true });
|
|
80
|
-
if (Buffer.isBuffer(data)) await node_fs.promises.writeFile(filePath, data);
|
|
81
|
-
else {
|
|
82
|
-
const writeStream = node_fs.createWriteStream(filePath);
|
|
83
|
-
await new Promise((resolve, reject) => {
|
|
84
|
-
data.pipe(writeStream);
|
|
85
|
-
writeStream.on("finish", resolve);
|
|
86
|
-
writeStream.on("error", reject);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async read({ location, relativePath }) {
|
|
91
|
-
return node_fs.promises.readFile(await this.resolve({
|
|
92
|
-
location,
|
|
93
|
-
relativePath
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
async exists({ location, relativePath }) {
|
|
97
|
-
try {
|
|
98
|
-
await node_fs.promises.access(await this.resolve({
|
|
99
|
-
location,
|
|
100
|
-
relativePath
|
|
101
|
-
}));
|
|
102
|
-
return true;
|
|
103
|
-
} catch {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
async list({ location, prefix }) {
|
|
108
|
-
const base = this.locationPaths.get(location);
|
|
109
|
-
if (!base) return [];
|
|
110
|
-
const dir = prefix ? node_path.join(base, prefix) : base;
|
|
111
|
-
try {
|
|
112
|
-
return (await node_fs.promises.readdir(dir, { withFileTypes: true })).map((e) => prefix ? `${prefix}/${e.name}` : e.name);
|
|
113
|
-
} catch {
|
|
114
|
-
return [];
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
async delete({ location, relativePath }) {
|
|
118
|
-
const filePath = await this.resolve({
|
|
119
|
-
location,
|
|
120
|
-
relativePath
|
|
121
|
-
});
|
|
122
|
-
await node_fs.promises.rm(filePath, { force: true });
|
|
123
|
-
}
|
|
124
|
-
async getAvailableSpace({ location }) {
|
|
125
|
-
const base = this.locationPaths.get(location);
|
|
126
|
-
if (!base) return null;
|
|
127
|
-
try {
|
|
128
|
-
let target = base;
|
|
129
|
-
while (!node_fs.existsSync(target)) {
|
|
130
|
-
const parent = node_path.dirname(target);
|
|
131
|
-
if (!parent || parent === target) return null;
|
|
132
|
-
target = parent;
|
|
133
|
-
}
|
|
134
|
-
const stats = await node_fs.promises.statfs(target);
|
|
135
|
-
return stats.bavail * stats.bsize;
|
|
136
|
-
} catch {
|
|
137
|
-
return null;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
/** Get the resolved path for a location type (addon-declared ids fall back
|
|
141
|
-
* to `<rootPath>/<id>`). */
|
|
142
|
-
getLocationPath(location) {
|
|
143
|
-
return this.locationPaths.get(location) ?? node_path.join(this.rootPath, location);
|
|
144
|
-
}
|
|
145
|
-
/** Get the root path */
|
|
146
|
-
getRootPath() {
|
|
147
|
-
return this.rootPath;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
//#endregion
|
|
151
|
-
exports.FilesystemStorageProvider = FilesystemStorageProvider;
|