@camstack/system 1.2.471 → 1.2.473

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.
Files changed (95) hide show
  1. package/dist/addon-runner.js +202 -8
  2. package/dist/addon-runner.mjs +203 -9
  3. package/dist/addon-utils.mjs +1 -1
  4. package/dist/{agent-https-bH6bKDeK.js → agent-https-B9Q3-IKd.js} +2 -5
  5. package/dist/{agent-https-DHBvFZJS.mjs → agent-https-DOwn4pqL.mjs} +3 -6
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  10. package/dist/builtins/alerts/alerts.addon.js +1 -1
  11. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  12. package/dist/builtins/autotrack/index.js +1 -1
  13. package/dist/builtins/autotrack/index.mjs +1 -1
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  16. package/dist/builtins/calendars/calendars.addon.js +1 -1
  17. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  18. package/dist/builtins/camera-grid/index.js +1 -1
  19. package/dist/builtins/camera-grid/index.mjs +1 -1
  20. package/dist/builtins/composer/composer.addon.js +2 -2
  21. package/dist/builtins/composer/composer.addon.mjs +2 -2
  22. package/dist/builtins/console-logging/index.js +1 -1
  23. package/dist/builtins/console-logging/index.mjs +1 -1
  24. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  25. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  26. package/dist/builtins/device-history/device-history.addon.js +1 -1
  27. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  28. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  29. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  30. package/dist/builtins/hub-forwarder/index.js +1 -1
  31. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  32. package/dist/builtins/keychain/index.js +3 -3
  33. package/dist/builtins/keychain/index.mjs +3 -3
  34. package/dist/builtins/liveness-monitor/liveness-monitor.addon.d.ts +9 -25
  35. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +240 -39
  36. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +237 -38
  37. package/dist/builtins/liveness-monitor/liveness-reporter.d.ts +28 -0
  38. package/dist/builtins/liveness-monitor/storage-root-access.d.ts +53 -0
  39. package/dist/builtins/local-auth/local-auth.addon.js +16 -2
  40. package/dist/builtins/local-auth/local-auth.addon.mjs +19 -5
  41. package/dist/builtins/local-auth/person-scopes.d.ts +7 -0
  42. package/dist/builtins/local-network/local-network.addon.js +2 -2
  43. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  44. package/dist/builtins/loki-logging/index.js +1 -1
  45. package/dist/builtins/loki-logging/index.mjs +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  47. package/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  48. package/dist/builtins/platform-probe/accelerator-facts-probe.d.ts +24 -0
  49. package/dist/builtins/platform-probe/index.js +110 -10
  50. package/dist/builtins/platform-probe/index.mjs +116 -17
  51. package/dist/builtins/platform-probe/platform-scorer.d.ts +10 -2
  52. package/dist/builtins/record-entries/index.js +1 -1
  53. package/dist/builtins/record-entries/index.mjs +1 -1
  54. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  55. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  56. package/dist/builtins/snapshot/index.js +1 -1
  57. package/dist/builtins/snapshot/index.mjs +1 -1
  58. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  59. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  60. package/dist/builtins/sqlite-storage/index.js +1 -1
  61. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  62. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  63. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  64. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  65. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  66. package/dist/builtins/system-config/system-config.addon.js +3 -3
  67. package/dist/builtins/system-config/system-config.addon.mjs +115 -115
  68. package/dist/builtins/winston-logging/index.js +1 -1
  69. package/dist/builtins/winston-logging/index.mjs +1 -1
  70. package/dist/{composition-sources-B5uJZXZ1.js → composition-sources-Dj_nInUQ.js} +1 -1
  71. package/dist/{composition-sources-DRw_vBKH.mjs → composition-sources-cwD35HB0.mjs} +1 -1
  72. package/dist/{constants-CToE4OFp.js → constants-XkWSVvgY.js} +1 -1
  73. package/dist/{constants-5lA8Z9d8.mjs → constants-p5mPM1iL.mjs} +1 -1
  74. package/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  75. package/dist/{custom-action-registry-BGYDjTqY.mjs → custom-action-registry-DZSCLBuT.mjs} +37 -37
  76. package/dist/{device-ca-nOCYVFS4.js → device-ca-BXzQ1pYj.js} +1 -1
  77. package/dist/{device-ca-URrs1lxK.mjs → device-ca-DyUtcpf4.mjs} +1 -1
  78. package/dist/{dist-BjcWEfRy.js → dist-Bmah6waF.js} +209 -266
  79. package/dist/{dist-5XUG7iYJ.mjs → dist-C9lbdBL5.mjs} +204 -267
  80. package/dist/file-host-worker.js +1 -1
  81. package/dist/file-host-worker.mjs +1 -1
  82. package/dist/{hub-mdns-ciao-zD3JojB_.mjs → hub-mdns-ciao-BemeCNGe.mjs} +2 -2
  83. package/dist/{hub-mdns-ciao-vEWhJ_SD.js → hub-mdns-ciao-CUr6ewsX.js} +2 -2
  84. package/dist/index.js +236 -16
  85. package/dist/index.mjs +455 -235
  86. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +24 -4
  87. package/dist/kernel/hwaccel/vaapi-init-probe.d.ts +29 -0
  88. package/dist/kernel/moleculer/runner-process-group.d.ts +4 -0
  89. package/dist/{restore-archive-CN1pJTRn.mjs → restore-archive-C0aohmAK.mjs} +94 -94
  90. package/dist/{restore-archive-B64m2nAj.js → restore-archive-DbPmyjiM.js} +1 -1
  91. package/dist/{retired-settings-keys-C_Kjp-Bj.mjs → retired-settings-keys-CWp7ZSeA.mjs} +8 -0
  92. package/dist/{retired-settings-keys-CGUqX-Oz.js → retired-settings-keys-DorakcxV.js} +8 -0
  93. package/dist/{wal-maintenance-BNXVX-ot.js → wal-maintenance-BT8Ns0W3.js} +0 -0
  94. package/dist/{wal-maintenance-Bl2I-ZcR.mjs → wal-maintenance-BuB731DK.mjs} +0 -0
  95. package/package.json +6 -6
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BjcWEfRy.js");
6
+ const require_dist = require("../../dist-Bmah6waF.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  const require_log_file_read_protocol = require("../../log-file-read-protocol-D0WcLbIV.js");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ln as logDestinationCapability, ei as BaseAddon } from "../../dist-5XUG7iYJ.mjs";
1
+ import { Ln as logDestinationCapability, ti as BaseAddon } from "../../dist-C9lbdBL5.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-B7M3X3bT.mjs";
4
4
  import { createRequire } from "node:module";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BjcWEfRy.js");
1
+ const require_dist = require("./dist-Bmah6waF.js");
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- import { $r as errMsg, Kr as compositionSourceKey } from "./dist-5XUG7iYJ.mjs";
1
+ import { ei as errMsg, qr as compositionSourceKey } from "./dist-C9lbdBL5.mjs";
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,5 +1,5 @@
1
1
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
2
- var MESH_CA_KEY_REF = require("./dist-BjcWEfRy.js").buildSecretRef({
2
+ var MESH_CA_KEY_REF = require("./dist-Bmah6waF.js").buildSecretRef({
3
3
  owner: "system",
4
4
  scope: { kind: "global" },
5
5
  fieldPath: "meshCaKey"
@@ -1,4 +1,4 @@
1
- import { Ri as buildSecretRef } from "./dist-5XUG7iYJ.mjs";
1
+ import { zi as buildSecretRef } from "./dist-C9lbdBL5.mjs";
2
2
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
3
3
  var MESH_CA_KEY_REF = buildSecretRef({
4
4
  owner: "system",
@@ -1,5 +1,5 @@
1
1
  import { EDGETPU_LIB_ENV, chooseEdgetpuDelegate, nodeDataRootFromEnv } from "@camstack/types/node";
2
- import Kt from "node:fs";
2
+ import fs from "node:fs";
3
3
  //#region src/builtins/platform-probe/coral-accelerators.ts
4
4
  /**
5
5
  * Coral USB Edge TPU USB identifiers.
@@ -185,21 +185,21 @@ function detectCoralAccelerator(fsx, delegateHost = currentDelegateHost()) {
185
185
  }
186
186
  function safeListOrNull(dir) {
187
187
  try {
188
- return Kt.readdirSync(dir);
188
+ return fs.readdirSync(dir);
189
189
  } catch {
190
190
  return null;
191
191
  }
192
192
  }
193
193
  function safeList(dir) {
194
194
  try {
195
- return Kt.readdirSync(dir);
195
+ return fs.readdirSync(dir);
196
196
  } catch {
197
197
  return [];
198
198
  }
199
199
  }
200
200
  function safeRead(path) {
201
201
  try {
202
- return Kt.readFileSync(path, "utf8").trim();
202
+ return fs.readFileSync(path, "utf8").trim();
203
203
  } catch {
204
204
  return "";
205
205
  }
@@ -213,7 +213,7 @@ var nodeCoralFs = {
213
213
  listApexClass: () => safeList("/sys/class/apex"),
214
214
  canOpen: (path) => {
215
215
  try {
216
- Kt.accessSync(path, Kt.constants.R_OK | Kt.constants.W_OK);
216
+ fs.accessSync(path, fs.constants.R_OK | fs.constants.W_OK);
217
217
  return true;
218
218
  } catch {
219
219
  return false;
@@ -221,7 +221,7 @@ var nodeCoralFs = {
221
221
  },
222
222
  exists: (path) => {
223
223
  try {
224
- return Kt.existsSync(path);
224
+ return fs.existsSync(path);
225
225
  } catch {
226
226
  return false;
227
227
  }
@@ -3,7 +3,7 @@ import * as path$1 from "node:path";
3
3
  import path from "node:path";
4
4
  import { promisify } from "node:util";
5
5
  import { HF_REPO, MODEL_FORMATS, describeCustomActions, hfModelUrl } from "@camstack/types/addon";
6
- import * as fs from "node:fs";
6
+ import * as fs$1 from "node:fs";
7
7
  import { createReadStream, promises } from "node:fs";
8
8
  import { createServer } from "node:http";
9
9
  import { brotliCompress, constants as constants$1, gzip } from "node:zlib";
@@ -159,7 +159,7 @@ var HOSTED_MODEL_REVISIONS = {
159
159
  //#endregion
160
160
  //#region src/download/model-downloader.ts
161
161
  function isNonEmptyFile(filePath) {
162
- return fs.existsSync(filePath) && fs.statSync(filePath).size > 0;
162
+ return fs$1.existsSync(filePath) && fs$1.statSync(filePath).size > 0;
163
163
  }
164
164
  /**
165
165
  * Sibling files of a single-file (non-directory) format — extra files the
@@ -236,11 +236,11 @@ function resolveRedirectUrl(current, location) {
236
236
  return new URL(location, current);
237
237
  }
238
238
  async function downloadFile(url, destPath, onProgressOrOptions) {
239
- if (fs.existsSync(destPath)) return destPath;
239
+ if (fs$1.existsSync(destPath)) return destPath;
240
240
  const opts = normalizeDownloadOptions(onProgressOrOptions);
241
241
  const fetchImpl = opts.fetchImpl ?? fetch;
242
242
  const maxRedirects = opts.maxRedirects ?? DEFAULT_MAX_REDIRECTS;
243
- fs.mkdirSync(path$1.dirname(destPath), { recursive: true });
243
+ fs$1.mkdirSync(path$1.dirname(destPath), { recursive: true });
244
244
  const tmpPath = destPath + ".downloading";
245
245
  try {
246
246
  let current = url;
@@ -278,7 +278,7 @@ async function downloadFile(url, destPath, onProgressOrOptions) {
278
278
  if (!response.body) throw new Error(`No response body from ${url}`);
279
279
  const total = parseInt(response.headers.get("content-length") ?? "0", 10);
280
280
  let downloaded = 0;
281
- const fileStream = fs.createWriteStream(tmpPath);
281
+ const fileStream = fs$1.createWriteStream(tmpPath);
282
282
  const reader = response.body.getReader();
283
283
  try {
284
284
  for (;;) {
@@ -296,11 +296,11 @@ async function downloadFile(url, destPath, onProgressOrOptions) {
296
296
  fileStream.on("error", reject);
297
297
  });
298
298
  }
299
- fs.renameSync(tmpPath, destPath);
299
+ fs$1.renameSync(tmpPath, destPath);
300
300
  return destPath;
301
301
  } catch (err) {
302
302
  try {
303
- fs.unlinkSync(tmpPath);
303
+ fs$1.unlinkSync(tmpPath);
304
304
  } catch {}
305
305
  throw err;
306
306
  }
@@ -324,12 +324,12 @@ async function downloadModel(options) {
324
324
  const { url, fallbackUrls = [], destDir, filename, expectedSha256, onProgress } = options;
325
325
  const fname = filename ?? url.split("/").pop() ?? "model.bin";
326
326
  const destPath = path$1.join(destDir, fname);
327
- if (fs.existsSync(destPath)) return {
327
+ if (fs$1.existsSync(destPath)) return {
328
328
  filePath: destPath,
329
329
  downloadedBytes: 0,
330
330
  fromCache: true
331
331
  };
332
- fs.mkdirSync(destDir, { recursive: true });
332
+ fs$1.mkdirSync(destDir, { recursive: true });
333
333
  const urls = [url, ...fallbackUrls];
334
334
  let lastError = null;
335
335
  for (const tryUrl of urls) try {
@@ -337,25 +337,25 @@ async function downloadModel(options) {
337
337
  if (expectedSha256) {
338
338
  const hash = await computeSha256(destPath);
339
339
  if (hash !== expectedSha256) {
340
- fs.unlinkSync(destPath);
340
+ fs$1.unlinkSync(destPath);
341
341
  throw new Error(`SHA256 mismatch: expected ${expectedSha256}, got ${hash}`);
342
342
  }
343
343
  }
344
344
  return {
345
345
  filePath: destPath,
346
- downloadedBytes: fs.statSync(destPath).size,
346
+ downloadedBytes: fs$1.statSync(destPath).size,
347
347
  fromCache: false
348
348
  };
349
349
  } catch (e) {
350
350
  lastError = e;
351
- if (fs.existsSync(destPath)) fs.unlinkSync(destPath);
351
+ if (fs$1.existsSync(destPath)) fs$1.unlinkSync(destPath);
352
352
  }
353
353
  throw lastError ?? /* @__PURE__ */ new Error(`Failed to download model from ${url}`);
354
354
  }
355
355
  async function computeSha256(filePath) {
356
356
  return new Promise((resolve, reject) => {
357
357
  const hash = createHash("sha256");
358
- const stream = fs.createReadStream(filePath);
358
+ const stream = fs$1.createReadStream(filePath);
359
359
  stream.on("data", (chunk) => hash.update(chunk));
360
360
  stream.on("end", () => resolve(hash.digest("hex")));
361
361
  stream.on("error", reject);
@@ -380,28 +380,28 @@ async function downloadDirectory(url, destDir, knownFiles, onProgress) {
380
380
  fileUrl: `https://huggingface.co/${repo}/resolve/main/${dirPath}/${f}`
381
381
  }));
382
382
  const tmpDir = destDir + ".downloading";
383
- fs.rmSync(tmpDir, {
383
+ fs$1.rmSync(tmpDir, {
384
384
  recursive: true,
385
385
  force: true
386
386
  });
387
- fs.mkdirSync(tmpDir, { recursive: true });
387
+ fs$1.mkdirSync(tmpDir, { recursive: true });
388
388
  let totalDownloaded = 0;
389
389
  try {
390
390
  for (const file of files) {
391
391
  const destPath = path$1.join(tmpDir, file.relativePath);
392
- fs.mkdirSync(path$1.dirname(destPath), { recursive: true });
392
+ fs$1.mkdirSync(path$1.dirname(destPath), { recursive: true });
393
393
  await downloadFile(file.fileUrl, destPath, (downloaded, _total) => {
394
394
  onProgress?.(totalDownloaded + downloaded, void 0);
395
395
  });
396
- totalDownloaded += fs.statSync(destPath).size;
396
+ totalDownloaded += fs$1.statSync(destPath).size;
397
397
  }
398
- fs.rmSync(destDir, {
398
+ fs$1.rmSync(destDir, {
399
399
  recursive: true,
400
400
  force: true
401
401
  });
402
- fs.renameSync(tmpDir, destDir);
402
+ fs$1.renameSync(tmpDir, destDir);
403
403
  } catch (err) {
404
- fs.rmSync(tmpDir, {
404
+ fs$1.rmSync(tmpDir, {
405
405
  recursive: true,
406
406
  force: true
407
407
  });
@@ -433,7 +433,7 @@ function revisionRecordPath(modelPath) {
433
433
  }
434
434
  function readRevisionRecord(modelPath) {
435
435
  try {
436
- return fs.readFileSync(revisionRecordPath(modelPath), "utf8").trim();
436
+ return fs$1.readFileSync(revisionRecordPath(modelPath), "utf8").trim();
437
437
  } catch {
438
438
  return null;
439
439
  }
@@ -497,8 +497,8 @@ function writeRevisionRecord(modelPath, revision) {
497
497
  if (revision === void 0) return;
498
498
  const record = revisionRecordPath(modelPath);
499
499
  const tmp = `${record}.tmp`;
500
- fs.writeFileSync(tmp, `${revision}\n`);
501
- fs.renameSync(tmp, record);
500
+ fs$1.writeFileSync(tmp, `${revision}\n`);
501
+ fs$1.renameSync(tmp, record);
502
502
  }
503
503
  /**
504
504
  * Prove an unrecorded (or differently recorded) copy current by hashing its
@@ -518,9 +518,9 @@ async function adoptByHash(modelsDir, modelPath, formatEntry) {
518
518
  }
519
519
  /** True when every file of the format is on disk, whatever revision it holds. */
520
520
  function isCompleteCopy(modelsDir, modelPath, formatEntry) {
521
- if (!fs.existsSync(modelPath)) return false;
522
- if (formatEntry.isDirectory) return fs.existsSync(path$1.join(modelPath, "Manifest.json"));
523
- if (fs.statSync(modelPath).size <= 0) return false;
521
+ if (!fs$1.existsSync(modelPath)) return false;
522
+ if (formatEntry.isDirectory) return fs$1.existsSync(path$1.join(modelPath, "Manifest.json"));
523
+ if (fs$1.statSync(modelPath).size <= 0) return false;
524
524
  return siblingFilesFor(formatEntry).every((f) => isNonEmptyFile(path$1.join(modelsDir, f)));
525
525
  }
526
526
  /**
@@ -542,14 +542,14 @@ async function replaceSingleFileFormat(url, modelPath, modelsDir, siblings, onPr
542
542
  }));
543
543
  try {
544
544
  for (const [i, part] of parts.entries()) {
545
- fs.rmSync(part.staged, { force: true });
545
+ fs$1.rmSync(part.staged, { force: true });
546
546
  await downloadFile(part.url, part.staged, i === 0 ? (downloaded, total) => onProgress?.(downloaded, total === 0 ? void 0 : total) : void 0);
547
547
  }
548
548
  } catch (err) {
549
- for (const part of parts) fs.rmSync(part.staged, { force: true });
549
+ for (const part of parts) fs$1.rmSync(part.staged, { force: true });
550
550
  throw err;
551
551
  }
552
- for (const part of parts) fs.renameSync(part.staged, part.dest);
552
+ for (const part of parts) fs$1.renameSync(part.staged, part.dest);
553
553
  }
554
554
  /**
555
555
  * Resolve a `ModelCatalogEntry` against `modelsDir`: download model file
@@ -564,14 +564,14 @@ async function ensureModel(modelsDir, entry, format, onProgress) {
564
564
  const modelPath = path$1.join(modelsDir, filename);
565
565
  const siblings = siblingFilesFor(formatEntry);
566
566
  let outdated = false;
567
- if (fs.existsSync(modelPath)) if (formatEntry.isDirectory && !fs.existsSync(path$1.join(modelPath, "Manifest.json"))) fs.rmSync(modelPath, {
567
+ if (fs$1.existsSync(modelPath)) if (formatEntry.isDirectory && !fs$1.existsSync(path$1.join(modelPath, "Manifest.json"))) fs$1.rmSync(modelPath, {
568
568
  recursive: true,
569
569
  force: true
570
570
  });
571
571
  else if (siblings.some((f) => !isNonEmptyFile(path$1.join(modelsDir, f)))) outdated = !isCurrentRevision(modelPath, formatEntry) && !await adoptByHash(modelsDir, modelPath, formatEntry);
572
572
  else if (isCurrentRevision(modelPath, formatEntry) || await adoptByHash(modelsDir, modelPath, formatEntry)) return modelPath;
573
573
  else outdated = true;
574
- fs.mkdirSync(modelsDir, { recursive: true });
574
+ fs$1.mkdirSync(modelsDir, { recursive: true });
575
575
  if (formatEntry.isDirectory) await downloadDirectory(formatEntry.url, modelPath, formatEntry.files, onProgress);
576
576
  else if (outdated) await replaceSingleFileFormat(formatEntry.url, modelPath, modelsDir, siblings, onProgress);
577
577
  else {
@@ -629,25 +629,25 @@ function isModelDownloaded(modelsDir, entry, format) {
629
629
  const formatEntry = entry.formats[format];
630
630
  if (!formatEntry) return false;
631
631
  const modelPath = getModelFilePath(modelsDir, entry, format);
632
- if (!modelPath || !fs.existsSync(modelPath)) return false;
632
+ if (!modelPath || !fs$1.existsSync(modelPath)) return false;
633
633
  if (!isCurrentRevision(modelPath, formatEntry)) return false;
634
634
  return isCompleteCopy(modelsDir, modelPath, formatEntry);
635
635
  }
636
636
  /** Remove the on-disk model file/directory. Returns true if something was deleted. */
637
637
  function deleteModelFromDisk(modelsDir, entry, format) {
638
638
  const modelPath = getModelFilePath(modelsDir, entry, format);
639
- if (!modelPath || !fs.existsSync(modelPath)) return false;
640
- fs.rmSync(revisionRecordPath(modelPath), { force: true });
639
+ if (!modelPath || !fs$1.existsSync(modelPath)) return false;
640
+ fs$1.rmSync(revisionRecordPath(modelPath), { force: true });
641
641
  const formatEntry = entry.formats[format];
642
- if (formatEntry?.isDirectory) fs.rmSync(modelPath, {
642
+ if (formatEntry?.isDirectory) fs$1.rmSync(modelPath, {
643
643
  recursive: true,
644
644
  force: true
645
645
  });
646
646
  else {
647
- fs.unlinkSync(modelPath);
647
+ fs$1.unlinkSync(modelPath);
648
648
  if (formatEntry) for (const sibling of siblingFilesFor(formatEntry)) {
649
649
  const sibPath = path$1.join(modelsDir, sibling);
650
- if (fs.existsSync(sibPath)) fs.unlinkSync(sibPath);
650
+ if (fs$1.existsSync(sibPath)) fs$1.unlinkSync(sibPath);
651
651
  }
652
652
  }
653
653
  return true;
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BjcWEfRy.js");
1
+ const require_dist = require("./dist-Bmah6waF.js");
2
2
  const require_x509_es = require("./x509.es-C4cOo48M.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -1,4 +1,4 @@
1
- import { A as DEVICE_SAN_USER_PREFIX, Ri as buildSecretRef, k as DEVICE_SAN_CREDENTIAL_PREFIX } from "./dist-5XUG7iYJ.mjs";
1
+ import { A as DEVICE_SAN_USER_PREFIX, k as DEVICE_SAN_CREDENTIAL_PREFIX, zi as buildSecretRef } from "./dist-C9lbdBL5.mjs";
2
2
  import { S as backdatedNotBefore, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-DK__ETIe.mjs";
3
3
  import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
4
4
  //#region src/auth/jwt-signing-key.ts