@camstack/addon-remote-storage 1.2.57 → 1.2.58

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/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-wn3VaEXo.js");
5
+ const require_shared = require("./shared-ncQEWVrH.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-SaMdZBGZ.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-C5bN6WhL.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-wn3VaEXo.js");
5
+ const require_shared = require("./shared-ncQEWVrH.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-SaMdZBGZ.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-C5bN6WhL.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -10512,6 +10512,89 @@ var LocationStatSchema = object({
10512
10512
  fileCount: number(),
10513
10513
  present: boolean()
10514
10514
  });
10515
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10516
+ var BackupRunStateSchema = _enum([
10517
+ "queued",
10518
+ "running",
10519
+ "succeeded",
10520
+ "failed",
10521
+ "cancelled"
10522
+ ]);
10523
+ /**
10524
+ * Where a running backup currently is. `queued` before it starts,
10525
+ * `building` while the tar.gz is being staged, `uploading` during the
10526
+ * per-destination fan-out, `done` once terminal.
10527
+ */
10528
+ var BackupRunPhaseSchema = _enum([
10529
+ "queued",
10530
+ "building",
10531
+ "uploading",
10532
+ "done"
10533
+ ]);
10534
+ /**
10535
+ * Observable state of one backup run — readable WHILE it runs via
10536
+ * `backup.listRuns`. This is what makes the execution queue and
10537
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10538
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10539
+ * diagnosable with `du` because nothing reported that runs existed or
10540
+ * how large the staged archive had grown.
10541
+ */
10542
+ var BackupRunSchema = object({
10543
+ /** Stable run id — the handle `backup.cancel` takes. */
10544
+ id: string(),
10545
+ state: BackupRunStateSchema,
10546
+ phase: BackupRunPhaseSchema,
10547
+ /**
10548
+ * Resolved destination location ids. Empty while queued (targets are
10549
+ * resolved when the run starts, against the then-current policies).
10550
+ */
10551
+ destinationIds: array(string()).readonly(),
10552
+ label: string().optional(),
10553
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10554
+ requestedAt: number(),
10555
+ /** ms-epoch when the run left the queue and started building. */
10556
+ startedAt: number().optional(),
10557
+ /** ms-epoch when the run reached a terminal state. */
10558
+ finishedAt: number().optional(),
10559
+ /** Compressed bytes of the staging archive written so far. */
10560
+ stagedBytes: number(),
10561
+ /** Final staged archive size, once the build phase completes. */
10562
+ archiveSizeBytes: number().optional(),
10563
+ /** Bytes pushed to the destination currently uploading. */
10564
+ uploadedBytes: number(),
10565
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10566
+ completedDestinationIds: array(string()).readonly(),
10567
+ /** Destinations that failed during the fan-out. */
10568
+ failedDestinationIds: array(string()).readonly(),
10569
+ /** Failure message when `state === 'failed'`. */
10570
+ error: string().optional(),
10571
+ /**
10572
+ * 1-based place in the execution queue — 1 = runs next. Present only
10573
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10574
+ * queue's OWN pending order, never derived from timestamps, so the
10575
+ * UI cannot show an order the executor will not honour.
10576
+ */
10577
+ queuePosition: number().int().min(1).optional()
10578
+ });
10579
+ /**
10580
+ * Result of `backup.trigger`. The call still resolves when the run
10581
+ * terminates (compat with schedule-driven runs and the admin UI), but
10582
+ * it now names the run and says whether it had to WAIT: a trigger that
10583
+ * arrives while another run is in flight is enqueued (or joined onto
10584
+ * an identical already-queued run), never started concurrently.
10585
+ */
10586
+ var BackupTriggerResultSchema = object({
10587
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10588
+ runId: string(),
10589
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10590
+ queued: boolean(),
10591
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10592
+ joined: boolean(),
10593
+ /** True when the run was cancelled before completing every destination. */
10594
+ cancelled: boolean(),
10595
+ /** One entry per destination the archive landed at (partial on cancel). */
10596
+ entries: array(BackupEntrySchema).readonly()
10597
+ });
10515
10598
  /**
10516
10599
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10517
10600
  * SET of destination locations. Supersedes the per-location cron on
@@ -10559,7 +10642,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10559
10642
  * retention (manual runs).
10560
10643
  */
