@camstack/server 1.2.928 → 1.2.929

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 (237) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +10 -8
  3. package/system/dist/addon-id-CVg1_r5E.mjs +39 -0
  4. package/system/dist/addon-id-Di0lNJ89.js +50 -0
  5. package/system/dist/addon-pages.cap-Df9FQwN1.js +49 -0
  6. package/system/dist/addon-pages.cap-DksUlE8j.mjs +44 -0
  7. package/system/dist/addon-settings.cap-3-TIIMq_.mjs +592 -0
  8. package/system/dist/addon-settings.cap-DAiE0Nb0.js +651 -0
  9. package/system/dist/addon-utils.mjs +1 -1
  10. package/system/dist/addon-widgets.cap-C4jxflbF.js +200 -0
  11. package/system/dist/addon-widgets.cap-D9m48X78.mjs +183 -0
  12. package/system/dist/base-addon-DD5dIfcZ.js +4624 -0
  13. package/system/dist/base-addon-Md14i7pe.mjs +4505 -0
  14. package/system/dist/base-device-2sL1DMm1.js +1103 -0
  15. package/system/dist/base-device-IuM1AwXZ.mjs +1098 -0
  16. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +8 -6
  17. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +6 -4
  18. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +8 -6
  19. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +7 -5
  20. package/system/dist/builtins/alerts/alerts.addon.js +113 -56
  21. package/system/dist/builtins/alerts/alerts.addon.mjs +60 -3
  22. package/system/dist/builtins/autotrack/index.js +21 -17
  23. package/system/dist/builtins/autotrack/index.mjs +5 -1
  24. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +14 -11
  25. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +8 -5
  26. package/system/dist/builtins/calendars/calendars.addon.js +8 -6
  27. package/system/dist/builtins/calendars/calendars.addon.mjs +3 -1
  28. package/system/dist/builtins/camera-grid/index.js +615 -58
  29. package/system/dist/builtins/camera-grid/index.mjs +558 -1
  30. package/system/dist/builtins/composer/composer.addon.js +788 -209
  31. package/system/dist/builtins/composer/composer.addon.mjs +583 -4
  32. package/system/dist/builtins/console-logging/index.js +4 -3
  33. package/system/dist/builtins/console-logging/index.mjs +2 -1
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.js +7887 -381
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +7511 -5
  36. package/system/dist/builtins/core-notifier/core-notifier.addon.js +731 -21
  37. package/system/dist/builtins/core-notifier/core-notifier.addon.mjs +711 -1
  38. package/system/dist/builtins/device-history/device-history.addon.js +110 -31
  39. package/system/dist/builtins/device-history/device-history.addon.mjs +81 -2
  40. package/system/dist/builtins/device-manager/device-manager.addon.js +12806 -227
  41. package/system/dist/builtins/device-manager/device-manager.addon.mjs +12583 -5
  42. package/system/dist/builtins/hub-forwarder/index.js +4 -3
  43. package/system/dist/builtins/hub-forwarder/index.mjs +2 -1
  44. package/system/dist/builtins/keychain/index.js +31 -28
  45. package/system/dist/builtins/keychain/index.mjs +7 -4
  46. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +15 -12
  47. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +4 -1
  48. package/system/dist/builtins/local-auth/local-auth.addon.js +140 -39
  49. package/system/dist/builtins/local-auth/local-auth.addon.mjs +106 -6
  50. package/system/dist/builtins/local-network/local-network.addon.js +43 -39
  51. package/system/dist/builtins/local-network/local-network.addon.mjs +7 -3
  52. package/system/dist/builtins/loki-logging/index.js +23 -17
  53. package/system/dist/builtins/loki-logging/index.mjs +7 -1
  54. package/system/dist/builtins/native-metrics/native-metrics.addon.js +156 -15
  55. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +151 -10
  56. package/system/dist/builtins/platform-probe/index.js +25 -23
  57. package/system/dist/builtins/platform-probe/index.mjs +12 -10
  58. package/system/dist/builtins/record-entries/index.js +9 -7
  59. package/system/dist/builtins/record-entries/index.mjs +3 -1
  60. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +4 -4
  61. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  62. package/system/dist/builtins/snapshot/index.js +97 -44
  63. package/system/dist/builtins/snapshot/index.mjs +54 -1
  64. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +5 -4
  65. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +21 -20
  66. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  67. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  68. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +87 -61
  69. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +29 -3
  70. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +81 -72
  71. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +10 -1
  72. package/system/dist/builtins/system-config/system-config.addon.js +17 -14
  73. package/system/dist/builtins/system-config/system-config.addon.mjs +118 -115
  74. package/system/dist/builtins/winston-logging/index.js +7 -5
  75. package/system/dist/builtins/winston-logging/index.mjs +3 -1
  76. package/system/dist/calendars.cap-CaFlShS9.js +155 -0
  77. package/system/dist/calendars.cap-_C4eD4fi.mjs +138 -0
  78. package/system/dist/camstack-error-DJ-TUAi1.js +23 -0
  79. package/system/dist/camstack-error-viZYfcj9.mjs +18 -0
  80. package/system/dist/cap-call-context-Bd76CbOW.js +95 -0
  81. package/system/dist/cap-call-context-DNwdgGSQ.mjs +78 -0
  82. package/system/dist/capability-definition-C2rJdVeX.mjs +177 -0
  83. package/system/dist/capability-definition-HCmTem8c.js +242 -0
  84. package/system/dist/{capture-engine-BcuwOSXv.js → capture-engine-DZ0LIUqA.js} +5 -4
  85. package/system/dist/{capture-engine-Bz7eXFjT.mjs → capture-engine-DiwbjoWp.mjs} +2 -1
  86. package/system/dist/command-origin-claim-Cief660O.js +35 -0
  87. package/system/dist/command-origin-claim-D1Wy7Qld.mjs +24 -0
  88. package/system/dist/composition-sources-Caqv7O7z.mjs +391 -0
  89. package/system/dist/composition-sources-CgnHjm8Q.js +408 -0
  90. package/system/dist/{constants-D2etJ02O.js → constants-Ba3FTIHl.js} +1 -1
  91. package/system/dist/constants-C860Y6U4.js +26 -0
  92. package/system/dist/{constants-BcUTQd1M.mjs → constants-DB4piTD5.mjs} +1 -1
  93. package/system/dist/constants-DCLpoF4L.mjs +21 -0
  94. package/system/dist/coral-accelerators-7o8hqvcN.js +564 -0
  95. package/system/dist/coral-accelerators-BKcXP59c.mjs +521 -0
  96. package/system/dist/core-blocks.cap-C6iKAZ-x.mjs +17986 -0
  97. package/system/dist/core-blocks.cap-LEMqVwxO.js +18705 -0
  98. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  99. package/system/dist/custom-actions-BFUSalC9.mjs +25 -0
  100. package/system/dist/custom-actions-D92NRi2c.js +36 -0
  101. package/system/dist/database-snapshot.cap-DF38e-0P.js +162 -0
  102. package/system/dist/database-snapshot.cap-dhrc9xnY.mjs +133 -0
  103. package/system/dist/declared-device-BWphj9WE.js +303 -0
  104. package/system/dist/declared-device-CKERA1Hi.mjs +286 -0
  105. package/system/dist/{device-ca-ExMN3xW3.mjs → device-ca-BLM6fccc.mjs} +2 -1
  106. package/system/dist/{device-ca-CU8zh9Pi.js → device-ca-C5kJE6mL.js} +7 -6
  107. package/system/dist/device-certificate-Cddm4Idn.mjs +91 -0
  108. package/system/dist/device-certificate-CguVACQO.js +162 -0
  109. package/system/dist/device-identifiers-BQg9EQi1.js +600 -0
  110. package/system/dist/device-identifiers-iSuQCKmK.mjs +529 -0
  111. package/system/dist/device-kind-BJ2pfsjw.mjs +78 -0
  112. package/system/dist/device-kind-CsSiv_YF.js +101 -0
  113. package/system/dist/device-manager.cap-2abwVLCM.js +2874 -0
  114. package/system/dist/device-manager.cap-CFZSPfUh.mjs +2749 -0
  115. package/system/dist/device-provider.cap-3Uvk6f5-.mjs +331 -0
  116. package/system/dist/device-provider.cap-D7TV2kVH.js +366 -0
  117. package/system/dist/{device-row-store-CeW_GWh9.mjs → device-row-store-YF3jtmkk.mjs} +4 -1
  118. package/system/dist/{device-row-store-BMIR-n3m.js → device-row-store-doTfMOqn.js} +12 -9
  119. package/system/dist/device-transitions.cap-B5w5PYU_.js +860 -0
  120. package/system/dist/device-transitions.cap-DojcwEuX.mjs +819 -0
  121. package/system/dist/device-type-CbQsnFdC.js +477 -0
  122. package/system/dist/device-type-DgEvK3ch.mjs +454 -0
  123. package/system/dist/entry-kind-D9MuVJCK.mjs +44 -0
  124. package/system/dist/entry-kind-cq90c--V.js +55 -0
  125. package/system/dist/error.cap-CSM_SRfR.mjs +3423 -0
  126. package/system/dist/error.cap-DBhgPeWK.js +3848 -0
  127. package/system/dist/file-host-worker.js +1 -1
  128. package/system/dist/file-host-worker.mjs +1 -1
  129. package/system/dist/history-catalog-BKRarIL_.js +831 -0
  130. package/system/dist/history-catalog-BwTeQ4Mr.mjs +802 -0
  131. package/system/dist/{hub-identity-Csxx2Q8k.js → hub-identity-BMdR3Mw9.js} +2 -2
  132. package/system/dist/{hub-identity-CYC1820R.mjs → hub-identity-DjMN9Ac2.mjs} +10 -10
  133. package/system/dist/{hub-mdns-ciao-By5577HM.js → hub-mdns-ciao--0v1TKME.js} +5 -5
  134. package/system/dist/{hub-mdns-ciao-CCDxM5qz.mjs → hub-mdns-ciao-DBrtHOcc.mjs} +2 -2
  135. package/system/dist/index.js +763 -151
  136. package/system/dist/index.mjs +832 -220
  137. package/system/dist/integration-instances.cap-Cl9O-k4h.mjs +538 -0
  138. package/system/dist/integration-instances.cap-dJIxg2_s.js +549 -0
  139. package/system/dist/keychain-admin.cap-Db_oFX4H.js +425 -0
  140. package/system/dist/keychain-admin.cap-GtM7gVGG.mjs +396 -0
  141. package/system/dist/l10n-Bu6aUvSY.mjs +10 -0
  142. package/system/dist/l10n-CGMvp7NF.js +15 -0
  143. package/system/dist/labels-DX5S8deC.js +81 -0
  144. package/system/dist/labels-DsBcU7md.mjs +64 -0
  145. package/system/dist/{legacy-integration-rows-door-CVwOo5aq.js → legacy-integration-rows-door-B1nzxxr5.js} +2 -2
  146. package/system/dist/{legacy-integration-rows-door-D9tQOUzh.mjs → legacy-integration-rows-door-nTvo_6jQ.mjs} +1 -1
  147. package/system/dist/log-destination.cap-CxZzAVaR.mjs +143 -0
  148. package/system/dist/log-destination.cap-DELPJkZ0.js +148 -0
  149. package/system/dist/low-power-sleep.cap-7lfVU41N.js +103 -0
  150. package/system/dist/low-power-sleep.cap-tGPmaZ_V.mjs +92 -0
  151. package/system/dist/mask-shape-Ci8Co9w0.mjs +57 -0
  152. package/system/dist/mask-shape-CmPA2fst.js +92 -0
  153. package/system/dist/metrics-provider.cap-BNmcHDkQ.mjs +405 -0
  154. package/system/dist/metrics-provider.cap-BcmQUt6l.js +410 -0
  155. package/system/dist/migration-BMjgkyG2.js +380 -0
  156. package/system/dist/migration-DRJAtdy7.mjs +321 -0
  157. package/system/dist/network-access.cap-B5TWLDCC.js +1099 -0
  158. package/system/dist/network-access.cap-BJnGbE6n.mjs +1004 -0
  159. package/system/dist/notification-rules.cap-B__YBgnG.js +3422 -0
  160. package/system/dist/notification-rules.cap-D9ArZlwx.mjs +3357 -0
  161. package/system/dist/ops-log-CB4pIdqi.mjs +64 -0
  162. package/system/dist/ops-log-pxt9176Z.js +81 -0
  163. package/system/dist/pinned-binary-BOhOSNff.js +28 -0
  164. package/system/dist/pinned-binary-CrIRAi4G.mjs +23 -0
  165. package/system/dist/platform-probe.cap-1WrMhWHx.js +250 -0
  166. package/system/dist/platform-probe.cap-BFeqFLtQ.mjs +233 -0
  167. package/system/dist/prefix-walk-B4b2-9aK.mjs +790 -0
  168. package/system/dist/prefix-walk-DC0ljmbB.js +843 -0
  169. package/system/dist/ptz-autotrack.cap-BW7w0zHD.js +229 -0
  170. package/system/dist/ptz-autotrack.cap-DT2GypXw.mjs +224 -0
  171. package/system/dist/quantity-D3g5SxsZ.mjs +114 -0
  172. package/system/dist/quantity-lY1KiTSZ.js +143 -0
  173. package/system/dist/raw-secret-migration-DxuBFtvi.js +50 -0
  174. package/system/dist/raw-secret-migration-iv88mLoc.mjs +39 -0
  175. package/system/dist/record-entries.cap-sMUhTvTU.mjs +75 -0
  176. package/system/dist/record-entries.cap-ti1C046R.js +80 -0
  177. package/system/dist/record-kind-DoBfYHCs.js +203 -0
  178. package/system/dist/record-kind-ub6NXqfh.mjs +162 -0
  179. package/system/dist/recording-archive.cap-7OrIn9e5.mjs +1299 -0
  180. package/system/dist/recording-archive.cap-D7bo-QSM.js +1328 -0
  181. package/system/dist/records.cap-ClcWV64i.js +329 -0
  182. package/system/dist/records.cap-CwLT2ByG.mjs +294 -0
  183. package/system/dist/relocate-CdVQAk-w.js +804 -0
  184. package/system/dist/relocate-CoZZTui1.mjs +661 -0
  185. package/system/dist/rename-composition-block-7WIICIDq.mjs +33525 -0
  186. package/system/dist/rename-composition-block-CcWLwVhG.js +34692 -0
  187. package/system/dist/{restore-archive-BJfyu0sG.mjs → restore-archive-CjAyKpgX.mjs} +96 -94
  188. package/system/dist/{restore-archive-CIFvqOze.js → restore-archive-CkTkv3Ss.js} +6 -4
  189. package/system/dist/scoped-settings-CylSSq_8.js +955 -0
  190. package/system/dist/scoped-settings-DVWUIP7Z.mjs +650 -0
  191. package/system/dist/server-name-BIhLuHvX.mjs +35 -0
  192. package/system/dist/server-name-OALNvpqC.js +52 -0
  193. package/system/dist/settings-store.cap-Ci4F2zul.mjs +569 -0
  194. package/system/dist/settings-store.cap-wlJhCspr.js +640 -0
  195. package/system/dist/snapshot.cap-3suPdBHV.js +250 -0
  196. package/system/dist/snapshot.cap-Bs8Oyaqh.mjs +245 -0
  197. package/system/dist/source-info-DGB7SdB_.mjs +190 -0
  198. package/system/dist/source-info-DtWf4k2j.js +225 -0
  199. package/system/dist/storage-admin.cap-BSv1NjKJ.mjs +883 -0
  200. package/system/dist/storage-admin.cap-he0OqvVM.js +906 -0
  201. package/system/dist/storage-location-CBT8GCD6.mjs +163 -0
  202. package/system/dist/storage-location-CTweDMZf.js +198 -0
  203. package/system/dist/storage-location-mode-B21UVRRX.mjs +167 -0
  204. package/system/dist/storage-location-mode-CS4sMzo-.js +232 -0
  205. package/system/dist/storage-migration.cap-CyyATY_p.js +330 -0
  206. package/system/dist/storage-migration.cap-D7QqGobp.mjs +313 -0
  207. package/system/dist/storage-occupancy.cap-2rmnS58Z.js +622 -0
  208. package/system/dist/storage-occupancy.cap-CqBztTl9.mjs +611 -0
  209. package/system/dist/storage-provider.cap-Bw0CfxVc.js +213 -0
  210. package/system/dist/storage-provider.cap-CMeck2w4.mjs +202 -0
  211. package/system/dist/stream-catalog.cap-Bp7SkgIf.mjs +6560 -0
  212. package/system/dist/stream-catalog.cap-D3uwePiA.js +6763 -0
  213. package/system/dist/streaming-shared-B8cXatuU.mjs +431 -0
  214. package/system/dist/streaming-shared-DQwFZOSi.js +526 -0
  215. package/system/dist/system-reasons-Be_k1W8g.js +25 -0
  216. package/system/dist/system-reasons-CYj4qwyS.mjs +20 -0
  217. package/system/dist/tag-BxLazvVb.js +2138 -0
  218. package/system/dist/tag-uZBAq6ox.mjs +2073 -0
  219. package/system/dist/user-management.cap-B9QDu8NE.js +825 -0
  220. package/system/dist/user-management.cap-DBIi77sB.mjs +766 -0
  221. package/system/dist/vector-store.cap-DnyfrYDn.js +330 -0
  222. package/system/dist/vector-store.cap-h2GHWQ1t.mjs +319 -0
  223. package/system/dist/{wal-maintenance-CTrCPzds.mjs → wal-maintenance-BG01rOn9.mjs} +0 -0
  224. package/system/dist/{wal-maintenance-dq7T3quB.js → wal-maintenance-DyrebYKF.js} +0 -0
  225. package/system/dist/zod-secret-DS7mj1bk.js +78 -0
  226. package/system/dist/zod-secret-zY4nM61M.mjs +73 -0
  227. package/system/package.json +1 -1
  228. package/system/dist/composition-sources-BI614LJx.mjs +0 -141
  229. package/system/dist/composition-sources-v_kkb8A9.js +0 -152
  230. package/system/dist/coral-accelerators-BSVsBVzt.js +0 -250
  231. package/system/dist/coral-accelerators-BW3OcrLD.mjs +0 -231
  232. package/system/dist/dist-BCHMSqzc.mjs +0 -143467
  233. package/system/dist/dist-BZfvhfS1.js +0 -146970
  234. package/system/dist/prefix-walk-DAOBSyH1.mjs +0 -88
  235. package/system/dist/prefix-walk-Dv6MLZlM.js +0 -99
  236. package/system/dist/rename-composition-block-C9HuBrKS.js +0 -112
  237. package/system/dist/rename-composition-block-DtaYmYAR.mjs +0 -101
