@camstack/addon-tailscale 1.2.105 → 1.2.107

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-w8QFHMPp.js");
27
+ const require_dist = require("../dist-CMdlcAV-.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-YOWzoZRg.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-Del4sKyD.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -13258,6 +13258,107 @@ var ExposeInputSchema = object({
13258
13258
  });
13259
13259
  var UnexposeInputSchema = object({ deviceId: string() });
13260
13260
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13261
+ /** Wire/storage schema for one icon id. */
13262
+ var LocationIconIdSchema = _enum([
13263
+ "map-pin",
13264
+ "house",
13265
+ "door-open",
13266
+ "sofa",
13267
+ "utensils",
13268
+ "bed-double",
13269
+ "bath",
13270
+ "briefcase",
13271
+ "car",
13272
+ "circle-parking",
13273
+ "route",
13274
+ "trees",
13275
+ "umbrella",
13276
+ "waves-ladder",
13277
+ "fence",
13278
+ "package",
13279
+ "warehouse",
13280
+ "store",
13281
+ "sun",
13282
+ "radar"
13283
+ ]);
13284
+ /**
13285
+ * One (location, icon) assignment as it travels.
13286
+ *
13287
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13288
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13289
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13290
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13291
+ * map keyed on the displayed casing would orphan its entry on exactly that
13292
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13293
+ */
13294
+ var LocationIconAssignmentSchema = object({
13295
+ locationKey: string(),
13296
+ icon: LocationIconIdSchema
13297
+ });
13298
+ /**
13299
+ * One (location, description) assignment as it travels.
13300
+ *
13301
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13302
+ * reason: this lived for a while in the post-analysis addon's own settings,
13303
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13304
+ * the Locations page carried the icon and silently orphaned the description —
13305
+ * two authorities for one thing, joined by two different rules. Now both hang
13306
+ * off the location itself, on `locationIconKey`.
13307
+ */
13308
+ var LocationDescriptionAssignmentSchema = object({
13309
+ locationKey: string(),
13310
+ description: string()
13311
+ });
13312
+ /**
13313
+ * A SITE ZONE — a named part of the property that several locations belong to.
13314
+ *
13315
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13316
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13317
+ * one zone, so a camera's zone is derived and never stored on the device: the
13318
+ * whole point of this entity is that grouping rooms touches no device row.
13319
+ *
13320
+ * ## Why not `zone`
13321
+ *
13322
+ * Because `zone` is already the most loaded word in this product: 612 source
13323
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13324
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13325
+ * set of rooms — and a reader who confuses them will look for a camera's
13326
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13327
+ * word by calling the drawn one what it actually is: a detection zone.
13328
+ *
13329
+ * ## The key
13330
+ *
13331
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13332
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13333
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13334
+ * silently-dropped location description.
13335
+ *
13336
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13337
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13338
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13339
+ */
13340
+ /**
13341
+ * One zone as it travels: its key, the label the operator typed, its icon and
13342
+ * the locations inside it.
13343
+ *
13344
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13345
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13346
+ * here, rather than left to a second call, because every consumer wants both
13347
+ * at once and a viewer that asked twice could render a zone whose membership
13348
+ * it has not fetched yet.
13349
+ *
13350
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13351
+ * of those two is a choice, and a picker has to draw them differently.
13352
+ */
13353
+ var SiteZoneSchema = object({
13354
+ zoneKey: string(),
13355
+ label: string(),
13356
+ icon: LocationIconIdSchema.nullable(),
13357
+ /** Folded location keys, sorted. A location listed here need not be
13358
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13359
+ * the ones that most want grouping. */
13360
+ locationKeys: array(string())
13361
+ });
13261
13362
  var ProviderStatusSchema = object({
13262
13363
  connected: boolean(),
13263
13364
  deviceCount: number(),
@@ -13769,6 +13870,39 @@ method(object({
13769
13870
  }), object({ moved: number() }), {
13770
13871
  kind: "mutation",
13771
13872
  auth: "admin"
13873
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
13874
+ location: string(),
13875
+ icon: LocationIconIdSchema.nullable()
13876
+ }), _void(), {
13877
+ kind: "mutation",
13878
+ auth: "admin"
13879
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
13880
+ location: string(),
13881
+ description: string().max(400).nullable()
13882
+ }), _void(), {
13883
+ kind: "mutation",
13884
+ auth: "admin"
13885
+ }), method(_void(), array(SiteZoneSchema)), method(object({
13886
+ name: string(),
13887
+ icon: LocationIconIdSchema.nullable().optional()
13888
+ }), _void(), {
13889
+ kind: "mutation",
13890
+ auth: "admin"
13891
+ }), method(object({ name: string() }), _void(), {
13892
+ kind: "mutation",
13893
+ auth: "admin"
13894
+ }), method(object({
13895
+ from: string(),
13896
+ to: string()
13897
+ }), _void(), {
13898
+ kind: "mutation",
13899
+ auth: "admin"
13900
+ }), method(object({
13901
+ location: string(),
13902
+ zone: string().nullable()
13903
+ }), _void(), {
13904
+ kind: "mutation",
13905
+ auth: "admin"
13772
13906
  }), method(object({
13773
13907
  deviceId: number(),
13774
13908
  disabled: boolean()
@@ -32670,6 +32804,18 @@ Object.freeze({
32670
32804
  addonId: null,
32671
32805
  access: "view"
32672
32806
  },
32807
+ "deviceManager.listLocationDescriptions": {
32808
+ capName: "device-manager",
32809
+ capScope: "system",
32810
+ addonId: null,
32811
+ access: "view"
32812
+ },
32813
+ "deviceManager.listLocationIcons": {
32814
+ capName: "device-manager",
32815
+ capScope: "system",
32816
+ addonId: null,
32817
+ access: "view"
32818
+ },
32673
32819
  "deviceManager.listLocations": {
32674
32820
  capName: "device-manager",
32675
32821
  capScope: "system",
@@ -32682,6 +32828,12 @@ Object.freeze({
32682
32828
  addonId: null,
32683
32829
  access: "view"
32684
32830
  },
32831
+ "deviceManager.listSiteZones": {
32832
+ capName: "device-manager",
32833
+ capScope: "system",
32834
+ addonId: null,
32835
+ access: "view"
32836
+ },
32685
32837
  "deviceManager.listWrappersForCap": {
32686
32838
  capName: "device-manager",
32687
32839
  capScope: "system",
@@ -32766,12 +32918,24 @@ Object.freeze({
32766
32918
  addonId: null,
32767
32919
  access: "delete"
32768
32920
  },
32921
+ "deviceManager.removeSiteZone": {
32922
+ capName: "device-manager",
32923
+ capScope: "system",
32924
+ addonId: null,
32925
+ access: "delete"
32926
+ },
32769
32927
  "deviceManager.renameLocation": {
32770
32928
  capName: "device-manager",
32771
32929
  capScope: "system",
32772
32930
  addonId: null,
32773
32931
  access: "create"
32774
32932
  },
32933
+ "deviceManager.renameSiteZone": {
32934
+ capName: "device-manager",
32935
+ capScope: "system",
32936
+ addonId: null,
32937
+ access: "create"
32938
+ },
32775
32939
  "deviceManager.runDeviceAction": {
32776
32940
  capName: "device-manager",
32777
32941
  capScope: "system",
@@ -32814,6 +32978,24 @@ Object.freeze({
32814
32978
  addonId: null,
32815
32979
  access: "create"
32816
32980
  },
32981
+ "deviceManager.setLocationDescription": {
32982
+ capName: "device-manager",
32983
+ capScope: "system",
32984
+ addonId: null,
32985
+ access: "create"
32986
+ },
32987
+ "deviceManager.setLocationIcon": {
32988
+ capName: "device-manager",
32989
+ capScope: "system",
32990
+ addonId: null,
32991
+ access: "create"
32992
+ },
32993
+ "deviceManager.setLocationZone": {
32994
+ capName: "device-manager",
32995
+ capScope: "system",
32996
+ addonId: null,
32997
+ access: "create"
32998
+ },
32817
32999
  "deviceManager.setMetadata": {
32818
33000
  capName: "device-manager",
32819
33001
  capScope: "system",
@@ -32844,6 +33026,12 @@ Object.freeze({
32844
33026
  addonId: null,
32845
33027
  access: "create"
32846
33028
  },
33029
+ "deviceManager.setSiteZone": {
33030
+ capName: "device-manager",
33031
+ capScope: "system",
33032
+ addonId: null,
33033
+ access: "create"
33034
+ },
32847
33035
  "deviceManager.setStreamProfileMap": {
32848
33036
  capName: "device-manager",
32849
33037
  capScope: "system",
@@ -13258,6 +13258,107 @@ var ExposeInputSchema = object({
13258
13258
  });
13259
13259
  var UnexposeInputSchema = object({ deviceId: string() });
13260
13260
  method(_void(), DeviceExportStatusSchema), method(_void(), array(DeviceKindSchema)), method(_void(), array(ExposedDeviceSchema)), method(ExposeInputSchema, _void(), { kind: "mutation" }), method(UnexposeInputSchema, _void(), { kind: "mutation" });
13261
+ /** Wire/storage schema for one icon id. */
13262
+ var LocationIconIdSchema = _enum([
13263
+ "map-pin",
13264
+ "house",
13265
+ "door-open",
13266
+ "sofa",
13267
+ "utensils",
13268
+ "bed-double",
13269
+ "bath",
13270
+ "briefcase",
13271
+ "car",
13272
+ "circle-parking",
13273
+ "route",
13274
+ "trees",
13275
+ "umbrella",
13276
+ "waves-ladder",
13277
+ "fence",
13278
+ "package",
13279
+ "warehouse",
13280
+ "store",
13281
+ "sun",
13282
+ "radar"
13283
+ ]);
13284
+ /**
13285
+ * One (location, icon) assignment as it travels.
13286
+ *
13287
+ * `locationKey` is ALWAYS {@link locationIconKey} of the label — never the
13288
+ * operator's casing. The registry matches labels trimmed + case-insensitively
13289
+ * everywhere (`addLocation`, `removeLocation`, `renameLocation`), and a
13290
+ * case-only rename (`cucina` → `Cucina`) is a real edit this repo supports; a
13291
+ * map keyed on the displayed casing would orphan its entry on exactly that
13292
+ * edit. Consumers join by keying their own label through `locationIconKey`.
13293
+ */
13294
+ var LocationIconAssignmentSchema = object({
13295
+ locationKey: string(),
13296
+ icon: LocationIconIdSchema
13297
+ });
13298
+ /**
13299
+ * One (location, description) assignment as it travels.
13300
+ *
13301
+ * Same key discipline as {@link LocationIconAssignmentSchema}, and for the same
13302
+ * reason: this lived for a while in the post-analysis addon's own settings,
13303
+ * keyed by a HAND-TYPED label matched exactly and case-sensitively. A rename in
13304
+ * the Locations page carried the icon and silently orphaned the description —
13305
+ * two authorities for one thing, joined by two different rules. Now both hang
13306
+ * off the location itself, on `locationIconKey`.
13307
+ */
13308
+ var LocationDescriptionAssignmentSchema = object({
13309
+ locationKey: string(),
13310
+ description: string()
13311
+ });
13312
+ /**
13313
+ * A SITE ZONE — a named part of the property that several locations belong to.
13314
+ *
13315
+ * "Zona notte" holds every bedroom; "Zona giorno" the living room and the
13316
+ * kitchen. A camera belongs to exactly one location, and a location to at most
13317
+ * one zone, so a camera's zone is derived and never stored on the device: the
13318
+ * whole point of this entity is that grouping rooms touches no device row.
13319
+ *
13320
+ * ## Why not `zone`
13321
+ *
13322
+ * Because `zone` is already the most loaded word in this product: 612 source
13323
+ * files and 24 Italian strings where it means a DETECTION zone drawn on a
13324
+ * camera. The two are unrelated — one is a polygon in a frame, the other is a
13325
+ * set of rooms — and a reader who confuses them will look for a camera's
13326
+ * bedrooms. So the code says `siteZone` everywhere, and the UI frees the plain
13327
+ * word by calling the drawn one what it actually is: a detection zone.
13328
+ *
13329
+ * ## The key
13330
+ *
13331
+ * `siteZoneKey(label)` — trimmed, lower-cased, the SAME derivation locations
13332
+ * use (`locationIconKey`). Membership and the icon both hang off it, so a
13333
+ * case-only rename keeps them, which is exactly the orphaning that cost us a
13334
+ * silently-dropped location description.
13335
+ *
13336
+ * The icon vocabulary is the location one, unchanged: a zone is drawn on the
13337
+ * same two surfaces by the same glyph map, so a second vocabulary would be a
13338
+ * second thing to keep drawable (`scripts/check-location-icons-drawable.ts`).
13339
+ */
13340
+ /**
13341
+ * One zone as it travels: its key, the label the operator typed, its icon and
13342
+ * the locations inside it.
13343
+ *
13344
+ * The LABEL is carried alongside the key because the key is lossy on purpose —
13345
+ * a surface must show "Zona notte", not "zona notte". Locations are carried
13346
+ * here, rather than left to a second call, because every consumer wants both
13347
+ * at once and a viewer that asked twice could render a zone whose membership
13348
+ * it has not fetched yet.
13349
+ *
13350
+ * `icon: null` means nobody chose one, which is NOT the fallback pin: only one
13351
+ * of those two is a choice, and a picker has to draw them differently.
13352
+ */
13353
+ var SiteZoneSchema = object({
13354
+ zoneKey: string(),
13355
+ label: string(),
13356
+ icon: LocationIconIdSchema.nullable(),
13357
+ /** Folded location keys, sorted. A location listed here need not be
13358
+ * REGISTERED — devices carry labels nobody registered, and those rooms are
13359
+ * the ones that most want grouping. */
13360
+ locationKeys: array(string())
13361
+ });
13261
13362
  var ProviderStatusSchema = object({
13262
13363
  connected: boolean(),
13263
13364
  deviceCount: number(),
@@ -13769,6 +13870,39 @@ method(object({
13769
13870
  }), object({ moved: number() }), {
13770
13871
  kind: "mutation",
13771
13872
  auth: "admin"
13873
+ }), method(_void(), array(LocationIconAssignmentSchema)), method(object({
13874
+ location: string(),
13875
+ icon: LocationIconIdSchema.nullable()
13876
+ }), _void(), {
13877
+ kind: "mutation",
13878
+ auth: "admin"
13879
+ }), method(_void(), array(LocationDescriptionAssignmentSchema)), method(object({
13880
+ location: string(),
13881
+ description: string().max(400).nullable()
13882
+ }), _void(), {
13883
+ kind: "mutation",
13884
+ auth: "admin"
13885
+ }), method(_void(), array(SiteZoneSchema)), method(object({
13886
+ name: string(),
13887
+ icon: LocationIconIdSchema.nullable().optional()
13888
+ }), _void(), {
13889
+ kind: "mutation",
13890
+ auth: "admin"
13891
+ }), method(object({ name: string() }), _void(), {
13892
+ kind: "mutation",
13893
+ auth: "admin"
13894
+ }), method(object({
13895
+ from: string(),
13896
+ to: string()
13897
+ }), _void(), {
13898
+ kind: "mutation",
13899
+ auth: "admin"
13900
+ }), method(object({
13901
+ location: string(),
13902
+ zone: string().nullable()
13903
+ }), _void(), {
13904
+ kind: "mutation",
13905
+ auth: "admin"
13772
13906
  }), method(object({
13773
13907
  deviceId: number(),
13774
13908
  disabled: boolean()
@@ -32670,6 +32804,18 @@ Object.freeze({
32670
32804
  addonId: null,
32671
32805
  access: "view"
32672
32806
  },
32807
+ "deviceManager.listLocationDescriptions": {
32808
+ capName: "device-manager",
32809
+ capScope: "system",
32810
+ addonId: null,
32811
+ access: "view"
32812
+ },
32813
+ "deviceManager.listLocationIcons": {
32814
+ capName: "device-manager",
32815
+ capScope: "system",
32816
+ addonId: null,
32817
+ access: "view"
32818
+ },
32673
32819
  "deviceManager.listLocations": {
32674
32820
  capName: "device-manager",
32675
32821
  capScope: "system",
@@ -32682,6 +32828,12 @@ Object.freeze({
32682
32828
  addonId: null,
32683
32829
  access: "view"
32684
32830
  },
32831
+ "deviceManager.listSiteZones": {
32832
+ capName: "device-manager",
32833
+ capScope: "system",
32834
+ addonId: null,
32835
+ access: "view"
32836
+ },
32685
32837
  "deviceManager.listWrappersForCap": {
32686
32838
  capName: "device-manager",
32687
32839
  capScope: "system",
@@ -32766,12 +32918,24 @@ Object.freeze({
32766
32918
  addonId: null,
32767
32919
  access: "delete"
32768
32920
  },
32921
+ "deviceManager.removeSiteZone": {
32922
+ capName: "device-manager",
32923
+ capScope: "system",
32924
+ addonId: null,
32925
+ access: "delete"
32926
+ },
32769
32927
  "deviceManager.renameLocation": {
32770
32928
  capName: "device-manager",
32771
32929
  capScope: "system",
32772
32930
  addonId: null,
32773
32931
  access: "create"
32774
32932
  },
32933
+ "deviceManager.renameSiteZone": {
32934
+ capName: "device-manager",
32935
+ capScope: "system",
32936
+ addonId: null,
32937
+ access: "create"
32938
+ },
32775
32939
  "deviceManager.runDeviceAction": {
32776
32940
  capName: "device-manager",
32777
32941
  capScope: "system",
@@ -32814,6 +32978,24 @@ Object.freeze({
32814
32978
  addonId: null,
32815
32979
  access: "create"
32816
32980
  },
32981
+ "deviceManager.setLocationDescription": {
32982
+ capName: "device-manager",
32983
+ capScope: "system",
32984
+ addonId: null,
32985
+ access: "create"
32986
+ },
32987
+ "deviceManager.setLocationIcon": {
32988
+ capName: "device-manager",
32989
+ capScope: "system",
32990
+ addonId: null,
32991
+ access: "create"
32992
+ },
32993
+ "deviceManager.setLocationZone": {
32994
+ capName: "device-manager",
32995
+ capScope: "system",
32996
+ addonId: null,
32997
+ access: "create"
32998
+ },
32817
32999
  "deviceManager.setMetadata": {
32818
33000
  capName: "device-manager",
32819
33001
  capScope: "system",
@@ -32844,6 +33026,12 @@ Object.freeze({
32844
33026
  addonId: null,
32845
33027
  access: "create"
32846
33028
  },
33029
+ "deviceManager.setSiteZone": {
33030
+ capName: "device-manager",
33031
+ capScope: "system",
33032
+ addonId: null,
33033
+ access: "create"
33034
+ },
32847
33035
  "deviceManager.setStreamProfileMap": {
32848
33036
  capName: "device-manager",
32849
33037
  capScope: "system",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-w8QFHMPp.js");
5
+ const require_dist = require("../dist-CMdlcAV-.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/ingress/tailscale-cli.ts
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-YOWzoZRg.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-Del4sKyD.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.2.105",
3
+ "version": "1.2.107",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",