@camstack/addon-provider-reolink 1.1.2 → 1.1.4
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/addon.js +17 -8
- package/dist/addon.mjs +17 -8
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -4655,7 +4655,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4655
4655
|
return inst;
|
|
4656
4656
|
}
|
|
4657
4657
|
//#endregion
|
|
4658
|
-
//#region ../types/dist/sleep-
|
|
4658
|
+
//#region ../types/dist/sleep-_J5S7OEP.mjs
|
|
4659
4659
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4660
4660
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4661
4661
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5770,15 +5770,24 @@ var BaseAddon = class {
|
|
|
5770
5770
|
} catch {}
|
|
5771
5771
|
}
|
|
5772
5772
|
/**
|
|
5773
|
-
* Resolve the shared models directory
|
|
5774
|
-
*
|
|
5775
|
-
*
|
|
5773
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5774
|
+
*
|
|
5775
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5776
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5777
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5778
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5779
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5780
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5781
|
+
*
|
|
5782
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5783
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5776
5784
|
*/
|
|
5777
5785
|
async resolveModelsDir() {
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5786
|
+
const { join } = await import("node:path");
|
|
5787
|
+
const { promises: fsp } = await import("node:fs");
|
|
5788
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5789
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5790
|
+
return dir;
|
|
5782
5791
|
}
|
|
5783
5792
|
/**
|
|
5784
5793
|
* Access the runtime capability registry for in-process provider lookups.
|
package/dist/addon.mjs
CHANGED
|
@@ -4650,7 +4650,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4650
4650
|
return inst;
|
|
4651
4651
|
}
|
|
4652
4652
|
//#endregion
|
|
4653
|
-
//#region ../types/dist/sleep-
|
|
4653
|
+
//#region ../types/dist/sleep-_J5S7OEP.mjs
|
|
4654
4654
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4655
4655
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4656
4656
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5765,15 +5765,24 @@ var BaseAddon = class {
|
|
|
5765
5765
|
} catch {}
|
|
5766
5766
|
}
|
|
5767
5767
|
/**
|
|
5768
|
-
* Resolve the shared models directory
|
|
5769
|
-
*
|
|
5770
|
-
*
|
|
5768
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5769
|
+
*
|
|
5770
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5771
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5772
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5773
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5774
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5775
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5776
|
+
*
|
|
5777
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5778
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5771
5779
|
*/
|
|
5772
5780
|
async resolveModelsDir() {
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5781
|
+
const { join } = await import("node:path");
|
|
5782
|
+
const { promises: fsp } = await import("node:fs");
|
|
5783
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5784
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5785
|
+
return dir;
|
|
5777
5786
|
}
|
|
5778
5787
|
/**
|
|
5779
5788
|
* Access the runtime capability registry for in-process provider lookups.
|