10561
10644
  retentionCount: number().int().min(1).max(1e3).optional()
10562
- }).optional(), array(BackupEntrySchema).readonly(), {
10645
+ }).optional(), BackupTriggerResultSchema, {
10646
+ kind: "mutation",
10647
+ auth: "admin"
10648
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10563
10649
  kind: "mutation",
10564
10650
  auth: "admin"
10565
10651
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11276,6 +11362,14 @@ method(object({
11276
11362
  }), object({ success: literal(true) }), {
11277
11363
  kind: "mutation",
11278
11364
  auth: "admin"
11365
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11366
+ derivedStreamsDeleted: array(string()).readonly(),
11367
+ assignmentsPurged: boolean(),
11368
+ probeSnapshotsDropped: number().int().nonnegative(),
11369
+ rtspTokenRowsDeleted: number().int().nonnegative()
11370
+ }), {
11371
+ kind: "mutation",
11372
+ auth: "admin"
11279
11373
  }), method(object({
11280
11374
  deviceId: number(),
11281
11375
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -29431,6 +29525,12 @@ Object.freeze({
29431
29525
  addonId: null,
29432
29526
  access: "create"
29433
29527
  },
29528
+ "backup.cancel": {
29529
+ capName: "backup",
29530
+ capScope: "system",
29531
+ addonId: null,
29532
+ access: "create"
29533
+ },
29434
29534
  "backup.delete": {
29435
29535
  capName: "backup",
29436
29536
  capScope: "system",
@@ -29473,6 +29573,12 @@ Object.freeze({
29473
29573
  addonId: null,
29474
29574
  access: "view"
29475
29575
  },
29576
+ "backup.listRuns": {
29577
+ capName: "backup",
29578
+ capScope: "system",
29579
+ addonId: null,
29580
+ access: "view"
29581
+ },
29476
29582
  "backup.listSchedules": {
29477
29583
  capName: "backup",
29478
29584
  capScope: "system",
@@ -34039,6 +34145,12 @@ Object.freeze({
34039
34145
  addonId: null,
34040
34146
  access: "create"
34041
34147
  },
34148
+ "streamBroker.forgetDeviceHardware": {
34149
+ capName: "stream-broker",
34150
+ capScope: "system",
34151
+ addonId: null,
34152
+ access: "delete"
34153
+ },
34042
34154
  "streamBroker.getAllRtspEntries": {
34043
34155
  capName: "stream-broker",
34044
34156
  capScope: "system",
@@ -36497,6 +36609,11 @@ Object.freeze({
36497
36609
  form: "single",
36498
36610
  optional: false
36499
36611
  }],
36612
+ "streamBroker.forgetDeviceHardware": [{
36613
+ name: "deviceId",
36614
+ form: "single",
36615
+ optional: false
36616
+ }],
36500
36617
  "streamBroker.getDeviceAudioMute": [{
36501
36618
  name: "deviceId",
36502
36619
  form: "single",
@@ -10535,6 +10535,89 @@ var LocationStatSchema = object({
10535
10535
  fileCount: number(),
10536
10536
  present: boolean()
10537
10537
  });
10538
+ /** Lifecycle of a backup run. Terminal states: succeeded / failed / cancelled. */
10539
+ var BackupRunStateSchema = _enum([
10540
+ "queued",
10541
+ "running",
10542
+ "succeeded",
10543
+ "failed",
10544
+ "cancelled"
10545
+ ]);
10546
+ /**
10547
+ * Where a running backup currently is. `queued` before it starts,
10548
+ * `building` while the tar.gz is being staged, `uploading` during the
10549
+ * per-destination fan-out, `done` once terminal.
10550
+ */
10551
+ var BackupRunPhaseSchema = _enum([
10552
+ "queued",
10553
+ "building",
10554
+ "uploading",
10555
+ "done"
10556
+ ]);
10557
+ /**
10558
+ * Observable state of one backup run — readable WHILE it runs via
10559
+ * `backup.listRuns`. This is what makes the execution queue and
10560
+ * `backup.cancel` usable: the 2026-09-04 incident (two concurrent
10561
+ * multi-GB builds, staging 5.1 GB → 18 GB, load 62) was only
10562
+ * diagnosable with `du` because nothing reported that runs existed or
10563
+ * how large the staged archive had grown.
10564
+ */
10565
+ var BackupRunSchema = object({
10566
+ /** Stable run id — the handle `backup.cancel` takes. */
10567
+ id: string(),
10568
+ state: BackupRunStateSchema,
10569
+ phase: BackupRunPhaseSchema,
10570
+ /**
10571
+ * Resolved destination location ids. Empty while queued (targets are
10572
+ * resolved when the run starts, against the then-current policies).
10573
+ */
10574
+ destinationIds: array(string()).readonly(),
10575
+ label: string().optional(),
10576
+ /** ms-epoch when the run was submitted (trigger call / schedule fire). */
10577
+ requestedAt: number(),
10578
+ /** ms-epoch when the run left the queue and started building. */
10579
+ startedAt: number().optional(),
10580
+ /** ms-epoch when the run reached a terminal state. */
10581
+ finishedAt: number().optional(),
10582
+ /** Compressed bytes of the staging archive written so far. */
10583
+ stagedBytes: number(),
10584
+ /** Final staged archive size, once the build phase completes. */
10585
+ archiveSizeBytes: number().optional(),
10586
+ /** Bytes pushed to the destination currently uploading. */
10587
+ uploadedBytes: number(),
10588
+ /** Destinations where the archive fully landed (uploaded + indexed). */
10589
+ completedDestinationIds: array(string()).readonly(),
10590
+ /** Destinations that failed during the fan-out. */
10591
+ failedDestinationIds: array(string()).readonly(),
10592
+ /** Failure message when `state === 'failed'`. */
10593
+ error: string().optional(),
10594
+ /**
10595
+ * 1-based place in the execution queue — 1 = runs next. Present only
10596
+ * while `state === 'queued'`. Stamped by the orchestrator from the
10597
+ * queue's OWN pending order, never derived from timestamps, so the
10598
+ * UI cannot show an order the executor will not honour.
10599
+ */
10600
+ queuePosition: number().int().min(1).optional()
10601
+ });
10602
+ /**
10603
+ * Result of `backup.trigger`. The call still resolves when the run
10604
+ * terminates (compat with schedule-driven runs and the admin UI), but
10605
+ * it now names the run and says whether it had to WAIT: a trigger that
10606
+ * arrives while another run is in flight is enqueued (or joined onto
10607
+ * an identical already-queued run), never started concurrently.
10608
+ */
10609
+ var BackupTriggerResultSchema = object({
10610
+ /** The run this trigger mapped to — poll it via `listRuns`, stop it via `cancel`. */
10611
+ runId: string(),
10612
+ /** True when the run waited behind an in-flight run instead of starting immediately. */
10613
+ queued: boolean(),
10614
+ /** True when this trigger was coalesced onto an identical already-queued run. */
10615
+ joined: boolean(),
10616
+ /** True when the run was cancelled before completing every destination. */
10617
+ cancelled: boolean(),
10618
+ /** One entry per destination the archive landed at (partial on cancel). */
10619
+ entries: array(BackupEntrySchema).readonly()
10620
+ });
10538
10621
  /**
10539
10622
  * A backup schedule — the N:M "entry" that binds one cron cadence to a
10540
10623
  * SET of destination locations. Supersedes the per-location cron on
@@ -10582,7 +10665,10 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
10582
10665
  * retention (manual runs).
10583
10666
  */
10584
10667
  retentionCount: number().int().min(1).max(1e3).optional()
10585
- }).optional(), array(BackupEntrySchema).readonly(), {
10668
+ }).optional(), BackupTriggerResultSchema, {
10669
+ kind: "mutation",
10670
+ auth: "admin"
10671
+ }), method(_void(), array(BackupRunSchema).readonly(), { auth: "admin" }), method(object({ runId: string() }), object({ cancelled: boolean() }), {
10586
10672
  kind: "mutation",
10587
10673
  auth: "admin"
10588
10674
  }), method(_void(), array(BackupEntrySchema).readonly(), { auth: "admin" }), method(_void(), array(LocationStatSchema).readonly(), { auth: "admin" }), method(object({
@@ -11299,6 +11385,14 @@ method(object({
11299
11385
  }), object({ success: literal(true) }), {
11300
11386
  kind: "mutation",
11301
11387
  auth: "admin"
11388
+ }), method(object({ deviceId: number().int().nonnegative() }), object({
11389
+ derivedStreamsDeleted: array(string()).readonly(),
11390
+ assignmentsPurged: boolean(),
11391
+ probeSnapshotsDropped: number().int().nonnegative(),
11392
+ rtspTokenRowsDeleted: number().int().nonnegative()
11393
+ }), {
11394
+ kind: "mutation",
11395
+ auth: "admin"
11302
11396
  }), method(object({
11303
11397
  deviceId: number(),
11304
11398
  /** Absent = the LOWEST assigned profile — a notification attachment is
@@ -29454,6 +29548,12 @@ Object.freeze({
29454
29548
  addonId: null,
29455
29549
  access: "create"
29456
29550
  },
29551
+ "backup.cancel": {
29552
+ capName: "backup",
29553
+ capScope: "system",
29554
+ addonId: null,
29555
+ access: "create"
29556
+ },
29457
29557
  "backup.delete": {
29458
29558
  capName: "backup",
29459
29559
  capScope: "system",
@@ -29496,6 +29596,12 @@ Object.freeze({
29496
29596
  addonId: null,
29497
29597
  access: "view"
29498
29598
  },
29599
+ "backup.listRuns": {
29600
+ capName: "backup",
29601
+ capScope: "system",
29602
+ addonId: null,
29603
+ access: "view"
29604
+ },
29499
29605
  "backup.listSchedules": {
29500
29606
  capName: "backup",
29501
29607
  capScope: "system",
@@ -34062,6 +34168,12 @@ Object.freeze({
34062
34168
  addonId: null,
34063
34169
  access: "create"
34064
34170
  },
34171
+ "streamBroker.forgetDeviceHardware": {
34172
+ capName: "stream-broker",
34173
+ capScope: "system",
34174
+ addonId: null,
34175
+ access: "delete"
34176
+ },
34065
34177
  "streamBroker.getAllRtspEntries": {
34066
34178
  capName: "stream-broker",
34067
34179
  capScope: "system",
@@ -36520,6 +36632,11 @@ Object.freeze({
36520
36632
  form: "single",
36521
36633
  optional: false
36522
36634
  }],
36635
+ "streamBroker.forgetDeviceHardware": [{
36636
+ name: "deviceId",
36637
+ form: "single",
36638
+ optional: false
36639
+ }],
36523
36640
  "streamBroker.getDeviceAudioMute": [{
36524
36641
  name: "deviceId",
36525
36642
  form: "single",
package/dist/smb.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-wn3VaEXo.js");
5
+ const require_shared = require("./shared-ncQEWVrH.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-SaMdZBGZ.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-C5bN6WhL.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as path from "node:path";
4
4
  import * as fsp from "node:fs/promises";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-wn3VaEXo.js");
5
+ const require_shared = require("./shared-ncQEWVrH.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-SaMdZBGZ.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-C5bN6WhL.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.2.57",
3
+ "version": "1.2.58",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV, SMB) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",