@@ -1,9 +1,11 @@
1
- import { I as DATABASE_SNAPSHOT_SUFFIX, tt as DataStoreDatabaseSchema, zl as defineRecordKinds } from "./dist-BCHMSqzc.mjs";
1
+ import { s as defineRecordKinds } from "./record-kind-ub6NXqfh.mjs";
2
+ import { a as DataStoreDatabaseSchema } from "./settings-store.cap-Ci4F2zul.mjs";
3
+ import { r as DATABASE_SNAPSHOT_SUFFIX } from "./database-snapshot.cap-dhrc9xnY.mjs";
2
4
  import { z } from "zod";
3
5
  import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
4
6
  import { Buffer as Buffer$1 } from "buffer";
5
- import * as fs$1 from "node:fs";
6
- import Kt from "node:fs";
7
+ import * as fs$2 from "node:fs";
8
+ import fs from "node:fs";
7
9
  import * as path$1 from "node:path";
8
10
  import path, { basename, join, posix, win32 } from "node:path";
9
11
  import * as fsp from "node:fs/promises";
@@ -459,7 +461,7 @@ async function readBackupEncryptionHeader(file) {
459
461
  async function decryptBackupFile(input, output, secretKey) {
460
462
  const decrypt = createBackupDecryptStream(secretKey);
461
463
  try {
462
- await pipeline(fs$1.createReadStream(input), decrypt, fs$1.createWriteStream(output, { mode: 384 }));
464
+ await pipeline(fs$2.createReadStream(input), decrypt, fs$2.createWriteStream(output, { mode: 384 }));
463
465
  } catch (err) {
464
466
  await fsp.rm(output, { force: true }).catch(() => void 0);
465
467
  throw err;
@@ -1854,15 +1856,15 @@ var An = (s) => {
1854
1856
  }, In = (s) => {
1855
1857
  let t = new st(s), e = s.file, i;
1856
1858
  try {
1857
- i = Kt.openSync(e, "r");
1858
- let r = Kt.fstatSync(i), n = s.maxReadSize || 16 * 1024 * 1024;
1859
+ i = fs.openSync(e, "r");
1860
+ let r = fs.fstatSync(i), n = s.maxReadSize || 16 * 1024 * 1024;
1859
1861
  if (r.size < n) {
1860
- let o = Buffer.allocUnsafe(r.size), a = Kt.readSync(i, o, 0, r.size, 0);
1862
+ let o = Buffer.allocUnsafe(r.size), a = fs.readSync(i, o, 0, r.size, 0);
1861
1863
  t.end(a === o.byteLength ? o : o.subarray(0, a));
1862
1864
  } else {
1863
1865
  let o = 0, a = Buffer.allocUnsafe(n);
1864
1866
  for (; o < r.size;) {
1865
- let h = Kt.readSync(i, a, 0, n, o);
1867
+ let h = fs.readSync(i, a, 0, n, o);
1866
1868
  if (h === 0) break;
1867
1869
  o += h, t.write(a.subarray(0, h));
1868
1870
  }
@@ -1870,13 +1872,13 @@ var An = (s) => {
1870
1872
  }
1871
1873
  } finally {
1872
1874
  if (typeof i == "number") try {
1873
- Kt.closeSync(i);
1875
+ fs.closeSync(i);
1874
1876
  } catch {}
1875
1877
  }
1876
1878
  }, Fn = (s, t) => {
1877
1879
  let e = new st(s), i = s.maxReadSize || 16 * 1024 * 1024, r = s.file;
1878
1880
  return new Promise((o, a) => {
1879
- e.on("error", a), e.on("end", o), Kt.stat(r, (h, l) => {
1881
+ e.on("error", a), e.on("end", o), fs.stat(r, (h, l) => {
1880
1882
  if (h) a(h);
1881
1883
  else {
1882
1884
  let c = new _t(r, {
@@ -2397,7 +2399,7 @@ var mi = class {
2397
2399
  constructor(t, e) {
2398
2400
  this.path = t || "./", this.absolute = e;
2399
2401
  }
2400
- }, ir = Buffer.alloc(1024), ai = Symbol("onStat"), ue = Symbol("ended"), W = Symbol("queue"), me = Symbol("pendingLinks"), Et = Symbol("current"), Ct = Symbol("process"), pe = Symbol("processing"), hi = Symbol("processJob"), G = Symbol("jobs"), hs = Symbol("jobDone"), li = Symbol("addFSEntry"), sr = Symbol("addTarEntry"), cs = Symbol("stat"), fs = Symbol("readdir"), ci = Symbol("onreaddir"), fi = Symbol("pipe"), rr = Symbol("entry"), as = Symbol("entryOpt"), di = Symbol("writeEntryClass"), or = Symbol("write"), ls = Symbol("ondrain"), wt = class extends A {
2402
+ }, ir = Buffer.alloc(1024), ai = Symbol("onStat"), ue = Symbol("ended"), W = Symbol("queue"), me = Symbol("pendingLinks"), Et = Symbol("current"), Ct = Symbol("process"), pe = Symbol("processing"), hi = Symbol("processJob"), G = Symbol("jobs"), hs = Symbol("jobDone"), li = Symbol("addFSEntry"), sr = Symbol("addTarEntry"), cs = Symbol("stat"), fs$1 = Symbol("readdir"), ci = Symbol("onreaddir"), fi = Symbol("pipe"), rr = Symbol("entry"), as = Symbol("entryOpt"), di = Symbol("writeEntryClass"), or = Symbol("write"), ls = Symbol("ondrain"), wt = class extends A {
2401
2403
  sync = !1;
2402
2404
  opt;
2403
2405
  cwd;
@@ -2475,7 +2477,7 @@ var mi = class {
2475
2477
  }
2476
2478
  this[Ct]();
2477
2479
  }
2478
- [fs](t) {
2480
+ [fs$1](t) {
2479
2481
  t.pending = !0, this[G] += 1, I.readdir(t.absolute, (e, i) => {
2480
2482
  if (t.pending = !1, this[G] -= 1, e) return this.emit("error", e);
2481
2483
  this[ci](t, i);
@@ -2522,7 +2524,7 @@ var mi = class {
2522
2524
  if (t.stat && !t.ignore) {
2523
2525
  if (!this.noDirRecurse && t.stat.isDirectory() && !t.readdir) {
2524
2526
  let e = this.readdirCache.get(t.absolute);
2525
- if (e ? this[ci](t, e) : this[fs](t), !t.readdir) return;
2527
+ if (e ? this[ci](t, e) : this[fs$1](t), !t.readdir) return;
2526
2528
  }
2527
2529
  if (t.entry = this[rr](t), !t.entry) {
2528
2530
  t.ignore = !0;
@@ -2591,7 +2593,7 @@ var mi = class {
2591
2593
  let e = this.follow ? "statSync" : "lstatSync";
2592
2594
  this[ai](t, I[e](t.absolute));
2593
2595
  }
2594
- [fs](t) {
2596
+ [fs$1](t) {
2595
2597
  this[ci](t, I.readdirSync(t.absolute));
2596
2598
  }
2597
2599
  [fi](t) {
@@ -2647,12 +2649,12 @@ var Wn = (s, t) => {
2647
2649
  var ur = (process.env.__FAKE_PLATFORM__ || process.platform) === "win32", { O_CREAT: mr, O_NOFOLLOW: cr, O_TRUNC: pr, O_WRONLY: Er } = I.constants, wr = Number(process.env.__FAKE_FS_O_FILENAME__) || I.constants.UV_FS_O_FILEMAP || 0, $n = ur && !!wr, Xn = 512 * 1024, qn = wr | pr | mr | Er, fr = !ur && typeof cr == "number" ? cr | pr | mr | Er : null, ds = fr !== null ? () => fr : $n ? (s) => s < Xn ? qn : "w" : () => "w";
2648
2650
  var us = (s, t, e) => {
2649
2651
  try {
2650
- return Kt.lchownSync(s, t, e);
2652
+ return fs.lchownSync(s, t, e);
2651
2653
  } catch (i) {
2652
2654
  if (i?.code !== "ENOENT") throw i;
2653
2655
  }
2654
2656
  }, pi = (s, t, e, i) => {
2655
- Kt.lchown(s, t, e, (r) => {
2657
+ fs.lchown(s, t, e, (r) => {
2656
2658
  i(r && r?.code !== "ENOENT" ? r : null);
2657
2659
  });
2658
2660
  }, Qn = (s, t, e, i, r) => {
@@ -2662,7 +2664,7 @@ var us = (s, t, e) => {
2662
2664
  });
2663
2665
  else pi(path.resolve(s, t.name), e, i, r);
2664
2666
  }, ms = (s, t, e, i) => {
2665
- Kt.readdir(s, { withFileTypes: !0 }, (r, n) => {
2667
+ fs.readdir(s, { withFileTypes: !0 }, (r, n) => {
2666
2668
  if (r) {
2667
2669
  if (r.code === "ENOENT") return i();
2668
2670
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i(r);
@@ -2681,7 +2683,7 @@ var us = (s, t, e) => {
2681
2683
  }, ps = (s, t, e) => {
2682
2684
  let i;
2683
2685
  try {
2684
- i = Kt.readdirSync(s, { withFileTypes: !0 });
2686
+ i = fs.readdirSync(s, { withFileTypes: !0 });
2685
2687
  } catch (r) {
2686
2688
  let n = r;
2687
2689
  if (n?.code === "ENOENT") return;
@@ -2715,13 +2717,13 @@ var St = class extends Error {
2715
2717
  }
2716
2718
  };
2717
2719
  var to = (s, t) => {
2718
- Kt.stat(s, (e, i) => {
2720
+ fs.stat(s, (e, i) => {
2719
2721
  (e || !i.isDirectory()) && (e = new we(s, e?.code || "ENOTDIR")), t(e);
2720
2722
  });
2721
2723
  }, Sr = (s, t, e) => {
2722
2724
  s = f(s);
2723
2725
  let i = t.umask ?? 18, r = t.mode | 448, n = (r & i) !== 0, o = t.uid, a = t.gid, h = typeof o == "number" && typeof a == "number" && (o !== t.processUid || a !== t.processGid), l = t.preserve, c = t.unlink, d = f(t.cwd), S = (E, x) => {
2724
- E ? e(E) : x && h ? ms(x, o, a, (xe) => S(xe)) : n ? Kt.chmod(s, r, e) : e();
2726
+ E ? e(E) : x && h ? ms(x, o, a, (xe) => S(xe)) : n ? fs.chmod(s, r, e) : e();
2725
2727
  };
2726
2728
  if (s === d) return to(s, S);
2727
2729
  if (l) return jn.mkdir(s, {
@@ -2732,14 +2734,14 @@ var to = (s, t) => {
2732
2734
  }, Es = (s, t, e, i, r, n, o) => {
2733
2735
  if (t.length === 0) return o(null, n);
2734
2736
  let a = t.shift(), h = f(path.resolve(s + "/" + a));
2735
- Kt.mkdir(h, e, yr(h, t, e, i, r, n, o));
2737
+ fs.mkdir(h, e, yr(h, t, e, i, r, n, o));
2736
2738
  }, yr = (s, t, e, i, r, n, o) => (a) => {
2737
- a ? Kt.lstat(s, (h, l) => {
2739
+ a ? fs.lstat(s, (h, l) => {
2738
2740
  if (h) h.path = h.path && f(h.path), o(h);
2739
2741
  else if (l.isDirectory()) Es(s, t, e, i, r, n, o);
2740
- else if (i) Kt.unlink(s, (c) => {
2742
+ else if (i) fs.unlink(s, (c) => {
2741
2743
  if (c) return o(c);
2742
- Kt.mkdir(s, e, yr(s, t, e, i, r, n, o));
2744
+ fs.mkdir(s, e, yr(s, t, e, i, r, n, o));
2743
2745
  });
2744
2746
  else {
2745
2747
  if (l.isSymbolicLink()) return o(new St(s, s + "/" + t.join("/")));
@@ -2749,7 +2751,7 @@ var to = (s, t) => {
2749
2751
  }, eo = (s) => {
2750
2752
  let t = !1, e;
2751
2753
  try {
2752
- t = Kt.statSync(s).isDirectory();
2754
+ t = fs.statSync(s).isDirectory();
2753
2755
  } catch (i) {
2754
2756
  e = i?.code;
2755
2757
  } finally {
@@ -2758,10 +2760,10 @@ var to = (s, t) => {
2758
2760
  }, Rr = (s, t) => {
2759
2761
  s = f(s);
2760
2762
  let e = t.umask ?? 18, i = t.mode | 448, r = (i & e) !== 0, n = t.uid, o = t.gid, a = typeof n == "number" && typeof o == "number" && (n !== t.processUid || o !== t.processGid), h = t.preserve, l = t.unlink, c = f(t.cwd), d = (E) => {
2761
- E && a && ps(E, n, o), r && Kt.chmodSync(s, i);
2763
+ E && a && ps(E, n, o), r && fs.chmodSync(s, i);
2762
2764
  };
2763
2765
  if (s === c) return eo(c), d();
2764
- if (h) return d(Kt.mkdirSync(s, {
2766
+ if (h) return d(fs.mkdirSync(s, {
2765
2767
  mode: i,
2766
2768
  recursive: !0
2767
2769
  }) ?? void 0);
@@ -2769,12 +2771,12 @@ var to = (s, t) => {
2769
2771
  for (let E = T.shift(), x = c; E && (x += "/" + E); E = T.shift()) {
2770
2772
  x = f(path.resolve(x));
2771
2773
  try {
2772
- Kt.mkdirSync(x, i), N = N || x;
2774
+ fs.mkdirSync(x, i), N = N || x;
2773
2775
  } catch {
2774
- let xe = Kt.lstatSync(x);
2776
+ let xe = fs.lstatSync(x);
2775
2777
  if (xe.isDirectory()) continue;
2776
2778
  if (l) {
2777
- Kt.unlinkSync(x), Kt.mkdirSync(x, i), N = N || x;
2779
+ fs.unlinkSync(x), fs.mkdirSync(x, i), N = N || x;
2778
2780
  continue;
2779
2781
  } else if (xe.isSymbolicLink()) return new St(x, x + "/" + T.join("/"));
2780
2782
  }
@@ -2864,16 +2866,16 @@ var so = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32"
2864
2866
  };
2865
2867
  var Or = () => process.umask();
2866
2868
  var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs = Symbol("isReusable"), P = Symbol("makeFs"), _s = Symbol("file"), Os = Symbol("directory"), Ri = Symbol("link"), Lr = Symbol("symlink"), Nr = Symbol("hardlink"), ye = Symbol("ensureNoSymlink"), Dr = Symbol("unsupported"), Ar = Symbol("checkPath"), Ss = Symbol("stripAbsolutePath"), yt = Symbol("mkdir"), O = Symbol("onError"), yi = Symbol("pending"), Ir = Symbol("pend"), $t = Symbol("unpend"), ys = Symbol("ended"), Rs = Symbol("maybeClose"), Ts = Symbol("skip"), Re = Symbol("doChown"), ge = Symbol("uid"), be = Symbol("gid"), _e = Symbol("checkedCwd"), Oe = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32", ho = 1024, ao = (s, t) => {
2867
- if (!Oe) return Kt.unlink(s, t);
2869
+ if (!Oe) return fs.unlink(s, t);
2868
2870
  let e = s + ".DELETE." + randomBytes(16).toString("hex");
2869
- Kt.rename(s, e, (i) => {
2871
+ fs.rename(s, e, (i) => {
2870
2872
  if (i) return t(i);
2871
- Kt.unlink(e, t);
2873
+ fs.unlink(e, t);
2872
2874
  });
2873
2875
  }, lo = (s) => {
2874
- if (!Oe) return Kt.unlinkSync(s);
2876
+ if (!Oe) return fs.unlinkSync(s);
2875
2877
  let t = s + ".DELETE." + randomBytes(16).toString("hex");
2876
- Kt.renameSync(s, t), Kt.unlinkSync(t);
2878
+ fs.renameSync(s, t), fs.unlinkSync(t);
2877
2879
  }, Fr = (s, t, e) => s !== void 0 && s === s >>> 0 ? s : t !== void 0 && t === t >>> 0 ? t : e, Xt = class extends st {
2878
2880
  [ys] = !1;
2879
2881
  [_e] = !1;
@@ -3017,14 +3019,14 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3017
3019
  autoClose: !1
3018
3020
  });
3019
3021
  r.on("error", (h) => {
3020
- r.fd && Kt.close(r.fd, () => {}), r.write = () => !0, this[O](h, t), e();
3022
+ r.fd && fs.close(r.fd, () => {}), r.write = () => !0, this[O](h, t), e();
3021
3023
  });
3022
3024
  let n = 1, o = (h) => {
3023
3025
  if (h) {
3024
- r.fd && Kt.close(r.fd, () => {}), this[O](h, t), e();
3026
+ r.fd && fs.close(r.fd, () => {}), this[O](h, t), e();
3025
3027
  return;
3026
3028
  }
3027
- --n === 0 && r.fd !== void 0 && Kt.close(r.fd, (l) => {
3029
+ --n === 0 && r.fd !== void 0 && fs.close(r.fd, (l) => {
3028
3030
  l ? this[O](l, t) : this[$t](), e();
3029
3031
  });
3030
3032
  };
@@ -3033,12 +3035,12 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3033
3035
  if (typeof l == "number" && t.mtime && !this.noMtime) {
3034
3036
  n++;
3035
3037
  let c = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
3036
- Kt.futimes(l, c, d, (S) => S ? Kt.utimes(h, c, d, (T) => o(T && S)) : o());
3038
+ fs.futimes(l, c, d, (S) => S ? fs.utimes(h, c, d, (T) => o(T && S)) : o());
3037
3039
  }
3038
3040
  if (typeof l == "number" && this[Re](t)) {
3039
3041
  n++;
3040
3042
  let c = this[ge](t), d = this[be](t);
3041
- typeof c == "number" && typeof d == "number" && Kt.fchown(l, c, d, (S) => S ? Kt.chown(h, c, d, (T) => o(T && S)) : o());
3043
+ typeof c == "number" && typeof d == "number" && fs.fchown(l, c, d, (S) => S ? fs.chown(h, c, d, (T) => o(T && S)) : o());
3042
3044
  }
3043
3045
  o();
3044
3046
  });
@@ -3057,7 +3059,7 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3057
3059
  let n = 1, o = () => {
3058
3060
  --n === 0 && (e(), this[$t](), t.resume());
3059
3061
  };
3060
- t.mtime && !this.noMtime && (n++, Kt.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, Kt.chown(String(t.absolute), Number(this[ge](t)), Number(this[be](t)), o)), o();
3062
+ t.mtime && !this.noMtime && (n++, fs.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o)), this[Re](t) && (n++, fs.chown(String(t.absolute), Number(this[ge](t)), Number(this[be](t)), o)), o();
3061
3063
  });
3062
3064
  }
3063
3065
  [Dr](t) {
@@ -3079,7 +3081,7 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3079
3081
  let o = i.shift();
3080
3082
  if (this.preservePaths || o === void 0) return r();
3081
3083
  let a = path.resolve(e, o);
3082
- Kt.lstat(a, (h, l) => {
3084
+ fs.lstat(a, (h, l) => {
3083
3085
  if (h) return r();
3084
3086
  if (l?.isSymbolicLink()) return n(new St(a, path.resolve(a, i.join("/"))));
3085
3087
  this[ye](t, a, i, r, n);
@@ -3126,7 +3128,7 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3126
3128
  }
3127
3129
  o();
3128
3130
  }, o = () => {
3129
- Kt.lstat(String(t.absolute), (a, h) => {
3131
+ fs.lstat(String(t.absolute), (a, h) => {
3130
3132
  if (h && (this.keep || this.newer && h.mtime > (t.mtime ?? h.mtime))) {
3131
3133
  this[Ts](t), i();
3132
3134
  return;
@@ -3135,9 +3137,9 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3135
3137
  if (h.isDirectory()) {
3136
3138
  if (t.type === "Directory") {
3137
3139
  let l = this.chmod && t.mode && (h.mode & 4095) !== t.mode, c = (d) => this[P](d ?? null, t, i);
3138
- return l ? Kt.chmod(String(t.absolute), Number(t.mode), c) : c();
3140
+ return l ? fs.chmod(String(t.absolute), Number(t.mode), c) : c();
3139
3141
  }
3140
- if (t.absolute !== this.cwd) return Kt.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
3142
+ if (t.absolute !== this.cwd) return fs.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i));
3141
3143
  }
3142
3144
  if (t.absolute === this.cwd) return this[P](null, t, i);
3143
3145
  ao(String(t.absolute), (l) => this[P](l ?? null, t, i));
@@ -3161,7 +3163,7 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3161
3163
  }
3162
3164
  }
3163
3165
  [Ri](t, e, i, r) {
3164
- Kt[i](e, String(t.absolute), (n) => {
3166
+ fs[i](e, String(t.absolute), (n) => {
3165
3167
  n ? this[O](n, t) : (this[$t](), t.resume()), r();
3166
3168
  });
3167
3169
  }
@@ -3189,17 +3191,17 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3189
3191
  if (o) return this[O](o, t);
3190
3192
  }
3191
3193
  }
3192
- let [e, i] = Se(() => Kt.lstatSync(String(t.absolute)));
3194
+ let [e, i] = Se(() => fs.lstatSync(String(t.absolute)));
3193
3195
  if (i && (this.keep || this.newer && i.mtime > (t.mtime ?? i.mtime))) return this[Ts](t);
3194
3196
  if (e || this[bs](t, i)) return this[P](null, t);
3195
3197
  if (i.isDirectory()) {
3196
3198
  if (t.type === "Directory") {
3197
3199
  let [a] = this.chmod && t.mode && (i.mode & 4095) !== t.mode ? Se(() => {
3198
- Kt.chmodSync(String(t.absolute), Number(t.mode));
3200
+ fs.chmodSync(String(t.absolute), Number(t.mode));
3199
3201
  }) : [];
3200
3202
  return this[P](a, t);
3201
3203
  }
3202
- let [n] = Se(() => Kt.rmdirSync(String(t.absolute)));
3204
+ let [n] = Se(() => fs.rmdirSync(String(t.absolute)));
3203
3205
  this[P](n, t);
3204
3206
  }
3205
3207
  let [r] = t.absolute === this.cwd ? [] : Se(() => lo(String(t.absolute)));
@@ -3209,21 +3211,21 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3209
3211
  let i = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (a) => {
3210
3212
  let h;
3211
3213
  try {
3212
- Kt.closeSync(n);
3214
+ fs.closeSync(n);
3213
3215
  } catch (l) {
3214
3216
  h = l;
3215
3217
  }
3216
3218
  (a || h) && this[O](a || h, t), e();
3217
3219
  }, n;
3218
3220
  try {
3219
- n = Kt.openSync(String(t.absolute), ds(t.size), i);
3221
+ n = fs.openSync(String(t.absolute), ds(t.size), i);
3220
3222
  } catch (a) {
3221
3223
  return r(a);
3222
3224
  }
3223
3225
  let o = this.transform && this.transform(t) || t;
3224
3226
  o !== t && (o.on("error", (a) => this[O](a, t)), t.pipe(o)), o.on("data", (a) => {
3225
3227
  try {
3226
- Kt.writeSync(n, a, 0, a.length);
3228
+ fs.writeSync(n, a, 0, a.length);
3227
3229
  } catch (h) {
3228
3230
  r(h);
3229
3231
  }
@@ -3232,10 +3234,10 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3232
3234
  if (t.mtime && !this.noMtime) {
3233
3235
  let h = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
3234
3236
  try {
3235
- Kt.futimesSync(n, h, l);
3237
+ fs.futimesSync(n, h, l);
3236
3238
  } catch (c) {
3237
3239
  try {
3238
- Kt.utimesSync(String(t.absolute), h, l);
3240
+ fs.utimesSync(String(t.absolute), h, l);
3239
3241
  } catch {
3240
3242
  a = c;
3241
3243
  }
@@ -3244,10 +3246,10 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3244
3246
  if (this[Re](t)) {
3245
3247
  let h = this[ge](t), l = this[be](t);
3246
3248
  try {
3247
- Kt.fchownSync(n, Number(h), Number(l));
3249
+ fs.fchownSync(n, Number(h), Number(l));
3248
3250
  } catch (c) {
3249
3251
  try {
3250
- Kt.chownSync(String(t.absolute), Number(h), Number(l));
3252
+ fs.chownSync(String(t.absolute), Number(h), Number(l));
3251
3253
  } catch {
3252
3254
  a = a || c;
3253
3255
  }
@@ -3263,10 +3265,10 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3263
3265
  return;
3264
3266
  }
3265
3267
  if (t.mtime && !this.noMtime) try {
3266
- Kt.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
3268
+ fs.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
3267
3269
  } catch {}
3268
3270
  if (this[Re](t)) try {
3269
- Kt.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[be](t)));
3271
+ fs.chownSync(String(t.absolute), Number(this[ge](t)), Number(this[be](t)));
3270
3272
  } catch {}
3271
3273
  e(), t.resume();
3272
3274
  }
@@ -3292,7 +3294,7 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3292
3294
  let o = e;
3293
3295
  for (let a of i) {
3294
3296
  o = path.resolve(o, a);
3295
- let [h, l] = Se(() => Kt.lstatSync(o));
3297
+ let [h, l] = Se(() => fs.lstatSync(o));
3296
3298
  if (h) return r();
3297
3299
  if (l.isSymbolicLink()) return n(new St(o, path.resolve(e, i.join("/"))));
3298
3300
  }
@@ -3301,13 +3303,13 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3301
3303
  [Ri](t, e, i, r) {
3302
3304
  let n = `${i}Sync`;
3303
3305
  try {
3304
- Kt[n](e, String(t.absolute)), r(), t.resume();
3306
+ fs[n](e, String(t.absolute)), r(), t.resume();
3305
3307
  } catch (o) {
3306
3308
  return this[O](o, t);
3307
3309
  }
3308
3310
  }
3309
3311
  }, co = (s) => {
3310
- let t = new Te(s), e = s.file, i = Kt.statSync(e);
3312
+ let t = new Te(s), e = s.file, i = fs.statSync(e);
3311
3313
  new Me(e, {
3312
3314
  readSize: s.maxReadSize || 16 * 1024 * 1024,
3313
3315
  size: i.size
@@ -3315,7 +3317,7 @@ var Tr = Symbol("onEntry"), gs = Symbol("checkFs"), xr = Symbol("checkFs2"), bs
3315
3317
  }, fo = (s, t) => {
3316
3318
  let e = new Xt(s), i = s.maxReadSize || 16 * 1024 * 1024, r = s.file;
3317
3319
  return new Promise((o, a) => {
3318
- e.on("error", a), e.on("close", o), Kt.stat(r, (h, l) => {
3320
+ e.on("error", a), e.on("close", o), fs.stat(r, (h, l) => {
3319
3321
  if (h) a(h);
3320
3322
  else {
3321
3323
  let c = new _t(r, {
@@ -3334,15 +3336,15 @@ var mo = (s, t) => {
3334
3336
  let e = new kt(s), i = !0, r, n;
3335
3337
  try {
3336
3338
  try {
3337
- r = Kt.openSync(s.file, "r+");
3339
+ r = fs.openSync(s.file, "r+");
3338
3340
  } catch (h) {
3339
- if (h?.code === "ENOENT") r = Kt.openSync(s.file, "w+");
3341
+ if (h?.code === "ENOENT") r = fs.openSync(s.file, "w+");
3340
3342
  else throw h;
3341
3343
  }
3342
- let o = Kt.fstatSync(r), a = Buffer.alloc(512);
3344
+ let o = fs.fstatSync(r), a = Buffer.alloc(512);
3343
3345
  t: for (n = 0; n < o.size; n += 512) {
3344
3346
  for (let c = 0, d = 0; c < 512; c += d) {
3345
- if (d = Kt.readSync(r, a, c, a.length - c, n + c), n === 0 && a[0] === 31 && a[1] === 139) throw new Error("cannot append to compressed archives");
3347
+ if (d = fs.readSync(r, a, c, a.length - c, n + c), n === 0 && a[0] === 31 && a[1] === 139) throw new Error("cannot append to compressed archives");
3346
3348
  if (!d) break t;
3347
3349
  }
3348
3350
  let h = new C(a);
@@ -3354,7 +3356,7 @@ var mo = (s, t) => {
3354
3356
  i = !1, po(s, e, n, r, t);
3355
3357
  } finally {
3356
3358
  if (i) try {
3357
- Kt.closeSync(r);
3359
+ fs.closeSync(r);
3358
3360
  } catch {}
3359
3361
  }
3360
3362
  }, po = (s, t, e, i, r) => {
@@ -3367,29 +3369,29 @@ var mo = (s, t) => {
3367
3369
  t = Array.from(t);
3368
3370
  let e = new wt(s), i = (n, o, a) => {
3369
3371
  let h = (T, N) => {
3370
- T ? Kt.close(n, (E) => a(T)) : a(null, N);
3372
+ T ? fs.close(n, (E) => a(T)) : a(null, N);
3371
3373
  }, l = 0;
3372
3374
  if (o === 0) return h(null, 0);
3373
3375
  let c = 0, d = Buffer.alloc(512), S = (T, N) => {
3374
3376
  if (T || N === void 0) return h(T);
3375
- if (c += N, c < 512 && N) return Kt.read(n, d, c, d.length - c, l + c, S);
3377
+ if (c += N, c < 512 && N) return fs.read(n, d, c, d.length - c, l + c, S);
3376
3378
  if (l === 0 && d[0] === 31 && d[1] === 139) return h(/* @__PURE__ */ new Error("cannot append to compressed archives"));
3377
3379
  if (c < 512) return h(null, l);
3378
3380
  let E = new C(d);
3379
3381
  if (!E.cksumValid) return h(null, l);
3380
3382
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
3381
3383
  if (l + x + 512 > o || (l += x + 512, l >= o)) return h(null, l);
3382
- s.mtimeCache && E.mtime && s.mtimeCache.set(String(E.path), E.mtime), c = 0, Kt.read(n, d, 0, 512, l, S);
3384
+ s.mtimeCache && E.mtime && s.mtimeCache.set(String(E.path), E.mtime), c = 0, fs.read(n, d, 0, 512, l, S);
3383
3385
  };
3384
- Kt.read(n, d, 0, 512, l, S);
3386
+ fs.read(n, d, 0, 512, l, S);
3385
3387
  };
3386
3388
  return new Promise((n, o) => {
3387
3389
  e.on("error", o);
3388
3390
  let a = "r+", h = (l, c) => {
3389
- if (l && l.code === "ENOENT" && a === "r+") return a = "w+", Kt.open(s.file, a, h);
3391
+ if (l && l.code === "ENOENT" && a === "r+") return a = "w+", fs.open(s.file, a, h);
3390
3392
  if (l || !c) return o(l);
3391
- Kt.fstat(c, (d, S) => {
3392
- if (d) return Kt.close(c, () => o(d));
3393
+ fs.fstat(c, (d, S) => {
3394
+ if (d) return fs.close(c, () => o(d));
3393
3395
  i(c, S.size, (T, N) => {
3394
3396
  if (T) return o(T);
3395
3397
  let E = new tt(s.file, {
@@ -3400,7 +3402,7 @@ var mo = (s, t) => {
3400
3402
  });
3401
3403
  });
3402
3404
  };
3403
- Kt.open(s.file, a, h);
3405
+ fs.open(s.file, a, h);
3404
3406
  });
3405
3407
  }, wo = (s, t) => {
3406
3408
  t.forEach((e) => {
@@ -3630,7 +3632,7 @@ var SystemBackupService = class {
3630
3632
  }
3631
3633
  async statLocation(loc) {
3632
3634
  const abs = path$1.isAbsolute(loc) ? loc : path$1.join(this.dataDir, loc);
3633
- if (!fs$1.existsSync(abs)) return {
3635
+ if (!fs$2.existsSync(abs)) return {
3634
3636
  name: loc,
3635
3637
  sizeBytes: 0,
3636
3638
  fileCount: 0,
@@ -3677,11 +3679,11 @@ var SystemBackupService = class {
3677
3679
  const present = [];
3678
3680
  for (const loc of requested) {
3679
3681
  const abs = path$1.isAbsolute(loc) ? loc : path$1.join(this.dataDir, loc);
3680
- if (fs$1.existsSync(abs)) present.push(loc);
3682
+ if (fs$2.existsSync(abs)) present.push(loc);
3681
3683
  else this.logger.debug("createArchive: skipping missing location", { meta: { location: loc } });
3682
3684
  }
3683
3685
  if (present.length === 0) throw new Error(`createArchive: no locations from {${requested.join(", ")}} exist under ${this.dataDir}`);
3684
- fs$1.mkdirSync(path$1.dirname(opts.archivePath), { recursive: true });
3686
+ fs$2.mkdirSync(path$1.dirname(opts.archivePath), { recursive: true });
3685
3687
  const walked = [];
3686
3688
  for (const loc of present) {
3687
3689
  throwIfCancelled(opts.signal);
@@ -3765,7 +3767,7 @@ var SystemBackupService = class {
3765
3767
  */
3766
3768
  async createSnapshotsOnlyArchive(opts, selection, recipient) {
3767
3769
  if (opts.owner === void 0) throw new BackupSnapshotRefusedError("a snapshots-only archive needs the database owner, and none was given");
3768
- fs$1.mkdirSync(path$1.dirname(opts.archivePath), { recursive: true });
3770
+ fs$2.mkdirSync(path$1.dirname(opts.archivePath), { recursive: true });
3769
3771
  const ownedById = await this.ownedDatabasesInScope(opts.owner, null);
3770
3772
  const selected = /* @__PURE__ */ new Map();
3771
3773
  for (const [rel, databaseId] of ownedById) if (selection.has(databaseId)) selected.set(rel, databaseId);
@@ -3819,7 +3821,7 @@ var SystemBackupService = class {
3819
3821
  async writeArchive(opts) {
3820
3822
  const { present, manifest } = opts;
3821
3823
  const manifestStagePath = `${opts.archivePath}.${process.pid}.manifest.json`;
3822
- fs$1.writeFileSync(manifestStagePath, JSON.stringify(manifest, null, 2), "utf-8");
3824
+ fs$2.writeFileSync(manifestStagePath, JSON.stringify(manifest, null, 2), "utf-8");
3823
3825
  this.logger.info("createArchive: tarring", { meta: {
3824
3826
  archivePath: opts.archivePath,
3825
3827
  locations: [...present],
@@ -3828,7 +3830,7 @@ var SystemBackupService = class {
3828
3830
  } });
3829
3831
  try {
3830
3832
  const stagedInDataDir = path$1.join(this.dataDir, ARCHIVE_MANIFEST_NAME);
3831
- fs$1.copyFileSync(manifestStagePath, stagedInDataDir);
3833
+ fs$2.copyFileSync(manifestStagePath, stagedInDataDir);
3832
3834
  const stagingRel = path$1.relative(this.dataDir, path$1.dirname(opts.archivePath));
3833
3835
  const excludePrefix = stagingRel && !stagingRel.startsWith("..") && !path$1.isAbsolute(stagingRel) ? stagingRel : null;
3834
3836
  try {
@@ -3844,29 +3846,29 @@ var SystemBackupService = class {
3844
3846
  return norm !== excludePrefix && !norm.startsWith(`${excludePrefix}/`);
3845
3847
  }
3846
3848
  }, [ARCHIVE_MANIFEST_NAME, ...opts.tarRoots ?? present]);
3847
- const sink = fs$1.createWriteStream(opts.archivePath, { mode: 384 });
3849
+ const sink = fs$2.createWriteStream(opts.archivePath, { mode: 384 });
3848
3850
  try {
3849
3851
  const streamOpts = opts.signal ? { signal: opts.signal } : {};
3850
3852
  if (opts.encryptTo !== void 0) await pipeline(pack, createBackupEncryptStream(opts.encryptTo), byteCountingPassthrough(opts.onArchiveBytes), sink, streamOpts);
3851
3853
  else await pipeline(pack, byteCountingPassthrough(opts.onArchiveBytes), sink, streamOpts);
3852
3854
  } catch (err) {
3853
3855
  try {
3854
- fs$1.rmSync(opts.archivePath, { force: true });
3856
+ fs$2.rmSync(opts.archivePath, { force: true });
3855
3857
  } catch {}
3856
3858
  if (opts.signal?.aborted) throw new BackupCancelledError();
3857
3859
  throw err;
3858
3860
  }
3859
3861
  } finally {
3860
3862
  try {
3861
- fs$1.rmSync(stagedInDataDir, { force: true });
3863
+ fs$2.rmSync(stagedInDataDir, { force: true });
3862
3864
  } catch {}
3863
3865
  }
3864
3866
  } finally {
3865
3867
  try {
3866
- fs$1.rmSync(manifestStagePath, { force: true });
3868
+ fs$2.rmSync(manifestStagePath, { force: true });
3867
3869
  } catch {}
3868
3870
  }
3869
- const sizeBytes = fs$1.statSync(opts.archivePath).size;
3871
+ const sizeBytes = fs$2.statSync(opts.archivePath).size;
3870
3872
  return {
3871
3873
  archivePath: opts.archivePath,
3872
3874
  includedLocations: [...present],
@@ -3879,7 +3881,7 @@ var SystemBackupService = class {
3879
3881
  * one entry we care about, then aborts.
3880
3882
  */
3881
3883
  async readArchiveManifest(archivePath) {
3882
- if (!fs$1.existsSync(archivePath)) throw new Error(`readArchiveManifest: ${archivePath} does not exist`);
3884
+ if (!fs$2.existsSync(archivePath)) throw new Error(`readArchiveManifest: ${archivePath} does not exist`);
3883
3885
  return new Promise((resolve, reject) => {
3884
3886
  const chunks = [];
3885
3887
  let found = false;
@@ -3911,7 +3913,7 @@ var SystemBackupService = class {
3911
3913
  reject(err);
3912
3914
  }
3913
3915
  });
3914
- const reader = fs$1.createReadStream(archivePath);
3916
+ const reader = fs$2.createReadStream(archivePath);
3915
3917
  reader.on("error", (err) => {
3916
3918
  if (!resolved) {
3917
3919
  resolved = true;
@@ -3929,7 +3931,7 @@ var SystemBackupService = class {
3929
3931
  * restart.
3930
3932
  */
3931
3933
  scheduleRestoreMarker(opts) {
3932
- if (!fs$1.existsSync(opts.archivePath)) throw new Error(`scheduleRestoreMarker: ${opts.archivePath} missing`);
3934
+ if (!fs$2.existsSync(opts.archivePath)) throw new Error(`scheduleRestoreMarker: ${opts.archivePath} missing`);
3933
3935
  const markerPath = this.getRestoreMarkerPath();
3934
3936
  const marker = {
3935
3937
  archivePath: opts.archivePath,
@@ -3937,16 +3939,16 @@ var SystemBackupService = class {
3937
3939
  source: opts.source,
3938
3940
  ...opts.locations ? { locations: [...opts.locations] } : {}
3939
3941
  };
3940
- fs$1.mkdirSync(path$1.dirname(markerPath), { recursive: true });
3941
- fs$1.writeFileSync(markerPath, JSON.stringify(marker, null, 2), { mode: 384 });
3942
+ fs$2.mkdirSync(path$1.dirname(markerPath), { recursive: true });
3943
+ fs$2.writeFileSync(markerPath, JSON.stringify(marker, null, 2), { mode: 384 });
3942
3944
  return markerPath;
3943
3945
  }
3944
3946
  /** Read the pending-restore marker if one is present. */
3945
3947
  readPendingMarker() {
3946
3948
  const markerPath = this.getRestoreMarkerPath();
3947
- if (!fs$1.existsSync(markerPath)) return null;
3949
+ if (!fs$2.existsSync(markerPath)) return null;
3948
3950
  try {
3949
- const raw = fs$1.readFileSync(markerPath, "utf-8");
3951
+ const raw = fs$2.readFileSync(markerPath, "utf-8");
3950
3952
  const parsed = JSON.parse(raw);
3951
3953
  if (typeof parsed === "object" && parsed != null && typeof parsed.archivePath === "string") return parsed;
3952
3954
  } catch (err) {
@@ -3957,7 +3959,7 @@ var SystemBackupService = class {
3957
3959
  /** Drop the marker after a successful boot-time restore. */
3958
3960
  clearPendingMarker() {
3959
3961
  const markerPath = this.getRestoreMarkerPath();
3960
- if (fs$1.existsSync(markerPath)) fs$1.rmSync(markerPath, { force: true });
3962
+ if (fs$2.existsSync(markerPath)) fs$2.rmSync(markerPath, { force: true });
3961
3963
  }
3962
3964
  /**
3963
3965
  * The databases the owner declares, archive-relative, that this walk found,
@@ -1,5 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BZfvhfS1.js");
2
+ const require_record_kind = require("./record-kind-DoBfYHCs.js");
3
+ const require_settings_store_cap = require("./settings-store.cap-wlJhCspr.js");
4
+ const require_database_snapshot_cap = require("./database-snapshot.cap-DF38e-0P.js");
3
5
  let zod = require("zod");
4
6
  let node_crypto = require("node:crypto");
5
7
  let buffer = require("buffer");
@@ -38,7 +40,7 @@ var BackupScheduleBodySchema = zod.z.object({
38
40
  locationIds: zod.z.array(zod.z.string()).readonly(),
39
41
  retentionCount: zod.z.number(),
40
42
  dataSources: zod.z.array(zod.z.string()).readonly().optional(),
41
- databases: zod.z.array(require_dist.DataStoreDatabaseSchema).readonly().optional(),
43
+ databases: zod.z.array(require_settings_store_cap.DataStoreDatabaseSchema).readonly().optional(),
42
44
  lastAttemptAt: zod.z.number().optional(),
43
45
  lastSuccessAt: zod.z.number().optional(),
44
46
  lastError: zod.z.string().optional()
@@ -57,7 +59,7 @@ var BackupEncryptionKeyBodySchema = zod.z.object({
57
59
  retiredAt: zod.z.number().nullable()
58
60
  });
59
61
  var BackupSeedMarkerBodySchema = zod.z.object({ seededAt: zod.z.number() });
60
- var _backupOrchestratorRecordKinds = require_dist.defineRecordKinds({
62
+ var _backupOrchestratorRecordKinds = require_record_kind.defineRecordKinds({
61
63
  schedules: {
62
64
  schema: BackupScheduleBodySchema,
63
65
  class: "config",
@@ -4012,7 +4014,7 @@ var SystemBackupService = class {
4012
4014
  */
4013
4015
  async takeOwnerSnapshots(owner, selected, signal) {
4014
4016
  const removeOwnedSnapshots = async () => {
4015
- for (const db of selected.keys()) await this.removeSnapshot(node_path.join(this.dataDir, db + require_dist.DATABASE_SNAPSHOT_SUFFIX));
4017
+ for (const db of selected.keys()) await this.removeSnapshot(node_path.join(this.dataDir, db + require_database_snapshot_cap.DATABASE_SNAPSHOT_SUFFIX));
4016
4018
  };
4017
4019
  const taken = [];
4018
4020
  try {